Use std::string in info_symbol_command
[external/binutils.git] / gdb / ChangeLog
1 2017-10-03  Tom Tromey  <tom@tromey.com>
2
3         * printcmd.c (info_symbol_command): Use std::string.
4
5 2017-10-03  Tom Tromey  <tom@tromey.com>
6
7         * top.c (gdb_safe_append_history): Use std::string.
8
9 2017-10-03  Tom Tromey  <tom@tromey.com>
10
11         * event-top.c (stdin_event_handler): Update.
12         * main.c (captured_main_1): Update.
13         * top.h (make_delete_ui_cleanup): Remove.
14         (struct ui): Add constructor and destructor.
15         (new_ui, delete_ui): Remove.
16         * top.c (make_delete_ui_cleanup): Remove.
17         (new_ui_command): Use std::unique_ptr.
18         (delete_ui_cleanup): Remove.
19         (ui::ui): Rename from new_ui.  Update.
20         (free_ui): Remove.
21         (ui::~ui): Rename from delete_ui.  Update.
22
23 2017-10-03  Tom Tromey  <tom@tromey.com>
24
25         * symfile.c (load_progress): Use gdb::byte_vector.
26
27 2017-10-03  Tom Tromey  <tom@tromey.com>
28
29         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
30         declaration.
31         * printcmd.c (x_command): Remove unused declaration.
32         * symfile.c (symbol_file_command): Remove unused declaration.
33
34 2017-10-03  Tom Tromey  <tom@tromey.com>
35
36         * utils.c (internal_vproblem): Use std::string.
37         (defaulted_query): Likewise.
38
39 2017-10-03  Tom Tromey  <tom@tromey.com>
40
41         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
42         * top.c (execute_command_to_string): Update.
43         * utils.c (make_cleanup_restore_page_info): Remove.
44         (do_restore_page_info_cleanup): Remove.
45         (set_batch_flag_and_restore_page_info):
46         New.
47         (make_cleanup_restore_page_info): Remove.
48         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
49         (~set_batch_flag_and_restore_page_info): New
50         (make_cleanup_restore_uinteger): Remove.
51         (make_cleanup_restore_integer): Remove.
52         (struct restore_integer_closure): Remove.
53         (restore_integer): Remove.
54         * utils.h (struct set_batch_flag_and_restore_page_info): New
55         class.
56         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
57         (make_cleanup_restore_page_info): Remove.
58         (make_cleanup_restore_uinteger) Remove.
59         (make_cleanup_restore_integer) Remove.
60
61 2017-10-03  Tom Tromey  <tom@tromey.com>
62
63         * record-full.h (record_full_gdb_operation_disable_set): Return
64         scoped_restore_tmpl<int>.
65         * infrun.c (adjust_pc_after_break): Update.
66         (handle_signal_stop): Update.
67         * record-full.c (record_full_gdb_operation_disable_set): Return
68         scoped_restore_tmpl<int>.
69         (record_full_wait_1, record_full_insert_breakpoint)
70         (record_full_remove_breakpoint, record_full_save)
71         (record_full_goto_insn): Update.
72
73 2017-10-02  Tom Tromey  <tom@tromey.com>
74
75         PR rust/22236:
76         * rust-lang.c (rust_val_print_str): New function.
77         (val_print_struct): Call it.
78         (rust_subscript): Preserve name of slice type.
79
80 2017-10-02  Tom Tromey  <tom@tromey.com>
81
82         * rust-lang.c (rust_subscript): Handle slices in
83         EVAL_AVOID_SIDE_EFFECTS case.
84
85 2017-10-02  Tom Tromey  <tom@tromey.com>
86
87         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
88
89 2017-10-02  Tom Tromey  <tom@tromey.com>
90
91         * rust-lang.h (rust_slice_type): Add "extern".
92
93 2017-10-02  Tom Tromey  <tom@tromey.com>
94             Pedro Alves  <palves@redhat.com>
95
96         * ada-lang.h (ada_exc_info::operator<): Make const.
97         (ada_exc_info::operator==): Make const.
98         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
99         Make const.
100
101 2017-09-29  Tom Tromey  <tom@tromey.com>
102
103         * target.c (read_whatever_is_readable): Change type of "result".
104         Update.
105         (free_memory_read_result_vector): Remove.
106         (read_memory_robust): Change return type.  Update.
107         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
108         bin2hex, std::string.
109         * target.h (memory_read_result_s): Remove typedef.
110         (free_memory_read_result_vector): Remove.
111         (read_memory_robust): Return std::vector.
112
113 2017-09-29  Tom Tromey  <tom@tromey.com>
114
115         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
116
117 2017-09-29  Tom Tromey  <tom@tromey.com>
118
119         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
120         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
121         operator< and operator==.
122         (ada_exceptions_list): Return a std::vector.
123         * ada-lang.c (ada_exc_info::operator<): Rename from
124         compare_ada_exception_info.
125         (ada_exc_info::operator==): New.
126         (sort_remove_dups_ada_exceptions_list): Change type of
127         "exceptions".
128         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
129         (ada_add_global_exceptions): Likewise.
130         (ada_exceptions_list_1): Return a std::vector.
131         (ada_exceptions_list): Likewise.
132
133 2017-09-29  Tom Tromey  <tom@tromey.com>
134
135         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
136         'std::set *'.
137         (print_one_inferior): Update.
138         (free_vector_of_ints): Remove.
139         (list_available_thread_groups): Change "ids" to std::set.
140         (mi_cmd_list_thread_groups): Update.
141         (struct collect_cores_data) <core>: Now a std::set.
142         (collect_cores): Update.
143         (unique): Remove.
144         (print_one_inferior): Update.
145
146 2017-09-29  Tom Tromey  <tom@tromey.com>
147
148         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
149         (mi_execute_async_cli_command): Likewise.
150         (mi_cmd_trace_frame_collected): Use field_fmt.
151
152 2017-09-29  Tom Tromey  <tom@tromey.com>
153
154         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
155         gdb::byte_vector.
156
157 2017-09-29  Tom Tromey  <tom@tromey.com>
158
159         * mi/mi-parse.c (mi_parse): Remove unused declaration.
160
161 2017-09-29  Tom Tromey  <tom@tromey.com>
162
163         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
164
165 2017-09-29  Tom Tromey  <tom@tromey.com>
166
167         * varobj.h (varobj_gen_name): Return std::string.
168         * varobj.c (varobj_gen_name): Return std::string.
169         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
170         (mi_cmd_var_delete): Don't copy "name".
171
172 2017-09-29  Tom Tromey  <tom@tromey.com>
173
174         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
175         (mi_cmd_break_insert_1): Update.
176
177 2017-09-29  Tom Tromey  <tom@tromey.com>
178
179         * target.h (make_scoped_defer_target_commit_resume): Update.
180         * target.c (make_scoped_defer_target_commit_resume): Rename from
181         make_cleanup_defer_target_commit_resume.  Return a
182         scoped_restore.
183         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
184
185 2017-09-29  Tom Tromey  <tom@tromey.com>
186
187         * main.c (captured_main_1): Remove unused declaration.
188         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
189
190 2017-09-29  Tom Tromey  <tom@tromey.com>
191
192         * symtab.c (search_symbols): Remove unused outer cleanup.
193         (make_source_files_completion_list): Remove unused declaration.
194
195 2017-09-29  Tom Tromey  <tom@tromey.com>
196
197         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
198
199 2017-09-29  Tom Tromey  <tom@tromey.com>
200
201         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
202         gdb::byte_vector.
203
204 2017-09-29  Tom Tromey  <tom@tromey.com>
205
206         * complaints.c (vcomplaint): Use std::string.
207
208 2017-09-29  Tom Tromey  <tom@tromey.com>
209
210         * tracepoint.c (trace_variable_command): Use std::string.
211         (encode_actions_1): Remove unused declarations.
212         (create_tsv_from_upload): Use std::string.
213
214 2017-09-29  Tom Tromey  <tom@tromey.com>
215
216         * cp-support.c (gdb_demangle): Use std::string.
217
218 2017-09-29  Tom Tromey  <tom@tromey.com>
219
220         * stack.c (parse_frame_specification): Use std::string
221         (info_frame_command): Use gdb::unique_xmalloc_ptr.
222
223 2017-09-29  Tom Tromey  <tom@tromey.com>
224
225         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
226
227 2017-09-29  Tom Tromey  <tom@tromey.com>
228
229         * utils.c (vfprintf_maybe_filtered): Use std::string.
230         (vfprintf_unfiltered): Likewise.
231
232 2017-09-29  Tom Tromey  <tom@tromey.com>
233
234         * event-top.c (top_level_prompt): Return std::string.
235         (display_gdb_prompt): Update.
236
237 2017-09-29  Tom Tromey  <tom@tromey.com>
238
239         * unittests/common-utils-selftests.c (format): New function.
240         (string_vprintf_tests): New function.
241         (_initialize_common_utils_selftests): Register new tests.
242         * common/common-utils.c (string_vprintf): New function.
243         * common/common-utils.h (string_vprintf): Declare.
244
245 2017-09-29  Pedro Alves  <palves@redhat.com>
246
247         * common/rsp-low.c (unpack_varlen_hex): Constify.
248         * common/rsp-low.h (unpack_varlen_hex): Constify.
249         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
250         Constify.
251         * remote.c (remote_set_permissions, read_ptid)
252         (remote_current_thread, remote_get_threads_with_qthreadinfo)
253         (remote_static_tracepoint_marker_at)
254         (remote_static_tracepoint_markers_by_strid)
255         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
256         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
257         (parse_tracepoint_definition, parse_tsv_definition)
258         (parse_static_tracepoint_marker_definition): Constify.
259         * tracepoint.h (parse_static_tracepoint_marker_definition)
260         (parse_trace_status, parse_tracepoint_status)
261         (parse_tracepoint_definition, parse_tsv_definition): Constify.
262
263 2017-09-29  Pedro Alves  <palves@redhat.com>
264
265         * remote.c (target_buf, target_buf_size): Delete.
266         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
267         Use the connection's packet buffer instead.
268         All callers adjusted.
269         (_initialize_remote): Remove references to target_buf and
270         target_buf_size.
271
272 2017-09-28  Pedro Alves  <palves@redhat.com>
273
274         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
275         unittests/common-utils-selftests.c.
276         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
277         (COMMON_OBS): Remove utils-selftests.o.
278         * utils-selftests.c: Move to ...
279         * unittests/common-utils-selftests.c: ... here and rename self
280         test to "string_printf".
281
282 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
283
284         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
285         having NULL cus or tus.
286
287 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
288
289         * arm-tdep.c: (convert_from_extended): Remove.
290         (convert_to_extended): Likewise.
291         (arm_extract_return_value): Use convert_typed_floating.
292         (arm_store_return_value): Likewise.
293
294         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
295         * sh-tdep.c: Do not include "floatformat.h".
296         (sh_littlebyte_bigword_type): New function.
297         (sh_register_convert_to_virtual): Use convert_typed_floating.
298         (sh_register_convert_to_raw): Likewise.
299         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
300         (sh64_littlebyte_bigword_type): New function.
301         (sh64_extract_return_value): Use convert_typed_floating.
302         (sh64_register_convert_to_virtual): Likewise.
303         (sh64_register_convert_to_raw): Likewise.
304
305 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
306
307         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
308         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
309
310         * gdbtypes.h (union type_specific): Make field floatformat hold
311         just a single struct floatformat, not an array.
312         (floatformat_from_type): Move here.
313         * gdbtypes.c (floatformat_from_type): Move here.  Update to
314         changed TYPE_FLOATFORMAT definition.
315         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
316         (recursive_dump_type): Likewise.
317         (init_float_type): Install correct floatformat for byte order.
318         (arch_float_type): Likewise.
319
320 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
321
322         * gdbtypes.c (init_type): Change incoming argument from
323         length-in-bytes to length-in-bits.  Assert length is a
324         multiple of TARGET_CHAR_BITS.
325         (arch_type, arch_flags_type): Likewise.
326         (init_integer_type): Update call to init_type.
327         (init_character_type): Likewise.
328         (init_boolean_type): Likewise.
329         (init_float_type): Likewise.
330         (init_decfloat_type): Likewise.
331         (init_complex_type): Likewise.
332         (init_pointer_type): Likewise.
333         (objfile_type): Likewise.
334         (arch_integer_type): Update call to arch_type.
335         (arch_character_type): Likewise.
336         (arch_boolean_type): Likewise.
337         (arch_float_type): Likewise.
338         (arch_decfloat_type): Likewise.
339         (arch_complex_type): Likewise.
340         (arch_pointer_type): Likewise.
341         (gdbtypes_post_init): Likewise.
342
343         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
344         (read_base_type): Likewise.
345         * mdebugread.c (basic_type): Likewise.
346         * stabsread.c (dbx_init_float_type): Likewise.
347         (rs6000_builtin_type): Likewise.
348         (read_range_type): Likewise.  Also, fix call to init_integer_type
349         with erroneous length argument.
350
351         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
352         * d-lang.c (build_d_types): Likewise.
353         * f-lang.c (build_fortran_types): Likewise.
354         * go-lang.c (build_go_types): Likewise.
355         * opencl-lang.c (build_opencl_types): Likewise.
356         * jit.c (finalize_symtab): Likewise.
357         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
358         (build_std_type_info_type): Likewise.
359         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
360         update call to arch_flags_type.
361
362         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
363         arch_type.
364         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
365         * windows-tdep.c (windows_get_tlb_type): Likewise.
366
367         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
368         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
369         * m32c-tdep.c (make_types): Likewise.
370         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
371         (rl78_psw_type): Update call to arch_flags_type.
372         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
373         * rx-tdep.c (rx_psw_type): Likewise.
374         (rx_fpsw_type): Likewise.
375         * sparc-tdep.c (sparc_psr_type): Likewise.
376         (sparc_fsr_type): Likewise.
377         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
378         (sparc64_ccr_type): Likewise.
379         (sparc64_fsr_type): Likewise.
380         (sparc64_fprs_type): Likewise.
381
382 2017-09-27  Tom Tromey  <tom@tromey.com>
383
384         * findcmd.c (find_command): Constify.
385
386 2017-09-27  Tom Tromey  <tom@tromey.com>
387
388         * ada-tasks.c (task_command_1, task_command): Constify.
389
390 2017-09-27  Tom Tromey  <tom@tromey.com>
391
392         * symtab.c (maintenance_print_symbol_cache)
393         (maintenance_flush_symbol_cache)
394         (maintenance_print_symbol_cache_statistics): Constify.
395
396 2017-09-27  Tom Tromey  <tom@tromey.com>
397
398         * inferior.c (detach_inferior_command, kill_inferior_command)
399         (inferior_command): Constify.
400
401 2017-09-27  Tom Tromey  <tom@tromey.com>
402
403         * regcache.c (regcache_print, maintenance_print_registers)
404         (maintenance_print_raw_registers)
405         (maintenance_print_cooked_registers)
406         (maintenance_print_register_groups)
407         (maintenance_print_remote_registers): Constify.
408
409 2017-09-27  Tom Tromey  <tom@tromey.com>
410
411         * printcmd.c (map_display_numbers, undisplay_command)
412         (enable_disable_display_command, enable_display_command)
413         (disable_display_command): Constify.
414
415 2017-09-27  Tom Tromey  <tom@tromey.com>
416
417         * breakpoint.h (delete_command): Don't declare.
418         * breakpoint.c (delete_command, enable_once_command)
419         (enable_count_command, enable_delete_command, breakpoint_1)
420         (maintenance_info_breakpoints, stopin_command, stopat_command)
421         (delete_command, delete_trace_command, save_breakpoints)
422         (save_breakpoints_command, save_tracepoints_command): Constify.
423
424 2017-09-27  Tom Tromey  <tom@tromey.com>
425
426         * macrocmd.c (macro_expand_command, macro_expand_once_command)
427         (skip_ws, extract_identifier, macro_define_command)
428         (macro_undef_command, macro_list_command): Constify.
429
430 2017-09-27  Tom Tromey  <tom@tromey.com>
431
432         * infcmd.c (environment_info, set_environment_command)
433         (unset_environment_command, path_info, info_proc_cmd_1)
434         (info_proc_cmd_mappings, info_proc_cmd_stat)
435         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
436         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
437
438 2017-09-27  Tom Tromey  <tom@tromey.com>
439
440         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
441         Constify.
442
443 2017-09-27  Tom Tromey  <tom@tromey.com>
444
445         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
446
447 2017-09-27  Tom Tromey  <tom@tromey.com>
448
449         * demangle.c (demangle_command): Constify.
450
451 2017-09-27  Tom Tromey  <tom@tromey.com>
452
453         * progspace.c (maintenance_info_program_spaces_command):
454         Constify.
455
456 2017-09-27  Tom Tromey  <tom@tromey.com>
457
458         * compile/compile.c (check_raw_argument, compile_file_command)
459         (compile_code_command, compile_print_command): Constify.
460
461 2017-09-27  Tom Tromey  <tom@tromey.com>
462
463         * reggroups.c (maintenance_print_reggroups): Constify.
464
465 2017-09-27  Tom Tromey  <tom@tromey.com>
466
467         * dwarf2read.c (save_gdb_index_command): Constify.
468
469 2017-09-27  Tom Tromey  <tom@tromey.com>
470
471         * stap-probe.c (info_probes_stap_command): Constify.
472
473 2017-09-27  Tom Tromey  <tom@tromey.com>
474
475         * fork-child.c (unset_exec_wrapper_command): Constify.
476
477 2017-09-27  Tom Tromey  <tom@tromey.com>
478
479         * btrace.c (get_uint, get_context_size, no_chunk)
480         (maint_btrace_packet_history_cmd)
481         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
482         (maint_info_btrace_cmd): Constify.
483
484 2017-09-27  Tom Tromey  <tom@tromey.com>
485
486         * reverse.c (delete_bookmark_command): Constify.
487
488 2017-09-27  Tom Tromey  <tom@tromey.com>
489
490         * remote.c (set_memory_packet_size)
491         (set_memory_write_packet_size, show_memory_write_packet_size)
492         (set_memory_read_packet_size, show_memory_read_packet_size)
493         (compare_sections_command, packet_command, remote_put_command)
494         (remote_get_command, remote_delete_command): Constify.
495
496 2017-09-27  Tom Tromey  <tom@tromey.com>
497
498         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
499         (set_mipsfpu_double_command, set_mipsfpu_none_command)
500         (set_mipsfpu_auto_command): Constify.
501
502 2017-09-27  Tom Tromey  <tom@tromey.com>
503
504         * cli/cli-cmds.h (cd_command): Constify.
505         * cli/cli-cmds.c (cd_command): Constify.
506
507 2017-09-27  Tom Tromey  <tom@tromey.com>
508
509         * thread.c (thread_name_command, thread_find_command): Constify.
510
511 2017-09-27  Tom Tromey  <tom@tromey.com>
512
513         * probe.c (enable_probes_command, disable_probes_command):
514         Constify.
515
516 2017-09-27  Tom Tromey  <tom@tromey.com>
517
518         * symfile.c (symbol_file_command): Constify.
519         * gdbcore.h (deprecated_file_changed_hook): Constify.
520         * exec.c (deprecated_file_changed_hook, exec_file_command)
521         (file_command): Constify.
522         * defs.h (symbol_file_command): Constify.
523
524 2017-09-27  Tom Tromey  <tom@tromey.com>
525
526         * remote-fileio.c (set_system_call_allowed)
527         (show_system_call_allowed): Constify.
528
529 2017-09-27  Tom Tromey  <tom@tromey.com>
530
531         * tracepoint.c (delete_trace_variable_command)
532         (tfind_end_command, tfind_start_command, tfind_pc_command)
533         (tfind_tracepoint_command, tfind_line_command)
534         (tfind_range_command, tfind_outside_command): Constify.
535
536 2017-09-27  Tom Tromey  <tom@tromey.com>
537
538         * ax-gdb.c (maint_agent_printf_command, agent_command)
539         (agent_eval_command): Constify.
540
541 2017-09-27  Tom Tromey  <tom@tromey.com>
542
543         * tracepoint.c (info_scope_command): Constify.
544         * python/python.c (gdbpy_decode_line): Constify.
545         * python/py-breakpoint.c (bppy_init): Constify.
546         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
547         * location.h: (new_linespec_location)
548         (string_to_event_location_basic, string_to_event_location):
549         Constify.
550         * location.c (new_linespec_location)
551         (string_to_event_location_basic, string_to_event_location):
552         Constify.
553         * linespec.h (decode_line_with_current_source)
554         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
555         * linespec.c (linespec_lex_to_end)
556         (decode_line_with_current_source)
557         (decode_line_with_last_displayed): Constify.
558         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
559         Constify.
560         * cli/cli-cmds.c (edit_command, list_command): Constify.
561         * breakpoint.h (until_break_command, watch_command_wrapper)
562         (awatch_command_wrapper, rwatch_command_wrapper)
563         (init_ada_exception_breakpoint): Constify.
564         * breakpoint.c (break_command_1, dprintf_command)
565         (break_range_command, watch_command_wrapper)
566         (rwatch_command_wrapper, awatch_command_wrapper)
567         (until_break_command, init_ada_exception_breakpoint)
568         (strace_marker_create_sals_from_location, trace_command)
569         (ftrace_command, strace_command, struct tracepoint): Constify.
570         * ax-gdb.c (agent_command_1): Constify.
571         * ada-lang.c (ada_exception_sal): Constify.
572
573 2017-09-27  Tom Tromey  <tom@tromey.com>
574
575         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
576         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
577         (get_context_size, no_chunk, get_insn_history_modifiers)
578         (cmd_record_insn_history, get_call_history_modifiers)
579         (cmd_record_call_history): Constify.
580
581 2017-09-27  Tom Tromey  <tom@tromey.com>
582
583         * source.c (show_substitute_path_command)
584         (unset_substitute_path_command, set_substitute_path_command):
585         Constify.
586
587 2017-09-27  Tom Tromey  <tom@tromey.com>
588
589         * typeprint.c (maintenance_print_type): Constify.
590         * maint.c (maintenance_dump_me, maintenance_demangle)
591         (maintenance_time_display, maintenance_info_sections)
592         (maintenance_print_statistics, maintenance_deprecate)
593         (maintenance_undeprecate): Constify.
594         (maintenance_do_deprecate): Constify.  Use std::string.
595         (maintenance_selftest): Constify.
596         * gdbtypes.h (maintenance_print_type): Constify.
597
598 2017-09-27  Tom Tromey  <tom@tromey.com>
599
600         * hppa-tdep.c (unwind_command): Constify.
601
602 2017-09-27  Tom Tromey  <tom@tromey.com>
603
604         * target-descriptions.c (unset_tdesc_filename_cmd)
605         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
606         Constify.
607
608 2017-09-27  Tom Tromey  <tom@tromey.com>
609
610         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
611
612 2017-09-27  Tom Tromey  <tom@tromey.com>
613
614         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
615
616 2017-09-27  Tom Tromey  <tom@tromey.com>
617
618         * tui/tui-regs.c (tui_reg_command): Constify.
619
620 2017-09-27  Tom Tromey  <tom@tromey.com>
621
622         * skip.c (skip_file_command, skip_function_command)
623         (skip_enable_command, skip_disable_command, skip_delete_command):
624         Constify.
625
626 2017-09-27  Tom Tromey  <tom@tromey.com>
627
628         * record-btrace.c (cmd_record_btrace_bts_start)
629         (cmd_record_btrace_pt_start): Constify.
630
631 2017-09-27  Tom Tromey  <tom@tromey.com>
632
633         * symmisc.c (maintenance_print_symbols)
634         (maintenance_print_msymbols, maintenance_print_objfiles)
635         (maintenance_info_symtabs, maintenance_check_symtabs)
636         (maintenance_expand_symtabs, maintenance_info_line_tables):
637         Constify.
638
639 2017-09-27  Tom Tromey  <tom@tromey.com>
640
641         * top.c (new_ui_command): Constify.
642
643 2017-09-27  Tom Tromey  <tom@tromey.com>
644
645         * symfile.c (add_symbol_file_command)
646         (remove_symbol_file_command, list_overlays_command)
647         (map_overlay_command, unmap_overlay_command)
648         (overlay_auto_command, overlay_manual_command)
649         (overlay_off_command, overlay_load_command): Constify.
650
651 2017-09-27  Tom Tromey  <tom@tromey.com>
652
653         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
654         (info_spu_mailbox_command, info_spu_dma_command)
655         (info_spu_proxydma_command): Constify.
656
657 2017-09-27  Tom Tromey  <tom@tromey.com>
658
659         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
660
661 2017-09-27  Tom Tromey  <tom@tromey.com>
662
663         * cli/cli-script.c (user_defined_command): Constify.
664
665 2017-09-27  Tom Tromey  <tom@tromey.com>
666
667         * cli/cli-dump.c (dump_memory_command, dump_value_command)
668         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
669         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
670         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
671         (dump_binary_value, append_binary_memory, append_binary_value):
672         Constify.
673         (struct dump_context) <func>: Constify.
674         (add_dump_command): Update.
675
676 2017-09-27  Tom Tromey  <tom@tromey.com>
677
678         * cli/cli-cmds.c (show_version, show_configuration)
679         (source_command, show_user): Constify.
680
681 2017-09-27  Tom Tromey  <tom@tromey.com>
682
683         * target.c (maintenance_print_target_stack): Constify.
684
685 2017-09-27  Tom Tromey  <tom@tromey.com>
686
687         * interps.c (interpreter_exec_cmd): Constify.
688
689 2017-09-27  Tom Tromey  <tom@tromey.com>
690
691         * record-full.c (cmd_record_full_restore): Constify.
692
693 2017-09-27  Tom Tromey  <tom@tromey.com>
694
695         * memattr.c (enable_mem_command, disable_mem_command)
696         (delete_mem_command): Constify.
697
698 2017-09-27  Tom Tromey  <tom@tromey.com>
699
700         * value.c (show_convenience): Constify.
701
702 2017-09-27  Tom Tromey  <tom@tromey.com>
703
704         * gdbcore.h (core_file_command): Update.
705         * corefile.c (core_file_command): Constify.
706
707 2017-09-27  Tom Tromey  <tom@tromey.com>
708
709         * user-regs.c (maintenance_print_user_registers): Constify.
710
711 2017-09-27  Tom Tromey  <tom@tromey.com>
712
713         * cp-namespace.c (maintenance_cplus_namespace): Constify.
714
715 2017-09-27  Tom Tromey  <tom@tromey.com>
716
717         * cp-support.c (first_component_command): Constify.
718
719 2017-09-27  Tom Tromey  <tom@tromey.com>
720
721         * psymtab.c (maintenance_print_psymbols)
722         (maintenance_info_psymtabs, maintenance_check_psymtabs):
723         Constify.
724
725 2017-09-27  Tom Tromey  <tom@tromey.com>
726
727         * windows-tdep.c (display_tib): Constify.
728
729 2017-09-27  Tom Tromey  <tom@tromey.com>
730
731         * linux-fork.c (delete_checkpoint_command)
732         (detach_checkpoint_command): Constify.
733
734 2017-09-27  Tom Tromey  <tom@tromey.com>
735
736         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
737
738 2017-09-27  Tom Tromey  <tom@tromey.com>
739
740         * arc-tdep.c (dump_arc_instruction_command): Constify.
741
742 2017-09-27  Tom Tromey  <tom@tromey.com>
743
744         * valprint.c (set_radix, show_radix): Constify.
745
746 2017-09-27  Tom Tromey  <tom@tromey.com>
747
748         * dtrace-probe.c (info_probes_dtrace_command): Constify.
749
750 2017-09-27  Tom Tromey  <tom@tromey.com>
751
752         * command.h (not_just_help_class_command): Update.
753         * cli/cli-decode.h (not_just_help_class_command): Update.
754         * cli/cli-decode.c (not_just_help_class_command): Constify.
755
756 2017-09-27  Tom Tromey  <tom@tromey.com>
757
758         * gdb_bfd.c (maintenance_info_bfds): Constify.
759
760 2017-09-27  Tom Tromey  <tom@tromey.com>
761
762         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
763         overloads.
764         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
765         (do_const_cfunc): New function.
766         (cmd_cfunc_eq): New overload.
767         (cli_user_command_p): Check do_const_cfunc.
768         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
769         const_cfunc.
770         * command.h (add_cmd): Add const overload and no-function
771         overload.
772         (set_cmd_cfunc): Add const overload.
773         (cmd_const_cfunc_ftype): Declare.
774         (cmd_cfunc_eq): Add const overload.
775         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
776         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
777         overload.
778
779 2017-09-27  Tom Tromey  <tom@tromey.com>
780
781         * macroexp.c (get_next_token_for_substitution): New function.
782         (substitute_args): Call it.  Check for __VA_OPT__.
783
784 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
785             Pedro Alves <palves@redhat.com>
786
787         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
788         producer_is_icc_lt_14.
789         (producer_is_icc_lt_14): New function.
790         (check_producer): Add code for checking version of ICC.
791         (producer_is_icc): Move to producer.c.
792         (read_structure_type): Restrict ICC workaround to ICC<14.
793         * producer.c: Include selftest.h.
794         (producer_is_icc, producer_parsing_tests, _initialize_producer):
795         New functions.
796         * producer.h (producer_is_icc): New declaration.
797
798 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
799
800         * Makefile.in (SFILES): Add producer.c.
801         (COMMON_OBS): Add producer.o
802         * amd64-tdep.c (producer.h): Add new include.
803         * dwarf2read.c (producer.h): Add new include.
804         * producer.c: New file.
805         * producer.h: New file.
806         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
807         producer.c.
808         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
809         producer.h.
810
811 2017-09-26  Matthias Klose  <doko@ubuntu.com>
812
813         * configure.ac: Search ncursesw before ncurses.
814         Check ncursesw/ncurses.h before ncurses/ncurses.h.
815         * gdb_curses.h: Include <ncursesw/ncurses.h>
816         * config.in, configure: Regenerate.
817
818 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
819
820         PR gdb/22185
821         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
822         obsolete.
823         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
824         Remove i386sol2 support.
825         * configure.nat <i386sol2>: Remove.
826         <sol2-64>: Fold into ...
827         <sol2>: ... this.
828         Move common settings to default section.
829         Add sol-thread.o.
830         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
831         x86_64-*-solaris2.1[0-9]*>: Rename to ...
832         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
833         <i[34567]86-*-solaris*>: Remove.
834         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
835
836         * configure.ac: Remove wctype in libw check.
837         (_MSE_INT_H): Don't define on Solaris 7-9.
838         <solaris*>: Remove libthread_db.so.1 check.
839         * configure: Regenerate.
840         * config.in: Regenerate.
841
842         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
843         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
844         (gdb_ps_size_t): Remove.
845         Use base types in users.
846         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
847
848         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
849
850 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
851
852         PR build/22206
853         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
854         (adi_is_addr_mapped): Likewise.
855         (PSR_ICC): Don't redefine.
856         (PSR_IMPL): Likewise.
857
858 2017-09-25  Tom Tromey  <tom@tromey.com>
859
860         * regcache.c (regcache::dump): Use string_printf.
861
862 2017-09-25  Tom Tromey  <tom@tromey.com>
863
864         * regcache.c (class regcache_invalidator): New.
865         (struct register_to_invalidate): Remove.
866         (make_cleanup_regcache_invalidate): Remove.
867         (regcache::raw_write): Use regcache_invalidator.
868
869 2017-09-25  Tom Tromey  <tom@tromey.com>
870
871         * spu-tdep.c (spu2ppu_sniffer): Update.
872         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
873         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
874         Remove.
875         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
876         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
877         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
878         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
879         (frame_pop): Update.
880
881 2017-09-25  Tom Tromey  <tom@tromey.com>
882
883         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
884         * regcache.h (regcache_xfree): Don't declare.
885         * regcache.c (regcache_xfree): Remove.
886         (do_regcache_xfree): Use delete.
887         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
888         * linux-fork.c (free_fork): Use delete.
889         (fork_save_infrun_state): Likewise.
890         * jit.c (jit_dealloc_cache): Use delete.
891         * infrun.c (discard_infcall_suspend_state): Use delete.
892
893 2017-09-25  Tom Tromey  <tom@tromey.com>
894
895         * regcache.h (regcache_xmalloc): Don't declare.
896         (regcache_raw_set_cached_value): Update comment.
897         * regcache.c (regcache_xmalloc): Remove.
898         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
899         * jit.c (jit_frame_sniffer): Use new.
900         * frame.c (frame_save_as_regcache): Use new.
901
902 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
903
904         * NEWS: Advertise support for guarded-storage registers on IBM z.
905
906 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
907
908         * s390-linux-nat.c (have_regset_gs): New static variable.
909         (s390_linux_fetch_inferior_registers): Handle guarded-storage
910         control block and guarded-storage broadcast control regsets.
911         (s390_read_description): Detect whether the target has
912         guarded-storage support, return appropriate tdesc.
913         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
914         (features/s390x-gs-linux64.c): Likewise.
915         (struct gdbarch_tdep) <have_gs>: New field.
916         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
917         (s390_gsbc_regset): New variables.
918         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
919         and s390_gsbc_regset, if applicable.
920         (s390_core_read_description): Check whether core file was from a
921         target with guarded-storage support; include appropriate regsets.
922         (s390_gdbarch_init): Add registers for guarded-storage support.
923         (_initialize_s390_tdep): Initialize new target descriptions that
924         include registers for guarded-storage support.
925         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
926         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
927         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
928         (S390_NUM_REGS): Adjust macro definition.
929         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
930         (tdesc_s390x_gs_linux64): New declarations.
931
932 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
933
934         * features/s390-gs-linux64.xml: New file.
935         * features/s390-gs.xml: New file.
936         * features/s390-gsbc.xml: New file.
937         * features/s390x-gs-linux64.xml: New file.
938         * features/Makefile (WHICH): Add s390-gs-linux64 and
939         s390x-gs-linux64.
940         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
941         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
942         * features/s390-gs-linux64.c: New generated file.
943         * features/s390x-gs-linux64.c: New file.
944         * regformats/s390-gs-linux64.dat: New file.
945         * regformats/s390x-gs-linux64.dat: New file.
946
947 2017-09-23  Tom Tromey  <tom@tromey.com>
948
949         * defs.h (make_cleanup_override_quit_handler): Don't declare.
950
951 2017-09-22  Tom Tromey  <tom@tromey.com>
952
953         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
954         type to scoped_restore_tmpl.
955         <scoped_input_handler>: Initialize m_quit_handler directly.
956
957 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
958
959         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
960         (cd_command): Likewise.  Free "current_directory" before
961         assigning to it.
962         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
963         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
964         * top.c (gdb_dirbuf): Remove global declaration.
965         * top.h (gdb_dirbuf): Likewise.
966
967 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
968
969         * gnulib/aclocal.m4: Regenerate.
970         * gnulib/config.in: Regenerate.
971         * gnulib/configure: Regenerate.
972         * gnulib/import/Makefile.am: Regenerate.
973         * gnulib/import/Makefile.in: Regenerate.
974         * gnulib/import/assure.h: New file.
975         * gnulib/import/at-func.c: Likewise
976         * gnulib/import/chdir-long.c: New file.
977         * gnulib/import/chdir-long.h: New file.
978         * gnulib/import/cloexec.c: New file.
979         * gnulib/import/cloexec.h: New file.
980         * gnulib/import/close.c: New file.
981         * gnulib/import/closedir.c: New file.
982         * gnulib/import/dirent-private.h: New file.
983         * gnulib/import/dup-safer.c: New file.
984         * gnulib/import/dup.c: New file.
985         * gnulib/import/dup2.c: New file.
986         * gnulib/import/error.c: New file.
987         * gnulib/import/error.h: New file.
988         * gnulib/import/exitfail.c: New file.
989         * gnulib/import/exitfail.h: New file.
990         * gnulib/import/fchdir.c: New file.
991         * gnulib/import/fcntl.c: New file.
992         * gnulib/import/fcntl.in.h: New file.
993         * gnulib/import/fd-hook.c: New file.
994         * gnulib/import/fd-hook.h: New file.
995         * gnulib/import/fd-safer.c: New file.
996         * gnulib/import/fdopendir.c: New file.
997         * gnulib/import/filename.h: New file.
998         * gnulib/import/filenamecat-lgpl.c: New file.
999         * gnulib/import/filenamecat.h: New file.
1000         * gnulib/import/fstat.c: New file.
1001         * gnulib/import/fstatat.c: New file.
1002         * gnulib/import/getcwd-lgpl.c: New file.
1003         * gnulib/import/getcwd.c: New file.
1004         * gnulib/import/getdtablesize.c: New file.
1005         * gnulib/import/getlogin_r.c: New file.
1006         * gnulib/import/getprogname.c: New file.
1007         * gnulib/import/getprogname.h: New file.
1008         * gnulib/import/gettext.h: New file.
1009         * gnulib/import/glob-libc.h: New file.
1010         * gnulib/import/glob.c: New file.
1011         * gnulib/import/glob.in.h: New file.
1012         * gnulib/import/intprops.h: New file.
1013         * gnulib/import/m4/chdir-long.m4: New file.
1014         * gnulib/import/m4/close.m4: New file.
1015         * gnulib/import/m4/closedir.m4: New file.
1016         * gnulib/import/m4/d-ino.m4: New file.
1017         * gnulib/import/m4/d-type.m4: New file.
1018         * gnulib/import/m4/dup.m4: New file.
1019         * gnulib/import/m4/dup2.m4: New file.
1020         * gnulib/import/m4/error.m4: New file.
1021         * gnulib/import/m4/fchdir.m4: New file.
1022         * gnulib/import/m4/fcntl.m4: New file.
1023         * gnulib/import/m4/fcntl_h.m4: New file.
1024         * gnulib/import/m4/fdopendir.m4: New file.
1025         * gnulib/import/m4/filenamecat.m4: New file.
1026         * gnulib/import/m4/fstat.m4: New file.
1027         * gnulib/import/m4/fstatat.m4: New file.
1028         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1029         * gnulib/import/m4/getcwd-path-max.m4: New file.
1030         * gnulib/import/m4/getcwd.m4: New file.
1031         * gnulib/import/m4/getdtablesize.m4: New file.
1032         * gnulib/import/m4/getlogin_r.m4: New file.
1033         * gnulib/import/m4/getprogname.m4: New file.
1034         * gnulib/import/m4/glob.m4: New file.
1035         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1036         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1037         * gnulib/import/m4/mempcpy.m4: New file.
1038         * gnulib/import/m4/memrchr.m4: New file.
1039         * gnulib/import/m4/mode_t.m4: New file.
1040         * gnulib/import/m4/msvc-inval.m4: New file.
1041         * gnulib/import/m4/msvc-nothrow.m4: New file.
1042         * gnulib/import/m4/open.m4: New file.
1043         * gnulib/import/m4/openat.m4: New file.
1044         * gnulib/import/m4/opendir.m4: New file.
1045         * gnulib/import/m4/readdir.m4: New file.
1046         * gnulib/import/m4/realloc.m4: New file.
1047         * gnulib/import/m4/rewinddir.m4: New file.
1048         * gnulib/import/m4/save-cwd.m4: New file.
1049         * gnulib/import/m4/strdup.m4: New file.
1050         * gnulib/import/m4/strerror.m4: New file.
1051         * gnulib/import/m4/unistd-safer.m4: New file.
1052         * gnulib/import/mempcpy.c: New file.
1053         * gnulib/import/memrchr.c: New file.
1054         * gnulib/import/msvc-inval.c: New file.
1055         * gnulib/import/msvc-inval.h: New file.
1056         * gnulib/import/msvc-nothrow.c: New file.
1057         * gnulib/import/msvc-nothrow.h: New file.
1058         * gnulib/import/open.c: New file.
1059         * gnulib/import/openat-die.c: New file.
1060         * gnulib/import/openat-priv.h: New file.
1061         * gnulib/import/openat-proc.c: New file.
1062         * gnulib/import/openat.c: New file.
1063         * gnulib/import/openat.h: New file.
1064         * gnulib/import/opendir.c: New file.
1065         * gnulib/import/pipe-safer.c: New file.
1066         * gnulib/import/readdir.c: New file.
1067         * gnulib/import/realloc.c: New file.
1068         * gnulib/import/rewinddir.c: New file.
1069         * gnulib/import/save-cwd.c: New file.
1070         * gnulib/import/save-cwd.h: New file.
1071         * gnulib/import/strdup.c: New file.
1072         * gnulib/import/strerror-override.c: New file.
1073         * gnulib/import/strerror-override.h: New file.
1074         * gnulib/import/strerror.c: New file.
1075         * gnulib/import/unistd--.h: New file.
1076         * gnulib/import/unistd-safer.h: New file.
1077         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1078         "getcwd" and "glob".
1079         * ser-tcp.c: Undefine "close" before redefining it.
1080
1081 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1082
1083         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1084         get rid of res_val.
1085
1086 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1087
1088         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1089         <sol2,sparc>: Likewise.
1090         <sol2-64,i386>: Likewise.
1091
1092         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1093         -Wdeprecated-declarations on *-*-solaris*.
1094         * configure: Regenerate.
1095
1096         * procfs.c: Include "nat/inferior.h".
1097         (procfs_info_proc): Fix typo.
1098
1099 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1100
1101         * remote.c (vector): Include.
1102         (struct private_thread_info): Add field, thread_handle.
1103         (free_private_thread_info): Deallocate storage associated with
1104         thread handle.
1105         (get_private_info_thread): Initialize `thread_handle' field.
1106         (struct thread_item): Add field, thread_handle.
1107         (clear_threads_listing_context): Deallocate storage associated
1108         with thread handle.
1109         (start_thread): Add support for "handle" attribute.
1110         (thread_attributes): Add "handle".
1111         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1112         field.
1113         (remote_update_thread_list): Update thread_handle.
1114         (remote_thread_handle_to_thread_info): New function.
1115         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1116
1117 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1118
1119         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1120         function.
1121         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1122         * python/python-internal.h (thread_object_type): Declare.
1123
1124 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1125
1126         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1127         (target_thread_handle_to_thread_info): Declare.
1128         * target.c (target_thread_handle_to_thread_info): New function.
1129         * target-delegates.c: Regenerate.
1130         * gdbthread.h (find_thread_by_handle): Declare.
1131         * thread.c (find_thread_by_handle): New function.
1132         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1133         function.
1134         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1135
1136 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1137
1138         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1139
1140 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1141
1142         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1143
1144 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1145
1146         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1147         to gdb_target_obs.
1148
1149 2017-09-20  Tom Tromey  <tom@tromey.com>
1150
1151         * breakpoint.c (struct counted_command_line): Remove.
1152         (breakpoint_commands): Update.
1153         (alloc_counted_command_line, incref_counted_command_line)
1154         (decref_counted_command_line, do_cleanup_counted_command_line)
1155         (make_cleanup_decref_counted_command_line): Remove.
1156         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1157         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1158         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1159         (save_breakpoints): Update.
1160         * breakpoint.h (counted_command_line): Now a typedef to
1161         shared_ptr.
1162         (struct breakpoint) <commands>: Now a counted_command_line.
1163         (struct bpstats) <command>: Likewise.
1164
1165 2017-09-20  Tom Tromey  <tom@tromey.com>
1166
1167         * breakpoint.c (struct commands_info, do_map_commands_command):
1168         Remove.
1169         (commands_command_1): Update.
1170         (iterate_over_related_breakpoints): Take a function_view.
1171         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1172         (delete_command): Update.
1173         (map_breakpoint_numbers): Take a function_view.
1174         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1175         (disable_command): Update.
1176         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1177         (enable_command): Update.
1178         (struct disp_data, do_enable_breakpoint_disp)
1179         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1180         (do_map_enable_delete_breakpoint): Remove.
1181         (enable_once_command, enable_count_command, enable_delete_command)
1182         (delete_trace_variable_command): Update.
1183
1184 2017-09-20  Tom Tromey  <tom@tromey.com>
1185
1186         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1187         (bpstat_clear): Use delete.
1188         (bpstats): New constructors.
1189         (bpstat_copy, bpstat_stop_status): Use new.
1190         (dprintf_after_condition_true): Update.
1191         * breakpoint.h (bpstats::bpstats): Add constructors.
1192         (bpstats::~bpstats): Add destructor.
1193
1194 2017-09-20  Pedro Alves  <palves@redhat.com>
1195
1196         * eval.c (make_params): Delete, refactored as ...
1197         (class fake_method): ... this new type's ctor.
1198         (fake_method::~fake_method): New.
1199         (evaluate_subexp_standard): Use 'fake_method'.
1200
1201 2017-09-20  Tom Tromey  <tom@tromey.com>
1202
1203         * windows-nat.c (get_windows_debug_event, windows_wait)
1204         (do_initial_windows_stuff, windows_attach): Update.
1205         * utils.c (vwarning, internal_vproblem): Update.
1206         (ui_unregister_input_event_handler_cleanup)
1207         (prepare_to_handle_input): Remove.
1208         (class scoped_input_handler): New.
1209         (defaulted_query, prompt_for_continue): Update.
1210         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1211         Update.
1212         * top.c (undo_terminal_modifications_before_exit): Update.
1213         * target/target.h (target_terminal_init, target_terminal_inferior)
1214         (target_terminal_ours): Don't declare.
1215         (class target_terminal): New.
1216         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1217         (target_terminal_ours_for_output)
1218         (make_cleanup_restore_target_terminal): Don't declare.
1219         (target_terminal_info): Remove.
1220         * target.c (enum terminal_state, terminal_state): Remove.
1221         (target_terminal::terminal_state): Define.
1222         (target_terminal::init): Rename from target_terminal_init.
1223         (target_terminal::inferior): Rename from
1224         target_terminal_inferior.
1225         (target_terminal::ours): Rename from target_terminal_ours.
1226         (target_terminal::ours_for_output): Rename from
1227         target_terminal_ours_for_output.
1228         (target_terminal::info): New method.
1229         (cleanup_restore_target_terminal)
1230         (make_cleanup_restore_target_terminal): Remove.
1231         * solib.c (handle_solib_event): Update.
1232         * remote.c (remote_serial_quit_handler): Update.
1233         (remote_terminal_inferior, remote_wait_as): Update.
1234         * record-full.c (record_full_wait_1): Update.
1235         * nto-procfs.c (procfs_create_inferior): Update.
1236         * nat/fork-inferior.c (startup_inferior): Update.
1237         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1238         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1239         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1240         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1241         (mi_breakpoint_created, mi_breakpoint_deleted)
1242         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1243         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1244         (mi_user_selected_context_changed, report_initial_inferior):
1245         Update.
1246         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1247         (linux_nat_terminal_inferior): Update.
1248         * infrun.c (follow_fork_inferior)
1249         (handle_vfork_child_exec_or_exit, do_target_resume)
1250         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1251         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1252         Update.
1253         * inflow.c (child_terminal_init, info_terminal_command): Update.
1254         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1255         (attach_command): Update.
1256         * infcall.c (call_thread_fsm_should_stop): Update.
1257         * gnu-nat.c (gnu_attach): Update.
1258         * extension.c (struct active_ext_lang_state)
1259         (restore_active_ext_lang): Update.
1260         * exceptions.c (print_flush): Update.
1261         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1262         (struct quit_handler_cleanup_data, restore_quit_handler)
1263         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1264         Remove.
1265         * cp-support.c (gdb_demangle): Update.
1266         * breakpoint.c (update_inserted_breakpoint_locations)
1267         (insert_breakpoint_locations, handle_jit_event)
1268         (disable_breakpoints_in_unloaded_shlib): Update.
1269         * annotate.c (annotate_breakpoints_invalid)
1270         (annotate_frames_invalid): Update.
1271
1272 2017-09-20  Tom Tromey  <tom@tromey.com>
1273
1274         * main.c (catch_command_errors): Rename from
1275         catch_command_errors_const.
1276         (captured_main_1): Update.
1277
1278 2017-09-20  Pedro Alves  <palves@redhat.com>
1279
1280         * cli/cli-cmds.c (list_command): Use print_sal_location.
1281         (print_sal_location): New function.
1282         (ambiguous_line_spec): Use print_sal_location.
1283         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1284         * symtab.c (find_function_start_sal): Likewise.
1285         * symtab.h (symtab_and_line::symbol): New field.
1286
1287 2017-09-20  Pedro Alves  <palves@redhat.com>
1288
1289         * linespec.c (minsym_found): Handle non-text minsyms.
1290         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1291
1292 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1293
1294         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1295         backslash.
1296
1297 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1298
1299         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1300         vmovups instead vmovaps.
1301         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1302
1303 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1304
1305         * NEWS (Changes since GDB 8.0): Add starti.
1306         * infcmd.c (enum run_break): New.
1307         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1308         case.
1309         (run_command): Use enum run_how.
1310         (start_command): Likewise.
1311         (starti_command): New function.
1312         (RUN_ARGS_HELP): New macro.
1313         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1314         commands.  Add starti command.
1315
1316 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1317
1318         * Makefile.in (monitor.o): Remove the rule.
1319
1320 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1321
1322         * annotate.h (struct annotate_arg_emitter): Use
1323         DISABLE_COPY_AND_ASSIGN.
1324         * common/refcounted-object.h (refcounted_object): Likewise.
1325         * completer.h (struct completion_result): Likewise.
1326         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1327         * filename-seen-cache.h (filename_seen_cache): Likewise.
1328         * gdbcore.h (thread_section_name): Likewise.
1329         * gdb_regex.h (compiled_regex): Likewise.
1330         * gdbthread.h (scoped_restore_current_thread): Likewise.
1331         * inferior.h (scoped_restore_current_inferior): Likewise.
1332         * jit.c (jit_reader): Likewise.
1333         * linespec.h (struct linespec_result): Likewise.
1334         * mi/mi-parse.h (struct mi_parse): Likewise.
1335         * nat/fork-inferior.c (execv_argv): Likewise.
1336         * progspace.h (scoped_restore_current_program_space): Likewise.
1337         * python/python-internal.h (class gdbpy_enter): Likewise.
1338         * regcache.h (regcache): Likewise.
1339         * target-descriptions.c (struct tdesc_reg): Likewise.
1340         (struct tdesc_type): Likewise.
1341         (struct tdesc_feature): Likewise.
1342         * ui-out.h (ui_out_emit_type): Likewise.
1343
1344 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1345
1346         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1347         label abort_expression.
1348
1349 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1350
1351         * common/buffer.c (buffer_xml_printf): Adjust.
1352         * common/xml-utils.c (xml_escape_text): Change return type to
1353         std::string, update code accordingly.
1354         * common/xml-utils.h (xml_escape_text): Change return type to
1355         std::string.
1356         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1357         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1358         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1359         Adjust.
1360
1361 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1362
1363         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1364         (SUBDIR_UNITTESTS_OBS): Add new object file.
1365         * unittests/xml-utils-selftests.c: New file.
1366
1367 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1368
1369         * common/selftest.h (selftest): New struct/interface.
1370         (register_test): Add name parameter, add new overload.
1371         (run_tests): Add filter parameter.
1372         (for_each_selftest_ftype): New typedef.
1373         (for_each_selftest): New declaration.
1374         * common/selftest.c (tests): Change type to
1375         map<string, unique_ptr<selftest>>.
1376         (simple_selftest): New struct.
1377         (register_test): New function.
1378         (register_test): Add name parameter and use it.
1379         (run_tests): Add filter parameter and use it.  Add prints.
1380         Adjust to vector -> map change.
1381         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1382         registering selftests.
1383         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1384         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1385         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1386         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1387         * findvar.c (_initialize_findvar): Likewise.
1388         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1389         * maint.c (maintenance_selftest): Update call to run_tests.
1390         (maintenance_info_selftests): New function.
1391         (_initialize_maint_cmds): Register "maintenance info selftests"
1392         command.  Update "maintenance selftest" doc.
1393         * regcache.c (_initialize_regcache): Add names when registering
1394         selftests.
1395         * rust-exp.y (_initialize_rust_exp): Likewise.
1396         * selftest-arch.c (gdbarch_selftest): New struct.
1397         (gdbarch_tests): Remove.
1398         (register_test_foreach_arch): Add name parameter.  Call
1399         register_test.
1400         (tests_with_arch): Remove, move most content to
1401         gdbarch_selftest::operator().
1402         (_initialize_selftests_foreach_arch): Remove.
1403         * selftest-arch.h (register_test_foreach_arch): Add name
1404         parameter.
1405         (run_tests_with_arch): New declaration.
1406         * utils-selftests.c (_initialize_utils_selftests): Add names
1407         when registering selftests.
1408         * utils.c (_initialize_utils): Likewise.
1409         * unittests/array-view-selftests.c
1410         (_initialize_array_view_selftests): Likewise.
1411         * unittests/environ-selftests.c (_initialize_environ_selftests):
1412         Likewise.
1413         * unittests/function-view-selftests.c
1414         (_initialize_function_view_selftests): Likewise.
1415         * unittests/offset-type-selftests.c
1416         (_initialize_offset_type_selftests): Likewise.
1417         * unittests/optional-selftests.c
1418         (_initialize_optional_selftests): Likewise.
1419         * unittests/scoped_restore-selftests.c
1420         (_initialize_scoped_restore_selftests): Likewise.
1421         * NEWS: Document "maintenance selftest" and "maint info
1422         selftests".
1423
1424 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1425
1426         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1427         scoped_restore.
1428
1429 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1430
1431         * mi/mi-main.c (mi_load_progress): Make uiout variable
1432         a unique_ptr.
1433
1434 2017-09-15  Pedro Alves  <palves@redhat.com>
1435
1436         * compile/compile-c-types.c (convert_enum, convert_int)
1437         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1438
1439 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1440
1441         * dwarf2read.c (copy_string): Remove.
1442         (parse_macro_definition): Replace copy_string with savestring.
1443
1444 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1445
1446         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1447         gdb_target_obs.
1448         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1449         Likewise.
1450         (i[34567]86-*-linux*): Likewise.
1451
1452 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1453
1454         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1455         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1456         <stack>: Change type to std::vector.
1457         <stack_len, stack_allocated>: Remove.
1458         <grow_stack>: Remove.
1459         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1460         (dwarf_expr_context::~dwarf_expr_context): Remove.
1461         (dwarf_expr_context::grow_stack): Remove.
1462         (dwarf_expr_context::push): Adjust.
1463         (dwarf_expr_context::pop): Adjust.
1464         (dwarf_expr_context::fetch): Adjust.
1465         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1466         (dwarf_expr_context::stack_empty_p): Adjust.
1467         (dwarf_expr_context::execute_stack_op): Adjust.
1468
1469 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1470
1471         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1472         return type to bool.
1473         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1474
1475 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1476
1477         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1478         Change type to bool.
1479         (dwarf_stack_value) <in_stack_memory>: Likewise.
1480         (dwarf_expr_context) <push_address>: Change parameter type to
1481         bool.
1482         <fetch_in_stack_memory>: Change return type to bool.
1483         <push>: Change parameter type to bool.
1484         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1485         to bool.
1486         (dwarf_expr_context::push_address): Likewise.
1487         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1488         to bool.
1489         (dwarf_expr_context::execute_stack_op): Adjust.
1490         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1491
1492 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1493
1494         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1495         (struct dwarf_expr_context) <n_pieces>: Remove.
1496         <pieces>: Change type to std::vector.
1497         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1498         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1499         pieces.
1500         (dwarf_expr_context::add_piece): Adjust.
1501         * dwarf2loc.c (struct piece_closure): Initialize fields.
1502         <n_pieces>: Remove.
1503         <pieces>: Change type to std::vector.
1504         (allocate_piece_closure): Adjust, change parameter to
1505         std::vector rvalue and std::move it to piece_closure.
1506         (rw_pieced_value): Adjust.
1507         (check_pieced_synthetic_pointer): Adjust.
1508         (indirect_synthetic_pointer): Adjust.
1509         (coerce_pieced_ref): Adjust.
1510         (free_pieced_value_closure):  Adjust.  Use delete to free
1511         piece_closure.
1512         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1513         to allocate_piece_closure.
1514         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1515
1516 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1517
1518         * probe.h (probe_ops_cp): Remove typedef.
1519         (DEF_VEC_P (probe_ops_cp)): Remove.
1520         (all_probe_ops): Change type to std::vector.
1521         * probe.c (info_probes_for_ops): Adjust to vector change.
1522         (probe_linespec_to_ops): Likewise.
1523         (all_probe_ops): Change type to std::vector.
1524         (_initialize_probe): Adjust to vector change.
1525         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1526         * elfread.c (elf_get_probes): Likewise.
1527         * stap-probe.c (_initialize_stap_probe): Likewise.
1528
1529 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1530
1531         * probe.h (struct bound_probe): Define constructors.
1532         * probe.c (bound_probe_s): Remove typedef.
1533         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1534         (collect_probes): Change return type to std::vector, remove
1535         cleanup.
1536         (compare_probes): Return bool, change parameter type.  Change
1537         semantic to "less than".
1538         (gen_ui_out_table_header_info): Change parameter to std::vector
1539         and update.
1540         (exists_probe_with_pops): Likewise.
1541         (info_probes_for_ops): Update to std::vector change.
1542         (enable_probes_command): Likewise.
1543         (disable_probes_command): Likewise.
1544
1545 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1546
1547         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1548         vec to std::vector.
1549         * probe.c (parse_probes_in_pspace): Update.
1550         (find_probes_in_objfile): Update.
1551         (find_probe_by_pc): Update.
1552         (collect_probes): Update.
1553         (probe_any_get_probes): Update.
1554         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1555         return type to reference to std::vector.
1556         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1557         std::vector and update.
1558         (dtrace_process_dof): Likewise.
1559         (dtrace_get_probes): Likewise.
1560         * elfread.c (elf_get_probes): Change return type to std::vector,
1561         store an std::vector in bfd_data.
1562         (probe_key_free): Update to std::vector.
1563         * stap-probe.c (handle_stap_probe): Change parameter to
1564         std::vector and update.
1565         (stap_get_probes): Likewise.
1566         * symfile-debug.c (debug_sym_get_probes): Change return type to
1567         std::vector and update.
1568
1569 2017-09-11  Tom Tromey  <tom@tromey.com>
1570
1571         * breakpoint.c (program_breakpoint_here_p): Update.
1572         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1573         from make_show_memory_breakpoints_cleanup.  Return a
1574         scoped_restore_tmpl<int>.
1575         (restore_show_memory_breakpoints): Remove.
1576         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1577         * mem-break.c (memory_validate_breakpoint): Update.
1578         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1579         (ia64_memory_remove_breakpoint): Update.
1580         (ia64_breakpoint_from_pc): Update.
1581         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1582         from make_show_memory_breakpoints_cleanup.
1583
1584 2017-09-11  Tom Tromey  <tom@tromey.com>
1585
1586         * d-namespace.c (d_lookup_symbol): Use std::string.
1587         (find_symbol_in_baseclass): Likewise.
1588
1589 2017-09-11  Tom Tromey  <tom@tromey.com>
1590
1591         * ctf.c (ctf_start): Use std::string.
1592
1593 2017-09-11  Tom Tromey  <tom@tromey.com>
1594
1595         * ada-lang.c (is_known_support_routine): Update.
1596         (ada_unhandled_exception_name_addr_from_raise): Update.
1597         * guile/scm-frame.c (gdbscm_frame_name): Update.
1598         * python/py-frame.c (frapy_name): Update.
1599         (frapy_function): Update.
1600         * stack.h (find_frame_funname): Update.
1601         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1602         (print_frame): Update.
1603
1604 2017-09-11  Tom Tromey  <tom@tromey.com>
1605
1606         * findcmd.c (put_bits): Take a gdb::byte_vector.
1607         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1608         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1609         cleanups.
1610         (find_command): Update.
1611
1612 2017-09-11  Tom Tromey  <tom@tromey.com>
1613
1614         * cli/cli-script.c (class scoped_restore_hook_in): New.
1615         (clear_hook_in_cleanup): Remove.
1616         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1617         scoped_restore_hook_in.
1618
1619 2017-09-11  Tom Tromey  <tom@tromey.com>
1620
1621         * cli/cli-script.c (restore_interp): Remove.
1622         (read_command_lines): Use scoped_restore_interp.
1623         * interps.c (scoped_restore_interp::set_temp): Rename from
1624         interp_set_temp.
1625         * interps.h (class scoped_restore_interp): New.
1626         (interp_set_temp): Remove.
1627
1628 2017-09-11  Tom Tromey  <tom@tromey.com>
1629
1630         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1631         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1632         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1633         scoped_restore.
1634         (mi_cmd_break_insert_1): Update.
1635         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1636         scoped_restore.
1637
1638 2017-09-11  Tom Tromey  <tom@tromey.com>
1639
1640         * demangle.c (demangle_command): Update.
1641         * breakpoint.c (disable_command): Update.
1642         (enable_command): Update.
1643         (find_location_by_number): Make "number" const.  Use
1644         get_number_trailer.
1645         * cli/cli-utils.c (extract_arg): Return std::string.
1646         * probe.c (parse_probe_linespec): Update.  Change types.
1647         (collect_probes): Take string arguments.
1648         (parse_probe_linespec): Likewise.
1649         (info_probes_for_ops): Update.
1650         (enable_probes_command): Update.
1651         (disable_probes_command): Update.
1652         * break-catch-sig.c (catch_signal_split_args): Update.
1653         * mi/mi-parse.c (mi_parse): Update.
1654
1655 2017-09-11  Tom Tromey  <tom@tromey.com>
1656
1657         * language.h (language_enum): Make argument const.
1658         * language.c (language_enum): Make argument const.
1659
1660 2017-09-11  Tom Tromey  <tom@tromey.com>
1661
1662         * common/common-utils.h (skip_to_space): Remove macro, redeclare
1663         as function.
1664         (skip_to_space): Rename from skip_to_space_const.
1665         * common/common-utils.c (skip_to_space): New function.
1666         (skip_to_space): Rename from skip_to_space_const.
1667         * cli/cli-utils.h (get_number): Rename from get_number_const.
1668         (extract_arg): Rename from extract_arg_const.
1669         * cli/cli-utils.c (get_number): Rename from get_number_const.
1670         (extract_arg): Rename from extract_arg_const.
1671         (number_or_range_parser::get_number): Use ::get_number.
1672         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1673         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1674         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1675         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1676         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1677         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1678         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1679         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1680
1681 2017-09-11  Tom Tromey  <tom@tromey.com>
1682
1683         * python/python.c (do_start_initialization): Use
1684         py-event-types.def to initialize types.
1685         Define all object type structures.
1686         * python/python-internal.h: Don't declare event initialization
1687         functions.
1688         * python/py-threadevent.c (thread_event_object_type): Don't
1689         define.
1690         * python/py-stopevent.c (stop_event_object_type): Don't define.
1691         * python/py-signalevent.c (signal_event_object_type): Don't
1692         declare or define.
1693         * python/py-newobjfileevent.c (new_objfile_event_object_type)
1694         (clear_objfiles_event_object_type): Don't declare or define.
1695         * python/py-infevents.c (inferior_call_pre_event_object_type)
1696         (inferior_call_post_event_object_type)
1697         (register_changed_event_object_type)
1698         (memory_changed_event_object_type): Don't declare or define.
1699         * python/py-inferior.c (new_thread_event_object_type)
1700         (new_inferior_event_object_type)
1701         (inferior_deleted_event_object_type): Don't declare or define.
1702         * python/py-exitedevent.c (exited_event_object_type): Don't
1703         declare or define.
1704         * python/py-evts.c (gdbpy_initialize_py_events): Use
1705         py-all-events.def.
1706         * python/py-events.h (thread_event_object_type): Don't declare.
1707         (events_object): Use py-all-events.def.
1708         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
1709         py-event-types.def.
1710         * python/py-event-types.def: New file.
1711         * python/py-continueevent.c (create_continue_event_object): Don't
1712         declare or define.
1713         * python/py-bpevent.c (breakpoint_event_object_type): Don't
1714         declare or define.
1715         * python/py-all-events.def: New file.
1716
1717 2017-09-11  Tom Tromey  <tom@tromey.com>
1718
1719         * python/py-threadevent.c (create_thread_event_object): Return
1720         gdbpy_ref.
1721         * python/py-stopevent.h (create_stop_event_object)
1722         (create_breakpoint_event_object, create_signal_event_object):
1723         Update.
1724         * python/py-stopevent.c (create_stop_event_object): Return
1725         gdbpy_ref.
1726         (emit_stop_event): Update.
1727         * python/py-signalevent.c (create_signal_event_object): Return
1728         gdbpy_ref.
1729         * python/py-infevents.c (create_inferior_call_event_object):
1730         Update.
1731         * python/py-event.h (create_event_object)
1732         (create_thread_event_object): Update.
1733         * python/py-event.c (create_event_object): Return gdbpy_ref.
1734         * python/py-continueevent.c: Return gdbpy_ref.
1735         * python/py-bpevent.c (create_breakpoint_event_object): Return
1736         gdbpy_ref.
1737
1738 2017-09-11  Tom Tromey  <tom@tromey.com>
1739
1740         PR python/15622:
1741         * NEWS: Add entry.
1742         * python/python.c (do_start_initialization): Initialize new event
1743         types.
1744         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1745         (gdbpy_initialize_inferior_deleted_event)
1746         (gdbpy_initialize_new_thread_event): Declare.
1747         * python/py-threadevent.c (create_thread_event_object): Add option
1748         "thread" parameter.
1749         * python/py-inferior.c (new_thread_event_object_type)
1750         (new_inferior_event_object_type)
1751         (inferior_deleted_event_object_type): Declare.
1752         (python_new_inferior, python_inferior_deleted): New functions.
1753         (add_thread_object): Emit new_thread event.
1754         (gdbpy_initialize_inferior): Attach new functions to corresponding
1755         observers.
1756         (new_thread, new_inferior, inferior_deleted): Define new event
1757         types.
1758         * python/py-evts.c (gdbpy_initialize_py_events): Add new
1759         registries.
1760         * python/py-events.h (events_object) <new_inferior,
1761         inferior_deleted, new_thread>: New fields.
1762         * python/py-event.h (create_thread_event_breakpoint): Add optional
1763         "thread" parameter.
1764
1765 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1766
1767         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1768         check current_ui instead.
1769         (internal_vproblem): Likewise.
1770
1771 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1772
1773         * thread.c (print_thread_info_1): Remove unnecessary calls to
1774         uiout->is_mi_like_p.
1775
1776 2017-09-09  Tom Tromey  <tom@tromey.com>
1777
1778         * namespace.h (add_using_directive): Update.
1779         * namespace.c (add_using_directive): Change type of excludes to
1780         std::vector.
1781         * dwarf2read.c (read_import_statement): Use std::vector.
1782         (read_namespace): Update.
1783         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1784
1785 2017-09-09  Tom Tromey  <tom@tromey.com>
1786
1787         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1788
1789 2017-09-09  Tom Tromey  <tom@tromey.com>
1790
1791         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1792
1793 2017-09-09  Tom Tromey  <tom@tromey.com>
1794
1795         * stack.c (func_command): Use gdb::def_vector.
1796
1797 2017-09-09  Tom Tromey  <tom@tromey.com>
1798
1799         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1800         ui_out_emit_list, ui_out_emit_tuple.
1801         (mi_cmd_var_update): Likewise.
1802
1803 2017-09-09  Tom Tromey  <tom@tromey.com>
1804
1805         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1806         ui_out_redirect_pop.
1807         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1808         ui_out_redirect_pop.
1809         * utils.c (do_ui_out_redirect_pop)
1810         (make_cleanup_ui_out_redirect_pop): Remove.
1811         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1812         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1813         * ui-out.h (ui_out_redirect_pop): New class.
1814
1815 2017-09-09  Tom Tromey  <tom@tromey.com>
1816
1817         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1818         (list_available_thread_groups, mi_cmd_list_thread_groups)
1819         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1820         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1821         Likewise.
1822
1823 2017-09-09  Tom Tromey  <tom@tromey.com>
1824
1825         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1826         ui_out_emit_tuple.
1827
1828 2017-09-09  Tom Tromey  <tom@tromey.com>
1829
1830         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1831         * stack.c (print_frame): Use ui_out_emit_tuple.
1832         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1833         (info_spu_mailbox_command, info_spu_dma_command)
1834         (info_spu_proxydma_command): Likewise.
1835         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1836         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1837         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1838         ui_out_emit_tuple.
1839         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1840
1841 2017-09-09  Tom Tromey  <tom@tromey.com>
1842
1843         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1844         (class ui_out_emit_table): Update comment.
1845         * ui-out.c (do_cleanup_table_end)
1846         (make_cleanup_ui_out_table_begin_end): Remove.
1847         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1848         (info_spu_dma_cmdlist): Likewise.
1849         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1850         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1851         ui_out_emit_table.
1852
1853 2017-09-09  Tom Tromey  <tom@tromey.com>
1854
1855         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1856         ui_out_emit_list, gdb::optional.
1857
1858 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1859
1860         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1861         prototype.
1862         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1863         prototype.
1864         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1865         prototype.
1866         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1867         * ada-exp.y: Remove _initialize_ada_exp prototype.
1868         * ada-lang.c: Remove _initialize_ada_language prototype.
1869         * ada-tasks.c: Remove _initialize_tasks prototype.
1870         * addrmap.c: Remove _initialize_addrmap prototype.
1871         * agent.c: Remove _initialize_agent prototype.
1872         * aix-thread.c: Remove _initialize_aix_thread prototype.
1873         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1874         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1875         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1876         prototype.
1877         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1878         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1879         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1880         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1881         prototype.
1882         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1883         prototype.
1884         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1885         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1886         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1887         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1888         prototype.
1889         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1890         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1891         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1892         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1893         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1894         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1895         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1896         prototype.
1897         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1898         prototype.
1899         * annotate.c: Remove _initialize_annotate prototype.
1900         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1901         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1902         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1903         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1904         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1905         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1906         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1907         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1908         prototype.
1909         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1910         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1911         * auto-load.c: Remove _initialize_auto_load prototype.
1912         * auxv.c: Remove _initialize_auxv prototype.
1913         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1914         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1915         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1916         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1917         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1918         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1919         prototype.
1920         * break-catch-throw.c: Remove _initialize_break_catch_throw
1921         prototype.
1922         * breakpoint.c: Remove _initialize_breakpoint prototype.
1923         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1924         * btrace.c: Remove _initialize_btrace prototype.
1925         * charset.c: Remove _initialize_charset prototype.
1926         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1927         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1928         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1929         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1930         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1931         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1932         * coffread.c: Remove _initialize_coffread prototype.
1933         * compile/compile.c: Remove _initialize_compile prototype.
1934         * complaints.c: Remove _initialize_complaints prototype.
1935         * completer.c: Remove _initialize_completer prototype.
1936         * copying.awk: Remove _initialize_copying prototype.
1937         * copying.c: Regenerate.
1938         * core-regset.c: Remove _initialize_core_regset prototype.
1939         * corefile.c: Remove _initialize_core prototype.
1940         * corelow.c: Remove _initialize_corelow prototype.
1941         * cp-abi.c: Remove _initialize_cp_abi prototype.
1942         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1943         * cp-support.c: Remove _initialize_cp_support prototype.
1944         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1945         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1946         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1947         * ctf.c: Remove _initialize_ctf prototype.
1948         * d-lang.c: Remove _initialize_d_language prototype.
1949         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1950         prototype.
1951         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1952         * dbxread.c: Remove _initialize_dbxread prototype.
1953         * dcache.c: Remove _initialize_dcache prototype.
1954         * demangle.c: Remove _initialize_demangler prototype.
1955         * disasm-selftests.c: Remove _initialize_disasm_selftests
1956         prototype.
1957         * disasm.c: Remove _initialize_disasm prototype.
1958         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1959         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1960         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1961         prototype.
1962         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1963         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1964         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1965         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1966         * elfread.c: Remove _initialize_elfread prototype.
1967         * exec.c: Remove _initialize_exec prototype.
1968         * extension.c: Remove _initialize_extension prototype.
1969         * f-lang.c: Remove _initialize_f_language prototype.
1970         * f-valprint.c: Remove _initialize_f_valprint prototype.
1971         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1972         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1973         * filesystem.c: Remove _initialize_filesystem prototype.
1974         * findcmd.c: Remove _initialize_mem_search prototype.
1975         * fork-child.c: Remove _initialize_fork_child prototype.
1976         * frame-base.c: Remove _initialize_frame_base prototype.
1977         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1978         * frame.c: Remove _initialize_frame prototype.
1979         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1980         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1981         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1982         * gcore.c: Remove _initialize_gcore prototype.
1983         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1984         * gdbarch.c: Regenerate.
1985         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1986         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1987         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1988         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1989         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1990         * go-lang.c: Remove _initialize_go_language prototype.
1991         * go32-nat.c: Remove _initialize_go32_nat prototype.
1992         * guile/guile.c: Remove _initialize_guile prototype.
1993         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1994         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1995         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1996         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1997         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1998         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1999         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2000         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2001         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2002         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2003         prototype.
2004         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2005         prototype.
2006         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2007         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2008         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2009         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2010         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2011         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2012         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2013         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2014         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2015         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2016         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2017         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2018         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2019         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2020         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2021         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2022         prototype.
2023         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2024         prototype.
2025         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2026         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2027         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2028         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2029         * infcall.c: Remove _initialize_infcall prototype.
2030         * infcmd.c: Remove _initialize_infcmd prototype.
2031         * inferior.c: Remove _initialize_inferiors prototype.
2032         * inflow.c: Remove _initialize_inflow prototype.
2033         * infrun.c: Remove _initialize_infrun prototype.
2034         * interps.c: Remove _initialize_interpreter prototype.
2035         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2036         * jit.c: Remove _initialize_jit prototype.
2037         * language.c: Remove _initialize_language prototype.
2038         * linux-fork.c: Remove _initialize_linux_fork prototype.
2039         * linux-nat.c: Remove _initialize_linux_nat prototype.
2040         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2041         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2042         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2043         * m2-lang.c: Remove _initialize_m2_language prototype.
2044         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2045         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2046         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2047         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2048         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2049         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2050         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2051         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2052         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2053         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2054         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2055         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2056         * machoread.c: Remove _initialize_machoread prototype.
2057         * macrocmd.c: Remove _initialize_macrocmd prototype.
2058         * macroscope.c: Remove _initialize_macroscope prototype.
2059         * maint.c: Remove _initialize_maint_cmds prototype.
2060         * mdebugread.c: Remove _initialize_mdebugread prototype.
2061         * memattr.c: Remove _initialize_mem prototype.
2062         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2063         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2064         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2065         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2066         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2067         * microblaze-linux-tdep.c: Remove
2068         _initialize_microblaze_linux_tdep prototype.
2069         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2070         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2071         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2072         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2073         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2074         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2075         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2076         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2077         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2078         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2079         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2080         prototype.
2081         * mipsread.c: Remove _initialize_mipsread prototype.
2082         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2083         prototype.
2084         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2085         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2086         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2087         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2088         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2089         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2090         prototype.
2091         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2092         * nto-procfs.c: Remove _initialize_procfs prototype.
2093         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2094         * objc-lang.c: Remove _initialize_objc_language prototype.
2095         * objfiles.c: Remove _initialize_objfiles prototype.
2096         * observer.c: Remove observer_test_first_notification_function,
2097         observer_test_second_notification_function,
2098         observer_test_third_notification_function, and
2099         _initialize_observer prototypes.
2100         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2101         * osabi.c: Remove _initialize_gdb_osabi prototype.
2102         * osdata.c: Remove _initialize_osdata prototype.
2103         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2104         * parse.c: Remove _initialize_parse prototype.
2105         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2106         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2107         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2108         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2109         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2110         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2111         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2112         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2113         * printcmd.c: Remove _initialize_printcmd prototype.
2114         * probe.c: Remove _initialize_probe prototype.
2115         * proc-api.c: Remove _initialize_proc_api prototype.
2116         * proc-events.c: Remove _initialize_proc_events prototype.
2117         * proc-service.c: Remove _initialize_proc_service prototype.
2118         * procfs.c: Remove _initialize_procfs prototype.
2119         * psymtab.c: Remove _initialize_psymtab prototype.
2120         * python/python.c: Remove _initialize_python prototype.
2121         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2122         * record-btrace.c: Remove _initialize_record_btrace prototype.
2123         * record-full.c: Remove _initialize_record_full prototype.
2124         * record.c: Remove _initialize_record prototype.
2125         * regcache.c: Remove _initialize_regcache prototype.
2126         * reggroups.c: Remove _initialize_reggroup prototype.
2127         * remote-notif.c: Remove _initialize_notif prototype.
2128         * remote-sim.c: Remove _initialize_remote_sim prototype.
2129         * remote.c: Remove _initialize_remote prototype.
2130         * reverse.c: Remove _initialize_reverse prototype.
2131         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2132         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2133         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2134         prototype.
2135         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2136         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2137         * rust-exp.y: Remove _initialize_rust_exp prototype.
2138         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2139         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2140         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2141         * score-tdep.c: Remove _initialize_score_tdep prototype.
2142         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2143         prototype.
2144         * ser-go32.c: Remove _initialize_ser_dos prototype.
2145         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2146         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2147         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2148         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2149         * serial.c: Remove _initialize_serial prototype.
2150         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2151         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2152         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2153         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2154         * skip.c: Remove _initialize_step_skip prototype.
2155         * sol-thread.c: Remove _initialize_sol_thread prototype.
2156         * solib-aix.c: Remove _initialize_solib_aix prototype.
2157         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2158         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2159         * solib-frv.c: Remove _initialize_frv_solib prototype.
2160         * solib-spu.c: Remove _initialize_spu_solib prototype.
2161         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2162         * solib-target.c: Remove _initialize_solib_target prototype.
2163         * solib.c: Remove _initialize_solib prototype.
2164         * source.c: Remove _initialize_source prototype.
2165         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2166         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2167         prototype.
2168         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2169         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2170         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2171         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2172         prototype.
2173         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2174         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2175         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2176         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2177         prototype.
2178         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2179         prototype.
2180         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2181         prototype.
2182         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2183         prototype.
2184         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2185         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2186         prototype.
2187         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2188         prototype.
2189         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2190         prototype.
2191         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2192         prototype.
2193         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2194         prototype.
2195         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2196         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2197         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2198         * stabsread.c: Remove _initialize_stabsread prototype.
2199         * stack.c: Remove _initialize_stack prototype.
2200         * stap-probe.c: Remove _initialize_stap_probe prototype.
2201         * std-regs.c: Remove _initialize_frame_reg prototype.
2202         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2203         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2204         * symfile.c: Remove _initialize_symfile prototype.
2205         * symmisc.c: Remove _initialize_symmisc prototype.
2206         * symtab.c: Remove _initialize_symtab prototype.
2207         * target-dcache.c: Remove _initialize_target_dcache prototype.
2208         * target-descriptions.c: Remove _initialize_target_descriptions
2209         prototype.
2210         * thread.c: Remove _initialize_thread prototype.
2211         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2212         prototype.
2213         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2214         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2215         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2216         prototype.
2217         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2218         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2219         * tracefile.c: Remove _initialize_tracefile prototype.
2220         * tracepoint.c: Remove _initialize_tracepoint prototype.
2221         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2222         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2223         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2224         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2225         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2226         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2227         * tui/tui.c: Remove _initialize_tui prototype.
2228         * typeprint.c: Remove _initialize_typeprint prototype.
2229         * user-regs.c: Remove _initialize_user_regs prototype.
2230         * utils.c: Remove _initialize_utils prototype.
2231         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2232         * valarith.c: Remove _initialize_valarith prototype.
2233         * valops.c: Remove _initialize_valops prototype.
2234         * valprint.c: Remove _initialize_valprint prototype.
2235         * value.c: Remove _initialize_values prototype.
2236         * varobj.c: Remove _initialize_varobj prototype.
2237         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2238         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2239         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2240         * windows-nat.c: Remove _initialize_windows_nat,
2241         _initialize_check_for_gdb_ini, and _initialize_loadable
2242         prototypes.
2243         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2244         * xcoffread.c: Remove _initialize_xcoffread prototype.
2245         * xml-support.c: Remove _initialize_xml_support prototype.
2246         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2247         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2248         prototype.
2249         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2250         prototype.
2251         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2252
2253 2017-09-08  Keith Seitz  <keiths@redhat.com>
2254
2255         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2256         field.
2257
2258 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2259
2260         * f-valprint.c (f_val_print): Remove check for one byte
2261         sized integers. Remove printing of character type.
2262
2263 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2264             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2265             Bernhard Heckel  <bernhard.heckel@intel.com>
2266
2267         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2268         to maintain proper indentation when printing pointers/refs.
2269
2270 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2271
2272         GDB 8.0.1 released.
2273
2274 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2275
2276         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2277
2278 2017-09-05  Tom Tromey  <tom@tromey.com>
2279
2280         * parse.c (funcall_chain): Now a std::vector.
2281         (start_arglist, end_arglist): Simplify.
2282         (free_funcalls): Remove.
2283         (parse_exp_in_context_1): Remove cleanup.
2284
2285 2017-09-05  Tom Tromey  <tom@tromey.com>
2286
2287         * go-exp.y (go_parse): Don't create a cleanup.
2288
2289 2017-09-05  Tom Tromey  <tom@tromey.com>
2290
2291         * d-exp.y (PrimaryExpression): Use std::string.
2292         (d_parse): Don't create a cleanup.
2293
2294 2017-09-05  Tom Tromey  <tom@tromey.com>
2295
2296         * utils.c (do_clear_parser_state): Remove.
2297         (make_cleanup_clear_parser_state): Remove.
2298         * p-exp.y (pascal_parse): Use scoped_restore.
2299         * m2-exp.y (m2_parse): Use scoped_restore.
2300         * f-exp.y (f_parse): Use scoped_restore.
2301         * d-exp.y (d_parse): Use scoped_restore.
2302         * c-exp.y (c_parse): Use scoped_restore.
2303         * ada-exp.y (ada_parse): Use scoped_restore.
2304         * utils.h (make_cleanup_clear_parser_state): Remove.
2305
2306 2017-09-06  Keith Seitz  <keiths@redhat.com>
2307
2308         * dwarf2read.c (dw2_linkage_name_attr): New function.
2309         (dw2_linkage_name): New function.
2310         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2311         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2312         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2313
2314 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2315
2316         * config/djgpp/djconfig.sh: Correct shell portability issue.
2317
2318 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2319
2320         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2321
2322 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2323
2324         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2325         * NEWS: Mention new FreeBSD/mips native configuration.
2326         * configure.host: Add aarch64*-*-freebsd*.
2327         * configure.nat: Likewise.
2328         * aarch64-fbsd-nat.c: New file.
2329
2330 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2331
2332         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2333         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2334         * NEWS: Mention new FreeBSD/aarch64 target.
2335         * configure.tgt: Add aarch64*-*-freebsd*.
2336         * aarch64-fbsd-tdep.c: New file.
2337         * aarch64-fbsd-tdep.h: New file.
2338
2339 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2340
2341         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2342
2343 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2344
2345         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2346         of TLS symbols.
2347
2348 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2349
2350         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2351         call.
2352
2353 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2354
2355         * infrun.c (follow_exec): Call add_thread after
2356         target_find_description.
2357
2358 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2359
2360         * infrun.c (handle_inferior_event_1): When exec'ing, read
2361         stop_pc after follow_exec.
2362
2363 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2364
2365         * remote.c (process_g_packet): Update error message.
2366
2367 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2368
2369         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2370         targets.
2371
2372 2017-09-05  Pedro Alves  <palves@redhat.com>
2373
2374         * eval.c (eval_call, evaluate_funcall): New functions, factored
2375         out from ...
2376         (evaluate_subexp_standard): ... this.
2377
2378 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2379
2380         * amd64-tdep.c (amd64_target_description): Create target
2381         descriptions.
2382         (_initialize_amd64_tdep): Don't call functions
2383         initialize_tdesc_amd64_*.  Add self tests.
2384         * arch/amd64.c (amd64_create_target_description): Add parameter
2385         is_linux.  Call set_tdesc_osabi if is_linux is true.
2386         * arch/amd64.h (amd64_create_target_description): Update the
2387         declaration.
2388         * arch/i386.c (i386_create_target_description): Add parameter
2389         is_linux.  Call set_tdesc_osabi if is_linux is true.
2390         * arch/i386.h (i386_create_target_description): Update
2391         declaration.
2392         * configure.tgt: Add i386.o to gdb_target_obs.
2393         * features/Makefile (XMLTOC): Remove i386/*.xml.
2394         * features/i386/amd64-avx-avx512.c: Remove.
2395         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2396         * features/i386/amd64-avx-mpx.c: Remove.
2397         * features/i386/amd64-avx.c: Remove.
2398         * features/i386/amd64-mpx.c: Remove.
2399         * features/i386/amd64.c: Remove.
2400         * features/i386/i386-avx-avx512.c: Remove.
2401         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2402         * features/i386/i386-avx-mpx.c: Remove.
2403         * features/i386/i386-avx.c: Remove.
2404         * features/i386/i386-mmx.c: Remove.
2405         * features/i386/i386-mpx.c: Remove.
2406         * features/i386/i386.c: Remove.
2407         * i386-tdep.c: Don't include features/i386/i386*.c., include
2408         target-descriptions.h and arch/i386.h.
2409         (i386_target_description): Create target descriptions.
2410         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2411         functions.  Do self tests.
2412
2413 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2414
2415         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2416         * features/i386/amd64-avx-avx512-linux.c: Removed.
2417         * features/i386/amd64-avx-linux.c: Removed.
2418         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2419         * features/i386/amd64-avx-mpx-linux.c: Removed.
2420         * features/i386/amd64-linux.c: Removed.
2421         * features/i386/amd64-mpx-linux.c: Removed.
2422         * features/i386/x32-avx-avx512-linux.c: Removed.
2423         * features/i386/x32-avx-linux.c: Removed.
2424         * features/i386/x32-linux.c: Removed.
2425
2426 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2427
2428         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2429         features/i386/*.c.
2430         (amd64_linux_read_description): Call
2431         amd64_create_target_description.
2432         * arch/amd64.c: New file.
2433         * arch/amd64.h: New file.
2434         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2435         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2436
2437 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2438
2439         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2440         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2441         (amd64_linux_read_description): Create target descriptions.
2442         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2443         functions.  Add unit tests.
2444         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2445         x32-core.xml.
2446         * features/i386/64bit-avx.c: Generated.
2447         * features/i386/64bit-avx512.c: Generated.
2448         * features/i386/64bit-core.c: Generated.
2449         * features/i386/64bit-linux.c: Generated.
2450         * features/i386/64bit-mpx.c: Generated.
2451         * features/i386/64bit-pkeys.c: Generated.
2452         * features/i386/64bit-segments.c: Generated.
2453         * features/i386/64bit-sse.c: Generated.
2454         * features/i386/x32-core.c: Generated.
2455         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2456         c files for amd64-linux and x32-linux.
2457
2458 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2459
2460         * amd64-linux-tdep.c (amd64_linux_read_description): New
2461         function.
2462         (amd64_linux_core_read_description): Call
2463         amd64_linux_read_description.
2464         (amd64_linux_init_abi): Likewise.
2465         (amd64_x32_linux_init_abi): Likewise.
2466         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2467         * x86-linux-nat.c (x86_linux_read_description): Call
2468         amd64_linux_read_description.
2469
2470 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2471
2472         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2473         comments.
2474
2475 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2476
2477         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2478         * features/i386/i386-avx-avx512-linux.c: Remove.
2479         * features/i386/i386-avx-linux.c: Remove.
2480         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2481         * features/i386/i386-avx-mpx-linux.c: Remove.
2482         * features/i386/i386-linux.c: Remove.
2483         * features/i386/i386-mmx-linux.c: Remove.
2484         * features/i386/i386-mpx-linux.c: Remove.
2485
2486 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2487
2488         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2489         (SFILES): Add arch/i386.c.
2490         (HFILES_NO_SRCDIR): Add arch/i386.h.
2491         * arch/i386.c: New file.
2492         * arch/i386.h: New file.
2493         * arch/tdesc.h (allocate_target_description): Declare.
2494         (set_tdesc_architecture): Declare.
2495         (set_tdesc_osabi): Declare.
2496         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2497         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2498         include arch/i386.h.
2499         (i386_linux_read_description): Remove code and call
2500         i386_create_target_description.
2501         (set_tdesc_architecture): New function.
2502         (set_tdesc_osabi): New function.
2503         * target-descriptions.h (allocate_target_description): Remove.
2504
2505 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2506
2507         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2508         * target-descriptions.c (tdesc_create_feature): Likewise, and
2509         adjust code.
2510         * features/i386/32bit-avx.c: Re-generated.
2511         * features/i386/32bit-avx512.c: Re-generated.
2512         * features/i386/32bit-core.c: Re-generated.
2513         * features/i386/32bit-linux.c: Re-generated.
2514         * features/i386/32bit-mpx.c: Re-generated.
2515         * features/i386/32bit-pkeys.c: Re-generated.
2516         * features/i386/32bit-sse.c: Re-generated.
2517
2518 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2519
2520         * regformats/regdef.h (struct reg): Override operator == and !=.
2521
2522 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2523
2524         * arch/tdesc.h: New file.
2525         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2526         * target-descriptions.c: Update comments.
2527         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2528         declarations.
2529         * features/i386/32bit-avx.c: Re-generated.
2530         * features/i386/32bit-avx512.c: Re-generated.
2531         * features/i386/32bit-core.c: Re-generated.
2532         * features/i386/32bit-linux.c: Re-generated.
2533         * features/i386/32bit-mpx.c: Re-generated.
2534         * features/i386/32bit-pkeys.c: Re-generated.
2535         * features/i386/32bit-sse.c: Re-generated.
2536
2537 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2538
2539         * regformats/regdat.sh: Update generated code.
2540
2541 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2542
2543         * regformats/regdat.sh: Adjust code order.
2544
2545 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2546
2547         * expprint.c (dump_subexp_body_standard): Use constant format
2548         string in fprintf_filtered call.
2549
2550 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2551
2552         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2553         NetBSD/i386.
2554         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2555
2556 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2557
2558         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2559
2560 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2561
2562         * bsd-kvm.o: Define _KMEMUSER.
2563         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2564         * configure: Regenerate.
2565
2566 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2567
2568         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2569         * i386-fbsd-nat.c: Likewise.
2570
2571 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2572
2573         * unittests/array-view-selftests.c: Add include of <array>.
2574
2575 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2576
2577         * spu-tdep.c (flush_ea_cache): Add missing argument to
2578         call_function_by_hand.
2579
2580 2017-09-04  Pedro Alves  <palves@redhat.com>
2581
2582         * NEWS (Safer support for debugging with no debug info): New.
2583
2584 2017-09-04  Pedro Alves  <palves@redhat.com>
2585
2586         * c-exp.y (function_method, function_method_void): Add current
2587         instance flags to TYPE_INSTANCE.
2588         * dwarf2read.c (check_modifier): New.
2589         (compute_delayed_physnames): Assert that only C++ adds delayed
2590         physnames.  Mark fn_fields as const/volatile depending on
2591         physname.
2592         * eval.c (make_params): New type_instance_flags parameter.  Use
2593         it as the new type's instance flags.
2594         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2595         flags element and pass it to make_params.
2596         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2597         instance flags element.
2598         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2599         * gdbtypes.h: Include "enum-flags.h".
2600         (type_instance_flags): New enum-flags type.
2601         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2602         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2603         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2604         (follow_type_instance_flags): New function.
2605         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2606         * parser-defs.h (follow_type_instance_flags): Declare.
2607         * valops.c (value_struct_elt_for_reference): const/volatile must
2608         match too.
2609
2610 2017-09-04  Pedro Alves  <palves@redhat.com>
2611
2612         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2613         function/method scopes; lookup the nested name as a function local
2614         static variable.
2615
2616 2017-09-04  Pedro Alves  <palves@redhat.com>
2617
2618         (%type <voidval>): Add function_method.
2619         * c-exp.y (exp): New production for calls with no arguments.
2620         (function_method, function_method_void_or_typelist): New
2621         productions.
2622         (exp): New production for "method()::static_var".
2623         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2624         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2625         Handle OP_FUNC_STATIC_VAR.
2626         * parse.c (operator_length_standard):
2627         Handle OP_FUNC_STATIC_VAR.
2628
2629 2017-09-04  Pedro Alves  <palves@redhat.com>
2630
2631         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2632         handling.
2633         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2634         Ditto.
2635         * parse.c (operator_length_standard, operator_check_standard):
2636         Ditto.
2637         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2638
2639 2017-09-04  Pedro Alves  <palves@redhat.com>
2640
2641         * ax-gdb.c: Include "typeprint.h".
2642         (gen_expr_for_cast): New function.
2643         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2644         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2645         type is unknown.
2646         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2647         nodebug_data_symbol.
2648         * eval.c: Include "typeprint.h".
2649         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2650         Error out if symbol has unknown type.
2651         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2652         evaluate_subexp_for_cast.
2653         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2654         OP_VAR_MSYM_VALUE.
2655         (evaluate_subexp_for_cast): New function.
2656         * gdbtypes.c (init_nodebug_var_type): New function.
2657         (objfile_type): Use it to initialize types of variables with no
2658         debug info.
2659         * typeprint.c (error_unknown_type): New.
2660         * typeprint.h (error_unknown_type): New declaration.
2661         * compile/compile-c-types.c (convert_type_basic): Handle
2662         TYPE_CODE_ERROR; warn and fallback to int for variables with
2663         unknown type.
2664
2665 2017-09-04  Pedro Alves  <palves@redhat.com>
2666
2667         * eval.c (evaluate_var_value): New function, factored out from ...
2668         (evaluate_subexp_standard): ... here.
2669
2670 2017-09-04  Pedro Alves  <palves@redhat.com>
2671
2672         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2673         Remove useless assignments to 'op'.
2674
2675 2017-09-04  Pedro Alves  <palves@redhat.com>
2676
2677         * eval.c (eval_skip_value): New function.
2678         (evaluate_subexp_standard): Use it.
2679
2680 2017-09-04  Pedro Alves  <palves@redhat.com>
2681
2682         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2683         function name from symbol/minsym and pass it to
2684         error_call_unknown_return_type.
2685
2686 2017-09-04  Pedro Alves  <palves@redhat.com>
2687
2688         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2689         * ax-gdb.c (gen_msym_var_ref): New function.
2690         (gen_expr): Handle OP_VAR_MSYM_VALUE.
2691         * eval.c (evaluate_var_msym_value): New function.
2692         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2693         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2694         to call_function_by_hand.
2695         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2696         Handle OP_VAR_MSYM_VALUE.
2697         (union exp_element) <msymbol>: New field.
2698         * minsyms.h (struct type): Forward declare.
2699         (find_minsym_type_and_address): Declare.
2700         * parse.c (write_exp_elt_msym): New function.
2701         (write_exp_msymbol): Delete, refactored as ...
2702         (find_minsym_type_and_address): ... this new function.
2703         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2704         (operator_length_standard, operator_check_standard): Handle
2705         OP_VAR_MSYM_VALUE.
2706         * std-operator.def (OP_VAR_MSYM_VALUE): New.
2707
2708 2017-09-04  Pedro Alves  <palves@redhat.com>
2709
2710         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2711         TYPE_GNU_IFUNC specially here.  Throw error if return type is
2712         unknown.
2713         * ada-typeprint.c (print_func_type): Handle functions with unknown
2714         return type.
2715         * c-typeprint.c (c_type_print_base): Handle functions and methods
2716         with unknown return type.
2717         * compile/compile-c-symbols.c (convert_symbol_bmsym)
2718         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2719         * compile/compile-c-types.c: Include "objfiles.h".
2720         (convert_func): For functions with unknown return type, warn and
2721         default to int.
2722         * compile/compile-object-run.c (compile_object_run): Adjust call
2723         to call_function_by_hand_dummy.
2724         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2725         call_function_by_hand.
2726         * eval.c (evaluate_subexp_standard): Adjust calls to
2727         call_function_by_hand.  Handle functions and methods with unknown
2728         return type.  Pass expect_type to call_function_by_hand.
2729         * f-typeprint.c (f_type_print_base): Handle functions with unknown
2730         return type.
2731         * gcore.c (call_target_sbrk): Adjust call to
2732         call_function_by_hand.
2733         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2734         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
2735         an integer address type instead of nodebug.
2736         * guile/scm-value.c (gdbscm_value_call): Adjust call to
2737         call_function_by_hand.
2738         * infcall.c (error_call_unknown_return_type): New function.
2739         (call_function_by_hand): New "default_return_type" parameter.
2740         Pass it down.
2741         (call_function_by_hand_dummy): New "default_return_type"
2742         parameter.  Use it instead of defaulting to int.  If there's no
2743         default and the return type is unknown, throw an error.  If
2744         there's a default return type, and the called function has no
2745         debug info, then assume the function is prototyped.
2746         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2747         New "default_return_type" parameter.
2748         (error_call_unknown_return_type): New declaration.
2749         * linux-fork.c (call_lseek): Cast return type of lseek.
2750         (inferior_call_waitpid, checkpoint_command): Adjust calls to
2751         call_function_by_hand.
2752         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2753         calls to call_function_by_hand.
2754         * m2-typeprint.c (m2_procedure): Handle functions with unknown
2755         return type.
2756         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2757         (value_nsstring, print_object_command): Adjust calls to
2758         call_function_by_hand.
2759         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2760         functions with unknown return type.
2761         (pascal_type_print_func_varspec_suffix): New function.
2762         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2763         TYPE_CODE_METHOD>: Use it.
2764         * python/py-value.c (valpy_call): Adjust call to
2765         call_function_by_hand.
2766         * rust-lang.c (rust_evaluate_funcall): Adjust call to
2767         call_function_by_hand.
2768         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2769         call_function_by_hand.
2770         * valops.c (value_allocate_space_in_inferior): Adjust call to
2771         call_function_by_hand.
2772         * typeprint.c (type_print_unknown_return_type): New function.
2773         * typeprint.h (type_print_unknown_return_type): New declaration.
2774
2775 2017-09-04  Pedro Alves  <palves@redhat.com>
2776
2777         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2778         types with more than one parameter as prototyped.
2779
2780 2017-09-04  Pedro Alves  <palves@redhat.com>
2781
2782         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2783         (disassemble_command): Use gdb_disassembly_flags instead of bare
2784         int.
2785         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2786         (dump_insns, do_mixed_source_and_assembly_deprecated)
2787         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2788         Use gdb_disassembly_flags instead of bare int.
2789         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2790         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2791         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2792         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2793         (enum gdb_disassembly_flag): ... values of this new enumeration.
2794         (gdb_disassembly_flags): Define.
2795         (gdb_disassembly)
2796         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2797         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2798         gdb_disassembly_flags instead of bare int.
2799         * record-btrace.c (btrace_insn_history)
2800         (record_btrace_insn_history, record_btrace_insn_history_range)
2801         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2802         instead of bare int.
2803         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2804         Use gdb_disassembly_flags instead of bare int.
2805         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2806         Define.
2807         * target-delegates.c: Regenerate.
2808         * target.c (target_insn_history, target_insn_history_from)
2809         (target_insn_history_range): Use gdb_disassembly_flags instead of
2810         bare int.
2811         * target.h: Include "disasm.h".
2812         (struct target_ops) <to_insn_history, to_insn_history_from,
2813         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2814         int.
2815         (target_insn_history, target_insn_history_from)
2816         (target_insn_history_range): Use gdb_disassembly_flags instead of
2817         bare int.
2818
2819 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2820
2821         * cli/cli-script.c (build_command_line): For if/while commands,
2822         check whether args is empty.
2823
2824 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2825
2826         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2827         (enum command_control_type): Likewise.
2828         (struct command_line): Likewise.
2829         (free_command_lines): Likewise.
2830         (struct command_lines_deleter): Likewise.
2831         (command_line_up): Likewise.
2832         (read_command_lines): Likewise.
2833         (read_command_lines_1): Likewise.
2834         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2835         (enum command_control_type): Likewise.
2836         (struct command_line): Likewise.
2837         (free_command_lines): Likewise.
2838         (struct command_lines_deleter): Likewise.
2839         (command_line_up): Likewise.
2840         (read_command_lines): Likewise.
2841         (read_command_lines_1): Likewise.
2842         * breakpoint.h: Include cli/cli-script.h.
2843         * extension-priv.h: Likewise.
2844         * gdbcmd.h: Likewise.
2845
2846 2017-09-04  Pedro Alves  <palves@redhat.com>
2847
2848         * ada-lang.c (is_known_support_routine): Move sal declaration to
2849         where it is initialized.
2850         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2851         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2852         (clear_command, update_static_tracepoint): Remove init_sal
2853         references.  Move declarations closer to initializations.
2854         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2855         initializations.
2856         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2857         references.  Move sal declarations closer to initializations.
2858         * frame.c (find_frame_sal): Return a symtab_and_line via function
2859         return instead of output parameter.  Remove init_sal references.
2860         * frame.h (find_frame_sal): Return a symtab_and_line via function
2861         return instead of output parameter.
2862         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2863         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2864         instead of memset.
2865         (gdbscm_find_pc_line): Remove init_sal reference.
2866         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2867         references.  Move declarations closer to initializations.
2868         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2869         initializations.
2870         (finish_backward): Remove init_sal references.  Move declarations
2871         closer to initializations.
2872         * infrun.c (process_event_stop_test, handle_step_into_function)
2873         (insert_hp_step_resume_breakpoint_at_frame)
2874         (insert_step_resume_breakpoint_at_caller): Likewise.
2875         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2876         (symbol_to_sal): Likewise.
2877         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2878         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2879         to its initialization.
2880         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2881         init_sal references.  Move declarations closer to initializations.
2882         * source.c (get_current_source_symtab_and_line): Remove brace
2883         initialization.
2884         (set_current_source_symtab_and_line): Now takes the sal by const
2885         reference.  Remove brace initialization.
2886         (line_info): Remove init_sal reference.
2887         * source.h (set_current_source_symtab_and_line): Now takes a
2888         symtab_and_line via const reference.
2889         * stack.c (set_current_sal_from_frame): Adjust.
2890         (print_frame_info): Adjust.
2891         (get_last_displayed_sal): Return the sal via function return
2892         instead of via output parameter.  Simplify.
2893         (frame_info): Adjust.
2894         * stack.h (get_last_displayed_sal): Return the sal via function
2895         return instead of via output parameter.
2896         * symtab.c (init_sal): Delete.
2897         (find_pc_sect_line): Remove init_sal references.  Move
2898         declarations closer to initializations.
2899         (find_function_start_sal): Remove init_sal references.  Move
2900         declarations closer to initializations.
2901         * symtab.h (struct symtab_and_line): In-class initialize all
2902         fields.
2903         * tracepoint.c (set_traceframe_context)
2904         (print_one_static_tracepoint_marker): Remove init_sal references.
2905         Move declarations closer to initializations.
2906         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2907         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2908         declarations closer to initializations.
2909         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2910         init_sal references.  Adjust.
2911
2912 2017-09-04  Pedro Alves  <palves@redhat.com>
2913
2914         * ax-gdb.c (agent_command_1): Use range-for.
2915         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2916         * breakpoint.c: Include "common/array-view.h".
2917         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2918         parameter from struct symtabs_and_lines to
2919         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2920         (breakpoint_sals_to_pc): Change sals parameter from struct
2921         symtabs_and_lines to std::vector reference.
2922         (check_fast_tracepoint_sals): Change sals parameter from struct
2923         symtabs_and_lines to std::array_view.  Use range-for.
2924         (decode_static_tracepoint_spec): Return a std::vector instead of
2925         symtabs_and_lines.  Update.
2926         (create_breakpoint): Update.
2927         (break_range_command, until_break_command, clear_command): Update.
2928         (base_breakpoint_decode_location, bkpt_decode_location)
2929         (bkpt_probe_create_sals_from_location)
2930         (bkpt_probe_decode_location, tracepoint_decode_location)
2931         (tracepoint_probe_decode_location)
2932         (strace_marker_create_sals_from_location): Return a std::vector
2933         instead of symtabs_and_lines.
2934         (strace_marker_create_breakpoints_sal): Update.
2935         (strace_marker_decode_location): Return a std::vector instead of
2936         symtabs_and_lines.  Update.
2937         (update_breakpoint_locations): Change struct symtabs_and_lines
2938         parameters to gdb::array_view.  Adjust.
2939         (location_to_sals): Return a std::vector instead of
2940         symtabs_and_lines.  Update.
2941         (breakpoint_re_set_default): Use std::vector instead of struct
2942         symtabs_and_lines.
2943         (decode_location_default): Return a std::vector instead of
2944         symtabs_and_lines.  Update.
2945         * breakpoint.h: Include "common/array-view.h".
2946         (struct breakpoint_ops) <decode_location>: Now returns a
2947         std::vector instead of returning a symtabs_and_lines via output
2948         parameter.
2949         (update_breakpoint_locations): Change sals parameters to use
2950         gdb::array_view.
2951         * cli/cli-cmds.c (edit_command, list_command): Update to use
2952         std::vector and gdb::array_view.
2953         (ambiguous_line_spec): Adjust to use gdb::array_view and
2954         range-for.
2955         (compare_symtabs): Rename to ...
2956         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2957         const reference and adjust.
2958         (filter_sals): Rewrite using std::vector and standard algorithms.
2959         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2960         (jump_command): Update to use std::vector.
2961         * linespec.c (struct linespec_state) <canonical_names>: Update
2962         comment.
2963         (add_sal_to_sals_basic): Delete.
2964         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2965         (decode_line_2, create_sals_line_offset)
2966         (convert_address_location_to_sals, convert_linespec_to_sals)
2967         (convert_explicit_location_to_sals, parse_linespec)
2968         (event_location_to_sals, decode_line_full, decode_line_1)
2969         (decode_line_with_current_source)
2970         (decode_line_with_last_displayed, decode_objc)
2971         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2972         (linespec_result::~linespec_result): Adjust to use std::vector
2973         instead of symtabs_and_lines.
2974         * linespec.h (linespec_sals::sals): Now a std::vector.
2975         (struct linespec_result): Use std::vector, bool, and in-class
2976         initialization.
2977         (decode_line_1, decode_line_with_current_source)
2978         (decode_line_with_last_displayed): Return std::vector.
2979         * macrocmd.c (info_macros_command): Use std::vector.
2980         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2981         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2982         std::vector.
2983         * probe.h (parse_probes): Return a std::vector.
2984         * python/python.c (gdbpy_decode_line): Use std::vector and
2985         gdb::array_view.
2986         * source.c (select_source_symtab, line_info): Use std::vector.
2987         * stack.c (func_command): Use std::vector.
2988         * symtab.h (struct symtabs_and_lines): Delete.
2989         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2990
2991 2017-09-04  Pedro Alves  <palves@redhat.com>
2992
2993         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2994         unittests/array-view-selftests.c.
2995         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2996         * common/array-view.h: New file.
2997         * unittests/array-view-selftests.c: New file.
2998
2999 2017-09-04  Pedro Alves  <palves@redhat.com>
3000
3001         * cli/cli-cmds.c (edit_command): Pass message to
3002         ambiguous_line_spec.
3003         (list_command): Pass message to ambiguous_line_spec.  Say
3004         "first"/"last" instead of "start" and "end" to be consistent with
3005         the manual.
3006         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3007         them to print formatted message.
3008
3009 2017-09-04  Pedro Alves  <palves@redhat.com>
3010
3011         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3012         ftrace_update_insns by reference instead of pointer.
3013
3014 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3015
3016         * i386-go32-tdep.c: Include x86-xstate.h.
3017         (i386_go32_init_abi): Call i386_target_description.
3018         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3019         if xcr0 is X86_XSTATE_X87_MASK.
3020         * i386-tdep.h (tdesc_i386): Remove the declaration.
3021         (tdesc_i386_mmx): Likewise.
3022
3023 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3024
3025         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3026         X86_XSTATE_SSE_MASK instead of 0.
3027
3028 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3029
3030         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3031         i386_target_description.
3032         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3033         i386_target_description.
3034         * i386-tdep.c (i386_gdbarch_init): Likewise.
3035
3036 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3037
3038         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3039         (x86_darwin_init_abi_64): Call amd64_target_description.
3040         * amd64-dicos-tdep.c: Likewise.
3041         * amd64-fbsd-nat.c: Likewise.
3042         * amd64-fbsd-tdep.c: Likewise.
3043         * amd64-nbsd-tdep.c: Likewise.
3044         * amd64-obsd-tdep.c: Likewise.
3045         * amd64-sol2-tdep.c: Likewise.
3046         * amd64-windows-tdep.c: Likewise.
3047         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3048
3049 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3050
3051         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3052         (btrace_function) <insn>: Change type to use std::vector.
3053         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3054         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3055         ftrace_update_insns, ftrace_compute_global_level_offset,
3056         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3057         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3058         change to std::vector.
3059         (ftrace_update_insns): Adjust to change to std::vector, change
3060         type of INSN parameter.
3061         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3062         * record-btrace.c (btrace_call_history_insn_range,
3063         btrace_compute_src_line_range,
3064         record_btrace_frame_prev_register): Adjust to change to
3065         std::vector.
3066         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3067         to change to std::vector.
3068
3069 2017-09-03  Tom Tromey  <tom@tromey.com>
3070
3071         * corefile.c (reopen_exec_file): Use std::string.
3072
3073 2017-09-03  Tom Tromey  <tom@tromey.com>
3074
3075         * compile/compile.c (compile_register_name_mangled): Return
3076         std::string.
3077         * compile/compile-loc2c.c (pushf_register_address): Update.
3078         (pushf_register): Update.
3079         * compile/compile-c-types.c (convert_array): Update.
3080         * compile/compile-c-symbols.c (generate_vla_size): Update.
3081         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3082         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3083         (convert_one_symbol): Update.
3084         (generate_c_for_for_one_variable): Update.
3085         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3086         std::string.
3087         (generate_register_struct): Update.
3088         * compile/compile-internal.h (c_get_range_decl_name): Return a
3089         std::string.
3090         (compile_register_name_mangled): Return std::string.
3091
3092 2017-09-03  Tom Tromey  <tom@tromey.com>
3093
3094         * utils.c (perror_string): Return a std::string.
3095         (throw_perror_with_name, perror_warning_with_name): Update.
3096
3097 2017-09-03  Tom Tromey  <tom@tromey.com>
3098
3099         * demangle.c (demangle_command): Use std::string,
3100         unique_xmalloc_ptr.
3101
3102 2017-09-03  Tom Tromey  <tom@tromey.com>
3103
3104         * cli/cli-setshow.c (do_set_command): Use std::string.
3105
3106 2017-09-03  Tom Tromey  <tom@tromey.com>
3107
3108         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3109
3110 2017-09-03  Tom Tromey  <tom@tromey.com>
3111
3112         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3113
3114 2017-09-03  Tom Tromey  <tom@tromey.com>
3115
3116         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3117         gdb::unique_xmalloc_ptr.
3118
3119 2017-09-03  Tom Tromey  <tom@tromey.com>
3120
3121         * thread.c (print_thread_info_1): Use string_printf.
3122         (thread_apply_command, thread_apply_all_command): Use
3123         std::string.
3124
3125 2017-09-03  Tom Tromey  <tom@tromey.com>
3126
3127         * valprint.c (val_print_string): Update.
3128         * gdbcore.h (memory_error_message): Return std::string.
3129         * corefile.c (memory_error_message): Return std::string.
3130         (memory_error): Update.
3131         * breakpoint.c (insert_bp_location): Update.
3132
3133 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3134
3135         * target/waitstatus.h (target_waitstatus_to_string): Change
3136         return type to std::string.
3137         * target/waitstatus.c (target_waitstatus_to_string): Return
3138         std::string.
3139         * target.h (target_waitstatus_to_string): Remove declaration.
3140         * infrun.c (resume, clear_proceed_status_thread,
3141         print_target_wait_results, do_target_wait, save_waitstatus,
3142         stop_all_threads): Adjust.
3143         * record-btrace.c (record_btrace_wait): Adjust.
3144         * target-debug.h
3145         (target_debug_print_struct_target_waitstatus_p): Adjust.
3146
3147 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3148
3149         PR gdb/22046
3150         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3151         detection.
3152
3153 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3154
3155         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3156         for setting/unsetting environment variables on the remote target.
3157         (New remote packets): Add entries for QEnvironmentHexEncoded,
3158         QEnvironmentUnset and QEnvironmentReset.
3159         * common/environ.c (gdb_environ::operator=): Extend method to
3160         handle m_user_set_env_list and m_user_unset_env_list.
3161         (gdb_environ::clear): Likewise.
3162         (match_var_in_string): Change type of first parameter from 'char
3163         *' to 'const char *'.
3164         (gdb_environ::set): Extend method to handle
3165         m_user_set_env_list and m_user_unset_env_list.
3166         (gdb_environ::unset): Likewise.
3167         (gdb_environ::clear_user_set_env): New method.
3168         (gdb_environ::user_set_envp): Likewise.
3169         (gdb_environ::user_unset_envp): Likewise.
3170         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3171         m_user_unset_env_list on move constructor/assignment.
3172         (unset): Add new default parameter 'update_unset_list = true'.
3173         (clear_user_set_env): New method.
3174         (user_set_envp): Likewise.
3175         (user_unset_envp): Likewise.
3176         (m_user_set_env_list): New std::set.
3177         (m_user_unset_env_list): Likewise.
3178         * common/rsp-low.c (hex2str): New function.
3179         (bin2hex): New overload for bin2hex function.
3180         * common/rsp-low.c (hex2str): New prototype.
3181         (str2hex): New overload prototype.
3182         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3183         QEnvironmentUnset and QEnvironmentReset.
3184         (remote_protocol_features): Add QEnvironmentHexEncoded,
3185         QEnvironmentUnset and QEnvironmentReset packets.
3186         (send_environment_packet): New function.
3187         (extended_remote_environment_support): Likewise.
3188         (extended_remote_create_inferior): Call
3189         extended_remote_environment_support.
3190         (_initialize_remote): Add QEnvironmentHexEncoded,
3191         QEnvironmentUnset and QEnvironmentReset packet configs.
3192         * unittests/environ-selftests.c (gdb_selftest_env_var):
3193         New variable.
3194         (test_vector_initialization): New function.
3195         (test_init_from_host_environ): Likewise.
3196         (test_reinit_from_host_environ): Likewise.
3197         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3198         Likewise.
3199         (test_unset_set_empty_vector): Likewise.
3200         (test_vector_clear): Likewise.
3201         (test_std_move): Likewise.
3202         (test_move_constructor):
3203         (test_self_move): Likewise.
3204         (test_set_unset_reset): Likewise.
3205         (run_tests): Rewrite in terms of the functions above.
3206
3207 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3208
3209         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3210         (adi_available): Use a temp variable of type CORE_ADDR as argument
3211         3 when calling target_auxv_search.
3212         (adi_normalize_address): Use masks and xor operators to calculate
3213         normalized address.
3214         (adi_read_versions, adi_write_versions, adi_print_versions)
3215         (do_examine, do_assign): Use paddress.
3216
3217 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3218
3219         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3220         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3221         out of loop and add supply of FIR.
3222         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3223         add collect of FIR.
3224
3225 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3226
3227         PR gdb/21827
3228         * cli/cli-script.c (define_command): Don't convert command name
3229         to lower case.
3230
3231 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3232
3233         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3234         Update all callers accordingly. Remove all code blocks handling
3235         the case where DISPP is not NULL.
3236
3237 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3238
3239         PR symtab/22003
3240         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3241         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3242         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3243
3244 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3245
3246         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3247         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3248         (read_comp_units_from_section): New parameter abbrev_section, use
3249         read_and_check_comp_unit_head, allocate signatured_type if needed.
3250         (create_all_comp_units): Update read_comp_units_from_section caller.
3251
3252 2017-08-23  Pedro Alves  <palves@redhat.com>
3253
3254         PR remote/21852
3255         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3256         to null_ptid and switch to thread without reading the registers
3257         after adding the inferior.
3258
3259 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3260
3261         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3262         compile-gcc.
3263         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3264         (compile_to_object): Implement compile_gcc.
3265         (_initialize_compile): Install "set compile-gcc".  Initialize
3266         compile_gcc.
3267
3268 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3269
3270         * compile/compile.c (compile_to_object): Conditionally call
3271         set_verbose.  Conditionally call compile or compile_v0.
3272
3273 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3274
3275         * sparc64-tdep.h: (adi_normalize_address): New export.
3276         * sparc-nat.h: (open_adi_tag_fd): New export.
3277         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3278         * sparc64-linux-tdep.c:
3279         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3280         (sparc64_linux_handle_segmentation_fault): New function.
3281         (sparc64_linux_init_abi): Register
3282         sparc64_linux_handle_segmentation_fault
3283         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3284         (sparc64_addr_bits_remove): New function.
3285         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3286         (MAX_PROC_NAME_SIZE): New macro.
3287         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3288         (sparc64adilist): New variable.
3289         (adi_proc_list): New variable.
3290         (find_adi_info): New function.
3291         (add_adi_info): New function.
3292         (get_adi_info_proc): New function.
3293         (get_adi_info): New function.
3294         (info_adi_command): New function.
3295         (read_maps_entry): New function.
3296         (adi_available): New function.
3297         (adi_normalize_address): New function.
3298         (adi_align_address): New function.
3299         (adi_convert_byte_count): New function.
3300         (adi_tag_fd): New function.
3301         (adi_is_addr_mapped): New function.
3302         (adi_read_versions): New function.
3303         (adi_write_versions): New function.
3304         (adi_print_versions): New function.
3305         (do_examine): New function.
3306         (do_assign): New function.
3307         (adi_examine_command): New function.
3308         (adi_assign_command): New function.
3309         (_initialize_sparc64_adi_tdep): New function.
3310
3311 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3312
3313         * breakpoint.c (breakpoints_info): Rename to ...
3314         (info_breakpoints_command): ... this.
3315         (watchpoints_info): Rename to ...
3316         (info_watchpoints_command): ... this.
3317         (tracepoints_info): Rename to ...
3318         (info_tracepoints_command): ... this.
3319         (_initialize_breakpoint): Adjust.
3320         * dcache.c (dcache_info): Rename to ...
3321         (info_display_command): ... this.
3322         (_initialize_dcache): Adjust.
3323         * frame.h (args_info): Rename to ...
3324         (info_args_command): ... this.
3325         (locals_info): Rename to ...
3326         (info_locals_command): ... this.
3327         * infcmd.c (nofp_registers_info): Rename to ...
3328         (info_registers_command): ... this.
3329         (float_info): Rename to ...
3330         (info_float_command): ... this.
3331         (program_info): Rename to ...
3332         (info_program_command): ... this.
3333         (all_registers_info): Rename to ...
3334         (info_all_registers_command): ... this.
3335         (vector_info): Rename to ...
3336         (info_vector_command): ... this.
3337         (float_info): Rename to ...
3338         (info_float_command): ... this.
3339         (_initialize_infcmd): Adjust.
3340         * inferior.h (term_info): Rename to ...
3341         (info_terminal_command): ... this.
3342         * inflow.c (term_info): Rename to ...
3343         (info_terminal_command): ... this.
3344         (_initialize_inflow): Adjust.
3345         * infrun.c (signals_info): Rename to ...
3346         (info_signals_command): ... this.
3347         (_initialize_infrun): Adjust.
3348         * objc-lang.c (classes_info): Rename to ...
3349         (info_classes_command): ... this.
3350         (selectors_info): Rename to ...
3351         (info_selectors_command): ... this.
3352         (_initialize_objc_language): Adjust.
3353         * printcmd.c (sym_info): Rename to ...
3354         (info_symbol_command): ... this.
3355         (address_info): Rename to ...
3356         (info_address_command): ... this.
3357         (display_info): Rename to ...
3358         (info_display_command): ... this.
3359         (_initialize_printcmd): Adjust.
3360         * reverse.c (bookmarks_info): Rename to ...
3361         (info_breakpoints_command): ... this.
3362         (_initialize_reverse): Adjust.
3363         * ser-go32.c (dos_info): Rename to ...
3364         (info_serial_command): ... this.
3365         (_initialize_ser_dos): Adjust.
3366         * skip.c (skip_info): Rename to ...
3367         (info_skip_command): ... this.
3368         (_initialize_step_skip): Adjust.
3369         * source.c (line_info): Rename to ...
3370         (info_line_command): ... this.
3371         (source_info): Rename to ...
3372         (info_source_command)
3373         * stack.c (frame_info): Rename to ...
3374         (info_frame_command): ... this.
3375         (locals_info): Rename to ...
3376         (info_locals_command): ... this.
3377         (args_info): Rename to ...
3378         (info_args_command): ... this.
3379         (_initialize_stack): Adjust.
3380         * symtab.c (sources_info): Rename to ...
3381         (info_sources_command): ... this.
3382         (variables_info): Rename to ...
3383         (info_variables_command): ... this.
3384         (functions_info): Rename to ...
3385         (info_functions_command): ... this.
3386         (types_info): Rename to ...
3387         (info_types_command): ... this.
3388         (_initialize_symtab): Adjust.
3389         * target.c (target_info): Rename to ...
3390         (info_target_command): ... this.
3391         (initialize_targets): Adjust.
3392         * tracepoint.c (tvariables_info): Rename to ...
3393         (info_tvariables_command): ... this.
3394         (scope_info): Rename to ...
3395         (info_scope_command): ... this.
3396         (trace_dump_actions): Adjust.
3397         (_initialize_tracepoint): Adjust.
3398
3399 2017-08-22  Tom Tromey  <tom@tromey.com>
3400
3401         * breakpoint.h (install_breakpoint): Update.
3402         * breakpoint.c (add_solib_catchpoint): Update.
3403         (install_breakpoint): Change argument to a std::unique_ptr.
3404         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3405         (create_breakpoint_sal, create_breakpoint): Update.
3406         (watch_command_1, catch_exec_command_1)
3407         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3408         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3409         Return the breakpoint.
3410         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3411         (new_single_step_breakpoint): Update.
3412         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3413         std::unique_ptr.
3414         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3415         std::unique_ptr.
3416         * break-catch-sig.c (create_signal_catchpoint): Use
3417         std::unique_ptr.
3418         * ada-lang.c (create_ada_exception_catchpoint): Use
3419         std::unique_ptr.
3420
3421 2017-08-22  Tom Tromey  <tom@tromey.com>
3422
3423         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3424
3425 2017-08-22  Tom Tromey  <tom@tromey.com>
3426
3427         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3428         (lookup_partial_symbol): Update.
3429
3430 2017-08-22  Tom Tromey  <tom@tromey.com>
3431
3432         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3433         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3434         (find_and_open_source, symtab_to_fullname): Update.
3435         * psymtab.c (psymtab_to_fullname): Update.
3436
3437 2017-08-22  Tom Tromey  <tom@tromey.com>
3438
3439         * exec.c (exec_file_attach): Update.
3440         * linux-thread-db.c (try_thread_db_load): Update.
3441         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3442         * utils.c (gdb_realpath): Change return type.
3443         (gdb_realpath_keepfile): Update.
3444         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3445         (_initialize_utils): Register the new self test.
3446         * source.c (openp): Update.
3447         (find_and_open_source): Update.
3448         * nto-tdep.c (nto_find_and_open_solib): Update.
3449         * main.c (set_gdb_data_directory): Update.
3450         (captured_main_1): Update.
3451         * dwarf2read.c (dwarf2_get_dwz_file): Update
3452         (dw2_map_symbol_filenames): Update.
3453         * auto-load.c (auto_load_safe_path_vec_update): Update.
3454         (filename_is_in_auto_load_safe_path_vec): Change type of
3455         "filename_realp".
3456         (auto_load_objfile_script): Update.
3457         (file_is_auto_load_safe): Update.  Use std::string.
3458         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3459
3460 2017-08-22  Tom Tromey  <tom@tromey.com>
3461
3462         * utils.c (gdb_realpath_keepfile): Return a
3463         gdb::unique_xmalloc_ptr.
3464         * exec.c (exec_file_attach): Update.
3465         * utils.h (gdb_realpath_keepfile): Return a
3466         gdb::unique_xmalloc_ptr.
3467
3468 2017-08-22  Tom Tromey  <tom@tromey.com>
3469
3470         * compile/compile.c (compile_file_command): Use
3471         gdb::unique_xmalloc_ptr, std::string.
3472         * utils.c (gdb_abspath): Change return type.
3473         * source.c (openp): Update.
3474         * objfiles.c (allocate_objfile): Update.
3475         * main.c (set_gdb_data_directory): Update.
3476         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3477
3478 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3479
3480         * cli-cmds.c (list_commands): List actual code around more than
3481         one location.
3482
3483 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3484
3485         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3486
3487 2017-08-21  Pedro Alves  <palves@redhat.com>
3488
3489         PR gdb/19487
3490         * c-exp.y (variable production): Handle function aliases.
3491         * minsyms.c (msymbol_is_text): New function.
3492         * minsyms.h (msymbol_is_text): Declare.
3493         * symtab.c (find_function_alias_target): New function.
3494         * symtab.h (find_function_alias_target): Declare.
3495
3496 2017-08-21  Pedro Alves  <palves@redhat.com>
3497
3498         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3499         typedefs.
3500         * typeprint.c (whatis_exp): If handling "whatis", and expression
3501         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3502         typedefs here.
3503         * valops.c (value_cast): Save "to" type before resolving
3504         stubs/typedefs.  Use that type as resulting value's type.
3505
3506 2017-08-18  Tom Tromey  <tom@tromey.com>
3507             Pedro Alves  <palves@redhat.com>
3508
3509         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3510         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3511         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3512         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3513         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3514         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3515         (linux_get_siginfo_data): Add "thread" argument.  Use
3516         scoped_restore.
3517         * linux-nat.c (linux_child_follow_fork)
3518         (check_stopped_by_watchpoint): Use scoped_restore.
3519         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3520         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3521         (restore_inferior_ptid, save_inferior_ptid): Remove.
3522         * btrace.c (btrace_fetch): Use scoped_restore.
3523         * bsd-uthread.c (bsd_uthread_fetch_registers)
3524         (bsd_uthread_store_registers): Use scoped_restore.
3525         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3526         scoped_restore.
3527         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3528         (aix_thread_xfer_partial): Use scoped_restore.
3529         * inferior.h (save_inferior_ptid): Remove.
3530
3531 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3532
3533         PR tdep/21818
3534         * arm-tdep.c (gdb_print_insn_arm): Mark
3535         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3536
3537 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3538
3539         * NEWS: Mention GDBserver's new option "--selftest".
3540         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3541         * selftest.c: Move it to common/selftest.c.
3542         * selftest.h: Move it to common/selftest.h.
3543         * selftest-arch.c (reset): New function.
3544         (tests_with_arch): Call reset.
3545
3546 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3547
3548         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3549         instead of exception_fprintf and printf_filtered.
3550
3551 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3552
3553         * selftest.c (register_self_test): Rename it to
3554         selftests::register_test.
3555         (run_self_tests): selftest::run_tests.
3556         * selftest.h: Update declarations.
3557         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3558         selftests::register_test_foreach_arch.
3559         * selftest-arch.h: Update declaration.
3560         * aarch64-tdep.c: Update.
3561         * arm-tdep.c: Likewise.
3562         * disasm-selftests.c: Likewise.
3563         * dwarf2loc.c: Likewise.
3564         * dwarf2-frame.c: Likewise.
3565         * findvar.c: Likewise.
3566         * gdbarch-selftests.c: Likewise.
3567         * maint.c (maintenance_selftest): Likewise.
3568         * regcache.c: Likewise.
3569         * rust-exp.y: Likewise.
3570         * selftest-arch.c: Likewise.
3571         * unittests/environ-selftests.c: Likewise.
3572         * unittests/function-view-selftests.c: Likewise.
3573         * unittests/offset-type-selftests.c: Likewise.
3574         * unittests/optional-selftests.c: Likewise.
3575         * unittests/scoped_restore-selftests.c: Likewise.
3576         * utils-selftests.c: Likewise.
3577
3578 2017-08-17  Pedro Alves  <palves@redhat.com>
3579
3580         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3581         local.
3582
3583 2017-08-17  Pedro Alves  <palves@redhat.com>
3584
3585         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3586         field.
3587         (reset_die_in_process): Delete, replaced by ...
3588         (process_die_scope): ... this new class.  Make it responsible for
3589         freeing cu->line_header too.
3590         (process_die): Use process_die_scope.
3591         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3592         cu->line_header_die_owner.  Don't release the line header if it's
3593         owned by the CU.
3594         (setup_type_unit_groups): Make the CU/DIE own the line header.
3595         Don't release the line header here.
3596
3597 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3598
3599         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3600
3601 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3602
3603         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3604         Single-Key mode
3605
3606 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3607
3608         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3609         mode command list.
3610
3611 2017-08-15  Stafford Horne  <shorne@gmail.com>
3612
3613         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3614
3615 2017-08-15  Stafford Horne  <shorne@gmail.com>
3616
3617         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3618
3619 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3620
3621         PR gdb/21954
3622         * infcmd.c (unset_environment_command): Use the 'clear' method on
3623         the environment instead of resetting it.
3624
3625 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3626
3627         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3628         platforms.
3629
3630 2017-08-14  Tom Tromey  <tom@tromey.com>
3631
3632         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3633         (print_binary_chars): Likewise.
3634         (BITS_IN_BYTES): Remove.
3635
3636 2017-08-14  Tom Tromey  <tom@tromey.com>
3637
3638         PR gdb/21675
3639         * valprint.c (LOW_ZERO): Change value to 034.
3640         (print_octal_chars): Add static_asserts for octal constants.
3641         * printcmd.c (print_scalar_formatted): Add 'd' case.
3642
3643 2017-08-11  Tom Tromey  <tom@tromey.com>
3644
3645         * symfile.c (add_symbol_file_command): Use std::vector.
3646
3647 2017-08-14  Tom Tromey  <tom@tromey.com>
3648
3649         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3650         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3651         std::move.
3652         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3653
3654 2017-08-11  Pedro Alves  <palves@redhat.com>
3655
3656         * infrun.c (process_event_stop_test): Adjust
3657         function_name_is_marked_for_skip call.
3658         * skip.c: Include <list>.
3659         (skiplist_entry): Make it a class with private fields, and
3660         getters/setters.
3661         (skiplist_entry_chain): Delete.
3662         (skiplist_entries): New.
3663         (skiplist_entry_count): Delete.
3664         (highest_skiplist_entry_num): New.
3665         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3666         (add_skiplist_entry): Delete.
3667         (skiplist_entry::skiplist_entry): New.
3668         (skiplist_entry::add_entry): New.
3669         (skip_file_command, skip_function): Adjust.
3670         (compile_skip_regexp): Delete.
3671         (skip_command): Don't compile regexp here.  Adjust to use
3672         skiplist_entry::add_entry.
3673         (skip_info): Adjust to use range-for and getters.
3674         (skip_enable_command, skip_disable_command): Adjust to use
3675         range-for and setters.
3676         (skip_delete_command): Adjust to use std::list.
3677         (add_skiplist_entry): Delete.
3678         (skip_file_p): Delete, refactored as ...
3679         (skiplist_entry::do_skip_file_p): ... this new method.
3680         (skip_gfile_p): Delete, refactored as ...
3681         (skiplist_entry::do_gskip_file_p): ... this new method.
3682         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3683         (skiplist_entry::skip_function_p): ... this new method.
3684         (function_name_is_marked_for_skip): Now returns bool, and takes
3685         the function sal by const reference.  Adjust to use range-for and
3686         skiplist_entry methods.
3687         (_initialize_step_skip): Remove references to
3688         skiplist_entry_chain, skiplist_entry_count.
3689         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3690         takes the function sal by const reference.
3691
3692 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3693
3694         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3695         (dwarf2_frame_cache): Remove reset_cache_cleanup.
3696         (dwarf2_frame_cache):
3697         * frame-unwind.c (frame_unwind_try_unwinder): Catch
3698         RETURN_MASK_ALL and set *this_case to NULL.
3699         * frame-unwind.h: Update comments.
3700
3701 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3702
3703         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3704         (dwarf2_frame_state_copy_regs): Remove.
3705         (dwarf2_frame_state_free_regs): Remove.
3706         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3707         (dwarf2_restore_rule): Call method .alloc_regs instead of
3708         dwarf2_frame_state_alloc_regs.
3709         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
3710         constructor.  Call std::move.
3711         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3712         (dwarf2_frame_cache): Likewise.
3713
3714         [GDB_SELF_TEST]: Include selftest.h and
3715         selftest-arch.h.
3716         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3717         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3718         execute_cfa_program_test.
3719
3720         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3721         copy ctor, assignment operator, move assignment.
3722         <alloc_regs>: New method.
3723         <swap>: New method.
3724         (struct dwarf2_frame_state): Delete dtor.
3725         (dwarf2_frame_state_alloc_regs): Remove declaration.
3726         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3727         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3728
3729 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3730
3731         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3732         (dwarf2_frame_state::dwarf2_frame_state): New.
3733         (dwarf2_frame_state::~dwarf2_frame_state): New.
3734         (dwarf2_fetch_cfa_info): Update.
3735         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
3736         rather than a pointer.  Update code.
3737         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3738         dtor.
3739         <data_align, code_align, retaddr_column>: Change them to const.
3740         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3741         to bool.
3742
3743 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3744
3745         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3746         <loc.exp>: New field.
3747         * dwarf2-frame.c (execute_cfa_program): Update.
3748         (dwarf2_frame_prev_register): Update.
3749
3750 2017-08-10  Pedro Alves  <palves@redhat.com>
3751
3752         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3753
3754 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3755
3756         * fbsd-nat.c (struct fbsd_fork_info): Remove.
3757         (fbsd_pending_children): Use std::list.
3758         (fbsd_remember_child): Likewise.
3759         (fbsd_is_child_pending): Likewise.
3760         (fbsd_pending_vfork_done): Use std::forward_list.
3761         (fbsd_add_vfork_done): Likewise.
3762         (fbsd_is_vfork_done_pending): Likewise.
3763         (fbsd_next_vfork_done): Likewise.
3764
3765 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3766
3767         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3768         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3769         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3770         for `mapfilename'.
3771         (fbsd_xfer_partial): Use gdb::byte_vector.
3772         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3773
3774 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3775
3776         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3777         "filestuff.h".
3778         (fbsd_find_memory_regions): Fix `mapfile' initialization.
3779
3780 2017-08-09  Tom Tromey  <tom@tromey.com>
3781
3782         * skip.c (skiplist_entry): New constructor.
3783         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3784         (skiplist_entry::file_is_glob): Now bool.
3785         (skiplist_entry::file, skiplist_entry::function): Now
3786         std::string.
3787         (make_skip_entry): Return a unique_ptr.  Use new.
3788         (free_skiplist_entry, free_skiplist_entry_cleanup)
3789         (make_free_skiplist_entry_cleanup): Remove.
3790         (skip_command, skip_disable_command, add_skiplist_entry)
3791         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3792         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3793         (function_name_is_marked_for_skip): Update.
3794         (skip_delete_command): Update.  Use delete.
3795
3796 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3797
3798         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3799         (aarch64_linux_core_read_description): New function.
3800         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3801
3802 2017-08-09  Pedro Alves  <palves@redhat.com>
3803
3804         * cp-name-parser.y (cp_comp_to_string): Return a
3805         gdb::unique_xmalloc_ptr<char>.
3806         * cp-support.c (replace_typedefs_qualified_name)
3807         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3808         (cp_canonicalize_string_full): Use op= instead of explicit
3809         convertion.
3810         (cp_class_name_from_physname, method_name_from_physname)
3811         (cp_func_name, cp_remove_params): Adjust to use
3812         gdb::unique_xmalloc_ptr<char>.
3813         * cp-support.h (cp_comp_to_string): Return a
3814         gdb::unique_xmalloc_ptr<char>.
3815         * python/py-type.c (typy_lookup_type): Adjust to use
3816         gdb::unique_xmalloc_ptr<char>.
3817
3818 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3819
3820         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3821
3822 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3823             Yao Qi  <yao.qi@linaro.org>
3824
3825         * cp-support.c (cp_canonicalize_string_full): Use
3826         gdb::unique_xmalloc_ptr<char>.
3827         (cp_canonicalize_string): Likewise.
3828
3829 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3830
3831         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3832         * regformats/i386/amd64-avx-avx512.dat: Remove.
3833         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3834         * regformats/i386/amd64-avx-mpx.dat:Remove.
3835         * regformats/i386/amd64-avx.dat: Remove.
3836         * regformats/i386/amd64-mpx.dat: Remove.
3837         * regformats/i386/i386-avx-avx512.dat: Remove.
3838         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3839         * regformats/i386/i386-avx-mpx.dat: Remove.
3840         * regformats/i386/i386-mmx.dat: Remove.
3841         * regformats/i386/i386-mpx.dat: Remove.
3842
3843 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3844
3845         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3846         * amd64-tdep.c: Don't include features/i386/x32*.c.
3847         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3848         functions.
3849         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3850         and i386/x32-avx-avx512.
3851         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3852         and i386/x32.xml.
3853         * features/i386/x32-avx-avx512.c: Removed.
3854         * features/i386/x32-avx-avx512.xml: Removed.
3855         * features/i386/x32-avx.c: Removed.
3856         * features/i386/x32-avx.xml: Removed.
3857         * features/i386/x32.c: Removed.
3858         * features/i386/x32.xml: Removed.
3859         * regformats/i386/x32-avx-avx512.dat: Removed.
3860         * regformats/i386/x32-avx.dat: Removed.
3861         * regformats/i386/x32.dat: Removed.
3862
3863 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3864
3865         PR breakpoints/21886
3866         * mem-break.c (default_memory_insert_breakpoint): Use
3867         `->placed_address' rather than `->reqstd_address' for the
3868         breakpoint location.
3869
3870 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3871
3872         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3873         assertions.
3874
3875 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3876
3877         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3878         a union of `tdep_info', `tdesc_data' and `id'.
3879         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3880         rather than `info.tdep_info'.
3881         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3882         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3883         * i386-tdep.c (i386_gdbarch_init): Likewise.
3884         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3885         * mips-tdep.c (mips_gdbarch_init): Likewise.
3886         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3887         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3888         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3889         `info.tdep_info'.
3890         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3891         `info.tdep_info'.
3892         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3893         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3894         `info.tdep_info'.
3895         * spu-tdep.c (spu_gdbarch_init): Likewise.
3896         * gdbarch.h: Regenerate.
3897
3898 2017-08-07  Leszek Swirski  <leszeks@google.com>
3899
3900         PR symtab/20899
3901         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3902
3903 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3904
3905         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3906         (gdbsim_open): Rename gdb_argv args object to argv.
3907
3908 2017-08-05  Tom Tromey  <tom@tromey.com>
3909
3910         * compile/compile-object-load.c (compile_object_load): Use
3911         gdb::unique_xmalloc_ptr.
3912         * cli/cli-dump.c (scan_filename): Rename from
3913         scan_filename_with_cleanup.  Change return type.
3914         (scan_expression): Rename from scan_expression_with_cleanup.
3915         Change return type.
3916         (dump_memory_to_file, dump_value_to_file, restore_command):
3917         Use gdb::unique_xmalloc_ptr.  Update.
3918         * cli/cli-cmds.c (find_and_open_script): Use
3919         gdb::unique_xmalloc_ptr.
3920         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3921         * symmisc.c (maintenance_print_symbols)
3922         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3923         * symfile.c (symfile_bfd_open, generic_load)
3924         (add_symbol_file_command, remove_symbol_file_command): Use
3925         gdb::unique_xmalloc_ptr.
3926         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3927         * psymtab.c (maintenance_print_psymbols): Use
3928         gdb::unique_xmalloc_ptr.
3929         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3930         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3931         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3932         (reload_shared_libraries_1): Likewise.
3933
3934 2017-08-05  Tom Tromey  <tom@tromey.com>
3935
3936         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3937         (rust_op_vector, rust_set_vector): New typedefs.
3938         (current_parser): New global.
3939         (work_obstack): Change to pointer type.  Update all users.
3940         (rust_ast, pstate): Remove globals.
3941         (struct rust_parser): New.
3942         (%union) <params, field_inits>: Change type.
3943         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3944         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3945         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3946         (convert_params_to_types, convert_params_to_expression): Change
3947         type of "params".
3948         (ast_string): Change type of "fields".
3949         (rust_parse): Make a rust_parser.  Remove cleanups.
3950         (rust_lex_tests): Make and install an auto_obstack.
3951
3952 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3953
3954         * configure.srv (ipa_x32_linux_regobj): New.
3955         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3956         instead of X86_TDESC_AVX512.
3957         (initialize_low_tracepoint): Call
3958         init_registers_x32_avx_avx512_linux.
3959
3960 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3961
3962         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3963
3964 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3965
3966         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3967
3968 2017-08-03  Tom Tromey  <tom@tromey.com>
3969
3970         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3971         Remove.
3972         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3973
3974 2017-08-03  Tom Tromey  <tom@tromey.com>
3975
3976         * python/py-param.c (compute_enum_values): Use gdb_argv.
3977
3978 2017-08-03  Tom Tromey  <tom@tromey.com>
3979
3980         * utils.h (struct gdb_argv_deleter): New.
3981         (gdb_argv): New class.
3982         * utils.c (gdb_argv::reset): New method.
3983         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3984         * tracefile.c (tsave_command): Use gdb_argv.
3985         * top.c (new_ui_command): Use gdb_argv.
3986         * symmisc.c (maintenance_print_symbols)
3987         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3988         * symfile.c (symbol_file_command, generic_load)
3989         (remove_symbol_file_command): Use gdb_argv.
3990         * stack.c (backtrace_command): Use gdb_argv.
3991         * source.c (add_path, show_substitute_path_command)
3992         (unset_substitute_path_command, set_substitute_path_command):
3993         Use gdb_argv.
3994         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3995         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3996         * remote.c (extended_remote_run, remote_put_command)
3997         (remote_get_command, remote_delete_command): Use gdb_argv.
3998         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3999         (gdbsim_open): Use gdb_argv.
4000         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4001         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4002         * procfs.c (procfs_info_proc): Use gdb_argv.
4003         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4004         * infrun.c (handle_command): Use gdb_argv.
4005         * inferior.c (add_inferior_command, clone_inferior_command):
4006         Use gdb_argv.
4007         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4008         * exec.c (exec_file_command): Use gdb_argv.
4009         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4010         * compile/compile.c (build_argc_argv): Use gdb_argv.
4011
4012 2017-08-03  Tom Tromey  <tom@tromey.com>
4013
4014         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4015
4016 2017-08-03  Tom Tromey  <tom@tromey.com>
4017
4018         * python/python.c (compute_python_string): Return std::string.
4019         (gdbpy_eval_from_control_command): Update.
4020         (do_start_initialization): Use std::string.
4021         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4022         xstrprintf.
4023         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4024         xstrprintf.
4025
4026 2017-08-03  Tom Tromey  <tom@tromey.com>
4027
4028         * top.h (do_restore_instream_cleanup): Remove.
4029         * top.c (do_restore_instream_cleanup): Remove.
4030         (read_command_file): Use scoped_restore.
4031         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4032
4033 2017-08-03  Tom Tromey  <tom@tromey.com>
4034
4035         * cli/cli-script.c (execute_user_command)
4036         (execute_control_command): Use scoped_restore.
4037
4038 2017-08-03  Tom Tromey  <tom@tromey.com>
4039
4040         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4041         (execute_user_command): Remove user_call_depth; use
4042         user_args_stack's size instead.
4043
4044 2017-08-03  Tom Tromey  <tom@tromey.com>
4045
4046         * top.h (in_user_command): Remove.
4047         * top.c (in_user_command): Remove.
4048         * cli/cli-script.c (do_restore_user_call_depth)
4049         (execute_user_command): Update.
4050
4051 2017-08-03  Tom Tromey  <tom@tromey.com>
4052
4053         * valops.c (search_struct_method): Use gdb::byte_vector.
4054         * valarith.c (value_concat): Use std::vector.
4055         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4056         (simple_search_memory): Likewise.
4057         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4058         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4059         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4060         * elfread.c (elf_rel_plt_read): Use std::string.
4061         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4062         * cli/cli-dump.c (restore_section_callback): Use
4063         gdb::byte_vector.
4064
4065 2017-08-03  Tom Tromey  <tom@tromey.com>
4066
4067         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4068
4069 2017-08-03  Tom Tromey  <tom@tromey.com>
4070
4071         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4072         (tui_register_format): Use scoped_restore.
4073
4074 2017-08-03  Tom Tromey  <tom@tromey.com>
4075
4076         * reverse.c (exec_direction_default): Remove.
4077         (exec_reverse_once): Use scoped_restore.
4078         * remote.c (restore_remote_timeout): Remove.
4079         (remote_flash_erase, remote_flash_write, remote_flash_done)
4080         (readchar, remote_serial_write): Use scoped_restore.
4081         * cli/cli-script.c (struct source_cleanup_lines_args)
4082         (source_cleanup_lines): Remove.
4083         (script_from_file): Use scoped_restore.
4084         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4085         (source_command): Use scoped_restore.
4086
4087 2017-08-03  Tom Tromey  <tom@tromey.com>
4088
4089         * utils.h (make_cleanup_free_so): Remove.
4090         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4091         * solist.h (struct so_deleter): New.
4092         (so_list_up): New typedef.
4093         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4094
4095 2017-08-03  Tom Tromey  <tom@tromey.com>
4096
4097         * utils.h (make_cleanup_restore_current_language): Remove.
4098         * utils.c (do_restore_current_language)
4099         (make_cleanup_restore_current_language): Remove.
4100         * parse.c (parse_exp_in_context_1)
4101         (parse_expression_with_language): Use
4102         scoped_restore_current_language.
4103         * mi/mi-main.c (mi_cmd_execute): Use
4104         scoped_restore_current_language.
4105         * language.h (scoped_restore_current_language): New class.
4106
4107 2017-08-03  Tom Tromey  <tom@tromey.com>
4108
4109         * compile/compile.c (cleanup_unlink_file): Remove.
4110         (compile_to_object): Use gdb::unlinker.
4111         (eval_compile_command): Likewise.
4112
4113 2017-08-03  Tom Tromey  <tom@tromey.com>
4114
4115         * utils.h (make_cleanup_fclose): Remove.
4116         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4117
4118 2017-08-03  Tom Tromey  <tom@tromey.com>
4119
4120         * top.c (open_terminal_stream): Return gdb_file_up.
4121         (new_ui_command): Update.
4122
4123 2017-08-03  Tom Tromey  <tom@tromey.com>
4124
4125         * source.c (print_source_lines_base, forward_search_command)
4126         (reverse_search_command): Use gdb_file_up.
4127
4128 2017-08-03  Tom Tromey  <tom@tromey.com>
4129
4130         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4131
4132 2017-08-03  Tom Tromey  <tom@tromey.com>
4133
4134         * cli/cli-cmds.c (find_and_open_script): Change return type.
4135         Remove "streamp" and "full_path" parameters.
4136         (source_script_with_search): Update.
4137         * auto-load.c (source_script_file): Update.
4138         * cli/cli-cmds.h (find_and_open_script): Change type.
4139         (open_script): New struct.
4140
4141 2017-08-03  Tom Tromey  <tom@tromey.com>
4142
4143         * xml-support.c (xml_fetch_content_from_file): Update.
4144         * ui-file.c (stdio_file::open): Update.
4145         * tracefile-tfile.c (tfile_start): Update.
4146         * remote.c (remote_file_put, remote_file_get): Update.
4147         * nat/linux-procfs.c (linux_proc_get_int)
4148         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4149         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4150         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4151         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4152         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4153         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4154         * linux-nat.c (linux_proc_pending_signals): Update.
4155         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4156         (file_closer): Remove.
4157         * compile/compile.c (compile_to_object): Update.
4158         * common/filestuff.h (struct gdb_file_deleter): New.
4159         (gdb_file_up): New typedef.
4160         (gdb_fopen_cloexec): Change return type.
4161         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4162         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4163         (dump_binary_file, restore_binary_file): Update.
4164         * auto-load.c (auto_load_objfile_script_1): Update.
4165
4166 2017-08-03  Tom Tromey  <tom@tromey.com>
4167
4168         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4169         (info_static_tracepoint_markers_command): Likewise.
4170         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4171         * skip.c (skip_info): Use ui_out_emit_table.
4172         * progspace.c (print_program_space): Use ui_out_emit_table.
4173         * osdata.c (info_osdata): Use ui_out_emit_table.
4174         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4175         ui_out_emit_table.
4176         * linux-thread-db.c (info_auto_load_libthread_db): Use
4177         ui_out_emit_table.
4178         * inferior.c (print_inferior): Use ui_out_emit_table.
4179         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4180         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4181         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4182         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4183         * ui-out.h (class ui_out_emit_table): New.
4184
4185 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4186
4187         * mips-tdep.c (mips_fpu_type_str): New function.
4188         (mips_dump_tdep): Call it.
4189
4190 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4191
4192         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4193         `->mips_fpu_type'.
4194
4195 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4196
4197         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4198
4199 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4200
4201         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4202
4203 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4204
4205         * cli/cli-cmds.c (maintenancechecklist): New variable.
4206         * gdbcmd.h (maintenancechecklist): Declare it.
4207         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4208         Call i386_linux_read_description with different masks.
4209         * maint.c (maintenance_check_command): New function.
4210         (_initialize_maint_cmds): Call add_prefix_cmd.
4211         * target-descriptions.c (tdesc_reg): override operator != and ==.
4212         (tdesc_type): Likewise.
4213         (tdesc_feature): Likewise.
4214         (target_desc): Likewise.
4215         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4216         (maintenance_check_xml_descriptions): New function.
4217         (_initialize_target_descriptions) Add command "xml-descriptions".
4218         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4219
4220 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4221
4222         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4223         Include features/i386/32bit-*.c.
4224         (i386_linux_read_description): Generate target description if it
4225         doesn't exist.
4226         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4227         functions.
4228         * features/i386/32bit-linux.c: Re-generated.
4229         * features/i386/32bit-sse.c: Likewise.
4230         * target-descriptions.c (print_c_feature::visit): Print code to
4231         set register number if needed.
4232         (print_c_feature) <m_next_regnum>: New field.
4233
4234 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4235
4236         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4237         (FEATURE_XMLFILES): New.
4238         (FEATURE_CFILES): New.
4239         New rules.
4240         (clean-cfiles): Remove generated c files.
4241         * features/i386/32bit-avx.c: Generated.
4242         * features/i386/32bit-avx512.c: Generated.
4243         * features/i386/32bit-core.c: Generated.
4244         * features/i386/32bit-linux.c: Generated.
4245         * features/i386/32bit-mpx.c: Generated.
4246         * features/i386/32bit-pkeys.c: Generated.
4247         * features/i386/32bit-sse.c: Generated.
4248         * target-descriptions.c: Include algorithm.
4249         (tdesc_element_visitor): Add method visit_end.
4250         (print_c_tdesc): Implement visit_end.
4251         (print_c_tdesc:: m_filename_after_features): Move it to
4252         protected.
4253         (print_c_feature): New class.
4254         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4255         name starts with "i386/32bit-".
4256
4257 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4258
4259         * target-descriptions.c (tdesc_element_visitor): New class.
4260         (tdesc_element): New class.
4261         (tdesc_reg): Inherit from tdesc_element.
4262         (tdesc_reg::accept): New function.
4263         (tdesc_type): Inherit from tdesc_element.
4264         (tdesc_type::accept): New function.
4265         (tdesc_feature): Inherit from tdesc_element.
4266         (tdesc_feature::accept): New function.
4267         (target_desc): Inherit from tdesc_element.
4268         (target_desc::target_desc): New.
4269         (target_desc::~target_desc): New.
4270         (target_desc::accept): New.
4271         (allocate_target_description): Use new.
4272         (free_target_description): Use delete.
4273         (print_c_tdesc): New class.
4274         (maint_print_c_tdesc_cmd): Adjust.
4275
4276         * features/aarch64.c: Re-generated.
4277         * features/arc-arcompact.c: Re-generated.
4278         * features/arc-v2.c: Re-generated.
4279         * features/arm/arm-with-iwmmxt.c: Re-generated.
4280         * features/arm/arm-with-m.c: Re-generated.
4281         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4282         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4283         * features/arm/arm-with-neon.c: Re-generated.
4284         * features/arm/arm-with-vfpv2.c: Re-generated.
4285         * features/arm/arm-with-vfpv3.c: Re-generated.
4286         * features/i386/amd64-avx-avx512.c: Re-generated.
4287         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4288         * features/i386/amd64-avx.c: Re-generated.
4289         * features/i386/amd64-avx-linux.c: Re-generated.
4290         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4291         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4292         * features/i386/amd64-avx-mpx.c: Re-generated.
4293         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4294         * features/i386/amd64.c: Re-generated.
4295         * features/i386/amd64-linux.c: Re-generated.
4296         * features/i386/amd64-mpx.c: Re-generated.
4297         * features/i386/amd64-mpx-linux.c: Re-generated.
4298         * features/i386/i386-avx-avx512.c: Re-generated.
4299         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4300         * features/i386/i386-avx.c: Re-generated.
4301         * features/i386/i386-avx-linux.c: Re-generated.
4302         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4303         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4304         * features/i386/i386-avx-mpx.c: Re-generated.
4305         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4306         * features/i386/i386.c: Re-generated.
4307         * features/i386/i386-linux.c: Re-generated.
4308         * features/i386/i386-mmx.c: Re-generated.
4309         * features/i386/i386-mmx-linux.c: Re-generated.
4310         * features/i386/i386-mpx.c: Re-generated.
4311         * features/i386/i386-mpx-linux.c: Re-generated.
4312         * features/i386/x32-avx-avx512.c: Re-generated.
4313         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4314         * features/i386/x32-avx.c: Re-generated.
4315         * features/i386/x32-avx-linux.c: Re-generated.
4316         * features/i386/x32.c: Re-generated.
4317         * features/i386/x32-linux.c: Re-generated.
4318         * features/microblaze.c: Re-generated.
4319         * features/microblaze-with-stack-protect.c: Re-generated.
4320         * features/mips64-dsp-linux.c: Re-generated.
4321         * features/mips64-linux.c: Re-generated.
4322         * features/mips-dsp-linux.c: Re-generated.
4323         * features/mips-linux.c: Re-generated.
4324         * features/nds32.c: Re-generated.
4325         * features/nios2.c: Re-generated.
4326         * features/nios2-linux.c: Re-generated.
4327         * features/rs6000/powerpc-32.c: Re-generated.
4328         * features/rs6000/powerpc-32l.c: Re-generated.
4329         * features/rs6000/powerpc-403.c: Re-generated.
4330         * features/rs6000/powerpc-403gc.c : Re-generated.
4331         * features/rs6000/powerpc-405.c: Re-generated.
4332         * features/rs6000/powerpc-505.c: Re-generated.
4333         * features/rs6000/powerpc-601.c: Re-generated.
4334         * features/rs6000/powerpc-602.c: Re-generated.
4335         * features/rs6000/powerpc-603.c: Re-generated.
4336         * features/rs6000/powerpc-604.c: Re-generated.
4337         * features/rs6000/powerpc-64.c: Re-generated.
4338         * features/rs6000/powerpc-64l.c: Re-generated.
4339         * features/rs6000/powerpc-7400.c: Re-generated.
4340         * features/rs6000/powerpc-750.c: Re-generated.
4341         * features/rs6000/powerpc-860.c: Re-generated.
4342         * features/rs6000/powerpc-altivec32.c: Re-generated.
4343         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4344         * features/rs6000/powerpc-altivec64.c: Re-generated.
4345         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4346         * features/rs6000/powerpc-cell32l.c: Re-generated.
4347         * features/rs6000/powerpc-cell64l.c: Re-generated.
4348         * features/rs6000/powerpc-e500.c: Re-generated.
4349         * features/rs6000/powerpc-e500l.c: Re-generated.
4350         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4351         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4352         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4353         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4354         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4355         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4356         * features/rs6000/powerpc-vsx32.c: Re-generated.
4357         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4358         * features/rs6000/powerpc-vsx64.c: Re-generated.
4359         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4360         * features/rs6000/rs6000.c: Re-generated.
4361         * features/s390-linux32.c: Re-generated.
4362         * features/s390-linux32v1.c: Re-generated.
4363         * features/s390-linux32v2.c: Re-generated.
4364         * features/s390-linux64.c: Re-generated.
4365         * features/s390-linux64v1.c: Re-generated.
4366         * features/s390-linux64v2.c: Re-generated.
4367         * features/s390-te-linux64.c: Re-generated.
4368         * features/s390-tevx-linux64.c: Re-generated.
4369         * features/s390-vx-linux64.c: Re-generated.
4370         * features/s390x-linux64.c: Re-generated.
4371         * features/s390x-linux64v1.c: Re-generated.
4372         * features/s390x-linux64v2.c: Re-generated.
4373         * features/s390x-te-linux64.c: Re-generated.
4374         * features/s390x-tevx-linux64.c: Re-generated.
4375         * features/s390x-vx-linux64.c: Re-generated.
4376         * features/sparc/sparc32-solaris.c: Re-generated.
4377         * features/sparc/sparc64-solaris.c: Re-generated.
4378         * features/tic6x-c62x.c: Re-generated.
4379         * features/tic6x-c62x-linux.c: Re-generated.
4380         * features/tic6x-c64x.c: Re-generated.
4381         * features/tic6x-c64x-linux.c: Re-generated.
4382         * features/tic6x-c64xp.c: Re-generated.
4383         * features/tic6x-c64xp-linux.c: Re-generated.
4384
4385 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4386
4387         * i386-linux-tdep.c (i386_linux_read_description): New function.
4388         (i386_linux_core_read_description): Call
4389         i386_linux_read_description.
4390         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4391         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4392         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4393         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4394         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4395         * x86-linux-nat.c (x86_linux_read_description): Call
4396         i386_linux_read_description.
4397
4398 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4399
4400         * NEWS: Mention it.
4401         * features/Makefile (%.c: %.xml): Pass the xml file name to
4402         command "maint print c-tdesc".
4403         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4404         name from 'arg'.
4405
4406 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4407
4408         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4409         in-class initialization.
4410         (tdesc_create_feature): Call new instead of XCNEW.
4411         (free_target_description): Ue delete.
4412
4413 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4414
4415         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4416
4417 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4418
4419         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4420         constant.
4421         (amd64_x32_init_abi): Likewise.
4422         * amd64-tdep.h (amd64_init_abi): Update declaration.
4423         (amd64_x32_init_abi): Likewise.
4424
4425 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4426
4427         PR tdep/21717
4428         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4429         condition for FPSCR.
4430         (arm_linux_store_inferior_registers): Likewise.
4431
4432 2017-07-22  Tom Tromey  <tom@tromey.com>
4433
4434         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4435         <syscalls_counts>: Now a std::vector.
4436         (get_catch_syscall_inferior_data): Use "new".
4437         (catch_syscall_inferior_data_cleanup): Use "delete".
4438         (insert_catch_syscall, remove_catch_syscall)
4439         (clear_syscall_counts): Update.
4440
4441 2017-07-22  Tom Tromey  <tom@tromey.com>
4442
4443         * break-catch-syscall.c (syscall_catchpoint)
4444         <syscalls_to_be_caught>: Now a std::vector<int>
4445         (~syscall_catchpoint): Remove.
4446         (insert_catch_syscall, remove_catch_syscall)
4447         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4448         (print_mention_catch_syscall, print_recreate_catch_syscall):
4449         Update.
4450         (create_syscall_event_catchpoint): Change type of "filter"
4451         parameter.
4452         (catch_syscall_split_args): Return a std::vector.
4453         (catch_syscall_command_1, catching_syscall_number_1): Update.
4454
4455 2017-07-22  Tom Tromey  <tom@tromey.com>
4456
4457         * break-catch-throw.c (struct exception_catchpoint)
4458         <exception_rx>: Now a std::string.
4459         (~exception_catchpoint): Remove.
4460         (print_one_detail_exception_catchpoint): Update.
4461         (handle_gnu_v3_exceptions): Change type of except_rx.
4462         (extract_exception_regexp): Return a std::string.
4463         (catch_exception_command_1): Update.
4464
4465 2017-07-22  Tom Tromey  <tom@tromey.com>
4466
4467         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4468         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4469         std::vector.
4470         <catch_all>: Now a bool.
4471         (~signal_catchpoint): Remove.
4472         (signal_catchpoint_insert_location)
4473         (signal_catchpoint_remove_location)
4474         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4475         (signal_catchpoint_print_mention)
4476         (signal_catchpoint_print_recreate)
4477         (signal_catchpoint_explains_signal): Update.
4478         (create_signal_catchpoint): Change type of "filter" and
4479         "catch_all".
4480         (catch_signal_split_args): Return a std::vector.  Change type of
4481         "catch_all".
4482         (catch_signal_command): Update.
4483
4484 2017-07-20  Pedro Alves  <palves@redhat.com>
4485
4486         * ada-lang.c (ada_language_defn): Make extern.
4487         (_initialize_ada_language): Remove add_language call.
4488         * c-lang.c (c_language_defn, cplus_language_defn)
4489         (asm_language_defn, minimal_language_defn): Make extern.
4490         (_initialize_c_language): Delete.
4491         * completer.c (compare_cstrings): Delete, moved to utils.h.
4492         * d-lang.c (d_language_defn): Make extern.
4493         (_initialize_d_language): Remove add_language calls.
4494         * defs.h (enum language): Add comment.
4495         * f-lang.c (f_language_defn): Make extern.
4496         (_initialize_f_language): Remove add_language call.
4497         * go-lang.c (go_language_defn): Make extern.
4498         (_initialize_go_language): Remove add_language call.
4499         * language.c: Include <algorithm>.
4500         (languages): Redefine as const array.
4501         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4502         (set_language_command): Handle "local".  Use for-range loop.
4503         (set_language): Remove loop.
4504         (language_enum): Rewrite.
4505         (language_def, language_str): Remove loops.
4506         (add_language): Delete.
4507         (add_set_language_command): New, based on add_languages.
4508         (skip_language_trampoline): Adjust.
4509         (local_language_defn): Delete.
4510         (language_gdbarch_post_init): Adjust.
4511         (_initialize_language): Remove add_language calls.  Call
4512         add_set_language_command.
4513         * language.h (add_language): Delete.
4514         (auto_language_defn)
4515         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4516         (asm_language_defn, c_language_defn, cplus_language_defn)
4517         (d_language_defn, f_language_defn, go_language_defn)
4518         (m2_language_defn, objc_language_defn, opencl_language_defn)
4519         (pascal_language_defn, rust_language_defn): Declare.
4520         * m2-lang.c (m2_language_defn): Make extern.
4521         (_initialize_m2_language): Remove add_language call.
4522         * objc-lang.c (objc_language_defn): Make extern.
4523         (_initialize_objc_language): Remove add_language call.
4524         * opencl-lang.c (opencl_language_defn): Make extern.
4525         (_initialize_opencl_language): Remove add_language call.
4526         * p-lang.c (pascal_language_defn): Make extern.
4527         (_initialize_pascal_language): Delete.
4528         * rust-lang.c (rust_language_defn): Make extern.
4529         (_initialize_rust_language): Delete.
4530         * utils.h (compare_cstrings): New static inline function.
4531
4532 2017-07-20  Pedro Alves  <palves@redhat.com>
4533
4534         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4535         (get_var_value): Constify parameters.
4536         (get_int_var_value): Change prototype.
4537         (to_fixed_range_type): Adjust.
4538         * ada-lang.h (get_int_var_value): Change prototype.
4539
4540 2017-07-20  Pedro Alves  <palves@redhat.com>
4541
4542         * dwarf2read.c (dw2_lookup_symbol): Use
4543         SYMBOL_MATCHES_SEARCH_NAME.
4544         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4545
4546 2017-07-20  Pedro Alves  <palves@redhat.com>
4547
4548         * block.c (block_iter_name_step, block_iter_name_first)
4549         (block_iter_name_next): Delete.
4550         (block_lookup_symbol_primary): Adjust to use
4551         dict_iter_match_first/dict_iter_match_next.
4552         * block.h (block_iter_name_first, block_iter_name_next): Delete
4553         declarations.
4554         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4555         dict_iter_match_first/dict_iter_match_next.
4556
4557 2017-07-20  Pedro Alves  <palves@redhat.com>
4558
4559         * cp-support.c (cp_find_first_component_aux): Add missing case for
4560         end of string.
4561
4562 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4563
4564         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4565         of dwo_cu's dwo_file.
4566
4567 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4568
4569         * remote.c (store_registers_using_G): Remove one line comment.
4570
4571 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4572
4573         * regcache.c (regcache_cpy): Simplify it.
4574         (regcache::cpy_no_passthrough): Remove it.
4575         * regcache.h (cpy_no_passthrough): Remove it.
4576         (regcache_dup, regcache_cpy): Update comments.
4577
4578 2017-07-18  Pedro Alves  <palves@redhat.com>
4579
4580         * remote-sim.c (sim_command_completer): Adjust to work with a
4581         completion_tracker instead of a VEC.
4582
4583 2017-07-17  Pedro Alves  <palves@redhat.com>
4584
4585         * completer.c (complete_source_filenames): New function.
4586         (complete_address_and_linespec_locations): New function.
4587         (location_completer): Use complete_address_and_linespec_locations.
4588         (completion_tracker::build_completion_result): Honor the tracker's
4589         request to suppress append.
4590         * completer.h (completion_tracker::suppress_append_ws)
4591         (completion_tracker::set_suppress_append_ws): New methods.
4592         (completion_tracker::m_suppress_append_ws): New field.
4593         (complete_source_filenames): New declaration.
4594         * linespec.c (linespec_complete_what): New.
4595         (struct ls_parser) <complete_what, completion_word,
4596         completion_quote_char, completion_quote_end, completion_tracker>:
4597         New fields.
4598         (string_find_incomplete_keyword_at_end): New.
4599         (linespec_lexer_lex_string): Record quote char.  If in completion
4600         mode, don't throw.
4601         (linespec_lexer_consume_token): Advance the completion word point.
4602         (linespec_lexer_peek_token): Save/restore completion info.
4603         (save_stream_and_consume_token): New.
4604         (set_completion_after_number): New.
4605         (linespec_parse_basic): Set what to complete next depending on
4606         token.  Handle function and label completions specially.
4607         (parse_linespec): Disable objc shortcut in completion mode.  Set
4608         what to complete next depending on token type.  Skip keyword if in
4609         completion mode.
4610         (complete_linespec_component, linespec_complete): New.
4611         * linespec.h (linespec_complete): Declare.
4612
4613 2017-07-17  Pedro Alves  <palves@redhat.com>
4614
4615         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4616         Handle 'operator<' / 'operator<<'.
4617
4618 2017-07-17  Pedro Alves  <palves@redhat.com>
4619
4620         * completer.c (collect_explicit_location_matches): Handle
4621         MATCH_LABEL.
4622         (convert_explicit_location_to_linespec): New, factored out from
4623         ...
4624         (convert_explicit_location_to_sals): ... this.
4625         (complete_label): New.
4626         (linespec_complete_label, find_label_symbols_in_block): New.
4627         (find_label_symbols): Add completion_mode parameter and adjust to
4628         call find_label_symbols_in_block.
4629         * linespec.h (linespec_complete_label): Declare.
4630
4631 2017-07-17  Pedro Alves  <palves@redhat.com>
4632
4633         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4634         complete_symbol_mode parameter.
4635         * cli/cli-cmds.c (complete_command): Get the completion result out
4636         of the handle_brkchars tracker if used a custom word point.
4637         * completer.c: Include "linespec.h".
4638         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4639         (advance_to_expression_complete_word_point): New.
4640         (completion_tracker::completes_to_completion_word): New.
4641         (complete_files_symbols): Pass down
4642         complete_symbol_mode::EXPRESSION.
4643         (explicit_options, probe_options): New.
4644         (collect_explicit_location_matches): Complete on the
4645         explictit_loc->foo instead of word.  Use
4646         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4647         keyword and options completions.
4648         (backup_text_ptr): Delete.
4649         (skip_keyword): New.
4650         (complete_explicit_location): Remove 'word' parameter.  Add
4651         language, quoted_arg_start and quoted_arg_end parameters.
4652         Rewrite, parsing left to right.
4653         (location_completer): Rewrite.
4654         (location_completer_handle_brkchars): New function.
4655         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4656         (enum complete_line_internal_reason): Adjust comments.
4657         (completion_tracker::discard_completions): New.
4658         (completer_handle_brkchars_func_for_completer): Handle
4659         location_completer.
4660         (gdb_custom_word_point_brkchars)
4661         (gdb_org_rl_basic_quote_characters): New.
4662         (gdb_completion_word_break_characters_throw)
4663         (completion_find_completion_word): Handle trackers that use a
4664         custom word point.
4665         (completion_tracker::advance_custom_word_point_by): New.
4666         (completion_tracker::build_completion_result): Don't rely on
4667         readline appending the quote char.
4668         (gdb_rl_attempted_completion_function_throw): Handle trackers that
4669         use a custom word point.
4670         (gdb_rl_attempted_completion_function): Restore
4671         rl_basic_quote_characters.
4672         * completer.h (class completion_tracker): Extend intro comment.
4673         (completion_tracker::set_quote_char)
4674         (completion_tracker::quote_char)
4675         (completion_tracker::set_use_custom_word_point)
4676         (completion_tracker::use_custom_word_point)
4677         (completion_tracker::custom_word_point)
4678         (completion_tracker::set_custom_word_point)
4679         (completion_tracker::advance_custom_word_point_by)
4680         (completion_tracker::completes_to_completion_word)
4681         (completion_tracker::discard_completions): New methods.
4682         (completion_tracker::m_quote_char)
4683         (completion_tracker::m_use_custom_word_point)
4684         (completion_tracker::m_custom_word_point): New fields.
4685         (advance_to_expression_complete_word_point): Declare.
4686         * f-lang.c (f_collect_symbol_completion_matches): Add
4687         complete_symbol_mode parameter.
4688         * language.h (struct language_defn)
4689         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4690         parameter.
4691         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
4692         (linespec_complete_function): New function.
4693         (linespec_lexer_lex_keyword): Adjust.
4694         * linespec.h (linespec_keywords, linespec_complete_function): New
4695         declarations.
4696         * location.c (find_end_quote): New function.
4697         (explicit_location_lex_one): Add explicit_completion_info
4698         parameter.  Save quoting info.  Don't throw if being called for
4699         completion.  Don't handle Ada operators here.
4700         (is_cp_operator, skip_op_false_positives, first_of)
4701         (explicit_location_lex_one_function): New function.
4702         (string_to_explicit_location): Replace 'dont_throw' parameter with
4703         an explicit_completion_info pointer parameter.  Handle it.  Don't
4704         use explicit_location_lex_one to lex function names.  Use
4705         explicit_location_lex_one_function instead.
4706         * location.h (struct explicit_completion_info): New.
4707         (string_to_explicit_location): Replace 'dont_throw' parameter with
4708         an explicit_completion_info pointer parameter.
4709         * symtab.c (default_collect_symbol_completion_matches_break_on):
4710         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
4711         (default_collect_symbol_completion_matches)
4712         (collect_symbol_completion_matches): Add complete_symbol_mode
4713         parameter.
4714         (collect_symbol_completion_matches_type): Pass down
4715         complete_symbol_mode::EXPRESSION.
4716         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4717         parameter.  Handle LINESPEC mode.
4718         * symtab.h (complete_symbol_mode): New.
4719         (default_collect_symbol_completion_matches_break_on)
4720         (default_collect_symbol_completion_matches)
4721         (collect_symbol_completion_matches)
4722         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4723         parameter.
4724
4725 2017-07-17  Pedro Alves  <palves@redhat.com>
4726
4727         * utils.c (enum class strncmp_iw_mode): New.
4728         (strcmp_iw): Rename to ...
4729         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
4730         parameters.  Handle them.
4731         (strncmp_iw): New.
4732         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4733         * utils.h (strncmp_iw): Declare.
4734         (strcmp_iw): Move describing comments here.
4735
4736 2017-07-17  Pedro Alves  <palves@redhat.com>
4737
4738         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4739         CP_OPERATOR_STR.
4740         * c-typeprint.c (is_type_conversion_operator): Use
4741         CP_OPERATOR_STR.
4742         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4743         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4744         CP_OPERATOR_LEN.
4745         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4746         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4747         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4748         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4749         CP_OPERATOR_STR.
4750         * location.c: Include "cp-support.h".
4751         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4752         CP_OPERATOR_STR.
4753         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4754         CP_OPERATOR_LEN.
4755
4756 2017-07-17  Pedro Alves  <palves@redhat.com>
4757
4758         * cli/cli-cmds.c (complete_command): Use a completion tracker
4759         along with completion_find_completion_word for handle_brkchars
4760         phase.
4761         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4762         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4763         (struct gdb_rl_completion_word_info): New.
4764         (gdb_rl_find_completion_word): New.
4765         (completion_find_completion_word): New.
4766         * completer.h (completion_find_completion_word): Declare.
4767
4768 2017-07-17  Pedro Alves  <palves@redhat.com>
4769
4770         * ada-lang.c (symbol_completion_match): Adjust comments.
4771         (symbol_completion_add): Replace vector parameter with
4772         completion_tracker parameter.  Use it.
4773         (ada_make_symbol_completion_list): Rename to...
4774         (ada_collect_symbol_completion_matches): ... this.  Add
4775         completion_tracker parameter and use it.
4776         (ada_language_defn): Adjust.
4777         * break-catch-syscall.c (catch_syscall_completer): Adjust
4778         prototype and work with completion_tracker instead of VEC.
4779         * breakpoint.c (condition_completer): Adjust prototype and work
4780         with completion_tracker instead of VEC.
4781         * c-lang.c (c_language_defn, cplus_language_defn)
4782         (asm_language_defn, minimal_language_defn): Adjust to renames.
4783         * cli/cli-cmds.c (complete_command): Rework using
4784         completion_tracker.  Catch exceptions when completing.
4785         * cli/cli-decode.c (integer_unlimited_completer)
4786         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4787         with completion_tracker instead of VEC.
4788         * command.h (struct completion_tracker): Forward declare.
4789         (completer_ftype, completer_handle_brkchars_ftype): Change
4790         types.
4791         (complete_on_cmdlist, complete_on_enum): Adjust.
4792         * completer.c: Include <algorithm>.
4793         (struct gdb_completer_state): New.
4794         (current_completion): New global.
4795         (readline_line_completion_function): Delete.
4796         (noop_completer, filename_completer)
4797         (filename_completer_handle_brkchars, complete_files_symbols)
4798         (linespec_location_completer): Adjust to work with a
4799         completion_tracker instead of a VEC.
4800         (string_or_empty): New.
4801         (collect_explicit_location_matches): Adjust to work with a
4802         completion_tracker instead of a VEC.
4803         (explicit_location_completer): Rename to ...
4804         (complete_explicit_location): ... this and adjust to work with a
4805         completion_tracker instead of a VEC.
4806         (location_completer): Adjust to work with a completion_tracker
4807         instead of a VEC.
4808         (add_struct_fields): Adjust to work with a completion_list instead
4809         of VEC.
4810         (expression_completer): Rename to ...
4811         (complete_expression): ... this and adjust to work with a
4812         completion_tracker instead of a VEC.  Use complete_files_symbols.
4813         (expression_completer): Reimplement on top of complete_expression.
4814         (symbol_completer): Adjust to work with a completion_tracker
4815         instead of a VEC.
4816         (enum complete_line_internal_reason): Add describing comments.
4817         (complete_line_internal_normal_command): Adjust to work with a
4818         completion_tracker instead of a VEC.
4819         (complete_line_internal): Rename to ...
4820         (complete_line_internal_1): ... this and adjust to work with a
4821         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4822         handle_brkchars phase.
4823         (new_completion_tracker): Delete.
4824         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4825         complete_line_internal_1.
4826         (free_completion_tracker): Delete.
4827         (INITIAL_COMPLETION_HTAB_SIZE): New.
4828         (completion_tracker::completion_tracker)
4829         (completion_tracker::~completion_tracker): New.
4830         (maybe_add_completion): Delete.
4831         (completion_tracker::maybe_add_completion)
4832         (completion_tracker::add_completion)
4833         (completion_tracker::add_completions): New.
4834         (throw_max_completions_reached_error): Delete.
4835         (complete_line): Adjust to work with a completion_tracker instead
4836         of a VEC.  Don't create a completion_tracker_t or check for max
4837         completions here.
4838         (command_completer, command_completer_handle_brkchars)
4839         (signal_completer, reg_or_group_completer_1)
4840         (reg_or_group_completer, default_completer_handle_brkchars):
4841         Adjust to work with a completion_tracker.
4842         (gdb_completion_word_break_characters_throw): New.
4843         (gdb_completion_word_break_characters): Reimplement.
4844         (line_completion_function): Delete.
4845         (completion_tracker::recompute_lowest_common_denominator)
4846         (expand_preserving_ws)
4847         (completion_tracker::build_completion_result)
4848         (completion_result::completion_result)
4849         (completion_result::completion_result)
4850         (completion_result::~completion_result)
4851         (completion_result::completion_result)
4852         (completion_result::release_match_list, compare_cstrings)
4853         (completion_result::sort_match_list)
4854         (completion_result::reset_match_list)
4855         (gdb_rl_attempted_completion_function_throw)
4856         (gdb_rl_attempted_completion_function): New.
4857         * completer.h (completion_list, struct completion_result)
4858         (class completion_tracker): New.
4859         (complete_line): Add completion_tracker parameter.
4860         (readline_line_completion_function): Delete.
4861         (gdb_rl_attempted_completion_function): New.
4862         (noop_completer, filename_completer, expression_completer)
4863         (location_completer, symbol_completer, command_completer)
4864         (signal_completer, reg_or_group_completer): Update prototypes.
4865         (completion_tracker_t, new_completion_tracker)
4866         (make_cleanup_free_completion_tracker): Delete.
4867         (enum maybe_add_completion_enum): Delete.
4868         (maybe_add_completion): Delete.
4869         (throw_max_completions_reached_error): Delete.
4870         * corefile.c (complete_set_gnutarget): Adjust to work with a
4871         completion_tracker instead of a VEC.
4872         * cp-abi.c (cp_abi_completer): Adjust to work with a
4873         completion_tracker instead of a VEC.
4874         * d-lang.c (d_language_defn): Adjust.
4875         * disasm.c (disassembler_options_completer): Adjust to work with a
4876         completion_tracker instead of a VEC.
4877         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4878         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4879         with a completion_tracker instead of a VEC.
4880         (f_language_defn): Adjust.
4881         * go-lang.c (go_language_defn): Adjust.
4882         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4883         Adjust to work with a completion_tracker instead of a VEC.
4884         * infrun.c (handle_completer): Likewise.
4885         * interps.c (interpreter_completer): Likewise.
4886         * interps.h (interpreter_completer): Likewise.
4887         * language.c (unknown_language_defn, auto_language_defn)
4888         (local_language_defn): Adjust.
4889         * language.h (language_defn::la_make_symbol_completion_list):
4890         Rename to ...
4891         (language_defn::la_collect_symbol_completion_matches): ... this
4892         and adjust to work with a completion_tracker instead of a VEC.
4893         * m2-lang.c (m2_language_defn): Adjust.
4894         * objc-lang.c (objc_language_defn): Adjust.
4895         * opencl-lang.c (opencl_language_defn): Adjust.
4896         * p-lang.c (pascal_language_defn): Adjust.
4897         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4898         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4899         with a completion_tracker.
4900         * rust-lang.c (rust_language_defn): Adjust.
4901         * symtab.c (free_completion_list, do_free_completion_list)
4902         (return_val, completion_tracker): Delete.
4903         (completion_list_add_name, completion_list_add_symbol)
4904         (completion_list_add_msymbol, completion_list_objc_symbol)
4905         (completion_list_add_fields, add_symtab_completions): Add
4906         completion_tracker parameter and use it.
4907         (default_make_symbol_completion_list_break_on_1): Rename to...
4908         (default_collect_symbol_completion_matches_break_on): ... this.
4909         Add completion_tracker parameter and use it instead of allocating
4910         a completion tracker here.
4911         (default_make_symbol_completion_list_break_on): Delete old
4912         implementation.
4913         (default_make_symbol_completion_list): Delete.
4914         (default_collect_symbol_completion_matches): New.
4915         (make_symbol_completion_list): Delete.
4916         (collect_symbol_completion_matches): New.
4917         (make_symbol_completion_type): Rename to ...
4918         (collect_symbol_completion_matches_type): ... this.  Add
4919         completion_tracker parameter and use it instead of VEC.
4920         (make_file_symbol_completion_list_1): Rename to...
4921         (collect_file_symbol_completion_matches): ... this.  Add
4922         completion_tracker parameter and use it instead of VEC.
4923         (make_file_symbol_completion_list): Delete.
4924         (add_filename_to_list): Use completion_list instead of a VEC.
4925         (add_partial_filename_data::list): Now a completion_list.
4926         (make_source_files_completion_list): Work with a completion_list
4927         instead of a VEC.
4928         * symtab.h: Include "completer.h".
4929         (default_make_symbol_completion_list_break_on)
4930         (default_make_symbol_completion_list, make_symbol_completion_list)
4931         (make_symbol_completion_type, make_file_symbol_completion_list)
4932         (make_source_files_completion_list): Delete.
4933         (default_collect_symbol_completion_matches_break_on)
4934         (default_collect_symbol_completion_matches)
4935         (collect_symbol_completion_matches)
4936         (collect_symbol_completion_matches_type)
4937         (collect_file_symbol_completion_matches)
4938         (make_source_files_completion_list): New.
4939         * top.c (init_main): Don't install a rl_completion_entry_function
4940         hook.  Install a rl_attempted_completion_function hook instead.
4941         * tui/tui-layout.c (layout_completer): Adjust to work with a
4942         completion_tracker.
4943         * tui/tui-regs.c (tui_reggroup_completer):
4944         * tui/tui-win.c (window_name_completer, focus_completer)
4945         (winheight_completer): Adjust to work with a completion_tracker.
4946         * value.c: Include "completer.h".
4947         (complete_internalvar): Adjust to work with a completion_tracker.
4948         * value.h (complete_internalvar): Likewise.
4949
4950 2017-07-17  Pedro Alves  <palves@redhat.com>
4951
4952         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4953         renames.
4954         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4955         comments to completer_ftype's declaration.
4956         <completer_handle_brkchars>: Change type to
4957         completer_handle_brkchars_ftype.
4958         * command.h (completer_ftype): Add describing comment and give
4959         names to parameters.
4960         (completer_ftype_void): Rename to ...
4961         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4962         (set_cmd_completer_handle_brkchars): Adjust.
4963         * completer.c (filename_completer_handle_brkchars): New function.
4964         (complete_line_internal_normal_command): New function, factored
4965         out from ...
4966         (complete_line_internal): ... here.
4967         (command_completer_handle_brkchars)
4968         (default_completer_handle_brkchars)
4969         (completer_handle_brkchars_func_for_completer): New functions.
4970         * completer.h (set_gdb_completion_word_break_characters): Delete
4971         declaration.
4972         (completer_handle_brkchars_func_for_completer): New declaration.
4973         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4974         completer_handle_brkchars_func_for_completer.
4975
4976 2017-07-17  Pedro Alves  <palves@redhat.com>
4977
4978         * completer.c (symbol_completer): New function, based on
4979         make_symbol_completion_list_fn.
4980         * completer.h (symbol_completer): New declaration.
4981         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4982         * python/py-cmd.c (completers): Adjust.
4983         * symtab.c (make_symbol_completion_list_fn): Delete.
4984         * symtab.h (make_symbol_completion_list_fn): Delete.
4985         * cli/cli-decode.c (add_cmd): Adjust.
4986
4987 2017-07-17  Pedro Alves  <palves@redhat.com>
4988
4989         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4990         * dwarf2read.c: Include "filename-seen-cache.h".
4991         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4992         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4993         * filename-seen-cache.c: New file.
4994         * filename-seen-cache.h: New file.
4995         * symtab.c: Include "filename-seen-cache.h".
4996         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4997         (create_filename_seen_cache, clear_filename_seen_cache)
4998         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4999         to filename-seen-cache.h/filename-seen-cache.c.
5000         (output_source_filename, sources_info)
5001         (maybe_add_partial_symtab_filename)
5002         (make_source_files_completion_list): Adjust to use
5003         filename_seen_cache.
5004
5005 2017-07-17  Pedro Alves  <palves@redhat.com>
5006
5007         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5008         fields.
5009         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5010         dwarf2_debug_sections*)): New.
5011         (dwarf2_per_objfile::dwarf2_per_objfile(const
5012         dwarf2_per_objfile&)): Declare as deleted.
5013         (dwarf2_per_objfile::operator=): Declare as deleted.
5014         (dwarf2_per_objfile::dwarf2_per_objfile)
5015         (dwarf2_per_objfile::~dwarf2_per_objfile)
5016         (dwarf2_per_objfile::free_cached_comp_units): New.
5017         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5018         ctor.  Call dwarf2_per_objfile's ctor manually.
5019         (dwarf2_locate_sections): Deleted/refactored as ...
5020         (dwarf2_per_objfile::locate_sections): ... this new method.
5021         (free_cached_comp_units): Defer to
5022         dwarf2_per_objfile::free_cached_comp_units.
5023         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5024
5025 2017-07-14  Tom Tromey  <tom@tromey.com>
5026
5027         PR rust/21764:
5028         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5029         parameter.
5030         <UNOP_SIZEOF>: Split into separate case.
5031         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5032
5033 2017-07-14  Tom Tromey  <tom@tromey.com>
5034
5035         PR rust/21763:
5036         * symtab.c (symbol_matches_domain): Add language_rust to special
5037         case.
5038         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5039         treat LOC_TYPEDEF symbols as variables.
5040
5041 2017-07-14  Pedro Alves  <palves@redhat.com>
5042
5043         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5044         symtabs matching all symtabs with SRCFILE as file name instead of
5045         only considering the first hit, with lookup_symtab.
5046
5047 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5048
5049         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5050         operator_name parameters.
5051         (gen_expr): Update function call.
5052
5053 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5054
5055         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5056         parameter.
5057         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5058         Likewise.
5059         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5060         parameter, use agent_expr::gdbarch instead, update function
5061         calls.
5062         (locexpr_tracepoint_var_ref): Likewise.
5063         (loclist_tracepoint_var_ref): Likewise.
5064         * ax-gdb.c (gen_trace_static_fields): Likewise.
5065         (gen_traced_pop): Likewise.
5066         (gen_frame_args_address): Likewise.
5067         (gen_frame_locals_address): Likewise.
5068         (gen_var_ref): Likewise.
5069         (gen_struct_ref_recursive): Likewise.
5070         (gen_static_field): Likewise.
5071         (gen_maybe_namespace_elt): Likewise.
5072         (gen_expr): Likewise.
5073         (gen_trace_for_var): Likewise.
5074         (gen_trace_for_expr): Likewise.
5075         (gen_trace_for_return_address): Likewise.
5076
5077 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5080         parameter.
5081         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5082
5083 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5084
5085         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5086         from ax, update calls.
5087         (gen_usual_arithmetic): Likewise.
5088         (gen_integral_promotions): Likewise.
5089         (gen_bitfield_ref): Likewise.
5090         (gen_primitive_field): Likewise.
5091         (gen_struct_ref_recursive): Likewise.
5092         (gen_struct_ref): Likewise.
5093         (gen_maybe_namespace_elt): Likewise.
5094         (gen_struct_elt_for_reference): Likewise.
5095         (gen_namespace_elt): Likewise.
5096         (gen_aggregate_elt_ref): Likewise.
5097         (gen_expr): Get gdbarch from ax, update calls.
5098         (gen_expr_binop_rest): Likewise.
5099
5100 2017-07-13  Pedro Alves  <palves@redhat.com>
5101
5102         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5103         as default tdesc.
5104         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5105         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5106         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5107         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5108         tdep.
5109         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5110         Get final tdesc from the tdep.
5111         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5112         default tdesc.
5113         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5114         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5115         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5116         Use it as default tdesc.
5117         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5118         down to amd_init_abi.  No longer handle fallback tdesc here.
5119         * amd64-tdep.h (tdesc_x32): Declare.
5120         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5121         parameter.
5122         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5123         as default tdesc.
5124
5125 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5126
5127         * s390-linux-tdep.c (s390_process_record): Add support for
5128         instructions new in arch12.
5129
5130 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5131
5132         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5133         PT_GETFSBASE and PT_GETGSBASE.
5134         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5135         PT_SETGSBASE.
5136
5137 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5138
5139         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5140         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5141         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5142         those rules.
5143         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5144         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5145         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5146         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5147         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5148         * features/i386/amd64.xml: Add 64bit-segments.xml.
5149         * features/i386/amd64-avx-avx512.c: Regenerated.
5150         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5151         * features/i386/amd64-avx-mpx.c: Regenerated.
5152         * features/i386/amd64-avx.c: Regenerated.
5153         * features/i386/amd64-mpx.c: Regenerated.
5154         * features/i386/amd64.c: Regenerated.
5155         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5156         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5157         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5158         * regformats/i386/amd64-avx.dat: Regenerated.
5159         * regformats/i386/amd64-mpx.dat: Regenerated.
5160         * regformats/i386/amd64.dat: Regenerated.
5161
5162 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5163
5164         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5165         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5166
5167 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5168
5169         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5170         unsetenv.
5171         * gnulib/aclocal.m4: Regenerate.
5172         * gnulib/config.in: Regenerate.
5173         * gnulib/configure: Regenerate.
5174         * gnulib/import/Makefile.am: Regenerate.
5175         * gnulib/import/Makefile.in: Regenerate.
5176         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5177         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5178         * gnulib/import/m4/environ.m4: New file.
5179         * gnulib/import/m4/setenv.m4: New file.
5180         * gnulib/import/setenv.c: New file.
5181         * gnulib/import/unsetenv.c: New file.
5182
5183 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5184
5185         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5186         address when op is DW_OP_addr.
5187
5188 2017-07-09  Tom Tromey  <tom@tromey.com>
5189
5190         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5191         check and apply to outer type.
5192
5193 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5194
5195         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5196         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5197         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5198         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5199
5200 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5201
5202         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5203
5204 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5205
5206         * corelow.c (get_core_siginfo): Remove.
5207         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5208         instead of get_core_siginfo.
5209         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5210         * gdbarch.h: Re-generate.
5211         * gdbarch.c: Re-generate.
5212         * linux-tdep.c (linux_core_xfer_siginfo): New.
5213         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5214
5215 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5216
5217         * corelow.c (thread_section_name): Move to ...
5218         * gdbcore.h (thread_section_name): ... here.
5219
5220 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5221
5222         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5223         (struct siginfo32): New.
5224         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5225         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5226         via ptrace(PT_LWPINFO).
5227
5228 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5229
5230         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5231         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5232         (fbsd_get_siginfo_type): New.
5233         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5234         (_initialize_fbsd_tdep): New.
5235
5236 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5237
5238         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5239         a singular dwo_unit*) to support multiple CUs in the same way that
5240         multiple TUs are supported.
5241         (create_cus_hash_table): Replace create_dwo_cu with a function for
5242         parsing multiple CUs from a DWO file.
5243         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5244         create_dwo_cu.
5245         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5246         htab_find, rather than comparing the signature to a singleton CU in
5247         the dwo_file.
5248
5249 2017-07-06  Pedro Alves  <palves@redhat.com>
5250
5251         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5252
5253 2017-07-04  Pedro Alves  <palves@redhat.com>
5254
5255         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5256         * gdbtypes.h (TYPE_STATIC): Delete.
5257         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5258         is_synchronized, is_native>: Delete.
5259         <dummy>: Bump.
5260         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5261         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5262         (TYPE_FN_FIELD_ABSTRACT): Delete.
5263
5264 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5265
5266         * buffer.h (buffer_finish): Fix spelling mistakes.
5267
5268 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5269
5270         * .dir-locals.el: Automatically switch to C-style comments in
5271         versions of Emacs that support the feature.
5272
5273 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5274             Pedro Alves  <palves@redhat.com>
5275
5276         PR cli/21688
5277         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5278         (process_next_line): New variable 'inline_cmd'.
5279         Adjust 'if' clauses for "python", "compile" and "guile" to use
5280         'command_name_equals' and check for '!inline_cmd'.
5281
5282 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5283
5284         PR cli/21688
5285         * cli/cli-script.c (command_name_equals_not_inline): New function.
5286         (process_next_line): Adjust 'if' clauses for "python", "compile"
5287         and "guile" to use command_name_equals_not_inline.
5288
5289 2017-06-29  Pedro Alves  <palves@redhat.com>
5290
5291         * completer.c (expression_completer): Call
5292         linespec_location_completer instead of location_completer.
5293
5294 2017-06-29  Pedro Alves  <palves@redhat.com>
5295
5296         * completer.c (expression_completer): Remove code that recomputes
5297         'text' from 'word'.
5298
5299 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5300
5301         * regformats/regdat.sh: Generate code with
5302         "ifndef IN_PROCESS_AGENT".
5303
5304 2017-06-28  Pedro Alves  <palves@redhat.com>
5305
5306         * command.h: Include "common/scoped_restore.h".
5307
5308 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5309
5310         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5311         instead of obstack_grow.
5312
5313 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5314
5315         PR gdb/21337
5316         * symfile.c (reread_symbols): Call objfiles_changed just before
5317         read_symbols.
5318
5319 2017-06-27  Pedro Alves  <palves@redhat.com>
5320
5321         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5322         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5323         (completion_list_add_symbol, completion_list_add_msymbol):
5324         ... these new functions.
5325         (add_symtab_completions)
5326         (default_make_symbol_completion_list_break_on_1): Adjust.
5327
5328 2017-06-27  Pedro Alves  <palves@redhat.com>
5329
5330         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5331         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5332         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5333         dtor.
5334         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5335         'storage_obstack' field an auto_obstack.  In-class initialize all
5336         non-bitfield fields.  Make minsyms_read bool.
5337         * symfile.c (read_symbols): Adjust.
5338
5339 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5340
5341         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5342         (gdbsim_store_register): Likewise.
5343
5344 2017-06-27  Pedro Alves  <palves@redhat.com>
5345
5346         * c-exp.y (name_obstack): Now an auto_obstack.
5347         (yylex): Use auto_obstack::clear.
5348         (c_parse): Use auto_obstack::clear instead of reinitializing and
5349         freeing the obstack.
5350         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5351         * d-exp.y (name_obstack): Now an auto_obstack.
5352         (yylex): Use auto_obstack::clear.
5353         (d_parse): Use auto_obstack::clear instead of reinitializing and
5354         freeing the obstack.
5355         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5356         auto_obstack.
5357         * dwarf2read.c (create_addrmap_from_index)
5358         (dwarf2_build_psymtabs_hard)
5359         (update_enumeration_type_from_children): Likewise.
5360         * gdb_obstack.h (auto_obstack): New type.
5361         * go-exp.y (name_obstack): Now an auto_obstack.
5362         (build_packaged_name): Use auto_obstack::clear.
5363         (go_parse): Use auto_obstack::clear instead of reinitializing and
5364         freeing the obstack.
5365         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5366         auto_obstack.
5367         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5368         * rust-exp.y (work_obstack): Now an auto_obstack.
5369         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5370         reinitializing and freeing the obstack.
5371         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5372         (host_char_to_target): Use auto_obstack.
5373         * utils.h (make_cleanup_obstack_free): Delete declaration.
5374         * valprint.c (generic_emit_char, generic_printstr): Use
5375         auto_obstack.
5376
5377 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5378
5379         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5380         thread.
5381         (darwin_init_thread_list): Don't update dummy thread.
5382         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5383
5384 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5385
5386         * record-full.c (netorder16): Remove.
5387
5388 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5389
5390         * common/diagnostics.h: Define macros for GCC.
5391         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5392         * common/vec.h: Include diagnostics.h.
5393         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5394         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5395         warning.
5396
5397 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5398
5399         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5400         New macro.
5401         * ada-lex.l: Ignore deprecated register warnings.
5402
5403 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5404
5405         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5406         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5407
5408 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5409
5410         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5411         its own line.
5412
5413 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5414
5415         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5416
5417 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5418
5419         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5420         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5421         (xtensa_register_read_masked): Likewise.
5422
5423 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5424
5425         * common/environ.c (gdb_environ::unset): Update comment.
5426
5427 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5428
5429         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5430         registers.
5431
5432 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5433
5434         * record-full.c (record_full_exec_insn): Use byte_vector.
5435
5436 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5437
5438         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5439         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5440
5441 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5442
5443         * remote.c (cached_reg): Move from here...
5444         * regcache.h (cached_reg): ...to here.
5445         * python/py-unwind.c (struct reg_info): Remove.
5446         (cached_frame_info): Use cached_reg_t.
5447         (pyuw_prev_register): Likewise.
5448         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5449         (pyuw_dealloc_cache): Free all registers.
5450
5451 2017-06-22  Pedro Alves  <palves@redhat.com>
5452             Simon Marchi  <simon.marchi@ericsson.com>
5453
5454         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5455         warning.
5456         * common/diagnostics.h: New file.
5457
5458 2017-06-22  Pedro Alves  <palves@redhat.com>
5459
5460         * common/agent.h: Add include guards.
5461
5462 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5465         talk about addressable units instead of bytes.
5466
5467 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5468
5469         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5470         of '::const_iterator'.
5471
5472 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5473
5474         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5475         'unittests/environ-selftests.c'.
5476         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5477         * charset.c (find_charset_names): Declare object 'iconv_env'.
5478         Update code to use 'iconv_env' object.  Remove call to
5479         'free_environ'.
5480         * common/environ.c: Include <utility>.
5481         (make_environ): Delete function.
5482         (free_environ): Delete function.
5483         (gdb_environ::clear): New function.
5484         (gdb_environ::operator=): New function.
5485         (gdb_environ::get): Likewise.
5486         (environ_vector): Delete function.
5487         (set_in_environ): Delete function.
5488         (gdb_environ::set): New function.
5489         (unset_in_environ): Delete function.
5490         (gdb_environ::unset): New function.
5491         (gdb_environ::envp): Likewise.
5492         * common/environ.h: Include <vector>.
5493         (struct gdb_environ): Delete; transform into...
5494         (class gdb_environ): ... this class.
5495         (free_environ): Delete prototype.
5496         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5497         environ_vector): Likewise.
5498         * infcmd.c (run_command_1): Update code to call
5499         'envp' from 'gdb_environ' class.
5500         (environment_info): Update code to call methods from 'gdb_environ'
5501         class.
5502         (unset_environment_command): Likewise.
5503         (path_info): Likewise.
5504         (path_command): Likewise.
5505         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5506         (inferior::inferior): Initialize 'environment' using the host's
5507         information.
5508         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5509         Include "environ.h".
5510         (class inferior) <environment>: Change type from 'struct
5511         gdb_environ' to 'gdb_environ'.
5512         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5513         methods from 'gdb_environ' class.
5514         * solib.c (solib_find_1): Likewise
5515         * unittests/environ-selftests.c: New file.
5516
5517 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5518
5519         * features/i386/i386-linux.xml: Exchange the order of including
5520         32bit-linux.xml and 32bit-sse.xml.
5521         * features/i386/i386-linux.c: Regenerated.
5522
5523 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5524
5525         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5526         Delete copy ctor and assignment operator.
5527         (tdesc_type): Likewise.
5528         (tdesc_feature): Likewise.
5529         (tdesc_free_reg): Remove.
5530         (tdesc_create_reg): Use new.
5531         (tdesc_free_type): Remove.
5532         (tdesc_create_vector): Use new.
5533         (tdesc_create_union): Likewise.
5534         (tdesc_create_flags): Likewise.
5535         (tdesc_create_enum): Likewise.
5536         (tdesc_free_feature): Delete.
5537         (free_target_description): Use delete.
5538
5539 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5540
5541         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5542         registers.
5543
5544 2017-06-19  Pedro Alves  <palves@redhat.com>
5545
5546         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5547         after gdb::unlinker.
5548
5549 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5550
5551         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5552         gdb_environ to access an environment variable.
5553
5554 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5555
5556         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5557         gdb_byte*.
5558
5559 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5560
5561         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5562
5563 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5564
5565         * configure: Re-generate.
5566         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5567
5568 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5569
5570         * configure: Re-generate.
5571         * warning.m4: Pass -Werror to compiler when checking for
5572         supported warning flags.
5573
5574 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5575
5576         * Makefile.in (COMPILE.pre): Add "-x c++".
5577
5578 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5579             Pedro Alves  <palves@redhat.com>
5580             Yao Qi  <yao.qi@linaro.org>
5581
5582         * defs.h (RequireLongest): New.
5583         (extract_integer): Declare function template.
5584         (extract_signed_integer): Remove the declaration, but define it
5585         static inline.
5586         (extract_unsigned_integer): Likewise.
5587         (store_integer): Declare function template.
5588         (store_signed_integer): Remove the declaration, but define it
5589         static inline.
5590         (store_unsigned_integer): Likewise.
5591         * findvar.c (extract_integer): New function template.
5592         (extract_signed_integer): Remove.
5593         (extract_unsigned_integer): Remove.
5594         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5595         instantiations.
5596         (store_integer): New function template.
5597         (store_signed_integer): Remove.
5598         (store_unsigned_integer): Remove.
5599         (store_integer): Explicit instantiations.
5600         * regcache.c (regcache_raw_read_signed): Update.
5601         (regcache::raw_read): New function.
5602         (regcache::raw_read_signed): Remove.
5603         (regcache::raw_read_unsigned): Remove.
5604         (regcache_raw_read_unsigned): Update.
5605         (regcache_raw_write_unsigned): Update.
5606         (regcache::raw_write_signed): Remove.
5607         (regcache::raw_write): New function.
5608         (regcache_cooked_read_signed): Update.
5609         (regcache::raw_write_unsigned): Remove.
5610         (regcache::cooked_read_signed): Remove.
5611         (regcache_cooked_read_unsigned): Update.
5612         (regcache::cooked_read_unsigned): Remove.
5613         (regcache_cooked_write_signed): Update.
5614         (regcache_cooked_write_unsigned): Update.
5615         * regcache.h (regcache) <raw_read_signed>: Remove.
5616         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5617         <raw_read, raw_write>: New.
5618         <cooked_read_signed, cooked_write_signed>: Remove.
5619         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5620         <cooked_read, cooked_write>: New.
5621         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5622         (sh64_pseudo_register_write): Update.
5623
5624 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5625
5626         * arc-tdep.c (arc_disassembler_options): New variable.
5627         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5628         of default_print_insn.
5629         (arc_delayed_print_insn): Set info->section when needed,
5630         use default_print_insn to retrieve a disassembler.
5631
5632 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5633
5634         PR gdb/21574
5635         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5636         to mention $SHELL and startup-with-shell.
5637
5638 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5639
5640         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5641
5642 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5643
5644         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5645         default_print_insn instead of print_insn_aarch64.
5646         * arm-tdep.c (gdb_print_insn_arm): Call
5647         default_print_insn instead of print_insn_big_arm
5648         and print_insn_little_arm.
5649         * i386-tdep.c (i386_print_insn): Call default_print_insn
5650         instead of print_insn_i386.
5651         * ia64-tdep.c (ia64_print_insn): Call
5652         default_print_insn instead of print_insn_ia64.
5653         * mips-tdep.c (gdb_print_insn_mips): Call
5654         default_print_insn instead of print_insn_big_mips
5655         and print_insn_little_mips.
5656         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5657         instead of print_insn_spu.
5658
5659 2017-06-14  Pedro Alves  <palves@redhat.com>
5660
5661         * ada-lang.c: Include "common/byte-vector.h".
5662         (ada_value_primitive_packed_val): Use gdb::byte_vector.
5663         * charset.c (wchar_iterator::iterate): Resize the vector instead
5664         of reserving it.
5665         * common/byte-vector.h: Include "common/def-vector.h".
5666         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5667         * cli/cli-dump.c: Include "common/byte-vector.h".
5668         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5669         * common/byte-vector.h: New file.
5670         * common/def-vector.h: New file.
5671         * common/default-init-alloc.h: New file.
5672         * dwarf2loc.c: Include "common/byte-vector.h".
5673         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5674         instead of reserving it.
5675         * dwarf2read.c: Include "common/byte-vector.h".
5676         (data_buf::m_vec): Now a gdb::byte_vector.
5677         * gdb_regex.c: Include "common/def-vector.h".
5678         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5679         * mi/mi-main.c: Include "common/byte-vector.h".
5680         (mi_cmd_data_read_memory): Use gdb::byte_vector.
5681         * printcmd.c: Include "common/byte-vector.h".
5682         (print_scalar_formatted): Use gdb::byte_vector.
5683         * valprint.c: Include "common/byte-vector.h".
5684         (maybe_negate_by_bytes, print_decimal_chars): Use
5685         gdb::byte_vector.
5686
5687 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5688
5689         * darwin-nat.c: Include "nat/fork-inferior.h".
5690
5691 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5692
5693         * configure.nat: Factor out Darwin bits that are not
5694         architecture-specific.  Add fork-inferior.o.
5695
5696 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5697
5698         * configure.nat: Factor out AIX bits that are not
5699         architecture-specific.  Add fork-inferior.o.
5700
5701 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5702
5703         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
5704         (read_pieced_value, write_pieced_value): ...here.  Reduce to
5705         wrappers that just call rw_pieced_value.
5706
5707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5708
5709         * dwarf2loc.c (write_pieced_value): When writing the data for a
5710         memory piece, use write_memory_with_notification instead of
5711         write_memory.
5712
5713 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5714
5715         * valops.c (read_value_memory): Change embedded_offset to
5716         represent a bit offset instead of a byte offset.
5717         * value.h (read_value_memory): Adjust comment.
5718
5719 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5720
5721         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5722         dest_offset_bits and source_offset_bits.
5723         (write_pieced_value): Likewise.
5724
5725 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5726
5727         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5728         given by DW_OP_bit_piece.
5729         (write_pieced_value): Likewise.
5730
5731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5732
5733         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5734         some other preparations to the places where sufficient information
5735         is available.
5736         (write_pieced_value): Likewise.
5737
5738 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5739
5740         * dwarf2loc.c (bits_to_bytes): New function.
5741         (read_pieced_value): Fix offset calculations for register pieces
5742         on big-endian targets.
5743         (write_pieced_value): Likewise.
5744
5745 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5746
5747         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5748         (write_pieced_value): Likewise.
5749
5750 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5751
5752         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5753         transfer the source value's least significant bits, instead of its
5754         lowest-addressed ones.  Rename type_len to max_offset.
5755         (read_pieced_value): Mirror above changes to write_pieced_value as
5756         applicable.
5757
5758 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5759
5760         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5761         truncate full bytes from dest_offset_bits before using it as an
5762         offset into the buffer.
5763
5764 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5765
5766         * dwarf2loc.c (write_pieced_value): Include transfer size in
5767         byte-wise check.
5768
5769 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5770
5771         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5772         calculation of this_size.
5773
5774 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5775
5776         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5777         when targeting a bit-field.
5778         (write_pieced_value): Likewise.
5779
5780 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5781
5782         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5783         (allocate_piece_closure): Drop addr_size parameter.
5784         (dwarf2_evaluate_loc_desc_full): Adjust call to
5785         allocate_piece_closure.
5786
5787 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5788
5789         PR gdb/21226
5790         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5791         the LSB end, independent of endianness.
5792
5793 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5794
5795         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5796         size capping.
5797
5798 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5799
5800         * mips-linux-nat.c: Move include features/mips*-linux.c to
5801         mips-linux-tdep.c.
5802         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5803         to mips-linux-tdep.c.
5804         * mips-linux-tdep.c: Include features/mips*-linux.c
5805         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5806         functions.
5807         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5808         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5809         (tdesc_mips64_dsp_linux): Declare.
5810
5811 2017-06-12  Tom Tromey  <tom@tromey.com>
5812
5813         * valprint.h (val_print_type_code_int): Remove.
5814         * valprint.c (generic_val_print_int): Always call
5815         val_print_scalar_formatted.
5816         (val_print_type_code_int): Remove.
5817         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5818         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5819         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5820         * ada-valprint.c (ada_val_print_num): Use
5821         val_print_scalar_formatted.
5822
5823 2017-06-12  Tom Tromey  <tom@tromey.com>
5824
5825         * printcmd.c (print_scalar_formatted): Unify the two switches.
5826         Don't convert scalars to LONGEST.
5827
5828 2017-06-12  Tom Tromey  <tom@tromey.com>
5829
5830         PR exp/16225:
5831         * valprint.h (print_decimal_chars): Update.
5832         * valprint.c (maybe_negate_by_bytes): New function.
5833         (print_decimal_chars): Add "is_signed" argument.
5834         * printcmd.c (print_scalar_formatted): Update.
5835
5836 2017-06-12  Tom Tromey  <tom@tromey.com>
5837
5838         PR exp/16225:
5839         * valprint.h (print_binary_chars, print_hex_chars): Update.
5840         * valprint.c (val_print_type_code_int): Update.
5841         (print_binary_chars): Add "zero_pad" argument.
5842         (emit_octal_digit): New function.
5843         (print_octal_chars): Don't zero-pad.
5844         (print_decimal_chars): Likewise.
5845         (print_hex_chars): Add "zero_pad" argument.
5846         * sh64-tdep.c (sh64_do_fp_register): Update.
5847         * regcache.c (regcache::dump): Update.
5848         * printcmd.c (print_scalar_formatted): Update.
5849         * infcmd.c (default_print_one_register_info): Update.
5850
5851 2017-06-12  Pedro Alves  <palves@redhat.com>
5852             Alan Hayward  <alan.hayward@arm.com>
5853
5854         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5855         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5856         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5857         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5858         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5859
5860 2017-06-12  Pedro Alves  <palves@redhat.com>
5861
5862         * dwarf2read.c (mapped_symtab::data): Now a vector of
5863         symtab_index_entry instead of vector of
5864         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5865         whether an element's name is NULL instead of checking whether the
5866         element itself is NULL.
5867         (find_slot): Change return type.  Adjust.
5868         (hash_expand, , add_index_entry, uniquify_cu_indices)
5869         (write_hash_table): Adjust.
5870
5871 2017-06-12  Pedro Alves  <palves@redhat.com>
5872
5873         * dwarf2read.c (recursively_count_psymbols): New function.
5874         (write_psymtabs_to_index): Call it to compute number of psyms and
5875         pass estimate size of psyms_seen to unordered_set's ctor.
5876
5877 2017-06-12  Pedro Alves  <palves@redhat.com>
5878
5879         * dwarf2read.c (write_hash_table): Check if key already exists
5880         before emplacing.
5881
5882 2017-06-12  Pedro Alves  <palves@redhat.com>
5883
5884         * dwarf2read.c (data_buf::append_space): Rename to...
5885         (data_buf::grow): ... this, and make private.  Adjust all callers.
5886         (data_buf::append_uint): New method.
5887         (add_address_entry, write_one_signatured_type)
5888         (write_psymtabs_to_index): Use it.
5889
5890 2017-06-12  Pedro Alves  <palves@redhat.com>
5891
5892         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5893         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5894         (data_buf::file_write): Call ::fwrite directly.
5895
5896 2017-06-12  Pedro Alves  <palves@redhat.com>
5897
5898         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5899         std::vector::erase.
5900
5901 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5902
5903         Code cleanup: C++ify .gdb_index producer.
5904         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5905         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5906         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5907         (create_strtab, add_string): Remove.
5908         (file_write, data_buf): New.
5909         (struct symtab_index_entry): Use std::vector for cu_indices.
5910         (struct mapped_symtab): Use std::vector for data.
5911         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5912         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5913         Remove.
5914         (find_slot): Change return type.  Update it to the new data structures.
5915         (hash_expand, add_index_entry): Update it to the new data structures.
5916         (offset_type_compare): Remove.
5917         (uniquify_cu_indices): Update it to the new data structures.
5918         (c_str_view, c_str_view_hasher, vector_hasher): New.
5919         (add_indices_to_cpool): Remove.
5920         (write_hash_table): Update it to the new data structures.
5921         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5922         (eq_psymtab_cu_index): Remove.
5923         (psym_index_map): New typedef.
5924         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5925         reference and std::unordered_map for cu_index_htab.
5926         (add_address_entry, add_address_entry_worker, write_address_map)
5927         (write_psymbols): Update it to the new data structures.
5928         (write_obstack): Remove.
5929         (struct signatured_type_index_data): Change types_list to a data_buf
5930         reference and psyms_seen to a std::unordered_set reference.
5931         (write_one_signatured_type, recursively_write_psymbols)
5932         (write_psymtabs_to_index): Update it to the new data structures.
5933
5934 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5935
5936         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5937         separate-debug-file commands.
5938         * symfile.h (separate_debug_file_debug): New global.
5939         * symfile.c (separate_debug_file_debug): New global.
5940         (separate_debug_file_exists, find_separate_debug_file): Add
5941         debug output.
5942         (_initialize_symfile): Add "set debug separate-debug-file"
5943         command.
5944         * build-id.c (build_id_to_debug_bfd,
5945         find_separate_debug_file_by_buildid): Add debug output.
5946
5947 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5948
5949         * gdbarch.sh (displaced_step_free_closure): Remove.
5950         * gdbarch.h, gdbarch.c: Re-generate.
5951         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5952         displaced_step_free_closure.
5953         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5954         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5955         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5956         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5957         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5958         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5959         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5960         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5961         * infrun.c (displaced_step_clear): Call xfree instead of
5962         gdbarch_displaced_step_free_closure.
5963
5964 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5965
5966         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5967         NULL".
5968
5969 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5970
5971         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5972         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5973         (mn10300_push_dummy_call): Likewise.
5974
5975 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5976
5977         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5978
5979 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5980
5981         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5982
5983 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5984
5985         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5986         able to start inferiors using a shell.
5987         (New remote packets): Announce new packet "QStartupWithShell".
5988         * remote.c: Add PACKET_QStartupWithShell.
5989         (extended_remote_create_inferior): Handle new
5990         PACKET_QStartupWithShell.
5991         (remote_protocol_features) <QStartupWithShell>: New entry for
5992         PACKET_QStartupWithShell.
5993         (_initialize_remote): Call "add_packet_config_cmd" for
5994         QStartupShell.
5995
5996 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5997             Pedro Alves  <palves@redhat.com>
5998
5999         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6000         and "nat/fork-inferior.h".
6001         * common/common-inferior.h: New file, with contents from
6002         "gdb/inferior.h".
6003         * commom/common-utils.c: Include "common-utils.h".
6004         (stringify_argv): New function.
6005         * common/common-utils.h (stringify_argv): New prototype.
6006         * configure.nat: Add "fork-inferior.o" as a dependency for
6007         "*linux*", "fbsd*" and "nbsd*" hosts.
6008         * corefile.c (get_exec_file): Update comment.
6009         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6010         instead of "startup_inferior".
6011         (darwin_create_inferior): Call "add_thread_silent" after
6012         "fork_inferior".
6013         * fork-child.c: Cleanup unnecessary includes.
6014         (SHELL_FILE): Move to "common/common-fork-child.c".
6015         (environ): Likewise.
6016         (exec_wrapper): Initialize.
6017         (get_exec_wrapper): New function.
6018         (breakup_args): Move to "common/common-fork-child.c"; rename to
6019         "breakup_args_for_exec".
6020         (escape_bang_in_quoted_argument): Move to
6021         "common/common-fork-child.c".
6022         (saved_ui): New variable.
6023         (prefork_hook): New function.
6024         (postfork_hook): Likewise.
6025         (postfork_child_hook): Likewise.
6026         (gdb_startup_inferior): Likewise.
6027         (fork_inferior): Move to "common/common-fork-child.c".  Update
6028         function to support gdbserver.
6029         (startup_inferior): Likewise.
6030         * gdbcore.h (get_exec_file): Remove declaration.
6031         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6032         instead of "startup_inferior".  Call "add_thread_silent" after
6033         "fork_inferior".
6034         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6035         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6036         instead of "startup_inferior".  Call "add_thread_silent" after
6037         "fork_inferior".
6038         * inferior.h: Include "common-inferior.h".
6039         (trace_start_error): Move to "common/common-utils.h".
6040         (trace_start_error_with_name): Likewise.
6041         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6042         (startup_inferior): Likewise.
6043         (gdb_startup_inferior): New prototype.
6044         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6045         * nat/fork-inferior.h: New file.
6046         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6047         instead of "startup_inferior".  Call "add_thread_silent" after
6048         "fork_inferior".
6049         * target.h (target_terminal_init): Move prototype to
6050         "target/target.h".
6051         (target_terminal_inferior): Likewise.
6052         (target_terminal_ours): Likewise.
6053         * target/target.h (target_terminal_init): New prototype, moved
6054         from "target.h".
6055         (target_terminal_inferior): Likewise.
6056         (target_terminal_ours): Likewise.
6057         * utils.c (gdb_flush_out_err): New function.
6058
6059 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6060
6061         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6062         * common/common-gdbthread.h: New file, with parts from
6063         "gdb/gdbthread.h".
6064         * gdbthread.h: Include "common-gdbthread.h".
6065         (switch_to_thread): Moved to "common/common-gdbthread.h".
6066
6067 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6068
6069         * Makefile.in (SFILES): Add "common/job-control.c".
6070         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6071         (COMMON_OBS): Add "job-control.o".
6072         * common/job-control.c: New file, with contents from
6073         "gdb/inflow.c".
6074         * common/job-control.h: New file, with contents from "terminal.h".
6075         * fork-child.c: Include "job-control.h".
6076         * inflow.c: Include "job-control.h".
6077         (gdb_setpgid): Move to "common/common-inflow.c".
6078         (_initialize_inflow): Move setting of "job_control" to
6079         "handle_job_control".
6080         * terminal.h (job_control): Moved to "common/common-terminal.h".
6081         (gdb_setpgid): Likewise.
6082         * top.c: Include "job_control.h".
6083         * utils.c: Likewise.
6084         (job_control): Moved to "job-control.c".
6085
6086 2017-06-07  Pedro Alves  <palves@redhat.com>
6087
6088         * Makefile.in (SFILES): Add gdb_regex.c.
6089         (COMMON_OBS): Add gdb_regex.o.
6090         * ada-lang.c (ada_add_standard_exceptions)
6091         (ada_add_exceptions_from_frame, name_matches_regex)
6092         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6093         parameter type to compiled_regex.  Adjust.
6094         (ada_exceptions_list): Use compiled_regex.
6095         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6096         std::unique_ptr<compiled_regex>.
6097         (exception_catchpoint::~exception_catchpoint): Remove regfree
6098         call.
6099         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6100         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6101         * breakpoint.c (solib_catchpoint::compiled): Now a
6102         std::unique_ptr<compiled_regex>.
6103         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6104         (check_status_catch_solib): Adjust to use compiled_regex.
6105         (add_solib_catchpoint): Adjust to use compiled_regex.
6106         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6107         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6108         compiled_regex reference.  Adjust to use it.
6109         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6110         declaration.  Include "gdb_regex.h".
6111         (apropos_cmd): Change regex parameter to compiled_regex reference.
6112         * gdb_regex.c: New file.
6113         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6114         declarations.
6115         (class compiled_regex): New.
6116         * linux-tdep.c: Include "common/gdb_optional.h".
6117         (struct mapping_regexes): New, factored out from
6118         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6119         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6120         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6121         * probe.c: Include "common/gdb_optional.h".
6122         (collect_probes): Use compiled_regex and gdb::optional and remove
6123         cleanups.
6124         * skip.c: Include "common/gdb_optional.h".
6125         (skiplist_entry::compiled_function_regexp): Now a
6126         gdb::optional<compiled_regex>.
6127         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6128         (free_skiplist_entry): Remove regfree call.
6129         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6130         compiled_regex and gdb::optional.
6131         * symtab.c: Include "common/gdb_optional.h".
6132         (search_symbols): Use compiled_regex and gdb::optional.
6133         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6134         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6135         to gdb_regex.c.
6136
6137 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6138
6139         * regcache.c (regcache::save): Avoid buffer use.
6140         (regcache::dump): Likewise.
6141
6142 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6143
6144         * sh-tdep.c (sh_pseudo_register_read): Remove
6145         MAX_REGISTER_SIZE.
6146         (sh_pseudo_register_write): Likewise.
6147         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6148         (sh64_pseudo_register_write): Likewise
6149
6150 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6151
6152         * aarch64-tdep.c (aarch64_store_return_value): Use
6153         V_REGISTER_SIZE.
6154         (aarch64_pseudo_read_value): Likewise.
6155         (aarch64_pseudo_write): Likewise.
6156
6157 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6158
6159         * regformats/regdef.h (set_register_cache): Remove the
6160         declaration.
6161
6162 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6163
6164         * frame.c (frame_unwind_register_signed): Use
6165         frame_unwind_register_value.
6166
6167 2017-06-06  Pedro Alves  <palves@redhat.com>
6168
6169         PR breakpoints/21553
6170         * breakpoint.c (create_breakpoints_sal_default)
6171         (init_breakpoint_sal, create_breakpoint_sal): Use
6172         gdb::unique_xmalloc_ptr for string parameters.
6173         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6174         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6175         (base_breakpoint_create_breakpoints_sal)
6176         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6177         (strace_marker_create_breakpoints_sal)
6178         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6179         string parameters.
6180         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6181         gdb::unique_xmalloc_ptr for string parameters.
6182         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6183         parameters.
6184
6185 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6186
6187         * alpha-tdep.c (alpha_register_to_value): Use
6188         get_frame_register_value.
6189         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6190
6191 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6192
6193         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6194         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6195         (ia64_value_to_register): Likewise.
6196         (ia64_extract_return_value): Likewise.
6197         (ia64_store_return_value): Likewise.
6198         (ia64_push_dummy_call): Likewise.
6199
6200 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6201
6202         GDB 8.0 released.
6203
6204 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6205
6206         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6207
6208 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6209
6210         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6211         parameter.
6212         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6213
6214 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6215
6216         * event-loop.c (poll_timers): Unallocate timer using delete
6217         instead of xfree.
6218
6219 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6220
6221         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6222         (struct breakpoint) <~breakpoint>: New.
6223         (struct watchpoint): Inherit from breakpoint.
6224         <~watchpoint>: New.
6225         <base>: Remove.
6226         (struct tracepoint): Inherit from breakpoint.
6227         <base>: Remove.
6228         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6229         (struct longjmp_breakpoint): Inherit from breakpoint.
6230         <~longjmp_breakpoint>: New.
6231         <base>: Remove.
6232         (new_breakpoint_from_type): Remove casts.
6233         (watchpoint_in_thread_scope): Remove reference to base field.
6234         (watchpoint_del_at_next_stop): Likewise.
6235         (update_watchpoint): Likewise.
6236         (watchpoint_check): Likewise.
6237         (bpstat_check_watchpoint): Likewise.
6238         (set_longjmp_breakpoint): Likewise.
6239         (struct fork_catchpoint): Inherit from breakpoint.
6240         <base>: Remove.
6241         (struct solib_catchpoint): Inherit from breakpoint.
6242         <~solib_catchpoint>: New.
6243         <base>: Remove.
6244         (dtor_catch_solib): Change to ...
6245         (solib_catchpoint::~solib_catchpoint): ... this.
6246         (breakpoint_hit_catch_solib): Remove reference to base field.
6247         (add_solib_catchpoint): Likewise.
6248         (create_fork_vfork_event_catchpoint): Likewise.
6249         (struct exec_catchpoint): Inherit from breakpoint.
6250         <~exec_catchpoint>: New.
6251         <base>: Remove.
6252         (dtor_catch_exec): Change to ...
6253         (exec_catchpoint::~exec_catchpoint): ... this.
6254         (dtor_watchpoint): Change to ...
6255         (watchpoint::~watchpoint): ... this.
6256         (watch_command_1): Remove reference to base field.
6257         (catch_exec_command_1): Likewise.
6258         (base_breakpoint_dtor): Change to ...
6259         (breakpoint::~breakpoint): ... this.
6260         (base_breakpoint_ops): Remove dtor field value.
6261         (longjmp_bkpt_dtor): Change to ...
6262         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6263         (strace_marker_create_breakpoints_sal): Remove reference to base
6264         field.
6265         (delete_breakpoint): Don't manually call breakpoint destructor.
6266         (create_tracepoint_from_upload): Remove reference to base field.
6267         (trace_pass_set_count): Likewise.
6268         (initialize_breakpoint_ops): Don't initialize
6269         momentary_breakpoint_ops, don't set dtors.
6270         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6271         <~ada_catchpoint>: New.
6272         <base>: Remove.
6273         (create_excep_cond_exprs): Remove reference to base field.
6274         (dtor_exception): Change to ...
6275         (ada_catchpoint::~ada_catchpoint): ... this.
6276         (dtor_catch_exception): Remove.
6277         (dtor_catch_exception_unhandled): Remove.
6278         (dtor_catch_assert): Remove.
6279         (create_ada_exception_catchpoint): Remove reference to base
6280         field.
6281         (initialize_ada_catchpoint_ops): Don't set dtors.
6282         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6283         breakpoint.
6284         <~signal_catchpoint>: New.
6285         <base>: Remove.
6286         (signal_catchpoint_dtor): Change to ...
6287         (signal_catchpoint::~signal_catchpoint): ... this.
6288         (create_signal_catchpoint): Remove reference to base field.
6289         (initialize_signal_catchpoint_ops): Don't set dtor.
6290         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6291         from breakpoint.
6292         <~syscall_catchpoint>: New.
6293         <base>: Remove.
6294         (dtor_catch_syscall): Change to ...
6295         (syscall_catchpoint::~syscall_catchpoint): ... this.
6296         (create_syscall_event_catchpoint): Remove reference to base
6297         field.
6298         (initialize_syscall_catchpoint_ops): Don't set dtor.
6299         * break-catch-throw.c (struct exception_catchpoint): Inherit
6300         from breakpoint.
6301         <~exception_catchpoint>: New.
6302         <base>: Remove.
6303         (dtor_exception_catchpoint): Change to ...
6304         (exception_catchpoint::~exception_catchpoint): ... this.
6305         (handle_gnu_v3_exceptions): Remove reference to base field.
6306         (initialize_throw_catchpoint_ops): Don't set dtor.
6307         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6308         field.
6309         * remote.c (remote_get_tracepoint_status): Likewise.
6310         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6311         * tracefile.c (tracefile_fetch_registers): Likewise.
6312         * tracepoint.c (actions_command): Likewise.
6313         (validate_actionline): Likewise.
6314         (tfind_1): Likewise.
6315         (get_traceframe_location): Likewise.
6316         (find_matching_tracepoint_location): Likewise.
6317         (parse_tracepoint_status): Likewise.
6318         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6319
6320 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6321
6322         * breakpoint.c (struct longjmp_breakpoint): New struct.
6323         (is_tracepoint_type): Change return type to bool.
6324         (is_longjmp_type): New function.
6325         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6326         (set_raw_breakpoint_without_location): Use
6327         new_breakpoint_from_type.
6328         (set_raw_breakpoint): Likewise.
6329
6330 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6331
6332         * breakpoint.c (new_breakpoint_from_type): New function.
6333         (create_breakpoint_sal): Use new_breakpoint_from_type and
6334         unique_ptr.
6335         (create_breakpoint): Likewise.
6336
6337 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6338
6339         * memattr.c (mem_info_command): Rename to ...
6340         (info_mem_command): ... this.
6341         (mem_enable_command): Rename to ...
6342         (enable_mem_command): ... this.
6343         (mem_disable_command): Rename to ...
6344         (disable_mem_command): ... this.
6345         (mem_delete_command): Rename to ...
6346         (delete_mem_command): ... this.
6347         (_initialize_mem): Adjust function names.
6348
6349 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6350
6351         * btrace.c (handle_pt_insn_events): New.
6352         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6353         STATUS.  Split into this and ...
6354         (handle_pt_insn_event_flags): ... this.
6355
6356 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6357
6358         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6359         and struct pt_insn.resynced.
6360         * configure: Regenerated.
6361         * config.in: Regenerated.
6362
6363 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6364
6365         * btrace.c (ftrace_find_call_by_number): New function.
6366         (ftrace_new_function): Store objects, not pointers.
6367         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6368         ftrace_new_gap, ftrace_update_function,
6369         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6370         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6371         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6372         btrace_ends_with_single_insn, btrace_call_get): Account for
6373         btrace_thread_info::functions now storing objects.
6374         * btrace.h (struct btrace_thread_info): Add constructor.
6375         (struct btrace_thread_info) <functions>: Make std::vector.
6376         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6377         Initialize with default values.
6378         * record-btrace.c (record_btrace_frame_sniffer): Account for
6379         btrace_thread_info::functions now storing objects.
6380
6381 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6382
6383         * btrace.c: Remove typedef bfun_s.
6384         (ftrace_new_gap): Directly add gaps to the list of gaps.
6385         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6386         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6387         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6388         instead of gdb VEC.
6389
6390 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6391
6392         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6393         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6394         with btrace_thread_info::next_segment and
6395         btrace_thread_info::prev_segment.
6396         * btrace.h: Remove struct btrace_func_link.
6397         (struct btrace_function): Replace pair of function segment pointers
6398         with pair of indices.
6399         * python/py-record-btrace.c (btpy_call_prev_sibling,
6400         btpy_call_next_sibling): Replace references to
6401         btrace_thread_info::segment with btrace_thread_info::next_segment and
6402         btrace_thread_info::prev_segment.
6403         * record-btrace.c (record_btrace_frame_this_id): Use
6404         btrace_find_call_by_number.
6405
6406 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6407
6408         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6409         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6410         btrace_insn_next, btrace_insn_prev): Remove references to
6411         btrace_thread_info::flow.
6412         * btrace.h (struct btrace_function): Remove FLOW.
6413
6414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6415
6416         * btrace.c (ftrace_find_call_by_number): New function.
6417         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6418         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6419         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6420         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6421         index.
6422         * btrace.h (struct btrace_function): Turn UP into an index.
6423         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6424         as an index.
6425         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6426         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6427         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6428
6429 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6430
6431         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6432         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6433         ftrace_update_function, ftrace_compute_global_level_offset,
6434         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6435         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6436         btrace_insn_end, btrace_is_empty): Remove references to
6437         btrace_thread_info::begin and btrace_thread_info::end.
6438         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6439         (struct btrace_thread_info) <functions>: Adjust comment.
6440         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6441         btrace_thread_info::begin.
6442
6443 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6444
6445         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6446         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6447         ftrace_update_function): Remove arguments that implicitly were always
6448         BTINFO->END.
6449         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6450         Don't pass BTINFO->END.
6451
6452 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6453
6454         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6455         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6456         btrace_find_insn_by_number): Replace function segment pointer with
6457         index.
6458         (btrace_insn_cmp): Simplify.
6459         * btrace.h: (struct btrace_insn_iterator) Rename index to
6460         insn_index.  Replace function segment pointer with index into function
6461         segment vector.
6462         * record-btrace.c (record_btrace_call_history): Replace function
6463         segment pointer use with index.
6464         (record_btrace_frame_sniffer): Retrieve function call segment through
6465         vector.
6466         (record_btrace_set_replay): Remove defunc't safety check.
6467
6468 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6469
6470         * btrace.c (btrace_ends_with_single_insn): New function.
6471         (btrace_call_get, btrace_call_number, btrace_call_begin,
6472         btrace_call_end, btrace_call_next, btrace_call_prev,
6473         btrace_find_call_by_number): Use index into call segment vector
6474         instead of pointer.
6475         (btrace_call_cmp): Simplify.
6476         * btrace.h (struct btrace_call_iterator): Replace function call segment
6477         pointer with index into vector.
6478         * record-btrace.c (record_btrace_call_history): Use index instead of
6479         pointer.
6480
6481 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6482
6483         * btrace.c (btrace_insn_begin, btrace_insn_end,
6484         btrace_find_insn_by_number): Add btinfo to iterator.
6485         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6486
6487 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6488
6489         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6490         and save pointers directly.
6491         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6492         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6493         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6494         changed signature of functions.
6495         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6496         (btrace_fetch): Remove code that adds btrace_function pointers to
6497         vector of btrace_functions.
6498         (btrace_clear): Simplify freeing vector of btrace_functions.
6499
6500 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6501
6502         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6503         Replace VEC_* with std::vector functions.
6504         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6505         (struct btrace_thread_info)<functions>: Change type to std::vector.
6506
6507 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6508
6509         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6510         "Removed targets and native configurations" up.  Merge duplicate
6511         "New commands" sub-sections.  Add "New options" sub-sections.
6512
6513 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6514
6515         * defs.h (copy_integer_to_size): New declaration.
6516         * findvar.c (copy_integer_to_size): New function.
6517         (do_cint_test): New selftest function.
6518         (copy_integer_to_size_test): Likewise.
6519         (_initialize_findvar): Likewise.
6520         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6521         (mips_fbsd_collect_reg): Use raw_collect_integer.
6522         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6523         (mips64_fill_gregset): Use raw_collect_integer
6524         (mips64_fill_fpregset): Use raw_supply_integer.
6525         * regcache.c (regcache::raw_supply_integer): New function.
6526         (regcache::raw_collect_integer): Likewise.
6527         * regcache.h: (regcache::raw_supply_integer): New declaration.
6528         (regcache::raw_collect_integer): Likewise.
6529
6530 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6531
6532         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6533         (COMMON_OBS): Add gdbarch-selftests.o.
6534         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6535         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6536         * gdbarch-selftests.c: New file.
6537         * regcache.h (regcache) <~regcache>: Mark it virtual if
6538         GDB_SELF_TEST.
6539         <raw_write>: Likewise.
6540
6541 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6542
6543         * regcache.c (current_regcache): Change it to
6544         regcache::current_regcache.
6545         (regcache_observer_target_changed): Update.
6546         (regcache_thread_ptid_changed): Make it a regcache static
6547         method.
6548         (regcache_thread_ptid_changed): Update.
6549         (class regcache_access): New.
6550         (current_regcache_test): Update.
6551         (_initialize_regcache): Update.
6552         * regcache.h: Include forward_list.
6553         (regcache): Declare regcache_thread_ptid_changed and declare
6554         registers_changed_ptid as friend.
6555
6556 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6557
6558         * i387-tdep.c (i387_register_to_value): Use register_size
6559         instead of TYPE_LENGTH.
6560         * m68k-tdep.c (m68k_register_to_value): Likewise.
6561
6562 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6563
6564         * i387-tdep.c (i387_convert_register_p): Return false if type
6565         code isn't TYPE_CODE_FLT.
6566
6567 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6568
6569         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6570         length is 4.
6571         (alpha_register_to_value): Remove type length check.
6572         (alpha_value_to_register): Likewise.
6573
6574 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6575
6576         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6577         TYPE_CODE_FLT.
6578
6579 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6580
6581         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6582         TYPE_CODE_FLT or not.
6583
6584 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6585
6586         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6587         * avr-tdep.c (avr_gdbarch_init): Likewise.
6588         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6589         * cris-tdep.c (cris_gdbarch_init): Likewise.
6590         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6591         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6592         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6593         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6594         * mep-tdep.c (mep_gdbarch_init): Likewise.
6595         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6596         * mips-tdep.c (mips_gdbarch_init): Likewise.
6597         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6598         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6599         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6600         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6601         * v850-tdep.c (v850_gdbarch_init): Likewise.
6602
6603 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6604
6605         * selftest-arch.c (tests_with_arch): Call registers_changed
6606         and reinit_frame_cache.
6607         * selftest.c (run_self_tests): Likewise.
6608
6609 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6610
6611         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6612         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6613
6614 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6615
6616         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6617         set_gdbarch_print_insn.
6618
6619 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6620
6621         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6622         set_gdbarch_print_insn.
6623
6624 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6625
6626         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6627         set_gdbarch_print_insn.
6628         * arc-tdep.c (arc_gdbarch_init): Likewise.
6629         * arch-utils.c: include dis-asm.h.
6630         (default_print_insn): New function.
6631         * arch-utils.h (default_print_insn): Declare.
6632         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6633         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6634         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6635         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6636         * frv-tdep.c (frv_gdbarch_init): Likewise.
6637         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6638         * gdbarch.sh (print_insn): Use default_print_insn.
6639         * gdbarch.c: Regenerated.
6640         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6641         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6642         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6643         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6644         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6645         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6646         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6647         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6648         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6649         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6650         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6651         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6652         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6653         * mt-tdep.c (mt_gdbarch_init): Likewise.
6654         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6655         * nios2-tdep.c (nios2_print_insn): Remove.
6656         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6657         * rx-tdep.c (rx_gdbarch_init): Likewise.
6658         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6659         * score-tdep.c (score_print_insn): Remove.
6660         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6661         * sh-tdep.c (sh_gdbarch_init): Likewise.
6662         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6663         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6664         * tic6x-tdep.c (tic6x_print_insn): Remove.
6665         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6666         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6667         * v850-tdep.c (v850_gdbarch_init): Likewise.
6668         * vax-tdep.c (vax_gdbarch_init): Likewise.
6669         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6670         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6671
6672 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6673
6674         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6675         (MIPS_FP0_REGNUM): Remove.
6676         (MIPS_FSR_REGNUM): Remove.
6677         (mips_fbsd_supply_fpregs): Use mips_regnum.
6678         (mips_fbsd_supply_gregs): Likewise.
6679         (mips_fbsd_collect_fpregs): Likewise.
6680         (mips_fbsd_collect_gregs): Likewise.
6681
6682 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6683
6684         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6685         (getpfpregs_supplies): New function.
6686         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6687         getfpregs_supplies.
6688         (mips_fbsd_store_inferior_registers): Likewise.
6689
6690 2017-05-22  Pedro Alves <palves@redhat.com>
6691
6692         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6693         maintainer.
6694
6695 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
6696
6697         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6698         (store_register): Likewise.
6699         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6700         (get_decimal_float_return_value): Likewise.
6701         (do_ppc_sysv_return_value): Likewise.
6702         (ppc64_sysv_abi_push_integer): Likewise.
6703         (ppc64_sysv_abi_push_freg): Likewise.
6704         (ppc64_sysv_abi_return_value_base): Likewise.
6705         (ppc64_sysv_abi_return_value): Likewise.
6706         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6707         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6708         * rs6000-nat.c: Likewise.
6709         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6710         (rs6000_value_to_register): Likewise.
6711         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6712
6713 2017-05-21  Tom Tromey  <tom@tromey.com>
6714
6715         PR rust/21466:
6716         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6717         arrays as "[T]", not "[T; ]".
6718
6719 2017-05-19  Tom Tromey  <tom@tromey.com>
6720
6721         PR rust/21484:
6722         * rust-lang.c (exp_descriptor_rust): New function.
6723         (rust_language_defn): Use it.
6724         * p-lang.c (pascal_language_defn): Update.
6725         * opencl-lang.c (opencl_language_defn): Update.
6726         * objc-lang.c (objc_language_defn): Update.
6727         * m2-lang.c (m2_language_defn): Update.
6728         * language.h (struct language_defn)
6729         <la_watch_location_expression>: New member.
6730         * language.c (unknown_language_defn, auto_language_defn)
6731         (local_language_defn): Update.
6732         * go-lang.c (go_language_defn): Update.
6733         * f-lang.c (f_language_defn): Update.
6734         * d-lang.c (d_language_defn): Update.
6735         * c-lang.h (c_watch_location_expression): Declare.
6736         * c-lang.c (c_watch_location_expression): New function.
6737         (c_language_defn, cplus_language_defn, asm_language_defn)
6738         (minimal_language_defn): Use it.
6739         * breakpoint.c (watch_command_1): Call
6740         la_watch_location_expression.
6741         * ada-lang.c (ada_language_defn): Update.
6742
6743 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6744
6745         PR tui/21482
6746         * gdb_curses.h (NOMACROS): Define.
6747         (NCURSES_NOMACROS): Define.
6748
6749 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6750
6751         PR tui/21482
6752         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6753         arg to char *.
6754         * tui/tui-wingeneral.c (box_win): Likewise.
6755         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6756         (tui_show_source_line): Likewise.
6757         (tui_show_exec_info_content): Likewise.
6758
6759 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6760
6761         * sparc-tdep.c (sparc_structure_return_p)
6762         (sparc_arg_on_registers_p): New functions.
6763         (sparc32_store_arguments): Use them.
6764         * sparc64-tdep.c (sparc64_16_byte_align_p)
6765         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6766         Handle TYPE_CODE_ARRAY.
6767
6768 2017-05-17  Yao Qi  <yao.qi@linaro.org>
6769
6770         * cli/cli-decode.c (add_alias_cmd): New function.
6771         * command.h (add_alias_cmd): Declare.
6772         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6773         instead call add_alias_cmd.
6774
6775 2017-05-17  Pedro Alves  <palves@redhat.com>
6776
6777         * Makefile.in (nat_extra_makefile_frag): Rename to ...
6778         (nat_makefile_frag): ... this.  All references updated.
6779         * configure.ac: Likewise.
6780         * configure.nat: Likewise.  Enhance comments.
6781         * configure: Regenerate.
6782
6783 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6784
6785         * procfs.c (procfs_create_inferior): Change prototype to match
6786         definition.
6787
6788 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6789
6790         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6791         C++ compiler warning.
6792
6793 2017-05-12  Tom Tromey  <tom@tromey.com>
6794
6795         PR rust/21483:
6796         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6797         recurse, just call value_struct_elt directly.
6798
6799 2017-05-12  Tom Tromey  <tom@tromey.com>
6800
6801         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6802         OP_RUST_ARRAY>: Fix.
6803
6804 2017-05-12  Tom Tromey  <tom@tromey.com>
6805
6806         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6807
6808 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6809
6810         * regcache.c: Include <forward_list>.
6811         (struct regcache_list): Remove.
6812         (current_regcache): Update.
6813         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6814         (regcache_thread_ptid_changed): Likewise.
6815         (registers_changed_ptid): Likewise.
6816         (current_regcache_size): Likewise.
6817
6818 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6819
6820         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6821         (current_regcache_size): New function.
6822         (current_regcache_test): New function.
6823         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6824
6825 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6826
6827         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6828         (print_gp_register_row): Use get_frame_register_value.
6829
6830 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6831
6832         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6833         (mips_supply_fpregset): Likewise.
6834         (mips64_supply_gregset): Likewise.
6835
6836 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6837
6838         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6839         regcache->raw_supply_zeroed.
6840
6841 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6842
6843         * configure.nat: Rearrange 'case' statements to match
6844         host before cpu.
6845
6846 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6847
6848         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6849         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6850         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6851         "@nat_extra_makefile_frag@".
6852         (Makefile): Remove dependency on "@frags@".
6853         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6854         (data-directory/Makefile): Likewise.
6855         * config/aarch64/linux.mh: Deleted; moved contents to
6856         "gdb/configure.nat".
6857         * config/alpha/alpha-linux.mh: Likewise.
6858         * config/alpha/nbsd.mh: Likewise.
6859         * config/arm/linux.mh: Likewise.
6860         * config/arm/nbsdelf.mh: Likewise.
6861         * config/i386/cygwin.mh: Likewise.
6862         * config/i386/cygwin64.mh: Likewise.
6863         * config/i386/darwin.mh: Likewise.
6864         * config/i386/fbsd.mh: Likewise.
6865         * config/i386/fbsd64.mh: Likewise.
6866         * config/i386/go32.mh: Likewise.
6867         * config/i386/i386gnu.mh: Likewise.
6868         * config/i386/i386sol2.mh: Likewise.
6869         * config/i386/linux.mh: Likewise.
6870         * config/i386/linux64.mh: Likewise.
6871         * config/i386/mingw.mh: Likewise.
6872         * config/i386/mingw64.mh: Likewise.
6873         * config/i386/nbsd64.mh: Likewise.
6874         * config/i386/nbsdelf.mh: Likewise.
6875         * config/i386/nto.mh: Likewise.
6876         * config/i386/obsd.mh: Likewise.
6877         * config/i386/obsd64.mh: Likewise.
6878         * config/i386/sol2-64.mh: Likewise.
6879         * config/ia64/linux.mh: Likewise.
6880         * config/m32r/linux.mh: Likewise.
6881         * config/m68k/linux.mh: Likewise.
6882         * config/m68k/nbsdelf.mh: Likewise.
6883         * config/m68k/obsd.mh: Likewise.
6884         * config/m88k/obsd.mh: Likewise.
6885         * config/mips/fbsd.mh: Likewise.
6886         * config/mips/linux.mh: Likewise.
6887         * config/mips/nbsd.mh: Likewise.
6888         * config/mips/obsd64.mh: Likewise.
6889         * config/pa/linux.mh: Likewise.
6890         * config/pa/nbsd.mh: Likewise.
6891         * config/pa/obsd.mh: Likewise.
6892         * config/powerpc/aix.mh: Likewise.
6893         * config/powerpc/fbsd.mh: Likewise.
6894         * config/powerpc/linux.mh: Likewise.
6895         * config/powerpc/nbsd.mh: Likewise.
6896         * config/powerpc/obsd.mh: Likewise.
6897         * config/powerpc/ppc64-linux.mh: Likewise.
6898         * config/powerpc/spu-linux.mh: Likewise.
6899         * config/s390/linux.mh: Likewise.
6900         * config/sh/nbsd.mh: Likewise.
6901         * config/sparc/fbsd.mh: Likewise.
6902         * config/sparc/linux.mh: Likewise.
6903         * config/sparc/linux64.mh: Likewise.
6904         * config/sparc/nbsd64.mh: Likewise.
6905         * config/sparc/nbsdelf.mh: Likewise.
6906         * config/sparc/obsd64.mh: Likewise.
6907         * config/sparc/sol2.mh: Likewise.
6908         * config/tilegx/linux.mh: Likewise.
6909         * config/vax/nbsdelf.mh: Likewise.
6910         * config/vax/obsd.mh: Likewise.
6911         * config/xtensa/linux.mh: Likewise.
6912         * config/i386/i386gnu.mn: New file, with excerpts from
6913         "config/i386/i386gnu.mh".
6914         * configure: Regenerate.
6915         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6916         *.mh files under "gdb/config".
6917         * configure.nat: New file, with contents from the
6918         "gdb/config/*/*.mh" files.
6919
6920 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6921
6922         * btrace.c (btrace_clear): Free insn vector.
6923
6924 2017-05-05  Pedro Alves  <palves@redhat.com>
6925
6926         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6927         * configure: Regenerate.
6928
6929 2017-05-04  Pedro Alves  <palves@redhat.com>
6930
6931         * Makefile.in (SFILES): Add progspace-and-thread.c.
6932         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6933         (COMMON_OBS): Add progspace-and-thread.o.
6934         * breakpoint.c: Include "progspace-and-thread.h".
6935         (update_inserted_breakpoint_locations)
6936         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6937         Use scoped_restore_current_pspace_and_thread.
6938         (create_std_terminate_master_breakpoint): Use
6939         scoped_restore_current_program_space.
6940         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6941         (print_breakpoint_location): Use
6942         scoped_restore_current_program_space.
6943         (bp_loc_is_permanent): Use
6944         scoped_restore_current_pspace_and_thread.
6945         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6946         (download_tracepoint_locations): Use
6947         scoped_restore_current_pspace_and_thread.
6948         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6949         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6950         (enum step_over_calls_kind): Moved from inferior.h.
6951         (class scoped_restore_current_thread): New class.
6952         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6953         declaration.
6954         (scoped_restore_current_thread): New class.
6955         * infcmd.c: Include "common/gdb_optional.h".
6956         (continue_1, proceed_after_attach): Use
6957         scoped_restore_current_thread.
6958         (notice_new_inferior): Use scoped_restore_current_thread.
6959         * inferior.c: Include "progspace-and-thread.h".
6960         (restore_inferior, save_current_inferior): Delete.
6961         (add_inferior_command, clone_inferior_command): Use
6962         scoped_restore_current_pspace_and_thread.
6963         * inferior.h (scoped_restore_current_inferior): New class.
6964         * infrun.c: Include "progspace-and-thread.h" and
6965         "common/gdb_optional.h".
6966         (follow_fork_inferior): Use
6967         scoped_restore_current_pspace_and_thread.
6968         (scoped_restore_exited_inferior): New class.
6969         (handle_vfork_child_exec_or_exit): Use
6970         scoped_restore_exited_inferior,
6971         scoped_restore_current_pspace_and_thread,
6972         scoped_restore_current_thread and scoped_restore.
6973         (fetch_inferior_event): Use scoped_restore_current_thread.
6974         * linespec.c (decode_line_full, decode_line_1): Use
6975         scoped_restore_current_program_space.
6976         * mi/mi-main.c: Include "progspace-and-thread.h".
6977         (exec_continue): Use scoped_restore_current_thread.
6978         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6979         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6980         * proc-service.c (ps_pglobal_lookup): Use
6981         scoped_restore_current_program_space.
6982         * progspace-and-thread.c: New file.
6983         * progspace-and-thread.h: New file.
6984         * progspace.c (release_program_space, clone_program_space): Use
6985         scoped_restore_current_program_space.
6986         (restore_program_space, save_current_program_space)
6987         (save_current_space_and_thread): Delete.
6988         (switch_to_program_space_and_thread): Moved to
6989         progspace-and-thread.c.
6990         * progspace.h (save_current_program_space)
6991         (save_current_space_and_thread): Delete declarations.
6992         (scoped_restore_current_program_space): New class.
6993         * remote.c (remote_btrace_maybe_reopen): Use
6994         scoped_restore_current_thread.
6995         * symtab.c: Include "progspace-and-thread.h".
6996         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6997         * thread.c (print_thread_info_1): Use
6998         scoped_restore_current_thread.
6999         (struct current_thread_cleanup): Delete.
7000         (do_restore_current_thread_cleanup)
7001         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7002         (scoped_restore_current_thread::~scoped_restore_current_thread):
7003         ... this new dtor.
7004         (make_cleanup_restore_current_thread): Rename/convert to ...
7005         (scoped_restore_current_thread::scoped_restore_current_thread):
7006         ... this new ctor.
7007         (thread_apply_all_command): Use scoped_restore_current_thread.
7008         (thread_apply_command): Use scoped_restore_current_thread.
7009         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7010         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7011
7012 2017-05-04  Pedro Alves  <palves@redhat.com>
7013
7014         * thread.c (make_cleanup_restore_current_thread): Move
7015         find_thread_ptid call before the is_stopped call.  Assert that the
7016         thread is found.  Replace is_stopped call by checking the thread's
7017         state directly.  Remove unnecessary NULL-thread check.
7018
7019 2017-05-04  Pedro Alves  <palves@redhat.com>
7020
7021         * corelow.c (thread_section_name): New class.
7022         (get_core_register_section, get_core_siginfo): Use it.
7023
7024 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7025
7026         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7027         (get_core_register_section): Remove xfree of NULL pointer.
7028
7029 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7030
7031         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7032         * regcache.c (regcache::raw_supply_zeroed): New function.
7033         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7034
7035 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7036
7037         * gdbarch.sh: Remove commented out definition of
7038         TARGET_CHAR_BIT.
7039         * gdbarch.h: Re-generate.
7040
7041 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7042
7043         * configure: Regenerate.
7044
7045 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7046
7047         * solib-target.c (solib_target_relocate_section_addresses):
7048         Remove num_section_bases, num_bases, segment_bases variables.
7049
7050 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7051
7052         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7053
7054 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7055
7056         * solib-target.c: Include <vector>
7057         (struct lm_info_target) <~lm_info_target>: Remove.
7058         <segment_bases, section_bases>: Change type to
7059         std::vector<CORE_ADDR>.
7060         (library_list_start_segment, library_list_start_section,
7061         library_list_end_library,
7062         solib_target_relocate_section_addresses): Adjust.
7063
7064 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7065
7066         * gdbarch.sh (software_single_step): Change return type to
7067         std::vector<CORE_ADDR>.
7068         * gdbarch.c, gdbarch.h: Re-generate.
7069         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7070         Adjust.
7071         (arm_deal_with_atomic_sequence_raw): Adjust.
7072         (thumb_get_next_pcs_raw): Adjust.
7073         (arm_get_next_pcs_raw): Adjust.
7074         (arm_get_next_pcs): Adjust.
7075         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7076         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7077         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7078         (alpha_software_single_step): Adjust.
7079         * alpha-tdep.h (alpha_software_single_step): Adjust.
7080         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7081         * arm-tdep.c (arm_software_single_step): Adjust.
7082         (arm_breakpoint_kind_from_current_state): Adjust.
7083         * arm-tdep.h (arm_software_single_step): Adjust.
7084         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7085         * cris-tdep.c (cris_software_single_step): Adjust.
7086         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7087         (micromips_deal_with_atomic_sequence): Adjust.
7088         (deal_with_atomic_sequence): Adjust.
7089         (mips_software_single_step): Adjust.
7090         * mips-tdep.h (mips_software_single_step): Adjust.
7091         * moxie-tdep.c (moxie_software_single_step): Adjust.
7092         * nios2-tdep.c (nios2_software_single_step): Adjust.
7093         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7094         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7095         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7096         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7097         * sparc-tdep.c (sparc_software_single_step): Adjust.
7098         * spu-tdep.c (spu_software_single_step): Adjust.
7099         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7100
7101 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7102
7103         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7104         * gdbarch.h: Re-generate.
7105
7106 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7107
7108         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7109         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7110         * python/py-instruction.c, python/py-instruction.h: New file.
7111         * python/py-record.c: Add py-instruction.h include.
7112         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7113         gdb.RecordInstruction.
7114         * python/python-internal.h: Add gdbpy_initialize_instruction
7115         declaration.
7116         * python/python.c (do_start_initialization): Add
7117         gdbpy_initialize_instruction.
7118
7119 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7120
7121         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7122         Remove.
7123         (btrace_func_from_recpy_func): New function.
7124         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7125         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7126         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7127         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7128         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7129         Also, use new helper functions.
7130         (btpy_list_item): Use new helper functions.
7131         (recpy_bt_function_call_history): Use new type name.
7132         (btpy_call_getset): Remove.
7133         (gdbpy_initialize_btrace): Remove code to initialize
7134         gdb.BtraceFunctionCall.
7135         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7136         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7137         recpy_bt_func_prev, recpy_bt_func_next): New export.
7138         * python/py-record.c (recpy_func_type): New static object.
7139         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7140         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7141         recpy_func_next): New function.
7142         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7143         (recpy_func_getset): New static object.
7144         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7145         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7146
7147 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7148
7149         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7150         (btpy_object, btpy_insn_type, btpy_new): Remove.
7151         (btpy_list_object): Use gdb.RecordInstruction type instead of
7152         gdb.BtraceInstruction type.
7153         (btrace_insn_from_recpy_insn): New function.
7154         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7155         btpy_new.
7156         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7157         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7158         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7159         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7160         instead of btpy_object.
7161         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7162         btpy_insn_data, btpy_insn_decode): Rename to ...
7163         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7164         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7165         recpy_bt_insn_decode): This.  Also, use new helper functions.
7166         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7167         recpy_insn_type.
7168         (btpy_insn_getset): Remove.
7169         (gdbpy_initialize_btrace): Remove code to initialize
7170         gdb.BtraceInstruction.  Use recpy_element_object.
7171         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7172         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7173         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7174         * python/py-record.c (recpy_insn_type): New static object.
7175         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7176         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7177         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7178         New function.
7179         (recpy_insn_getset): New static object.
7180         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7181         * python/py-record.h (recpy_element_object): New typedef.
7182         (recpy_insn_type, recpy_insn_new): New export.
7183
7184 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7185
7186         * py-record-btrace.c (btpy_insn_new): Removed.
7187         (btpy_insn_or_gap_new): New function.
7188         (btpy_insn_error): Removed.
7189         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7190         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7191         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7192         btpy_insn_or_gap_new instead of btpy_insn_new.
7193         (btpy_insn_getset): Remove btpy_insn_error.
7194         * py-record.c (recpy_gap_type): New static object.
7195         (recpy_gap_object): New typedef.
7196         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7197         recpy_gap_reason_string): New function.
7198         (recpy_gap_getset): New static object.
7199         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7200         * py-record.h (recpy_gap_new): New export.
7201
7202 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7203
7204         * python/py-record.c (recpy_ptid): Remove.
7205         (recpy_record_getset): Remove recpy_ptid.
7206
7207 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7208
7209         * btrace.c (btrace_fetch): Set inferior_ptid.
7210         * python/py-record-btrace.c: Add "py-record.h" include.
7211         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7212         recpy_bt_end, recpy_bt_instruction_history,
7213         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7214         in gdb.Record object instead of current ptid.
7215         * python/py-record.c: Include new "py-record.h" file.
7216         (recpy_record_object): Moved to py-record.h.
7217         * python/py-record.h: New file.
7218
7219 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7220
7221         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7222         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7223         indentation.
7224
7225 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7226
7227         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7228         the past maintainers section.
7229
7230 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7231
7232         * infcmd.c (get_return_value): Use regcache ctor, and remove
7233         cleanup.
7234
7235 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7236             Pedro Alves  <palves@redhat.com>
7237
7238         * regcache.c (regcache::regcache): New tag dispatch ctor.
7239         (do_cooked_read): Moved above.
7240         (regcache_dup): Use the tag dispatch ctor..
7241         * regcache.h (regcache): Declare ctor, delete copy ctor and
7242         assignment operator, remove friend regcache_dup.
7243
7244 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7245
7246         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7247         call method save instead of regcache_cpy.
7248         * regcache.h (struct regcache): Make regcache_dup a friend.
7249
7250 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7251
7252         * regcache.c (struct regcache): Move to regcache.h
7253         (regcache::arch): New method.
7254         (regcache_get_ptid): Update.
7255         (get_regcache_arch): Call arch method.
7256         (get_regcache_aspace): Call method aspace.
7257         (register_buffer): Change it to method.
7258         (regcache_save): Change it to regcache::save.
7259         (regcache_restore): Likewise.
7260         (regcache_cpy_no_passthrough): Remove the declaration.
7261         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7262         (regcache_cpy_no_passthrough): Change it to method
7263         cpy_no_passthrough.
7264         (regcache_register_status): Change it to method
7265         get_register_status.
7266         (regcache_invalidate): Change it to method invalidate.
7267         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7268         (regcache_raw_update): Change it to method raw_update.
7269         (regcache_raw_read): Likewise.
7270         (regcache_raw_read_signed): Likewise.
7271         (regcache_raw_read_unsigned): Likewise.
7272         (regcache_raw_write_signed): Likewise.
7273         (regcache_raw_write_unsigned): Likewise.
7274         (regcache_cooked_read): Likewise.
7275         (regcache_cooked_read_value): Likewise.
7276         (regcache_cooked_read_signed): Likewise.
7277         (regcache_cooked_read_unsigned): Likewise.
7278         (regcache_cooked_write_signed): Likewise.
7279         (regcache_cooked_write_unsigned): Likewise.
7280         (regcache_raw_set_cached_value): Likewise.
7281         (regcache_raw_write): Likewise.
7282         (regcache_cooked_write): Likewise.
7283         (regcache_xfer_part): Likewise.
7284         (regcache_raw_read_part): Likewise.
7285         (regcache_raw_write_part): Likewise.
7286         (regcache_cooked_read_part): Likewise.
7287         (regcache_cooked_write_part): Likewise.
7288         (regcache_raw_supply): Likewise.
7289         (regcache_raw_collect): Likewise.
7290         (regcache_transfer_regset): Likewise.
7291         (regcache_supply_regset): Likewise.
7292         (regcache_collect_regset): Likewise.
7293         (regcache_debug_print_register): Likewise.
7294         (enum regcache_dump_what): Move it to regcache.h.
7295         (regcache_dump): Change it to method dump.
7296         * regcache.h (enum regcache_dump_what): New.
7297         (class regcache): New.
7298         * target.c (target_fetch_registers): Call method
7299         debug_print_register.
7300         (target_store_registers): Likewise.
7301
7302 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7303
7304         * windows-nat.c (struct lm_info_windows): Initialize field.
7305         (windows_make_so): Allocate lm_info_windows with new.
7306         (windows_free_so): Free lm_info_windows with delete.
7307
7308 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7309
7310         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7311         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7312         cleanup.
7313         (darwin_free_so): Free lm_info_darwin with delete.
7314
7315 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7316
7317         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7318         <l_addr_p>: Change type to bool.
7319         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7320         (svr4_free_so): Free lm_info_svr4 with delete.
7321         (svr4_copy_library_list): Replace memcpy with call to copy
7322         constructor.
7323         (library_list_start_library, svr4_default_sos): Allocate
7324         lm_info_svr4 with new.
7325
7326 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7327
7328         * solib-target.c (struct lm_info_target): Add destructor,
7329         initialize fields.
7330         <name>: Change type to std::string.
7331         (library_list_start_library): Allocate lm_info_target with new.
7332         (solib_target_free_library_list): Free lm_info_target with
7333         delete.
7334         (solib_target_current_sos): Adapt to std::string.
7335         (solib_target_free_so): Free lm_info_target with delete.
7336
7337 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7338
7339         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7340         fields.
7341         (frv_current_sos): Allocate lm_info_frv with new.
7342         (frv_relocate_main_executable): Free lm_info_frv with delete,
7343         allocate with new.
7344         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7345
7346 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7347
7348         * solib-frv.c (struct lm_info_frv): Fix indentation.
7349
7350 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7351
7352         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7353         map field.
7354         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7355         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7356         and allocate with new.
7357         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7358
7359 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7360
7361         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7362         <filename, member_name>: Change type to std::string.
7363         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7364         (library_list_start_library): Allocate lm_info_aix with new.
7365         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7366         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7367         with copy constructor.
7368
7369 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7370
7371         * solist.h (struct lm_info): Remove.
7372         (struct lm_info_base): New class.
7373         (struct so_list) <lm_info>: Change type to lm_info_base *.
7374         * nto-tdep.c (struct lm_info): Remove.
7375         (lm_addr): Adjust.
7376         * solib-aix.c (struct lm_info): Rename to ...
7377         (struct lm_info_aix): ... this.  Extend lm_info_base.
7378         (lm_info_p): Rename to ...
7379         (lm_info_aix_p): ... this, and adjust.
7380         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7381         solib_aix_parse_libraries, library_list_start_library,
7382         solib_aix_free_library_list, solib_aix_parse_libraries,
7383         solib_aix_get_library_list,
7384         solib_aix_relocate_section_addresses, solib_aix_free_so,
7385         solib_aix_get_section_offsets,
7386         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7387         Adjust.
7388         (struct solib_aix_inferior_data) <library_list>: Adjust.
7389         * solib-darwin.c (struct lm_info): Rename to ...
7390         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7391         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7392         * solib-dsbt.c (struct lm_info): Rename to ...
7393         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7394         (struct dsbt_info) <main_executable_lm_info): Adjust.
7395         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7396         dsbt_relocate_section_addresses): Adjust.
7397         * solib-frv.c (struct lm_info): Rename to ...
7398         (struct lm_info_frv): ... this.  Extend lm_info_base.
7399         (main_executable_lm_info): Adjust.
7400         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7401         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7402         find_canonical_descriptor_in_load_object,
7403         frv_fdpic_find_canonical_descriptor): Adjust.
7404         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7405         to lm_info_svr4.
7406         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7407         svr4_clear_so, svr4_copy_library_list,
7408         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7409         svr4_current_sos, svr4_fetch_objfile_link_map,
7410         solist_update_incremental): Adjust.
7411         * solib-svr4.h (struct lm_info_svr4): Move here from
7412         solib-svr4.c.
7413         * solib-target.c (struct lm_info): Rename to ...
7414         (struct lm_info_target): ... this.  Extend lm_info_base.
7415         (lm_info_p): Rename to ...
7416         (lm_info_target_p): ... this.
7417         (solib_target_parse_libraries, library_list_start_segment,
7418         library_list_start_section, library_list_start_library,
7419         library_list_end_library, solib_target_free_library_list,
7420         solib_target_current_sos, solib_target_free_so,
7421         solib_target_relocate_section_addresses): Adjust.
7422         * windows-nat.c (struct lm_info): Rename to ...
7423         (struct lm_info_windows): ... this.  Extend lm_info_base.
7424         (windows_make_so, handle_load_dll, handle_unload_dll,
7425         windows_xfer_shared_libraries): Adjust.
7426
7427 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7428
7429         * solib-darwin.c (struct darwin_so_list): Remove.
7430         (darwin_current_sos): Allocate an so_list object instead of a
7431         darwin_so_list, separately allocate an lm_info object.
7432         (darwin_free_so): Free lm_info.
7433
7434 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7435
7436         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7437         with fprintf_filtered.
7438
7439 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7440
7441         * regcache.c (regcache::regcache): New function.
7442         (regcache::~regcache): New function.
7443         (regcache_xmalloc_1): Remove.
7444         (regcache_xmalloc): Call new regcache.
7445         (regcache_xfree): Call delete regcache.
7446         (get_thread_arch_aspace_regcache): Call new regcache.
7447
7448 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7449
7450         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7451         lwp instead of ptid_get_lwp.
7452
7453 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7454
7455         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7456         lwp_info instead of getting from inferior_ptid.
7457
7458 2017-04-27  Keith Seitz  <keiths@redhat.com>
7459
7460         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7461         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7462         (CV_CONVERSION_BADNESS): Define.
7463         (rank_one_type): Remove overly restrictive rvalue reference
7464         rank checks.
7465         Add cv-qualifier checks and subranks for type equality.
7466         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7467         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7468         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7469
7470 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7471
7472         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7473         count when creating the object.
7474
7475 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7476             Ulrich Weigand  <uweigand@de.ibm.com>
7477
7478         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7479         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7480         is used in AIX.
7481         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7482         (process_xcoff_symbol): Likewise.
7483         (scan_xcoff_symtab): Likewise.
7484
7485 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7486
7487         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7488         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7489         (ia64_access_reg): Use get_frame_register_unsigned.
7490         (ia64_access_rse_reg): Likewise.
7491         (ia64_libunwind_frame_prev_register): Likewise.
7492
7493 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7494
7495         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7496         * gdbarch.c: Regenerated.
7497         * gdbarch.h: Regenerated.
7498         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7499         visibility external.
7500         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7501         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7502         (enum cfa_how_kind): Move to ...
7503         (struct dwarf2_frame_state_reg_info): Likewise.
7504         (struct dwarf2_frame_state): Likewise.
7505         * dwarf2-frame.h: ... here.
7506         (dwarf2_frame_state_alloc_regs): New declaration.
7507         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7508         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7509
7510 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7511
7512         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7513         regcache_raw_read_unsigned.
7514         (xtensa_pseudo_register_write): Likewise.
7515
7516 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7517
7518         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7519         (nds32_pseudo_register_write): Likewise.
7520
7521 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7522
7523         * regcache.c (struct regcache) <readonly_p>: Change its type
7524         to bool.
7525         (regcache_xmalloc_1): Update parameter type and callers update.
7526
7527 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7528
7529         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7530         set_gdbarch_wchar_bit.
7531         * arm-tdep.c (arm_gdbarch_init): Likewise.
7532
7533 2017-04-25  Pedro Alves  <palves@redhat.com>
7534
7535         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7536         (BothAreRelocatable, memcopy, memmove): Don't define.
7537         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7538         macros.
7539
7540 2017-04-25  Pedro Alves  <palves@redhat.com>
7541
7542         * common/common-defs.h: Include "common/poison.h".
7543         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7544         and adjust.
7545         * common/poison.h: New file.
7546         * common/traits.h: Include <type_traits>.
7547         (Not, Or, Requires): New, moved from common/function-view.h.
7548
7549 2017-04-25  Pedro Alves  <palves@redhat.com>
7550
7551         * breakpoint.h (struct breakpoint): In-class initialize all
7552         fields.  Make boolean fields "bool".
7553         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7554         memset call and initializations no longer necessary.
7555
7556 2017-04-25  Pedro Alves  <palves@redhat.com>
7557
7558         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7559         reference.
7560         (pt_btrace_insn): New function.
7561         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7562
7563 2017-04-25  Pedro Alves  <palves@redhat.com>
7564
7565         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7566         "base" field and inherit from "bp_location" instead.  Add
7567         non-default ctor.
7568         (allocate_location_exception): Use new non-default ctor.
7569         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7570         (init_bp_location): Convert to ...
7571         (bp_location::bp_location): ... this new ctor, and remove memset
7572         call.
7573         (base_breakpoint_allocate_location): Use the new non-default ctor.
7574         * breakpoint.h (bp_location): Now a class.  Declare default and
7575         non-default ctors.  In-class initialize all members.
7576         (init_bp_location): Remove declaration.
7577
7578 2017-04-25  Pedro Alves  <palves@redhat.com>
7579
7580         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7581         assignment operator.
7582
7583 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7584
7585         * doublest.c (convert_doublest_to_floatformat): Call
7586         floatformat_totalsize_bytes.
7587
7588 2017-04-22  Tom Tromey  <tom@tromey.com>
7589
7590         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7591         ui_out_emit_list.
7592         * stack.c (print_frame): Use ui_out_emit_list.
7593         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7594         ui_out_emit_list.
7595         * mi/mi-main.c (print_one_inferior)
7596         (mi_cmd_data_list_register_names)
7597         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7598         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7599         ui_out_emit_list.
7600         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7601         (mi_output_solib_attribs): Use ui_out_emit_list,
7602         ui_out_emit_tuple.
7603         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7604         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7605         (mi_cmd_stack_list_args, list_args_or_locals): Use
7606         ui_out_emit_list.
7607         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7608         * breakpoint.c (print_solib_event, output_thread_groups): Use
7609         ui_out_emit_list.
7610
7611 2017-04-22  Tom Tromey  <tom@tromey.com>
7612
7613         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7614         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7615         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7616
7617 2017-04-22  Tom Tromey  <tom@tromey.com>
7618
7619         * tracepoint.c (tvariables_info_1)
7620         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7621
7622 2017-04-22  Tom Tromey  <tom@tromey.com>
7623
7624         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7625         annotate_arg_emitter.
7626         * breakpoint.c (print_mention_watchpoint)
7627         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7628         * annotate.h (struct annotate_arg_emitter): New.
7629
7630 2017-04-22  Tom Tromey  <tom@tromey.com>
7631
7632         * record-btrace.c (record_btrace_insn_history)
7633         (record_btrace_insn_history_range, record_btrace_call_history)
7634         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7635         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7636         ui_out_emit_tuple.
7637         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7638         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7639         * skip.c (skip_info): Use ui_out_emit_tuple.
7640         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7641         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7642         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7643         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7644         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7645         ui_out_emit_tuple.
7646         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7647         (output_register, mi_cmd_data_read_memory)
7648         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7649         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7650         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7651         Use ui_out_emit_tuple.
7652         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7653         ui_out_emit_tuple.
7654         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7655         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7656         * linux-thread-db.c (info_auto_load_libthread_db): Use
7657         ui_out_emit_tuple.
7658         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7659         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7660         * disasm.c (do_mixed_source_and_assembly_deprecated)
7661         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7662         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7663         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7664         * breakpoint.c (print_one_breakpoint_location)
7665         (print_one_breakpoint): Use ui_out_emit_tuple.
7666         * auto-load.c (print_script, info_auto_load_cmd): Use
7667         ui_out_emit_tuple.
7668         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7669
7670 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
7671
7672         * thread.c (print_thread_info_1): Remove dead code.
7673
7674 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7675
7676         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7677         GDB_SELF_TEST.
7678         * arm-tdep.c (selftests::arm_record_test): Likewise.
7679
7680 2017-04-21  Yao Qi  <yao.qi@linaro.org>
7681
7682         * regcache.c (regcache_restore): Remove argument 2.  Replace
7683         argument 3 with regcache.  Get register status from
7684         src->register_status and get register contents from
7685         register_buffer (src, regnum).
7686         (regcache_cpy): Update.
7687
7688 2017-04-19  Pedro Alves  <palves@redhat.com>
7689
7690         * gdbthread.h (thread): Add missing closing parenthesis in
7691         comment.
7692
7693 2017-04-19  Pedro Alves  <palves@redhat.com>
7694
7695         * common/refcounted-object.h: New file.
7696         * gdbthread.h: Include "common/refcounted-object.h".
7697         (thread_info): Inherit from refcounted_object and add comments.
7698         (thread_info::incref, thread_info::decref)
7699         (thread_info::m_refcount): Delete.
7700         (thread_info::deletable): Use the refcounted_object::refcount()
7701         method.
7702         * inferior.c (current_inferior_): Add comment.
7703         (set_current_inferior): Increment/decrement refcounts.
7704         (prune_inferiors, remove_inferior_command): Skip inferiors marked
7705         not-deletable instead of comparing with the current inferior.
7706         (initialize_inferiors): Increment the initial inferior's refcount.
7707         * inferior.h (struct inferior): Forward declare.
7708         Include "common/refcounted-object.h".
7709         (current_inferior, set_current_inferior): Move declaration to
7710         before struct inferior's definition, and fix comment.
7711         (inferior): Inherit from refcounted_object.  Add comments.
7712         * thread.c (switch_to_thread_no_regs): Reference the thread's
7713         inferior pointer directly instead of doing a ptid lookup.
7714         (switch_to_no_thread): New function.
7715         (switch_to_thread(thread_info *)): New function, factored out
7716         from ...
7717         (switch_to_thread(ptid_t)): ... this.
7718         (restore_current_thread): Delete.
7719         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7720         fields, and add 'inf' field.
7721         (do_restore_current_thread_cleanup): Check whether old->inf is
7722         alive instead of looking up an inferior by ptid.  Use
7723         switch_to_thread and switch_to_no_thread.
7724         (restore_current_thread_cleanup_dtor): Use old->inf directly
7725         instead of lookup up an inferior by id.  Decref the inferior.
7726         Don't restore 'removable'.
7727         (make_cleanup_restore_current_thread): Same the inferior pointer
7728         in old, instead of the inferior number.  Incref the inferior.
7729         Don't save/clear 'removable'.
7730
7731 2017-04-19  Pedro Alves  <palves@redhat.com>
7732
7733         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7734         unittests/scoped_restore-selftests.c.
7735         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7736         * common/scoped_restore.h (scoped_restore_base): Make "class".
7737         (scoped_restore_base::release): New public method.
7738         (scoped_restore_base::scoped_restore_base): New protected ctor.
7739         (scoped_restore_base::m_saved_var): New protected field.
7740         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7741         scoped_restore_base base class instead of m_saved_var directly.
7742         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7743         (scoped_restore_tmpl::scoped_restore_tmpl(const
7744         scoped_restore_tmpl<T>&)): Likewise.
7745         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7746         method.
7747         (scoped_restore_tmpl::saved_var): New method.
7748         (scoped_restore_tmpl::m_saved_var): Delete.
7749         * inferior.h (inferior::detaching): Now a bool.
7750         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7751         cleanup.
7752         * unittests/scoped_restore-selftests.c: New file.
7753
7754 2017-04-19  Pedro Alves  <palves@redhat.com>
7755
7756         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7757         Re-sort in alphabetic order.
7758
7759 2017-04-18  Pedro Alves  <palves@redhat.com>
7760
7761         * xml-support.c (obstack_xml_printf): Delete.
7762         * xml-support.h (obstack_xml_printf): Delete.
7763
7764 2017-04-18  Pedro Alves  <palves@redhat.com>
7765
7766         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7767         vdebug, verror, body_text, start_element, end_element, name,
7768         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7769         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7770         is_xinclude>: Make private and add m_ prefix.
7771         (gdb_xml_parser::body_text): New method, based on ...
7772         (gdb_xml_body_text): ... this.  Adjust.
7773         (gdb_xml_parser::vdebug): New method, based on ...
7774         (gdb_xml_debug): ... this.  Adjust.
7775         (gdb_xml_parser::verror): New method, based on ...
7776         (gdb_xml_error): ... this.  Adjust.
7777         (gdb_xml_parser::start_element): New method, based on ...
7778         (gdb_xml_start_element): ... this.  Adjust.
7779         (gdb_xml_start_element_wrapper): Defer to
7780         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7781         (gdb_xml_parser::end_element): New method, based on ...
7782         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7783         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7784         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7785         (gdb_xml_parser::use_dtd): New method, based on ...
7786         (gdb_xml_use_dtd): ... this.  Adjust.
7787         (gdb_xml_parser::parse): New method, based on ...
7788         (gdb_xml_parse): ... this.  Adjust.
7789         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7790         (xinclude_start_include): Adjust to call the parser's name method.
7791         (xml_xinclude_default, xml_xinclude_start_doctype)
7792         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7793         method.
7794         (xml_process_xincludes): Adjust to call parser methods.
7795         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7796         declarations.
7797
7798 2017-04-18  Pedro Alves  <palves@redhat.com>
7799
7800         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7801         gdb::optional<std::string>.
7802         * xml-support.c: Include <string>.
7803         (scope_level::scope_level(scope_level &&))
7804         (scope_level::~scope_level): Delete.
7805         (scope_level::body): Now a std::string.
7806         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7807         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7808         parameter.
7809         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7810         (xinclude_parsing_data::output): Now a std::string reference.
7811         (xinclude_start_include): Adjust.
7812         (xml_xinclude_default): Adjust.
7813         (xml_process_xincludes): Add 'output' parameter, and return bool.
7814         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7815         and return bool.
7816         * xml-tdesc.c: Include <unordered_map> and <string>.
7817         (tdesc_xml_cache): Delete.
7818         (tdesc_xml_cache_s): Delete.
7819         (xml_cache): Now an std::unordered_map.
7820         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7821         (target_fetch_description_xml): Change return type to
7822         gdb::optional<std::string>, and adjust.
7823         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7824         (target_fetch_description_xml): Change return type to
7825         gdb::optional<std::string>.
7826
7827 2017-04-18  Pedro Alves  <palves@redhat.com>
7828
7829         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7830         unittests/optional-selftests.c.
7831         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7832         * unittests/optional-selftests.c: New file.
7833         * unittests/optional/assignment/1.cc: New file.
7834         * unittests/optional/assignment/2.cc: New file.
7835         * unittests/optional/assignment/3.cc: New file.
7836         * unittests/optional/assignment/4.cc: New file.
7837         * unittests/optional/assignment/5.cc: New file.
7838         * unittests/optional/assignment/6.cc: New file.
7839         * unittests/optional/assignment/7.cc: New file.
7840         * unittests/optional/cons/copy.cc: New file.
7841         * unittests/optional/cons/default.cc: New file.
7842         * unittests/optional/cons/move.cc: New file.
7843         * unittests/optional/cons/value.cc: New file.
7844         * unittests/optional/in_place.cc: New file.
7845         * unittests/optional/observers/1.cc: New file.
7846         * unittests/optional/observers/2.cc: New file.
7847
7848 2017-04-18  Pedro Alves  <palves@redhat.com>
7849
7850         * common/gdb_optional.h: Include common/traits.h.
7851         (in_place_t): New type.
7852         (in_place): New constexpr variable.
7853         (optional::optional): Remove member initialization of
7854         m_instantiated.
7855         (optional::optional(in_place_t...)): New constructor.
7856         (optional::~optional): Use reset.
7857         (optional::optional(const optional&)): New.
7858         (optional::optional(const optional&&)): New.
7859         (optional::optional(T &)): New.
7860         (optional::optional(T &&)): New.
7861         (operator::operator=(const optional &)): New.
7862         (operator::operator=(optional &&)): New.
7863         (operator::operator= (const T &))
7864         (operator::operator= (T &&))
7865         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7866         (operator::reset): New.
7867         (operator::m_instantiated):: Add in-class initializer.
7868         * common/traits.h: Include <type_traits>.
7869         (struct And): New types.
7870
7871 2017-04-18  Pedro Alves  <palves@redhat.com>
7872
7873         * xml-support.c: Include <vector>.
7874         (scope_level::scope_level(const gdb_xml_element *))
7875         (scope_level::scope_level(scope_level&&)): New.
7876         (scope_level::~scope_level): New.
7877         (scope_level_s): Delete.
7878         (gdb_xml_parser::scopes): Now a std::vector.
7879         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7880         Use std::vector.
7881         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7882         scope cleanup code.
7883         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7884         of the scopes member.  Use std::vector::emplace_back.
7885
7886 2017-04-18  Pedro Alves  <palves@redhat.com>
7887
7888         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7889         a bool.
7890         (gdb_xml_end_element): Change type of first parameter.
7891         (gdb_xml_cleanup): Rename to ...
7892         (gdb_xml_parser::~gdb_xml_parser): ... this.
7893         (gdb_xml_create_parser_and_cleanup): Delete with ...
7894         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7895         to this new ctor.
7896         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7897         using gdb_xml_create_parser_and_cleanup.
7898         (xinclude_parsing_data): Add ctor/dtor.
7899         (xml_xinclude_cleanup): Delete.
7900         (xml_process_xincludes): Create a local xinclude_parsing_data
7901         instead of heap-allocating one.  Create a local gdb_xml_parser
7902         instead of heap-allocating one with
7903         gdb_xml_create_parser_and_cleanup.
7904
7905 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7906
7907         PR threads/20743
7908         * fbsd-nat.c (resume_one_thread_cb): Remove.
7909         (resume_all_threads_cb): Remove.
7910         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7911         iterate_over_threads.
7912
7913 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7914
7915         * NEWS: Create a new section for the next release branch.
7916         Rename the section of the current branch, now that it has
7917         been cut.
7918
7919 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7920
7921         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7922         * version.in: Bump version to 8.0.50.DATE-git.
7923
7924 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7925
7926         PR gdb/21385
7927         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7928         independently of the host, and fix build breakage on Cygwin.
7929
7930 2017-04-13  Pedro Alves  <palves@redhat.com>
7931
7932         * inferior.c (free_inferior): Convert to ...
7933         (inferior::~inferior): ... this dtor.
7934         (inferior::inferior): New ctor, factored out from ...
7935         (add_inferior_silent): ... here.  Allocate the inferior with a new
7936         expression.
7937         (delete_inferior): Call delete instead of free_inferior.
7938         * inferior.h (gdb_environ, continuation): Forward declare.
7939         (inferior): Now a class.  Add in-class initialization to all
7940         members.  Make boolean fields bool, except 'detaching'.
7941         (inferior::inferior): New explicit ctor.
7942         (inferior::~inferior): New.
7943
7944 2017-04-13  Pedro Alves  <palves@redhat.com>
7945
7946         * inferior.c (init_inferior_list): Delete.
7947         * inferior.h (init_inferior_list): Delete.
7948
7949 2017-04-13  Pedro Alves  <palves@redhat.com>
7950
7951         PR threads/13217
7952         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7953         (top level): Call it twice, with different thread sets.
7954
7955 2017-04-13  Pedro Alves  <palves@redhat.com>
7956
7957         * thread.c: Include <algorithm>.
7958         (thread_array_cleanup): Delete.
7959         (scoped_inc_dec_ref): New class.
7960         (live_threads_count): New function.
7961         (set_thread_refcount): Delete.
7962         (tp_array_compar_ascending): Now a bool.
7963         (tp_array_compar): Convert to a std::sort comparison function.
7964         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7965         and live_threads_count.
7966
7967 2017-04-13  Pedro Alves  <palves@redhat.com>
7968
7969         * infrun.c (follow_fork_inferior): Also switch the current
7970         inferior.
7971
7972 2017-04-13  Pedro Alves  <palves@redhat.com>
7973
7974         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7975         before calling create_internal_breakpoint.
7976
7977 2017-04-13  Pedro Alves  <palves@redhat.com>
7978
7979         * fork-child.c (execv_argv): New class.
7980         (breakup_args): Refactored as ...
7981         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7982         Copy arguments to storage and replace separators with NULL
7983         terminators in place.
7984         (escape_bang_in_quoted_argument): Adjust to return bool.
7985         (execv_argv::execv_argv): New ctor.
7986         (execv_argv::init_for_shell): New method, factored out from
7987         fork_inferior.  Don't strdup strings into the vector.
7988         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7989         Remove free_vector_argv call.
7990
7991 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7992
7993         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7994         tdep->rx_psw_type.
7995
7996 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7997
7998         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7999         * rx-tdep.c (rx_gdbarch_init): Likewise.
8000
8001 2017-04-13  Pedro Alves  <palves@redhat.com>
8002
8003         * breakpoint.h (struct breakpoint): Reindent.
8004
8005 2017-04-13  Pedro Alves  <palves@redhat.com>
8006
8007         * breakpoint.c (bp_location): Rename to ...
8008         (bp_locations): ... this.  All references updated.
8009         (bp_location_count): Rename to ...
8010         (bp_locations_count): ... this.  All references updated.
8011         (bp_location_placed_address_before_address_max): Rename to ...
8012         (bp_locations_placed_address_before_address_max): ... this.  All
8013         references updated.
8014         (bp_location_shadow_len_after_address_max): Rename to ...
8015         (bp_locations_shadow_len_after_address_max): ... this.  All
8016         references updated.
8017         (bp_location_compare_addrs): Rename to ...
8018         (bp_locations_compare_addrs): ... this.  All references updated.
8019         (bp_location_compare):Rename to ...
8020         (bp_locations_compare): ... this.  All references updated.
8021         (bp_location_target_extensions_update): Rename to ...
8022         (bp_locations_target_extensions_update): ... this.  All references
8023         updated.
8024
8025 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8026
8027         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8028         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8029         'sgtty.h'.
8030         * common/gdb_termios.h: New file, with parts of "terminal.h".
8031         * inflow.c: Include "gdb_termios.h".
8032         * ser-unix.c: Include "gdb_termios.h".
8033         * terminal.h: Move terminal-related defines to
8034         "common/gdb_termios.h".
8035
8036 2017-04-12  Tom Tromey  <tom@tromey.com>
8037
8038         * probe.c (parse_probes): Update.
8039         * location.h (delete_event_location): Don't declare.
8040         (event_location_deleter::operator()): Update.
8041         * location.c (event_location_deleter::operator()): Rename from
8042         delete_event_location.
8043         * linespec.h (linespec_result) <location>: Change type to
8044         event_location_up.
8045         * linespec.c (canonicalize_linespec, event_location_to_sals)
8046         (decode_objc): Update.
8047         (linespec_result): Don't call delete_event_location.
8048         * breakpoint.c (create_breakpoints_sal)
8049         (bkpt_probe_create_sals_from_location)
8050         (strace_marker_create_sals_from_location): Update.
8051
8052 2017-04-12  Tom Tromey  <tom@tromey.com>
8053
8054         * linespec.h (struct linespec_result): Add constructor and
8055         destructor.
8056         (init_linespec_result, destroy_linespec_result)
8057         (make_cleanup_destroy_linespec_result): Don't declare.
8058         * linespec.c (init_linespec_result): Remove.
8059         (linespec_result::~linespec_result): Rename from
8060         destroy_linespec_result.  Update.
8061         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8062         Remove.
8063         * breakpoint.c (create_breakpoint, break_range_command)
8064         (decode_location_default): Update.
8065         * ax-gdb.c (agent_command_1): Update.
8066
8067 2017-04-12  Tom Tromey  <tom@tromey.com>
8068
8069         * remote.c (remote_download_tracepoint): Update.
8070         * python/py-breakpoint.c (bppy_get_location): Update.
8071         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8072         (gdbscm_breakpoint_location): Update.
8073         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8074         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8075         Change type to event_location_up.
8076         * breakpoint.c (create_overlay_event_breakpoint)
8077         (create_longjmp_master_breakpoint)
8078         (create_std_terminate_master_breakpoint)
8079         (create_exception_master_breakpoint)
8080         (breakpoint_event_location_empty_p, print_breakpoint_location)
8081         (print_one_breakpoint_location, create_thread_event_breakpoint)
8082         (init_breakpoint_sal, create_breakpoint)
8083         (print_recreate_ranged_breakpoint, break_range_command)
8084         (init_ada_exception_breakpoint, say_where): Update.
8085         (base_breakpoint_dtor): Don't call delete_event_location.
8086         (bkpt_print_recreate, tracepoint_print_recreate)
8087         (dprintf_print_recreate, update_static_tracepoint)
8088         (breakpoint_re_set_default): Update.
8089
8090 2017-04-12  Tom Tromey  <tom@tromey.com>
8091
8092         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8093         type of "to_do".  Update.
8094         (compute_stack_depth): Use std::vector.
8095
8096 2017-04-12  Tom Tromey  <tom@tromey.com>
8097
8098         * printcmd.c (find_instruction_backward): Use std::vector.
8099
8100 2017-04-12  Tom Tromey  <tom@tromey.com>
8101
8102         * symfile.c (objfilep): Remove typedef.
8103         (reread_symbols): Use a std::vector.
8104
8105 2017-04-12  Tom Tromey  <tom@tromey.com>
8106
8107         * mi/mi-main.c (exec_direction_forward): Remove.
8108         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8109         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8110         scoped_restore.
8111         * guile/guile.c (guile_repl_command, guile_command)
8112         (gdbscm_execute_gdb_command): Use scoped_restore.
8113         * go-exp.y (go_parse): Use scoped_restore.
8114         * d-exp.y (d_parse): Use scoped_restore.
8115         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8116         * c-exp.y (c_parse): Use scoped_restore.
8117
8118 2017-04-12  Tom Tromey  <tom@tromey.com>
8119
8120         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8121         (mi_parse): Update return type.
8122         (mi_parse_free): Remove.
8123         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8124         (mi_parse::~mi_parse): Rename from mi_parse_free.
8125         (mi_parse_cleanup): Remove.
8126         (mi_parse): Return a unique_ptr.  Use new.
8127         * mi/mi-main.c (mi_execute_command): Update.
8128
8129 2017-04-12  Tom Tromey  <tom@tromey.com>
8130
8131         * location.c (explicit_location_lex_one): Return a
8132         unique_xmalloc_ptr.
8133         (string_to_explicit_location): Update.  Remove cleanups.
8134
8135 2017-04-12  Tom Tromey  <tom@tromey.com>
8136
8137         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8138         (compare_value_and_voffset): Change type.  Update.
8139         (compute_vtable_size): Change type of "offset_vec".
8140         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8141         (gnuv3_get_typeid): Remove extraneous declaration.
8142
8143 2017-04-12  Tom Tromey  <tom@tromey.com>
8144
8145         * charset.h (wchar_iterator): Fix comment.
8146
8147 2017-04-12  Tom Tromey  <tom@tromey.com>
8148
8149         * charset.c (iconv_wrapper): New class.
8150         (cleanup_iconv): Remove.
8151         (convert_between_encodings): Use it.
8152
8153 2017-04-12  Tom Tromey  <tom@tromey.com>
8154
8155         * symfile.h (increment_reading_symtab): Update type.
8156         * symfile.c (decrement_reading_symtab): Remove.
8157         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8158         * psymtab.c (psymtab_to_symtab): Update.
8159         * dwarf2read.c (dw2_instantiate_symtab): Update.
8160
8161 2017-04-12  Tom Tromey  <tom@tromey.com>
8162
8163         * jit.c (struct jit_reader): Declare separately.  Add constructor
8164         and destructor.  Change type of "handle".
8165         (loaded_jit_reader): Define separately.
8166         (jit_reader_load): Update.  New "new".
8167         (jit_reader_unload_command): Use "delete".
8168         * gdb-dlfcn.h (struct dlclose_deleter): New.
8169         (gdb_dlhandle_up): New typedef.
8170         (gdb_dlopen, gdb_dlsym): Update types.
8171         (gdb_dlclose): Remove.
8172         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8173         (gdb_dlsym): Change type of "handle".
8174         (make_cleanup_dlclose): Remove.
8175         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8176         * compile/compile-c-support.c (load_libcc): Update.
8177
8178 2017-04-12  Tom Tromey  <tom@tromey.com>
8179
8180         * symtab.h (find_pcs_for_symtab_line): Change return type.
8181         * symtab.c (find_pcs_for_symtab_line): Change return type.
8182         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8183         type of "vec".  Update.
8184         (ltpy_get_pcs_for_line): Update.
8185         * linespec.c (decode_digits_ordinary): Update.
8186
8187 2017-04-12  Tom Tromey  <tom@tromey.com>
8188
8189         * tracepoint.c (actions_command): Update.
8190         * python/python.c (python_command, python_interactive_command):
8191         Update.
8192         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8193         * guile/guile.c (guile_command): Update.
8194         * defs.h (read_command_lines, read_command_lines_1): Return
8195         command_line_up.
8196         (command_lines_deleter): New struct.
8197         (command_line_up): New typedef.
8198         * compile/compile.c (compile_code_command)
8199         (compile_print_command): Update.
8200         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8201         command_line_up.
8202         (make_cleanup_free_command_lines): Remove.
8203         * cli/cli-script.c (get_command_line, read_command_lines_1)
8204         (copy_command_lines): Return command_line_up.
8205         (while_command, if_command, read_command_lines, define_command)
8206         (document_command): Update.
8207         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8208         Remove.
8209         * breakpoint.h (breakpoint_set_commands): Change type of
8210         "commands".
8211         * breakpoint.c (breakpoint_set_commands): Change type of
8212         "commands".  Update.
8213         (do_map_commands_command, update_dprintf_command_list)
8214         (create_tracepoint_from_upload): Update.
8215
8216 2017-04-12  Tom Tromey  <tom@tromey.com>
8217
8218         * tracepoint.c (scope_info): Update.
8219         * spu-tdep.c (spu_catch_start): Update.
8220         * python/python.c (gdbpy_decode_line): Update.
8221         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8222         * python/py-breakpoint.c (bppy_init): Update.
8223         * probe.c (parse_probes): Update.
8224         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8225         * location.h (event_location_deleter): New struct.
8226         (event_location_up): New typedef.
8227         (new_linespec_location, new_address_location, new_probe_location)
8228         (new_explicit_location, copy_event_location)
8229         (string_to_event_location, string_to_event_location_basic)
8230         (string_to_explicit_location): Update return type.
8231         (make_cleanup_delete_event_location): Remove.
8232         * location.c (new_linespec_location, new_address_location)
8233         (new_probe_location, new_explicit_location, copy_event_location):
8234         Return event_location_up.
8235         (delete_event_location_cleanup)
8236         (make_cleanup_delete_event_location): Remove.
8237         (string_to_explicit_location, string_to_event_location_basic)
8238         (string_to_event_location): Return event_location_up.
8239         * linespec.c (canonicalize_linespec, event_location_to_sals)
8240         (decode_line_with_current_source)
8241         (decode_line_with_last_displayed, decode_objc): Update.
8242         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8243         * completer.c (location_completer): Update.
8244         * cli/cli-cmds.c (edit_command, list_command): Update.
8245         * breakpoint.c (create_overlay_event_breakpoint)
8246         (create_longjmp_master_breakpoint)
8247         (create_std_terminate_master_breakpoint)
8248         (create_exception_master_breakpoint)
8249         (create_thread_event_breakpoint): Update.
8250         (init_breakpoint_sal): Update.  Remove some dead code.
8251         (create_breakpoint_sal): Change type of "location".  Update.
8252         (create_breakpoints_sal, create_breakpoint, break_command_1)
8253         (dprintf_command, break_range_command, until_break_command)
8254         (init_ada_exception_breakpoint)
8255         (strace_marker_create_sals_from_location)
8256         (update_static_tracepoint, trace_command, ftrace_command)
8257         (strace_command, create_tracepoint_from_upload): Update.
8258         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8259         * ax-gdb.c (agent_command_1): Update.
8260
8261 2017-04-12  Pedro Alves  <palves@redhat.com>
8262
8263         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8264         * configure.tgt: Handle i[34567]86-*-go32* and
8265         i[34567]86-*-msdosdjgpp*.
8266         * i386-tdep.c (i386_svr4_reg_to_regnum):
8267         Make extern.
8268         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8269         i386-go32-tdep.c.
8270         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8271         * i386-go32-tdep.c: New file.
8272         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8273         declarations.
8274
8275 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8276
8277         * aix-thread.c (pd_status2str): Change return type to const char *.
8278
8279 2017-04-12  Pedro Alves  <palves@redhat.com>
8280
8281         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8282         calls to set_gdbarch_gnu_triplet_regexp.
8283
8284 2017-04-12  Pedro Alves  <palves@redhat.com>
8285
8286         PR gdb/21323
8287         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8288         New enum value.
8289         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8290         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8291         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8292         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8293         * gdbarch.h, gdbarch.c: Regenerate.
8294         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8295         gdbarch_wchar_bit and gdbarch_wchar_signed.
8296         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8297         * arm-tdep.c (arm_gdbarch_init): Likewise.
8298         * avr-tdep.c (avr_gdbarch_init): Likewise.
8299         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8300         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8301         * i386-tdep.c (i386_go32_init_abi): Likewise.
8302         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8303         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8304         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8305         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8306         * sh-tdep.c (sh_gdbarch_init): Likewise.
8307         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8308         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8309         * windows-tdep.c (windows_init_abi): Likewise.
8310         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8311
8312 2017-04-12  Pedro Alves  <palves@redhat.com>
8313
8314         PR c++/21323
8315         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8316         cplus_primitive_type_char32_t>: New enum values.
8317         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8318         and cplus_primitive_type_char32_t.
8319         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8320         32, use the archtecture's built-in type for char16_t and char32_t,
8321         respectively.  Otherwise, fallback to init_integer_type as before,
8322         but make the type unsigned, and issue a complaint.
8323         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8324
8325 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8326
8327         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8328         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8329
8330 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8331
8332         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8333         'const char *'.
8334
8335 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8336
8337         * common/common-utils.c (free_vector_argv): New function.
8338         * common/common-utils.h: Include <vector>.
8339         (free_vector_argv): New prototype.
8340         * darwin-nat.c (darwin_create_inferior): Rewrite function
8341         prototype in order to constify "exec_file" and accept a
8342         "std::string" for "allargs".
8343         * fork-child.c: Include <vector>.
8344         (breakup_args): Rewrite function, using C++.
8345         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8346         and accept "std::string" for "allargs".  Update the code to
8347         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8348         and "execvp".
8349         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8350         order to constify "exec_file" and accept a "std::string" for
8351         "allargs".
8352         * go32-nat.c (go32_create_inferior): Likewise.
8353         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8354         * infcmd.c (run_command_1): Constify "exec_file".  Use
8355         "std::string" for inferior arguments.
8356         * inferior.h (fork_inferior): Update prototype.
8357         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8358         prototype in order to constify "exec_file" and accept a
8359         "std::string" for "allargs".
8360         * nto-procfs.c (procfs_create_inferior): Likewise.
8361         * procfs.c (procfs_create_inferior): Likewise.
8362         * remote-sim.c (gdbsim_create_inferior): Likewise.
8363         * remote.c (extended_remote_run): Update code to accept
8364         "std::string" as argument.
8365         (extended_remote_create_inferior): Rewrite function prototype in
8366         order to constify "exec_file" and accept a "std::string" for
8367         "allargs".
8368         * rs6000-nat.c (super_create_inferior): Likewise.
8369         (rs6000_create_inferior): Likewise.
8370         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8371         * windows-nat.c (windows_create_inferior): Likewise.
8372
8373 2017-04-11  Pedro Alves  <palves@redhat.com>
8374
8375         * thread.c: Fix whitespace throughout.
8376
8377 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8378
8379         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8380
8381 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8382
8383         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8384
8385 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8386
8387         PR gdb/21364
8388         * osdata.c (info_osdata): Check if 'type' is an empty string
8389         instead of NULL.
8390
8391 2017-04-10  Pedro Alves  <palves@redhat.com>
8392
8393         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8394         (ptid_to_global_thread_id, in_thread_list)
8395         (do_captured_list_thread_ids, set_resumed, set_running)
8396         (set_executing, set_stop_requested, finish_thread_state)
8397         (validate_registers_access, can_access_registers_ptid)
8398         (print_thread_info_1, switch_to_thread)
8399         (do_restore_current_thread_cleanup)
8400         (make_cleanup_restore_current_thread, thread_command)
8401         (thread_name_command): Use operator== instead of ptid_equal.
8402
8403 2017-04-10  Pedro Alves  <palves@redhat.com>
8404
8405         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8406         (current_thread_cleanup_chain): Delete.
8407         (restore_current_thread_cleanup_dtor)
8408         (make_cleanup_restore_current_thread): Remove references to
8409         current_thread_cleanup_chain.
8410
8411 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8412
8413         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8414         REG_UNKNOWN.
8415
8416 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8417
8418         PR gdb/19942
8419         * gdbthread.h (thread_info::deletable): New method.
8420         (thread_info::incref): New method.
8421         (thread_info::decref): New method.
8422         (thread_info::refcount): Move it to private.
8423         * infrun.c (save_stop_context): Call inc_refcount.
8424         (release_stop_context_cleanup): Likewise.
8425         * thread.c (set_thread_exited): New function.
8426         (init_thread_list): Delete "tp" only it is deletable, otherwise
8427         call set_thread_exited.
8428         (delete_thread_1): Call set_thread_exited.
8429         (current_thread_cleanup) <inferior_pid>: Remove.
8430         <thread>: New field.
8431         (restore_current_thread_ptid_changed): Removed.
8432         (do_restore_current_thread_cleanup): Adjust.
8433         (restore_current_thread_cleanup_dtor): Don't call
8434         find_thread_ptid.
8435         (set_thread_refcount): Use dec_refcount.
8436         (make_cleanup_restore_current_thread): Adjust.
8437         (thread_apply_all_command): Call inc_refcount.
8438         (_initialize_thread): Don't call
8439         observer_attach_thread_ptid_changed.
8440
8441 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8442
8443         * thread.c (delete_thread_1): Hoist code on marking thread as
8444         exited.
8445
8446 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8447
8448         * windows-nat.c (windows_detach): Initialize ptid with
8449         minus_one_ptid.
8450
8451 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8452
8453         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8454
8455 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8456
8457         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8458         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8459         (bfin_pseudo_register_write): Likewise
8460
8461 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8462
8463         * common/ptid.h (struct ptid): Change to...
8464         (class ptid_t): ... this.
8465         <ptid_t>: New constructors.
8466         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8467         matches>: New methods.
8468         <make_null, make_minus_one>: New static methods.
8469         <pid>: Rename to...
8470         <m_pid>: ...this.
8471         <lwp>: Rename to...
8472         <m_lwp>: ...this.
8473         <tid>: Rename to...
8474         <m_tid>: ...this.
8475         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8476         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8477         as references, move comment to class ptid_t.
8478         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8479         ptid_t static methods.
8480         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8481         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8482         Take ptid arguments as references, implement using ptid_t methods.
8483         * unittests/ptid-selftests.c: New file.
8484         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8485         unittests/ptid-selftests.c.
8486         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8487
8488 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8489
8490         * python/python.c (python_run_simple_file): Cast mode literal to
8491         non-const char pointer as expected by PyFile_FromString.
8492
8493 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8494
8495         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8496         minus_one_ptid and null_ptid.
8497
8498 2017-04-05  Pedro Alves  <palves@redhat.com>
8499
8500         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8501         * configure: Regenerate.
8502
8503 2017-04-05  Pedro Alves  <palves@redhat.com>
8504
8505         * ada-exp.y (yyerror): Constify.
8506         * ada-lang.c (bound_name, get_selections)
8507         (ada_variant_discrim_type)
8508         (ada_variant_discrim_name, ada_value_struct_elt)
8509         (ada_lookup_struct_elt_type, is_unchecked_variant)
8510         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8511         (catch_ada_exception_command_split)
8512         (catch_ada_assert_command_split, catch_assert_command)
8513         (ada_op_name): Constify.
8514         * ada-lang.h (ada_yyerror, get_selections)
8515         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8516         * arc-tdep.c (arc_print_frame_cache): Constify.
8517         * arm-tdep.c (arm_skip_stub): Constify.
8518         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8519         (gen_aggregate_elt_ref): Constify.
8520         * bcache.c (print_bcache_statistics): Constify.
8521         * bcache.h (print_bcache_statistics): Constify.
8522         * break-catch-throw.c (catch_exception_command_1):
8523         * breakpoint.c (struct ep_type_description::description):
8524         Constify.
8525         (add_solib_catchpoint): Constify.
8526         (catch_fork_command_1): Add cast.
8527         (add_catch_command): Constify.
8528         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8529         Constify.
8530         * bsd-uthread.c (bsd_uthread_state): Constify.
8531         * buildsym.c (patch_subfile_names): Constify.
8532         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8533         Constify.
8534         * c-exp.y (yyerror): Constify.
8535         (token::oper): Constify.
8536         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8537         * c-varobj.c (cplus_describe_child): Constify.
8538         * charset.c (find_charset_names): Add cast.
8539         (find_charset_names): Constify array and add const_cast.
8540         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8541         (edit_command): Constify.
8542         * cli/cli-decode.c (lookup_cmd): Constify.
8543         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8544         Constify.
8545         (struct dump_context): Constify.
8546         (add_dump_command, restore_command): Constify.
8547         * cli/cli-script.c (get_command_line): Constify.
8548         * cli/cli-script.h (get_command_line): Constify.
8549         * cli/cli-utils.c (check_for_argument): Constify.
8550         * cli/cli-utils.h (check_for_argument): Constify.
8551         * coff-pe-read.c (struct read_pe_section_data): Constify.
8552         * command.h (lookup_cmd): Constify.
8553         * common/print-utils.c (decimal2str): Constify.
8554         * completer.c (gdb_print_filename): Constify.
8555         * corefile.c (set_gnutarget): Constify.
8556         * cp-name-parser.y (yyerror): Constify.
8557         * cp-valprint.c (cp_print_class_member): Constify.
8558         * cris-tdep.c (cris_register_name, crisv32_register_name):
8559         Constify.
8560         * d-exp.y (yyerror): Constify.
8561         (struct token::oper): Constify.
8562         * d-lang.h (d_yyerror): Constify.
8563         * dbxread.c (struct header_file_location::name): Constify.
8564         (add_old_header_file, add_new_header_file, last_function_name)
8565         (dbx_next_symbol_text, add_bincl_to_list)
8566         (find_corresponding_bincl_psymtab, set_namestring)
8567         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8568         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8569         * defs.h (command_line_input, print_address_symbolic)
8570         (deprecated_readline_begin_hook): Constify.
8571         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8572         Constify.
8573         * event-top.c (handle_line_of_input): Constify and add cast.
8574         * exceptions.c (catch_errors): Constify.
8575         * exceptions.h (catch_errors): Constify.
8576         * expprint.c (print_subexp_standard, op_string, op_name)
8577         (op_name_standard, dump_raw_expression, dump_raw_expression):
8578         * expression.h (op_name, op_string, dump_raw_expression):
8579         Constify.
8580         * f-exp.y (yyerror): Constify.
8581         (struct token::oper): Constify.
8582         (struct f77_boolean_val::name): Constify.
8583         * f-lang.c (f_word_break_characters): Constify.
8584         * f-lang.h (f_yyerror): Constify.
8585         * fork-child.c (fork_inferior): Add cast.
8586         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8587         (new_variant): Constify.
8588         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8589         * gdbarch.c: Regenerate.
8590         * gdbcore.h (set_gnutarget): Constify.
8591         * go-exp.y (yyerror): Constify.
8592         (token::oper): Constify.
8593         * go-lang.h (go_yyerror): Constify.
8594         * go32-nat.c (go32_sysinfo): Constify.
8595         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8596         * guile/scm-cmd.c (cmdscm_function): Constify.
8597         * guile/scm-param.c (pascm_param_value): Constify.
8598         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8599         (h8300sx_register_name): Constify.
8600         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8601         Constify.
8602         * ia64-tdep.c (ia64_register_names): Constify.
8603         * infcmd.c (construct_inferior_arguments): Constify.
8604         (path_command, attach_post_wait): Constify.
8605         * language.c (show_range_command, show_case_command)
8606         (unk_lang_error): Constify.
8607         * language.h (language_defn::la_error)
8608         (language_defn::la_name_of_this): Constify.
8609         * linespec.c (decode_line_2): Constify.
8610         * linux-thread-db.c (thread_db_err_str): Constify.
8611         * lm32-tdep.c (lm32_register_name): Constify.
8612         * m2-exp.y (yyerror): Constify.
8613         * m2-lang.h (m2_yyerror): Constify.
8614         * m32r-tdep.c (m32r_register_names): Constify and make static.
8615         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8616         * m88k-tdep.c (m88k_register_name): Constify.
8617         * macroexp.c (appendmem): Constify.
8618         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8619         (upgrade_type, parse_external, parse_partial_symbols)
8620         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8621         (new_symbol): Constify.
8622         * memattr.c (mem_info_command): Constify.
8623         * mep-tdep.c (register_name_from_keyword): Constify.
8624         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8625         Constify.
8626         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8627         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8628         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8629         cast.
8630         (mi_execute_async_cli_command): Constify.
8631         * mips-tdep.c (mips_register_name): Constify.
8632         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8633         (am33_register_name, am33_2_register_name)
8634         * moxie-tdep.c (moxie_register_names): Constify.
8635         * nat/linux-osdata.c (osdata_type): Constify fields.
8636         * nto-tdep.c (nto_parse_redirection): Constify.
8637         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8638         (lookup_child_selector): Constify.
8639         (objc_methcall::name): Constify.
8640         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8641         (lookup_struct_typedef): Constify.
8642         * objfiles.c (pc_in_section): Constify.
8643         * objfiles.h (pc_in_section): Constify.
8644         * p-exp.y (struct token::oper): Constify.
8645         (yyerror): Constify.
8646         * p-lang.h (pascal_yyerror): Constify.
8647         * parser-defs.h (op_name_standard): Constify.
8648         (op_print::string): Constify.
8649         (exp_descriptor::op_name): Constify.
8650         * printcmd.c (print_address_symbolic): Constify.
8651         * psymtab.c (print_partial_symbols): Constify.
8652         * python/py-breakpoint.c (stop_func): Constify.
8653         (bppy_get_expression): Constify.
8654         * python/py-cmd.c (cmdpy_completer::name): Constify.
8655         (cmdpy_function): Constify.
8656         * python/py-event.c (evpy_add_attribute)
8657         (gdbpy_initialize_event_generic): Constify.
8658         * python/py-event.h (evpy_add_attribute)
8659         (gdbpy_initialize_event_generic): Constify.
8660         * python/py-evts.c (add_new_registry): Constify.
8661         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8662         * python/py-framefilter.c (get_py_iter_from_func): Constify.
8663         * python/py-inferior.c (get_buffer): Add cast.
8664         * python/py-param.c (parm_constant::name): Constify.
8665         * python/py-unwind.c (fprint_frame_id): Constify.
8666         * python/python.c (gdbpy_parameter_value): Constify.
8667         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8668         * remote.c (memory_packet_config::name): Constify.
8669         (show_packet_config_cmd, remote_write_bytes)
8670         (remote_buffer_add_string):
8671         * reverse.c (exec_reverse_once): Constify.
8672         * rs6000-tdep.c (variant::name, variant::description): Constify.
8673         * rust-exp.y (rustyyerror): Constify.
8674         * rust-lang.c (rust_op_name): Constify.
8675         * rust-lang.h (rustyyerror): Constify.
8676         * serial.h (serial_ops::name): Constify.
8677         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8678         (sh_sh3e_register_name, sh_sh2e_register_name)
8679         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8680         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8681         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8682         (sh_sh4al_dsp_register_name): Constify.
8683         * sh64-tdep.c (sh64_register_name): Constify.
8684         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8685         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8686         * stabsread.c (patch_block_stabs, read_type_number)
8687         (ref_map::stabs, ref_add, process_reference)
8688         (symbol_reference_defined, define_symbol, define_symbol)
8689         (error_type, read_type, read_member_functions, read_cpp_abbrev)
8690         (read_one_struct_field, read_struct_fields, read_baseclasses)
8691         (read_tilde_fields, read_struct_type, read_array_type)
8692         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8693         (read_huge_number, read_range_type, read_args, common_block_start)
8694         (find_name_end): Constify.
8695         * stabsread.h (common_block_start, define_symbol)
8696         (process_one_symbol, symbol_reference_defined, ref_add):
8697         * symfile.c (get_section_index, add_symbol_file_command):
8698         * symfile.h (get_section_index): Constify.
8699         * target-descriptions.c (tdesc_type::name): Constify.
8700         (tdesc_free_type): Add cast.
8701         * target.c (find_default_run_target):
8702         (add_deprecated_target_alias, find_default_run_target)
8703         (target_announce_detach): Constify.
8704         (do_option): Constify.
8705         * target.h (add_deprecated_target_alias): Constify.
8706         * thread.c (print_thread_info_1): Constify.
8707         * top.c (deprecated_readline_begin_hook, command_line_input):
8708         Constify.
8709         (init_main): Add casts.
8710         * top.h (handle_line_of_input): Constify.
8711         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8712         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8713         (tfind_command): Rename to ...
8714         (tfind_command_1): ... this and constify.
8715         (tfind_command): New function.
8716         (tfind_end_command, tfind_start_command): Adjust.
8717         (encode_source_string): Constify.
8718         * tracepoint.h (encode_source_string): Constify.
8719         * tui/tui-data.c (tui_partial_win_by_name): Constify.
8720         * tui/tui-data.h (tui_partial_win_by_name): Constify.
8721         * tui/tui-source.c (tui_set_source_content_nil): Constify.
8722         * tui/tui-source.h (tui_set_source_content_nil): Constify.
8723         * tui/tui-win.c (parse_scrolling_args): Constify.
8724         * tui/tui-windata.c (tui_erase_data_content): Constify.
8725         * tui/tui-windata.h (tui_erase_data_content): Constify.
8726         * tui/tui-winsource.c (tui_erase_source_content): Constify.
8727         * tui/tui.c (tui_enable): Add cast.
8728         * utils.c (defaulted_query): Constify.
8729         (init_page_info): Add cast.
8730         (puts_debug, subset_compare): Constify.
8731         * utils.h (subset_compare): Constify.
8732         * varobj.c (varobj_format_string): Constify.
8733         * varobj.h (varobj_format_string): Constify.
8734         * vax-tdep.c (vax_register_name): Constify.
8735         * windows-nat.c (windows_detach): Constify.
8736         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8737         * xml-support.c (gdb_xml_end_element): Constify.
8738         * xml-tdesc.c (tdesc_start_reg): Constify.
8739         * xstormy16-tdep.c (xstormy16_register_name): Constify.
8740         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8741         * xtensa-tdep.h (xtensa_register_t::name): Constify.
8742
8743 2017-04-05  Pedro Alves  <palves@redhat.com>
8744
8745         * proc-api.c (struct trans): Constify.
8746         (procfs_note): Constify.
8747         * proc-events.c (struct trans, syscall_table):
8748         * proc-flags.c (struct trans): Constify.
8749         * proc-utils.h (procfs_note): Constify.
8750         * proc-why.c (struct trans): Constify.
8751         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8752         (procfs_detach): Constify.
8753         * sol-thread.c (struct string_map): Constify.
8754         (td_err_string, td_state_string): Constify.
8755
8756 2017-04-05  Pedro Alves  <palves@redhat.com>
8757
8758         * proc-api.c (procfs_filename): Don't initialize
8759         procfs_filename.
8760         (prepare_to_trace): Assume procfs_filename is non-NULL.
8761         (_initialize_proc_api): Give procfs_filename a default value here.
8762
8763 2017-04-05  Pedro Alves  <palves@redhat.com>
8764
8765         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8766         'cond_string' parameter.
8767         (extract_exception_regexp): Constify 'string' parameter.
8768         (catch_exception_command_1): Constify.
8769         * breakpoint.c (init_catchpoint)
8770         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8771         parameter.
8772         (ep_parse_optional_if_clause, catch_fork_command_1)
8773         (catch_exec_command_1): Constify.
8774         * breakpoint.h (init_catchpoint): Constify 'cond_string'
8775         parameter.
8776         (ep_parse_optional_if_clause): Constify.
8777         * cli/cli-utils.c (remove_trailing_whitespace)
8778         (check_for_argument): Constify.
8779         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8780         non-const overload.
8781         (check_for_argument): Likewise.
8782
8783 2017-04-05  Pedro Alves  <palves@redhat.com>
8784
8785         * event-top.c (command_line_handler): Add cast to execute_command
8786         call.
8787         * record-btrace.c (cmd_record_btrace_bts_start)
8788         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8789         (cmd_record_btrace_start): Add cast to execute_command call.
8790         * record-full.c (record_full_goto_insn):
8791         * record.c (record_start, record_stop): Add cast to
8792         execute_command_to_string calls.
8793         (cmd_record_start): Add cast to execute_command calls.
8794
8795 2017-04-05  Pedro Alves  <palves@redhat.com>
8796
8797         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8798         static inline function.
8799         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8800         array and use gdb_PyArg_ParseTupleAndKeywords.
8801         * python/py-cmd.c (cmdpy_init): Likewise.
8802         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8803         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8804         (infpy_search_memory): Likewise.
8805         * python/py-objfile.c (objfpy_add_separate_debug_file)
8806         (gdbpy_lookup_objfile): Likewise.
8807         * python/py-symbol.c (gdbpy_lookup_symbol)
8808         (gdbpy_lookup_global_symbol): Likewise.
8809         * python/py-type.c (gdbpy_lookup_type): Likewise.
8810         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8811         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8812         Likewise.
8813
8814 2017-04-05  Pedro Alves  <palves@redhat.com>
8815
8816         * python/python-internal.h (gdb_PyGetSetDef): New type.
8817         * python/py-block.c (block_object_getset)
8818         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8819         * python/py-event.c (event_object_getset)
8820         (finish_breakpoint_object_getset): Likewise.
8821         * python/py-inferior.c (inferior_object_getset): Likewise.
8822         * python/py-infthread.c (thread_object_getset): Likewise.
8823         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8824         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8825         * python/py-objfile.c (objfile_getset): Likewise.
8826         * python/py-progspace.c (pspace_getset): Likewise.
8827         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8828         Likewise.
8829         * python/py-record.c (recpy_record_getset): Likewise.
8830         * python/py-symbol.c (symbol_object_getset): Likewise.
8831         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8832         Likewise.
8833         * python/py-type.c (type_object_getset, field_object_getset):
8834         Likewise.
8835         * python/py-value.c (value_object_getset): Likewise.
8836
8837 2017-04-05  Pedro Alves  <palves@redhat.com>
8838
8839         * python/python-internal.h (gdb_PyObject_CallMethod)
8840         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8841         New functions.
8842         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8843         (PySys_GetObject, PySys_SetPath): New macros.
8844
8845 2017-04-05  Pedro Alves  <palves@redhat.com>
8846
8847         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8848         info_osdata_command.
8849         * osdata.c (info_osdata_command): Rename to ...
8850         (info_osdata): ... this.  Constify 'type' parameter, and remove
8851         the 'from_tty' parameter.  Accept NULL TYPE.
8852         (info_osdata_command): New function.
8853         * osdata.h (info_osdata_command): Remove declaration.
8854         (info_osdata): New declaration.
8855
8856 2017-04-05  Pedro Alves  <palves@redhat.com>
8857
8858         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8859         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8860         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8861         parameter.
8862         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8863         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8864         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8865         parameter.
8866         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8867         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8868         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8869         (mi_cmd_file_list_exec_source_files)
8870         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8871         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8872         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8873         parameter.
8874         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8875         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8876         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8877         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8878         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8879         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8880         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8881         'command' parameter.
8882         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8883         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8884         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8885         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8886         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8887         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8888         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8889         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8890         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8891         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8892         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8893         parameter.
8894         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8895         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8896         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8897         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8898         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8899         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8900         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8901         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8902         (mi_cmd_data_list_changed_registers)
8903         (mi_cmd_data_write_register_values)
8904         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8905         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8906         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8907         (mi_cmd_list_features, mi_cmd_list_target_features)
8908         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8909         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8910         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8911         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8912         (mi_cmd_trace_frame_collected): Constify 'command'
8913         parameter.
8914         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8915         'command' parameter.
8916
8917 2017-04-05  Pedro Alves  <palves@redhat.com>
8918
8919         * ada-lang.c (ada_completer_word_break_characters): Now a const
8920         array.
8921         (ada_get_gdb_completer_word_break_characters): Constify.
8922         * completer.c (gdb_completer_command_word_break_characters)
8923         (gdb_completer_file_name_break_characters)
8924         (gdb_completer_quote_characters): Now const arrays.
8925         (get_gdb_completer_quote_characters): Constify.
8926         (set_rl_completer_word_break_characters): New function.
8927         (set_gdb_completion_word_break_characters)
8928         (complete_line_internal): Use it.
8929         * completer.h (get_gdb_completer_quote_characters): Constify.
8930         (set_rl_completer_word_break_characters): Declare.
8931         * f-lang.c (f_word_break_characters): Constify.
8932         * language.c (default_word_break_characters): Constify.
8933         * language.h (language_defn::la_word_break_characters): Constify.
8934         (default_word_break_characters): Constify.
8935         * top.c (init_main): Use set_rl_completer_word_break_characters.
8936
8937 2017-04-05  Pedro Alves  <palves@redhat.com>
8938
8939         * aix-thread.c (aix_thread_pid_to_str)
8940         (aix_thread_extra_thread_info): Constify.
8941         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8942         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8943         (bsd_uthread_pid_to_str): Constify.
8944         * corelow.c (core_pid_to_str): Constify.
8945         * darwin-nat.c (darwin_pid_to_str): Constify.
8946         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8947         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8948         Constify.
8949         * gnu-nat.c (gnu_pid_to_str): Constify.
8950         * go32-nat.c (go32_pid_to_str): Constify.
8951         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8952         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8953         * inferior.c (inferior_pid_to_str): Constify.
8954         * linux-nat.c (linux_nat_pid_to_str): Constify.
8955         * linux-tdep.c (linux_core_pid_to_str): Constify.
8956         * linux-thread-db.c (thread_db_pid_to_str)
8957         (thread_db_extra_thread_info): Constify.
8958         * nto-tdep.c (nto_extra_thread_info): Constify.
8959         * nto-tdep.h (nto_extra_thread_info): Constify.
8960         * obsd-nat.c (obsd_pid_to_str): Constify.
8961         * procfs.c (procfs_pid_to_str): Constify.
8962         * ravenscar-thread.c (ravenscar_extra_thread_info)
8963         (ravenscar_pid_to_str): Constify.
8964         * remote-sim.c (gdbsim_pid_to_str): Constify.
8965         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8966         Constify.
8967         * sol-thread.c (solaris_pid_to_str): Constify.
8968         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8969         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8970         * target.c (default_pid_to_str, target_pid_to_str)
8971         (normal_pid_to_str, default_pid_to_str): Constify.
8972         * target.h (target_ops::to_pid_to_str)
8973         (target_ops::to_extra_thread_info): Constify.
8974         (target_pid_to_str, normal_pid_to_str): Constify.
8975         * windows-nat.c (windows_pid_to_str): Constify.
8976         * gdbarch.sh (core_pid_to_str): Constify.
8977         * target-delegates.c: Regenerate.
8978         * gdbarch.h, gdbarch.c: Regenerate.
8979
8980 2017-04-05  Pedro Alves  <palves@redhat.com>
8981
8982         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8983         the memory of the temporary warning_pre_print override.
8984         * utils.c (warning_pre_print): Constify.
8985         * utils.h (warning_pre_print): Constify.
8986
8987 2017-04-05  Pedro Alves  <palves@redhat.com>
8988
8989         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8990         (shell_command): New function.
8991         (make_command): Use std::string.
8992         (init_cli_cmds): Register shell_command instead of shell_escape.
8993
8994 2017-04-05  Pedro Alves  <palves@redhat.com>
8995
8996         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8997         * tracepoint.c (default_collect): Don't initialize.
8998
8999 2017-04-05  Pedro Alves  <palves@redhat.com>
9000
9001         * macroexp.c (macro_buffer::shared): Now a bool.
9002         (init_buffer): Update.
9003         (init_shared_buffer): Constify 'addr' parameter.
9004         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9005         casts.
9006
9007 2017-04-05  Pedro Alves  <palves@redhat.com>
9008
9009         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9010         * disasm.c (set_disassembler_options): Constify local.
9011         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9012
9013 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9014
9015         PR gdb/21352
9016         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9017         option.
9018
9019 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9020
9021         * frame.c (frame_unwind_register_unsigned): Call
9022         frame_unwind_register_value.
9023
9024 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9025
9026         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9027         Use gdb_test_multiple, and don't match anchor.
9028
9029 2017-04-05  Pedro Alves  <palves@redhat.com>
9030
9031         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9032         (Write After Approval): Remove Simon Marchi.
9033
9034 2017-04-05  Pedro Alves  <palves@redhat.com>
9035
9036         * common/gdb_optional.h (optional::optional): Make constexpr and
9037         initialize m_dummy.
9038
9039 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9040
9041         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9042         (amd64fbsd_jmp_buf_reg_offset): Remove.
9043         (amd64fbsd_supply_uthread): Remove function.
9044         (amd64fbsd_collect_uthread): Remove function.
9045         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9046         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9047         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9048         (fbsd-nat.c): Update comment.
9049         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9050         (i386fbsd_jmp_buf_reg_offset): Remove.
9051         (i386fbsd_supply_uthread): Remove function.
9052         (i386fbsd_collect_uthread): Remove function.
9053         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9054
9055 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9056
9057         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9058         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9059         * NEWS: Mention that support for FreeBSD/alpha was removed.
9060         * alpha-fbsd-tdep.c: Delete file.
9061         * config/alpha/fbsd.mh: Delete file.
9062         * configure.host: Delete alpha*-*-freebsd* and
9063         alpha*-*-kfreebsd*-gnu.
9064         * configure.tgt: Delete alpha*-*-freebsd* and
9065         alpha*-*-kfreebsd*-gnu.
9066
9067 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9068
9069         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9070         amd64bsd_store_inferior_registers): Use ptid from regcache.
9071
9072 2017-04-04  Pedro Alves  <palves@redhat.com>
9073
9074         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9075         data fields, make them private and add "m_" prefixes.
9076         (lnp_state_machine::lnp_state_machine): New ctor.
9077         (record_line, check_line_address, handle_set_discriminator)
9078         (handle_set_address, handle_advance_pc, handle_special_opcode)
9079         (handle_advance_line, handle_set_file, handle_negate_stmt)
9080         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9081         (end_sequence, advance_line): New methods.
9082         (m_gdbarch, m_record_lines_p): New fields.
9083         (lnp_reader_state): Delete.
9084         (dwarf_record_line): Rename to ...
9085         (lnp_state_machine::record_line): ... adjust.
9086         (init_lnp_state_machine): Delete.
9087         (lnp_state_machine::lnp_state_machine): New.
9088         (check_line_address): Rename to ...
9089         (lnp_state_machine::check_line_address): This.
9090         (dwarf_decode_lines_1): Remove reference to "reader_state".
9091         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9092         State machine internal state manipulation moved to
9093         lnp_state_machine methods.
9094
9095 2017-04-04  Pedro Alves  <palves@redhat.com>
9096
9097         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9098         unittests/offset-type-selftests.c.
9099         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9100         * common/offset-type.h: New file.
9101         * common/preprocessor.h: New file.
9102         * common/traits.h: New file.
9103         * common/valid-expr.h: New file.
9104         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9105         sect_offset and cu_offset strong typedefs throughout.
9106         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9107         typedefs throughout.
9108         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9109         sect_offset and cu_offset strong typedefs throughout.
9110         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9111         typedefs throughout.
9112         * gdbtypes.h: Include "common/offset-type.h".
9113         (cu_offset): Now an offset type (strong typedef) instead of a
9114         struct.
9115         (sect_offset): Likewise.
9116         (union call_site_parameter_u): Rename "param_offset" field to
9117         "param_cu_off".
9118         * unittests/offset-type-selftests.c: New file.
9119
9120 2017-04-04  Pedro Alves  <palves@redhat.com>
9121
9122         * common/underlying.h: New file.
9123         * dwarf2read.c: Include "common/gdb_optional.h" and
9124         "common/underlying.h".
9125         (dir_index, file_name_index): New types.
9126         (file_entry): Use them.
9127         (file_entry::include): Use to_underlying.
9128         (line_header::add_file_name): Use dir_index.
9129         (read_formatted_entries): Use gdb::optional.  Read form before
9130         writting to file_entry.
9131         (dwarf_decode_line_header): Use dir_index.
9132         (lnp_state_machine::current_file): Use to_underlying.
9133         (lnp_state_machine::file): Change type to file_name_index.
9134         (dwarf_record_line): Use to_underlying.
9135         (init_lnp_state_machine): Use file_name_index.
9136         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9137
9138 2017-04-04  Pedro Alves  <palves@redhat.com>
9139
9140         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9141         operator bool, has_value and get methods.
9142
9143 2017-04-04  Pedro Alves  <palves@redhat.com>
9144
9145         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9146         fields.
9147         (line_header): Initialize all data fields.  Change type of
9148         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9149         Change type of include_dirs to std::vector<const char *>.  Remove
9150         num_include_dirs, include_dirs_size.  Change type of file_names to
9151         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9152         (line_header::line_header): New.
9153         (line_header::add_include_dir, line_header::add_file_name): New
9154         methods.
9155         (line_header::include_dir_at): Remove NULL check.
9156         (line_header::file_name_at): Add const overload.
9157         (line_header_up): New unique_ptr typedef.
9158         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9159         std::vector.  Remove free_line_header call.
9160         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9161         free_line_header call.
9162         (free_cu_line_header): Delete.
9163         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9164         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9165         Adjust to use std::vector.
9166         (free_line_header): Delete.
9167         (free_line_header_voidp): Use delete.
9168         (add_include_dir): Replace with ...
9169         (line_header::add_include_dir): ... this method.  Use std::vector.
9170         (add_file_name): Replace with ...
9171         (line_header::add_file_name): ... this method.  Use std::vector.
9172         (add_include_dir_stub): Delete.
9173         (read_formatted_entries): Remove memset.
9174         (dwarf_decode_line_header): Return a line_header_up instead of a
9175         raw pointer.  Remove cleanup handling.  Pass lambdas to
9176         read_formatted_entries.  Adjust to use line_header methods.
9177         (dwarf_decode_lines_1): Adjust to use line_header methods.
9178         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9179         use std::vector.
9180
9181 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9182
9183         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9184         instead of struct ptid.
9185
9186 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9187
9188         * frame.c (get_frame_register_bytes): Unwind using value.
9189         (put_frame_register_bytes): Likewise.
9190
9191 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9192
9193         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9194         aggregate-like.
9195
9196 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9197
9198         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9199
9200 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9201
9202         * gdbthread.h (struct thread_info): Declare constructor and
9203         destructor.  Add some in-class member initializers.
9204         * thread.c (free_thread): Remove.
9205         (init_thread_list): Call delete instead of free_thread.
9206         (new_thread): Call thread_info constructor.
9207         (thread_info::thread_info): New function.
9208         (thread_info::~thread_info): New function.
9209         (delete_thread_1): Call delete instead of free_thread.
9210         (make_cleanup_restore_current_thread): Move tp and frame to
9211         inner block.
9212
9213 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9214
9215         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9216         (arc_skip_prologue): Likewise.
9217         (arc_make_frame_cache): Likewise.
9218         (arc_pv_get_operand): New function.
9219         (arc_is_in_prologue): Likewise.
9220         (arc_analyze_prologue): Likewise.
9221         (arc_print_frame_cache): Likewise.
9222         (MAX_PROLOGUE_LENGTH): New constant.
9223
9224 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9225
9226         * configure.tgt: Add arc-insn.o.
9227         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9228         (dump_arc_instruction_command): New function.
9229         (arc_fprintf_disasm): Likewise.
9230         (arc_disassemble_info): Likewise.
9231         (arc_insn_get_operand_value): Likewise.
9232         (arc_insn_get_operand_value_signed): Likewise.
9233         (arc_insn_get_memory_base_reg): Likewise.
9234         (arc_insn_get_memory_offset): Likewise.
9235         (arc_insn_get_branch_target): Likewise.
9236         (arc_insn_dump): Likewise.
9237         (arc_insn_get_linear_next_pc): Likewise.
9238         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9239         (arc_disassemble_info): Likewise.
9240         (arc_insn_get_branch_target): Likewise.
9241         (arc_insn_get_linear_next_pc): Likewise.
9242         * NEWS: Mention new "maint print arc arc-instruction".
9243
9244 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9245
9246         * arc-tdep (maintenance_print_arc_list): New variable.
9247         (maintenance_print_arc_command): New function.
9248
9249 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9250
9251         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9252         Add "limm" and "reserved".
9253         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9254         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9255         * arc-tdep.h (arc_regnum): Likewise.
9256
9257 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9258
9259         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9260         for THREADPTR register.
9261         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9262         register.
9263         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9264         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9265         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9266
9267 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9268
9269         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9270         registers above gdbarch_num_regs (gdbarch) as privileged in
9271         call0 ABI.
9272
9273 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9274
9275         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9276         for a single specified register or for all registers in
9277         a0_base..a0_base + C0_NREGS range.
9278         (supply_gregset_reg): Call regcache_raw_supply for a single
9279         specified register or for all registers in a0_base..a0_base +
9280         C0_NREGS range.
9281
9282 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9283
9284         * arch/xtensa.h (C0_NREGS): Add definition.
9285         * xtensa-tdep.c (C0_NREGS): Remove definition.
9286
9287 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9288
9289         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9290         Drop xtensa_default_isa initialization.
9291         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9292
9293 2017-03-27  Pedro Alves  <palves@redhat.com>
9294
9295         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9296         (file_entry::include_dir): New method.
9297         (line_header::include_dir_at, line_header::file_name_at): New
9298         methods.
9299         (setup_type_unit_groups, setup_type_unit_groups)
9300         (psymtab_include_file_name): Simplify using the new methods.
9301         (lnp_state_machine) <the_line_header>: New field.
9302         <file>: Add comment.
9303         (lnp_state_machine::current_file): New method.
9304         (dwarf_record_line): Simplify using the new methods.
9305         (init_lnp_state_machine): Initialize the "the_line_header" field.
9306         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9307         Simplify using the new methods.
9308
9309 2017-03-27  Pedro Alves  <palves@redhat.com>
9310
9311         * cp-name-parser.y (make_empty): Delete.
9312         (demangler_special, nested_name, ptr_operator, array_indicator)
9313         (direct_declarator, declarator_1): Use fill_comp instead of
9314         make_empty.
9315
9316 2017-03-27  Pedro Alves  <palves@redhat.com>
9317
9318         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9319         to ATTRIBUTE_PRINTF.
9320         * solib-target.c (library_list_start_list): Print "string" not
9321         "version".
9322         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9323         gdb_xml_error call.
9324
9325 2017-03-27  Pedro Alves  <palves@redhat.com>
9326
9327         * dwarf2read.c (struct file_and_directory): New.
9328         (dwarf2_get_dwz_file): Adjust to use std::string.
9329         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9330         (find_file_and_directory): Adjust to return a file_and_directory
9331         object.
9332         (read_file_scope): Adjust to use file_and_directory.  Remove
9333         make_cleanup/do_cleanups calls.
9334         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9335         make_cleanup/do_cleanups calls.
9336         * python/python.c (do_start_initialization): Adjust to ldirname
9337         returning a std::string.
9338         * utils.c (ldirname): Now returns a std::string.
9339         * utils.h (ldirname): Change return type to std::string.
9340         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9341         returning a std::string.
9342         * xml-tdesc.c (file_read_description_xml): Likewise.
9343
9344 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9345
9346         * regcache.c (regcache_debug_print_register): New function.
9347         * regcache.h (regcache_debug_print_register): New declaration.
9348         * target.c (debug_print_register): Remove.
9349         (target_fetch_registers): Call regcache_debug_print_register.
9350         (target_store_registers): Likewise.
9351
9352 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9353
9354         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9355         reference beyond the 'lh->include_dirs' array before accessing to
9356         it.
9357         (psymtab_include_file_name): Likewise.
9358         (dwarf_decode_lines_1): Likewise.
9359         (dwarf_decode_lines): Likewise.
9360         (file_file_name): Likewise.
9361
9362 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9363
9364         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9365         inferior_ptid.
9366         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9367         ps_lsetfpregs): Likewise.
9368         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9369         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9370         ps_lsetfpregs): Likewise.
9371         * target.c (target_fetch_registers, target_store_registers):
9372         Remove asserts.
9373
9374 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9375
9376         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9377
9378 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9379
9380         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9381         (_initialize_aarch64_tdep): Register it.
9382         (aarch64_record_load_store): Handle PRFM instruction.
9383         (aarch64_process_record_test): New function.
9384
9385 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9386
9387         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9388         indentation.
9389
9390 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9391
9392         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9393
9394 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9395
9396         python/python.c (do_start_initialization): Fix memory leak.
9397
9398 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9399
9400         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9401         using get_ptrace_pid.
9402         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9403         inferior_ptid.
9404         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9405         inferior_ptid instead of pid.
9406
9407 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9408
9409         * aarch64-tdep.c: Wrap locally used classes in anonymous
9410         namespace.
9411         * arm-tdep.c: Likewise.
9412         * linespec.c: Likewise.
9413         * ui-out.c: Likewise.
9414
9415 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9416
9417         PR gdb/19637
9418         * python/lib/gdb/printer/bound_registers.py: Import sys.
9419
9420 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9421
9422         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9423         windows_thread_info parameter and use it instead of
9424         current_thread.
9425         (windows_fetch_inferior_registers): Don't set current_thread,
9426         pass the thread to do_windows_fetch_inferior_registers.  Use
9427         ptid from regcache instead of inferior_ptid.
9428         (do_windows_store_inferior_registers): Add windows_thread_info
9429         parameter and use it instead of current_thread.
9430         (windows_store_inferior_registers): Don't set current_thread,
9431         pass the thread to do_windows_store_inferior_registers.  Use
9432         ptid from regcache instead of inferior_ptid.
9433
9434 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9435
9436         * ser-mingw.c (ser_windows_raw): Remove reference to
9437         struct serial::current_timeout.
9438
9439 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9440
9441         PR tdep/20928
9442         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9443         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9444         (sparc64_fsr_type): Fix %fsr decoding.
9445
9446 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9447
9448         * python/py-record-btrace.c (btpy_insn_data): Change return type
9449         for Python 2.
9450
9451 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9452
9453         * spu-linux-nat.c (spu_fetch_inferior_registers,
9454         spu_store_inferior_registers): Use ptid from regcache, set and
9455         restore inferior_ptid.
9456         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9457         Likewise.
9458
9459 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9460
9461         * i386-linux-nat.c (fetch_register, store_register,
9462         i386_linux_fetch_inferior_registers,
9463         i386_linux_store_inferior_registers): Use ptid from regcache.
9464         * ia64-linux-nat.c (ia64_linux_fetch_register,
9465         ia64_linux_store_register): Likewise.
9466         * inf-ptrace.c (inf_ptrace_fetch_register,
9467         inf_ptrace_store_register): Likewise.
9468         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9469         m32r_linux_store_inferior_registers): Likewise.
9470         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9471         m68kbsd_store_inferior_registers): Likewise.
9472         * m68k-linux-nat.c (fetch_register, store_register,
9473         m68k_linux_fetch_inferior_registers,
9474         m68k_linux_store_inferior_registers): Likewise.
9475         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9476         m88kbsd_store_inferior_registers): Likewise.
9477         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9478         mips_fbsd_store_inferior_registers): Likewise.
9479         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9480         mips64_linux_regsets_store_registers): Likewise.
9481         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9482         mipsnbsd_store_inferior_registers): Likewise.
9483         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9484         mips64obsd_store_inferior_registers): Likewise.
9485         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9486         Likewise.
9487         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9488         ppcfbsd_store_inferior_registers): Likewise.
9489         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9490         ppc_linux_store_inferior_registers): Likewise.
9491         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9492         ppcnbsd_store_inferior_registers): Likewise.
9493         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9494         ppcobsd_store_registers): Likewise.
9495         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9496         Likewise.
9497         * ravenscar-thread.c (ravenscar_fetch_registers,
9498         ravenscar_store_registers, ravenscar_prepare_to_store):
9499         Likewise.
9500         * record-btrace.c (record_btrace_fetch_registers,
9501         record_btrace_store_registers, record_btrace_prepare_to_store):
9502         Likewise.
9503         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9504         Lookup inferior using ptid from regcache, instead of
9505         current_inferior.
9506         * remote.c (remote_fetch_registers, remote_store_registers): Use
9507         ptid from regcache.
9508         * rs6000-nat.c (fetch_register, store_register): Likewise.
9509         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9510         s390_linux_store_inferior_registers): Likewise.
9511         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9512         shnbsd_store_inferior_registers): Likewise.
9513         * sol-thread.c (sol_thread_fetch_registers,
9514         sol_thread_store_registers): Likewise.
9515         * sparc-nat.c (sparc_fetch_inferior_registers,
9516         sparc_store_inferior_registers): Likewise.
9517         * tilegx-linux-nat.c (fetch_inferior_registers,
9518         store_inferior_registers): Likewise.
9519         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9520         vaxbsd_store_inferior_registers): Likewise.
9521         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9522         store_xtregs): Likewise.
9523
9524 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9525
9526         PR gdb/14441
9527         * NEWS: Mention support for rvalue references in GDB and python.
9528         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9529         supports both lvalue and rvalue references.
9530
9531 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9532
9533         PR gdb/14441
9534         * gdbtypes.c (rank_one_type): Implement overloading
9535         resolution rules regarding rvalue references.
9536
9537 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9538
9539         PR gdb/14441
9540         * aarch64-tdep.c (aarch64_type_align)
9541         (aarch64_extract_return_value, aarch64_store_return_value): Change
9542         lvalue reference type checks to general reference type checks.
9543         * amd64-tdep.c (amd64_classify): Likewise.
9544         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9545         Likewise.
9546         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9547         (arm_store_return_value): Likewise.
9548         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9549         * c-typeprint.c (c_print_type): Likewise.
9550         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9551         (cplus_number_of_children, cplus_describe_child): Likewise.
9552         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9553         * completer.c (expression_completer): Likewise.
9554         * cp-support.c (make_symbol_overload_list_adl_namespace):
9555         Likewise.
9556         * darwin-nat-info.c (info_mach_region_command): Likewise.
9557         * dwarf2loc.c (entry_data_value_coerce_ref)
9558         (value_of_dwarf_reg_entry): Likewise.
9559         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9560         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9561         Likewise.
9562         * findvar.c (extract_typed_address, store_typed_address):
9563         Likewise.
9564         * gdbtypes.c (rank_one_type): Likewise.
9565         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9566         * infcall.c (value_arg_coerce): Likewise.
9567         * language.c (pointer_type): Likewise.
9568         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9569         Likewise.
9570         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9571         * mn10300-tdep.c (mn10300_type_align): Likewise.
9572         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9573         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9574         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9575         Likewise.
9576         * printcmd.c (print_formatted, x_command): Likewise.
9577         * python/py-type.c (typy_get_composite, typy_template_argument):
9578         Likewise.
9579         * python/py-value.c (valpy_referenced_value)
9580         (valpy_get_dynamic_type, value_has_field): Likewise.
9581         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9582         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9583         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9584         * spu-tdep.c (spu_scalar_value_p): Likewise.
9585         * symtab.c (lookup_symbol_aux): Likewise.
9586         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9587         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9588         Likewise.
9589         * valops.c (value_cast_pointers, value_cast)
9590         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9591         (value_struct_elt, value_struct_elt_bitpos)
9592         (value_find_oload_method_list, find_overload_match)
9593         (value_rtti_indirect_type): Likewise.
9594         * valprint.c (val_print_scalar_type_p, generic_val_print):
9595         Likewise.
9596         * value.c (value_actual_type, value_as_address, unpack_long)
9597         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9598         (coerce_ref): Likewise.
9599         * varobj.c (varobj_get_value_type): Likewise.
9600
9601 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9602
9603         PR gdb/14441
9604         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9605         table of constants.
9606         * python/lib/gdb/command/explore.py: Support exploring values
9607         of rvalue reference types.
9608         * python/lib/gdb/types.py: Implement get_basic_type() for
9609         rvalue reference types.
9610         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9611         constant.
9612         * python/py-value.c (valpy_getitem): Add an rvalue reference
9613         check.
9614         (valpy_reference_value): Add new parameter "refcode".
9615         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9616         New wrappers for valpy_reference_value().
9617         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9618         (gdbpy_invoke_xmethod): Likewise.
9619
9620 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9621
9622         PR gdb/14441
9623         * dwarf2read.c (process_die, read_type_die_1): Handle the
9624         DW_TAG_rvalue_reference_type DIE.
9625         (read_tag_reference_type): Add new parameter "refcode".
9626
9627 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9628
9629         PR gdb/14441
9630         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9631         (c_type_print_modifier, c_type_print_varspec_suffix)
9632         (c_type_print_base): Support printing rvalue reference types.
9633         * c-valprint.c (c_val_print, c_value_print): Support printing
9634         rvalue reference values.
9635
9636 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9637
9638         PR gdb/14441
9639         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9640         typename.
9641         * cp-support.c (replace_typedefs): Handle
9642         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9643         * python/py-type.c (typy_lookup_type): Likewise.
9644
9645 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9646
9647         PR gdb/14441
9648         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9649         * parse.c (insert_type): Change assert statement.
9650         (follow_types): Handle rvalue reference types.
9651         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9652         constant.
9653
9654 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9655
9656         PR gdb/14441
9657         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9658         value_ref() interface.
9659         * c-valprint.c (c_value_print): Likewise.
9660         * infcall.c (value_arg_coerce): Likewise.
9661         * python/py-value.c (valpy_reference_value): Likewise.
9662         * valops.c (value_cast, value_reinterpret_cast)
9663         (value_dynamic_cast, typecmp): Likewise.
9664         (value_ref): Parameterize by kind of return value reference type.
9665         * value.h (value_ref): Add new parameter "refcode".
9666
9667 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9668
9669         PR gdb/14441
9670         * dwarf2read.c (read_tag_reference_type): Use
9671         lookup_lvalue_reference_type() instead of lookup_reference_type().
9672         * eval.c (evaluate_subexp_standard): Likewise.
9673         * f-exp.y: Likewise.
9674         * gdbtypes.c (make_reference_type, lookup_reference_type):
9675         Generalize with rvalue reference types.
9676         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9677         convenience wrappers for lookup_reference_type().
9678         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9679         reference kind parameter.
9680         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9681         wrappers for lookup_reference_type().
9682         * guile/scm-type.c (gdbscm_type_reference): Use
9683         lookup_lvalue_reference_type() instead of lookup_reference_type().
9684         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9685         * parse.c (follow_types): Likewise.
9686         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9687         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9688         Likewise.
9689         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9690         (gdbpy_invoke_xmethod): Likewise.
9691         * stabsread.c: Provide extra argument to make_reference_type()
9692         call.
9693         * valops.c (value_ref, value_rtti_indirect_type): Use
9694         lookup_lvalue_reference_type() instead of lookup_reference_type().
9695
9696 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9697
9698         PR gdb/14441
9699         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9700         (TYPE_IS_REFERENCE): New macro.
9701         (struct type): Add rvalue_reference_type field.
9702         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9703
9704 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9705
9706         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9707         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9708         New function definition.
9709         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9710         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9711         New function declaration.
9712         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9713         * mi/mi-interp.h: New file.
9714         * solib.c (info_sharedlibrary_command): Replace for loop with
9715         ALL_SO_LIBS macro
9716         * solib.h (update_solib_list): New function declaration.
9717         (so_list_head): Move macro.
9718         * solist.h (ALL_SO_LIBS): New macro.
9719
9720 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9721
9722         * infcmd.c (post_create_inferior): Remove unused argument in
9723         call to solib_add.
9724         * remote.c (remote_start_remote): Likewise.
9725         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9726         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9727         (enable_break): Likewise.
9728         * solib.c (update_solib_list): Remove unused target argument
9729         and its documentation.
9730         (solib_add): Remove unused target argument.  Remove unused
9731         argument in call to update_solib_list.
9732         (info_sharedlibrary_command): Remove unused argument in call
9733         to update_solib_list.
9734         (sharedlibrary_command): Remove unused argument in call to
9735         solib_add.
9736         (handle_solib_event): Likewise.
9737         (reload_shared_libraries): Likewise.
9738         * solib.h (solib_add): Remove unused target argument.
9739
9740 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9741
9742         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9743         (s390_displaced_step_fixup): Cover relative branches with the
9744         default fixup handling.  This fixes lack of support for some
9745         relative branch instructions.
9746
9747 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9748
9749         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9750         ptid from regcache.
9751
9752 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9753
9754         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9755         i386_darwin_store_inferior_registers): Use ptid from regcache.
9756
9757 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9758
9759         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9760         i386bsd_store_inferior_registers): Use ptid from regcache.
9761
9762 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9763
9764         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9765         hppaobsd_store_registers): Use ptid from regcache.
9766
9767 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9768
9769         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9770         hppanbsd_store_registers): Use ptid from regcache.
9771
9772 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9773
9774         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9775         from regcache.  Use get_ptrace_pid.
9776
9777 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9778
9779         * corelow.c (get_core_register_section): Use ptid from regcache,
9780         update doc.
9781
9782 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9783
9784         * bsd-uthread.c (bsd_uthread_fetch_registers,
9785         bsd_uthread_store_registers): Use ptid from regcache, set and
9786         restore inferior_ptid.
9787
9788 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9789
9790         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9791         fetch_fp_regs, store_register, store_regs, store_fp_register,
9792         store_fp_regs): Use ptid from regcache.
9793
9794 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9795
9796         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9797         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9798         store_vfp_regs): Use ptid from regcache.
9799
9800 2017-03-17  Pedro Alves  <palves@redhat.com>
9801
9802         PR remote/21188
9803         * ser-base.c (ser_base_wait_for): Add comment.
9804         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9805         version.
9806         * ser-unix.c (hardwire_raw): Remove reference to
9807         scb->current_timeout.
9808         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9809         (hardwire_ops): Install ser_base_readchar instead of
9810         hardwire_readchar.
9811         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9812         Remove fields.
9813
9814 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9815
9816         PR gdb/19637
9817         * python/lib/gdb/printer/bound_registers.py: Add support for
9818         Python 3.
9819
9820 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9821
9822         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9823         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9824         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9825         byte_offset to subobj_byte_offset.  Fix the handling of
9826         DWARF_VALUE_STACK on big-endian targets when coming via an
9827         implicit pointer.
9828         (dwarf2_evaluate_loc_desc): Adjust call to
9829         dwarf2_evaluate_loc_desc_full.
9830         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9831         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9832
9833 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9834
9835         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9836         and REVSH instructions.
9837
9838 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9839
9840         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9841         (arm_record_test): Declare.
9842         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9843         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9844         align with the manual.
9845         (thumb_record_misc): Adjust the code order to align with the
9846         manual.
9847         (thumb2_record_decode_insn_handler): Fix instruction matching.
9848         (instruction_reader_thumb): New class.
9849         (arm_record_test): New function.
9850
9851 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9852
9853         * arm-tdep.c (abstract_memory_reader): New class.
9854         (instruction_reader): New class.
9855         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9856         (decode_insn): Likewise.
9857
9858 2017-03-16  Doug Evans  <dje@google.com>
9859
9860         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9861         member.  Change type of TYPE member to SCM.  All uses updated.
9862         (lsscm_make_lazy_string_smob): Add assert.
9863         (lsscm_make_lazy_string): Flag bad length values.
9864         (lsscm_elt_type): New function.
9865         (gdbscm_lazy_string_to_value): Rewrite to use
9866         lsscm_safe_lazy_string_to_value.
9867         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9868         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9869         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9870         in incoming type.
9871         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9872         * guile/scm-type.c (tyscm_scm_to_type): New function.
9873
9874 2017-03-15  Doug Evans  <dje@google.com>
9875
9876         PR python/17728, python/18439, python/18779
9877         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9878         member.  Change type of TYPE member to PyObject *.  All uses updated.
9879         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9880         (gdbpy_create_lazy_string_object): Flag bad length values.
9881         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9882         Handle typedefs in incoming type.
9883         (stpy_lazy_string_elt_type): New function.
9884         (gdbpy_extract_lazy_string): Call it.
9885         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9886         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9887         typedefs in incoming type.
9888
9889 2017-03-16  Doug Evans  <dje@google.com>
9890
9891         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9892         * guile/scm-type.c (tyscm_scm_to_type): New function.
9893
9894 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9895
9896         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9897         "ULONGEST" for "skip".
9898
9899 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9900
9901         PR gdb/21220
9902         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9903         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9904         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9905         over ptrace peek/poke until end of buffer or error.
9906
9907 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9908
9909         * parse.c (length_of_subexp): Make static.
9910         * parser-defs.h (length_of_subexp): Remove.
9911
9912 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9913
9914         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9915         as well.
9916
9917 2017-03-14  Pedro Alves  <palves@redhat.com>
9918
9919         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9920         (main): Use std::unique_ptr.  Remove calls to
9921         cp_demangled_name_parse_free.
9922
9923 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9924
9925         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9926         alphabsd_store_inferior_registers): Use regcache->ptid instead
9927         of inferior_ptid.
9928
9929 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9930
9931         * aix-thread.c (aix_thread_fetch_registers,
9932         aix_thread_store_registers): Use regcache->ptid instead of
9933         inferior_ptid.
9934
9935 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9936
9937         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9938         store_gregs_to_thread, fetch_fpregs_from_thread,
9939         store_fpregs_to_thread): Use regcache->ptid instead of
9940         inferior_ptid.
9941
9942 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9943
9944         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9945         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9946         instead of inferior_ptid.
9947
9948 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9949
9950         * target.c (target_fetch_registers, target_store_registers): Add
9951         assert.
9952
9953 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9954
9955         * regcache.h (regcache_get_ptid): New function.
9956         * regcache.c (regcache_get_ptid): New function.
9957
9958 2017-03-13  Mark Wielaard  <mark@klomp.org>
9959
9960         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9961
9962 2017-03-10  Keith Seitz  <keiths@redhat.com>
9963
9964         PR c++/8218
9965         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9966
9967 2017-03-08  Pedro Alves  <palves@redhat.com>
9968
9969         PR gdb/18360
9970         * infrun.c (start_step_over, do_target_resume, resume)
9971         (restart_threads): Assert we're not resuming a thread that is
9972         meant to be stopped.
9973         (infrun_thread_stop_requested_callback): Delete.
9974         (infrun_thread_stop_requested): If the thread is internally
9975         stopped, queue a pending stop event and clear the thread's
9976         inline-frame state.
9977         (handle_stop_requested): New function.
9978         (handle_syscall_event, handle_inferior_event_1): Use
9979         handle_stop_requested.
9980         (handle_stop_requested): New function.
9981         (handle_signal_stop): Set the thread's stop_signal here instead of
9982         at caller.
9983         (finish_step_over): Clear step over info unconditionally.
9984         (handle_signal_stop): If the user had interrupted the event
9985         thread, consider the stop a random signal.
9986         (handle_signal_stop) <signal arrived while stepping over
9987         breakpoint>: Don't restart threads here.
9988         (stop_waiting): Don't clear step-over info here.
9989
9990 2017-03-08  Pedro Alves  <palves@redhat.com>
9991
9992         PR 21206
9993         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9994         goes to argument 2, not 1.
9995
9996 2017-03-08  Pedro Alves  <palves@redhat.com>
9997
9998         PR cli/21218
9999         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10000         display_gdb_prompt.
10001         (command_line_input): Add comment.
10002
10003 2017-03-08  Pedro Alves  <palves@redhat.com>
10004
10005         PR tui/21216
10006         * tui/tui-file.c (tui_file::write): New.
10007         * tui/tui-file.h (tui_file): Override "write".
10008         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10009         factored out from ...
10010         (tui_puts): ... here.
10011         (tui_putc): Use them.
10012         (tui_write): New function.
10013         * tui/tui-io.h (tui_write): Declare.
10014
10015 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10016
10017         * Makefile.in (SFILES): Replace "environ.c" with
10018         "common/environ.c".
10019         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10020         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10021         to...
10022         * common/environ.c: ... here.
10023         * environ.h: Moved to...
10024         * common/environ.h: ... here.
10025
10026 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10027
10028         * gdbarch.sh (pstring_ptr): New static function.
10029         (gdbarch_disassembler_options): Use it.
10030         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10031         not valid_disassembler_option->name.
10032         * gdbarch.c: Regenerate.
10033
10034 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10035
10036         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10037
10038 2017-03-07  Pedro Alves  <palves@redhat.com>
10039
10040         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10041
10042 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10043
10044         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10045         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10046         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10047         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10048
10049 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10050
10051         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10052
10053 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10054
10055         * remote.c (remote_add_target_side_commands): Use range-based
10056         for loop.
10057
10058 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10059
10060         PR gdb/21165
10061         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10062         value is lazy.
10063         * valprint.c (common_val_print): Likewise.
10064
10065 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10066
10067         * NEWS: Mention new set/show disassembler-options commands.
10068         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10069         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10070         (prospective_options): New static variable.
10071         (gdb_disassembler::gdb_disassembler): Initialize
10072         m_di.disassembler_options.
10073         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10074         (get_disassembler_options): New function.
10075         (set_disassembler_options): Likewise.
10076         (set_disassembler_options_sfunc): Likewise.
10077         (show_disassembler_options_sfunc): Likewise.
10078         (disassembler_options_completer): Likewise.
10079         (_initialize_disasm): Likewise.
10080         * disasm.h (get_disassembler_options): New prototype.
10081         (set_disassembler_options): Likewise.
10082         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10083         (gdbarch_verify_disassembler_options): Likewise.
10084         * gdbarch.c: Regenerate.
10085         * gdbarch.h: Likewise.
10086         * arm-tdep.c (num_disassembly_options): Delete.
10087         (set_disassembly_style): Likewise.
10088         (arm_disassembler_options): New static variable.
10089         (set_disassembly_style_sfunc): Convert short style name into long
10090         option name.  Call set_disassembler_options.
10091         (show_disassembly_style_sfunc): New function.
10092         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10093         set_gdbarch_verify_disassembler_options.
10094         (_initialize_arm_tdep): Delete regnames variable and update callers.
10095         (arm_disassembler_options): Initialize.
10096         (disasm_options): New variable.
10097         (num_disassembly_options): Rename from this...
10098         (num_disassembly_styles): ...to this.  Compute by scanning through
10099         disasm_options.
10100         (valid_disassembly_styles): Initialize using disasm_options.
10101         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10102         set_arm_regname_option.
10103         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10104         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10105         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10106         set_gdbarch_verify_disassembler_options.
10107         * s390-tdep.c (s390_disassembler_options): New static variable.
10108         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10109         set_gdbarch_verify_disassembler_options.
10110
10111 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10112
10113         * remote.c (remote_add_target_side_condition): Remove "struct"
10114         keyword from range-based for loop.
10115
10116 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10117
10118         * remote.c (remote_add_target_side_condition): Use range-based
10119         for loop.  Update comment.
10120
10121 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10122
10123         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10124
10125 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10126
10127         * regcache.c (regcache_raw_update): New function.
10128         (regcache_raw_read): Move code to regcache_raw_update.
10129         * regcache.h (regcache_raw_update): New declaration.
10130         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10131
10132 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10133
10134         * dwarf2read.c (create_debug_type_hash_table): Initialize
10135         header.signature and header.type_offset_in_tu.
10136
10137 2017-02-24  Pedro Alves  <palves@redhat.com>
10138
10139         * symtab.c (make_file_symbol_completion_list_1): Use
10140         add_symtab_completions.
10141
10142 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10143
10144         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10145
10146 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10147
10148         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10149         I386_MAX_REGISTER_SIZE.
10150         (i386_pseudo_register_write): Likewise.
10151         (i386_process_record): Likewise.
10152         * i387-tdep.c (i387_supply_xsave): Likewise.
10153         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10154         (store_register): Likewise.
10155
10156 2017-02-23  Pedro Alves  <palves@redhat.com>
10157
10158         * ada-lang.c: Include "common/function-view.h".
10159         (ada_iterate_over_symbols): Adjust to use function_view as
10160         callback type.
10161         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10162         (ada_make_symbol_completion_list): Use a lambda.
10163         (ada_exc_search_name_matches): Delete.
10164         (name_matches_regex): New.
10165         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10166         * compile/compile-c-support.c: Include "common/function-view.h".
10167         (print_one_macro): Change prototype to accept a ui_file pointer.
10168         (write_macro_definitions): Use a lambda.
10169         * dwarf2read.c: Include "common/function-view.h".
10170         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10171         (dw2_expand_symtabs_matching): Adjust to use function_view as
10172         callback type.
10173         * language.h: Include "common/function-view.h".
10174         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10175         function_view as callback type.
10176         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10177         * linespec.c: Include "common/function-view.h".
10178         (collect_info::add_symbol): New method.
10179         (struct symbol_and_data_callback, iterate_inline_only, struct
10180         symbol_matcher_data, iterate_name_matcher): Delete.
10181         (iterate_over_all_matching_symtabs): Adjust to use function_view
10182         as callback type and lambdas.
10183         (iterate_over_file_blocks): Adjust to use function_view as
10184         callback type.
10185         (decode_compound_collector): Now a class with private fields.
10186         (decode_compound_collector::release_symbols): New method.
10187         (collect_one_symbol): Rename to...
10188         (decode_compound_collector::operator()): ... this and adjust.
10189         (lookup_prefix_sym): decode_compound_collector construction bits
10190         move to decode_compound_collector ctor.  Pass the
10191         decode_compound_collector object directly as callback.  Remove
10192         cleanups and use decode_compound_collector::release_symbols
10193         instead.
10194         (symtab_collector): Now a class with private fields.
10195         (symtab_collector::release_symtabs): New method.
10196         (add_symtabs_to_list): Rename to...
10197         (symtab_collector::operator()): ... this and adjust.
10198         (collect_symtabs_from_filename): symtab_collector construction
10199         bits move to symtab_collector ctor.  Pass the symtab_collector
10200         object directly as callback.  Remove cleanups and use
10201         symtab_collector::release_symtabs instead.
10202         (collect_symbols): Delete.
10203         (add_matching_symbols_to_info): Use lambdas.
10204         * macrocmd.c (print_macro_callback): Delete.
10205         (info_macro_command): Use a lambda.
10206         (info_macros_command): Pass print_macro_definition as callable
10207         directly.
10208         (print_one_macro): Remove 'ignore' parameter.
10209         (macro_list_command): Adjust.
10210         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10211         (macro_for_each_data::user_data): Delete field.
10212         (foreach_macro): Adjust to call the function_view.
10213         (macro_for_each): Adjust to use function_view as callback type.
10214         (foreach_macro_in_scope): Adjust to call the function_view.
10215         (macro_for_each_in_scope): Adjust to use function_view as callback
10216         type.
10217         * macrotab.h: Include "common/function-view.h".
10218         (macro_callback_fn): Declare a prototype instead of a pointer.
10219         Remove "user_data" parameter.
10220         (macro_for_each, macro_for_each_in_scope): Adjust to use
10221         function_view as callback type.
10222         * psymtab.c (partial_map_expand_apply)
10223         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10224         Adjust to use function_view as callback type and to return bool.
10225         (psym_expand_symtabs_matching): Adjust to use function_view as
10226         callback types.
10227         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10228         to use function_view as callback type and to return bool.
10229         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10230         callback types.
10231         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10232         as callback types.
10233         * symfile.h: Include "common/function-view.h".
10234         (expand_symtabs_file_matcher_ftype)
10235         (expand_symtabs_symbol_matcher_ftype)
10236         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10237         return bool.
10238         (quick_symbol_functions::map_symtabs_matching_filename)
10239         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10240         function_view as callback type and return bool.
10241         (expand_symtabs_matching): Adjust to use function_view as callback
10242         type.
10243         (maintenance_expand_name_matcher)
10244         (maintenance_expand_file_matcher): Delete.
10245         (maintenance_expand_symtabs): Use lambdas.
10246         * symtab.c (iterate_over_some_symtabs): Adjust to use
10247         function_view as callback types and return bool.
10248         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10249         of a cleanup.
10250         (lookup_symtab_callback): Delete.
10251         (lookup_symtab): Use a lambda.
10252         (iterate_over_symbols): Adjust to use function_view as callback
10253         type.
10254         (struct search_symbols_data, search_symbols_file_matches)
10255         (search_symbols_name_matches): Delete.
10256         (search_symbols): Use a pair of lambdas.
10257         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10258         (symtab_expansion_callback): Delete.
10259         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10260         * symtab.h: Include "common/function-view.h".
10261         (iterate_over_some_symtabs): Adjust to use function_view as
10262         callback type and return bool.
10263         (iterate_over_symtabs): Adjust to use function_view as callback
10264         type.
10265         (symbol_found_callback_ftype): Remove 'data' parameter and return
10266         bool.
10267         (iterate_over_symbols): Adjust to use function_view as callback
10268         type.
10269
10270 2017-02-23  Pedro Alves  <palves@redhat.com>
10271
10272         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10273         (%.o) <unittests/%.c>: New pattern.
10274         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10275         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10276         * common/function-view.h: New file.
10277         * unittests/function-view-selftests.c: New file.
10278         * configure: Regenerate.
10279
10280 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10281
10282         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10283         inferior_ptid.
10284         * go32-nat.c (go32_thread_alive): Likewise.
10285
10286 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10287
10288         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10289         delete.
10290
10291 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10292
10293         * varobj.c (varobj_clear_saved_item): Use delete instead of
10294         xfree.
10295         (update_dynamic_varobj_children): Likewise.
10296
10297 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10298
10299         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10300
10301 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10302
10303         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10304         m_enum_value to 0 in default constructor.
10305
10306 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10307
10308         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10309         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10310         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10311         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10312         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10313         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10314         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10315         IS_STORE_CONDITIONAL_INSN.
10316
10317 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10318
10319         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10320
10321 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10322
10323         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10324
10325 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10326
10327         * dwarf2read.c (skip_one_die, read_attribute_value)
10328         (dwarf2_const_value_attr, dump_die_shallow)
10329         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10330         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10331
10332 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10333
10334         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10335         (dwarf_parse_macro_header): Accept DWARF version 5.
10336         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10337
10338 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10339
10340         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10341         DW_AT_GNU_*.
10342         * common/common-exceptions.h (enum errors): Likewise.
10343         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10344         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10345         (dwarf_expr_context::execute_stack_op): Likewise.
10346         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10347         Likewise.
10348         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10349         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10350         (show_entry_values_debug, call_site_to_target_addr)
10351         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10352         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10353         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10354         (value_of_dwarf_block_entry, indirect_pieced_value)
10355         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10356         (disassemble_dwarf_expression): Likewise.
10357         * dwarf2read.c (process_die, inherit_abstract_dies)
10358         (read_call_site_scope): Likewise.
10359         * gdbtypes.h (struct func_type, struct call_site_parameter)
10360         (struct call_site): Likewise.
10361         * stack.c (read_frame_arg): Likewise.
10362         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10363
10364 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10365
10366         * defs.h (read_unsigned_leb128): New declaration.
10367         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10368         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10369         (dwarf2_find_location_expression): Call also
10370         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10371         * dwarf2loc.h (dwarf2_version): New declaration.
10372         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10373         rnglists.
10374         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10375         .debug_rnglists.
10376         (struct dwop_section_names): Add loclists_dwo.
10377         (dwop_section_names): Add .debug_loclists.dwo.
10378         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10379         (struct dwarf2_per_cu_data): Add dwarf_version.
10380         (struct dwo_sections): Add loclists.
10381         (struct attr_abbrev): Add implicit_const.
10382         (read_indirect_line_string): New declaration.
10383         (read_unsigned_leb128): Delete declaration.
10384         (rcuh_kind): New definition.
10385         (read_and_check_comp_unit_head): Change parameter
10386         is_debug_types_section to section_kind.
10387         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10388         (read_comp_unit_head): Change parameter abfd to section, add parameter
10389         section_kind.  Handle DWARF-5.
10390         (error_check_comp_unit_head): Accept also DWARF version 5.
10391         (read_and_check_comp_unit_head): Change parameter
10392         is_debug_types_section to section_kind.
10393         (read_and_check_type_unit_head): Delete function.
10394         (read_abbrev_offset): Handle DWARF-5.
10395         (create_debug_type_hash_table): Add parameter section_kind.  Process
10396         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10397         comp_unit_head.
10398         (create_debug_types_hash_table): Update create_debug_type_hash_table
10399         caller.
10400         (create_all_type_units): Call create_debug_type_hash_table.
10401         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10402         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10403         caller.
10404         (skip_one_die): Handle DW_FORM_implicit_const.
10405         (dwarf2_rnglists_process): New function.
10406         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10407         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10408         (read_attribute_value): Handle DW_FORM_implicit_const,
10409         DW_FORM_line_strp.
10410         (read_attribute): Handle DW_FORM_implicit_const.
10411         (read_indirect_string_at_offset_from): New function from
10412         read_indirect_string_at_offset.
10413         (read_indirect_string_at_offset): Call
10414         read_indirect_string_at_offset_from.
10415         (read_indirect_line_string_at_offset): New function.
10416         (read_indirect_string): New function comment.
10417         (read_indirect_line_string): New function.
10418         (read_unsigned_leb128): Make it global.
10419         (dwarf2_string_attr): Handle DWARF-5.
10420         (add_include_dir_stub, read_formatted_entries): New functions.
10421         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10422         Handle DWARF-5.
10423         (per_cu_header_read_in): Update read_comp_unit_head caller.
10424         (dwarf2_version): New function.
10425         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10426         rnglists.
10427         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10428         fields.
10429
10430 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10431
10432         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10433
10434 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10435
10436         * dwarf2read.c (dwarf2_ranges_process): New function from
10437         dwarf2_ranges_read.
10438         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10439         dwarf2_ranges_process.
10440
10441 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10442
10443         * dwarf2read.c (create_debug_type_hash_table): New function from
10444         create_debug_types_hash_table.
10445         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10446         (create_all_type_units, open_and_init_dwo_file): Update
10447         create_debug_types_hash_table callers.
10448
10449 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10450
10451         PR gdb/16188
10452         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10453         refer to 'ap', not 'args'.
10454
10455 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10456             Pedro Alves  <palves@redhat.com>
10457
10458         PR gdb/16188
10459         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10460         calls succeeded.
10461         * fork-child.c (trace_start_error): New function.
10462         (trace_start_error_with_name): Likewise.
10463         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10464         * inf-ptrace.c (inf_ptrace_me): Likewise.
10465         * inferior.h (trace_start_error): New prototype.
10466         (trace_start_error_with_name): Likewise.
10467
10468 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10469
10470         PR gdb/21164
10471         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10472         NULL before using it.
10473         * symmisc.c (maintenance_print_symbols): Likewise.
10474         (maintenance_print_msymbols): Likewise.
10475
10476 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10477
10478         * NEWS: Add record Python bindings entry.
10479
10480 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10481
10482         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10483         py-record-full.o.
10484         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10485         * python/py-record-btrace.c, python/py-record-btrace.h,
10486         python/py-record-full.c, python/py-record-full.h: New file.
10487         * python/py-record.c: Add include for py-record-btrace.h and
10488         py-record-full.h.
10489         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10490         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10491         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10492         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10493         New definition.
10494         (gdbpy_initialize_btrace): New export.
10495         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10496
10497 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10498
10499         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10500         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10501         * python/py-record.c: New file.
10502         * python/python-internal.h (gdbpy_start_recording,
10503         gdbpy_current_recording, gdpy_stop_recording,
10504         gdbpy_initialize_record): New export.
10505         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10506         (python_GdbMethods): Add gdbpy_start_recording,
10507         gdbpy_current_recording and gdbpy_stop_recording.
10508
10509 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10510
10511         * record-btrace.c (record_btrace_record_method): New function.
10512         (init_record_btrace_ops): Initialize to_record_method.
10513         * record-full.c (record_full_record_method): New function.
10514         (init_record_full_ops, init_record_full_core_ops): Add
10515         record_full_record_method.
10516         * record.h (enum record_method): New enum.
10517         * target-debug.h (target_debug_print_enum_record_method: New define.
10518         * target-delegates.c: Regenerate.
10519         * target.c (target_record_method): New function.
10520         * target.h: Include record.h.
10521         (struct target_ops) <to_record_method>: New field.
10522         (target_record_method): New export.
10523
10524 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10525
10526         * record.h (record_start, record_stop): New export.
10527         * record.c (record_start, record_stop): New function.
10528
10529 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10530
10531         * btrace.c (btrace_fetch): Copy function call segments pointer
10532         into a vector.
10533         (btrace_clear): Clear the vector.
10534         (btrace_find_insn_by_number): Use binary search to find the correct
10535         function call segment.
10536         * btrace.h (brace_fun_p): New typedef.
10537         (struct btrace_thread_info) <functions>: New field.
10538
10539 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10540
10541         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10542         * btrace.c (btrace_decode_error): ... here.  New function.
10543         * btrace.h (btrace_decode_error): New export.
10544
10545 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10546
10547         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10548         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10549         btrace_find_insn_by_number): Remove special case for gaps.
10550         * btrace.h (btrace_insn_get_error): New export.
10551         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10552         * record-btrace.c (btrace_insn_history): Print number for gaps.
10553         (record_btrace_info, record_btrace_goto): Handle gaps.
10554
10555 2017-02-14  Tom Tromey  <tom@tromey.com>
10556
10557         PR python/13598:
10558         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10559         event.
10560         * python/py-evts.c (gdbpy_initialize_py_events): Add
10561         before_prompt registry.
10562         * python/py-events.h (events_object) <before_prompt>: New field.
10563
10564 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10565
10566         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10567
10568 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10569
10570         * symfile (_initialize_symfile): Add usage text to the load command's
10571         help text.
10572
10573 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10574
10575         * utils.c (defaulted_query): Don't query on secondary UIs.
10576
10577 2017-02-10  Tom Tromey  <tom@tromey.com>
10578
10579         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10580
10581 2017-02-10  Tom Tromey  <tom@tromey.com>
10582
10583         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10584         "cleanup" local.
10585         * python/py-type.c (typy_legacy_template_argument): Remove
10586         unnecessary "cleanup" local.
10587
10588 2017-02-10  Tom Tromey  <tom@tromey.com>
10589
10590         * python/python.c (do_start_initialization): New function, from
10591         _initialize_python.
10592         (_initialize_python): Call do_start_initialization.
10593         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10594         goto.
10595
10596 2017-02-10  Tom Tromey  <tom@tromey.com>
10597
10598         * python/py-prettyprint.c (pretty_print_one_value): Use
10599         gdbpy_ref.
10600
10601 2017-02-10  Tom Tromey  <tom@tromey.com>
10602
10603         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10604         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10605         gdbpy_ref.
10606         * python/py-type.c (field_new): Use gdbpy_ref.
10607         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10608         gdbpy_ref.
10609         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10610         (py_free_pspace): Likewise.
10611         (pspace_to_pspace_object): Likewise.
10612         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10613         (py_free_objfile): Likewise.
10614         (objfile_to_objfile_object): Likewise.
10615         * python/py-inferior.c (delete_thread_object): Use
10616         gdbpy_ref.
10617         (infpy_read_memory): Likewise.
10618         (py_free_inferior): Likewise.
10619         * python/py-evtregistry.c (create_eventregistry_object): Use
10620         gdbpy_ref.
10621         * python/py-event.c (create_event_object): Use gdbpy_ref.
10622
10623 2017-02-10  Tom Tromey  <tom@tromey.com>
10624
10625         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10626         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10627         used.
10628         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10629         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10630         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10631         python/py-framefilter.c, python/py-function.c,
10632         python/py-inferior.c, python/py-infevents.c,
10633         python/py-linetable.c, python/py-newobjfileevent.c,
10634         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10635         python/py-signalevent.c, python/py-stopevent.c,
10636         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10637         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10638         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10639         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10640
10641 2017-02-10  Tom Tromey  <tom@tromey.com>
10642
10643         * ui-out.h (ui_out_emit_type): New class.
10644         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10645         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10646         and ui_out_emit_tuple.
10647         (enumerate_locals): Likewise.
10648         (py_mi_print_variables, py_print_locals, py_print_args): Use
10649         ui_out_emit_list.
10650         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10651         ui_out_emit_list.
10652         * common/gdb_optional.h: New file.
10653
10654 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10655
10656         * MAINTAINERS (Write After Approval): Update my e-mail address.
10657
10658 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10659
10660         PR gdb/21122
10661         * breakpoint.c (_initialize_breakpoint): Update the help description
10662         of the 'commands' command to indicate that it takes a list argument.
10663
10664 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
10665
10666         * interps.c (current_interp_set_logging): Remove "return".
10667
10668 2017-02-09  Gary Benson  <gbenson@redhat.com>
10669
10670         * symtab.c (add_symtab_completions): Prevent NULL pointer
10671         dereference.
10672
10673 2017-02-08  Pedro Alves  <palves@redhat.com>
10674
10675         * interps.c (interp::interp): Remove reference to quiet_p.
10676         (interp_set): Make static.  Remove dead "Switching to" output
10677         code.
10678         (interp_quiet_p, interp_set_quiet): Delete.
10679         (interpreter_exec_cmd): Don't set the interpreter quiet.
10680         * interps.h (interp_quiet_p): Make static.
10681         (class interp) <quiet_p>: Remove field
10682
10683 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10684
10685         * cli/cli-decode.c (find_command_name_length): Make it extern.
10686         * cli/cli-decode.h (find_command_name_length): Declare.
10687         * cli/cli-script.c (command_name_equals, line_first_arg):
10688         New functions.
10689         (process_next_line): Use cli-decode to parse command names.
10690         (build_command_line): Make args a constant pointer.
10691
10692 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10693
10694         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10695         Remove case-insensitive search.
10696
10697 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
10698
10699         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10700         at the end of the line.  Avoids an ARI warning.
10701
10702 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
10703
10704         * NEWS: Mention support for record/replay of Intel 64 rdrand and
10705         rdseed instructions.
10706         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10707
10708 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
10709
10710         PR tdep/20936
10711         Provide and use sparc32 and sparc64 target description XML files.
10712         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10713         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10714         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10715         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10716         * features/sparc/sparc32-solaris.xml: New file.
10717         * features/sparc/sparc64-solaris.xml: New file.
10718         * features/sparc/sparc32-solaris.c: Generated.
10719         * features/sparc/sparc64-solaris.c: Generated.
10720         * sparc-tdep.h: Account for differences in target descriptions.
10721         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10722         (sparc32_register_type): Use target provided registers.
10723         (validate_tdesc_registers): New function.
10724         (sparc32_gdbarch_init): Use tdesc_has_registers.
10725         Set pseudoregister functions.
10726         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10727         (sparc64_register_type): Use target provided registers.
10728         (sparc64_init_abi): Set pseudoregister functions.
10729
10730 2017-02-03  Tom Tromey  <tom@tromey.com>
10731
10732         PR rust/21097:
10733         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10734         with a single member.
10735
10736 2017-02-03  Pedro Alves  <palves@redhat.com>
10737
10738         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10739         (cli_interp_base::~cli_interp_base): New.
10740         (cli_interp): New struct.
10741         (as_cli_interp): Cast the interp itself to cli_interp.
10742         (cli_interpreter_pre_command_loop): Rename to ...
10743         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
10744         parameter.
10745         (cli_interpreter_init): Rename to ...
10746         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
10747         boolean.  Make extern.
10748         (cli_interpreter_resume): Rename to ...
10749         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
10750         extern.
10751         (cli_interpreter_suspend): Rename to ...
10752         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
10753         extern.
10754         (cli_interpreter_exec): Rename to ...
10755         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
10756         extern.
10757         (cli_interpreter_supports_command_editing): Rename to ...
10758         (cli_interp_base::supports_command_editing): ... this.  Remove
10759         'interp' parameter.  Make extern.
10760         (cli_ui_out): Rename to ...
10761         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
10762         Make extern.
10763         (cli_set_logging): Rename to ...
10764         (cli_interp_base::set_logging): ... this.  Remove 'interp'
10765         parameter.  Make extern.
10766         (cli_interp_procs): Delete.
10767         (cli_interp_factory): Adjust to use "new".
10768         * cli/cli-interp.h: Include "interps.h".
10769         (struct cli_interp_base): New struct.
10770         * interps.c (struct interp): Delete.  Fields moved to interps.h.
10771         (interp_new): Delete.
10772         (interp::interp, interp::~interp): New.
10773         (interp_set): Use bool, and return void.  Assume the interpreter
10774         has suspend, init and resume methods, and that the all return
10775         void.
10776         (set_top_level_interpreter): interp_set returns void.
10777         (interp_ui_out): Adapt.
10778         (current_interp_set_logging): Adapt.
10779         (interp_data): Delete.
10780         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10781         (interp_exec): Adapt.
10782         (top_level_interpreter_data): Delete.
10783         * interps.h (interp_init_ftype, interp_resume_ftype)
10784         (interp_suspend_ftype, interp_exec_ftype)
10785         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10786         (class interp): New.
10787         (interp_new): Delete.
10788         (interp_set): Now returns void.  Use bool.
10789         (interp_data, top_level_interpreter_data): Delete.
10790         * mi/mi-common.h: Include interps.h.
10791         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10792         init, resume, suspect, exec, interp_ui_out, set_logging and
10793         pre_command_loop methods.
10794         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10795         (mi_interpreter_init): Rename to ...
10796         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10797         bool, return void and make extern.  Adjust.
10798         (mi_interpreter_resume): ... Rename to ...
10799         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10800         return void and make extern.  Adjust.
10801         (mi_interpreter_suspend): ... Rename to ...
10802         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10803         return void and make extern.  Adjust.
10804         (mi_interpreter_exec): ... Rename to ...
10805         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10806         extern.  Adjust.
10807         (mi_interpreter_pre_command_loop): ... Rename to ...
10808         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10809         parameter and make extern.
10810         (mi_on_normal_stop_1): Adjust.
10811         (mi_ui_out): Rename to ...
10812         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10813         parameter and make extern.  Adjust.
10814         (mi_set_logging): Rename to ...
10815         (mi_interp::set_logging): ... this.  Remove the 'interp'
10816         parameter and make extern.  Adjust.
10817         (mi_interp_procs): Delete.
10818         (mi_interp_factory): Adjust to use 'new'.
10819         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10820         (mi_print_exception, mi_execute_command, mi_load_progress):
10821         Adjust.
10822         * tui/tui-interp.c (tui_interp): New class.
10823         (as_tui_interp): Return a tui_interp pointer.
10824         (tui_on_normal_stop, tui_on_signal_received)
10825         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10826         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10827         to use interp::interp_ui_out.
10828         (tui_init): Rename to ...
10829         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10830         bool, return void and make extern.  Adjust.
10831         (tui_resume): Rename to ...
10832         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10833         return void and make extern.  Adjust.
10834         (tui_suspend): Rename to ...
10835         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10836         return void and make extern.  Adjust.
10837         (tui_ui_out): Rename to ...
10838         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10839         parameter, and make extern.  Adjust.
10840         (tui_exec): Rename to ...
10841         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10842         make extern.
10843         (tui_interp_procs): Delete.
10844         (tui_interp_factory): Use "new".
10845
10846 2017-02-02  Tom Tromey  <tom@tromey.com>
10847
10848         * rust-exp.y (ends_raw_string, space_then_number)
10849         (rust_identifier_start_p): Return bool.
10850         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10851         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10852         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10853         (rust_chartype_p): Return bool.
10854         (val_print_struct, rust_print_struct_def, rust_print_type):
10855         Update.
10856         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10857         Return bool.
10858
10859 2017-02-02  Tom Tromey  <tom@tromey.com>
10860
10861         * rust-lang.c: Reindent.
10862
10863 2017-02-02  Tom Tromey  <tom@tromey.com>
10864
10865         * rust-lang.h (rust_crate_for_block): Update.
10866         * rust-lang.c (rust_crate_for_block): Return std::string.
10867         (rust_get_disr_info): Use std:;string, not
10868         gdb::unique_xmalloc_ptr.
10869         * rust-exp.y (crate_name): Update.
10870
10871 2017-02-02  Pedro Alves  <palves@redhat.com>
10872
10873         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10874         field out of gdb_disassembler_test and make it static.
10875
10876 2017-02-02  Pedro Alves  <palves@redhat.com>
10877
10878         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10879         mi1_interp and mi_interp fields.
10880
10881 2017-02-02  Pedro Alves  <palves@redhat.com>
10882
10883         * cli/cli-interp.c (struct saved_output_files, saved_output):
10884         Moved from cli/cli-logging.c.
10885         (cli_set_logging): New function.
10886         (cli_interp_procs): Install cli_set_logging.
10887         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10888         Declare.
10889         * cli/cli-logging.c (struct saved_output_files, saved_output):
10890         Moved to cli/cli-interp.c.
10891         (pop_output_files): Don't save outputs here.
10892         (make_logging_output): New function.
10893         (handle_redirections): Don't build tee nor save previous outputs
10894         here.
10895         * interps.c (current_interp_set_logging): Change prototype.
10896         Assume there's always a set_logging_proc method installed.
10897         * interps.h (interp_set_logging_ftype): Change prototype.
10898         (current_interp_set_logging): Change prototype and adjust comment.
10899         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10900         use make_logging_output.
10901         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10902 2017-02-02  Pedro Alves  <palves@redhat.com>
10903
10904         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10905         from ...
10906         (set_logging_overwrite): ... here.
10907         (logging_no_redirect_file): Delete.
10908         (set_logging_redirect): Don't handle redirection on the fly.
10909         Instead warn that "logging off" / "logging on" is necessary.
10910         (pop_output_files): Delete references to logging_no_redirect_file.
10911         (show_logging_command): Always speak in terms of what will happen
10912         once logging is reenabled.
10913
10914 2017-02-02  Pedro Alves  <palves@redhat.com>
10915
10916         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10917
10918 2017-02-02  Pedro Alves  <palves@redhat.com>
10919
10920         * disasm.c (gdb_pretty_print_insn): Rename to ...
10921         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10922         Remove gdbarch parameter.  Adapt to clear the object's buffers
10923         instead of allocating new buffers, and to print using the object's
10924         gdb_disassembler instead of calling gdb_print_insn.
10925         (dump_insns): Use gdb_pretty_print_disassembler.
10926         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10927         (gdb_pretty_print_disassembler): New class.
10928         * record-btrace.c (btrace_insn_history): Use
10929         gdb_pretty_print_disassembler.
10930
10931 2017-02-02  Pedro Alves  <palves@redhat.com>
10932
10933         * ada-lang.c (type_as_string): Use string_file.
10934         * ada-valprint.c (ada_print_floating): Use string_file.
10935         * ada-varobj.c (ada_varobj_scalar_image)
10936         (ada_varobj_get_value_image): Use string_file.
10937         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10938         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10939         * breakpoint.c (update_inserted_breakpoint_locations)
10940         (insert_breakpoint_locations, reattach_breakpoints)
10941         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10942         (print_it_watchpoint): Use string_file.
10943         (save_breakpoints): Use stdio_file.
10944         * c-exp.y (oper): Use string_file.
10945         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10946         tee_file.
10947         (pop_output_files): Use delete.
10948         (handle_redirections): Use stdio_file and tee_file.
10949         * cli/cli-setshow.c (do_show_command): Use string_file.
10950         * compile/compile-c-support.c (c_compute_program): Use
10951         string_file.
10952         * compile/compile-c-symbols.c (generate_vla_size): Take a
10953         'string_file &' instead of a 'ui_file *'.
10954         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10955         of a 'ui_file *'.  Use string_file.
10956         (generate_c_for_variable_locations): Take a 'string_file &'
10957         instead of a 'ui_file *'.
10958         * compile/compile-internal.h (generate_c_for_for_one_variable):
10959         Take a 'string_file &' instead of a 'ui_file *'.
10960         * compile/compile-loc2c.c (push, pushf, unary, binary)
10961         (print_label, pushf_register_address, pushf_register)
10962         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10963         'ui_file *'.  Adjust.
10964         * compile/compile.c (compile_to_object): Use string_file.
10965         * compile/compile.h (compile_dwarf_expr_to_c)
10966         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10967         'ui_file *'.
10968         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10969         (replace_typedefs_qualified_name): Use string_file and
10970         obstack_copy0.
10971         * disasm.c (gdb_pretty_print_insn): Use string_file.
10972         (gdb_disassembly): Adjust reference the null_stream global.
10973         (do_ui_file_delete): Delete.
10974         (gdb_insn_length): Use null_stream.
10975         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10976         * dwarf2loc.c (dwarf2_compile_property_to_c)
10977         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10978         'string_file &' instead of a 'ui_file *'.
10979         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10980         * dwarf2read.c (do_ui_file_peek_last): Delete.
10981         (dwarf2_compute_name): Use string_file.
10982         * event-top.c (gdb_setup_readline): Use stdio_file.
10983         * gdbarch.sh (verify_gdbarch): Use string_file.
10984         * gdbtypes.c (safe_parse_type): Use null_stream.
10985         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10986         string_file.
10987         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10988         'string_file *' instead of a 'ui_file *'.
10989         (gdbscm_arch_disassemble): Use string_file.
10990         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10991         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10992         inherits from ui_file.
10993         (ioscm_file_port_delete, ioscm_file_port_rewind)
10994         (ioscm_file_port_put): Delete.
10995         (ioscm_file_port_write): Rename to ...
10996         (ioscm_file_port::write): ... this.  Remove file_port_magic
10997         checks.
10998         (ioscm_file_port_new): Delete.
10999         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11000         ui_file_up.
11001         * guile/scm-type.c (tyscm_type_name): Use string_file.
11002         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11003         Use string_file.
11004         * infcmd.c (print_return_value_1): Use string_file.
11005         * infrun.c (print_target_wait_results): Use string_file.
11006         * language.c (add_language): Use string_file.
11007         * location.c (explicit_to_string_internal): Use string_file.
11008         * main.c (captured_main_1): Use null_file.
11009         * maint.c (maintenance_print_architecture): Use stdio_file.
11010         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11011         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11012         event_channel>: Change type to mi_console_file pointer.
11013         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11014         (mi_console_file_delete): Delete.
11015         (struct mi_console_file): Delete.
11016         (mi_console_file_magic): Delete.
11017         (mi_console_file_new): Delete.
11018         (mi_console_file::mi_console_file): New.
11019         (mi_console_file_delete): Delete.
11020         (mi_console_file_fputs): Delete.
11021         (mi_console_file::write): New.
11022         (mi_console_raw_packet): Delete.
11023         (mi_console_file::flush): New.
11024         (mi_console_file_flush): Delete.
11025         (mi_console_set_raw): Rename to ...
11026         (mi_console_file::set_raw): ... this.
11027         * mi/mi-console.h (class mi_console_file): New class.
11028         (mi_console_file_new, mi_console_set_raw): Delete.
11029         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11030         (mi_set_logging): Use delete and tee_file.  Adjust.
11031         * mi/mi-main.c (output_register): Use string_file.
11032         (mi_cmd_data_evaluate_expression): Use string_file.
11033         (mi_cmd_data_read_memory): Use string_file.
11034         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11035         * mi/mi-out.c (mi_ui_out::main_stream): New.
11036         (mi_ui_out::rewind): Use main_stream and
11037         string_file.
11038         (mi_ui_out::put): Use main_stream and string_file.
11039         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11040         Allocate a 'string_file' instead.
11041         (mi_out_new): Don't allocate a mem_fileopen stream here.
11042         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11043         (mi_ui_out::main_stream): Declare method.
11044         * printcmd.c (eval_command): Use string_file.
11045         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11046         * python/py-arch.c (archpy_disassemble): Use string_file.
11047         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11048         * python/py-frame.c (frapy_str): Use string_file.
11049         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11050         Use string_file.
11051         * python/py-type.c (typy_str): Use string_file.
11052         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11053         * python/py-value.c (valpy_str): Use string_file.
11054         * record-btrace.c (btrace_insn_history): Use string_file.
11055         * regcache.c (regcache_print): Use stdio_file.
11056         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11057         * remote.c (escape_buffer): Use string_file.
11058         * rust-lang.c (rust_get_disr_info): Use string_file.
11059         * serial.c (serial_open_ops_1): Use stdio_file.
11060         (do_serial_close): Use delete.
11061         * stack.c (print_frame_arg): Use string_file.
11062         (print_frame_args): Remove local mem_fileopen stream, not used.
11063         (print_frame): Use string_file.
11064         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11065         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11066         Take a 'string_file *' instead of a 'ui_file *'.
11067         * top.c (new_ui): Use stdio_file and stderr_file.
11068         (free_ui): Use delete.
11069         (execute_command_to_string): Use string_file.
11070         (quit_confirm): Use string_file.
11071         * tracepoint.c (collection_list::append_exp): Use string_file.
11072         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11073         * tui/tui-file.c: Don't include "ui-file.h".
11074         (enum streamtype, struct tui_stream): Delete.
11075         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11076         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11077         (tui_file::tui_file): New method.
11078         (tui_file_fputs): Delete.
11079         (tui_file_get_strbuf): Delete.
11080         (tui_file::puts): New method.
11081         (tui_file_adjust_strbuf): Delete.
11082         (tui_file_flush): Delete.
11083         (tui_file::flush): New method.
11084         * tui/tui-file.h: Tweak intro comment.
11085         Include ui-file.h.
11086         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11087         (tui_file_adjust_strbuf): Delete declarations.
11088         (class tui_file): New class.
11089         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11090         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11091         (tui_register_format): Use string_stream.
11092         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11093         (tui_get_function_from_frame): Use string_file.
11094         * typeprint.c (type_to_string): Use string_file.
11095         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11096         (null_stream): New global.
11097         (ui_file_delete): Delete.
11098         (ui_file::ui_file): New.
11099         (null_file_isatty): Delete.
11100         (ui_file::~ui_file): New.
11101         (null_file_rewind): Delete.
11102         (ui_file::printf): New.
11103         (null_file_put): Delete.
11104         (null_file_flush): Delete.
11105         (ui_file::putstr): New.
11106         (null_file_write): Delete.
11107         (ui_file::putstrn): New.
11108         (null_file_read): Delete.
11109         (ui_file::putc): New.
11110         (null_file_fputs): Delete.
11111         (null_file_write_async_safe): Delete.
11112         (ui_file::vprintf): New.
11113         (null_file_delete): Delete.
11114         (null_file::write): New.
11115         (null_file_fseek): Delete.
11116         (null_file::puts): New.
11117         (ui_file_data): Delete.
11118         (null_file::write_async_safe): New.
11119         (gdb_flush, ui_file_isatty): Adjust.
11120         (ui_file_put, ui_file_rewind): Delete.
11121         (ui_file_write): Adjust.
11122         (ui_file_write_for_put): Delete.
11123         (ui_file_write_async_safe, ui_file_read): Adjust.
11124         (ui_file_fseek): Delete.
11125         (fputs_unfiltered): Adjust.
11126         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11127         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11128         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11129         (set_ui_file_data): Delete.
11130         (string_file::~string_file, string_file::write)
11131         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11132         (do_ui_file_as_string, ui_file_as_string): Delete.
11133         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11134         (struct mem_file): Delete.
11135         (mem_file_new): Delete.
11136         (stdio_file::stdio_file): New.
11137         (mem_file_delete): Delete.
11138         (stdio_file::stdio_file): New.
11139         (mem_fileopen): Delete.
11140         (stdio_file::~stdio_file): New.
11141         (mem_file_rewind): Delete.
11142         (stdio_file::set_stream): New.
11143         (mem_file_put): Delete.
11144         (stdio_file::open): New.
11145         (mem_file_write): Delete.
11146         (stdio_file_magic, struct stdio_file): Delete.
11147         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11148         (stdio_file::flush): New.
11149         (stdio_file_read): Rename to ...
11150         (stdio_file::read): ... this.  Adjust.
11151         (stdio_file_write): Rename to ...
11152         (stdio_file::write): ... this.  Adjust.
11153         (stdio_file_write_async_safe): Rename to ...
11154         (stdio_file::write_async_safe) ... this.  Adjust.
11155         (stdio_file_fputs): Rename to ...
11156         (stdio_file::puts) ... this.  Adjust.
11157         (stdio_file_isatty): Delete.
11158         (stdio_file_fseek): Delete.
11159         (stdio_file::isatty): New.
11160         (stderr_file_write): Rename to ...
11161         (stderr_file::write) ... this.  Adjust.
11162         (stderr_file_fputs): Rename to ...
11163         (stderr_file::puts) ... this.  Adjust.
11164         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11165         (stderr_file::stderr_file): New.
11166         (tee_file_magic): Delete.
11167         (struct tee_file): Delete.
11168         (tee_file::tee_file): New.
11169         (tee_file_new): Delete.
11170         (tee_file::~tee_file): New.
11171         (tee_file_delete): Delete.
11172         (tee_file_flush): Rename to ...
11173         (tee_file::flush): ... this.  Adjust.
11174         (tee_file_write): Rename to ...
11175         (tee_file::write): ... this.  Adjust.
11176         (tee_file::write_async_safe): New.
11177         (tee_file_fputs): Rename to ...
11178         (tee_file::puts): ... this.  Adjust.
11179         (tee_file_isatty): Rename to ...
11180         (tee_file::isatty): ... this.  Adjust.
11181         * ui-file.h (struct obstack, struct ui_file): Don't
11182         forward-declare.
11183         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11184         (ui_file_write_ftype)
11185         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11186         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11187         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11188         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11189         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11190         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11191         (set_ui_file_fseek): Delete.
11192         (ui_file_data, ui_file_delete, ui_file_rewind)
11193         (struct ui_file): New.
11194         (ui_file_up): New.
11195         (class null_file): New.
11196         (null_stream): Declare.
11197         (ui_file_write_for_put, ui_file_put): Delete.
11198         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11199         Delete.
11200         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11201         (gdb_fopen, tee_file_new): Delete.
11202         (struct string_file): New.
11203         (struct stdio_file): New.
11204         (stdio_file_up): New.
11205         (struct stderr_file): New.
11206         (class tee_file): New.
11207         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11208         of a 'ui_file *'.  Adjust.
11209         * ui-out.h (class ui_out) <field_stream>: Likewise.
11210         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11211         (null_stream): Delete.
11212         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11213         Adjust.
11214         * utils.h (struct ui_file): Delete forward declaration..
11215         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11216         (error_stream): Take a 'string_file &' instead of a
11217         'ui_file *'.
11218         * varobj.c (varobj_value_get_print_value): Use string_file.
11219         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11220         * gdbarch.c: Regenerate.
11221
11222 2017-02-02  Pedro Alves  <palves@redhat.com>
11223
11224         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11225         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11226         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11227         Adjust to call gdb_print_insn instead of
11228         gdb_disassembler::print_insn.
11229         (dump_insns, do_mixed_source_and_assembly_deprecated)
11230         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11231         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11232         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11233         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11234         declaration.
11235         (gdb_pretty_print_insn): Re-add declaration.
11236         * record-btrace.c (btrace_insn_history): Don't allocate a
11237         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11238
11239 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11240
11241         * disasm.h (gdb_disassembly): Remove file_string parameter.
11242         * disasm.c (gdb_disassembly): Likewise.
11243         * cli/cli-cmds.c (print_disassembly): Adapt.
11244         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11245         * stack.c (do_gdb_disassembly): Likewise.
11246
11247 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11248
11249         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11250         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11251         targets.  And if the implicit value is longer than needed, extract
11252         the first bytes instead of the "least significant" ones.
11253
11254 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11255
11256         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11257         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11258         (btrace_fetch): Assert can_access_registers_ptid.
11259         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11260         validate_registers_access.
11261
11262 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11263
11264         * gdbthread.h (can_access_registers_ptid): New.
11265         * thread.c (can_access_registers_ptid): New.
11266
11267 2017-02-01  Pedro Alves  <palves@redhat.com>
11268
11269         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11270
11271 2017-01-31  Pedro Alves  <palves@redhat.com>
11272
11273         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11274         Fix typos.
11275
11276 2017-01-31  Pedro Alves  <palves@redhat.com>
11277
11278         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11279         not used.
11280
11281 2017-01-31  Pedro Alves  <palves@redhat.com>
11282
11283         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11284
11285 2017-01-31  Pedro Alves  <palves@redhat.com>
11286
11287         * common/scoped_restore.h
11288         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11289         change the value's parameter type to T2.
11290         (make_scoped_restore): Likewise.
11291
11292 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11293             Richard Henderson  <rth@redhat.com>
11294
11295         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11296         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11297         GS_BASE for older kernels.
11298         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11299         GS_BASE for older kernels.
11300         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11301         and GS_BASE to the offset table.
11302         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11303         system register group.
11304         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11305         for older kernels.
11306         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11307         amd64 ABI.
11308         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11309         AMD64_GSBASE_REGNUM.
11310         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11311         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11312         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11313         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11314         i386/64bit-segments.xml in those rules.
11315         * features/i386/64bit-segments.xml: New file.
11316         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11317         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11318         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11319         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11320         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11321         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11322         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11323         * features/i386/amd64-avx-linux.c: Regenerated.
11324         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11325         * features/i386/amd64-avx-mpx.c: Regenerated.
11326         * features/i386/amd64-avx512-linux.c: Regenerated.
11327         * features/i386/amd64-linux.c: Regenerated.
11328         * features/i386/amd64-mpx-linux.c: Regenerated.
11329         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11330         * features/i386/i386-avx-mpx.c: Regenerated.
11331         * features/i386/x32-avx-linux.c: Regenerated.
11332         * features/i386/x32-avx512-linux.c: Regenerated.
11333         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11334         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11335         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11336         * regformats/i386/amd64-linux.dat: Regenerated.
11337         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11338         * regformats/i386/x32-avx-linux.dat: Regenerated.
11339         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11340         * regformats/i386/x32-linux.dat: Regenerated.
11341
11342 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11343
11344         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11345         Set to AMD64_NUM_REGS.
11346
11347 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11348
11349         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11350         that checks validity of a register number.
11351
11352 2017-01-27  Kees Cook  <keescook@google.com>
11353
11354         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11355         fetch_fpregs if target has fpa registers.
11356         (arm_linux_store_inferior_registers): Call store_fpregs if target
11357         has fpa registers.
11358
11359 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11360
11361         * cris-tdep.c (cris_gdbarch_init): Remove check for
11362         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11363
11364 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11365
11366         * corelow.c (get_core_register_section): Check for regset
11367         existence before checking for REGSET_VARIABLE_SIZE.
11368
11369 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11370             Pedro Alves  <palves@redhat.com>
11371
11372         PR gdb/20939
11373         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11374         call memory_error, save memaddr instead.
11375         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11376         negative, cal memory_error.
11377         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11378
11379 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11380
11381         * disasm-selftests.c (memory_error_test): New function.
11382         (_initialize_disasm_selftests): Register memory_error_test.
11383
11384 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11385
11386         * Makefile.in (SFILES): Add disasm-selftests.c and
11387         selftest-arch.c.
11388         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11389         * disasm-selftests.c: New file.
11390         * selftest-arch.c: New file.
11391         * selftest-arch.h: New file.
11392
11393 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11394
11395         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11396         to bfd_arch_mep.  Don't return 0 if section is not
11397         found.  Call print_insn_mep.
11398
11399 2017-01-26  Pedro Alves  <palves@redhat.com>
11400             Yao Qi  <yao.qi@linaro.org>
11401
11402         * arm-tdep.c: Include "disasm.h".
11403         (gdb_print_insn_arm): Update code to get gdbarch.
11404         * disasm.c (dis_asm_read_memory): Change it to
11405         gdb_disassembler::dis_asm_read_memory.
11406         (dis_asm_memory_error): Likewise.
11407         (dis_asm_print_address): Likewise.
11408         (gdb_pretty_print_insn): Change it to
11409         gdb_disassembler::pretty_print_insn.
11410         (dump_insns): Add one argument gdb_disassemlber.  All
11411         callers updated.
11412         (do_mixed_source_and_assembly_deprecated): Likewise.
11413         (do_mixed_source_and_assembly): Likewise.
11414         (do_assembly_only): Likewise.
11415         (gdb_disassembler::gdb_disassembler): New.
11416         (gdb_disassembler::print_insn): New.
11417         * disasm.h (class gdb_disassembler): New.
11418         (gdb_pretty_print_insn): Remove declaration.
11419         (gdb_disassemble_info): Likewise.
11420         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11421         (gdbscm_disasm_read_memory_worker): Update.
11422         (gdbscm_disasm_read_memory): Update.
11423         (gdbscm_disasm_memory_error): Remove.
11424         (gdbscm_disasm_print_address): Remove.
11425         (gdbscm_disassembler::gdbscm_disassembler): New.
11426         (gdbscm_print_insn_from_port): Update.
11427         * mips-tdep.c: Include disasm.h.
11428         (gdb_print_insn_mips): Update code to get gdbarch.
11429         * record-btrace.c (btrace_insn_history): Update.
11430         * spu-tdep.c: Include disasm.h.
11431         (struct spu_dis_asm_data): Remove.
11432         (struct spu_dis_asm_info): New.
11433         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11434         SPU id.
11435         (gdb_print_insn_spu): Cast disassemble_info to
11436         spu_dis_asm_info.
11437
11438 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11439
11440         * disasm.c (do_ui_file_delete): Delete.
11441         (gdb_insn_length): Move code creating stream to ...
11442         * utils.c (null_stream): ... here.  New function.
11443         * utils.h (null_stream): Declare.
11444
11445 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11446
11447         * python/py-inferior.c (find_thread_object): Return directly
11448         from the loop.  Remove "found" variable.
11449
11450 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11451
11452         GDB 7.12.1 released.
11453
11454 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11455
11456         * python/py-function.c (fnpy_call): Reorder declarations to have
11457         the gdbpy_enter object declared first.
11458         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11459
11460 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11461
11462         PR python/21068
11463         * python/python-internal.h (PyMem_RawMalloc): Define for
11464         Python < 3.4.
11465         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11466         PyMem_RawMalloc instead of PyMem_Malloc.
11467
11468 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11469             Luis Machado  <lgustavo@codesourcery.com>
11470
11471         * NEWS (New commands): Mention flash-erase.
11472         (New MI commands): Mention target-flash-erase.
11473         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11474         command.
11475         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11476         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11477         * target.c (flash_erase_command): New function.
11478         (initialize_targets): Add new flash-erase command.
11479         * target.h (flash_erase_command): New declaration.
11480
11481 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11482
11483         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11484         HAVE_SYS_PROCFS_H is defined.
11485
11486 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11487
11488         * remote.c (struct cached_reg): Change data into a pointer.
11489         * (stop_reply_dtr): Free data pointers before deleting vector.
11490         (process_stop_reply): Likewise.
11491         (remote_parse_stop_reply): Allocate space for data
11492
11493 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11494
11495         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11496         MAX_REGISTER_SIZE.
11497         (amd64_pseudo_register_read_value): Likewise.
11498         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11499         (store_register_using_P): Likewise.
11500         * regcache.c (regcache_xfer_part): Likewise.
11501
11502 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11503
11504         Split real and pseudo registers.
11505         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11506         (sparc32_pseudo_regnum): New enum.
11507         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11508         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11509         (SPARC32_CP0_REGISTERS): New macro.
11510         (sparc32_pseudo_register_name): New function.
11511         (sparc32_register_name): Use sparc32_pseudo_register_name.
11512         (sparc32_pseudo_register_type): New function.
11513         (sparc32_register_type): Use sparc32_pseudo_register_type.
11514         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11515         pseudo register numbers.
11516         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11517         (SPARC64_CP0_REGISTERS): New macro.
11518         (sparc64_pseudo_register_name): New function.
11519         (sparc64_register_name): Use sparc64_pseudo_register_name.
11520         (sparc64_pseudo_register_type): New function.
11521         (sparc64_register_type): Use sparc64_pseudo_register_type.
11522         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11523         pseudo register numbers.
11524         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11525         sparc64_store_arguments): Handle pseudo register numbers.
11526
11527 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11528
11529         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11530         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11531         output.
11532         (getpkt_or_notif_sane_1): Likewise.
11533
11534 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11535
11536         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11537         of CC.  Pass "-x c++-header" instead of "-x c".
11538
11539 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11540
11541         * remote.c (remote_can_async_p): Update comment.
11542
11543 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11544
11545         * linux-nat.c (linux_nat_can_async_p): Update comment.
11546
11547 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11548
11549         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11550
11551 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11552
11553         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11554
11555 2017-01-10  Tom Tromey  <tom@tromey.com>
11556
11557         * python/py-type.c (typy_legacy_template_argument): Update.
11558         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11559         ~demangle_parse_info): Declare new members.
11560         (cp_demangled_name_to_comp): Return unique_ptr.
11561         (cp_demangled_name_parse_free)
11562         (make_cleanup_cp_demangled_name_parse_free)
11563         (cp_new_demangle_parse_info): Remove.
11564         * cp-support.c (do_demangled_name_parse_free_cleanup)
11565         (make_cleanup_cp_demangled_name_parse_free): Remove.
11566         (inspect_type, cp_canonicalize_string_full)
11567         (cp_canonicalize_string): Update.
11568         (mangled_name_to_comp): Change return type.
11569         (cp_class_name_from_physname, method_name_from_physname)
11570         (cp_func_name, cp_remove_params): Update.
11571         * cp-name-parser.y (demangle_parse_info): New constructor, from
11572         cp_new_demangle_parse_info.
11573         (~demangle_parse_info): New destructor, from
11574         cp_demangled_name_parse_free.
11575         (cp_merge_demangle_parse_infos): Update.
11576         (cp_demangled_name_to_comp): Change return type.
11577
11578 2017-01-10  Tom Tromey  <tom@tromey.com>
11579
11580         * top.c (prevent_dont_repeat): Change return type.
11581         * python/python.c (execute_gdb_command): Use std::string.
11582         Update.
11583         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11584         * command.h (prevent_dont_repeat): Change return type.
11585         * breakpoint.c (bpstat_do_actions_1): Update.
11586
11587 2017-01-10  Tom Tromey  <tom@tromey.com>
11588
11589         * value.h (scoped_value_mark::~scoped_value_mark): Call
11590         free_to_mark.
11591         (scoped_value_mark::free_to_mark): New method.
11592         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11593         scoped_value_mark.
11594
11595 2017-01-10  Tom Tromey  <tom@tromey.com>
11596
11597         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11598         (valpy_reference_value, valpy_const_value, valpy_get_address)
11599         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11600         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11601         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11602         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11603         scoped_value_mark.
11604         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11605         * value.h (scoped_value_mark): New class.
11606
11607 2017-01-10  Tom Tromey  <tom@tromey.com>
11608
11609         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11610         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11611         * psymtab.c (discard_psymtabs_upto): Remove.
11612         (make_cleanup_discard_psymtabs): Remove.
11613         (struct psymtab_state): Remove.
11614
11615 2017-01-10  Tom Tromey  <tom@tromey.com>
11616
11617         * record-full.c (record_full_save_cleanups): Remove.
11618         (record_full_save): Use gdb::unlinker.
11619         * gcore.c (do_bfd_delete_cleanup): Remove.
11620         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11621         cleanups.
11622         * dwarf2read.c (unlink_if_set): Remove.
11623         (write_psymtabs_to_index): Use gdb::unlinker.
11624         * common/gdb_unlinker.h: New file.
11625
11626 2017-01-10  Tom Tromey  <tom@tromey.com>
11627
11628         * windows-tdep.c (windows_xfer_shared_library): Update.
11629         * windows-nat.c (windows_make_so): Update.
11630         * utils.h (make_cleanup_bfd_unref): Remove.
11631         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11632         * symfile.h (symfile_bfd_open)
11633         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11634         * symfile.c (read_symbols, symbol_file_add)
11635         (separate_debug_file_exists): Update.
11636         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11637         (generic_load, reread_symbols): Update.
11638         * symfile-mem.c (symbol_file_add_from_memory): Update.
11639         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11640         (spu_symbol_file_add_from_memory): Update.
11641         * solist.h (struct target_so_ops) <bfd_open>: Return
11642         gdb_bfd_ref_ptr.
11643         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11644         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11645         gdb_bfd_ref_ptr.
11646         (solib_map_sections, reload_shared_libraries_1): Update.
11647         * solib-svr4.c (enable_break): Update.
11648         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11649         * solib-frv.c (enable_break2): Update.
11650         * solib-dsbt.c (enable_break): Update.
11651         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11652         gdb_bfd_ref_ptr.
11653         (darwin_solib_get_all_image_info_addr_at_init): Update.
11654         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11655         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11656         * record-full.c (record_full_save): Update.
11657         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11658         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11659         * minidebug.c (find_separate_debug_file_in_section): Return
11660         gdb_bfd_ref_ptr.
11661         * machoread.c (macho_add_oso_symfile): Change abfd to
11662         gdb_bfd_ref_ptr.
11663         (macho_symfile_read_all_oso): Update.
11664         (macho_check_dsym): Return gdb_bfd_ref_ptr.
11665         (macho_symfile_read): Update.
11666         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11667         (jit_bfd_try_read_symtab): Update.
11668         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11669         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11670         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11671         gdb_bfd_ref_ptr.
11672         (gdb_bfd_ref_policy): New struct.
11673         (gdb_bfd_ref_ptr): New typedef.
11674         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11675         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11676         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11677         gdb_bfd_ref_ptr.
11678         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11679         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11680         (gcore_command): Update.
11681         * exec.c (exec_file_attach): Update.
11682         * elfread.c (elf_symfile_read): Update.
11683         * dwarf2read.c (dwarf2_get_dwz_file): Update.
11684         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11685         (open_and_init_dwo_file): Update.
11686         (open_dwp_file): Return gdb_bfd_ref_ptr.
11687         (open_and_init_dwp_file): Update.
11688         * corelow.c (core_open): Update.
11689         * compile/compile-object-load.c (compile_object_load): Update.
11690         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11691         * coffread.c (coff_symfile_read): Update.
11692         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11693         gdb_bfd_ref_ptr.  Rename.
11694         (dump_bfd_file, restore_command): Update.
11695         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11696         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11697         (find_separate_debug_file_by_buildid): Update.
11698
11699 2017-01-10  Tom Tromey  <tom@tromey.com>
11700
11701         * common/gdb_ref_ptr.h: New file.
11702         * python/py-ref.h (struct gdbpy_ref_policy): New.
11703         (gdbpy_ref): Now a typedef.
11704
11705 2017-01-10  Tom Tromey  <tom@tromey.com>
11706
11707         * utils.h (make_cleanup_htab_delete): Don't declare.
11708         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11709         Remove.
11710         * linespec.c (decode_compound_collector): Add constructor,
11711         destructor.
11712         (lookup_prefix_sym): Remove cleanup.
11713         (symtab_collector): Add constructor, destructor.
11714         (collect_symtabs_from_filename): Remove cleanup.
11715         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11716         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11717         Use htab_up.
11718         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11719         * dwarf2read.c (dw2_expand_symtabs_matching)
11720         (dw2_map_symbol_filenames, dwarf_decode_macros)
11721         (write_psymtabs_to_index): Use htab_up.
11722         * dwarf2loc.c (func_verify_no_selftailcall)
11723         (call_site_find_chain_1, func_verify_no_selftailcall)
11724         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11725         std::vector, gdb::unique_xmalloc_ptr.
11726         (call_sitep): Remove typedef.
11727         (dwarf2_locexpr_baton_eval): Remove unused variable.
11728
11729 2017-01-10  Tom Tromey  <tom@tromey.com>
11730
11731         * python/python-internal.h (make_cleanup_py_decref)
11732         (make_cleanup_py_xdecref): Don't declare.
11733         * python/py-utils.c (py_decref, make_cleanup_py_decref)
11734         (py_xdecref, make_cleanup_py_xdecref): Remove.
11735
11736 2017-01-10  Tom Tromey  <tom@tromey.com>
11737
11738         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11739         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11740
11741 2017-01-10  Tom Tromey  <tom@tromey.com>
11742
11743         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11744
11745 2017-01-10  Tom Tromey  <tom@tromey.com>
11746
11747         * python/py-utils.c (unicode_to_encoded_string)
11748         (python_string_to_target_string)
11749         (python_string_to_target_python_string)
11750         (python_string_to_host_string, gdbpy_obj_to_string)
11751         (get_addr_from_python): Use gdbpy_ref.
11752
11753 2017-01-10  Tom Tromey  <tom@tromey.com>
11754
11755         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11756         gdbpy_ref.
11757
11758 2017-01-10  Tom Tromey  <tom@tromey.com>
11759
11760         * python/python.c (eval_python_command, gdbpy_decode_line)
11761         (gdbpy_run_events, gdbpy_start_type_printers)
11762         (gdbpy_apply_type_printers): Use gdbpy_ref.
11763
11764 2017-01-10  Tom Tromey  <tom@tromey.com>
11765
11766         * python/py-param.c (get_doc_string, compute_enum_values): Use
11767         gdbpy_ref.
11768
11769 2017-01-10  Tom Tromey  <tom@tromey.com>
11770
11771         * python/py-inferior.c (find_thread_object, build_inferior_list):
11772         Use gdbpy_ref.
11773
11774 2017-01-10  Tom Tromey  <tom@tromey.com>
11775
11776         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11777
11778 2017-01-10  Tom Tromey  <tom@tromey.com>
11779
11780         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11781         gdbpy_ref.
11782
11783 2017-01-10  Tom Tromey  <tom@tromey.com>
11784
11785         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11786         extra incref.
11787         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11788         Use gdbpy_ref.
11789
11790 2017-01-10  Tom Tromey  <tom@tromey.com>
11791
11792         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11793         gdbpy_ref.
11794
11795 2017-01-10  Tom Tromey  <tom@tromey.com>
11796
11797         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11798         decref results of PyArg_ParseTupleAndKeywords.
11799
11800 2017-01-10  Tom Tromey  <tom@tromey.com>
11801
11802         * python/python.c (python_run_simple_file): Use
11803         unique_xmalloc_ptr, gdbpy_ref.
11804
11805 2017-01-10  Tom Tromey  <tom@tromey.com>
11806
11807         * python/py-prettyprint.c (print_stack_unless_memory_error)
11808         (print_string_repr, print_children): Use gdbpy_ref.
11809         (dummy_python_frame): New class.
11810         (dummy_python_frame::dummy_python_frame): Rename from
11811         push_dummy_python_frame.
11812         (py_restore_tstate): Remove.
11813
11814 2017-01-10  Tom Tromey  <tom@tromey.com>
11815
11816         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11817
11818 2017-01-10  Tom Tromey  <tom@tromey.com>
11819
11820         * python/python.c (ensure_python_env, restore_python_env):
11821         Remove.
11822         * python/python-internal.h (ensure_python_env): Don't declare.
11823         * varobj.h (varobj_ensure_python_env): Don't declare.
11824         * varobj.c (varobj_ensure_python_env): Remove.
11825
11826 2017-01-10  Tom Tromey  <tom@tromey.com>
11827
11828         * varobj.c (varobj_value_get_print_value): Use
11829         gdbpy_enter_varobj.
11830
11831 2017-01-10  Tom Tromey  <tom@tromey.com>
11832
11833         * python/py-prettyprint.c (print_string_repr, print_children):
11834         Update.
11835         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11836         of "encoding".
11837         * varobj.c (varobj_value_get_print_value): Update.
11838         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11839
11840 2017-01-10  Tom Tromey  <tom@tromey.com>
11841
11842         * varobj.c (varobj_get_display_hint)
11843         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11844         (varobj_set_visualizer, free_variable): Use
11845         gdbpy_enter_varobj.
11846
11847 2017-01-10  Tom Tromey  <tom@tromey.com>
11848
11849         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11850         (do_finish_initialization): New function.  Use gdbpy_ref.
11851         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11852         do_finish_initialization.
11853
11854 2017-01-10  Tom Tromey  <tom@tromey.com>
11855
11856         * python/py-param.c (get_set_value, get_show_value): Use
11857         gdbpy_enter, gdbpy_ref.
11858
11859 2017-01-10  Tom Tromey  <tom@tromey.com>
11860
11861         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11862
11863 2017-01-10  Tom Tromey  <tom@tromey.com>
11864
11865         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11866
11867 2017-01-10  Tom Tromey  <tom@tromey.com>
11868
11869         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11870         Use gdbpy_enter_varobj.
11871
11872 2017-01-10  Tom Tromey  <tom@tromey.com>
11873
11874         * varobj.c (gdbpy_enter_varobj): New constructor.
11875         * python/python-internal.h (gdbpy_enter_varobj): New class.
11876         * python/py-varobj.c (py_varobj_get_iterator): Use
11877         gdbpy_enter_varobj.
11878
11879 2017-01-10  Tom Tromey  <tom@tromey.com>
11880
11881         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11882         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11883         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11884         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11885         unique_xmalloc_ptr.
11886         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11887
11888 2017-01-10  Tom Tromey  <tom@tromey.com>
11889
11890         * python/py-xmethods.c (invoke_match_method): Use
11891         gdbpy_ref.
11892
11893 2017-01-10  Tom Tromey  <tom@tromey.com>
11894
11895         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11896         gdbpy_enter, gdbpy_ref.
11897
11898 2017-01-10  Tom Tromey  <tom@tromey.com>
11899
11900         * python/python.c (python_interactive_command): Use gdbpy_enter.
11901
11902 2017-01-10  Tom Tromey  <tom@tromey.com>
11903
11904         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11905         gdbpy_ref.
11906
11907 2017-01-10  Tom Tromey  <tom@tromey.com>
11908
11909         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11910         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11911
11912 2017-01-10  Tom Tromey  <tom@tromey.com>
11913
11914         * utils.h (htab_deleter): New struct.
11915         (htab_up): New typedef.
11916         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11917         gdbpy_enter, gdbpy_ref, htab_up.
11918
11919 2017-01-10  Tom Tromey  <tom@tromey.com>
11920
11921         * python/py-unwind.c (pending_frame_invalidate): Remove.
11922         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11923
11924 2017-01-10  Tom Tromey  <tom@tromey.com>
11925
11926         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11927         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11928
11929 2017-01-10  Tom Tromey  <tom@tromey.com>
11930
11931         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11932
11933 2017-01-10  Tom Tromey  <tom@tromey.com>
11934
11935         * python/python.c (gdbpy_eval_from_control_command)
11936         (gdbpy_source_script, gdbpy_run_events)
11937         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11938         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11939         gdbpy_enter.
11940
11941 2017-01-10  Tom Tromey  <tom@tromey.com>
11942
11943         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11944
11945 2017-01-10  Tom Tromey  <tom@tromey.com>
11946
11947         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11948
11949 2017-01-10  Tom Tromey  <tom@tromey.com>
11950
11951         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11952         (python_on_inferior_call_pre, python_on_inferior_call_post)
11953         (python_on_memory_change, python_on_register_change)
11954         (python_inferior_exit, python_new_objfile, add_thread_object)
11955         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11956
11957 2017-01-10  Tom Tromey  <tom@tromey.com>
11958
11959         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11960         (bpfinishpy_handle_exit): Use gdbpy_enter.
11961
11962 2017-01-10  Tom Tromey  <tom@tromey.com>
11963
11964         * python/py-cmd.c (cmdpy_destroyer)
11965         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11966         gdbpy_enter.
11967
11968 2017-01-10  Tom Tromey  <tom@tromey.com>
11969
11970         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11971         gdbpy_enter.
11972         (gdbpy_breakpoint_has_cond): Likewise.
11973
11974 2017-01-10  Tom Tromey  <tom@tromey.com>
11975
11976         * python/python.c (gdbpy_enter): New constructor.
11977         (~gdbpy_enter): New destructor.
11978         (restore_python_env, ensure_python_env): Rewrite.
11979         * python/python-internal.h (gdbpy_enter): New class.
11980
11981 2017-01-10  Tom Tromey  <tom@tromey.com>
11982
11983         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11984
11985 2017-01-10  Tom Tromey  <tom@tromey.com>
11986
11987         * python/py-value.c (value_has_field, get_field_flag)
11988         (get_field_type, valpy_getitem, convert_value_from_python): Use
11989         gdbpy_ref.
11990
11991 2017-01-10  Tom Tromey  <tom@tromey.com>
11992
11993         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11994         gdbpy_ref.
11995
11996 2017-01-10  Tom Tromey  <tom@tromey.com>
11997
11998         * python/py-prettyprint.c (search_pp_list)
11999         (find_pretty_printer_from_objfiles)
12000         (find_pretty_printer_from_progspace)
12001         (find_pretty_printer_from_gdb, find_pretty_printer)
12002         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12003         gdbpy_ref.
12004
12005 2017-01-10  Tom Tromey  <tom@tromey.com>
12006
12007         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12008
12009 2017-01-10  Tom Tromey  <tom@tromey.com>
12010
12011         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12012         (ltpy_get_all_source_lines): Use gdbpy_ref.
12013
12014 2017-01-10  Tom Tromey  <tom@tromey.com>
12015
12016         * python/py-framefilter.c (extract_sym, extract_value)
12017         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12018         gdbpy_ref.
12019
12020 2017-01-10  Tom Tromey  <tom@tromey.com>
12021
12022         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12023
12024 2017-01-10  Tom Tromey  <tom@tromey.com>
12025
12026         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12027
12028 2017-01-10  Tom Tromey  <tom@tromey.com>
12029
12030         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12031         gdbpy_ref.
12032
12033 2017-01-10  Tom Tromey  <tom@tromey.com>
12034
12035         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12036
12037 2017-01-10  Tom Tromey  <tom@tromey.com>
12038
12039         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12040         (typy_range): Use gdbpy_ref.
12041
12042 2017-01-10  Tom Tromey  <tom@tromey.com>
12043
12044         * python/py-threadevent.c (create_thread_event_object): Use
12045         gdbpy_ref.
12046         * python/py-stopevent.c (create_stop_event_object): Simplify.
12047         (emit_stop_event): Use gdbpy_ref.
12048         * python/py-signalevent.c (create_signal_event_object): Use
12049         gdbpy_ref.
12050         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12051         (emit_new_objfile_event, create_clear_objfiles_event_object)
12052         (emit_clear_objfiles_event): Use gdbpy_ref.
12053         * python/py-infevents.c (create_inferior_call_event_object)
12054         (create_register_changed_event_object)
12055         (create_memory_changed_event_object, emit_inferior_call_event)
12056         (emit_memory_changed_event, emit_register_changed_event): Use
12057         gdbpy_ref.
12058         * python/py-exitedevent.c (create_exited_event_object)
12059         (emit_exited_event): Use gdbpy_ref.
12060         * python/py-event.h (evpy_emit_event): Remove
12061         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12062         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12063         * python/py-continueevent.c (emit_continue_event): Use
12064         gdbpy_ref.
12065         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12066         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12067         gdbpy_ref.
12068         * python/py-bpevent.c (create_breakpoint_event_object): Use
12069         gdbpy_ref.
12070
12071 2017-01-10  Tom Tromey  <tom@tromey.com>
12072
12073         * python/py-ref.h: New file.
12074
12075 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12076
12077         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12078         void.
12079         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12080         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12081         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12082         * ui-out.c (ui_out::redirect): Likewise.
12083         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12084         * cli/cli-logging.c (set_logging_redirect): Update call site of
12085         ui_out::redirect.
12086         (handle_redirections): Likewise.
12087         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12088         * top.c (execute_command_to_string): Likewise.
12089         * utils.c (do_ui_out_redirect_pop): Likewise.
12090
12091 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12092
12093         * stack.c (_initialize_stack): Update "frame" command help message.
12094
12095 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12096
12097         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12098
12099 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12100
12101         * x86-linux-nat.h: Include gdb_proc_service.h.
12102
12103 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12104
12105         * ser-base.h: Include serial.h.
12106
12107 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12108
12109         * ppc-linux-tdep.h: Include ppc-tdep.h.
12110
12111 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12112
12113         * nat/amd64-linux-siginfo.h: Include signal.h.
12114
12115 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12116
12117         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12118
12119 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12120
12121         * mi/mi-parse.h: Include mi-cmds.h.
12122
12123 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12124
12125         * inf-loop.c: Don't include "target.h".
12126         * inf-loop.h: Include it here.
12127
12128 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12129
12130         * dfp.h: Include "dboulest.h" and "expression.h".
12131
12132 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12133
12134         * ax-gdb.h: Include "ax.h".
12135
12136 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12137
12138         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12139         with nat/gdb_ptrace.h.
12140
12141 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12142
12143         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12144         new line.
12145         (mips64_fbsd_sigframe_init): Likewise.
12146
12147 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12148
12149         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12150         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12151
12152 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12153
12154         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12155         * NEWS: Mention new FreeBSD/mips native configuration.
12156         * config/mips/fbsd.mh: New file.
12157         * configure.host: Add mips*-*-freebsd*.
12158         * mips-fbsd-nat.c: New file.
12159
12160 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12161
12162         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12163         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12164         * NEWS: Mention new FreeBSD/mips target.
12165         * configure.tgt: Add mips*-*-freebsd*.
12166         * mips-fbsd-tdep.c: New file.
12167         * mips-fbsd-tdep.h: New file.
12168
12169 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12170
12171         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12172         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12173
12174 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12175
12176         Update copyright year range in all GDB files.
12177
12178 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12179
12180         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12181
12182 For older changes see ChangeLog-2016.
12183 \f
12184 Local Variables:
12185 mode: change-log
12186 left-margin: 8
12187 fill-column: 74
12188 version-control: never
12189 coding: utf-8
12190 End: