Remove set_batch_flag_and_make_cleanup_restore_page_info
[external/binutils.git] / gdb / ChangeLog
1 2017-10-03  Tom Tromey  <tom@tromey.com>
2
3         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4         * top.c (execute_command_to_string): Update.
5         * utils.c (make_cleanup_restore_page_info): Remove.
6         (do_restore_page_info_cleanup): Remove.
7         (set_batch_flag_and_restore_page_info):
8         New.
9         (make_cleanup_restore_page_info): Remove.
10         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
11         (~set_batch_flag_and_restore_page_info): New
12         (make_cleanup_restore_uinteger): Remove.
13         (make_cleanup_restore_integer): Remove.
14         (struct restore_integer_closure): Remove.
15         (restore_integer): Remove.
16         * utils.h (struct set_batch_flag_and_restore_page_info): New
17         class.
18         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
19         (make_cleanup_restore_page_info): Remove.
20         (make_cleanup_restore_uinteger) Remove.
21         (make_cleanup_restore_integer) Remove.
22
23 2017-10-03  Tom Tromey  <tom@tromey.com>
24
25         * record-full.h (record_full_gdb_operation_disable_set): Return
26         scoped_restore_tmpl<int>.
27         * infrun.c (adjust_pc_after_break): Update.
28         (handle_signal_stop): Update.
29         * record-full.c (record_full_gdb_operation_disable_set): Return
30         scoped_restore_tmpl<int>.
31         (record_full_wait_1, record_full_insert_breakpoint)
32         (record_full_remove_breakpoint, record_full_save)
33         (record_full_goto_insn): Update.
34
35 2017-10-02  Tom Tromey  <tom@tromey.com>
36
37         PR rust/22236:
38         * rust-lang.c (rust_val_print_str): New function.
39         (val_print_struct): Call it.
40         (rust_subscript): Preserve name of slice type.
41
42 2017-10-02  Tom Tromey  <tom@tromey.com>
43
44         * rust-lang.c (rust_subscript): Handle slices in
45         EVAL_AVOID_SIDE_EFFECTS case.
46
47 2017-10-02  Tom Tromey  <tom@tromey.com>
48
49         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
50
51 2017-10-02  Tom Tromey  <tom@tromey.com>
52
53         * rust-lang.h (rust_slice_type): Add "extern".
54
55 2017-10-02  Tom Tromey  <tom@tromey.com>
56             Pedro Alves  <palves@redhat.com>
57
58         * ada-lang.h (ada_exc_info::operator<): Make const.
59         (ada_exc_info::operator==): Make const.
60         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
61         Make const.
62
63 2017-09-29  Tom Tromey  <tom@tromey.com>
64
65         * target.c (read_whatever_is_readable): Change type of "result".
66         Update.
67         (free_memory_read_result_vector): Remove.
68         (read_memory_robust): Change return type.  Update.
69         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
70         bin2hex, std::string.
71         * target.h (memory_read_result_s): Remove typedef.
72         (free_memory_read_result_vector): Remove.
73         (read_memory_robust): Return std::vector.
74
75 2017-09-29  Tom Tromey  <tom@tromey.com>
76
77         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
78
79 2017-09-29  Tom Tromey  <tom@tromey.com>
80
81         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
82         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
83         operator< and operator==.
84         (ada_exceptions_list): Return a std::vector.
85         * ada-lang.c (ada_exc_info::operator<): Rename from
86         compare_ada_exception_info.
87         (ada_exc_info::operator==): New.
88         (sort_remove_dups_ada_exceptions_list): Change type of
89         "exceptions".
90         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
91         (ada_add_global_exceptions): Likewise.
92         (ada_exceptions_list_1): Return a std::vector.
93         (ada_exceptions_list): Likewise.
94
95 2017-09-29  Tom Tromey  <tom@tromey.com>
96
97         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
98         'std::set *'.
99         (print_one_inferior): Update.
100         (free_vector_of_ints): Remove.
101         (list_available_thread_groups): Change "ids" to std::set.
102         (mi_cmd_list_thread_groups): Update.
103         (struct collect_cores_data) <core>: Now a std::set.
104         (collect_cores): Update.
105         (unique): Remove.
106         (print_one_inferior): Update.
107
108 2017-09-29  Tom Tromey  <tom@tromey.com>
109
110         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
111         (mi_execute_async_cli_command): Likewise.
112         (mi_cmd_trace_frame_collected): Use field_fmt.
113
114 2017-09-29  Tom Tromey  <tom@tromey.com>
115
116         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
117         gdb::byte_vector.
118
119 2017-09-29  Tom Tromey  <tom@tromey.com>
120
121         * mi/mi-parse.c (mi_parse): Remove unused declaration.
122
123 2017-09-29  Tom Tromey  <tom@tromey.com>
124
125         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
126
127 2017-09-29  Tom Tromey  <tom@tromey.com>
128
129         * varobj.h (varobj_gen_name): Return std::string.
130         * varobj.c (varobj_gen_name): Return std::string.
131         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
132         (mi_cmd_var_delete): Don't copy "name".
133
134 2017-09-29  Tom Tromey  <tom@tromey.com>
135
136         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
137         (mi_cmd_break_insert_1): Update.
138
139 2017-09-29  Tom Tromey  <tom@tromey.com>
140
141         * target.h (make_scoped_defer_target_commit_resume): Update.
142         * target.c (make_scoped_defer_target_commit_resume): Rename from
143         make_cleanup_defer_target_commit_resume.  Return a
144         scoped_restore.
145         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
146
147 2017-09-29  Tom Tromey  <tom@tromey.com>
148
149         * main.c (captured_main_1): Remove unused declaration.
150         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
151
152 2017-09-29  Tom Tromey  <tom@tromey.com>
153
154         * symtab.c (search_symbols): Remove unused outer cleanup.
155         (make_source_files_completion_list): Remove unused declaration.
156
157 2017-09-29  Tom Tromey  <tom@tromey.com>
158
159         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
160
161 2017-09-29  Tom Tromey  <tom@tromey.com>
162
163         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
164         gdb::byte_vector.
165
166 2017-09-29  Tom Tromey  <tom@tromey.com>
167
168         * complaints.c (vcomplaint): Use std::string.
169
170 2017-09-29  Tom Tromey  <tom@tromey.com>
171
172         * tracepoint.c (trace_variable_command): Use std::string.
173         (encode_actions_1): Remove unused declarations.
174         (create_tsv_from_upload): Use std::string.
175
176 2017-09-29  Tom Tromey  <tom@tromey.com>
177
178         * cp-support.c (gdb_demangle): Use std::string.
179
180 2017-09-29  Tom Tromey  <tom@tromey.com>
181
182         * stack.c (parse_frame_specification): Use std::string
183         (info_frame_command): Use gdb::unique_xmalloc_ptr.
184
185 2017-09-29  Tom Tromey  <tom@tromey.com>
186
187         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
188
189 2017-09-29  Tom Tromey  <tom@tromey.com>
190
191         * utils.c (vfprintf_maybe_filtered): Use std::string.
192         (vfprintf_unfiltered): Likewise.
193
194 2017-09-29  Tom Tromey  <tom@tromey.com>
195
196         * event-top.c (top_level_prompt): Return std::string.
197         (display_gdb_prompt): Update.
198
199 2017-09-29  Tom Tromey  <tom@tromey.com>
200
201         * unittests/common-utils-selftests.c (format): New function.
202         (string_vprintf_tests): New function.
203         (_initialize_common_utils_selftests): Register new tests.
204         * common/common-utils.c (string_vprintf): New function.
205         * common/common-utils.h (string_vprintf): Declare.
206
207 2017-09-29  Pedro Alves  <palves@redhat.com>
208
209         * common/rsp-low.c (unpack_varlen_hex): Constify.
210         * common/rsp-low.h (unpack_varlen_hex): Constify.
211         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
212         Constify.
213         * remote.c (remote_set_permissions, read_ptid)
214         (remote_current_thread, remote_get_threads_with_qthreadinfo)
215         (remote_static_tracepoint_marker_at)
216         (remote_static_tracepoint_markers_by_strid)
217         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
218         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
219         (parse_tracepoint_definition, parse_tsv_definition)
220         (parse_static_tracepoint_marker_definition): Constify.
221         * tracepoint.h (parse_static_tracepoint_marker_definition)
222         (parse_trace_status, parse_tracepoint_status)
223         (parse_tracepoint_definition, parse_tsv_definition): Constify.
224
225 2017-09-29  Pedro Alves  <palves@redhat.com>
226
227         * remote.c (target_buf, target_buf_size): Delete.
228         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
229         Use the connection's packet buffer instead.
230         All callers adjusted.
231         (_initialize_remote): Remove references to target_buf and
232         target_buf_size.
233
234 2017-09-28  Pedro Alves  <palves@redhat.com>
235
236         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
237         unittests/common-utils-selftests.c.
238         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
239         (COMMON_OBS): Remove utils-selftests.o.
240         * utils-selftests.c: Move to ...
241         * unittests/common-utils-selftests.c: ... here and rename self
242         test to "string_printf".
243
244 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
245
246         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
247         having NULL cus or tus.
248
249 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
250
251         * arm-tdep.c: (convert_from_extended): Remove.
252         (convert_to_extended): Likewise.
253         (arm_extract_return_value): Use convert_typed_floating.
254         (arm_store_return_value): Likewise.
255
256         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
257         * sh-tdep.c: Do not include "floatformat.h".
258         (sh_littlebyte_bigword_type): New function.
259         (sh_register_convert_to_virtual): Use convert_typed_floating.
260         (sh_register_convert_to_raw): Likewise.
261         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
262         (sh64_littlebyte_bigword_type): New function.
263         (sh64_extract_return_value): Use convert_typed_floating.
264         (sh64_register_convert_to_virtual): Likewise.
265         (sh64_register_convert_to_raw): Likewise.
266
267 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
268
269         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
270         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
271
272         * gdbtypes.h (union type_specific): Make field floatformat hold
273         just a single struct floatformat, not an array.
274         (floatformat_from_type): Move here.
275         * gdbtypes.c (floatformat_from_type): Move here.  Update to
276         changed TYPE_FLOATFORMAT definition.
277         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
278         (recursive_dump_type): Likewise.
279         (init_float_type): Install correct floatformat for byte order.
280         (arch_float_type): Likewise.
281
282 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
283
284         * gdbtypes.c (init_type): Change incoming argument from
285         length-in-bytes to length-in-bits.  Assert length is a
286         multiple of TARGET_CHAR_BITS.
287         (arch_type, arch_flags_type): Likewise.
288         (init_integer_type): Update call to init_type.
289         (init_character_type): Likewise.
290         (init_boolean_type): Likewise.
291         (init_float_type): Likewise.
292         (init_decfloat_type): Likewise.
293         (init_complex_type): Likewise.
294         (init_pointer_type): Likewise.
295         (objfile_type): Likewise.
296         (arch_integer_type): Update call to arch_type.
297         (arch_character_type): Likewise.
298         (arch_boolean_type): Likewise.
299         (arch_float_type): Likewise.
300         (arch_decfloat_type): Likewise.
301         (arch_complex_type): Likewise.
302         (arch_pointer_type): Likewise.
303         (gdbtypes_post_init): Likewise.
304
305         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
306         (read_base_type): Likewise.
307         * mdebugread.c (basic_type): Likewise.
308         * stabsread.c (dbx_init_float_type): Likewise.
309         (rs6000_builtin_type): Likewise.
310         (read_range_type): Likewise.  Also, fix call to init_integer_type
311         with erroneous length argument.
312
313         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
314         * d-lang.c (build_d_types): Likewise.
315         * f-lang.c (build_fortran_types): Likewise.
316         * go-lang.c (build_go_types): Likewise.
317         * opencl-lang.c (build_opencl_types): Likewise.
318         * jit.c (finalize_symtab): Likewise.
319         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
320         (build_std_type_info_type): Likewise.
321         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
322         update call to arch_flags_type.
323
324         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
325         arch_type.
326         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
327         * windows-tdep.c (windows_get_tlb_type): Likewise.
328
329         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
330         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
331         * m32c-tdep.c (make_types): Likewise.
332         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
333         (rl78_psw_type): Update call to arch_flags_type.
334         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
335         * rx-tdep.c (rx_psw_type): Likewise.
336         (rx_fpsw_type): Likewise.
337         * sparc-tdep.c (sparc_psr_type): Likewise.
338         (sparc_fsr_type): Likewise.
339         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
340         (sparc64_ccr_type): Likewise.
341         (sparc64_fsr_type): Likewise.
342         (sparc64_fprs_type): Likewise.
343
344 2017-09-27  Tom Tromey  <tom@tromey.com>
345
346         * findcmd.c (find_command): Constify.
347
348 2017-09-27  Tom Tromey  <tom@tromey.com>
349
350         * ada-tasks.c (task_command_1, task_command): Constify.
351
352 2017-09-27  Tom Tromey  <tom@tromey.com>
353
354         * symtab.c (maintenance_print_symbol_cache)
355         (maintenance_flush_symbol_cache)
356         (maintenance_print_symbol_cache_statistics): Constify.
357
358 2017-09-27  Tom Tromey  <tom@tromey.com>
359
360         * inferior.c (detach_inferior_command, kill_inferior_command)
361         (inferior_command): Constify.
362
363 2017-09-27  Tom Tromey  <tom@tromey.com>
364
365         * regcache.c (regcache_print, maintenance_print_registers)
366         (maintenance_print_raw_registers)
367         (maintenance_print_cooked_registers)
368         (maintenance_print_register_groups)
369         (maintenance_print_remote_registers): Constify.
370
371 2017-09-27  Tom Tromey  <tom@tromey.com>
372
373         * printcmd.c (map_display_numbers, undisplay_command)
374         (enable_disable_display_command, enable_display_command)
375         (disable_display_command): Constify.
376
377 2017-09-27  Tom Tromey  <tom@tromey.com>
378
379         * breakpoint.h (delete_command): Don't declare.
380         * breakpoint.c (delete_command, enable_once_command)
381         (enable_count_command, enable_delete_command, breakpoint_1)
382         (maintenance_info_breakpoints, stopin_command, stopat_command)
383         (delete_command, delete_trace_command, save_breakpoints)
384         (save_breakpoints_command, save_tracepoints_command): Constify.
385
386 2017-09-27  Tom Tromey  <tom@tromey.com>
387
388         * macrocmd.c (macro_expand_command, macro_expand_once_command)
389         (skip_ws, extract_identifier, macro_define_command)
390         (macro_undef_command, macro_list_command): Constify.
391
392 2017-09-27  Tom Tromey  <tom@tromey.com>
393
394         * infcmd.c (environment_info, set_environment_command)
395         (unset_environment_command, path_info, info_proc_cmd_1)
396         (info_proc_cmd_mappings, info_proc_cmd_stat)
397         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
398         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
399
400 2017-09-27  Tom Tromey  <tom@tromey.com>
401
402         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
403         Constify.
404
405 2017-09-27  Tom Tromey  <tom@tromey.com>
406
407         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
408
409 2017-09-27  Tom Tromey  <tom@tromey.com>
410
411         * demangle.c (demangle_command): Constify.
412
413 2017-09-27  Tom Tromey  <tom@tromey.com>
414
415         * progspace.c (maintenance_info_program_spaces_command):
416         Constify.
417
418 2017-09-27  Tom Tromey  <tom@tromey.com>
419
420         * compile/compile.c (check_raw_argument, compile_file_command)
421         (compile_code_command, compile_print_command): Constify.
422
423 2017-09-27  Tom Tromey  <tom@tromey.com>
424
425         * reggroups.c (maintenance_print_reggroups): Constify.
426
427 2017-09-27  Tom Tromey  <tom@tromey.com>
428
429         * dwarf2read.c (save_gdb_index_command): Constify.
430
431 2017-09-27  Tom Tromey  <tom@tromey.com>
432
433         * stap-probe.c (info_probes_stap_command): Constify.
434
435 2017-09-27  Tom Tromey  <tom@tromey.com>
436
437         * fork-child.c (unset_exec_wrapper_command): Constify.
438
439 2017-09-27  Tom Tromey  <tom@tromey.com>
440
441         * btrace.c (get_uint, get_context_size, no_chunk)
442         (maint_btrace_packet_history_cmd)
443         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
444         (maint_info_btrace_cmd): Constify.
445
446 2017-09-27  Tom Tromey  <tom@tromey.com>
447
448         * reverse.c (delete_bookmark_command): Constify.
449
450 2017-09-27  Tom Tromey  <tom@tromey.com>
451
452         * remote.c (set_memory_packet_size)
453         (set_memory_write_packet_size, show_memory_write_packet_size)
454         (set_memory_read_packet_size, show_memory_read_packet_size)
455         (compare_sections_command, packet_command, remote_put_command)
456         (remote_get_command, remote_delete_command): Constify.
457
458 2017-09-27  Tom Tromey  <tom@tromey.com>
459
460         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
461         (set_mipsfpu_double_command, set_mipsfpu_none_command)
462         (set_mipsfpu_auto_command): Constify.
463
464 2017-09-27  Tom Tromey  <tom@tromey.com>
465
466         * cli/cli-cmds.h (cd_command): Constify.
467         * cli/cli-cmds.c (cd_command): Constify.
468
469 2017-09-27  Tom Tromey  <tom@tromey.com>
470
471         * thread.c (thread_name_command, thread_find_command): Constify.
472
473 2017-09-27  Tom Tromey  <tom@tromey.com>
474
475         * probe.c (enable_probes_command, disable_probes_command):
476         Constify.
477
478 2017-09-27  Tom Tromey  <tom@tromey.com>
479
480         * symfile.c (symbol_file_command): Constify.
481         * gdbcore.h (deprecated_file_changed_hook): Constify.
482         * exec.c (deprecated_file_changed_hook, exec_file_command)
483         (file_command): Constify.
484         * defs.h (symbol_file_command): Constify.
485
486 2017-09-27  Tom Tromey  <tom@tromey.com>
487
488         * remote-fileio.c (set_system_call_allowed)
489         (show_system_call_allowed): Constify.
490
491 2017-09-27  Tom Tromey  <tom@tromey.com>
492
493         * tracepoint.c (delete_trace_variable_command)
494         (tfind_end_command, tfind_start_command, tfind_pc_command)
495         (tfind_tracepoint_command, tfind_line_command)
496         (tfind_range_command, tfind_outside_command): Constify.
497
498 2017-09-27  Tom Tromey  <tom@tromey.com>
499
500         * ax-gdb.c (maint_agent_printf_command, agent_command)
501         (agent_eval_command): Constify.
502
503 2017-09-27  Tom Tromey  <tom@tromey.com>
504
505         * tracepoint.c (info_scope_command): Constify.
506         * python/python.c (gdbpy_decode_line): Constify.
507         * python/py-breakpoint.c (bppy_init): Constify.
508         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
509         * location.h: (new_linespec_location)
510         (string_to_event_location_basic, string_to_event_location):
511         Constify.
512         * location.c (new_linespec_location)
513         (string_to_event_location_basic, string_to_event_location):
514         Constify.
515         * linespec.h (decode_line_with_current_source)
516         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
517         * linespec.c (linespec_lex_to_end)
518         (decode_line_with_current_source)
519         (decode_line_with_last_displayed): Constify.
520         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
521         Constify.
522         * cli/cli-cmds.c (edit_command, list_command): Constify.
523         * breakpoint.h (until_break_command, watch_command_wrapper)
524         (awatch_command_wrapper, rwatch_command_wrapper)
525         (init_ada_exception_breakpoint): Constify.
526         * breakpoint.c (break_command_1, dprintf_command)
527         (break_range_command, watch_command_wrapper)
528         (rwatch_command_wrapper, awatch_command_wrapper)
529         (until_break_command, init_ada_exception_breakpoint)
530         (strace_marker_create_sals_from_location, trace_command)
531         (ftrace_command, strace_command, struct tracepoint): Constify.
532         * ax-gdb.c (agent_command_1): Constify.
533         * ada-lang.c (ada_exception_sal): Constify.
534
535 2017-09-27  Tom Tromey  <tom@tromey.com>
536
537         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
538         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
539         (get_context_size, no_chunk, get_insn_history_modifiers)
540         (cmd_record_insn_history, get_call_history_modifiers)
541         (cmd_record_call_history): Constify.
542
543 2017-09-27  Tom Tromey  <tom@tromey.com>
544
545         * source.c (show_substitute_path_command)
546         (unset_substitute_path_command, set_substitute_path_command):
547         Constify.
548
549 2017-09-27  Tom Tromey  <tom@tromey.com>
550
551         * typeprint.c (maintenance_print_type): Constify.
552         * maint.c (maintenance_dump_me, maintenance_demangle)
553         (maintenance_time_display, maintenance_info_sections)
554         (maintenance_print_statistics, maintenance_deprecate)
555         (maintenance_undeprecate): Constify.
556         (maintenance_do_deprecate): Constify.  Use std::string.
557         (maintenance_selftest): Constify.
558         * gdbtypes.h (maintenance_print_type): Constify.
559
560 2017-09-27  Tom Tromey  <tom@tromey.com>
561
562         * hppa-tdep.c (unwind_command): Constify.
563
564 2017-09-27  Tom Tromey  <tom@tromey.com>
565
566         * target-descriptions.c (unset_tdesc_filename_cmd)
567         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
568         Constify.
569
570 2017-09-27  Tom Tromey  <tom@tromey.com>
571
572         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
573
574 2017-09-27  Tom Tromey  <tom@tromey.com>
575
576         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
577
578 2017-09-27  Tom Tromey  <tom@tromey.com>
579
580         * tui/tui-regs.c (tui_reg_command): Constify.
581
582 2017-09-27  Tom Tromey  <tom@tromey.com>
583
584         * skip.c (skip_file_command, skip_function_command)
585         (skip_enable_command, skip_disable_command, skip_delete_command):
586         Constify.
587
588 2017-09-27  Tom Tromey  <tom@tromey.com>
589
590         * record-btrace.c (cmd_record_btrace_bts_start)
591         (cmd_record_btrace_pt_start): Constify.
592
593 2017-09-27  Tom Tromey  <tom@tromey.com>
594
595         * symmisc.c (maintenance_print_symbols)
596         (maintenance_print_msymbols, maintenance_print_objfiles)
597         (maintenance_info_symtabs, maintenance_check_symtabs)
598         (maintenance_expand_symtabs, maintenance_info_line_tables):
599         Constify.
600
601 2017-09-27  Tom Tromey  <tom@tromey.com>
602
603         * top.c (new_ui_command): Constify.
604
605 2017-09-27  Tom Tromey  <tom@tromey.com>
606
607         * symfile.c (add_symbol_file_command)
608         (remove_symbol_file_command, list_overlays_command)
609         (map_overlay_command, unmap_overlay_command)
610         (overlay_auto_command, overlay_manual_command)
611         (overlay_off_command, overlay_load_command): Constify.
612
613 2017-09-27  Tom Tromey  <tom@tromey.com>
614
615         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
616         (info_spu_mailbox_command, info_spu_dma_command)
617         (info_spu_proxydma_command): Constify.
618
619 2017-09-27  Tom Tromey  <tom@tromey.com>
620
621         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
622
623 2017-09-27  Tom Tromey  <tom@tromey.com>
624
625         * cli/cli-script.c (user_defined_command): Constify.
626
627 2017-09-27  Tom Tromey  <tom@tromey.com>
628
629         * cli/cli-dump.c (dump_memory_command, dump_value_command)
630         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
631         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
632         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
633         (dump_binary_value, append_binary_memory, append_binary_value):
634         Constify.
635         (struct dump_context) <func>: Constify.
636         (add_dump_command): Update.
637
638 2017-09-27  Tom Tromey  <tom@tromey.com>
639
640         * cli/cli-cmds.c (show_version, show_configuration)
641         (source_command, show_user): Constify.
642
643 2017-09-27  Tom Tromey  <tom@tromey.com>
644
645         * target.c (maintenance_print_target_stack): Constify.
646
647 2017-09-27  Tom Tromey  <tom@tromey.com>
648
649         * interps.c (interpreter_exec_cmd): Constify.
650
651 2017-09-27  Tom Tromey  <tom@tromey.com>
652
653         * record-full.c (cmd_record_full_restore): Constify.
654
655 2017-09-27  Tom Tromey  <tom@tromey.com>
656
657         * memattr.c (enable_mem_command, disable_mem_command)
658         (delete_mem_command): Constify.
659
660 2017-09-27  Tom Tromey  <tom@tromey.com>
661
662         * value.c (show_convenience): Constify.
663
664 2017-09-27  Tom Tromey  <tom@tromey.com>
665
666         * gdbcore.h (core_file_command): Update.
667         * corefile.c (core_file_command): Constify.
668
669 2017-09-27  Tom Tromey  <tom@tromey.com>
670
671         * user-regs.c (maintenance_print_user_registers): Constify.
672
673 2017-09-27  Tom Tromey  <tom@tromey.com>
674
675         * cp-namespace.c (maintenance_cplus_namespace): Constify.
676
677 2017-09-27  Tom Tromey  <tom@tromey.com>
678
679         * cp-support.c (first_component_command): Constify.
680
681 2017-09-27  Tom Tromey  <tom@tromey.com>
682
683         * psymtab.c (maintenance_print_psymbols)
684         (maintenance_info_psymtabs, maintenance_check_psymtabs):
685         Constify.
686
687 2017-09-27  Tom Tromey  <tom@tromey.com>
688
689         * windows-tdep.c (display_tib): Constify.
690
691 2017-09-27  Tom Tromey  <tom@tromey.com>
692
693         * linux-fork.c (delete_checkpoint_command)
694         (detach_checkpoint_command): Constify.
695
696 2017-09-27  Tom Tromey  <tom@tromey.com>
697
698         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
699
700 2017-09-27  Tom Tromey  <tom@tromey.com>
701
702         * arc-tdep.c (dump_arc_instruction_command): Constify.
703
704 2017-09-27  Tom Tromey  <tom@tromey.com>
705
706         * valprint.c (set_radix, show_radix): Constify.
707
708 2017-09-27  Tom Tromey  <tom@tromey.com>
709
710         * dtrace-probe.c (info_probes_dtrace_command): Constify.
711
712 2017-09-27  Tom Tromey  <tom@tromey.com>
713
714         * command.h (not_just_help_class_command): Update.
715         * cli/cli-decode.h (not_just_help_class_command): Update.
716         * cli/cli-decode.c (not_just_help_class_command): Constify.
717
718 2017-09-27  Tom Tromey  <tom@tromey.com>
719
720         * gdb_bfd.c (maintenance_info_bfds): Constify.
721
722 2017-09-27  Tom Tromey  <tom@tromey.com>
723
724         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
725         overloads.
726         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
727         (do_const_cfunc): New function.
728         (cmd_cfunc_eq): New overload.
729         (cli_user_command_p): Check do_const_cfunc.
730         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
731         const_cfunc.
732         * command.h (add_cmd): Add const overload and no-function
733         overload.
734         (set_cmd_cfunc): Add const overload.
735         (cmd_const_cfunc_ftype): Declare.
736         (cmd_cfunc_eq): Add const overload.
737         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
738         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
739         overload.
740
741 2017-09-27  Tom Tromey  <tom@tromey.com>
742
743         * macroexp.c (get_next_token_for_substitution): New function.
744         (substitute_args): Call it.  Check for __VA_OPT__.
745
746 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
747             Pedro Alves <palves@redhat.com>
748
749         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
750         producer_is_icc_lt_14.
751         (producer_is_icc_lt_14): New function.
752         (check_producer): Add code for checking version of ICC.
753         (producer_is_icc): Move to producer.c.
754         (read_structure_type): Restrict ICC workaround to ICC<14.
755         * producer.c: Include selftest.h.
756         (producer_is_icc, producer_parsing_tests, _initialize_producer):
757         New functions.
758         * producer.h (producer_is_icc): New declaration.
759
760 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
761
762         * Makefile.in (SFILES): Add producer.c.
763         (COMMON_OBS): Add producer.o
764         * amd64-tdep.c (producer.h): Add new include.
765         * dwarf2read.c (producer.h): Add new include.
766         * producer.c: New file.
767         * producer.h: New file.
768         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
769         producer.c.
770         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
771         producer.h.
772
773 2017-09-26  Matthias Klose  <doko@ubuntu.com>
774
775         * configure.ac: Search ncursesw before ncurses.
776         Check ncursesw/ncurses.h before ncurses/ncurses.h.
777         * gdb_curses.h: Include <ncursesw/ncurses.h>
778         * config.in, configure: Regenerate.
779
780 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
781
782         PR gdb/22185
783         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
784         obsolete.
785         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
786         Remove i386sol2 support.
787         * configure.nat <i386sol2>: Remove.
788         <sol2-64>: Fold into ...
789         <sol2>: ... this.
790         Move common settings to default section.
791         Add sol-thread.o.
792         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
793         x86_64-*-solaris2.1[0-9]*>: Rename to ...
794         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
795         <i[34567]86-*-solaris*>: Remove.
796         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
797
798         * configure.ac: Remove wctype in libw check.
799         (_MSE_INT_H): Don't define on Solaris 7-9.
800         <solaris*>: Remove libthread_db.so.1 check.
801         * configure: Regenerate.
802         * config.in: Regenerate.
803
804         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
805         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
806         (gdb_ps_size_t): Remove.
807         Use base types in users.
808         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
809
810         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
811
812 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
813
814         PR build/22206
815         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
816         (adi_is_addr_mapped): Likewise.
817         (PSR_ICC): Don't redefine.
818         (PSR_IMPL): Likewise.
819
820 2017-09-25  Tom Tromey  <tom@tromey.com>
821
822         * regcache.c (regcache::dump): Use string_printf.
823
824 2017-09-25  Tom Tromey  <tom@tromey.com>
825
826         * regcache.c (class regcache_invalidator): New.
827         (struct register_to_invalidate): Remove.
828         (make_cleanup_regcache_invalidate): Remove.
829         (regcache::raw_write): Use regcache_invalidator.
830
831 2017-09-25  Tom Tromey  <tom@tromey.com>
832
833         * spu-tdep.c (spu2ppu_sniffer): Update.
834         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
835         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
836         Remove.
837         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
838         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
839         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
840         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
841         (frame_pop): Update.
842
843 2017-09-25  Tom Tromey  <tom@tromey.com>
844
845         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
846         * regcache.h (regcache_xfree): Don't declare.
847         * regcache.c (regcache_xfree): Remove.
848         (do_regcache_xfree): Use delete.
849         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
850         * linux-fork.c (free_fork): Use delete.
851         (fork_save_infrun_state): Likewise.
852         * jit.c (jit_dealloc_cache): Use delete.
853         * infrun.c (discard_infcall_suspend_state): Use delete.
854
855 2017-09-25  Tom Tromey  <tom@tromey.com>
856
857         * regcache.h (regcache_xmalloc): Don't declare.
858         (regcache_raw_set_cached_value): Update comment.
859         * regcache.c (regcache_xmalloc): Remove.
860         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
861         * jit.c (jit_frame_sniffer): Use new.
862         * frame.c (frame_save_as_regcache): Use new.
863
864 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
865
866         * NEWS: Advertise support for guarded-storage registers on IBM z.
867
868 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
869
870         * s390-linux-nat.c (have_regset_gs): New static variable.
871         (s390_linux_fetch_inferior_registers): Handle guarded-storage
872         control block and guarded-storage broadcast control regsets.
873         (s390_read_description): Detect whether the target has
874         guarded-storage support, return appropriate tdesc.
875         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
876         (features/s390x-gs-linux64.c): Likewise.
877         (struct gdbarch_tdep) <have_gs>: New field.
878         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
879         (s390_gsbc_regset): New variables.
880         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
881         and s390_gsbc_regset, if applicable.
882         (s390_core_read_description): Check whether core file was from a
883         target with guarded-storage support; include appropriate regsets.
884         (s390_gdbarch_init): Add registers for guarded-storage support.
885         (_initialize_s390_tdep): Initialize new target descriptions that
886         include registers for guarded-storage support.
887         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
888         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
889         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
890         (S390_NUM_REGS): Adjust macro definition.
891         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
892         (tdesc_s390x_gs_linux64): New declarations.
893
894 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
895
896         * features/s390-gs-linux64.xml: New file.
897         * features/s390-gs.xml: New file.
898         * features/s390-gsbc.xml: New file.
899         * features/s390x-gs-linux64.xml: New file.
900         * features/Makefile (WHICH): Add s390-gs-linux64 and
901         s390x-gs-linux64.
902         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
903         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
904         * features/s390-gs-linux64.c: New generated file.
905         * features/s390x-gs-linux64.c: New file.
906         * regformats/s390-gs-linux64.dat: New file.
907         * regformats/s390x-gs-linux64.dat: New file.
908
909 2017-09-23  Tom Tromey  <tom@tromey.com>
910
911         * defs.h (make_cleanup_override_quit_handler): Don't declare.
912
913 2017-09-22  Tom Tromey  <tom@tromey.com>
914
915         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
916         type to scoped_restore_tmpl.
917         <scoped_input_handler>: Initialize m_quit_handler directly.
918
919 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
920
921         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
922         (cd_command): Likewise.  Free "current_directory" before
923         assigning to it.
924         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
925         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
926         * top.c (gdb_dirbuf): Remove global declaration.
927         * top.h (gdb_dirbuf): Likewise.
928
929 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
930
931         * gnulib/aclocal.m4: Regenerate.
932         * gnulib/config.in: Regenerate.
933         * gnulib/configure: Regenerate.
934         * gnulib/import/Makefile.am: Regenerate.
935         * gnulib/import/Makefile.in: Regenerate.
936         * gnulib/import/assure.h: New file.
937         * gnulib/import/at-func.c: Likewise
938         * gnulib/import/chdir-long.c: New file.
939         * gnulib/import/chdir-long.h: New file.
940         * gnulib/import/cloexec.c: New file.
941         * gnulib/import/cloexec.h: New file.
942         * gnulib/import/close.c: New file.
943         * gnulib/import/closedir.c: New file.
944         * gnulib/import/dirent-private.h: New file.
945         * gnulib/import/dup-safer.c: New file.
946         * gnulib/import/dup.c: New file.
947         * gnulib/import/dup2.c: New file.
948         * gnulib/import/error.c: New file.
949         * gnulib/import/error.h: New file.
950         * gnulib/import/exitfail.c: New file.
951         * gnulib/import/exitfail.h: New file.
952         * gnulib/import/fchdir.c: New file.
953         * gnulib/import/fcntl.c: New file.
954         * gnulib/import/fcntl.in.h: New file.
955         * gnulib/import/fd-hook.c: New file.
956         * gnulib/import/fd-hook.h: New file.
957         * gnulib/import/fd-safer.c: New file.
958         * gnulib/import/fdopendir.c: New file.
959         * gnulib/import/filename.h: New file.
960         * gnulib/import/filenamecat-lgpl.c: New file.
961         * gnulib/import/filenamecat.h: New file.
962         * gnulib/import/fstat.c: New file.
963         * gnulib/import/fstatat.c: New file.
964         * gnulib/import/getcwd-lgpl.c: New file.
965         * gnulib/import/getcwd.c: New file.
966         * gnulib/import/getdtablesize.c: New file.
967         * gnulib/import/getlogin_r.c: New file.
968         * gnulib/import/getprogname.c: New file.
969         * gnulib/import/getprogname.h: New file.
970         * gnulib/import/gettext.h: New file.
971         * gnulib/import/glob-libc.h: New file.
972         * gnulib/import/glob.c: New file.
973         * gnulib/import/glob.in.h: New file.
974         * gnulib/import/intprops.h: New file.
975         * gnulib/import/m4/chdir-long.m4: New file.
976         * gnulib/import/m4/close.m4: New file.
977         * gnulib/import/m4/closedir.m4: New file.
978         * gnulib/import/m4/d-ino.m4: New file.
979         * gnulib/import/m4/d-type.m4: New file.
980         * gnulib/import/m4/dup.m4: New file.
981         * gnulib/import/m4/dup2.m4: New file.
982         * gnulib/import/m4/error.m4: New file.
983         * gnulib/import/m4/fchdir.m4: New file.
984         * gnulib/import/m4/fcntl.m4: New file.
985         * gnulib/import/m4/fcntl_h.m4: New file.
986         * gnulib/import/m4/fdopendir.m4: New file.
987         * gnulib/import/m4/filenamecat.m4: New file.
988         * gnulib/import/m4/fstat.m4: New file.
989         * gnulib/import/m4/fstatat.m4: New file.
990         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
991         * gnulib/import/m4/getcwd-path-max.m4: New file.
992         * gnulib/import/m4/getcwd.m4: New file.
993         * gnulib/import/m4/getdtablesize.m4: New file.
994         * gnulib/import/m4/getlogin_r.m4: New file.
995         * gnulib/import/m4/getprogname.m4: New file.
996         * gnulib/import/m4/glob.m4: New file.
997         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
998         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
999         * gnulib/import/m4/mempcpy.m4: New file.
1000         * gnulib/import/m4/memrchr.m4: New file.
1001         * gnulib/import/m4/mode_t.m4: New file.
1002         * gnulib/import/m4/msvc-inval.m4: New file.
1003         * gnulib/import/m4/msvc-nothrow.m4: New file.
1004         * gnulib/import/m4/open.m4: New file.
1005         * gnulib/import/m4/openat.m4: New file.
1006         * gnulib/import/m4/opendir.m4: New file.
1007         * gnulib/import/m4/readdir.m4: New file.
1008         * gnulib/import/m4/realloc.m4: New file.
1009         * gnulib/import/m4/rewinddir.m4: New file.
1010         * gnulib/import/m4/save-cwd.m4: New file.
1011         * gnulib/import/m4/strdup.m4: New file.
1012         * gnulib/import/m4/strerror.m4: New file.
1013         * gnulib/import/m4/unistd-safer.m4: New file.
1014         * gnulib/import/mempcpy.c: New file.
1015         * gnulib/import/memrchr.c: New file.
1016         * gnulib/import/msvc-inval.c: New file.
1017         * gnulib/import/msvc-inval.h: New file.
1018         * gnulib/import/msvc-nothrow.c: New file.
1019         * gnulib/import/msvc-nothrow.h: New file.
1020         * gnulib/import/open.c: New file.
1021         * gnulib/import/openat-die.c: New file.
1022         * gnulib/import/openat-priv.h: New file.
1023         * gnulib/import/openat-proc.c: New file.
1024         * gnulib/import/openat.c: New file.
1025         * gnulib/import/openat.h: New file.
1026         * gnulib/import/opendir.c: New file.
1027         * gnulib/import/pipe-safer.c: New file.
1028         * gnulib/import/readdir.c: New file.
1029         * gnulib/import/realloc.c: New file.
1030         * gnulib/import/rewinddir.c: New file.
1031         * gnulib/import/save-cwd.c: New file.
1032         * gnulib/import/save-cwd.h: New file.
1033         * gnulib/import/strdup.c: New file.
1034         * gnulib/import/strerror-override.c: New file.
1035         * gnulib/import/strerror-override.h: New file.
1036         * gnulib/import/strerror.c: New file.
1037         * gnulib/import/unistd--.h: New file.
1038         * gnulib/import/unistd-safer.h: New file.
1039         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1040         "getcwd" and "glob".
1041         * ser-tcp.c: Undefine "close" before redefining it.
1042
1043 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1044
1045         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1046         get rid of res_val.
1047
1048 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1049
1050         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1051         <sol2,sparc>: Likewise.
1052         <sol2-64,i386>: Likewise.
1053
1054         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1055         -Wdeprecated-declarations on *-*-solaris*.
1056         * configure: Regenerate.
1057
1058         * procfs.c: Include "nat/inferior.h".
1059         (procfs_info_proc): Fix typo.
1060
1061 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1062
1063         * remote.c (vector): Include.
1064         (struct private_thread_info): Add field, thread_handle.
1065         (free_private_thread_info): Deallocate storage associated with
1066         thread handle.
1067         (get_private_info_thread): Initialize `thread_handle' field.
1068         (struct thread_item): Add field, thread_handle.
1069         (clear_threads_listing_context): Deallocate storage associated
1070         with thread handle.
1071         (start_thread): Add support for "handle" attribute.
1072         (thread_attributes): Add "handle".
1073         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1074         field.
1075         (remote_update_thread_list): Update thread_handle.
1076         (remote_thread_handle_to_thread_info): New function.
1077         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1078
1079 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1080
1081         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1082         function.
1083         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1084         * python/python-internal.h (thread_object_type): Declare.
1085
1086 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1087
1088         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1089         (target_thread_handle_to_thread_info): Declare.
1090         * target.c (target_thread_handle_to_thread_info): New function.
1091         * target-delegates.c: Regenerate.
1092         * gdbthread.h (find_thread_by_handle): Declare.
1093         * thread.c (find_thread_by_handle): New function.
1094         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1095         function.
1096         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1097
1098 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1099
1100         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1101
1102 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1103
1104         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1105
1106 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1107
1108         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1109         to gdb_target_obs.
1110
1111 2017-09-20  Tom Tromey  <tom@tromey.com>
1112
1113         * breakpoint.c (struct counted_command_line): Remove.
1114         (breakpoint_commands): Update.
1115         (alloc_counted_command_line, incref_counted_command_line)
1116         (decref_counted_command_line, do_cleanup_counted_command_line)
1117         (make_cleanup_decref_counted_command_line): Remove.
1118         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1119         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1120         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1121         (save_breakpoints): Update.
1122         * breakpoint.h (counted_command_line): Now a typedef to
1123         shared_ptr.
1124         (struct breakpoint) <commands>: Now a counted_command_line.
1125         (struct bpstats) <command>: Likewise.
1126
1127 2017-09-20  Tom Tromey  <tom@tromey.com>
1128
1129         * breakpoint.c (struct commands_info, do_map_commands_command):
1130         Remove.
1131         (commands_command_1): Update.
1132         (iterate_over_related_breakpoints): Take a function_view.
1133         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1134         (delete_command): Update.
1135         (map_breakpoint_numbers): Take a function_view.
1136         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1137         (disable_command): Update.
1138         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1139         (enable_command): Update.
1140         (struct disp_data, do_enable_breakpoint_disp)
1141         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1142         (do_map_enable_delete_breakpoint): Remove.
1143         (enable_once_command, enable_count_command, enable_delete_command)
1144         (delete_trace_variable_command): Update.
1145
1146 2017-09-20  Tom Tromey  <tom@tromey.com>
1147
1148         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1149         (bpstat_clear): Use delete.
1150         (bpstats): New constructors.
1151         (bpstat_copy, bpstat_stop_status): Use new.
1152         (dprintf_after_condition_true): Update.
1153         * breakpoint.h (bpstats::bpstats): Add constructors.
1154         (bpstats::~bpstats): Add destructor.
1155
1156 2017-09-20  Pedro Alves  <palves@redhat.com>
1157
1158         * eval.c (make_params): Delete, refactored as ...
1159         (class fake_method): ... this new type's ctor.
1160         (fake_method::~fake_method): New.
1161         (evaluate_subexp_standard): Use 'fake_method'.
1162
1163 2017-09-20  Tom Tromey  <tom@tromey.com>
1164
1165         * windows-nat.c (get_windows_debug_event, windows_wait)
1166         (do_initial_windows_stuff, windows_attach): Update.
1167         * utils.c (vwarning, internal_vproblem): Update.
1168         (ui_unregister_input_event_handler_cleanup)
1169         (prepare_to_handle_input): Remove.
1170         (class scoped_input_handler): New.
1171         (defaulted_query, prompt_for_continue): Update.
1172         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1173         Update.
1174         * top.c (undo_terminal_modifications_before_exit): Update.
1175         * target/target.h (target_terminal_init, target_terminal_inferior)
1176         (target_terminal_ours): Don't declare.
1177         (class target_terminal): New.
1178         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1179         (target_terminal_ours_for_output)
1180         (make_cleanup_restore_target_terminal): Don't declare.
1181         (target_terminal_info): Remove.
1182         * target.c (enum terminal_state, terminal_state): Remove.
1183         (target_terminal::terminal_state): Define.
1184         (target_terminal::init): Rename from target_terminal_init.
1185         (target_terminal::inferior): Rename from
1186         target_terminal_inferior.
1187         (target_terminal::ours): Rename from target_terminal_ours.
1188         (target_terminal::ours_for_output): Rename from
1189         target_terminal_ours_for_output.
1190         (target_terminal::info): New method.
1191         (cleanup_restore_target_terminal)
1192         (make_cleanup_restore_target_terminal): Remove.
1193         * solib.c (handle_solib_event): Update.
1194         * remote.c (remote_serial_quit_handler): Update.
1195         (remote_terminal_inferior, remote_wait_as): Update.
1196         * record-full.c (record_full_wait_1): Update.
1197         * nto-procfs.c (procfs_create_inferior): Update.
1198         * nat/fork-inferior.c (startup_inferior): Update.
1199         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1200         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1201         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1202         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1203         (mi_breakpoint_created, mi_breakpoint_deleted)
1204         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1205         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1206         (mi_user_selected_context_changed, report_initial_inferior):
1207         Update.
1208         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1209         (linux_nat_terminal_inferior): Update.
1210         * infrun.c (follow_fork_inferior)
1211         (handle_vfork_child_exec_or_exit, do_target_resume)
1212         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1213         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1214         Update.
1215         * inflow.c (child_terminal_init, info_terminal_command): Update.
1216         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1217         (attach_command): Update.
1218         * infcall.c (call_thread_fsm_should_stop): Update.
1219         * gnu-nat.c (gnu_attach): Update.
1220         * extension.c (struct active_ext_lang_state)
1221         (restore_active_ext_lang): Update.
1222         * exceptions.c (print_flush): Update.
1223         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1224         (struct quit_handler_cleanup_data, restore_quit_handler)
1225         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1226         Remove.
1227         * cp-support.c (gdb_demangle): Update.
1228         * breakpoint.c (update_inserted_breakpoint_locations)
1229         (insert_breakpoint_locations, handle_jit_event)
1230         (disable_breakpoints_in_unloaded_shlib): Update.
1231         * annotate.c (annotate_breakpoints_invalid)
1232         (annotate_frames_invalid): Update.
1233
1234 2017-09-20  Tom Tromey  <tom@tromey.com>
1235
1236         * main.c (catch_command_errors): Rename from
1237         catch_command_errors_const.
1238         (captured_main_1): Update.
1239
1240 2017-09-20  Pedro Alves  <palves@redhat.com>
1241
1242         * cli/cli-cmds.c (list_command): Use print_sal_location.
1243         (print_sal_location): New function.
1244         (ambiguous_line_spec): Use print_sal_location.
1245         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1246         * symtab.c (find_function_start_sal): Likewise.
1247         * symtab.h (symtab_and_line::symbol): New field.
1248
1249 2017-09-20  Pedro Alves  <palves@redhat.com>
1250
1251         * linespec.c (minsym_found): Handle non-text minsyms.
1252         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1253
1254 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1255
1256         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1257         backslash.
1258
1259 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1260
1261         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1262         vmovups instead vmovaps.
1263         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1264
1265 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1266
1267         * NEWS (Changes since GDB 8.0): Add starti.
1268         * infcmd.c (enum run_break): New.
1269         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1270         case.
1271         (run_command): Use enum run_how.
1272         (start_command): Likewise.
1273         (starti_command): New function.
1274         (RUN_ARGS_HELP): New macro.
1275         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1276         commands.  Add starti command.
1277
1278 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1279
1280         * Makefile.in (monitor.o): Remove the rule.
1281
1282 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1283
1284         * annotate.h (struct annotate_arg_emitter): Use
1285         DISABLE_COPY_AND_ASSIGN.
1286         * common/refcounted-object.h (refcounted_object): Likewise.
1287         * completer.h (struct completion_result): Likewise.
1288         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1289         * filename-seen-cache.h (filename_seen_cache): Likewise.
1290         * gdbcore.h (thread_section_name): Likewise.
1291         * gdb_regex.h (compiled_regex): Likewise.
1292         * gdbthread.h (scoped_restore_current_thread): Likewise.
1293         * inferior.h (scoped_restore_current_inferior): Likewise.
1294         * jit.c (jit_reader): Likewise.
1295         * linespec.h (struct linespec_result): Likewise.
1296         * mi/mi-parse.h (struct mi_parse): Likewise.
1297         * nat/fork-inferior.c (execv_argv): Likewise.
1298         * progspace.h (scoped_restore_current_program_space): Likewise.
1299         * python/python-internal.h (class gdbpy_enter): Likewise.
1300         * regcache.h (regcache): Likewise.
1301         * target-descriptions.c (struct tdesc_reg): Likewise.
1302         (struct tdesc_type): Likewise.
1303         (struct tdesc_feature): Likewise.
1304         * ui-out.h (ui_out_emit_type): Likewise.
1305
1306 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1307
1308         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1309         label abort_expression.
1310
1311 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1312
1313         * common/buffer.c (buffer_xml_printf): Adjust.
1314         * common/xml-utils.c (xml_escape_text): Change return type to
1315         std::string, update code accordingly.
1316         * common/xml-utils.h (xml_escape_text): Change return type to
1317         std::string.
1318         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1319         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1320         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1321         Adjust.
1322
1323 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1324
1325         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1326         (SUBDIR_UNITTESTS_OBS): Add new object file.
1327         * unittests/xml-utils-selftests.c: New file.
1328
1329 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1330
1331         * common/selftest.h (selftest): New struct/interface.
1332         (register_test): Add name parameter, add new overload.
1333         (run_tests): Add filter parameter.
1334         (for_each_selftest_ftype): New typedef.
1335         (for_each_selftest): New declaration.
1336         * common/selftest.c (tests): Change type to
1337         map<string, unique_ptr<selftest>>.
1338         (simple_selftest): New struct.
1339         (register_test): New function.
1340         (register_test): Add name parameter and use it.
1341         (run_tests): Add filter parameter and use it.  Add prints.
1342         Adjust to vector -> map change.
1343         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1344         registering selftests.
1345         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1346         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1347         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1348         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1349         * findvar.c (_initialize_findvar): Likewise.
1350         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1351         * maint.c (maintenance_selftest): Update call to run_tests.
1352         (maintenance_info_selftests): New function.
1353         (_initialize_maint_cmds): Register "maintenance info selftests"
1354         command.  Update "maintenance selftest" doc.
1355         * regcache.c (_initialize_regcache): Add names when registering
1356         selftests.
1357         * rust-exp.y (_initialize_rust_exp): Likewise.
1358         * selftest-arch.c (gdbarch_selftest): New struct.
1359         (gdbarch_tests): Remove.
1360         (register_test_foreach_arch): Add name parameter.  Call
1361         register_test.
1362         (tests_with_arch): Remove, move most content to
1363         gdbarch_selftest::operator().
1364         (_initialize_selftests_foreach_arch): Remove.
1365         * selftest-arch.h (register_test_foreach_arch): Add name
1366         parameter.
1367         (run_tests_with_arch): New declaration.
1368         * utils-selftests.c (_initialize_utils_selftests): Add names
1369         when registering selftests.
1370         * utils.c (_initialize_utils): Likewise.
1371         * unittests/array-view-selftests.c
1372         (_initialize_array_view_selftests): Likewise.
1373         * unittests/environ-selftests.c (_initialize_environ_selftests):
1374         Likewise.
1375         * unittests/function-view-selftests.c
1376         (_initialize_function_view_selftests): Likewise.
1377         * unittests/offset-type-selftests.c
1378         (_initialize_offset_type_selftests): Likewise.
1379         * unittests/optional-selftests.c
1380         (_initialize_optional_selftests): Likewise.
1381         * unittests/scoped_restore-selftests.c
1382         (_initialize_scoped_restore_selftests): Likewise.
1383         * NEWS: Document "maintenance selftest" and "maint info
1384         selftests".
1385
1386 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1387
1388         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1389         scoped_restore.
1390
1391 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1392
1393         * mi/mi-main.c (mi_load_progress): Make uiout variable
1394         a unique_ptr.
1395
1396 2017-09-15  Pedro Alves  <palves@redhat.com>
1397
1398         * compile/compile-c-types.c (convert_enum, convert_int)
1399         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1400
1401 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1402
1403         * dwarf2read.c (copy_string): Remove.
1404         (parse_macro_definition): Replace copy_string with savestring.
1405
1406 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1407
1408         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1409         gdb_target_obs.
1410         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1411         Likewise.
1412         (i[34567]86-*-linux*): Likewise.
1413
1414 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1415
1416         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1417         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1418         <stack>: Change type to std::vector.
1419         <stack_len, stack_allocated>: Remove.
1420         <grow_stack>: Remove.
1421         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1422         (dwarf_expr_context::~dwarf_expr_context): Remove.
1423         (dwarf_expr_context::grow_stack): Remove.
1424         (dwarf_expr_context::push): Adjust.
1425         (dwarf_expr_context::pop): Adjust.
1426         (dwarf_expr_context::fetch): Adjust.
1427         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1428         (dwarf_expr_context::stack_empty_p): Adjust.
1429         (dwarf_expr_context::execute_stack_op): Adjust.
1430
1431 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1432
1433         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1434         return type to bool.
1435         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1436
1437 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1438
1439         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1440         Change type to bool.
1441         (dwarf_stack_value) <in_stack_memory>: Likewise.
1442         (dwarf_expr_context) <push_address>: Change parameter type to
1443         bool.
1444         <fetch_in_stack_memory>: Change return type to bool.
1445         <push>: Change parameter type to bool.
1446         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1447         to bool.
1448         (dwarf_expr_context::push_address): Likewise.
1449         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1450         to bool.
1451         (dwarf_expr_context::execute_stack_op): Adjust.
1452         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1453
1454 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1455
1456         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1457         (struct dwarf_expr_context) <n_pieces>: Remove.
1458         <pieces>: Change type to std::vector.
1459         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1460         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1461         pieces.
1462         (dwarf_expr_context::add_piece): Adjust.
1463         * dwarf2loc.c (struct piece_closure): Initialize fields.
1464         <n_pieces>: Remove.
1465         <pieces>: Change type to std::vector.
1466         (allocate_piece_closure): Adjust, change parameter to
1467         std::vector rvalue and std::move it to piece_closure.
1468         (rw_pieced_value): Adjust.
1469         (check_pieced_synthetic_pointer): Adjust.
1470         (indirect_synthetic_pointer): Adjust.
1471         (coerce_pieced_ref): Adjust.
1472         (free_pieced_value_closure):  Adjust.  Use delete to free
1473         piece_closure.
1474         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1475         to allocate_piece_closure.
1476         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1477
1478 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1479
1480         * probe.h (probe_ops_cp): Remove typedef.
1481         (DEF_VEC_P (probe_ops_cp)): Remove.
1482         (all_probe_ops): Change type to std::vector.
1483         * probe.c (info_probes_for_ops): Adjust to vector change.
1484         (probe_linespec_to_ops): Likewise.
1485         (all_probe_ops): Change type to std::vector.
1486         (_initialize_probe): Adjust to vector change.
1487         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1488         * elfread.c (elf_get_probes): Likewise.
1489         * stap-probe.c (_initialize_stap_probe): Likewise.
1490
1491 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1492
1493         * probe.h (struct bound_probe): Define constructors.
1494         * probe.c (bound_probe_s): Remove typedef.
1495         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1496         (collect_probes): Change return type to std::vector, remove
1497         cleanup.
1498         (compare_probes): Return bool, change parameter type.  Change
1499         semantic to "less than".
1500         (gen_ui_out_table_header_info): Change parameter to std::vector
1501         and update.
1502         (exists_probe_with_pops): Likewise.
1503         (info_probes_for_ops): Update to std::vector change.
1504         (enable_probes_command): Likewise.
1505         (disable_probes_command): Likewise.
1506
1507 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1508
1509         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1510         vec to std::vector.
1511         * probe.c (parse_probes_in_pspace): Update.
1512         (find_probes_in_objfile): Update.
1513         (find_probe_by_pc): Update.
1514         (collect_probes): Update.
1515         (probe_any_get_probes): Update.
1516         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1517         return type to reference to std::vector.
1518         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1519         std::vector and update.
1520         (dtrace_process_dof): Likewise.
1521         (dtrace_get_probes): Likewise.
1522         * elfread.c (elf_get_probes): Change return type to std::vector,
1523         store an std::vector in bfd_data.
1524         (probe_key_free): Update to std::vector.
1525         * stap-probe.c (handle_stap_probe): Change parameter to
1526         std::vector and update.
1527         (stap_get_probes): Likewise.
1528         * symfile-debug.c (debug_sym_get_probes): Change return type to
1529         std::vector and update.
1530
1531 2017-09-11  Tom Tromey  <tom@tromey.com>
1532
1533         * breakpoint.c (program_breakpoint_here_p): Update.
1534         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1535         from make_show_memory_breakpoints_cleanup.  Return a
1536         scoped_restore_tmpl<int>.
1537         (restore_show_memory_breakpoints): Remove.
1538         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1539         * mem-break.c (memory_validate_breakpoint): Update.
1540         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1541         (ia64_memory_remove_breakpoint): Update.
1542         (ia64_breakpoint_from_pc): Update.
1543         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1544         from make_show_memory_breakpoints_cleanup.
1545
1546 2017-09-11  Tom Tromey  <tom@tromey.com>
1547
1548         * d-namespace.c (d_lookup_symbol): Use std::string.
1549         (find_symbol_in_baseclass): Likewise.
1550
1551 2017-09-11  Tom Tromey  <tom@tromey.com>
1552
1553         * ctf.c (ctf_start): Use std::string.
1554
1555 2017-09-11  Tom Tromey  <tom@tromey.com>
1556
1557         * ada-lang.c (is_known_support_routine): Update.
1558         (ada_unhandled_exception_name_addr_from_raise): Update.
1559         * guile/scm-frame.c (gdbscm_frame_name): Update.
1560         * python/py-frame.c (frapy_name): Update.
1561         (frapy_function): Update.
1562         * stack.h (find_frame_funname): Update.
1563         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1564         (print_frame): Update.
1565
1566 2017-09-11  Tom Tromey  <tom@tromey.com>
1567
1568         * findcmd.c (put_bits): Take a gdb::byte_vector.
1569         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1570         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1571         cleanups.
1572         (find_command): Update.
1573
1574 2017-09-11  Tom Tromey  <tom@tromey.com>
1575
1576         * cli/cli-script.c (class scoped_restore_hook_in): New.
1577         (clear_hook_in_cleanup): Remove.
1578         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1579         scoped_restore_hook_in.
1580
1581 2017-09-11  Tom Tromey  <tom@tromey.com>
1582
1583         * cli/cli-script.c (restore_interp): Remove.
1584         (read_command_lines): Use scoped_restore_interp.
1585         * interps.c (scoped_restore_interp::set_temp): Rename from
1586         interp_set_temp.
1587         * interps.h (class scoped_restore_interp): New.
1588         (interp_set_temp): Remove.
1589
1590 2017-09-11  Tom Tromey  <tom@tromey.com>
1591
1592         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1593         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1594         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1595         scoped_restore.
1596         (mi_cmd_break_insert_1): Update.
1597         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1598         scoped_restore.
1599
1600 2017-09-11  Tom Tromey  <tom@tromey.com>
1601
1602         * demangle.c (demangle_command): Update.
1603         * breakpoint.c (disable_command): Update.
1604         (enable_command): Update.
1605         (find_location_by_number): Make "number" const.  Use
1606         get_number_trailer.
1607         * cli/cli-utils.c (extract_arg): Return std::string.
1608         * probe.c (parse_probe_linespec): Update.  Change types.
1609         (collect_probes): Take string arguments.
1610         (parse_probe_linespec): Likewise.
1611         (info_probes_for_ops): Update.
1612         (enable_probes_command): Update.
1613         (disable_probes_command): Update.
1614         * break-catch-sig.c (catch_signal_split_args): Update.
1615         * mi/mi-parse.c (mi_parse): Update.
1616
1617 2017-09-11  Tom Tromey  <tom@tromey.com>
1618
1619         * language.h (language_enum): Make argument const.
1620         * language.c (language_enum): Make argument const.
1621
1622 2017-09-11  Tom Tromey  <tom@tromey.com>
1623
1624         * common/common-utils.h (skip_to_space): Remove macro, redeclare
1625         as function.
1626         (skip_to_space): Rename from skip_to_space_const.
1627         * common/common-utils.c (skip_to_space): New function.
1628         (skip_to_space): Rename from skip_to_space_const.
1629         * cli/cli-utils.h (get_number): Rename from get_number_const.
1630         (extract_arg): Rename from extract_arg_const.
1631         * cli/cli-utils.c (get_number): Rename from get_number_const.
1632         (extract_arg): Rename from extract_arg_const.
1633         (number_or_range_parser::get_number): Use ::get_number.
1634         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1635         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1636         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1637         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1638         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1639         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1640         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1641         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1642
1643 2017-09-11  Tom Tromey  <tom@tromey.com>
1644
1645         * python/python.c (do_start_initialization): Use
1646         py-event-types.def to initialize types.
1647         Define all object type structures.
1648         * python/python-internal.h: Don't declare event initialization
1649         functions.
1650         * python/py-threadevent.c (thread_event_object_type): Don't
1651         define.
1652         * python/py-stopevent.c (stop_event_object_type): Don't define.
1653         * python/py-signalevent.c (signal_event_object_type): Don't
1654         declare or define.
1655         * python/py-newobjfileevent.c (new_objfile_event_object_type)
1656         (clear_objfiles_event_object_type): Don't declare or define.
1657         * python/py-infevents.c (inferior_call_pre_event_object_type)
1658         (inferior_call_post_event_object_type)
1659         (register_changed_event_object_type)
1660         (memory_changed_event_object_type): Don't declare or define.
1661         * python/py-inferior.c (new_thread_event_object_type)
1662         (new_inferior_event_object_type)
1663         (inferior_deleted_event_object_type): Don't declare or define.
1664         * python/py-exitedevent.c (exited_event_object_type): Don't
1665         declare or define.
1666         * python/py-evts.c (gdbpy_initialize_py_events): Use
1667         py-all-events.def.
1668         * python/py-events.h (thread_event_object_type): Don't declare.
1669         (events_object): Use py-all-events.def.
1670         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
1671         py-event-types.def.
1672         * python/py-event-types.def: New file.
1673         * python/py-continueevent.c (create_continue_event_object): Don't
1674         declare or define.
1675         * python/py-bpevent.c (breakpoint_event_object_type): Don't
1676         declare or define.
1677         * python/py-all-events.def: New file.
1678
1679 2017-09-11  Tom Tromey  <tom@tromey.com>
1680
1681         * python/py-threadevent.c (create_thread_event_object): Return
1682         gdbpy_ref.
1683         * python/py-stopevent.h (create_stop_event_object)
1684         (create_breakpoint_event_object, create_signal_event_object):
1685         Update.
1686         * python/py-stopevent.c (create_stop_event_object): Return
1687         gdbpy_ref.
1688         (emit_stop_event): Update.
1689         * python/py-signalevent.c (create_signal_event_object): Return
1690         gdbpy_ref.
1691         * python/py-infevents.c (create_inferior_call_event_object):
1692         Update.
1693         * python/py-event.h (create_event_object)
1694         (create_thread_event_object): Update.
1695         * python/py-event.c (create_event_object): Return gdbpy_ref.
1696         * python/py-continueevent.c: Return gdbpy_ref.
1697         * python/py-bpevent.c (create_breakpoint_event_object): Return
1698         gdbpy_ref.
1699
1700 2017-09-11  Tom Tromey  <tom@tromey.com>
1701
1702         PR python/15622:
1703         * NEWS: Add entry.
1704         * python/python.c (do_start_initialization): Initialize new event
1705         types.
1706         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1707         (gdbpy_initialize_inferior_deleted_event)
1708         (gdbpy_initialize_new_thread_event): Declare.
1709         * python/py-threadevent.c (create_thread_event_object): Add option
1710         "thread" parameter.
1711         * python/py-inferior.c (new_thread_event_object_type)
1712         (new_inferior_event_object_type)
1713         (inferior_deleted_event_object_type): Declare.
1714         (python_new_inferior, python_inferior_deleted): New functions.
1715         (add_thread_object): Emit new_thread event.
1716         (gdbpy_initialize_inferior): Attach new functions to corresponding
1717         observers.
1718         (new_thread, new_inferior, inferior_deleted): Define new event
1719         types.
1720         * python/py-evts.c (gdbpy_initialize_py_events): Add new
1721         registries.
1722         * python/py-events.h (events_object) <new_inferior,
1723         inferior_deleted, new_thread>: New fields.
1724         * python/py-event.h (create_thread_event_breakpoint): Add optional
1725         "thread" parameter.
1726
1727 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1728
1729         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1730         check current_ui instead.
1731         (internal_vproblem): Likewise.
1732
1733 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1734
1735         * thread.c (print_thread_info_1): Remove unnecessary calls to
1736         uiout->is_mi_like_p.
1737
1738 2017-09-09  Tom Tromey  <tom@tromey.com>
1739
1740         * namespace.h (add_using_directive): Update.
1741         * namespace.c (add_using_directive): Change type of excludes to
1742         std::vector.
1743         * dwarf2read.c (read_import_statement): Use std::vector.
1744         (read_namespace): Update.
1745         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1746
1747 2017-09-09  Tom Tromey  <tom@tromey.com>
1748
1749         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1750
1751 2017-09-09  Tom Tromey  <tom@tromey.com>
1752
1753         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1754
1755 2017-09-09  Tom Tromey  <tom@tromey.com>
1756
1757         * stack.c (func_command): Use gdb::def_vector.
1758
1759 2017-09-09  Tom Tromey  <tom@tromey.com>
1760
1761         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1762         ui_out_emit_list, ui_out_emit_tuple.
1763         (mi_cmd_var_update): Likewise.
1764
1765 2017-09-09  Tom Tromey  <tom@tromey.com>
1766
1767         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1768         ui_out_redirect_pop.
1769         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1770         ui_out_redirect_pop.
1771         * utils.c (do_ui_out_redirect_pop)
1772         (make_cleanup_ui_out_redirect_pop): Remove.
1773         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1774         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1775         * ui-out.h (ui_out_redirect_pop): New class.
1776
1777 2017-09-09  Tom Tromey  <tom@tromey.com>
1778
1779         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1780         (list_available_thread_groups, mi_cmd_list_thread_groups)
1781         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1782         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1783         Likewise.
1784
1785 2017-09-09  Tom Tromey  <tom@tromey.com>
1786
1787         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1788         ui_out_emit_tuple.
1789
1790 2017-09-09  Tom Tromey  <tom@tromey.com>
1791
1792         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1793         * stack.c (print_frame): Use ui_out_emit_tuple.
1794         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1795         (info_spu_mailbox_command, info_spu_dma_command)
1796         (info_spu_proxydma_command): Likewise.
1797         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1798         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1799         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1800         ui_out_emit_tuple.
1801         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1802
1803 2017-09-09  Tom Tromey  <tom@tromey.com>
1804
1805         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1806         (class ui_out_emit_table): Update comment.
1807         * ui-out.c (do_cleanup_table_end)
1808         (make_cleanup_ui_out_table_begin_end): Remove.
1809         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1810         (info_spu_dma_cmdlist): Likewise.
1811         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1812         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1813         ui_out_emit_table.
1814
1815 2017-09-09  Tom Tromey  <tom@tromey.com>
1816
1817         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1818         ui_out_emit_list, gdb::optional.
1819
1820 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1821
1822         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1823         prototype.
1824         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1825         prototype.
1826         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1827         prototype.
1828         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1829         * ada-exp.y: Remove _initialize_ada_exp prototype.
1830         * ada-lang.c: Remove _initialize_ada_language prototype.
1831         * ada-tasks.c: Remove _initialize_tasks prototype.
1832         * addrmap.c: Remove _initialize_addrmap prototype.
1833         * agent.c: Remove _initialize_agent prototype.
1834         * aix-thread.c: Remove _initialize_aix_thread prototype.
1835         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1836         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1837         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1838         prototype.
1839         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1840         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1841         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1842         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1843         prototype.
1844         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1845         prototype.
1846         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1847         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1848         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1849         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1850         prototype.
1851         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1852         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1853         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1854         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1855         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1856         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1857         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1858         prototype.
1859         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1860         prototype.
1861         * annotate.c: Remove _initialize_annotate prototype.
1862         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1863         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1864         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1865         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1866         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1867         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1868         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1869         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1870         prototype.
1871         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1872         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1873         * auto-load.c: Remove _initialize_auto_load prototype.
1874         * auxv.c: Remove _initialize_auxv prototype.
1875         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1876         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1877         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1878         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1879         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1880         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1881         prototype.
1882         * break-catch-throw.c: Remove _initialize_break_catch_throw
1883         prototype.
1884         * breakpoint.c: Remove _initialize_breakpoint prototype.
1885         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1886         * btrace.c: Remove _initialize_btrace prototype.
1887         * charset.c: Remove _initialize_charset prototype.
1888         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1889         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1890         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1891         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1892         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1893         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1894         * coffread.c: Remove _initialize_coffread prototype.
1895         * compile/compile.c: Remove _initialize_compile prototype.
1896         * complaints.c: Remove _initialize_complaints prototype.
1897         * completer.c: Remove _initialize_completer prototype.
1898         * copying.awk: Remove _initialize_copying prototype.
1899         * copying.c: Regenerate.
1900         * core-regset.c: Remove _initialize_core_regset prototype.
1901         * corefile.c: Remove _initialize_core prototype.
1902         * corelow.c: Remove _initialize_corelow prototype.
1903         * cp-abi.c: Remove _initialize_cp_abi prototype.
1904         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1905         * cp-support.c: Remove _initialize_cp_support prototype.
1906         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1907         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1908         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1909         * ctf.c: Remove _initialize_ctf prototype.
1910         * d-lang.c: Remove _initialize_d_language prototype.
1911         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1912         prototype.
1913         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1914         * dbxread.c: Remove _initialize_dbxread prototype.
1915         * dcache.c: Remove _initialize_dcache prototype.
1916         * demangle.c: Remove _initialize_demangler prototype.
1917         * disasm-selftests.c: Remove _initialize_disasm_selftests
1918         prototype.
1919         * disasm.c: Remove _initialize_disasm prototype.
1920         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1921         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1922         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1923         prototype.
1924         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1925         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1926         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1927         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1928         * elfread.c: Remove _initialize_elfread prototype.
1929         * exec.c: Remove _initialize_exec prototype.
1930         * extension.c: Remove _initialize_extension prototype.
1931         * f-lang.c: Remove _initialize_f_language prototype.
1932         * f-valprint.c: Remove _initialize_f_valprint prototype.
1933         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1934         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1935         * filesystem.c: Remove _initialize_filesystem prototype.
1936         * findcmd.c: Remove _initialize_mem_search prototype.
1937         * fork-child.c: Remove _initialize_fork_child prototype.
1938         * frame-base.c: Remove _initialize_frame_base prototype.
1939         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1940         * frame.c: Remove _initialize_frame prototype.
1941         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1942         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1943         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1944         * gcore.c: Remove _initialize_gcore prototype.
1945         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1946         * gdbarch.c: Regenerate.
1947         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1948         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1949         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1950         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1951         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1952         * go-lang.c: Remove _initialize_go_language prototype.
1953         * go32-nat.c: Remove _initialize_go32_nat prototype.
1954         * guile/guile.c: Remove _initialize_guile prototype.
1955         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1956         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1957         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1958         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1959         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1960         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1961         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1962         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1963         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1964         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1965         prototype.
1966         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1967         prototype.
1968         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1969         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1970         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1971         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1972         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1973         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1974         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1975         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1976         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1977         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1978         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1979         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1980         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1981         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1982         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1983         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1984         prototype.
1985         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1986         prototype.
1987         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1988         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1989         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1990         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1991         * infcall.c: Remove _initialize_infcall prototype.
1992         * infcmd.c: Remove _initialize_infcmd prototype.
1993         * inferior.c: Remove _initialize_inferiors prototype.
1994         * inflow.c: Remove _initialize_inflow prototype.
1995         * infrun.c: Remove _initialize_infrun prototype.
1996         * interps.c: Remove _initialize_interpreter prototype.
1997         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1998         * jit.c: Remove _initialize_jit prototype.
1999         * language.c: Remove _initialize_language prototype.
2000         * linux-fork.c: Remove _initialize_linux_fork prototype.
2001         * linux-nat.c: Remove _initialize_linux_nat prototype.
2002         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2003         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2004         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2005         * m2-lang.c: Remove _initialize_m2_language prototype.
2006         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2007         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2008         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2009         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2010         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2011         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2012         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2013         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2014         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2015         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2016         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2017         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2018         * machoread.c: Remove _initialize_machoread prototype.
2019         * macrocmd.c: Remove _initialize_macrocmd prototype.
2020         * macroscope.c: Remove _initialize_macroscope prototype.
2021         * maint.c: Remove _initialize_maint_cmds prototype.
2022         * mdebugread.c: Remove _initialize_mdebugread prototype.
2023         * memattr.c: Remove _initialize_mem prototype.
2024         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2025         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2026         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2027         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2028         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2029         * microblaze-linux-tdep.c: Remove
2030         _initialize_microblaze_linux_tdep prototype.
2031         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2032         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2033         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2034         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2035         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2036         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2037         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2038         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2039         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2040         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2041         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2042         prototype.
2043         * mipsread.c: Remove _initialize_mipsread prototype.
2044         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2045         prototype.
2046         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2047         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2048         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2049         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2050         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2051         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2052         prototype.
2053         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2054         * nto-procfs.c: Remove _initialize_procfs prototype.
2055         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2056         * objc-lang.c: Remove _initialize_objc_language prototype.
2057         * objfiles.c: Remove _initialize_objfiles prototype.
2058         * observer.c: Remove observer_test_first_notification_function,
2059         observer_test_second_notification_function,
2060         observer_test_third_notification_function, and
2061         _initialize_observer prototypes.
2062         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2063         * osabi.c: Remove _initialize_gdb_osabi prototype.
2064         * osdata.c: Remove _initialize_osdata prototype.
2065         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2066         * parse.c: Remove _initialize_parse prototype.
2067         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2068         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2069         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2070         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2071         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2072         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2073         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2074         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2075         * printcmd.c: Remove _initialize_printcmd prototype.
2076         * probe.c: Remove _initialize_probe prototype.
2077         * proc-api.c: Remove _initialize_proc_api prototype.
2078         * proc-events.c: Remove _initialize_proc_events prototype.
2079         * proc-service.c: Remove _initialize_proc_service prototype.
2080         * procfs.c: Remove _initialize_procfs prototype.
2081         * psymtab.c: Remove _initialize_psymtab prototype.
2082         * python/python.c: Remove _initialize_python prototype.
2083         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2084         * record-btrace.c: Remove _initialize_record_btrace prototype.
2085         * record-full.c: Remove _initialize_record_full prototype.
2086         * record.c: Remove _initialize_record prototype.
2087         * regcache.c: Remove _initialize_regcache prototype.
2088         * reggroups.c: Remove _initialize_reggroup prototype.
2089         * remote-notif.c: Remove _initialize_notif prototype.
2090         * remote-sim.c: Remove _initialize_remote_sim prototype.
2091         * remote.c: Remove _initialize_remote prototype.
2092         * reverse.c: Remove _initialize_reverse prototype.
2093         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2094         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2095         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2096         prototype.
2097         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2098         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2099         * rust-exp.y: Remove _initialize_rust_exp prototype.
2100         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2101         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2102         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2103         * score-tdep.c: Remove _initialize_score_tdep prototype.
2104         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2105         prototype.
2106         * ser-go32.c: Remove _initialize_ser_dos prototype.
2107         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2108         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2109         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2110         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2111         * serial.c: Remove _initialize_serial prototype.
2112         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2113         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2114         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2115         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2116         * skip.c: Remove _initialize_step_skip prototype.
2117         * sol-thread.c: Remove _initialize_sol_thread prototype.
2118         * solib-aix.c: Remove _initialize_solib_aix prototype.
2119         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2120         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2121         * solib-frv.c: Remove _initialize_frv_solib prototype.
2122         * solib-spu.c: Remove _initialize_spu_solib prototype.
2123         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2124         * solib-target.c: Remove _initialize_solib_target prototype.
2125         * solib.c: Remove _initialize_solib prototype.
2126         * source.c: Remove _initialize_source prototype.
2127         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2128         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2129         prototype.
2130         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2131         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2132         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2133         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2134         prototype.
2135         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2136         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2137         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2138         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2139         prototype.
2140         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2141         prototype.
2142         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2143         prototype.
2144         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2145         prototype.
2146         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2147         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2148         prototype.
2149         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2150         prototype.
2151         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2152         prototype.
2153         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2154         prototype.
2155         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2156         prototype.
2157         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2158         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2159         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2160         * stabsread.c: Remove _initialize_stabsread prototype.
2161         * stack.c: Remove _initialize_stack prototype.
2162         * stap-probe.c: Remove _initialize_stap_probe prototype.
2163         * std-regs.c: Remove _initialize_frame_reg prototype.
2164         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2165         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2166         * symfile.c: Remove _initialize_symfile prototype.
2167         * symmisc.c: Remove _initialize_symmisc prototype.
2168         * symtab.c: Remove _initialize_symtab prototype.
2169         * target-dcache.c: Remove _initialize_target_dcache prototype.
2170         * target-descriptions.c: Remove _initialize_target_descriptions
2171         prototype.
2172         * thread.c: Remove _initialize_thread prototype.
2173         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2174         prototype.
2175         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2176         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2177         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2178         prototype.
2179         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2180         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2181         * tracefile.c: Remove _initialize_tracefile prototype.
2182         * tracepoint.c: Remove _initialize_tracepoint prototype.
2183         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2184         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2185         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2186         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2187         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2188         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2189         * tui/tui.c: Remove _initialize_tui prototype.
2190         * typeprint.c: Remove _initialize_typeprint prototype.
2191         * user-regs.c: Remove _initialize_user_regs prototype.
2192         * utils.c: Remove _initialize_utils prototype.
2193         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2194         * valarith.c: Remove _initialize_valarith prototype.
2195         * valops.c: Remove _initialize_valops prototype.
2196         * valprint.c: Remove _initialize_valprint prototype.
2197         * value.c: Remove _initialize_values prototype.
2198         * varobj.c: Remove _initialize_varobj prototype.
2199         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2200         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2201         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2202         * windows-nat.c: Remove _initialize_windows_nat,
2203         _initialize_check_for_gdb_ini, and _initialize_loadable
2204         prototypes.
2205         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2206         * xcoffread.c: Remove _initialize_xcoffread prototype.
2207         * xml-support.c: Remove _initialize_xml_support prototype.
2208         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2209         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2210         prototype.
2211         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2212         prototype.
2213         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2214
2215 2017-09-08  Keith Seitz  <keiths@redhat.com>
2216
2217         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2218         field.
2219
2220 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2221
2222         * f-valprint.c (f_val_print): Remove check for one byte
2223         sized integers. Remove printing of character type.
2224
2225 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2226             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2227             Bernhard Heckel  <bernhard.heckel@intel.com>
2228
2229         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2230         to maintain proper indentation when printing pointers/refs.
2231
2232 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2233
2234         GDB 8.0.1 released.
2235
2236 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2237
2238         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2239
2240 2017-09-05  Tom Tromey  <tom@tromey.com>
2241
2242         * parse.c (funcall_chain): Now a std::vector.
2243         (start_arglist, end_arglist): Simplify.
2244         (free_funcalls): Remove.
2245         (parse_exp_in_context_1): Remove cleanup.
2246
2247 2017-09-05  Tom Tromey  <tom@tromey.com>
2248
2249         * go-exp.y (go_parse): Don't create a cleanup.
2250
2251 2017-09-05  Tom Tromey  <tom@tromey.com>
2252
2253         * d-exp.y (PrimaryExpression): Use std::string.
2254         (d_parse): Don't create a cleanup.
2255
2256 2017-09-05  Tom Tromey  <tom@tromey.com>
2257
2258         * utils.c (do_clear_parser_state): Remove.
2259         (make_cleanup_clear_parser_state): Remove.
2260         * p-exp.y (pascal_parse): Use scoped_restore.
2261         * m2-exp.y (m2_parse): Use scoped_restore.
2262         * f-exp.y (f_parse): Use scoped_restore.
2263         * d-exp.y (d_parse): Use scoped_restore.
2264         * c-exp.y (c_parse): Use scoped_restore.
2265         * ada-exp.y (ada_parse): Use scoped_restore.
2266         * utils.h (make_cleanup_clear_parser_state): Remove.
2267
2268 2017-09-06  Keith Seitz  <keiths@redhat.com>
2269
2270         * dwarf2read.c (dw2_linkage_name_attr): New function.
2271         (dw2_linkage_name): New function.
2272         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2273         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2274         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2275
2276 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2277
2278         * config/djgpp/djconfig.sh: Correct shell portability issue.
2279
2280 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2281
2282         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2283
2284 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2285
2286         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2287         * NEWS: Mention new FreeBSD/mips native configuration.
2288         * configure.host: Add aarch64*-*-freebsd*.
2289         * configure.nat: Likewise.
2290         * aarch64-fbsd-nat.c: New file.
2291
2292 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2293
2294         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2295         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2296         * NEWS: Mention new FreeBSD/aarch64 target.
2297         * configure.tgt: Add aarch64*-*-freebsd*.
2298         * aarch64-fbsd-tdep.c: New file.
2299         * aarch64-fbsd-tdep.h: New file.
2300
2301 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2302
2303         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2304
2305 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2306
2307         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2308         of TLS symbols.
2309
2310 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2311
2312         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2313         call.
2314
2315 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2316
2317         * infrun.c (follow_exec): Call add_thread after
2318         target_find_description.
2319
2320 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2321
2322         * infrun.c (handle_inferior_event_1): When exec'ing, read
2323         stop_pc after follow_exec.
2324
2325 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2326
2327         * remote.c (process_g_packet): Update error message.
2328
2329 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2330
2331         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2332         targets.
2333
2334 2017-09-05  Pedro Alves  <palves@redhat.com>
2335
2336         * eval.c (eval_call, evaluate_funcall): New functions, factored
2337         out from ...
2338         (evaluate_subexp_standard): ... this.
2339
2340 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2341
2342         * amd64-tdep.c (amd64_target_description): Create target
2343         descriptions.
2344         (_initialize_amd64_tdep): Don't call functions
2345         initialize_tdesc_amd64_*.  Add self tests.
2346         * arch/amd64.c (amd64_create_target_description): Add parameter
2347         is_linux.  Call set_tdesc_osabi if is_linux is true.
2348         * arch/amd64.h (amd64_create_target_description): Update the
2349         declaration.
2350         * arch/i386.c (i386_create_target_description): Add parameter
2351         is_linux.  Call set_tdesc_osabi if is_linux is true.
2352         * arch/i386.h (i386_create_target_description): Update
2353         declaration.
2354         * configure.tgt: Add i386.o to gdb_target_obs.
2355         * features/Makefile (XMLTOC): Remove i386/*.xml.
2356         * features/i386/amd64-avx-avx512.c: Remove.
2357         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2358         * features/i386/amd64-avx-mpx.c: Remove.
2359         * features/i386/amd64-avx.c: Remove.
2360         * features/i386/amd64-mpx.c: Remove.
2361         * features/i386/amd64.c: Remove.
2362         * features/i386/i386-avx-avx512.c: Remove.
2363         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2364         * features/i386/i386-avx-mpx.c: Remove.
2365         * features/i386/i386-avx.c: Remove.
2366         * features/i386/i386-mmx.c: Remove.
2367         * features/i386/i386-mpx.c: Remove.
2368         * features/i386/i386.c: Remove.
2369         * i386-tdep.c: Don't include features/i386/i386*.c., include
2370         target-descriptions.h and arch/i386.h.
2371         (i386_target_description): Create target descriptions.
2372         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2373         functions.  Do self tests.
2374
2375 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2376
2377         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2378         * features/i386/amd64-avx-avx512-linux.c: Removed.
2379         * features/i386/amd64-avx-linux.c: Removed.
2380         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2381         * features/i386/amd64-avx-mpx-linux.c: Removed.
2382         * features/i386/amd64-linux.c: Removed.
2383         * features/i386/amd64-mpx-linux.c: Removed.
2384         * features/i386/x32-avx-avx512-linux.c: Removed.
2385         * features/i386/x32-avx-linux.c: Removed.
2386         * features/i386/x32-linux.c: Removed.
2387
2388 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2389
2390         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2391         features/i386/*.c.
2392         (amd64_linux_read_description): Call
2393         amd64_create_target_description.
2394         * arch/amd64.c: New file.
2395         * arch/amd64.h: New file.
2396         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2397         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2398
2399 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2400
2401         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2402         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2403         (amd64_linux_read_description): Create target descriptions.
2404         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2405         functions.  Add unit tests.
2406         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2407         x32-core.xml.
2408         * features/i386/64bit-avx.c: Generated.
2409         * features/i386/64bit-avx512.c: Generated.
2410         * features/i386/64bit-core.c: Generated.
2411         * features/i386/64bit-linux.c: Generated.
2412         * features/i386/64bit-mpx.c: Generated.
2413         * features/i386/64bit-pkeys.c: Generated.
2414         * features/i386/64bit-segments.c: Generated.
2415         * features/i386/64bit-sse.c: Generated.
2416         * features/i386/x32-core.c: Generated.
2417         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2418         c files for amd64-linux and x32-linux.
2419
2420 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2421
2422         * amd64-linux-tdep.c (amd64_linux_read_description): New
2423         function.
2424         (amd64_linux_core_read_description): Call
2425         amd64_linux_read_description.
2426         (amd64_linux_init_abi): Likewise.
2427         (amd64_x32_linux_init_abi): Likewise.
2428         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2429         * x86-linux-nat.c (x86_linux_read_description): Call
2430         amd64_linux_read_description.
2431
2432 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2433
2434         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2435         comments.
2436
2437 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2438
2439         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2440         * features/i386/i386-avx-avx512-linux.c: Remove.
2441         * features/i386/i386-avx-linux.c: Remove.
2442         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2443         * features/i386/i386-avx-mpx-linux.c: Remove.
2444         * features/i386/i386-linux.c: Remove.
2445         * features/i386/i386-mmx-linux.c: Remove.
2446         * features/i386/i386-mpx-linux.c: Remove.
2447
2448 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2449
2450         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2451         (SFILES): Add arch/i386.c.
2452         (HFILES_NO_SRCDIR): Add arch/i386.h.
2453         * arch/i386.c: New file.
2454         * arch/i386.h: New file.
2455         * arch/tdesc.h (allocate_target_description): Declare.
2456         (set_tdesc_architecture): Declare.
2457         (set_tdesc_osabi): Declare.
2458         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2459         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2460         include arch/i386.h.
2461         (i386_linux_read_description): Remove code and call
2462         i386_create_target_description.
2463         (set_tdesc_architecture): New function.
2464         (set_tdesc_osabi): New function.
2465         * target-descriptions.h (allocate_target_description): Remove.
2466
2467 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2468
2469         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2470         * target-descriptions.c (tdesc_create_feature): Likewise, and
2471         adjust code.
2472         * features/i386/32bit-avx.c: Re-generated.
2473         * features/i386/32bit-avx512.c: Re-generated.
2474         * features/i386/32bit-core.c: Re-generated.
2475         * features/i386/32bit-linux.c: Re-generated.
2476         * features/i386/32bit-mpx.c: Re-generated.
2477         * features/i386/32bit-pkeys.c: Re-generated.
2478         * features/i386/32bit-sse.c: Re-generated.
2479
2480 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2481
2482         * regformats/regdef.h (struct reg): Override operator == and !=.
2483
2484 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2485
2486         * arch/tdesc.h: New file.
2487         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2488         * target-descriptions.c: Update comments.
2489         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2490         declarations.
2491         * features/i386/32bit-avx.c: Re-generated.
2492         * features/i386/32bit-avx512.c: Re-generated.
2493         * features/i386/32bit-core.c: Re-generated.
2494         * features/i386/32bit-linux.c: Re-generated.
2495         * features/i386/32bit-mpx.c: Re-generated.
2496         * features/i386/32bit-pkeys.c: Re-generated.
2497         * features/i386/32bit-sse.c: Re-generated.
2498
2499 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2500
2501         * regformats/regdat.sh: Update generated code.
2502
2503 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2504
2505         * regformats/regdat.sh: Adjust code order.
2506
2507 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2508
2509         * expprint.c (dump_subexp_body_standard): Use constant format
2510         string in fprintf_filtered call.
2511
2512 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2513
2514         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2515         NetBSD/i386.
2516         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2517
2518 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2519
2520         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2521
2522 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2523
2524         * bsd-kvm.o: Define _KMEMUSER.
2525         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2526         * configure: Regenerate.
2527
2528 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2529
2530         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2531         * i386-fbsd-nat.c: Likewise.
2532
2533 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2534
2535         * unittests/array-view-selftests.c: Add include of <array>.
2536
2537 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2538
2539         * spu-tdep.c (flush_ea_cache): Add missing argument to
2540         call_function_by_hand.
2541
2542 2017-09-04  Pedro Alves  <palves@redhat.com>
2543
2544         * NEWS (Safer support for debugging with no debug info): New.
2545
2546 2017-09-04  Pedro Alves  <palves@redhat.com>
2547
2548         * c-exp.y (function_method, function_method_void): Add current
2549         instance flags to TYPE_INSTANCE.
2550         * dwarf2read.c (check_modifier): New.
2551         (compute_delayed_physnames): Assert that only C++ adds delayed
2552         physnames.  Mark fn_fields as const/volatile depending on
2553         physname.
2554         * eval.c (make_params): New type_instance_flags parameter.  Use
2555         it as the new type's instance flags.
2556         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2557         flags element and pass it to make_params.
2558         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2559         instance flags element.
2560         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2561         * gdbtypes.h: Include "enum-flags.h".
2562         (type_instance_flags): New enum-flags type.
2563         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2564         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2565         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2566         (follow_type_instance_flags): New function.
2567         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2568         * parser-defs.h (follow_type_instance_flags): Declare.
2569         * valops.c (value_struct_elt_for_reference): const/volatile must
2570         match too.
2571
2572 2017-09-04  Pedro Alves  <palves@redhat.com>
2573
2574         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2575         function/method scopes; lookup the nested name as a function local
2576         static variable.
2577
2578 2017-09-04  Pedro Alves  <palves@redhat.com>
2579
2580         (%type <voidval>): Add function_method.
2581         * c-exp.y (exp): New production for calls with no arguments.
2582         (function_method, function_method_void_or_typelist): New
2583         productions.
2584         (exp): New production for "method()::static_var".
2585         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2586         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2587         Handle OP_FUNC_STATIC_VAR.
2588         * parse.c (operator_length_standard):
2589         Handle OP_FUNC_STATIC_VAR.
2590
2591 2017-09-04  Pedro Alves  <palves@redhat.com>
2592
2593         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2594         handling.
2595         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2596         Ditto.
2597         * parse.c (operator_length_standard, operator_check_standard):
2598         Ditto.
2599         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2600
2601 2017-09-04  Pedro Alves  <palves@redhat.com>
2602
2603         * ax-gdb.c: Include "typeprint.h".
2604         (gen_expr_for_cast): New function.
2605         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2606         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2607         type is unknown.
2608         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2609         nodebug_data_symbol.
2610         * eval.c: Include "typeprint.h".
2611         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2612         Error out if symbol has unknown type.
2613         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2614         evaluate_subexp_for_cast.
2615         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2616         OP_VAR_MSYM_VALUE.
2617         (evaluate_subexp_for_cast): New function.
2618         * gdbtypes.c (init_nodebug_var_type): New function.
2619         (objfile_type): Use it to initialize types of variables with no
2620         debug info.
2621         * typeprint.c (error_unknown_type): New.
2622         * typeprint.h (error_unknown_type): New declaration.
2623         * compile/compile-c-types.c (convert_type_basic): Handle
2624         TYPE_CODE_ERROR; warn and fallback to int for variables with
2625         unknown type.
2626
2627 2017-09-04  Pedro Alves  <palves@redhat.com>
2628
2629         * eval.c (evaluate_var_value): New function, factored out from ...
2630         (evaluate_subexp_standard): ... here.
2631
2632 2017-09-04  Pedro Alves  <palves@redhat.com>
2633
2634         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2635         Remove useless assignments to 'op'.
2636
2637 2017-09-04  Pedro Alves  <palves@redhat.com>
2638
2639         * eval.c (eval_skip_value): New function.
2640         (evaluate_subexp_standard): Use it.
2641
2642 2017-09-04  Pedro Alves  <palves@redhat.com>
2643
2644         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2645         function name from symbol/minsym and pass it to
2646         error_call_unknown_return_type.
2647
2648 2017-09-04  Pedro Alves  <palves@redhat.com>
2649
2650         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2651         * ax-gdb.c (gen_msym_var_ref): New function.
2652         (gen_expr): Handle OP_VAR_MSYM_VALUE.
2653         * eval.c (evaluate_var_msym_value): New function.
2654         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2655         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2656         to call_function_by_hand.
2657         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2658         Handle OP_VAR_MSYM_VALUE.
2659         (union exp_element) <msymbol>: New field.
2660         * minsyms.h (struct type): Forward declare.
2661         (find_minsym_type_and_address): Declare.
2662         * parse.c (write_exp_elt_msym): New function.
2663         (write_exp_msymbol): Delete, refactored as ...
2664         (find_minsym_type_and_address): ... this new function.
2665         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2666         (operator_length_standard, operator_check_standard): Handle
2667         OP_VAR_MSYM_VALUE.
2668         * std-operator.def (OP_VAR_MSYM_VALUE): New.
2669
2670 2017-09-04  Pedro Alves  <palves@redhat.com>
2671
2672         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2673         TYPE_GNU_IFUNC specially here.  Throw error if return type is
2674         unknown.
2675         * ada-typeprint.c (print_func_type): Handle functions with unknown
2676         return type.
2677         * c-typeprint.c (c_type_print_base): Handle functions and methods
2678         with unknown return type.
2679         * compile/compile-c-symbols.c (convert_symbol_bmsym)
2680         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2681         * compile/compile-c-types.c: Include "objfiles.h".
2682         (convert_func): For functions with unknown return type, warn and
2683         default to int.
2684         * compile/compile-object-run.c (compile_object_run): Adjust call
2685         to call_function_by_hand_dummy.
2686         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2687         call_function_by_hand.
2688         * eval.c (evaluate_subexp_standard): Adjust calls to
2689         call_function_by_hand.  Handle functions and methods with unknown
2690         return type.  Pass expect_type to call_function_by_hand.
2691         * f-typeprint.c (f_type_print_base): Handle functions with unknown
2692         return type.
2693         * gcore.c (call_target_sbrk): Adjust call to
2694         call_function_by_hand.
2695         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2696         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
2697         an integer address type instead of nodebug.
2698         * guile/scm-value.c (gdbscm_value_call): Adjust call to
2699         call_function_by_hand.
2700         * infcall.c (error_call_unknown_return_type): New function.
2701         (call_function_by_hand): New "default_return_type" parameter.
2702         Pass it down.
2703         (call_function_by_hand_dummy): New "default_return_type"
2704         parameter.  Use it instead of defaulting to int.  If there's no
2705         default and the return type is unknown, throw an error.  If
2706         there's a default return type, and the called function has no
2707         debug info, then assume the function is prototyped.
2708         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2709         New "default_return_type" parameter.
2710         (error_call_unknown_return_type): New declaration.
2711         * linux-fork.c (call_lseek): Cast return type of lseek.
2712         (inferior_call_waitpid, checkpoint_command): Adjust calls to
2713         call_function_by_hand.
2714         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2715         calls to call_function_by_hand.
2716         * m2-typeprint.c (m2_procedure): Handle functions with unknown
2717         return type.
2718         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2719         (value_nsstring, print_object_command): Adjust calls to
2720         call_function_by_hand.
2721         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2722         functions with unknown return type.
2723         (pascal_type_print_func_varspec_suffix): New function.
2724         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2725         TYPE_CODE_METHOD>: Use it.
2726         * python/py-value.c (valpy_call): Adjust call to
2727         call_function_by_hand.
2728         * rust-lang.c (rust_evaluate_funcall): Adjust call to
2729         call_function_by_hand.
2730         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2731         call_function_by_hand.
2732         * valops.c (value_allocate_space_in_inferior): Adjust call to
2733         call_function_by_hand.
2734         * typeprint.c (type_print_unknown_return_type): New function.
2735         * typeprint.h (type_print_unknown_return_type): New declaration.
2736
2737 2017-09-04  Pedro Alves  <palves@redhat.com>
2738
2739         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2740         types with more than one parameter as prototyped.
2741
2742 2017-09-04  Pedro Alves  <palves@redhat.com>
2743
2744         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2745         (disassemble_command): Use gdb_disassembly_flags instead of bare
2746         int.
2747         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2748         (dump_insns, do_mixed_source_and_assembly_deprecated)
2749         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2750         Use gdb_disassembly_flags instead of bare int.
2751         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2752         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2753         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2754         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2755         (enum gdb_disassembly_flag): ... values of this new enumeration.
2756         (gdb_disassembly_flags): Define.
2757         (gdb_disassembly)
2758         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2759         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2760         gdb_disassembly_flags instead of bare int.
2761         * record-btrace.c (btrace_insn_history)
2762         (record_btrace_insn_history, record_btrace_insn_history_range)
2763         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2764         instead of bare int.
2765         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2766         Use gdb_disassembly_flags instead of bare int.
2767         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2768         Define.
2769         * target-delegates.c: Regenerate.
2770         * target.c (target_insn_history, target_insn_history_from)
2771         (target_insn_history_range): Use gdb_disassembly_flags instead of
2772         bare int.
2773         * target.h: Include "disasm.h".
2774         (struct target_ops) <to_insn_history, to_insn_history_from,
2775         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2776         int.
2777         (target_insn_history, target_insn_history_from)
2778         (target_insn_history_range): Use gdb_disassembly_flags instead of
2779         bare int.
2780
2781 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2782
2783         * cli/cli-script.c (build_command_line): For if/while commands,
2784         check whether args is empty.
2785
2786 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2787
2788         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2789         (enum command_control_type): Likewise.
2790         (struct command_line): Likewise.
2791         (free_command_lines): Likewise.
2792         (struct command_lines_deleter): Likewise.
2793         (command_line_up): Likewise.
2794         (read_command_lines): Likewise.
2795         (read_command_lines_1): Likewise.
2796         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2797         (enum command_control_type): Likewise.
2798         (struct command_line): Likewise.
2799         (free_command_lines): Likewise.
2800         (struct command_lines_deleter): Likewise.
2801         (command_line_up): Likewise.
2802         (read_command_lines): Likewise.
2803         (read_command_lines_1): Likewise.
2804         * breakpoint.h: Include cli/cli-script.h.
2805         * extension-priv.h: Likewise.
2806         * gdbcmd.h: Likewise.
2807
2808 2017-09-04  Pedro Alves  <palves@redhat.com>
2809
2810         * ada-lang.c (is_known_support_routine): Move sal declaration to
2811         where it is initialized.
2812         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2813         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2814         (clear_command, update_static_tracepoint): Remove init_sal
2815         references.  Move declarations closer to initializations.
2816         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2817         initializations.
2818         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2819         references.  Move sal declarations closer to initializations.
2820         * frame.c (find_frame_sal): Return a symtab_and_line via function
2821         return instead of output parameter.  Remove init_sal references.
2822         * frame.h (find_frame_sal): Return a symtab_and_line via function
2823         return instead of output parameter.
2824         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2825         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2826         instead of memset.
2827         (gdbscm_find_pc_line): Remove init_sal reference.
2828         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2829         references.  Move declarations closer to initializations.
2830         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2831         initializations.
2832         (finish_backward): Remove init_sal references.  Move declarations
2833         closer to initializations.
2834         * infrun.c (process_event_stop_test, handle_step_into_function)
2835         (insert_hp_step_resume_breakpoint_at_frame)
2836         (insert_step_resume_breakpoint_at_caller): Likewise.
2837         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2838         (symbol_to_sal): Likewise.
2839         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2840         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2841         to its initialization.
2842         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2843         init_sal references.  Move declarations closer to initializations.
2844         * source.c (get_current_source_symtab_and_line): Remove brace
2845         initialization.
2846         (set_current_source_symtab_and_line): Now takes the sal by const
2847         reference.  Remove brace initialization.
2848         (line_info): Remove init_sal reference.
2849         * source.h (set_current_source_symtab_and_line): Now takes a
2850         symtab_and_line via const reference.
2851         * stack.c (set_current_sal_from_frame): Adjust.
2852         (print_frame_info): Adjust.
2853         (get_last_displayed_sal): Return the sal via function return
2854         instead of via output parameter.  Simplify.
2855         (frame_info): Adjust.
2856         * stack.h (get_last_displayed_sal): Return the sal via function
2857         return instead of via output parameter.
2858         * symtab.c (init_sal): Delete.
2859         (find_pc_sect_line): Remove init_sal references.  Move
2860         declarations closer to initializations.
2861         (find_function_start_sal): Remove init_sal references.  Move
2862         declarations closer to initializations.
2863         * symtab.h (struct symtab_and_line): In-class initialize all
2864         fields.
2865         * tracepoint.c (set_traceframe_context)
2866         (print_one_static_tracepoint_marker): Remove init_sal references.
2867         Move declarations closer to initializations.
2868         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2869         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2870         declarations closer to initializations.
2871         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2872         init_sal references.  Adjust.
2873
2874 2017-09-04  Pedro Alves  <palves@redhat.com>
2875
2876         * ax-gdb.c (agent_command_1): Use range-for.
2877         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2878         * breakpoint.c: Include "common/array-view.h".
2879         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2880         parameter from struct symtabs_and_lines to
2881         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2882         (breakpoint_sals_to_pc): Change sals parameter from struct
2883         symtabs_and_lines to std::vector reference.
2884         (check_fast_tracepoint_sals): Change sals parameter from struct
2885         symtabs_and_lines to std::array_view.  Use range-for.
2886         (decode_static_tracepoint_spec): Return a std::vector instead of
2887         symtabs_and_lines.  Update.
2888         (create_breakpoint): Update.
2889         (break_range_command, until_break_command, clear_command): Update.
2890         (base_breakpoint_decode_location, bkpt_decode_location)
2891         (bkpt_probe_create_sals_from_location)
2892         (bkpt_probe_decode_location, tracepoint_decode_location)
2893         (tracepoint_probe_decode_location)
2894         (strace_marker_create_sals_from_location): Return a std::vector
2895         instead of symtabs_and_lines.
2896         (strace_marker_create_breakpoints_sal): Update.
2897         (strace_marker_decode_location): Return a std::vector instead of
2898         symtabs_and_lines.  Update.
2899         (update_breakpoint_locations): Change struct symtabs_and_lines
2900         parameters to gdb::array_view.  Adjust.
2901         (location_to_sals): Return a std::vector instead of
2902         symtabs_and_lines.  Update.
2903         (breakpoint_re_set_default): Use std::vector instead of struct
2904         symtabs_and_lines.
2905         (decode_location_default): Return a std::vector instead of
2906         symtabs_and_lines.  Update.
2907         * breakpoint.h: Include "common/array-view.h".
2908         (struct breakpoint_ops) <decode_location>: Now returns a
2909         std::vector instead of returning a symtabs_and_lines via output
2910         parameter.
2911         (update_breakpoint_locations): Change sals parameters to use
2912         gdb::array_view.
2913         * cli/cli-cmds.c (edit_command, list_command): Update to use
2914         std::vector and gdb::array_view.
2915         (ambiguous_line_spec): Adjust to use gdb::array_view and
2916         range-for.
2917         (compare_symtabs): Rename to ...
2918         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2919         const reference and adjust.
2920         (filter_sals): Rewrite using std::vector and standard algorithms.
2921         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2922         (jump_command): Update to use std::vector.
2923         * linespec.c (struct linespec_state) <canonical_names>: Update
2924         comment.
2925         (add_sal_to_sals_basic): Delete.
2926         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2927         (decode_line_2, create_sals_line_offset)
2928         (convert_address_location_to_sals, convert_linespec_to_sals)
2929         (convert_explicit_location_to_sals, parse_linespec)
2930         (event_location_to_sals, decode_line_full, decode_line_1)
2931         (decode_line_with_current_source)
2932         (decode_line_with_last_displayed, decode_objc)
2933         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2934         (linespec_result::~linespec_result): Adjust to use std::vector
2935         instead of symtabs_and_lines.
2936         * linespec.h (linespec_sals::sals): Now a std::vector.
2937         (struct linespec_result): Use std::vector, bool, and in-class
2938         initialization.
2939         (decode_line_1, decode_line_with_current_source)
2940         (decode_line_with_last_displayed): Return std::vector.
2941         * macrocmd.c (info_macros_command): Use std::vector.
2942         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2943         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2944         std::vector.
2945         * probe.h (parse_probes): Return a std::vector.
2946         * python/python.c (gdbpy_decode_line): Use std::vector and
2947         gdb::array_view.
2948         * source.c (select_source_symtab, line_info): Use std::vector.
2949         * stack.c (func_command): Use std::vector.
2950         * symtab.h (struct symtabs_and_lines): Delete.
2951         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2952
2953 2017-09-04  Pedro Alves  <palves@redhat.com>
2954
2955         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2956         unittests/array-view-selftests.c.
2957         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2958         * common/array-view.h: New file.
2959         * unittests/array-view-selftests.c: New file.
2960
2961 2017-09-04  Pedro Alves  <palves@redhat.com>
2962
2963         * cli/cli-cmds.c (edit_command): Pass message to
2964         ambiguous_line_spec.
2965         (list_command): Pass message to ambiguous_line_spec.  Say
2966         "first"/"last" instead of "start" and "end" to be consistent with
2967         the manual.
2968         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
2969         them to print formatted message.
2970
2971 2017-09-04  Pedro Alves  <palves@redhat.com>
2972
2973         * btrace.c (ftrace_add_pt): Pass btrace_insn to
2974         ftrace_update_insns by reference instead of pointer.
2975
2976 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2977
2978         * i386-go32-tdep.c: Include x86-xstate.h.
2979         (i386_go32_init_abi): Call i386_target_description.
2980         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2981         if xcr0 is X86_XSTATE_X87_MASK.
2982         * i386-tdep.h (tdesc_i386): Remove the declaration.
2983         (tdesc_i386_mmx): Likewise.
2984
2985 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2986
2987         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2988         X86_XSTATE_SSE_MASK instead of 0.
2989
2990 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2991
2992         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2993         i386_target_description.
2994         * i386-fbsd-nat.c (i386fbsd_read_description): Call
2995         i386_target_description.
2996         * i386-tdep.c (i386_gdbarch_init): Likewise.
2997
2998 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2999
3000         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3001         (x86_darwin_init_abi_64): Call amd64_target_description.
3002         * amd64-dicos-tdep.c: Likewise.
3003         * amd64-fbsd-nat.c: Likewise.
3004         * amd64-fbsd-tdep.c: Likewise.
3005         * amd64-nbsd-tdep.c: Likewise.
3006         * amd64-obsd-tdep.c: Likewise.
3007         * amd64-sol2-tdep.c: Likewise.
3008         * amd64-windows-tdep.c: Likewise.
3009         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3010
3011 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3012
3013         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3014         (btrace_function) <insn>: Change type to use std::vector.
3015         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3016         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3017         ftrace_update_insns, ftrace_compute_global_level_offset,
3018         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3019         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3020         change to std::vector.
3021         (ftrace_update_insns): Adjust to change to std::vector, change
3022         type of INSN parameter.
3023         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3024         * record-btrace.c (btrace_call_history_insn_range,
3025         btrace_compute_src_line_range,
3026         record_btrace_frame_prev_register): Adjust to change to
3027         std::vector.
3028         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3029         to change to std::vector.
3030
3031 2017-09-03  Tom Tromey  <tom@tromey.com>
3032
3033         * corefile.c (reopen_exec_file): Use std::string.
3034
3035 2017-09-03  Tom Tromey  <tom@tromey.com>
3036
3037         * compile/compile.c (compile_register_name_mangled): Return
3038         std::string.
3039         * compile/compile-loc2c.c (pushf_register_address): Update.
3040         (pushf_register): Update.
3041         * compile/compile-c-types.c (convert_array): Update.
3042         * compile/compile-c-symbols.c (generate_vla_size): Update.
3043         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3044         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3045         (convert_one_symbol): Update.
3046         (generate_c_for_for_one_variable): Update.
3047         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3048         std::string.
3049         (generate_register_struct): Update.
3050         * compile/compile-internal.h (c_get_range_decl_name): Return a
3051         std::string.
3052         (compile_register_name_mangled): Return std::string.
3053
3054 2017-09-03  Tom Tromey  <tom@tromey.com>
3055
3056         * utils.c (perror_string): Return a std::string.
3057         (throw_perror_with_name, perror_warning_with_name): Update.
3058
3059 2017-09-03  Tom Tromey  <tom@tromey.com>
3060
3061         * demangle.c (demangle_command): Use std::string,
3062         unique_xmalloc_ptr.
3063
3064 2017-09-03  Tom Tromey  <tom@tromey.com>
3065
3066         * cli/cli-setshow.c (do_set_command): Use std::string.
3067
3068 2017-09-03  Tom Tromey  <tom@tromey.com>
3069
3070         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3071
3072 2017-09-03  Tom Tromey  <tom@tromey.com>
3073
3074         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3075
3076 2017-09-03  Tom Tromey  <tom@tromey.com>
3077
3078         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3079         gdb::unique_xmalloc_ptr.
3080
3081 2017-09-03  Tom Tromey  <tom@tromey.com>
3082
3083         * thread.c (print_thread_info_1): Use string_printf.
3084         (thread_apply_command, thread_apply_all_command): Use
3085         std::string.
3086
3087 2017-09-03  Tom Tromey  <tom@tromey.com>
3088
3089         * valprint.c (val_print_string): Update.
3090         * gdbcore.h (memory_error_message): Return std::string.
3091         * corefile.c (memory_error_message): Return std::string.
3092         (memory_error): Update.
3093         * breakpoint.c (insert_bp_location): Update.
3094
3095 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3096
3097         * target/waitstatus.h (target_waitstatus_to_string): Change
3098         return type to std::string.
3099         * target/waitstatus.c (target_waitstatus_to_string): Return
3100         std::string.
3101         * target.h (target_waitstatus_to_string): Remove declaration.
3102         * infrun.c (resume, clear_proceed_status_thread,
3103         print_target_wait_results, do_target_wait, save_waitstatus,
3104         stop_all_threads): Adjust.
3105         * record-btrace.c (record_btrace_wait): Adjust.
3106         * target-debug.h
3107         (target_debug_print_struct_target_waitstatus_p): Adjust.
3108
3109 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3110
3111         PR gdb/22046
3112         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3113         detection.
3114
3115 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3116
3117         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3118         for setting/unsetting environment variables on the remote target.
3119         (New remote packets): Add entries for QEnvironmentHexEncoded,
3120         QEnvironmentUnset and QEnvironmentReset.
3121         * common/environ.c (gdb_environ::operator=): Extend method to
3122         handle m_user_set_env_list and m_user_unset_env_list.
3123         (gdb_environ::clear): Likewise.
3124         (match_var_in_string): Change type of first parameter from 'char
3125         *' to 'const char *'.
3126         (gdb_environ::set): Extend method to handle
3127         m_user_set_env_list and m_user_unset_env_list.
3128         (gdb_environ::unset): Likewise.
3129         (gdb_environ::clear_user_set_env): New method.
3130         (gdb_environ::user_set_envp): Likewise.
3131         (gdb_environ::user_unset_envp): Likewise.
3132         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3133         m_user_unset_env_list on move constructor/assignment.
3134         (unset): Add new default parameter 'update_unset_list = true'.
3135         (clear_user_set_env): New method.
3136         (user_set_envp): Likewise.
3137         (user_unset_envp): Likewise.
3138         (m_user_set_env_list): New std::set.
3139         (m_user_unset_env_list): Likewise.
3140         * common/rsp-low.c (hex2str): New function.
3141         (bin2hex): New overload for bin2hex function.
3142         * common/rsp-low.c (hex2str): New prototype.
3143         (str2hex): New overload prototype.
3144         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3145         QEnvironmentUnset and QEnvironmentReset.
3146         (remote_protocol_features): Add QEnvironmentHexEncoded,
3147         QEnvironmentUnset and QEnvironmentReset packets.
3148         (send_environment_packet): New function.
3149         (extended_remote_environment_support): Likewise.
3150         (extended_remote_create_inferior): Call
3151         extended_remote_environment_support.
3152         (_initialize_remote): Add QEnvironmentHexEncoded,
3153         QEnvironmentUnset and QEnvironmentReset packet configs.
3154         * unittests/environ-selftests.c (gdb_selftest_env_var):
3155         New variable.
3156         (test_vector_initialization): New function.
3157         (test_init_from_host_environ): Likewise.
3158         (test_reinit_from_host_environ): Likewise.
3159         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3160         Likewise.
3161         (test_unset_set_empty_vector): Likewise.
3162         (test_vector_clear): Likewise.
3163         (test_std_move): Likewise.
3164         (test_move_constructor):
3165         (test_self_move): Likewise.
3166         (test_set_unset_reset): Likewise.
3167         (run_tests): Rewrite in terms of the functions above.
3168
3169 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3170
3171         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3172         (adi_available): Use a temp variable of type CORE_ADDR as argument
3173         3 when calling target_auxv_search.
3174         (adi_normalize_address): Use masks and xor operators to calculate
3175         normalized address.
3176         (adi_read_versions, adi_write_versions, adi_print_versions)
3177         (do_examine, do_assign): Use paddress.
3178
3179 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3180
3181         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3182         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3183         out of loop and add supply of FIR.
3184         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3185         add collect of FIR.
3186
3187 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3188
3189         PR gdb/21827
3190         * cli/cli-script.c (define_command): Don't convert command name
3191         to lower case.
3192
3193 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3194
3195         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3196         Update all callers accordingly. Remove all code blocks handling
3197         the case where DISPP is not NULL.
3198
3199 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3200
3201         PR symtab/22003
3202         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3203         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3204         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3205
3206 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3207
3208         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3209         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3210         (read_comp_units_from_section): New parameter abbrev_section, use
3211         read_and_check_comp_unit_head, allocate signatured_type if needed.
3212         (create_all_comp_units): Update read_comp_units_from_section caller.
3213
3214 2017-08-23  Pedro Alves  <palves@redhat.com>
3215
3216         PR remote/21852
3217         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3218         to null_ptid and switch to thread without reading the registers
3219         after adding the inferior.
3220
3221 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3222
3223         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3224         compile-gcc.
3225         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3226         (compile_to_object): Implement compile_gcc.
3227         (_initialize_compile): Install "set compile-gcc".  Initialize
3228         compile_gcc.
3229
3230 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3231
3232         * compile/compile.c (compile_to_object): Conditionally call
3233         set_verbose.  Conditionally call compile or compile_v0.
3234
3235 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3236
3237         * sparc64-tdep.h: (adi_normalize_address): New export.
3238         * sparc-nat.h: (open_adi_tag_fd): New export.
3239         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3240         * sparc64-linux-tdep.c:
3241         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3242         (sparc64_linux_handle_segmentation_fault): New function.
3243         (sparc64_linux_init_abi): Register
3244         sparc64_linux_handle_segmentation_fault
3245         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3246         (sparc64_addr_bits_remove): New function.
3247         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3248         (MAX_PROC_NAME_SIZE): New macro.
3249         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3250         (sparc64adilist): New variable.
3251         (adi_proc_list): New variable.
3252         (find_adi_info): New function.
3253         (add_adi_info): New function.
3254         (get_adi_info_proc): New function.
3255         (get_adi_info): New function.
3256         (info_adi_command): New function.
3257         (read_maps_entry): New function.
3258         (adi_available): New function.
3259         (adi_normalize_address): New function.
3260         (adi_align_address): New function.
3261         (adi_convert_byte_count): New function.
3262         (adi_tag_fd): New function.
3263         (adi_is_addr_mapped): New function.
3264         (adi_read_versions): New function.
3265         (adi_write_versions): New function.
3266         (adi_print_versions): New function.
3267         (do_examine): New function.
3268         (do_assign): New function.
3269         (adi_examine_command): New function.
3270         (adi_assign_command): New function.
3271         (_initialize_sparc64_adi_tdep): New function.
3272
3273 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3274
3275         * breakpoint.c (breakpoints_info): Rename to ...
3276         (info_breakpoints_command): ... this.
3277         (watchpoints_info): Rename to ...
3278         (info_watchpoints_command): ... this.
3279         (tracepoints_info): Rename to ...
3280         (info_tracepoints_command): ... this.
3281         (_initialize_breakpoint): Adjust.
3282         * dcache.c (dcache_info): Rename to ...
3283         (info_display_command): ... this.
3284         (_initialize_dcache): Adjust.
3285         * frame.h (args_info): Rename to ...
3286         (info_args_command): ... this.
3287         (locals_info): Rename to ...
3288         (info_locals_command): ... this.
3289         * infcmd.c (nofp_registers_info): Rename to ...
3290         (info_registers_command): ... this.
3291         (float_info): Rename to ...
3292         (info_float_command): ... this.
3293         (program_info): Rename to ...
3294         (info_program_command): ... this.
3295         (all_registers_info): Rename to ...
3296         (info_all_registers_command): ... this.
3297         (vector_info): Rename to ...
3298         (info_vector_command): ... this.
3299         (float_info): Rename to ...
3300         (info_float_command): ... this.
3301         (_initialize_infcmd): Adjust.
3302         * inferior.h (term_info): Rename to ...
3303         (info_terminal_command): ... this.
3304         * inflow.c (term_info): Rename to ...
3305         (info_terminal_command): ... this.
3306         (_initialize_inflow): Adjust.
3307         * infrun.c (signals_info): Rename to ...
3308         (info_signals_command): ... this.
3309         (_initialize_infrun): Adjust.
3310         * objc-lang.c (classes_info): Rename to ...
3311         (info_classes_command): ... this.
3312         (selectors_info): Rename to ...
3313         (info_selectors_command): ... this.
3314         (_initialize_objc_language): Adjust.
3315         * printcmd.c (sym_info): Rename to ...
3316         (info_symbol_command): ... this.
3317         (address_info): Rename to ...
3318         (info_address_command): ... this.
3319         (display_info): Rename to ...
3320         (info_display_command): ... this.
3321         (_initialize_printcmd): Adjust.
3322         * reverse.c (bookmarks_info): Rename to ...
3323         (info_breakpoints_command): ... this.
3324         (_initialize_reverse): Adjust.
3325         * ser-go32.c (dos_info): Rename to ...
3326         (info_serial_command): ... this.
3327         (_initialize_ser_dos): Adjust.
3328         * skip.c (skip_info): Rename to ...
3329         (info_skip_command): ... this.
3330         (_initialize_step_skip): Adjust.
3331         * source.c (line_info): Rename to ...
3332         (info_line_command): ... this.
3333         (source_info): Rename to ...
3334         (info_source_command)
3335         * stack.c (frame_info): Rename to ...
3336         (info_frame_command): ... this.
3337         (locals_info): Rename to ...
3338         (info_locals_command): ... this.
3339         (args_info): Rename to ...
3340         (info_args_command): ... this.
3341         (_initialize_stack): Adjust.
3342         * symtab.c (sources_info): Rename to ...
3343         (info_sources_command): ... this.
3344         (variables_info): Rename to ...
3345         (info_variables_command): ... this.
3346         (functions_info): Rename to ...
3347         (info_functions_command): ... this.
3348         (types_info): Rename to ...
3349         (info_types_command): ... this.
3350         (_initialize_symtab): Adjust.
3351         * target.c (target_info): Rename to ...
3352         (info_target_command): ... this.
3353         (initialize_targets): Adjust.
3354         * tracepoint.c (tvariables_info): Rename to ...
3355         (info_tvariables_command): ... this.
3356         (scope_info): Rename to ...
3357         (info_scope_command): ... this.
3358         (trace_dump_actions): Adjust.
3359         (_initialize_tracepoint): Adjust.
3360
3361 2017-08-22  Tom Tromey  <tom@tromey.com>
3362
3363         * breakpoint.h (install_breakpoint): Update.
3364         * breakpoint.c (add_solib_catchpoint): Update.
3365         (install_breakpoint): Change argument to a std::unique_ptr.
3366         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3367         (create_breakpoint_sal, create_breakpoint): Update.
3368         (watch_command_1, catch_exec_command_1)
3369         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3370         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3371         Return the breakpoint.
3372         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3373         (new_single_step_breakpoint): Update.
3374         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3375         std::unique_ptr.
3376         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3377         std::unique_ptr.
3378         * break-catch-sig.c (create_signal_catchpoint): Use
3379         std::unique_ptr.
3380         * ada-lang.c (create_ada_exception_catchpoint): Use
3381         std::unique_ptr.
3382
3383 2017-08-22  Tom Tromey  <tom@tromey.com>
3384
3385         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3386
3387 2017-08-22  Tom Tromey  <tom@tromey.com>
3388
3389         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3390         (lookup_partial_symbol): Update.
3391
3392 2017-08-22  Tom Tromey  <tom@tromey.com>
3393
3394         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3395         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3396         (find_and_open_source, symtab_to_fullname): Update.
3397         * psymtab.c (psymtab_to_fullname): Update.
3398
3399 2017-08-22  Tom Tromey  <tom@tromey.com>
3400
3401         * exec.c (exec_file_attach): Update.
3402         * linux-thread-db.c (try_thread_db_load): Update.
3403         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3404         * utils.c (gdb_realpath): Change return type.
3405         (gdb_realpath_keepfile): Update.
3406         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3407         (_initialize_utils): Register the new self test.
3408         * source.c (openp): Update.
3409         (find_and_open_source): Update.
3410         * nto-tdep.c (nto_find_and_open_solib): Update.
3411         * main.c (set_gdb_data_directory): Update.
3412         (captured_main_1): Update.
3413         * dwarf2read.c (dwarf2_get_dwz_file): Update
3414         (dw2_map_symbol_filenames): Update.
3415         * auto-load.c (auto_load_safe_path_vec_update): Update.
3416         (filename_is_in_auto_load_safe_path_vec): Change type of
3417         "filename_realp".
3418         (auto_load_objfile_script): Update.
3419         (file_is_auto_load_safe): Update.  Use std::string.
3420         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3421
3422 2017-08-22  Tom Tromey  <tom@tromey.com>
3423
3424         * utils.c (gdb_realpath_keepfile): Return a
3425         gdb::unique_xmalloc_ptr.
3426         * exec.c (exec_file_attach): Update.
3427         * utils.h (gdb_realpath_keepfile): Return a
3428         gdb::unique_xmalloc_ptr.
3429
3430 2017-08-22  Tom Tromey  <tom@tromey.com>
3431
3432         * compile/compile.c (compile_file_command): Use
3433         gdb::unique_xmalloc_ptr, std::string.
3434         * utils.c (gdb_abspath): Change return type.
3435         * source.c (openp): Update.
3436         * objfiles.c (allocate_objfile): Update.
3437         * main.c (set_gdb_data_directory): Update.
3438         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3439
3440 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3441
3442         * cli-cmds.c (list_commands): List actual code around more than
3443         one location.
3444
3445 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3446
3447         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3448
3449 2017-08-21  Pedro Alves  <palves@redhat.com>
3450
3451         PR gdb/19487
3452         * c-exp.y (variable production): Handle function aliases.
3453         * minsyms.c (msymbol_is_text): New function.
3454         * minsyms.h (msymbol_is_text): Declare.
3455         * symtab.c (find_function_alias_target): New function.
3456         * symtab.h (find_function_alias_target): Declare.
3457
3458 2017-08-21  Pedro Alves  <palves@redhat.com>
3459
3460         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3461         typedefs.
3462         * typeprint.c (whatis_exp): If handling "whatis", and expression
3463         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3464         typedefs here.
3465         * valops.c (value_cast): Save "to" type before resolving
3466         stubs/typedefs.  Use that type as resulting value's type.
3467
3468 2017-08-18  Tom Tromey  <tom@tromey.com>
3469             Pedro Alves  <palves@redhat.com>
3470
3471         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3472         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3473         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3474         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3475         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3476         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3477         (linux_get_siginfo_data): Add "thread" argument.  Use
3478         scoped_restore.
3479         * linux-nat.c (linux_child_follow_fork)
3480         (check_stopped_by_watchpoint): Use scoped_restore.
3481         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3482         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3483         (restore_inferior_ptid, save_inferior_ptid): Remove.
3484         * btrace.c (btrace_fetch): Use scoped_restore.
3485         * bsd-uthread.c (bsd_uthread_fetch_registers)
3486         (bsd_uthread_store_registers): Use scoped_restore.
3487         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3488         scoped_restore.
3489         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3490         (aix_thread_xfer_partial): Use scoped_restore.
3491         * inferior.h (save_inferior_ptid): Remove.
3492
3493 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3494
3495         PR tdep/21818
3496         * arm-tdep.c (gdb_print_insn_arm): Mark
3497         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3498
3499 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3500
3501         * NEWS: Mention GDBserver's new option "--selftest".
3502         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3503         * selftest.c: Move it to common/selftest.c.
3504         * selftest.h: Move it to common/selftest.h.
3505         * selftest-arch.c (reset): New function.
3506         (tests_with_arch): Call reset.
3507
3508 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3509
3510         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3511         instead of exception_fprintf and printf_filtered.
3512
3513 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3514
3515         * selftest.c (register_self_test): Rename it to
3516         selftests::register_test.
3517         (run_self_tests): selftest::run_tests.
3518         * selftest.h: Update declarations.
3519         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3520         selftests::register_test_foreach_arch.
3521         * selftest-arch.h: Update declaration.
3522         * aarch64-tdep.c: Update.
3523         * arm-tdep.c: Likewise.
3524         * disasm-selftests.c: Likewise.
3525         * dwarf2loc.c: Likewise.
3526         * dwarf2-frame.c: Likewise.
3527         * findvar.c: Likewise.
3528         * gdbarch-selftests.c: Likewise.
3529         * maint.c (maintenance_selftest): Likewise.
3530         * regcache.c: Likewise.
3531         * rust-exp.y: Likewise.
3532         * selftest-arch.c: Likewise.
3533         * unittests/environ-selftests.c: Likewise.
3534         * unittests/function-view-selftests.c: Likewise.
3535         * unittests/offset-type-selftests.c: Likewise.
3536         * unittests/optional-selftests.c: Likewise.
3537         * unittests/scoped_restore-selftests.c: Likewise.
3538         * utils-selftests.c: Likewise.
3539
3540 2017-08-17  Pedro Alves  <palves@redhat.com>
3541
3542         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3543         local.
3544
3545 2017-08-17  Pedro Alves  <palves@redhat.com>
3546
3547         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3548         field.
3549         (reset_die_in_process): Delete, replaced by ...
3550         (process_die_scope): ... this new class.  Make it responsible for
3551         freeing cu->line_header too.
3552         (process_die): Use process_die_scope.
3553         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3554         cu->line_header_die_owner.  Don't release the line header if it's
3555         owned by the CU.
3556         (setup_type_unit_groups): Make the CU/DIE own the line header.
3557         Don't release the line header here.
3558
3559 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3560
3561         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3562
3563 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3564
3565         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3566         Single-Key mode
3567
3568 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3569
3570         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3571         mode command list.
3572
3573 2017-08-15  Stafford Horne  <shorne@gmail.com>
3574
3575         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3576
3577 2017-08-15  Stafford Horne  <shorne@gmail.com>
3578
3579         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3580
3581 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3582
3583         PR gdb/21954
3584         * infcmd.c (unset_environment_command): Use the 'clear' method on
3585         the environment instead of resetting it.
3586
3587 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3588
3589         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3590         platforms.
3591
3592 2017-08-14  Tom Tromey  <tom@tromey.com>
3593
3594         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3595         (print_binary_chars): Likewise.
3596         (BITS_IN_BYTES): Remove.
3597
3598 2017-08-14  Tom Tromey  <tom@tromey.com>
3599
3600         PR gdb/21675
3601         * valprint.c (LOW_ZERO): Change value to 034.
3602         (print_octal_chars): Add static_asserts for octal constants.
3603         * printcmd.c (print_scalar_formatted): Add 'd' case.
3604
3605 2017-08-11  Tom Tromey  <tom@tromey.com>
3606
3607         * symfile.c (add_symbol_file_command): Use std::vector.
3608
3609 2017-08-14  Tom Tromey  <tom@tromey.com>
3610
3611         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3612         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3613         std::move.
3614         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3615
3616 2017-08-11  Pedro Alves  <palves@redhat.com>
3617
3618         * infrun.c (process_event_stop_test): Adjust
3619         function_name_is_marked_for_skip call.
3620         * skip.c: Include <list>.
3621         (skiplist_entry): Make it a class with private fields, and
3622         getters/setters.
3623         (skiplist_entry_chain): Delete.
3624         (skiplist_entries): New.
3625         (skiplist_entry_count): Delete.
3626         (highest_skiplist_entry_num): New.
3627         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3628         (add_skiplist_entry): Delete.
3629         (skiplist_entry::skiplist_entry): New.
3630         (skiplist_entry::add_entry): New.
3631         (skip_file_command, skip_function): Adjust.
3632         (compile_skip_regexp): Delete.
3633         (skip_command): Don't compile regexp here.  Adjust to use
3634         skiplist_entry::add_entry.
3635         (skip_info): Adjust to use range-for and getters.
3636         (skip_enable_command, skip_disable_command): Adjust to use
3637         range-for and setters.
3638         (skip_delete_command): Adjust to use std::list.
3639         (add_skiplist_entry): Delete.
3640         (skip_file_p): Delete, refactored as ...
3641         (skiplist_entry::do_skip_file_p): ... this new method.
3642         (skip_gfile_p): Delete, refactored as ...
3643         (skiplist_entry::do_gskip_file_p): ... this new method.
3644         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3645         (skiplist_entry::skip_function_p): ... this new method.
3646         (function_name_is_marked_for_skip): Now returns bool, and takes
3647         the function sal by const reference.  Adjust to use range-for and
3648         skiplist_entry methods.
3649         (_initialize_step_skip): Remove references to
3650         skiplist_entry_chain, skiplist_entry_count.
3651         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3652         takes the function sal by const reference.
3653
3654 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3655
3656         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3657         (dwarf2_frame_cache): Remove reset_cache_cleanup.
3658         (dwarf2_frame_cache):
3659         * frame-unwind.c (frame_unwind_try_unwinder): Catch
3660         RETURN_MASK_ALL and set *this_case to NULL.
3661         * frame-unwind.h: Update comments.
3662
3663 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3664
3665         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3666         (dwarf2_frame_state_copy_regs): Remove.
3667         (dwarf2_frame_state_free_regs): Remove.
3668         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3669         (dwarf2_restore_rule): Call method .alloc_regs instead of
3670         dwarf2_frame_state_alloc_regs.
3671         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
3672         constructor.  Call std::move.
3673         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3674         (dwarf2_frame_cache): Likewise.
3675
3676         [GDB_SELF_TEST]: Include selftest.h and
3677         selftest-arch.h.
3678         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3679         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3680         execute_cfa_program_test.
3681
3682         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3683         copy ctor, assignment operator, move assignment.
3684         <alloc_regs>: New method.
3685         <swap>: New method.
3686         (struct dwarf2_frame_state): Delete dtor.
3687         (dwarf2_frame_state_alloc_regs): Remove declaration.
3688         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3689         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3690
3691 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3692
3693         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3694         (dwarf2_frame_state::dwarf2_frame_state): New.
3695         (dwarf2_frame_state::~dwarf2_frame_state): New.
3696         (dwarf2_fetch_cfa_info): Update.
3697         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
3698         rather than a pointer.  Update code.
3699         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3700         dtor.
3701         <data_align, code_align, retaddr_column>: Change them to const.
3702         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3703         to bool.
3704
3705 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3706
3707         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3708         <loc.exp>: New field.
3709         * dwarf2-frame.c (execute_cfa_program): Update.
3710         (dwarf2_frame_prev_register): Update.
3711
3712 2017-08-10  Pedro Alves  <palves@redhat.com>
3713
3714         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3715
3716 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3717
3718         * fbsd-nat.c (struct fbsd_fork_info): Remove.
3719         (fbsd_pending_children): Use std::list.
3720         (fbsd_remember_child): Likewise.
3721         (fbsd_is_child_pending): Likewise.
3722         (fbsd_pending_vfork_done): Use std::forward_list.
3723         (fbsd_add_vfork_done): Likewise.
3724         (fbsd_is_vfork_done_pending): Likewise.
3725         (fbsd_next_vfork_done): Likewise.
3726
3727 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3728
3729         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3730         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3731         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3732         for `mapfilename'.
3733         (fbsd_xfer_partial): Use gdb::byte_vector.
3734         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3735
3736 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3737
3738         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3739         "filestuff.h".
3740         (fbsd_find_memory_regions): Fix `mapfile' initialization.
3741
3742 2017-08-09  Tom Tromey  <tom@tromey.com>
3743
3744         * skip.c (skiplist_entry): New constructor.
3745         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3746         (skiplist_entry::file_is_glob): Now bool.
3747         (skiplist_entry::file, skiplist_entry::function): Now
3748         std::string.
3749         (make_skip_entry): Return a unique_ptr.  Use new.
3750         (free_skiplist_entry, free_skiplist_entry_cleanup)
3751         (make_free_skiplist_entry_cleanup): Remove.
3752         (skip_command, skip_disable_command, add_skiplist_entry)
3753         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3754         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3755         (function_name_is_marked_for_skip): Update.
3756         (skip_delete_command): Update.  Use delete.
3757
3758 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3759
3760         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3761         (aarch64_linux_core_read_description): New function.
3762         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3763
3764 2017-08-09  Pedro Alves  <palves@redhat.com>
3765
3766         * cp-name-parser.y (cp_comp_to_string): Return a
3767         gdb::unique_xmalloc_ptr<char>.
3768         * cp-support.c (replace_typedefs_qualified_name)
3769         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3770         (cp_canonicalize_string_full): Use op= instead of explicit
3771         convertion.
3772         (cp_class_name_from_physname, method_name_from_physname)
3773         (cp_func_name, cp_remove_params): Adjust to use
3774         gdb::unique_xmalloc_ptr<char>.
3775         * cp-support.h (cp_comp_to_string): Return a
3776         gdb::unique_xmalloc_ptr<char>.
3777         * python/py-type.c (typy_lookup_type): Adjust to use
3778         gdb::unique_xmalloc_ptr<char>.
3779
3780 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3781
3782         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3783
3784 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3785             Yao Qi  <yao.qi@linaro.org>
3786
3787         * cp-support.c (cp_canonicalize_string_full): Use
3788         gdb::unique_xmalloc_ptr<char>.
3789         (cp_canonicalize_string): Likewise.
3790
3791 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3792
3793         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3794         * regformats/i386/amd64-avx-avx512.dat: Remove.
3795         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3796         * regformats/i386/amd64-avx-mpx.dat:Remove.
3797         * regformats/i386/amd64-avx.dat: Remove.
3798         * regformats/i386/amd64-mpx.dat: Remove.
3799         * regformats/i386/i386-avx-avx512.dat: Remove.
3800         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3801         * regformats/i386/i386-avx-mpx.dat: Remove.
3802         * regformats/i386/i386-mmx.dat: Remove.
3803         * regformats/i386/i386-mpx.dat: Remove.
3804
3805 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3806
3807         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3808         * amd64-tdep.c: Don't include features/i386/x32*.c.
3809         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3810         functions.
3811         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3812         and i386/x32-avx-avx512.
3813         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3814         and i386/x32.xml.
3815         * features/i386/x32-avx-avx512.c: Removed.
3816         * features/i386/x32-avx-avx512.xml: Removed.
3817         * features/i386/x32-avx.c: Removed.
3818         * features/i386/x32-avx.xml: Removed.
3819         * features/i386/x32.c: Removed.
3820         * features/i386/x32.xml: Removed.
3821         * regformats/i386/x32-avx-avx512.dat: Removed.
3822         * regformats/i386/x32-avx.dat: Removed.
3823         * regformats/i386/x32.dat: Removed.
3824
3825 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3826
3827         PR breakpoints/21886
3828         * mem-break.c (default_memory_insert_breakpoint): Use
3829         `->placed_address' rather than `->reqstd_address' for the
3830         breakpoint location.
3831
3832 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3833
3834         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3835         assertions.
3836
3837 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3838
3839         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3840         a union of `tdep_info', `tdesc_data' and `id'.
3841         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3842         rather than `info.tdep_info'.
3843         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3844         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3845         * i386-tdep.c (i386_gdbarch_init): Likewise.
3846         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3847         * mips-tdep.c (mips_gdbarch_init): Likewise.
3848         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3849         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3850         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3851         `info.tdep_info'.
3852         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3853         `info.tdep_info'.
3854         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3855         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3856         `info.tdep_info'.
3857         * spu-tdep.c (spu_gdbarch_init): Likewise.
3858         * gdbarch.h: Regenerate.
3859
3860 2017-08-07  Leszek Swirski  <leszeks@google.com>
3861
3862         PR symtab/20899
3863         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3864
3865 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3866
3867         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3868         (gdbsim_open): Rename gdb_argv args object to argv.
3869
3870 2017-08-05  Tom Tromey  <tom@tromey.com>
3871
3872         * compile/compile-object-load.c (compile_object_load): Use
3873         gdb::unique_xmalloc_ptr.
3874         * cli/cli-dump.c (scan_filename): Rename from
3875         scan_filename_with_cleanup.  Change return type.
3876         (scan_expression): Rename from scan_expression_with_cleanup.
3877         Change return type.
3878         (dump_memory_to_file, dump_value_to_file, restore_command):
3879         Use gdb::unique_xmalloc_ptr.  Update.
3880         * cli/cli-cmds.c (find_and_open_script): Use
3881         gdb::unique_xmalloc_ptr.
3882         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3883         * symmisc.c (maintenance_print_symbols)
3884         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3885         * symfile.c (symfile_bfd_open, generic_load)
3886         (add_symbol_file_command, remove_symbol_file_command): Use
3887         gdb::unique_xmalloc_ptr.
3888         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3889         * psymtab.c (maintenance_print_psymbols): Use
3890         gdb::unique_xmalloc_ptr.
3891         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3892         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3893         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3894         (reload_shared_libraries_1): Likewise.
3895
3896 2017-08-05  Tom Tromey  <tom@tromey.com>
3897
3898         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3899         (rust_op_vector, rust_set_vector): New typedefs.
3900         (current_parser): New global.
3901         (work_obstack): Change to pointer type.  Update all users.
3902         (rust_ast, pstate): Remove globals.
3903         (struct rust_parser): New.
3904         (%union) <params, field_inits>: Change type.
3905         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3906         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3907         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3908         (convert_params_to_types, convert_params_to_expression): Change
3909         type of "params".
3910         (ast_string): Change type of "fields".
3911         (rust_parse): Make a rust_parser.  Remove cleanups.
3912         (rust_lex_tests): Make and install an auto_obstack.
3913
3914 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3915
3916         * configure.srv (ipa_x32_linux_regobj): New.
3917         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3918         instead of X86_TDESC_AVX512.
3919         (initialize_low_tracepoint): Call
3920         init_registers_x32_avx_avx512_linux.
3921
3922 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3923
3924         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3925
3926 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3927
3928         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3929
3930 2017-08-03  Tom Tromey  <tom@tromey.com>
3931
3932         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3933         Remove.
3934         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3935
3936 2017-08-03  Tom Tromey  <tom@tromey.com>
3937
3938         * python/py-param.c (compute_enum_values): Use gdb_argv.
3939
3940 2017-08-03  Tom Tromey  <tom@tromey.com>
3941
3942         * utils.h (struct gdb_argv_deleter): New.
3943         (gdb_argv): New class.
3944         * utils.c (gdb_argv::reset): New method.
3945         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3946         * tracefile.c (tsave_command): Use gdb_argv.
3947         * top.c (new_ui_command): Use gdb_argv.
3948         * symmisc.c (maintenance_print_symbols)
3949         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3950         * symfile.c (symbol_file_command, generic_load)
3951         (remove_symbol_file_command): Use gdb_argv.
3952         * stack.c (backtrace_command): Use gdb_argv.
3953         * source.c (add_path, show_substitute_path_command)
3954         (unset_substitute_path_command, set_substitute_path_command):
3955         Use gdb_argv.
3956         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3957         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3958         * remote.c (extended_remote_run, remote_put_command)
3959         (remote_get_command, remote_delete_command): Use gdb_argv.
3960         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3961         (gdbsim_open): Use gdb_argv.
3962         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3963         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3964         * procfs.c (procfs_info_proc): Use gdb_argv.
3965         * interps.c (interpreter_exec_cmd): Use gdb_argv.
3966         * infrun.c (handle_command): Use gdb_argv.
3967         * inferior.c (add_inferior_command, clone_inferior_command):
3968         Use gdb_argv.
3969         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3970         * exec.c (exec_file_command): Use gdb_argv.
3971         * cli/cli-cmds.c (alias_command): Use gdb_argv.
3972         * compile/compile.c (build_argc_argv): Use gdb_argv.
3973
3974 2017-08-03  Tom Tromey  <tom@tromey.com>
3975
3976         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3977
3978 2017-08-03  Tom Tromey  <tom@tromey.com>
3979
3980         * python/python.c (compute_python_string): Return std::string.
3981         (gdbpy_eval_from_control_command): Update.
3982         (do_start_initialization): Use std::string.
3983         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3984         xstrprintf.
3985         * python/py-breakpoint.c (local_setattro): Use string_printf, not
3986         xstrprintf.
3987
3988 2017-08-03  Tom Tromey  <tom@tromey.com>
3989
3990         * top.h (do_restore_instream_cleanup): Remove.
3991         * top.c (do_restore_instream_cleanup): Remove.
3992         (read_command_file): Use scoped_restore.
3993         * cli/cli-script.c (execute_user_command): Use scoped_restore.
3994
3995 2017-08-03  Tom Tromey  <tom@tromey.com>
3996
3997         * cli/cli-script.c (execute_user_command)
3998         (execute_control_command): Use scoped_restore.
3999
4000 2017-08-03  Tom Tromey  <tom@tromey.com>
4001
4002         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4003         (execute_user_command): Remove user_call_depth; use
4004         user_args_stack's size instead.
4005
4006 2017-08-03  Tom Tromey  <tom@tromey.com>
4007
4008         * top.h (in_user_command): Remove.
4009         * top.c (in_user_command): Remove.
4010         * cli/cli-script.c (do_restore_user_call_depth)
4011         (execute_user_command): Update.
4012
4013 2017-08-03  Tom Tromey  <tom@tromey.com>
4014
4015         * valops.c (search_struct_method): Use gdb::byte_vector.
4016         * valarith.c (value_concat): Use std::vector.
4017         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4018         (simple_search_memory): Likewise.
4019         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4020         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4021         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4022         * elfread.c (elf_rel_plt_read): Use std::string.
4023         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4024         * cli/cli-dump.c (restore_section_callback): Use
4025         gdb::byte_vector.
4026
4027 2017-08-03  Tom Tromey  <tom@tromey.com>
4028
4029         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4030
4031 2017-08-03  Tom Tromey  <tom@tromey.com>
4032
4033         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4034         (tui_register_format): Use scoped_restore.
4035
4036 2017-08-03  Tom Tromey  <tom@tromey.com>
4037
4038         * reverse.c (exec_direction_default): Remove.
4039         (exec_reverse_once): Use scoped_restore.
4040         * remote.c (restore_remote_timeout): Remove.
4041         (remote_flash_erase, remote_flash_write, remote_flash_done)
4042         (readchar, remote_serial_write): Use scoped_restore.
4043         * cli/cli-script.c (struct source_cleanup_lines_args)
4044         (source_cleanup_lines): Remove.
4045         (script_from_file): Use scoped_restore.
4046         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4047         (source_command): Use scoped_restore.
4048
4049 2017-08-03  Tom Tromey  <tom@tromey.com>
4050
4051         * utils.h (make_cleanup_free_so): Remove.
4052         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4053         * solist.h (struct so_deleter): New.
4054         (so_list_up): New typedef.
4055         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4056
4057 2017-08-03  Tom Tromey  <tom@tromey.com>
4058
4059         * utils.h (make_cleanup_restore_current_language): Remove.
4060         * utils.c (do_restore_current_language)
4061         (make_cleanup_restore_current_language): Remove.
4062         * parse.c (parse_exp_in_context_1)
4063         (parse_expression_with_language): Use
4064         scoped_restore_current_language.
4065         * mi/mi-main.c (mi_cmd_execute): Use
4066         scoped_restore_current_language.
4067         * language.h (scoped_restore_current_language): New class.
4068
4069 2017-08-03  Tom Tromey  <tom@tromey.com>
4070
4071         * compile/compile.c (cleanup_unlink_file): Remove.
4072         (compile_to_object): Use gdb::unlinker.
4073         (eval_compile_command): Likewise.
4074
4075 2017-08-03  Tom Tromey  <tom@tromey.com>
4076
4077         * utils.h (make_cleanup_fclose): Remove.
4078         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4079
4080 2017-08-03  Tom Tromey  <tom@tromey.com>
4081
4082         * top.c (open_terminal_stream): Return gdb_file_up.
4083         (new_ui_command): Update.
4084
4085 2017-08-03  Tom Tromey  <tom@tromey.com>
4086
4087         * source.c (print_source_lines_base, forward_search_command)
4088         (reverse_search_command): Use gdb_file_up.
4089
4090 2017-08-03  Tom Tromey  <tom@tromey.com>
4091
4092         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4093
4094 2017-08-03  Tom Tromey  <tom@tromey.com>
4095
4096         * cli/cli-cmds.c (find_and_open_script): Change return type.
4097         Remove "streamp" and "full_path" parameters.
4098         (source_script_with_search): Update.
4099         * auto-load.c (source_script_file): Update.
4100         * cli/cli-cmds.h (find_and_open_script): Change type.
4101         (open_script): New struct.
4102
4103 2017-08-03  Tom Tromey  <tom@tromey.com>
4104
4105         * xml-support.c (xml_fetch_content_from_file): Update.
4106         * ui-file.c (stdio_file::open): Update.
4107         * tracefile-tfile.c (tfile_start): Update.
4108         * remote.c (remote_file_put, remote_file_get): Update.
4109         * nat/linux-procfs.c (linux_proc_get_int)
4110         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4111         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4112         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4113         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4114         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4115         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4116         * linux-nat.c (linux_proc_pending_signals): Update.
4117         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4118         (file_closer): Remove.
4119         * compile/compile.c (compile_to_object): Update.
4120         * common/filestuff.h (struct gdb_file_deleter): New.
4121         (gdb_file_up): New typedef.
4122         (gdb_fopen_cloexec): Change return type.
4123         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4124         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4125         (dump_binary_file, restore_binary_file): Update.
4126         * auto-load.c (auto_load_objfile_script_1): Update.
4127
4128 2017-08-03  Tom Tromey  <tom@tromey.com>
4129
4130         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4131         (info_static_tracepoint_markers_command): Likewise.
4132         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4133         * skip.c (skip_info): Use ui_out_emit_table.
4134         * progspace.c (print_program_space): Use ui_out_emit_table.
4135         * osdata.c (info_osdata): Use ui_out_emit_table.
4136         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4137         ui_out_emit_table.
4138         * linux-thread-db.c (info_auto_load_libthread_db): Use
4139         ui_out_emit_table.
4140         * inferior.c (print_inferior): Use ui_out_emit_table.
4141         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4142         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4143         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4144         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4145         * ui-out.h (class ui_out_emit_table): New.
4146
4147 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4148
4149         * mips-tdep.c (mips_fpu_type_str): New function.
4150         (mips_dump_tdep): Call it.
4151
4152 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4153
4154         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4155         `->mips_fpu_type'.
4156
4157 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4158
4159         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4160
4161 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4162
4163         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4164
4165 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4166
4167         * cli/cli-cmds.c (maintenancechecklist): New variable.
4168         * gdbcmd.h (maintenancechecklist): Declare it.
4169         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4170         Call i386_linux_read_description with different masks.
4171         * maint.c (maintenance_check_command): New function.
4172         (_initialize_maint_cmds): Call add_prefix_cmd.
4173         * target-descriptions.c (tdesc_reg): override operator != and ==.
4174         (tdesc_type): Likewise.
4175         (tdesc_feature): Likewise.
4176         (target_desc): Likewise.
4177         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4178         (maintenance_check_xml_descriptions): New function.
4179         (_initialize_target_descriptions) Add command "xml-descriptions".
4180         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4181
4182 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4183
4184         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4185         Include features/i386/32bit-*.c.
4186         (i386_linux_read_description): Generate target description if it
4187         doesn't exist.
4188         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4189         functions.
4190         * features/i386/32bit-linux.c: Re-generated.
4191         * features/i386/32bit-sse.c: Likewise.
4192         * target-descriptions.c (print_c_feature::visit): Print code to
4193         set register number if needed.
4194         (print_c_feature) <m_next_regnum>: New field.
4195
4196 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4197
4198         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4199         (FEATURE_XMLFILES): New.
4200         (FEATURE_CFILES): New.
4201         New rules.
4202         (clean-cfiles): Remove generated c files.
4203         * features/i386/32bit-avx.c: Generated.
4204         * features/i386/32bit-avx512.c: Generated.
4205         * features/i386/32bit-core.c: Generated.
4206         * features/i386/32bit-linux.c: Generated.
4207         * features/i386/32bit-mpx.c: Generated.
4208         * features/i386/32bit-pkeys.c: Generated.
4209         * features/i386/32bit-sse.c: Generated.
4210         * target-descriptions.c: Include algorithm.
4211         (tdesc_element_visitor): Add method visit_end.
4212         (print_c_tdesc): Implement visit_end.
4213         (print_c_tdesc:: m_filename_after_features): Move it to
4214         protected.
4215         (print_c_feature): New class.
4216         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4217         name starts with "i386/32bit-".
4218
4219 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4220
4221         * target-descriptions.c (tdesc_element_visitor): New class.
4222         (tdesc_element): New class.
4223         (tdesc_reg): Inherit from tdesc_element.
4224         (tdesc_reg::accept): New function.
4225         (tdesc_type): Inherit from tdesc_element.
4226         (tdesc_type::accept): New function.
4227         (tdesc_feature): Inherit from tdesc_element.
4228         (tdesc_feature::accept): New function.
4229         (target_desc): Inherit from tdesc_element.
4230         (target_desc::target_desc): New.
4231         (target_desc::~target_desc): New.
4232         (target_desc::accept): New.
4233         (allocate_target_description): Use new.
4234         (free_target_description): Use delete.
4235         (print_c_tdesc): New class.
4236         (maint_print_c_tdesc_cmd): Adjust.
4237
4238         * features/aarch64.c: Re-generated.
4239         * features/arc-arcompact.c: Re-generated.
4240         * features/arc-v2.c: Re-generated.
4241         * features/arm/arm-with-iwmmxt.c: Re-generated.
4242         * features/arm/arm-with-m.c: Re-generated.
4243         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4244         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4245         * features/arm/arm-with-neon.c: Re-generated.
4246         * features/arm/arm-with-vfpv2.c: Re-generated.
4247         * features/arm/arm-with-vfpv3.c: Re-generated.
4248         * features/i386/amd64-avx-avx512.c: Re-generated.
4249         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4250         * features/i386/amd64-avx.c: Re-generated.
4251         * features/i386/amd64-avx-linux.c: Re-generated.
4252         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4253         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4254         * features/i386/amd64-avx-mpx.c: Re-generated.
4255         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4256         * features/i386/amd64.c: Re-generated.
4257         * features/i386/amd64-linux.c: Re-generated.
4258         * features/i386/amd64-mpx.c: Re-generated.
4259         * features/i386/amd64-mpx-linux.c: Re-generated.
4260         * features/i386/i386-avx-avx512.c: Re-generated.
4261         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4262         * features/i386/i386-avx.c: Re-generated.
4263         * features/i386/i386-avx-linux.c: Re-generated.
4264         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4265         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4266         * features/i386/i386-avx-mpx.c: Re-generated.
4267         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4268         * features/i386/i386.c: Re-generated.
4269         * features/i386/i386-linux.c: Re-generated.
4270         * features/i386/i386-mmx.c: Re-generated.
4271         * features/i386/i386-mmx-linux.c: Re-generated.
4272         * features/i386/i386-mpx.c: Re-generated.
4273         * features/i386/i386-mpx-linux.c: Re-generated.
4274         * features/i386/x32-avx-avx512.c: Re-generated.
4275         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4276         * features/i386/x32-avx.c: Re-generated.
4277         * features/i386/x32-avx-linux.c: Re-generated.
4278         * features/i386/x32.c: Re-generated.
4279         * features/i386/x32-linux.c: Re-generated.
4280         * features/microblaze.c: Re-generated.
4281         * features/microblaze-with-stack-protect.c: Re-generated.
4282         * features/mips64-dsp-linux.c: Re-generated.
4283         * features/mips64-linux.c: Re-generated.
4284         * features/mips-dsp-linux.c: Re-generated.
4285         * features/mips-linux.c: Re-generated.
4286         * features/nds32.c: Re-generated.
4287         * features/nios2.c: Re-generated.
4288         * features/nios2-linux.c: Re-generated.
4289         * features/rs6000/powerpc-32.c: Re-generated.
4290         * features/rs6000/powerpc-32l.c: Re-generated.
4291         * features/rs6000/powerpc-403.c: Re-generated.
4292         * features/rs6000/powerpc-403gc.c : Re-generated.
4293         * features/rs6000/powerpc-405.c: Re-generated.
4294         * features/rs6000/powerpc-505.c: Re-generated.
4295         * features/rs6000/powerpc-601.c: Re-generated.
4296         * features/rs6000/powerpc-602.c: Re-generated.
4297         * features/rs6000/powerpc-603.c: Re-generated.
4298         * features/rs6000/powerpc-604.c: Re-generated.
4299         * features/rs6000/powerpc-64.c: Re-generated.
4300         * features/rs6000/powerpc-64l.c: Re-generated.
4301         * features/rs6000/powerpc-7400.c: Re-generated.
4302         * features/rs6000/powerpc-750.c: Re-generated.
4303         * features/rs6000/powerpc-860.c: Re-generated.
4304         * features/rs6000/powerpc-altivec32.c: Re-generated.
4305         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4306         * features/rs6000/powerpc-altivec64.c: Re-generated.
4307         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4308         * features/rs6000/powerpc-cell32l.c: Re-generated.
4309         * features/rs6000/powerpc-cell64l.c: Re-generated.
4310         * features/rs6000/powerpc-e500.c: Re-generated.
4311         * features/rs6000/powerpc-e500l.c: Re-generated.
4312         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4313         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4314         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4315         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4316         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4317         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4318         * features/rs6000/powerpc-vsx32.c: Re-generated.
4319         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4320         * features/rs6000/powerpc-vsx64.c: Re-generated.
4321         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4322         * features/rs6000/rs6000.c: Re-generated.
4323         * features/s390-linux32.c: Re-generated.
4324         * features/s390-linux32v1.c: Re-generated.
4325         * features/s390-linux32v2.c: Re-generated.
4326         * features/s390-linux64.c: Re-generated.
4327         * features/s390-linux64v1.c: Re-generated.
4328         * features/s390-linux64v2.c: Re-generated.
4329         * features/s390-te-linux64.c: Re-generated.
4330         * features/s390-tevx-linux64.c: Re-generated.
4331         * features/s390-vx-linux64.c: Re-generated.
4332         * features/s390x-linux64.c: Re-generated.
4333         * features/s390x-linux64v1.c: Re-generated.
4334         * features/s390x-linux64v2.c: Re-generated.
4335         * features/s390x-te-linux64.c: Re-generated.
4336         * features/s390x-tevx-linux64.c: Re-generated.
4337         * features/s390x-vx-linux64.c: Re-generated.
4338         * features/sparc/sparc32-solaris.c: Re-generated.
4339         * features/sparc/sparc64-solaris.c: Re-generated.
4340         * features/tic6x-c62x.c: Re-generated.
4341         * features/tic6x-c62x-linux.c: Re-generated.
4342         * features/tic6x-c64x.c: Re-generated.
4343         * features/tic6x-c64x-linux.c: Re-generated.
4344         * features/tic6x-c64xp.c: Re-generated.
4345         * features/tic6x-c64xp-linux.c: Re-generated.
4346
4347 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4348
4349         * i386-linux-tdep.c (i386_linux_read_description): New function.
4350         (i386_linux_core_read_description): Call
4351         i386_linux_read_description.
4352         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4353         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4354         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4355         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4356         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4357         * x86-linux-nat.c (x86_linux_read_description): Call
4358         i386_linux_read_description.
4359
4360 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4361
4362         * NEWS: Mention it.
4363         * features/Makefile (%.c: %.xml): Pass the xml file name to
4364         command "maint print c-tdesc".
4365         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4366         name from 'arg'.
4367
4368 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4369
4370         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4371         in-class initialization.
4372         (tdesc_create_feature): Call new instead of XCNEW.
4373         (free_target_description): Ue delete.
4374
4375 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4376
4377         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4378
4379 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4380
4381         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4382         constant.
4383         (amd64_x32_init_abi): Likewise.
4384         * amd64-tdep.h (amd64_init_abi): Update declaration.
4385         (amd64_x32_init_abi): Likewise.
4386
4387 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4388
4389         PR tdep/21717
4390         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4391         condition for FPSCR.
4392         (arm_linux_store_inferior_registers): Likewise.
4393
4394 2017-07-22  Tom Tromey  <tom@tromey.com>
4395
4396         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4397         <syscalls_counts>: Now a std::vector.
4398         (get_catch_syscall_inferior_data): Use "new".
4399         (catch_syscall_inferior_data_cleanup): Use "delete".
4400         (insert_catch_syscall, remove_catch_syscall)
4401         (clear_syscall_counts): Update.
4402
4403 2017-07-22  Tom Tromey  <tom@tromey.com>
4404
4405         * break-catch-syscall.c (syscall_catchpoint)
4406         <syscalls_to_be_caught>: Now a std::vector<int>
4407         (~syscall_catchpoint): Remove.
4408         (insert_catch_syscall, remove_catch_syscall)
4409         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4410         (print_mention_catch_syscall, print_recreate_catch_syscall):
4411         Update.
4412         (create_syscall_event_catchpoint): Change type of "filter"
4413         parameter.
4414         (catch_syscall_split_args): Return a std::vector.
4415         (catch_syscall_command_1, catching_syscall_number_1): Update.
4416
4417 2017-07-22  Tom Tromey  <tom@tromey.com>
4418
4419         * break-catch-throw.c (struct exception_catchpoint)
4420         <exception_rx>: Now a std::string.
4421         (~exception_catchpoint): Remove.
4422         (print_one_detail_exception_catchpoint): Update.
4423         (handle_gnu_v3_exceptions): Change type of except_rx.
4424         (extract_exception_regexp): Return a std::string.
4425         (catch_exception_command_1): Update.
4426
4427 2017-07-22  Tom Tromey  <tom@tromey.com>
4428
4429         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4430         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4431         std::vector.
4432         <catch_all>: Now a bool.
4433         (~signal_catchpoint): Remove.
4434         (signal_catchpoint_insert_location)
4435         (signal_catchpoint_remove_location)
4436         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4437         (signal_catchpoint_print_mention)
4438         (signal_catchpoint_print_recreate)
4439         (signal_catchpoint_explains_signal): Update.
4440         (create_signal_catchpoint): Change type of "filter" and
4441         "catch_all".
4442         (catch_signal_split_args): Return a std::vector.  Change type of
4443         "catch_all".
4444         (catch_signal_command): Update.
4445
4446 2017-07-20  Pedro Alves  <palves@redhat.com>
4447
4448         * ada-lang.c (ada_language_defn): Make extern.
4449         (_initialize_ada_language): Remove add_language call.
4450         * c-lang.c (c_language_defn, cplus_language_defn)
4451         (asm_language_defn, minimal_language_defn): Make extern.
4452         (_initialize_c_language): Delete.
4453         * completer.c (compare_cstrings): Delete, moved to utils.h.
4454         * d-lang.c (d_language_defn): Make extern.
4455         (_initialize_d_language): Remove add_language calls.
4456         * defs.h (enum language): Add comment.
4457         * f-lang.c (f_language_defn): Make extern.
4458         (_initialize_f_language): Remove add_language call.
4459         * go-lang.c (go_language_defn): Make extern.
4460         (_initialize_go_language): Remove add_language call.
4461         * language.c: Include <algorithm>.
4462         (languages): Redefine as const array.
4463         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4464         (set_language_command): Handle "local".  Use for-range loop.
4465         (set_language): Remove loop.
4466         (language_enum): Rewrite.
4467         (language_def, language_str): Remove loops.
4468         (add_language): Delete.
4469         (add_set_language_command): New, based on add_languages.
4470         (skip_language_trampoline): Adjust.
4471         (local_language_defn): Delete.
4472         (language_gdbarch_post_init): Adjust.
4473         (_initialize_language): Remove add_language calls.  Call
4474         add_set_language_command.
4475         * language.h (add_language): Delete.
4476         (auto_language_defn)
4477         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4478         (asm_language_defn, c_language_defn, cplus_language_defn)
4479         (d_language_defn, f_language_defn, go_language_defn)
4480         (m2_language_defn, objc_language_defn, opencl_language_defn)
4481         (pascal_language_defn, rust_language_defn): Declare.
4482         * m2-lang.c (m2_language_defn): Make extern.
4483         (_initialize_m2_language): Remove add_language call.
4484         * objc-lang.c (objc_language_defn): Make extern.
4485         (_initialize_objc_language): Remove add_language call.
4486         * opencl-lang.c (opencl_language_defn): Make extern.
4487         (_initialize_opencl_language): Remove add_language call.
4488         * p-lang.c (pascal_language_defn): Make extern.
4489         (_initialize_pascal_language): Delete.
4490         * rust-lang.c (rust_language_defn): Make extern.
4491         (_initialize_rust_language): Delete.
4492         * utils.h (compare_cstrings): New static inline function.
4493
4494 2017-07-20  Pedro Alves  <palves@redhat.com>
4495
4496         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4497         (get_var_value): Constify parameters.
4498         (get_int_var_value): Change prototype.
4499         (to_fixed_range_type): Adjust.
4500         * ada-lang.h (get_int_var_value): Change prototype.
4501
4502 2017-07-20  Pedro Alves  <palves@redhat.com>
4503
4504         * dwarf2read.c (dw2_lookup_symbol): Use
4505         SYMBOL_MATCHES_SEARCH_NAME.
4506         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4507
4508 2017-07-20  Pedro Alves  <palves@redhat.com>
4509
4510         * block.c (block_iter_name_step, block_iter_name_first)
4511         (block_iter_name_next): Delete.
4512         (block_lookup_symbol_primary): Adjust to use
4513         dict_iter_match_first/dict_iter_match_next.
4514         * block.h (block_iter_name_first, block_iter_name_next): Delete
4515         declarations.
4516         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4517         dict_iter_match_first/dict_iter_match_next.
4518
4519 2017-07-20  Pedro Alves  <palves@redhat.com>
4520
4521         * cp-support.c (cp_find_first_component_aux): Add missing case for
4522         end of string.
4523
4524 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4525
4526         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4527         of dwo_cu's dwo_file.
4528
4529 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4530
4531         * remote.c (store_registers_using_G): Remove one line comment.
4532
4533 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4534
4535         * regcache.c (regcache_cpy): Simplify it.
4536         (regcache::cpy_no_passthrough): Remove it.
4537         * regcache.h (cpy_no_passthrough): Remove it.
4538         (regcache_dup, regcache_cpy): Update comments.
4539
4540 2017-07-18  Pedro Alves  <palves@redhat.com>
4541
4542         * remote-sim.c (sim_command_completer): Adjust to work with a
4543         completion_tracker instead of a VEC.
4544
4545 2017-07-17  Pedro Alves  <palves@redhat.com>
4546
4547         * completer.c (complete_source_filenames): New function.
4548         (complete_address_and_linespec_locations): New function.
4549         (location_completer): Use complete_address_and_linespec_locations.
4550         (completion_tracker::build_completion_result): Honor the tracker's
4551         request to suppress append.
4552         * completer.h (completion_tracker::suppress_append_ws)
4553         (completion_tracker::set_suppress_append_ws): New methods.
4554         (completion_tracker::m_suppress_append_ws): New field.
4555         (complete_source_filenames): New declaration.
4556         * linespec.c (linespec_complete_what): New.
4557         (struct ls_parser) <complete_what, completion_word,
4558         completion_quote_char, completion_quote_end, completion_tracker>:
4559         New fields.
4560         (string_find_incomplete_keyword_at_end): New.
4561         (linespec_lexer_lex_string): Record quote char.  If in completion
4562         mode, don't throw.
4563         (linespec_lexer_consume_token): Advance the completion word point.
4564         (linespec_lexer_peek_token): Save/restore completion info.
4565         (save_stream_and_consume_token): New.
4566         (set_completion_after_number): New.
4567         (linespec_parse_basic): Set what to complete next depending on
4568         token.  Handle function and label completions specially.
4569         (parse_linespec): Disable objc shortcut in completion mode.  Set
4570         what to complete next depending on token type.  Skip keyword if in
4571         completion mode.
4572         (complete_linespec_component, linespec_complete): New.
4573         * linespec.h (linespec_complete): Declare.
4574
4575 2017-07-17  Pedro Alves  <palves@redhat.com>
4576
4577         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4578         Handle 'operator<' / 'operator<<'.
4579
4580 2017-07-17  Pedro Alves  <palves@redhat.com>
4581
4582         * completer.c (collect_explicit_location_matches): Handle
4583         MATCH_LABEL.
4584         (convert_explicit_location_to_linespec): New, factored out from
4585         ...
4586         (convert_explicit_location_to_sals): ... this.
4587         (complete_label): New.
4588         (linespec_complete_label, find_label_symbols_in_block): New.
4589         (find_label_symbols): Add completion_mode parameter and adjust to
4590         call find_label_symbols_in_block.
4591         * linespec.h (linespec_complete_label): Declare.
4592
4593 2017-07-17  Pedro Alves  <palves@redhat.com>
4594
4595         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4596         complete_symbol_mode parameter.
4597         * cli/cli-cmds.c (complete_command): Get the completion result out
4598         of the handle_brkchars tracker if used a custom word point.
4599         * completer.c: Include "linespec.h".
4600         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4601         (advance_to_expression_complete_word_point): New.
4602         (completion_tracker::completes_to_completion_word): New.
4603         (complete_files_symbols): Pass down
4604         complete_symbol_mode::EXPRESSION.
4605         (explicit_options, probe_options): New.
4606         (collect_explicit_location_matches): Complete on the
4607         explictit_loc->foo instead of word.  Use
4608         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4609         keyword and options completions.
4610         (backup_text_ptr): Delete.
4611         (skip_keyword): New.
4612         (complete_explicit_location): Remove 'word' parameter.  Add
4613         language, quoted_arg_start and quoted_arg_end parameters.
4614         Rewrite, parsing left to right.
4615         (location_completer): Rewrite.
4616         (location_completer_handle_brkchars): New function.
4617         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4618         (enum complete_line_internal_reason): Adjust comments.
4619         (completion_tracker::discard_completions): New.
4620         (completer_handle_brkchars_func_for_completer): Handle
4621         location_completer.
4622         (gdb_custom_word_point_brkchars)
4623         (gdb_org_rl_basic_quote_characters): New.
4624         (gdb_completion_word_break_characters_throw)
4625         (completion_find_completion_word): Handle trackers that use a
4626         custom word point.
4627         (completion_tracker::advance_custom_word_point_by): New.
4628         (completion_tracker::build_completion_result): Don't rely on
4629         readline appending the quote char.
4630         (gdb_rl_attempted_completion_function_throw): Handle trackers that
4631         use a custom word point.
4632         (gdb_rl_attempted_completion_function): Restore
4633         rl_basic_quote_characters.
4634         * completer.h (class completion_tracker): Extend intro comment.
4635         (completion_tracker::set_quote_char)
4636         (completion_tracker::quote_char)
4637         (completion_tracker::set_use_custom_word_point)
4638         (completion_tracker::use_custom_word_point)
4639         (completion_tracker::custom_word_point)
4640         (completion_tracker::set_custom_word_point)
4641         (completion_tracker::advance_custom_word_point_by)
4642         (completion_tracker::completes_to_completion_word)
4643         (completion_tracker::discard_completions): New methods.
4644         (completion_tracker::m_quote_char)
4645         (completion_tracker::m_use_custom_word_point)
4646         (completion_tracker::m_custom_word_point): New fields.
4647         (advance_to_expression_complete_word_point): Declare.
4648         * f-lang.c (f_collect_symbol_completion_matches): Add
4649         complete_symbol_mode parameter.
4650         * language.h (struct language_defn)
4651         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4652         parameter.
4653         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
4654         (linespec_complete_function): New function.
4655         (linespec_lexer_lex_keyword): Adjust.
4656         * linespec.h (linespec_keywords, linespec_complete_function): New
4657         declarations.
4658         * location.c (find_end_quote): New function.
4659         (explicit_location_lex_one): Add explicit_completion_info
4660         parameter.  Save quoting info.  Don't throw if being called for
4661         completion.  Don't handle Ada operators here.
4662         (is_cp_operator, skip_op_false_positives, first_of)
4663         (explicit_location_lex_one_function): New function.
4664         (string_to_explicit_location): Replace 'dont_throw' parameter with
4665         an explicit_completion_info pointer parameter.  Handle it.  Don't
4666         use explicit_location_lex_one to lex function names.  Use
4667         explicit_location_lex_one_function instead.
4668         * location.h (struct explicit_completion_info): New.
4669         (string_to_explicit_location): Replace 'dont_throw' parameter with
4670         an explicit_completion_info pointer parameter.
4671         * symtab.c (default_collect_symbol_completion_matches_break_on):
4672         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
4673         (default_collect_symbol_completion_matches)
4674         (collect_symbol_completion_matches): Add complete_symbol_mode
4675         parameter.
4676         (collect_symbol_completion_matches_type): Pass down
4677         complete_symbol_mode::EXPRESSION.
4678         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4679         parameter.  Handle LINESPEC mode.
4680         * symtab.h (complete_symbol_mode): New.
4681         (default_collect_symbol_completion_matches_break_on)
4682         (default_collect_symbol_completion_matches)
4683         (collect_symbol_completion_matches)
4684         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4685         parameter.
4686
4687 2017-07-17  Pedro Alves  <palves@redhat.com>
4688
4689         * utils.c (enum class strncmp_iw_mode): New.
4690         (strcmp_iw): Rename to ...
4691         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
4692         parameters.  Handle them.
4693         (strncmp_iw): New.
4694         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4695         * utils.h (strncmp_iw): Declare.
4696         (strcmp_iw): Move describing comments here.
4697
4698 2017-07-17  Pedro Alves  <palves@redhat.com>
4699
4700         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4701         CP_OPERATOR_STR.
4702         * c-typeprint.c (is_type_conversion_operator): Use
4703         CP_OPERATOR_STR.
4704         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4705         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4706         CP_OPERATOR_LEN.
4707         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4708         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4709         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4710         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4711         CP_OPERATOR_STR.
4712         * location.c: Include "cp-support.h".
4713         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4714         CP_OPERATOR_STR.
4715         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4716         CP_OPERATOR_LEN.
4717
4718 2017-07-17  Pedro Alves  <palves@redhat.com>
4719
4720         * cli/cli-cmds.c (complete_command): Use a completion tracker
4721         along with completion_find_completion_word for handle_brkchars
4722         phase.
4723         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4724         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4725         (struct gdb_rl_completion_word_info): New.
4726         (gdb_rl_find_completion_word): New.
4727         (completion_find_completion_word): New.
4728         * completer.h (completion_find_completion_word): Declare.
4729
4730 2017-07-17  Pedro Alves  <palves@redhat.com>
4731
4732         * ada-lang.c (symbol_completion_match): Adjust comments.
4733         (symbol_completion_add): Replace vector parameter with
4734         completion_tracker parameter.  Use it.
4735         (ada_make_symbol_completion_list): Rename to...
4736         (ada_collect_symbol_completion_matches): ... this.  Add
4737         completion_tracker parameter and use it.
4738         (ada_language_defn): Adjust.
4739         * break-catch-syscall.c (catch_syscall_completer): Adjust
4740         prototype and work with completion_tracker instead of VEC.
4741         * breakpoint.c (condition_completer): Adjust prototype and work
4742         with completion_tracker instead of VEC.
4743         * c-lang.c (c_language_defn, cplus_language_defn)
4744         (asm_language_defn, minimal_language_defn): Adjust to renames.
4745         * cli/cli-cmds.c (complete_command): Rework using
4746         completion_tracker.  Catch exceptions when completing.
4747         * cli/cli-decode.c (integer_unlimited_completer)
4748         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4749         with completion_tracker instead of VEC.
4750         * command.h (struct completion_tracker): Forward declare.
4751         (completer_ftype, completer_handle_brkchars_ftype): Change
4752         types.
4753         (complete_on_cmdlist, complete_on_enum): Adjust.
4754         * completer.c: Include <algorithm>.
4755         (struct gdb_completer_state): New.
4756         (current_completion): New global.
4757         (readline_line_completion_function): Delete.
4758         (noop_completer, filename_completer)
4759         (filename_completer_handle_brkchars, complete_files_symbols)
4760         (linespec_location_completer): Adjust to work with a
4761         completion_tracker instead of a VEC.
4762         (string_or_empty): New.
4763         (collect_explicit_location_matches): Adjust to work with a
4764         completion_tracker instead of a VEC.
4765         (explicit_location_completer): Rename to ...
4766         (complete_explicit_location): ... this and adjust to work with a
4767         completion_tracker instead of a VEC.
4768         (location_completer): Adjust to work with a completion_tracker
4769         instead of a VEC.
4770         (add_struct_fields): Adjust to work with a completion_list instead
4771         of VEC.
4772         (expression_completer): Rename to ...
4773         (complete_expression): ... this and adjust to work with a
4774         completion_tracker instead of a VEC.  Use complete_files_symbols.
4775         (expression_completer): Reimplement on top of complete_expression.
4776         (symbol_completer): Adjust to work with a completion_tracker
4777         instead of a VEC.
4778         (enum complete_line_internal_reason): Add describing comments.
4779         (complete_line_internal_normal_command): Adjust to work with a
4780         completion_tracker instead of a VEC.
4781         (complete_line_internal): Rename to ...
4782         (complete_line_internal_1): ... this and adjust to work with a
4783         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4784         handle_brkchars phase.
4785         (new_completion_tracker): Delete.
4786         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4787         complete_line_internal_1.
4788         (free_completion_tracker): Delete.
4789         (INITIAL_COMPLETION_HTAB_SIZE): New.
4790         (completion_tracker::completion_tracker)
4791         (completion_tracker::~completion_tracker): New.
4792         (maybe_add_completion): Delete.
4793         (completion_tracker::maybe_add_completion)
4794         (completion_tracker::add_completion)
4795         (completion_tracker::add_completions): New.
4796         (throw_max_completions_reached_error): Delete.
4797         (complete_line): Adjust to work with a completion_tracker instead
4798         of a VEC.  Don't create a completion_tracker_t or check for max
4799         completions here.
4800         (command_completer, command_completer_handle_brkchars)
4801         (signal_completer, reg_or_group_completer_1)
4802         (reg_or_group_completer, default_completer_handle_brkchars):
4803         Adjust to work with a completion_tracker.
4804         (gdb_completion_word_break_characters_throw): New.
4805         (gdb_completion_word_break_characters): Reimplement.
4806         (line_completion_function): Delete.
4807         (completion_tracker::recompute_lowest_common_denominator)
4808         (expand_preserving_ws)
4809         (completion_tracker::build_completion_result)
4810         (completion_result::completion_result)
4811         (completion_result::completion_result)
4812         (completion_result::~completion_result)
4813         (completion_result::completion_result)
4814         (completion_result::release_match_list, compare_cstrings)
4815         (completion_result::sort_match_list)
4816         (completion_result::reset_match_list)
4817         (gdb_rl_attempted_completion_function_throw)
4818         (gdb_rl_attempted_completion_function): New.
4819         * completer.h (completion_list, struct completion_result)
4820         (class completion_tracker): New.
4821         (complete_line): Add completion_tracker parameter.
4822         (readline_line_completion_function): Delete.
4823         (gdb_rl_attempted_completion_function): New.
4824         (noop_completer, filename_completer, expression_completer)
4825         (location_completer, symbol_completer, command_completer)
4826         (signal_completer, reg_or_group_completer): Update prototypes.
4827         (completion_tracker_t, new_completion_tracker)
4828         (make_cleanup_free_completion_tracker): Delete.
4829         (enum maybe_add_completion_enum): Delete.
4830         (maybe_add_completion): Delete.
4831         (throw_max_completions_reached_error): Delete.
4832         * corefile.c (complete_set_gnutarget): Adjust to work with a
4833         completion_tracker instead of a VEC.
4834         * cp-abi.c (cp_abi_completer): Adjust to work with a
4835         completion_tracker instead of a VEC.
4836         * d-lang.c (d_language_defn): Adjust.
4837         * disasm.c (disassembler_options_completer): Adjust to work with a
4838         completion_tracker instead of a VEC.
4839         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4840         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4841         with a completion_tracker instead of a VEC.
4842         (f_language_defn): Adjust.
4843         * go-lang.c (go_language_defn): Adjust.
4844         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4845         Adjust to work with a completion_tracker instead of a VEC.
4846         * infrun.c (handle_completer): Likewise.
4847         * interps.c (interpreter_completer): Likewise.
4848         * interps.h (interpreter_completer): Likewise.
4849         * language.c (unknown_language_defn, auto_language_defn)
4850         (local_language_defn): Adjust.
4851         * language.h (language_defn::la_make_symbol_completion_list):
4852         Rename to ...
4853         (language_defn::la_collect_symbol_completion_matches): ... this
4854         and adjust to work with a completion_tracker instead of a VEC.
4855         * m2-lang.c (m2_language_defn): Adjust.
4856         * objc-lang.c (objc_language_defn): Adjust.
4857         * opencl-lang.c (opencl_language_defn): Adjust.
4858         * p-lang.c (pascal_language_defn): Adjust.
4859         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4860         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4861         with a completion_tracker.
4862         * rust-lang.c (rust_language_defn): Adjust.
4863         * symtab.c (free_completion_list, do_free_completion_list)
4864         (return_val, completion_tracker): Delete.
4865         (completion_list_add_name, completion_list_add_symbol)
4866         (completion_list_add_msymbol, completion_list_objc_symbol)
4867         (completion_list_add_fields, add_symtab_completions): Add
4868         completion_tracker parameter and use it.
4869         (default_make_symbol_completion_list_break_on_1): Rename to...
4870         (default_collect_symbol_completion_matches_break_on): ... this.
4871         Add completion_tracker parameter and use it instead of allocating
4872         a completion tracker here.
4873         (default_make_symbol_completion_list_break_on): Delete old
4874         implementation.
4875         (default_make_symbol_completion_list): Delete.
4876         (default_collect_symbol_completion_matches): New.
4877         (make_symbol_completion_list): Delete.
4878         (collect_symbol_completion_matches): New.
4879         (make_symbol_completion_type): Rename to ...
4880         (collect_symbol_completion_matches_type): ... this.  Add
4881         completion_tracker parameter and use it instead of VEC.
4882         (make_file_symbol_completion_list_1): Rename to...
4883         (collect_file_symbol_completion_matches): ... this.  Add
4884         completion_tracker parameter and use it instead of VEC.
4885         (make_file_symbol_completion_list): Delete.
4886         (add_filename_to_list): Use completion_list instead of a VEC.
4887         (add_partial_filename_data::list): Now a completion_list.
4888         (make_source_files_completion_list): Work with a completion_list
4889         instead of a VEC.
4890         * symtab.h: Include "completer.h".
4891         (default_make_symbol_completion_list_break_on)
4892         (default_make_symbol_completion_list, make_symbol_completion_list)
4893         (make_symbol_completion_type, make_file_symbol_completion_list)
4894         (make_source_files_completion_list): Delete.
4895         (default_collect_symbol_completion_matches_break_on)
4896         (default_collect_symbol_completion_matches)
4897         (collect_symbol_completion_matches)
4898         (collect_symbol_completion_matches_type)
4899         (collect_file_symbol_completion_matches)
4900         (make_source_files_completion_list): New.
4901         * top.c (init_main): Don't install a rl_completion_entry_function
4902         hook.  Install a rl_attempted_completion_function hook instead.
4903         * tui/tui-layout.c (layout_completer): Adjust to work with a
4904         completion_tracker.
4905         * tui/tui-regs.c (tui_reggroup_completer):
4906         * tui/tui-win.c (window_name_completer, focus_completer)
4907         (winheight_completer): Adjust to work with a completion_tracker.
4908         * value.c: Include "completer.h".
4909         (complete_internalvar): Adjust to work with a completion_tracker.
4910         * value.h (complete_internalvar): Likewise.
4911
4912 2017-07-17  Pedro Alves  <palves@redhat.com>
4913
4914         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4915         renames.
4916         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4917         comments to completer_ftype's declaration.
4918         <completer_handle_brkchars>: Change type to
4919         completer_handle_brkchars_ftype.
4920         * command.h (completer_ftype): Add describing comment and give
4921         names to parameters.
4922         (completer_ftype_void): Rename to ...
4923         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4924         (set_cmd_completer_handle_brkchars): Adjust.
4925         * completer.c (filename_completer_handle_brkchars): New function.
4926         (complete_line_internal_normal_command): New function, factored
4927         out from ...
4928         (complete_line_internal): ... here.
4929         (command_completer_handle_brkchars)
4930         (default_completer_handle_brkchars)
4931         (completer_handle_brkchars_func_for_completer): New functions.
4932         * completer.h (set_gdb_completion_word_break_characters): Delete
4933         declaration.
4934         (completer_handle_brkchars_func_for_completer): New declaration.
4935         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4936         completer_handle_brkchars_func_for_completer.
4937
4938 2017-07-17  Pedro Alves  <palves@redhat.com>
4939
4940         * completer.c (symbol_completer): New function, based on
4941         make_symbol_completion_list_fn.
4942         * completer.h (symbol_completer): New declaration.
4943         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4944         * python/py-cmd.c (completers): Adjust.
4945         * symtab.c (make_symbol_completion_list_fn): Delete.
4946         * symtab.h (make_symbol_completion_list_fn): Delete.
4947         * cli/cli-decode.c (add_cmd): Adjust.
4948
4949 2017-07-17  Pedro Alves  <palves@redhat.com>
4950
4951         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4952         * dwarf2read.c: Include "filename-seen-cache.h".
4953         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4954         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4955         * filename-seen-cache.c: New file.
4956         * filename-seen-cache.h: New file.
4957         * symtab.c: Include "filename-seen-cache.h".
4958         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4959         (create_filename_seen_cache, clear_filename_seen_cache)
4960         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4961         to filename-seen-cache.h/filename-seen-cache.c.
4962         (output_source_filename, sources_info)
4963         (maybe_add_partial_symtab_filename)
4964         (make_source_files_completion_list): Adjust to use
4965         filename_seen_cache.
4966
4967 2017-07-17  Pedro Alves  <palves@redhat.com>
4968
4969         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4970         fields.
4971         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4972         dwarf2_debug_sections*)): New.
4973         (dwarf2_per_objfile::dwarf2_per_objfile(const
4974         dwarf2_per_objfile&)): Declare as deleted.
4975         (dwarf2_per_objfile::operator=): Declare as deleted.
4976         (dwarf2_per_objfile::dwarf2_per_objfile)
4977         (dwarf2_per_objfile::~dwarf2_per_objfile)
4978         (dwarf2_per_objfile::free_cached_comp_units): New.
4979         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4980         ctor.  Call dwarf2_per_objfile's ctor manually.
4981         (dwarf2_locate_sections): Deleted/refactored as ...
4982         (dwarf2_per_objfile::locate_sections): ... this new method.
4983         (free_cached_comp_units): Defer to
4984         dwarf2_per_objfile::free_cached_comp_units.
4985         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4986
4987 2017-07-14  Tom Tromey  <tom@tromey.com>
4988
4989         PR rust/21764:
4990         * rust-exp.y (convert_ast_to_expression): Add "want_type"
4991         parameter.
4992         <UNOP_SIZEOF>: Split into separate case.
4993         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
4994
4995 2017-07-14  Tom Tromey  <tom@tromey.com>
4996
4997         PR rust/21763:
4998         * symtab.c (symbol_matches_domain): Add language_rust to special
4999         case.
5000         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5001         treat LOC_TYPEDEF symbols as variables.
5002
5003 2017-07-14  Pedro Alves  <palves@redhat.com>
5004
5005         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5006         symtabs matching all symtabs with SRCFILE as file name instead of
5007         only considering the first hit, with lookup_symtab.
5008
5009 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5010
5011         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5012         operator_name parameters.
5013         (gen_expr): Update function call.
5014
5015 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5016
5017         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5018         parameter.
5019         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5020         Likewise.
5021         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5022         parameter, use agent_expr::gdbarch instead, update function
5023         calls.
5024         (locexpr_tracepoint_var_ref): Likewise.
5025         (loclist_tracepoint_var_ref): Likewise.
5026         * ax-gdb.c (gen_trace_static_fields): Likewise.
5027         (gen_traced_pop): Likewise.
5028         (gen_frame_args_address): Likewise.
5029         (gen_frame_locals_address): Likewise.
5030         (gen_var_ref): Likewise.
5031         (gen_struct_ref_recursive): Likewise.
5032         (gen_static_field): Likewise.
5033         (gen_maybe_namespace_elt): Likewise.
5034         (gen_expr): Likewise.
5035         (gen_trace_for_var): Likewise.
5036         (gen_trace_for_expr): Likewise.
5037         (gen_trace_for_return_address): Likewise.
5038
5039 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5040
5041         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5042         parameter.
5043         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5044
5045 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5046
5047         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5048         from ax, update calls.
5049         (gen_usual_arithmetic): Likewise.
5050         (gen_integral_promotions): Likewise.
5051         (gen_bitfield_ref): Likewise.
5052         (gen_primitive_field): Likewise.
5053         (gen_struct_ref_recursive): Likewise.
5054         (gen_struct_ref): Likewise.
5055         (gen_maybe_namespace_elt): Likewise.
5056         (gen_struct_elt_for_reference): Likewise.
5057         (gen_namespace_elt): Likewise.
5058         (gen_aggregate_elt_ref): Likewise.
5059         (gen_expr): Get gdbarch from ax, update calls.
5060         (gen_expr_binop_rest): Likewise.
5061
5062 2017-07-13  Pedro Alves  <palves@redhat.com>
5063
5064         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5065         as default tdesc.
5066         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5067         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5068         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5069         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5070         tdep.
5071         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5072         Get final tdesc from the tdep.
5073         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5074         default tdesc.
5075         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5076         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5077         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5078         Use it as default tdesc.
5079         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5080         down to amd_init_abi.  No longer handle fallback tdesc here.
5081         * amd64-tdep.h (tdesc_x32): Declare.
5082         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5083         parameter.
5084         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5085         as default tdesc.
5086
5087 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5088
5089         * s390-linux-tdep.c (s390_process_record): Add support for
5090         instructions new in arch12.
5091
5092 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5093
5094         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5095         PT_GETFSBASE and PT_GETGSBASE.
5096         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5097         PT_SETGSBASE.
5098
5099 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5100
5101         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5102         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5103         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5104         those rules.
5105         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5106         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5107         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5108         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5109         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5110         * features/i386/amd64.xml: Add 64bit-segments.xml.
5111         * features/i386/amd64-avx-avx512.c: Regenerated.
5112         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5113         * features/i386/amd64-avx-mpx.c: Regenerated.
5114         * features/i386/amd64-avx.c: Regenerated.
5115         * features/i386/amd64-mpx.c: Regenerated.
5116         * features/i386/amd64.c: Regenerated.
5117         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5118         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5119         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5120         * regformats/i386/amd64-avx.dat: Regenerated.
5121         * regformats/i386/amd64-mpx.dat: Regenerated.
5122         * regformats/i386/amd64.dat: Regenerated.
5123
5124 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5125
5126         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5127         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5128
5129 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5130
5131         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5132         unsetenv.
5133         * gnulib/aclocal.m4: Regenerate.
5134         * gnulib/config.in: Regenerate.
5135         * gnulib/configure: Regenerate.
5136         * gnulib/import/Makefile.am: Regenerate.
5137         * gnulib/import/Makefile.in: Regenerate.
5138         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5139         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5140         * gnulib/import/m4/environ.m4: New file.
5141         * gnulib/import/m4/setenv.m4: New file.
5142         * gnulib/import/setenv.c: New file.
5143         * gnulib/import/unsetenv.c: New file.
5144
5145 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5146
5147         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5148         address when op is DW_OP_addr.
5149
5150 2017-07-09  Tom Tromey  <tom@tromey.com>
5151
5152         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5153         check and apply to outer type.
5154
5155 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5156
5157         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5158         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5159         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5160         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5161
5162 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5163
5164         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5165
5166 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5167
5168         * corelow.c (get_core_siginfo): Remove.
5169         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5170         instead of get_core_siginfo.
5171         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5172         * gdbarch.h: Re-generate.
5173         * gdbarch.c: Re-generate.
5174         * linux-tdep.c (linux_core_xfer_siginfo): New.
5175         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5176
5177 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5178
5179         * corelow.c (thread_section_name): Move to ...
5180         * gdbcore.h (thread_section_name): ... here.
5181
5182 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5183
5184         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5185         (struct siginfo32): New.
5186         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5187         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5188         via ptrace(PT_LWPINFO).
5189
5190 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5191
5192         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5193         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5194         (fbsd_get_siginfo_type): New.
5195         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5196         (_initialize_fbsd_tdep): New.
5197
5198 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5199
5200         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5201         a singular dwo_unit*) to support multiple CUs in the same way that
5202         multiple TUs are supported.
5203         (create_cus_hash_table): Replace create_dwo_cu with a function for
5204         parsing multiple CUs from a DWO file.
5205         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5206         create_dwo_cu.
5207         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5208         htab_find, rather than comparing the signature to a singleton CU in
5209         the dwo_file.
5210
5211 2017-07-06  Pedro Alves  <palves@redhat.com>
5212
5213         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5214
5215 2017-07-04  Pedro Alves  <palves@redhat.com>
5216
5217         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5218         * gdbtypes.h (TYPE_STATIC): Delete.
5219         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5220         is_synchronized, is_native>: Delete.
5221         <dummy>: Bump.
5222         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5223         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5224         (TYPE_FN_FIELD_ABSTRACT): Delete.
5225
5226 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5227
5228         * buffer.h (buffer_finish): Fix spelling mistakes.
5229
5230 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5231
5232         * .dir-locals.el: Automatically switch to C-style comments in
5233         versions of Emacs that support the feature.
5234
5235 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5236             Pedro Alves  <palves@redhat.com>
5237
5238         PR cli/21688
5239         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5240         (process_next_line): New variable 'inline_cmd'.
5241         Adjust 'if' clauses for "python", "compile" and "guile" to use
5242         'command_name_equals' and check for '!inline_cmd'.
5243
5244 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5245
5246         PR cli/21688
5247         * cli/cli-script.c (command_name_equals_not_inline): New function.
5248         (process_next_line): Adjust 'if' clauses for "python", "compile"
5249         and "guile" to use command_name_equals_not_inline.
5250
5251 2017-06-29  Pedro Alves  <palves@redhat.com>
5252
5253         * completer.c (expression_completer): Call
5254         linespec_location_completer instead of location_completer.
5255
5256 2017-06-29  Pedro Alves  <palves@redhat.com>
5257
5258         * completer.c (expression_completer): Remove code that recomputes
5259         'text' from 'word'.
5260
5261 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5262
5263         * regformats/regdat.sh: Generate code with
5264         "ifndef IN_PROCESS_AGENT".
5265
5266 2017-06-28  Pedro Alves  <palves@redhat.com>
5267
5268         * command.h: Include "common/scoped_restore.h".
5269
5270 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5271
5272         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5273         instead of obstack_grow.
5274
5275 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5276
5277         PR gdb/21337
5278         * symfile.c (reread_symbols): Call objfiles_changed just before
5279         read_symbols.
5280
5281 2017-06-27  Pedro Alves  <palves@redhat.com>
5282
5283         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5284         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5285         (completion_list_add_symbol, completion_list_add_msymbol):
5286         ... these new functions.
5287         (add_symtab_completions)
5288         (default_make_symbol_completion_list_break_on_1): Adjust.
5289
5290 2017-06-27  Pedro Alves  <palves@redhat.com>
5291
5292         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5293         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5294         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5295         dtor.
5296         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5297         'storage_obstack' field an auto_obstack.  In-class initialize all
5298         non-bitfield fields.  Make minsyms_read bool.
5299         * symfile.c (read_symbols): Adjust.
5300
5301 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5302
5303         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5304         (gdbsim_store_register): Likewise.
5305
5306 2017-06-27  Pedro Alves  <palves@redhat.com>
5307
5308         * c-exp.y (name_obstack): Now an auto_obstack.
5309         (yylex): Use auto_obstack::clear.
5310         (c_parse): Use auto_obstack::clear instead of reinitializing and
5311         freeing the obstack.
5312         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5313         * d-exp.y (name_obstack): Now an auto_obstack.
5314         (yylex): Use auto_obstack::clear.
5315         (d_parse): Use auto_obstack::clear instead of reinitializing and
5316         freeing the obstack.
5317         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5318         auto_obstack.
5319         * dwarf2read.c (create_addrmap_from_index)
5320         (dwarf2_build_psymtabs_hard)
5321         (update_enumeration_type_from_children): Likewise.
5322         * gdb_obstack.h (auto_obstack): New type.
5323         * go-exp.y (name_obstack): Now an auto_obstack.
5324         (build_packaged_name): Use auto_obstack::clear.
5325         (go_parse): Use auto_obstack::clear instead of reinitializing and
5326         freeing the obstack.
5327         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5328         auto_obstack.
5329         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5330         * rust-exp.y (work_obstack): Now an auto_obstack.
5331         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5332         reinitializing and freeing the obstack.
5333         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5334         (host_char_to_target): Use auto_obstack.
5335         * utils.h (make_cleanup_obstack_free): Delete declaration.
5336         * valprint.c (generic_emit_char, generic_printstr): Use
5337         auto_obstack.
5338
5339 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5340
5341         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5342         thread.
5343         (darwin_init_thread_list): Don't update dummy thread.
5344         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5345
5346 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5347
5348         * record-full.c (netorder16): Remove.
5349
5350 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5351
5352         * common/diagnostics.h: Define macros for GCC.
5353         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5354         * common/vec.h: Include diagnostics.h.
5355         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5356         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5357         warning.
5358
5359 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5360
5361         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5362         New macro.
5363         * ada-lex.l: Ignore deprecated register warnings.
5364
5365 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5366
5367         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5368         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5369
5370 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5371
5372         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5373         its own line.
5374
5375 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5376
5377         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5378
5379 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5380
5381         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5382         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5383         (xtensa_register_read_masked): Likewise.
5384
5385 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5386
5387         * common/environ.c (gdb_environ::unset): Update comment.
5388
5389 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5390
5391         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5392         registers.
5393
5394 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5395
5396         * record-full.c (record_full_exec_insn): Use byte_vector.
5397
5398 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5399
5400         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5401         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5402
5403 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5404
5405         * remote.c (cached_reg): Move from here...
5406         * regcache.h (cached_reg): ...to here.
5407         * python/py-unwind.c (struct reg_info): Remove.
5408         (cached_frame_info): Use cached_reg_t.
5409         (pyuw_prev_register): Likewise.
5410         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5411         (pyuw_dealloc_cache): Free all registers.
5412
5413 2017-06-22  Pedro Alves  <palves@redhat.com>
5414             Simon Marchi  <simon.marchi@ericsson.com>
5415
5416         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5417         warning.
5418         * common/diagnostics.h: New file.
5419
5420 2017-06-22  Pedro Alves  <palves@redhat.com>
5421
5422         * common/agent.h: Add include guards.
5423
5424 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5425
5426         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5427         talk about addressable units instead of bytes.
5428
5429 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5430
5431         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5432         of '::const_iterator'.
5433
5434 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5435
5436         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5437         'unittests/environ-selftests.c'.
5438         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5439         * charset.c (find_charset_names): Declare object 'iconv_env'.
5440         Update code to use 'iconv_env' object.  Remove call to
5441         'free_environ'.
5442         * common/environ.c: Include <utility>.
5443         (make_environ): Delete function.
5444         (free_environ): Delete function.
5445         (gdb_environ::clear): New function.
5446         (gdb_environ::operator=): New function.
5447         (gdb_environ::get): Likewise.
5448         (environ_vector): Delete function.
5449         (set_in_environ): Delete function.
5450         (gdb_environ::set): New function.
5451         (unset_in_environ): Delete function.
5452         (gdb_environ::unset): New function.
5453         (gdb_environ::envp): Likewise.
5454         * common/environ.h: Include <vector>.
5455         (struct gdb_environ): Delete; transform into...
5456         (class gdb_environ): ... this class.
5457         (free_environ): Delete prototype.
5458         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5459         environ_vector): Likewise.
5460         * infcmd.c (run_command_1): Update code to call
5461         'envp' from 'gdb_environ' class.
5462         (environment_info): Update code to call methods from 'gdb_environ'
5463         class.
5464         (unset_environment_command): Likewise.
5465         (path_info): Likewise.
5466         (path_command): Likewise.
5467         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5468         (inferior::inferior): Initialize 'environment' using the host's
5469         information.
5470         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5471         Include "environ.h".
5472         (class inferior) <environment>: Change type from 'struct
5473         gdb_environ' to 'gdb_environ'.
5474         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5475         methods from 'gdb_environ' class.
5476         * solib.c (solib_find_1): Likewise
5477         * unittests/environ-selftests.c: New file.
5478
5479 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5480
5481         * features/i386/i386-linux.xml: Exchange the order of including
5482         32bit-linux.xml and 32bit-sse.xml.
5483         * features/i386/i386-linux.c: Regenerated.
5484
5485 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5486
5487         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5488         Delete copy ctor and assignment operator.
5489         (tdesc_type): Likewise.
5490         (tdesc_feature): Likewise.
5491         (tdesc_free_reg): Remove.
5492         (tdesc_create_reg): Use new.
5493         (tdesc_free_type): Remove.
5494         (tdesc_create_vector): Use new.
5495         (tdesc_create_union): Likewise.
5496         (tdesc_create_flags): Likewise.
5497         (tdesc_create_enum): Likewise.
5498         (tdesc_free_feature): Delete.
5499         (free_target_description): Use delete.
5500
5501 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5502
5503         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5504         registers.
5505
5506 2017-06-19  Pedro Alves  <palves@redhat.com>
5507
5508         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5509         after gdb::unlinker.
5510
5511 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5512
5513         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5514         gdb_environ to access an environment variable.
5515
5516 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5517
5518         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5519         gdb_byte*.
5520
5521 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5522
5523         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5524
5525 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5526
5527         * configure: Re-generate.
5528         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5529
5530 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5531
5532         * configure: Re-generate.
5533         * warning.m4: Pass -Werror to compiler when checking for
5534         supported warning flags.
5535
5536 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5537
5538         * Makefile.in (COMPILE.pre): Add "-x c++".
5539
5540 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5541             Pedro Alves  <palves@redhat.com>
5542             Yao Qi  <yao.qi@linaro.org>
5543
5544         * defs.h (RequireLongest): New.
5545         (extract_integer): Declare function template.
5546         (extract_signed_integer): Remove the declaration, but define it
5547         static inline.
5548         (extract_unsigned_integer): Likewise.
5549         (store_integer): Declare function template.
5550         (store_signed_integer): Remove the declaration, but define it
5551         static inline.
5552         (store_unsigned_integer): Likewise.
5553         * findvar.c (extract_integer): New function template.
5554         (extract_signed_integer): Remove.
5555         (extract_unsigned_integer): Remove.
5556         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5557         instantiations.
5558         (store_integer): New function template.
5559         (store_signed_integer): Remove.
5560         (store_unsigned_integer): Remove.
5561         (store_integer): Explicit instantiations.
5562         * regcache.c (regcache_raw_read_signed): Update.
5563         (regcache::raw_read): New function.
5564         (regcache::raw_read_signed): Remove.
5565         (regcache::raw_read_unsigned): Remove.
5566         (regcache_raw_read_unsigned): Update.
5567         (regcache_raw_write_unsigned): Update.
5568         (regcache::raw_write_signed): Remove.
5569         (regcache::raw_write): New function.
5570         (regcache_cooked_read_signed): Update.
5571         (regcache::raw_write_unsigned): Remove.
5572         (regcache::cooked_read_signed): Remove.
5573         (regcache_cooked_read_unsigned): Update.
5574         (regcache::cooked_read_unsigned): Remove.
5575         (regcache_cooked_write_signed): Update.
5576         (regcache_cooked_write_unsigned): Update.
5577         * regcache.h (regcache) <raw_read_signed>: Remove.
5578         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5579         <raw_read, raw_write>: New.
5580         <cooked_read_signed, cooked_write_signed>: Remove.
5581         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5582         <cooked_read, cooked_write>: New.
5583         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5584         (sh64_pseudo_register_write): Update.
5585
5586 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5587
5588         * arc-tdep.c (arc_disassembler_options): New variable.
5589         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5590         of default_print_insn.
5591         (arc_delayed_print_insn): Set info->section when needed,
5592         use default_print_insn to retrieve a disassembler.
5593
5594 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5595
5596         PR gdb/21574
5597         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5598         to mention $SHELL and startup-with-shell.
5599
5600 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5601
5602         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5603
5604 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5605
5606         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5607         default_print_insn instead of print_insn_aarch64.
5608         * arm-tdep.c (gdb_print_insn_arm): Call
5609         default_print_insn instead of print_insn_big_arm
5610         and print_insn_little_arm.
5611         * i386-tdep.c (i386_print_insn): Call default_print_insn
5612         instead of print_insn_i386.
5613         * ia64-tdep.c (ia64_print_insn): Call
5614         default_print_insn instead of print_insn_ia64.
5615         * mips-tdep.c (gdb_print_insn_mips): Call
5616         default_print_insn instead of print_insn_big_mips
5617         and print_insn_little_mips.
5618         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5619         instead of print_insn_spu.
5620
5621 2017-06-14  Pedro Alves  <palves@redhat.com>
5622
5623         * ada-lang.c: Include "common/byte-vector.h".
5624         (ada_value_primitive_packed_val): Use gdb::byte_vector.
5625         * charset.c (wchar_iterator::iterate): Resize the vector instead
5626         of reserving it.
5627         * common/byte-vector.h: Include "common/def-vector.h".
5628         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5629         * cli/cli-dump.c: Include "common/byte-vector.h".
5630         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5631         * common/byte-vector.h: New file.
5632         * common/def-vector.h: New file.
5633         * common/default-init-alloc.h: New file.
5634         * dwarf2loc.c: Include "common/byte-vector.h".
5635         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5636         instead of reserving it.
5637         * dwarf2read.c: Include "common/byte-vector.h".
5638         (data_buf::m_vec): Now a gdb::byte_vector.
5639         * gdb_regex.c: Include "common/def-vector.h".
5640         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5641         * mi/mi-main.c: Include "common/byte-vector.h".
5642         (mi_cmd_data_read_memory): Use gdb::byte_vector.
5643         * printcmd.c: Include "common/byte-vector.h".
5644         (print_scalar_formatted): Use gdb::byte_vector.
5645         * valprint.c: Include "common/byte-vector.h".
5646         (maybe_negate_by_bytes, print_decimal_chars): Use
5647         gdb::byte_vector.
5648
5649 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5650
5651         * darwin-nat.c: Include "nat/fork-inferior.h".
5652
5653 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5654
5655         * configure.nat: Factor out Darwin bits that are not
5656         architecture-specific.  Add fork-inferior.o.
5657
5658 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5659
5660         * configure.nat: Factor out AIX bits that are not
5661         architecture-specific.  Add fork-inferior.o.
5662
5663 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5664
5665         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
5666         (read_pieced_value, write_pieced_value): ...here.  Reduce to
5667         wrappers that just call rw_pieced_value.
5668
5669 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5670
5671         * dwarf2loc.c (write_pieced_value): When writing the data for a
5672         memory piece, use write_memory_with_notification instead of
5673         write_memory.
5674
5675 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5676
5677         * valops.c (read_value_memory): Change embedded_offset to
5678         represent a bit offset instead of a byte offset.
5679         * value.h (read_value_memory): Adjust comment.
5680
5681 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5682
5683         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5684         dest_offset_bits and source_offset_bits.
5685         (write_pieced_value): Likewise.
5686
5687 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5688
5689         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5690         given by DW_OP_bit_piece.
5691         (write_pieced_value): Likewise.
5692
5693 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5694
5695         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5696         some other preparations to the places where sufficient information
5697         is available.
5698         (write_pieced_value): Likewise.
5699
5700 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5701
5702         * dwarf2loc.c (bits_to_bytes): New function.
5703         (read_pieced_value): Fix offset calculations for register pieces
5704         on big-endian targets.
5705         (write_pieced_value): Likewise.
5706
5707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5708
5709         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5710         (write_pieced_value): Likewise.
5711
5712 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5713
5714         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5715         transfer the source value's least significant bits, instead of its
5716         lowest-addressed ones.  Rename type_len to max_offset.
5717         (read_pieced_value): Mirror above changes to write_pieced_value as
5718         applicable.
5719
5720 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5721
5722         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5723         truncate full bytes from dest_offset_bits before using it as an
5724         offset into the buffer.
5725
5726 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5727
5728         * dwarf2loc.c (write_pieced_value): Include transfer size in
5729         byte-wise check.
5730
5731 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5732
5733         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5734         calculation of this_size.
5735
5736 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5737
5738         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5739         when targeting a bit-field.
5740         (write_pieced_value): Likewise.
5741
5742 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5743
5744         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5745         (allocate_piece_closure): Drop addr_size parameter.
5746         (dwarf2_evaluate_loc_desc_full): Adjust call to
5747         allocate_piece_closure.
5748
5749 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5750
5751         PR gdb/21226
5752         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5753         the LSB end, independent of endianness.
5754
5755 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5756
5757         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5758         size capping.
5759
5760 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5761
5762         * mips-linux-nat.c: Move include features/mips*-linux.c to
5763         mips-linux-tdep.c.
5764         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5765         to mips-linux-tdep.c.
5766         * mips-linux-tdep.c: Include features/mips*-linux.c
5767         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5768         functions.
5769         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5770         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5771         (tdesc_mips64_dsp_linux): Declare.
5772
5773 2017-06-12  Tom Tromey  <tom@tromey.com>
5774
5775         * valprint.h (val_print_type_code_int): Remove.
5776         * valprint.c (generic_val_print_int): Always call
5777         val_print_scalar_formatted.
5778         (val_print_type_code_int): Remove.
5779         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5780         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5781         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5782         * ada-valprint.c (ada_val_print_num): Use
5783         val_print_scalar_formatted.
5784
5785 2017-06-12  Tom Tromey  <tom@tromey.com>
5786
5787         * printcmd.c (print_scalar_formatted): Unify the two switches.
5788         Don't convert scalars to LONGEST.
5789
5790 2017-06-12  Tom Tromey  <tom@tromey.com>
5791
5792         PR exp/16225:
5793         * valprint.h (print_decimal_chars): Update.
5794         * valprint.c (maybe_negate_by_bytes): New function.
5795         (print_decimal_chars): Add "is_signed" argument.
5796         * printcmd.c (print_scalar_formatted): Update.
5797
5798 2017-06-12  Tom Tromey  <tom@tromey.com>
5799
5800         PR exp/16225:
5801         * valprint.h (print_binary_chars, print_hex_chars): Update.
5802         * valprint.c (val_print_type_code_int): Update.
5803         (print_binary_chars): Add "zero_pad" argument.
5804         (emit_octal_digit): New function.
5805         (print_octal_chars): Don't zero-pad.
5806         (print_decimal_chars): Likewise.
5807         (print_hex_chars): Add "zero_pad" argument.
5808         * sh64-tdep.c (sh64_do_fp_register): Update.
5809         * regcache.c (regcache::dump): Update.
5810         * printcmd.c (print_scalar_formatted): Update.
5811         * infcmd.c (default_print_one_register_info): Update.
5812
5813 2017-06-12  Pedro Alves  <palves@redhat.com>
5814             Alan Hayward  <alan.hayward@arm.com>
5815
5816         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5817         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5818         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5819         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5820         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5821
5822 2017-06-12  Pedro Alves  <palves@redhat.com>
5823
5824         * dwarf2read.c (mapped_symtab::data): Now a vector of
5825         symtab_index_entry instead of vector of
5826         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5827         whether an element's name is NULL instead of checking whether the
5828         element itself is NULL.
5829         (find_slot): Change return type.  Adjust.
5830         (hash_expand, , add_index_entry, uniquify_cu_indices)
5831         (write_hash_table): Adjust.
5832
5833 2017-06-12  Pedro Alves  <palves@redhat.com>
5834
5835         * dwarf2read.c (recursively_count_psymbols): New function.
5836         (write_psymtabs_to_index): Call it to compute number of psyms and
5837         pass estimate size of psyms_seen to unordered_set's ctor.
5838
5839 2017-06-12  Pedro Alves  <palves@redhat.com>
5840
5841         * dwarf2read.c (write_hash_table): Check if key already exists
5842         before emplacing.
5843
5844 2017-06-12  Pedro Alves  <palves@redhat.com>
5845
5846         * dwarf2read.c (data_buf::append_space): Rename to...
5847         (data_buf::grow): ... this, and make private.  Adjust all callers.
5848         (data_buf::append_uint): New method.
5849         (add_address_entry, write_one_signatured_type)
5850         (write_psymtabs_to_index): Use it.
5851
5852 2017-06-12  Pedro Alves  <palves@redhat.com>
5853
5854         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5855         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5856         (data_buf::file_write): Call ::fwrite directly.
5857
5858 2017-06-12  Pedro Alves  <palves@redhat.com>
5859
5860         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5861         std::vector::erase.
5862
5863 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5864
5865         Code cleanup: C++ify .gdb_index producer.
5866         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5867         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5868         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5869         (create_strtab, add_string): Remove.
5870         (file_write, data_buf): New.
5871         (struct symtab_index_entry): Use std::vector for cu_indices.
5872         (struct mapped_symtab): Use std::vector for data.
5873         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5874         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5875         Remove.
5876         (find_slot): Change return type.  Update it to the new data structures.
5877         (hash_expand, add_index_entry): Update it to the new data structures.
5878         (offset_type_compare): Remove.
5879         (uniquify_cu_indices): Update it to the new data structures.
5880         (c_str_view, c_str_view_hasher, vector_hasher): New.
5881         (add_indices_to_cpool): Remove.
5882         (write_hash_table): Update it to the new data structures.
5883         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5884         (eq_psymtab_cu_index): Remove.
5885         (psym_index_map): New typedef.
5886         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5887         reference and std::unordered_map for cu_index_htab.
5888         (add_address_entry, add_address_entry_worker, write_address_map)
5889         (write_psymbols): Update it to the new data structures.
5890         (write_obstack): Remove.
5891         (struct signatured_type_index_data): Change types_list to a data_buf
5892         reference and psyms_seen to a std::unordered_set reference.
5893         (write_one_signatured_type, recursively_write_psymbols)
5894         (write_psymtabs_to_index): Update it to the new data structures.
5895
5896 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5899         separate-debug-file commands.
5900         * symfile.h (separate_debug_file_debug): New global.
5901         * symfile.c (separate_debug_file_debug): New global.
5902         (separate_debug_file_exists, find_separate_debug_file): Add
5903         debug output.
5904         (_initialize_symfile): Add "set debug separate-debug-file"
5905         command.
5906         * build-id.c (build_id_to_debug_bfd,
5907         find_separate_debug_file_by_buildid): Add debug output.
5908
5909 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5910
5911         * gdbarch.sh (displaced_step_free_closure): Remove.
5912         * gdbarch.h, gdbarch.c: Re-generate.
5913         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5914         displaced_step_free_closure.
5915         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5916         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5917         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5918         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5919         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5920         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5921         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5922         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5923         * infrun.c (displaced_step_clear): Call xfree instead of
5924         gdbarch_displaced_step_free_closure.
5925
5926 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5927
5928         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5929         NULL".
5930
5931 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5932
5933         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5934         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5935         (mn10300_push_dummy_call): Likewise.
5936
5937 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5938
5939         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5940
5941 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5942
5943         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5944
5945 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5946
5947         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5948         able to start inferiors using a shell.
5949         (New remote packets): Announce new packet "QStartupWithShell".
5950         * remote.c: Add PACKET_QStartupWithShell.
5951         (extended_remote_create_inferior): Handle new
5952         PACKET_QStartupWithShell.
5953         (remote_protocol_features) <QStartupWithShell>: New entry for
5954         PACKET_QStartupWithShell.
5955         (_initialize_remote): Call "add_packet_config_cmd" for
5956         QStartupShell.
5957
5958 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5959             Pedro Alves  <palves@redhat.com>
5960
5961         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5962         and "nat/fork-inferior.h".
5963         * common/common-inferior.h: New file, with contents from
5964         "gdb/inferior.h".
5965         * commom/common-utils.c: Include "common-utils.h".
5966         (stringify_argv): New function.
5967         * common/common-utils.h (stringify_argv): New prototype.
5968         * configure.nat: Add "fork-inferior.o" as a dependency for
5969         "*linux*", "fbsd*" and "nbsd*" hosts.
5970         * corefile.c (get_exec_file): Update comment.
5971         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5972         instead of "startup_inferior".
5973         (darwin_create_inferior): Call "add_thread_silent" after
5974         "fork_inferior".
5975         * fork-child.c: Cleanup unnecessary includes.
5976         (SHELL_FILE): Move to "common/common-fork-child.c".
5977         (environ): Likewise.
5978         (exec_wrapper): Initialize.
5979         (get_exec_wrapper): New function.
5980         (breakup_args): Move to "common/common-fork-child.c"; rename to
5981         "breakup_args_for_exec".
5982         (escape_bang_in_quoted_argument): Move to
5983         "common/common-fork-child.c".
5984         (saved_ui): New variable.
5985         (prefork_hook): New function.
5986         (postfork_hook): Likewise.
5987         (postfork_child_hook): Likewise.
5988         (gdb_startup_inferior): Likewise.
5989         (fork_inferior): Move to "common/common-fork-child.c".  Update
5990         function to support gdbserver.
5991         (startup_inferior): Likewise.
5992         * gdbcore.h (get_exec_file): Remove declaration.
5993         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5994         instead of "startup_inferior".  Call "add_thread_silent" after
5995         "fork_inferior".
5996         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5997         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5998         instead of "startup_inferior".  Call "add_thread_silent" after
5999         "fork_inferior".
6000         * inferior.h: Include "common-inferior.h".
6001         (trace_start_error): Move to "common/common-utils.h".
6002         (trace_start_error_with_name): Likewise.
6003         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6004         (startup_inferior): Likewise.
6005         (gdb_startup_inferior): New prototype.
6006         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6007         * nat/fork-inferior.h: New file.
6008         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6009         instead of "startup_inferior".  Call "add_thread_silent" after
6010         "fork_inferior".
6011         * target.h (target_terminal_init): Move prototype to
6012         "target/target.h".
6013         (target_terminal_inferior): Likewise.
6014         (target_terminal_ours): Likewise.
6015         * target/target.h (target_terminal_init): New prototype, moved
6016         from "target.h".
6017         (target_terminal_inferior): Likewise.
6018         (target_terminal_ours): Likewise.
6019         * utils.c (gdb_flush_out_err): New function.
6020
6021 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6022
6023         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6024         * common/common-gdbthread.h: New file, with parts from
6025         "gdb/gdbthread.h".
6026         * gdbthread.h: Include "common-gdbthread.h".
6027         (switch_to_thread): Moved to "common/common-gdbthread.h".
6028
6029 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6030
6031         * Makefile.in (SFILES): Add "common/job-control.c".
6032         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6033         (COMMON_OBS): Add "job-control.o".
6034         * common/job-control.c: New file, with contents from
6035         "gdb/inflow.c".
6036         * common/job-control.h: New file, with contents from "terminal.h".
6037         * fork-child.c: Include "job-control.h".
6038         * inflow.c: Include "job-control.h".
6039         (gdb_setpgid): Move to "common/common-inflow.c".
6040         (_initialize_inflow): Move setting of "job_control" to
6041         "handle_job_control".
6042         * terminal.h (job_control): Moved to "common/common-terminal.h".
6043         (gdb_setpgid): Likewise.
6044         * top.c: Include "job_control.h".
6045         * utils.c: Likewise.
6046         (job_control): Moved to "job-control.c".
6047
6048 2017-06-07  Pedro Alves  <palves@redhat.com>
6049
6050         * Makefile.in (SFILES): Add gdb_regex.c.
6051         (COMMON_OBS): Add gdb_regex.o.
6052         * ada-lang.c (ada_add_standard_exceptions)
6053         (ada_add_exceptions_from_frame, name_matches_regex)
6054         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6055         parameter type to compiled_regex.  Adjust.
6056         (ada_exceptions_list): Use compiled_regex.
6057         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6058         std::unique_ptr<compiled_regex>.
6059         (exception_catchpoint::~exception_catchpoint): Remove regfree
6060         call.
6061         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6062         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6063         * breakpoint.c (solib_catchpoint::compiled): Now a
6064         std::unique_ptr<compiled_regex>.
6065         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6066         (check_status_catch_solib): Adjust to use compiled_regex.
6067         (add_solib_catchpoint): Adjust to use compiled_regex.
6068         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6069         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6070         compiled_regex reference.  Adjust to use it.
6071         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6072         declaration.  Include "gdb_regex.h".
6073         (apropos_cmd): Change regex parameter to compiled_regex reference.
6074         * gdb_regex.c: New file.
6075         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6076         declarations.
6077         (class compiled_regex): New.
6078         * linux-tdep.c: Include "common/gdb_optional.h".
6079         (struct mapping_regexes): New, factored out from
6080         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6081         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6082         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6083         * probe.c: Include "common/gdb_optional.h".
6084         (collect_probes): Use compiled_regex and gdb::optional and remove
6085         cleanups.
6086         * skip.c: Include "common/gdb_optional.h".
6087         (skiplist_entry::compiled_function_regexp): Now a
6088         gdb::optional<compiled_regex>.
6089         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6090         (free_skiplist_entry): Remove regfree call.
6091         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6092         compiled_regex and gdb::optional.
6093         * symtab.c: Include "common/gdb_optional.h".
6094         (search_symbols): Use compiled_regex and gdb::optional.
6095         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6096         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6097         to gdb_regex.c.
6098
6099 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6100
6101         * regcache.c (regcache::save): Avoid buffer use.
6102         (regcache::dump): Likewise.
6103
6104 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6105
6106         * sh-tdep.c (sh_pseudo_register_read): Remove
6107         MAX_REGISTER_SIZE.
6108         (sh_pseudo_register_write): Likewise.
6109         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6110         (sh64_pseudo_register_write): Likewise
6111
6112 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6113
6114         * aarch64-tdep.c (aarch64_store_return_value): Use
6115         V_REGISTER_SIZE.
6116         (aarch64_pseudo_read_value): Likewise.
6117         (aarch64_pseudo_write): Likewise.
6118
6119 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6120
6121         * regformats/regdef.h (set_register_cache): Remove the
6122         declaration.
6123
6124 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6125
6126         * frame.c (frame_unwind_register_signed): Use
6127         frame_unwind_register_value.
6128
6129 2017-06-06  Pedro Alves  <palves@redhat.com>
6130
6131         PR breakpoints/21553
6132         * breakpoint.c (create_breakpoints_sal_default)
6133         (init_breakpoint_sal, create_breakpoint_sal): Use
6134         gdb::unique_xmalloc_ptr for string parameters.
6135         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6136         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6137         (base_breakpoint_create_breakpoints_sal)
6138         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6139         (strace_marker_create_breakpoints_sal)
6140         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6141         string parameters.
6142         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6143         gdb::unique_xmalloc_ptr for string parameters.
6144         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6145         parameters.
6146
6147 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6148
6149         * alpha-tdep.c (alpha_register_to_value): Use
6150         get_frame_register_value.
6151         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6152
6153 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6154
6155         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6156         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6157         (ia64_value_to_register): Likewise.
6158         (ia64_extract_return_value): Likewise.
6159         (ia64_store_return_value): Likewise.
6160         (ia64_push_dummy_call): Likewise.
6161
6162 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6163
6164         GDB 8.0 released.
6165
6166 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6167
6168         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6169
6170 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6171
6172         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6173         parameter.
6174         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6175
6176 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6177
6178         * event-loop.c (poll_timers): Unallocate timer using delete
6179         instead of xfree.
6180
6181 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6182
6183         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6184         (struct breakpoint) <~breakpoint>: New.
6185         (struct watchpoint): Inherit from breakpoint.
6186         <~watchpoint>: New.
6187         <base>: Remove.
6188         (struct tracepoint): Inherit from breakpoint.
6189         <base>: Remove.
6190         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6191         (struct longjmp_breakpoint): Inherit from breakpoint.
6192         <~longjmp_breakpoint>: New.
6193         <base>: Remove.
6194         (new_breakpoint_from_type): Remove casts.
6195         (watchpoint_in_thread_scope): Remove reference to base field.
6196         (watchpoint_del_at_next_stop): Likewise.
6197         (update_watchpoint): Likewise.
6198         (watchpoint_check): Likewise.
6199         (bpstat_check_watchpoint): Likewise.
6200         (set_longjmp_breakpoint): Likewise.
6201         (struct fork_catchpoint): Inherit from breakpoint.
6202         <base>: Remove.
6203         (struct solib_catchpoint): Inherit from breakpoint.
6204         <~solib_catchpoint>: New.
6205         <base>: Remove.
6206         (dtor_catch_solib): Change to ...
6207         (solib_catchpoint::~solib_catchpoint): ... this.
6208         (breakpoint_hit_catch_solib): Remove reference to base field.
6209         (add_solib_catchpoint): Likewise.
6210         (create_fork_vfork_event_catchpoint): Likewise.
6211         (struct exec_catchpoint): Inherit from breakpoint.
6212         <~exec_catchpoint>: New.
6213         <base>: Remove.
6214         (dtor_catch_exec): Change to ...
6215         (exec_catchpoint::~exec_catchpoint): ... this.
6216         (dtor_watchpoint): Change to ...
6217         (watchpoint::~watchpoint): ... this.
6218         (watch_command_1): Remove reference to base field.
6219         (catch_exec_command_1): Likewise.
6220         (base_breakpoint_dtor): Change to ...
6221         (breakpoint::~breakpoint): ... this.
6222         (base_breakpoint_ops): Remove dtor field value.
6223         (longjmp_bkpt_dtor): Change to ...
6224         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6225         (strace_marker_create_breakpoints_sal): Remove reference to base
6226         field.
6227         (delete_breakpoint): Don't manually call breakpoint destructor.
6228         (create_tracepoint_from_upload): Remove reference to base field.
6229         (trace_pass_set_count): Likewise.
6230         (initialize_breakpoint_ops): Don't initialize
6231         momentary_breakpoint_ops, don't set dtors.
6232         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6233         <~ada_catchpoint>: New.
6234         <base>: Remove.
6235         (create_excep_cond_exprs): Remove reference to base field.
6236         (dtor_exception): Change to ...
6237         (ada_catchpoint::~ada_catchpoint): ... this.
6238         (dtor_catch_exception): Remove.
6239         (dtor_catch_exception_unhandled): Remove.
6240         (dtor_catch_assert): Remove.
6241         (create_ada_exception_catchpoint): Remove reference to base
6242         field.
6243         (initialize_ada_catchpoint_ops): Don't set dtors.
6244         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6245         breakpoint.
6246         <~signal_catchpoint>: New.
6247         <base>: Remove.
6248         (signal_catchpoint_dtor): Change to ...
6249         (signal_catchpoint::~signal_catchpoint): ... this.
6250         (create_signal_catchpoint): Remove reference to base field.
6251         (initialize_signal_catchpoint_ops): Don't set dtor.
6252         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6253         from breakpoint.
6254         <~syscall_catchpoint>: New.
6255         <base>: Remove.
6256         (dtor_catch_syscall): Change to ...
6257         (syscall_catchpoint::~syscall_catchpoint): ... this.
6258         (create_syscall_event_catchpoint): Remove reference to base
6259         field.
6260         (initialize_syscall_catchpoint_ops): Don't set dtor.
6261         * break-catch-throw.c (struct exception_catchpoint): Inherit
6262         from breakpoint.
6263         <~exception_catchpoint>: New.
6264         <base>: Remove.
6265         (dtor_exception_catchpoint): Change to ...
6266         (exception_catchpoint::~exception_catchpoint): ... this.
6267         (handle_gnu_v3_exceptions): Remove reference to base field.
6268         (initialize_throw_catchpoint_ops): Don't set dtor.
6269         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6270         field.
6271         * remote.c (remote_get_tracepoint_status): Likewise.
6272         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6273         * tracefile.c (tracefile_fetch_registers): Likewise.
6274         * tracepoint.c (actions_command): Likewise.
6275         (validate_actionline): Likewise.
6276         (tfind_1): Likewise.
6277         (get_traceframe_location): Likewise.
6278         (find_matching_tracepoint_location): Likewise.
6279         (parse_tracepoint_status): Likewise.
6280         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6281
6282 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6283
6284         * breakpoint.c (struct longjmp_breakpoint): New struct.
6285         (is_tracepoint_type): Change return type to bool.
6286         (is_longjmp_type): New function.
6287         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6288         (set_raw_breakpoint_without_location): Use
6289         new_breakpoint_from_type.
6290         (set_raw_breakpoint): Likewise.
6291
6292 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6293
6294         * breakpoint.c (new_breakpoint_from_type): New function.
6295         (create_breakpoint_sal): Use new_breakpoint_from_type and
6296         unique_ptr.
6297         (create_breakpoint): Likewise.
6298
6299 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6300
6301         * memattr.c (mem_info_command): Rename to ...
6302         (info_mem_command): ... this.
6303         (mem_enable_command): Rename to ...
6304         (enable_mem_command): ... this.
6305         (mem_disable_command): Rename to ...
6306         (disable_mem_command): ... this.
6307         (mem_delete_command): Rename to ...
6308         (delete_mem_command): ... this.
6309         (_initialize_mem): Adjust function names.
6310
6311 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6312
6313         * btrace.c (handle_pt_insn_events): New.
6314         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6315         STATUS.  Split into this and ...
6316         (handle_pt_insn_event_flags): ... this.
6317
6318 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6319
6320         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6321         and struct pt_insn.resynced.
6322         * configure: Regenerated.
6323         * config.in: Regenerated.
6324
6325 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6326
6327         * btrace.c (ftrace_find_call_by_number): New function.
6328         (ftrace_new_function): Store objects, not pointers.
6329         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6330         ftrace_new_gap, ftrace_update_function,
6331         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6332         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6333         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6334         btrace_ends_with_single_insn, btrace_call_get): Account for
6335         btrace_thread_info::functions now storing objects.
6336         * btrace.h (struct btrace_thread_info): Add constructor.
6337         (struct btrace_thread_info) <functions>: Make std::vector.
6338         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6339         Initialize with default values.
6340         * record-btrace.c (record_btrace_frame_sniffer): Account for
6341         btrace_thread_info::functions now storing objects.
6342
6343 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6344
6345         * btrace.c: Remove typedef bfun_s.
6346         (ftrace_new_gap): Directly add gaps to the list of gaps.
6347         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6348         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6349         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6350         instead of gdb VEC.
6351
6352 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6353
6354         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6355         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6356         with btrace_thread_info::next_segment and
6357         btrace_thread_info::prev_segment.
6358         * btrace.h: Remove struct btrace_func_link.
6359         (struct btrace_function): Replace pair of function segment pointers
6360         with pair of indices.
6361         * python/py-record-btrace.c (btpy_call_prev_sibling,
6362         btpy_call_next_sibling): Replace references to
6363         btrace_thread_info::segment with btrace_thread_info::next_segment and
6364         btrace_thread_info::prev_segment.
6365         * record-btrace.c (record_btrace_frame_this_id): Use
6366         btrace_find_call_by_number.
6367
6368 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6369
6370         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6371         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6372         btrace_insn_next, btrace_insn_prev): Remove references to
6373         btrace_thread_info::flow.
6374         * btrace.h (struct btrace_function): Remove FLOW.
6375
6376 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6377
6378         * btrace.c (ftrace_find_call_by_number): New function.
6379         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6380         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6381         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6382         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6383         index.
6384         * btrace.h (struct btrace_function): Turn UP into an index.
6385         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6386         as an index.
6387         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6388         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6389         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6390
6391 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6392
6393         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6394         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6395         ftrace_update_function, ftrace_compute_global_level_offset,
6396         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6397         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6398         btrace_insn_end, btrace_is_empty): Remove references to
6399         btrace_thread_info::begin and btrace_thread_info::end.
6400         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6401         (struct btrace_thread_info) <functions>: Adjust comment.
6402         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6403         btrace_thread_info::begin.
6404
6405 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6406
6407         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6408         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6409         ftrace_update_function): Remove arguments that implicitly were always
6410         BTINFO->END.
6411         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6412         Don't pass BTINFO->END.
6413
6414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6415
6416         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6417         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6418         btrace_find_insn_by_number): Replace function segment pointer with
6419         index.
6420         (btrace_insn_cmp): Simplify.
6421         * btrace.h: (struct btrace_insn_iterator) Rename index to
6422         insn_index.  Replace function segment pointer with index into function
6423         segment vector.
6424         * record-btrace.c (record_btrace_call_history): Replace function
6425         segment pointer use with index.
6426         (record_btrace_frame_sniffer): Retrieve function call segment through
6427         vector.
6428         (record_btrace_set_replay): Remove defunc't safety check.
6429
6430 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6431
6432         * btrace.c (btrace_ends_with_single_insn): New function.
6433         (btrace_call_get, btrace_call_number, btrace_call_begin,
6434         btrace_call_end, btrace_call_next, btrace_call_prev,
6435         btrace_find_call_by_number): Use index into call segment vector
6436         instead of pointer.
6437         (btrace_call_cmp): Simplify.
6438         * btrace.h (struct btrace_call_iterator): Replace function call segment
6439         pointer with index into vector.
6440         * record-btrace.c (record_btrace_call_history): Use index instead of
6441         pointer.
6442
6443 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6444
6445         * btrace.c (btrace_insn_begin, btrace_insn_end,
6446         btrace_find_insn_by_number): Add btinfo to iterator.
6447         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6448
6449 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6450
6451         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6452         and save pointers directly.
6453         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6454         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6455         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6456         changed signature of functions.
6457         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6458         (btrace_fetch): Remove code that adds btrace_function pointers to
6459         vector of btrace_functions.
6460         (btrace_clear): Simplify freeing vector of btrace_functions.
6461
6462 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6463
6464         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6465         Replace VEC_* with std::vector functions.
6466         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6467         (struct btrace_thread_info)<functions>: Change type to std::vector.
6468
6469 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6470
6471         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6472         "Removed targets and native configurations" up.  Merge duplicate
6473         "New commands" sub-sections.  Add "New options" sub-sections.
6474
6475 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6476
6477         * defs.h (copy_integer_to_size): New declaration.
6478         * findvar.c (copy_integer_to_size): New function.
6479         (do_cint_test): New selftest function.
6480         (copy_integer_to_size_test): Likewise.
6481         (_initialize_findvar): Likewise.
6482         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6483         (mips_fbsd_collect_reg): Use raw_collect_integer.
6484         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6485         (mips64_fill_gregset): Use raw_collect_integer
6486         (mips64_fill_fpregset): Use raw_supply_integer.
6487         * regcache.c (regcache::raw_supply_integer): New function.
6488         (regcache::raw_collect_integer): Likewise.
6489         * regcache.h: (regcache::raw_supply_integer): New declaration.
6490         (regcache::raw_collect_integer): Likewise.
6491
6492 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6493
6494         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6495         (COMMON_OBS): Add gdbarch-selftests.o.
6496         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6497         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6498         * gdbarch-selftests.c: New file.
6499         * regcache.h (regcache) <~regcache>: Mark it virtual if
6500         GDB_SELF_TEST.
6501         <raw_write>: Likewise.
6502
6503 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6504
6505         * regcache.c (current_regcache): Change it to
6506         regcache::current_regcache.
6507         (regcache_observer_target_changed): Update.
6508         (regcache_thread_ptid_changed): Make it a regcache static
6509         method.
6510         (regcache_thread_ptid_changed): Update.
6511         (class regcache_access): New.
6512         (current_regcache_test): Update.
6513         (_initialize_regcache): Update.
6514         * regcache.h: Include forward_list.
6515         (regcache): Declare regcache_thread_ptid_changed and declare
6516         registers_changed_ptid as friend.
6517
6518 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6519
6520         * i387-tdep.c (i387_register_to_value): Use register_size
6521         instead of TYPE_LENGTH.
6522         * m68k-tdep.c (m68k_register_to_value): Likewise.
6523
6524 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6525
6526         * i387-tdep.c (i387_convert_register_p): Return false if type
6527         code isn't TYPE_CODE_FLT.
6528
6529 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6530
6531         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6532         length is 4.
6533         (alpha_register_to_value): Remove type length check.
6534         (alpha_value_to_register): Likewise.
6535
6536 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6537
6538         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6539         TYPE_CODE_FLT.
6540
6541 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6542
6543         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6544         TYPE_CODE_FLT or not.
6545
6546 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6547
6548         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6549         * avr-tdep.c (avr_gdbarch_init): Likewise.
6550         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6551         * cris-tdep.c (cris_gdbarch_init): Likewise.
6552         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6553         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6554         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6555         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6556         * mep-tdep.c (mep_gdbarch_init): Likewise.
6557         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6558         * mips-tdep.c (mips_gdbarch_init): Likewise.
6559         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6560         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6561         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6562         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6563         * v850-tdep.c (v850_gdbarch_init): Likewise.
6564
6565 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6566
6567         * selftest-arch.c (tests_with_arch): Call registers_changed
6568         and reinit_frame_cache.
6569         * selftest.c (run_self_tests): Likewise.
6570
6571 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6572
6573         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6574         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6575
6576 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6577
6578         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6579         set_gdbarch_print_insn.
6580
6581 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6582
6583         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6584         set_gdbarch_print_insn.
6585
6586 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6587
6588         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6589         set_gdbarch_print_insn.
6590         * arc-tdep.c (arc_gdbarch_init): Likewise.
6591         * arch-utils.c: include dis-asm.h.
6592         (default_print_insn): New function.
6593         * arch-utils.h (default_print_insn): Declare.
6594         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6595         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6596         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6597         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6598         * frv-tdep.c (frv_gdbarch_init): Likewise.
6599         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6600         * gdbarch.sh (print_insn): Use default_print_insn.
6601         * gdbarch.c: Regenerated.
6602         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6603         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6604         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6605         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6606         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6607         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6608         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6609         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6610         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6611         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6612         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6613         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6614         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6615         * mt-tdep.c (mt_gdbarch_init): Likewise.
6616         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6617         * nios2-tdep.c (nios2_print_insn): Remove.
6618         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6619         * rx-tdep.c (rx_gdbarch_init): Likewise.
6620         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6621         * score-tdep.c (score_print_insn): Remove.
6622         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6623         * sh-tdep.c (sh_gdbarch_init): Likewise.
6624         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6625         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6626         * tic6x-tdep.c (tic6x_print_insn): Remove.
6627         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6628         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6629         * v850-tdep.c (v850_gdbarch_init): Likewise.
6630         * vax-tdep.c (vax_gdbarch_init): Likewise.
6631         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6632         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6633
6634 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6635
6636         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6637         (MIPS_FP0_REGNUM): Remove.
6638         (MIPS_FSR_REGNUM): Remove.
6639         (mips_fbsd_supply_fpregs): Use mips_regnum.
6640         (mips_fbsd_supply_gregs): Likewise.
6641         (mips_fbsd_collect_fpregs): Likewise.
6642         (mips_fbsd_collect_gregs): Likewise.
6643
6644 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6645
6646         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6647         (getpfpregs_supplies): New function.
6648         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6649         getfpregs_supplies.
6650         (mips_fbsd_store_inferior_registers): Likewise.
6651
6652 2017-05-22  Pedro Alves <palves@redhat.com>
6653
6654         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6655         maintainer.
6656
6657 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
6658
6659         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6660         (store_register): Likewise.
6661         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6662         (get_decimal_float_return_value): Likewise.
6663         (do_ppc_sysv_return_value): Likewise.
6664         (ppc64_sysv_abi_push_integer): Likewise.
6665         (ppc64_sysv_abi_push_freg): Likewise.
6666         (ppc64_sysv_abi_return_value_base): Likewise.
6667         (ppc64_sysv_abi_return_value): Likewise.
6668         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6669         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6670         * rs6000-nat.c: Likewise.
6671         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6672         (rs6000_value_to_register): Likewise.
6673         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6674
6675 2017-05-21  Tom Tromey  <tom@tromey.com>
6676
6677         PR rust/21466:
6678         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6679         arrays as "[T]", not "[T; ]".
6680
6681 2017-05-19  Tom Tromey  <tom@tromey.com>
6682
6683         PR rust/21484:
6684         * rust-lang.c (exp_descriptor_rust): New function.
6685         (rust_language_defn): Use it.
6686         * p-lang.c (pascal_language_defn): Update.
6687         * opencl-lang.c (opencl_language_defn): Update.
6688         * objc-lang.c (objc_language_defn): Update.
6689         * m2-lang.c (m2_language_defn): Update.
6690         * language.h (struct language_defn)
6691         <la_watch_location_expression>: New member.
6692         * language.c (unknown_language_defn, auto_language_defn)
6693         (local_language_defn): Update.
6694         * go-lang.c (go_language_defn): Update.
6695         * f-lang.c (f_language_defn): Update.
6696         * d-lang.c (d_language_defn): Update.
6697         * c-lang.h (c_watch_location_expression): Declare.
6698         * c-lang.c (c_watch_location_expression): New function.
6699         (c_language_defn, cplus_language_defn, asm_language_defn)
6700         (minimal_language_defn): Use it.
6701         * breakpoint.c (watch_command_1): Call
6702         la_watch_location_expression.
6703         * ada-lang.c (ada_language_defn): Update.
6704
6705 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6706
6707         PR tui/21482
6708         * gdb_curses.h (NOMACROS): Define.
6709         (NCURSES_NOMACROS): Define.
6710
6711 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6712
6713         PR tui/21482
6714         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6715         arg to char *.
6716         * tui/tui-wingeneral.c (box_win): Likewise.
6717         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6718         (tui_show_source_line): Likewise.
6719         (tui_show_exec_info_content): Likewise.
6720
6721 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6722
6723         * sparc-tdep.c (sparc_structure_return_p)
6724         (sparc_arg_on_registers_p): New functions.
6725         (sparc32_store_arguments): Use them.
6726         * sparc64-tdep.c (sparc64_16_byte_align_p)
6727         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6728         Handle TYPE_CODE_ARRAY.
6729
6730 2017-05-17  Yao Qi  <yao.qi@linaro.org>
6731
6732         * cli/cli-decode.c (add_alias_cmd): New function.
6733         * command.h (add_alias_cmd): Declare.
6734         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6735         instead call add_alias_cmd.
6736
6737 2017-05-17  Pedro Alves  <palves@redhat.com>
6738
6739         * Makefile.in (nat_extra_makefile_frag): Rename to ...
6740         (nat_makefile_frag): ... this.  All references updated.
6741         * configure.ac: Likewise.
6742         * configure.nat: Likewise.  Enhance comments.
6743         * configure: Regenerate.
6744
6745 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6746
6747         * procfs.c (procfs_create_inferior): Change prototype to match
6748         definition.
6749
6750 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6751
6752         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6753         C++ compiler warning.
6754
6755 2017-05-12  Tom Tromey  <tom@tromey.com>
6756
6757         PR rust/21483:
6758         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6759         recurse, just call value_struct_elt directly.
6760
6761 2017-05-12  Tom Tromey  <tom@tromey.com>
6762
6763         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6764         OP_RUST_ARRAY>: Fix.
6765
6766 2017-05-12  Tom Tromey  <tom@tromey.com>
6767
6768         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6769
6770 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6771
6772         * regcache.c: Include <forward_list>.
6773         (struct regcache_list): Remove.
6774         (current_regcache): Update.
6775         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6776         (regcache_thread_ptid_changed): Likewise.
6777         (registers_changed_ptid): Likewise.
6778         (current_regcache_size): Likewise.
6779
6780 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6781
6782         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6783         (current_regcache_size): New function.
6784         (current_regcache_test): New function.
6785         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6786
6787 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6788
6789         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6790         (print_gp_register_row): Use get_frame_register_value.
6791
6792 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6793
6794         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6795         (mips_supply_fpregset): Likewise.
6796         (mips64_supply_gregset): Likewise.
6797
6798 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6799
6800         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6801         regcache->raw_supply_zeroed.
6802
6803 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6804
6805         * configure.nat: Rearrange 'case' statements to match
6806         host before cpu.
6807
6808 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6809
6810         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6811         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6812         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6813         "@nat_extra_makefile_frag@".
6814         (Makefile): Remove dependency on "@frags@".
6815         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6816         (data-directory/Makefile): Likewise.
6817         * config/aarch64/linux.mh: Deleted; moved contents to
6818         "gdb/configure.nat".
6819         * config/alpha/alpha-linux.mh: Likewise.
6820         * config/alpha/nbsd.mh: Likewise.
6821         * config/arm/linux.mh: Likewise.
6822         * config/arm/nbsdelf.mh: Likewise.
6823         * config/i386/cygwin.mh: Likewise.
6824         * config/i386/cygwin64.mh: Likewise.
6825         * config/i386/darwin.mh: Likewise.
6826         * config/i386/fbsd.mh: Likewise.
6827         * config/i386/fbsd64.mh: Likewise.
6828         * config/i386/go32.mh: Likewise.
6829         * config/i386/i386gnu.mh: Likewise.
6830         * config/i386/i386sol2.mh: Likewise.
6831         * config/i386/linux.mh: Likewise.
6832         * config/i386/linux64.mh: Likewise.
6833         * config/i386/mingw.mh: Likewise.
6834         * config/i386/mingw64.mh: Likewise.
6835         * config/i386/nbsd64.mh: Likewise.
6836         * config/i386/nbsdelf.mh: Likewise.
6837         * config/i386/nto.mh: Likewise.
6838         * config/i386/obsd.mh: Likewise.
6839         * config/i386/obsd64.mh: Likewise.
6840         * config/i386/sol2-64.mh: Likewise.
6841         * config/ia64/linux.mh: Likewise.
6842         * config/m32r/linux.mh: Likewise.
6843         * config/m68k/linux.mh: Likewise.
6844         * config/m68k/nbsdelf.mh: Likewise.
6845         * config/m68k/obsd.mh: Likewise.
6846         * config/m88k/obsd.mh: Likewise.
6847         * config/mips/fbsd.mh: Likewise.
6848         * config/mips/linux.mh: Likewise.
6849         * config/mips/nbsd.mh: Likewise.
6850         * config/mips/obsd64.mh: Likewise.
6851         * config/pa/linux.mh: Likewise.
6852         * config/pa/nbsd.mh: Likewise.
6853         * config/pa/obsd.mh: Likewise.
6854         * config/powerpc/aix.mh: Likewise.
6855         * config/powerpc/fbsd.mh: Likewise.
6856         * config/powerpc/linux.mh: Likewise.
6857         * config/powerpc/nbsd.mh: Likewise.
6858         * config/powerpc/obsd.mh: Likewise.
6859         * config/powerpc/ppc64-linux.mh: Likewise.
6860         * config/powerpc/spu-linux.mh: Likewise.
6861         * config/s390/linux.mh: Likewise.
6862         * config/sh/nbsd.mh: Likewise.
6863         * config/sparc/fbsd.mh: Likewise.
6864         * config/sparc/linux.mh: Likewise.
6865         * config/sparc/linux64.mh: Likewise.
6866         * config/sparc/nbsd64.mh: Likewise.
6867         * config/sparc/nbsdelf.mh: Likewise.
6868         * config/sparc/obsd64.mh: Likewise.
6869         * config/sparc/sol2.mh: Likewise.
6870         * config/tilegx/linux.mh: Likewise.
6871         * config/vax/nbsdelf.mh: Likewise.
6872         * config/vax/obsd.mh: Likewise.
6873         * config/xtensa/linux.mh: Likewise.
6874         * config/i386/i386gnu.mn: New file, with excerpts from
6875         "config/i386/i386gnu.mh".
6876         * configure: Regenerate.
6877         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6878         *.mh files under "gdb/config".
6879         * configure.nat: New file, with contents from the
6880         "gdb/config/*/*.mh" files.
6881
6882 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6883
6884         * btrace.c (btrace_clear): Free insn vector.
6885
6886 2017-05-05  Pedro Alves  <palves@redhat.com>
6887
6888         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6889         * configure: Regenerate.
6890
6891 2017-05-04  Pedro Alves  <palves@redhat.com>
6892
6893         * Makefile.in (SFILES): Add progspace-and-thread.c.
6894         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6895         (COMMON_OBS): Add progspace-and-thread.o.
6896         * breakpoint.c: Include "progspace-and-thread.h".
6897         (update_inserted_breakpoint_locations)
6898         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6899         Use scoped_restore_current_pspace_and_thread.
6900         (create_std_terminate_master_breakpoint): Use
6901         scoped_restore_current_program_space.
6902         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6903         (print_breakpoint_location): Use
6904         scoped_restore_current_program_space.
6905         (bp_loc_is_permanent): Use
6906         scoped_restore_current_pspace_and_thread.
6907         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6908         (download_tracepoint_locations): Use
6909         scoped_restore_current_pspace_and_thread.
6910         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6911         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6912         (enum step_over_calls_kind): Moved from inferior.h.
6913         (class scoped_restore_current_thread): New class.
6914         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6915         declaration.
6916         (scoped_restore_current_thread): New class.
6917         * infcmd.c: Include "common/gdb_optional.h".
6918         (continue_1, proceed_after_attach): Use
6919         scoped_restore_current_thread.
6920         (notice_new_inferior): Use scoped_restore_current_thread.
6921         * inferior.c: Include "progspace-and-thread.h".
6922         (restore_inferior, save_current_inferior): Delete.
6923         (add_inferior_command, clone_inferior_command): Use
6924         scoped_restore_current_pspace_and_thread.
6925         * inferior.h (scoped_restore_current_inferior): New class.
6926         * infrun.c: Include "progspace-and-thread.h" and
6927         "common/gdb_optional.h".
6928         (follow_fork_inferior): Use
6929         scoped_restore_current_pspace_and_thread.
6930         (scoped_restore_exited_inferior): New class.
6931         (handle_vfork_child_exec_or_exit): Use
6932         scoped_restore_exited_inferior,
6933         scoped_restore_current_pspace_and_thread,
6934         scoped_restore_current_thread and scoped_restore.
6935         (fetch_inferior_event): Use scoped_restore_current_thread.
6936         * linespec.c (decode_line_full, decode_line_1): Use
6937         scoped_restore_current_program_space.
6938         * mi/mi-main.c: Include "progspace-and-thread.h".
6939         (exec_continue): Use scoped_restore_current_thread.
6940         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6941         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6942         * proc-service.c (ps_pglobal_lookup): Use
6943         scoped_restore_current_program_space.
6944         * progspace-and-thread.c: New file.
6945         * progspace-and-thread.h: New file.
6946         * progspace.c (release_program_space, clone_program_space): Use
6947         scoped_restore_current_program_space.
6948         (restore_program_space, save_current_program_space)
6949         (save_current_space_and_thread): Delete.
6950         (switch_to_program_space_and_thread): Moved to
6951         progspace-and-thread.c.
6952         * progspace.h (save_current_program_space)
6953         (save_current_space_and_thread): Delete declarations.
6954         (scoped_restore_current_program_space): New class.
6955         * remote.c (remote_btrace_maybe_reopen): Use
6956         scoped_restore_current_thread.
6957         * symtab.c: Include "progspace-and-thread.h".
6958         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6959         * thread.c (print_thread_info_1): Use
6960         scoped_restore_current_thread.
6961         (struct current_thread_cleanup): Delete.
6962         (do_restore_current_thread_cleanup)
6963         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6964         (scoped_restore_current_thread::~scoped_restore_current_thread):
6965         ... this new dtor.
6966         (make_cleanup_restore_current_thread): Rename/convert to ...
6967         (scoped_restore_current_thread::scoped_restore_current_thread):
6968         ... this new ctor.
6969         (thread_apply_all_command): Use scoped_restore_current_thread.
6970         (thread_apply_command): Use scoped_restore_current_thread.
6971         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6972         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6973
6974 2017-05-04  Pedro Alves  <palves@redhat.com>
6975
6976         * thread.c (make_cleanup_restore_current_thread): Move
6977         find_thread_ptid call before the is_stopped call.  Assert that the
6978         thread is found.  Replace is_stopped call by checking the thread's
6979         state directly.  Remove unnecessary NULL-thread check.
6980
6981 2017-05-04  Pedro Alves  <palves@redhat.com>
6982
6983         * corelow.c (thread_section_name): New class.
6984         (get_core_register_section, get_core_siginfo): Use it.
6985
6986 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6987
6988         * corelow.c (sniff_core_bfd): Remove extra semicolon.
6989         (get_core_register_section): Remove xfree of NULL pointer.
6990
6991 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
6992
6993         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6994         * regcache.c (regcache::raw_supply_zeroed): New function.
6995         * regcache.h (regcache::raw_supply_zeroed): New declaration.
6996
6997 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6998
6999         * gdbarch.sh: Remove commented out definition of
7000         TARGET_CHAR_BIT.
7001         * gdbarch.h: Re-generate.
7002
7003 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7004
7005         * configure: Regenerate.
7006
7007 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7008
7009         * solib-target.c (solib_target_relocate_section_addresses):
7010         Remove num_section_bases, num_bases, segment_bases variables.
7011
7012 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7013
7014         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7015
7016 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7017
7018         * solib-target.c: Include <vector>
7019         (struct lm_info_target) <~lm_info_target>: Remove.
7020         <segment_bases, section_bases>: Change type to
7021         std::vector<CORE_ADDR>.
7022         (library_list_start_segment, library_list_start_section,
7023         library_list_end_library,
7024         solib_target_relocate_section_addresses): Adjust.
7025
7026 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7027
7028         * gdbarch.sh (software_single_step): Change return type to
7029         std::vector<CORE_ADDR>.
7030         * gdbarch.c, gdbarch.h: Re-generate.
7031         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7032         Adjust.
7033         (arm_deal_with_atomic_sequence_raw): Adjust.
7034         (thumb_get_next_pcs_raw): Adjust.
7035         (arm_get_next_pcs_raw): Adjust.
7036         (arm_get_next_pcs): Adjust.
7037         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7038         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7039         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7040         (alpha_software_single_step): Adjust.
7041         * alpha-tdep.h (alpha_software_single_step): Adjust.
7042         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7043         * arm-tdep.c (arm_software_single_step): Adjust.
7044         (arm_breakpoint_kind_from_current_state): Adjust.
7045         * arm-tdep.h (arm_software_single_step): Adjust.
7046         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7047         * cris-tdep.c (cris_software_single_step): Adjust.
7048         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7049         (micromips_deal_with_atomic_sequence): Adjust.
7050         (deal_with_atomic_sequence): Adjust.
7051         (mips_software_single_step): Adjust.
7052         * mips-tdep.h (mips_software_single_step): Adjust.
7053         * moxie-tdep.c (moxie_software_single_step): Adjust.
7054         * nios2-tdep.c (nios2_software_single_step): Adjust.
7055         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7056         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7057         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7058         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7059         * sparc-tdep.c (sparc_software_single_step): Adjust.
7060         * spu-tdep.c (spu_software_single_step): Adjust.
7061         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7062
7063 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7064
7065         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7066         * gdbarch.h: Re-generate.
7067
7068 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7069
7070         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7071         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7072         * python/py-instruction.c, python/py-instruction.h: New file.
7073         * python/py-record.c: Add py-instruction.h include.
7074         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7075         gdb.RecordInstruction.
7076         * python/python-internal.h: Add gdbpy_initialize_instruction
7077         declaration.
7078         * python/python.c (do_start_initialization): Add
7079         gdbpy_initialize_instruction.
7080
7081 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7082
7083         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7084         Remove.
7085         (btrace_func_from_recpy_func): New function.
7086         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7087         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7088         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7089         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7090         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7091         Also, use new helper functions.
7092         (btpy_list_item): Use new helper functions.
7093         (recpy_bt_function_call_history): Use new type name.
7094         (btpy_call_getset): Remove.
7095         (gdbpy_initialize_btrace): Remove code to initialize
7096         gdb.BtraceFunctionCall.
7097         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7098         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7099         recpy_bt_func_prev, recpy_bt_func_next): New export.
7100         * python/py-record.c (recpy_func_type): New static object.
7101         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7102         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7103         recpy_func_next): New function.
7104         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7105         (recpy_func_getset): New static object.
7106         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7107         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7108
7109 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7110
7111         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7112         (btpy_object, btpy_insn_type, btpy_new): Remove.
7113         (btpy_list_object): Use gdb.RecordInstruction type instead of
7114         gdb.BtraceInstruction type.
7115         (btrace_insn_from_recpy_insn): New function.
7116         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7117         btpy_new.
7118         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7119         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7120         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7121         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7122         instead of btpy_object.
7123         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7124         btpy_insn_data, btpy_insn_decode): Rename to ...
7125         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7126         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7127         recpy_bt_insn_decode): This.  Also, use new helper functions.
7128         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7129         recpy_insn_type.
7130         (btpy_insn_getset): Remove.
7131         (gdbpy_initialize_btrace): Remove code to initialize
7132         gdb.BtraceInstruction.  Use recpy_element_object.
7133         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7134         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7135         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7136         * python/py-record.c (recpy_insn_type): New static object.
7137         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7138         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7139         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7140         New function.
7141         (recpy_insn_getset): New static object.
7142         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7143         * python/py-record.h (recpy_element_object): New typedef.
7144         (recpy_insn_type, recpy_insn_new): New export.
7145
7146 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7147
7148         * py-record-btrace.c (btpy_insn_new): Removed.
7149         (btpy_insn_or_gap_new): New function.
7150         (btpy_insn_error): Removed.
7151         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7152         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7153         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7154         btpy_insn_or_gap_new instead of btpy_insn_new.
7155         (btpy_insn_getset): Remove btpy_insn_error.
7156         * py-record.c (recpy_gap_type): New static object.
7157         (recpy_gap_object): New typedef.
7158         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7159         recpy_gap_reason_string): New function.
7160         (recpy_gap_getset): New static object.
7161         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7162         * py-record.h (recpy_gap_new): New export.
7163
7164 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7165
7166         * python/py-record.c (recpy_ptid): Remove.
7167         (recpy_record_getset): Remove recpy_ptid.
7168
7169 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7170
7171         * btrace.c (btrace_fetch): Set inferior_ptid.
7172         * python/py-record-btrace.c: Add "py-record.h" include.
7173         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7174         recpy_bt_end, recpy_bt_instruction_history,
7175         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7176         in gdb.Record object instead of current ptid.
7177         * python/py-record.c: Include new "py-record.h" file.
7178         (recpy_record_object): Moved to py-record.h.
7179         * python/py-record.h: New file.
7180
7181 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7182
7183         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7184         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7185         indentation.
7186
7187 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7188
7189         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7190         the past maintainers section.
7191
7192 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7193
7194         * infcmd.c (get_return_value): Use regcache ctor, and remove
7195         cleanup.
7196
7197 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7198             Pedro Alves  <palves@redhat.com>
7199
7200         * regcache.c (regcache::regcache): New tag dispatch ctor.
7201         (do_cooked_read): Moved above.
7202         (regcache_dup): Use the tag dispatch ctor..
7203         * regcache.h (regcache): Declare ctor, delete copy ctor and
7204         assignment operator, remove friend regcache_dup.
7205
7206 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7207
7208         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7209         call method save instead of regcache_cpy.
7210         * regcache.h (struct regcache): Make regcache_dup a friend.
7211
7212 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7213
7214         * regcache.c (struct regcache): Move to regcache.h
7215         (regcache::arch): New method.
7216         (regcache_get_ptid): Update.
7217         (get_regcache_arch): Call arch method.
7218         (get_regcache_aspace): Call method aspace.
7219         (register_buffer): Change it to method.
7220         (regcache_save): Change it to regcache::save.
7221         (regcache_restore): Likewise.
7222         (regcache_cpy_no_passthrough): Remove the declaration.
7223         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7224         (regcache_cpy_no_passthrough): Change it to method
7225         cpy_no_passthrough.
7226         (regcache_register_status): Change it to method
7227         get_register_status.
7228         (regcache_invalidate): Change it to method invalidate.
7229         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7230         (regcache_raw_update): Change it to method raw_update.
7231         (regcache_raw_read): Likewise.
7232         (regcache_raw_read_signed): Likewise.
7233         (regcache_raw_read_unsigned): Likewise.
7234         (regcache_raw_write_signed): Likewise.
7235         (regcache_raw_write_unsigned): Likewise.
7236         (regcache_cooked_read): Likewise.
7237         (regcache_cooked_read_value): Likewise.
7238         (regcache_cooked_read_signed): Likewise.
7239         (regcache_cooked_read_unsigned): Likewise.
7240         (regcache_cooked_write_signed): Likewise.
7241         (regcache_cooked_write_unsigned): Likewise.
7242         (regcache_raw_set_cached_value): Likewise.
7243         (regcache_raw_write): Likewise.
7244         (regcache_cooked_write): Likewise.
7245         (regcache_xfer_part): Likewise.
7246         (regcache_raw_read_part): Likewise.
7247         (regcache_raw_write_part): Likewise.
7248         (regcache_cooked_read_part): Likewise.
7249         (regcache_cooked_write_part): Likewise.
7250         (regcache_raw_supply): Likewise.
7251         (regcache_raw_collect): Likewise.
7252         (regcache_transfer_regset): Likewise.
7253         (regcache_supply_regset): Likewise.
7254         (regcache_collect_regset): Likewise.
7255         (regcache_debug_print_register): Likewise.
7256         (enum regcache_dump_what): Move it to regcache.h.
7257         (regcache_dump): Change it to method dump.
7258         * regcache.h (enum regcache_dump_what): New.
7259         (class regcache): New.
7260         * target.c (target_fetch_registers): Call method
7261         debug_print_register.
7262         (target_store_registers): Likewise.
7263
7264 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7265
7266         * windows-nat.c (struct lm_info_windows): Initialize field.
7267         (windows_make_so): Allocate lm_info_windows with new.
7268         (windows_free_so): Free lm_info_windows with delete.
7269
7270 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7271
7272         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7273         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7274         cleanup.
7275         (darwin_free_so): Free lm_info_darwin with delete.
7276
7277 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7278
7279         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7280         <l_addr_p>: Change type to bool.
7281         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7282         (svr4_free_so): Free lm_info_svr4 with delete.
7283         (svr4_copy_library_list): Replace memcpy with call to copy
7284         constructor.
7285         (library_list_start_library, svr4_default_sos): Allocate
7286         lm_info_svr4 with new.
7287
7288 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7289
7290         * solib-target.c (struct lm_info_target): Add destructor,
7291         initialize fields.
7292         <name>: Change type to std::string.
7293         (library_list_start_library): Allocate lm_info_target with new.
7294         (solib_target_free_library_list): Free lm_info_target with
7295         delete.
7296         (solib_target_current_sos): Adapt to std::string.
7297         (solib_target_free_so): Free lm_info_target with delete.
7298
7299 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7300
7301         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7302         fields.
7303         (frv_current_sos): Allocate lm_info_frv with new.
7304         (frv_relocate_main_executable): Free lm_info_frv with delete,
7305         allocate with new.
7306         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7307
7308 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7309
7310         * solib-frv.c (struct lm_info_frv): Fix indentation.
7311
7312 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7313
7314         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7315         map field.
7316         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7317         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7318         and allocate with new.
7319         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7320
7321 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7322
7323         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7324         <filename, member_name>: Change type to std::string.
7325         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7326         (library_list_start_library): Allocate lm_info_aix with new.
7327         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7328         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7329         with copy constructor.
7330
7331 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7332
7333         * solist.h (struct lm_info): Remove.
7334         (struct lm_info_base): New class.
7335         (struct so_list) <lm_info>: Change type to lm_info_base *.
7336         * nto-tdep.c (struct lm_info): Remove.
7337         (lm_addr): Adjust.
7338         * solib-aix.c (struct lm_info): Rename to ...
7339         (struct lm_info_aix): ... this.  Extend lm_info_base.
7340         (lm_info_p): Rename to ...
7341         (lm_info_aix_p): ... this, and adjust.
7342         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7343         solib_aix_parse_libraries, library_list_start_library,
7344         solib_aix_free_library_list, solib_aix_parse_libraries,
7345         solib_aix_get_library_list,
7346         solib_aix_relocate_section_addresses, solib_aix_free_so,
7347         solib_aix_get_section_offsets,
7348         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7349         Adjust.
7350         (struct solib_aix_inferior_data) <library_list>: Adjust.
7351         * solib-darwin.c (struct lm_info): Rename to ...
7352         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7353         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7354         * solib-dsbt.c (struct lm_info): Rename to ...
7355         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7356         (struct dsbt_info) <main_executable_lm_info): Adjust.
7357         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7358         dsbt_relocate_section_addresses): Adjust.
7359         * solib-frv.c (struct lm_info): Rename to ...
7360         (struct lm_info_frv): ... this.  Extend lm_info_base.
7361         (main_executable_lm_info): Adjust.
7362         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7363         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7364         find_canonical_descriptor_in_load_object,
7365         frv_fdpic_find_canonical_descriptor): Adjust.
7366         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7367         to lm_info_svr4.
7368         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7369         svr4_clear_so, svr4_copy_library_list,
7370         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7371         svr4_current_sos, svr4_fetch_objfile_link_map,
7372         solist_update_incremental): Adjust.
7373         * solib-svr4.h (struct lm_info_svr4): Move here from
7374         solib-svr4.c.
7375         * solib-target.c (struct lm_info): Rename to ...
7376         (struct lm_info_target): ... this.  Extend lm_info_base.
7377         (lm_info_p): Rename to ...
7378         (lm_info_target_p): ... this.
7379         (solib_target_parse_libraries, library_list_start_segment,
7380         library_list_start_section, library_list_start_library,
7381         library_list_end_library, solib_target_free_library_list,
7382         solib_target_current_sos, solib_target_free_so,
7383         solib_target_relocate_section_addresses): Adjust.
7384         * windows-nat.c (struct lm_info): Rename to ...
7385         (struct lm_info_windows): ... this.  Extend lm_info_base.
7386         (windows_make_so, handle_load_dll, handle_unload_dll,
7387         windows_xfer_shared_libraries): Adjust.
7388
7389 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7390
7391         * solib-darwin.c (struct darwin_so_list): Remove.
7392         (darwin_current_sos): Allocate an so_list object instead of a
7393         darwin_so_list, separately allocate an lm_info object.
7394         (darwin_free_so): Free lm_info.
7395
7396 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7397
7398         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7399         with fprintf_filtered.
7400
7401 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7402
7403         * regcache.c (regcache::regcache): New function.
7404         (regcache::~regcache): New function.
7405         (regcache_xmalloc_1): Remove.
7406         (regcache_xmalloc): Call new regcache.
7407         (regcache_xfree): Call delete regcache.
7408         (get_thread_arch_aspace_regcache): Call new regcache.
7409
7410 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7411
7412         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7413         lwp instead of ptid_get_lwp.
7414
7415 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7416
7417         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7418         lwp_info instead of getting from inferior_ptid.
7419
7420 2017-04-27  Keith Seitz  <keiths@redhat.com>
7421
7422         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7423         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7424         (CV_CONVERSION_BADNESS): Define.
7425         (rank_one_type): Remove overly restrictive rvalue reference
7426         rank checks.
7427         Add cv-qualifier checks and subranks for type equality.
7428         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7429         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7430         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7431
7432 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7433
7434         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7435         count when creating the object.
7436
7437 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7438             Ulrich Weigand  <uweigand@de.ibm.com>
7439
7440         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7441         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7442         is used in AIX.
7443         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7444         (process_xcoff_symbol): Likewise.
7445         (scan_xcoff_symtab): Likewise.
7446
7447 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7448
7449         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7450         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7451         (ia64_access_reg): Use get_frame_register_unsigned.
7452         (ia64_access_rse_reg): Likewise.
7453         (ia64_libunwind_frame_prev_register): Likewise.
7454
7455 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7456
7457         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7458         * gdbarch.c: Regenerated.
7459         * gdbarch.h: Regenerated.
7460         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7461         visibility external.
7462         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7463         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7464         (enum cfa_how_kind): Move to ...
7465         (struct dwarf2_frame_state_reg_info): Likewise.
7466         (struct dwarf2_frame_state): Likewise.
7467         * dwarf2-frame.h: ... here.
7468         (dwarf2_frame_state_alloc_regs): New declaration.
7469         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7470         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7471
7472 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7473
7474         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7475         regcache_raw_read_unsigned.
7476         (xtensa_pseudo_register_write): Likewise.
7477
7478 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7479
7480         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7481         (nds32_pseudo_register_write): Likewise.
7482
7483 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7484
7485         * regcache.c (struct regcache) <readonly_p>: Change its type
7486         to bool.
7487         (regcache_xmalloc_1): Update parameter type and callers update.
7488
7489 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7490
7491         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7492         set_gdbarch_wchar_bit.
7493         * arm-tdep.c (arm_gdbarch_init): Likewise.
7494
7495 2017-04-25  Pedro Alves  <palves@redhat.com>
7496
7497         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7498         (BothAreRelocatable, memcopy, memmove): Don't define.
7499         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7500         macros.
7501
7502 2017-04-25  Pedro Alves  <palves@redhat.com>
7503
7504         * common/common-defs.h: Include "common/poison.h".
7505         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7506         and adjust.
7507         * common/poison.h: New file.
7508         * common/traits.h: Include <type_traits>.
7509         (Not, Or, Requires): New, moved from common/function-view.h.
7510
7511 2017-04-25  Pedro Alves  <palves@redhat.com>
7512
7513         * breakpoint.h (struct breakpoint): In-class initialize all
7514         fields.  Make boolean fields "bool".
7515         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7516         memset call and initializations no longer necessary.
7517
7518 2017-04-25  Pedro Alves  <palves@redhat.com>
7519
7520         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7521         reference.
7522         (pt_btrace_insn): New function.
7523         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7524
7525 2017-04-25  Pedro Alves  <palves@redhat.com>
7526
7527         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7528         "base" field and inherit from "bp_location" instead.  Add
7529         non-default ctor.
7530         (allocate_location_exception): Use new non-default ctor.
7531         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7532         (init_bp_location): Convert to ...
7533         (bp_location::bp_location): ... this new ctor, and remove memset
7534         call.
7535         (base_breakpoint_allocate_location): Use the new non-default ctor.
7536         * breakpoint.h (bp_location): Now a class.  Declare default and
7537         non-default ctors.  In-class initialize all members.
7538         (init_bp_location): Remove declaration.
7539
7540 2017-04-25  Pedro Alves  <palves@redhat.com>
7541
7542         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7543         assignment operator.
7544
7545 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7546
7547         * doublest.c (convert_doublest_to_floatformat): Call
7548         floatformat_totalsize_bytes.
7549
7550 2017-04-22  Tom Tromey  <tom@tromey.com>
7551
7552         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7553         ui_out_emit_list.
7554         * stack.c (print_frame): Use ui_out_emit_list.
7555         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7556         ui_out_emit_list.
7557         * mi/mi-main.c (print_one_inferior)
7558         (mi_cmd_data_list_register_names)
7559         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7560         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7561         ui_out_emit_list.
7562         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7563         (mi_output_solib_attribs): Use ui_out_emit_list,
7564         ui_out_emit_tuple.
7565         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7566         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7567         (mi_cmd_stack_list_args, list_args_or_locals): Use
7568         ui_out_emit_list.
7569         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7570         * breakpoint.c (print_solib_event, output_thread_groups): Use
7571         ui_out_emit_list.
7572
7573 2017-04-22  Tom Tromey  <tom@tromey.com>
7574
7575         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7576         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7577         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7578
7579 2017-04-22  Tom Tromey  <tom@tromey.com>
7580
7581         * tracepoint.c (tvariables_info_1)
7582         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7583
7584 2017-04-22  Tom Tromey  <tom@tromey.com>
7585
7586         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7587         annotate_arg_emitter.
7588         * breakpoint.c (print_mention_watchpoint)
7589         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7590         * annotate.h (struct annotate_arg_emitter): New.
7591
7592 2017-04-22  Tom Tromey  <tom@tromey.com>
7593
7594         * record-btrace.c (record_btrace_insn_history)
7595         (record_btrace_insn_history_range, record_btrace_call_history)
7596         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7597         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7598         ui_out_emit_tuple.
7599         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7600         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7601         * skip.c (skip_info): Use ui_out_emit_tuple.
7602         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7603         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7604         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7605         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7606         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7607         ui_out_emit_tuple.
7608         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7609         (output_register, mi_cmd_data_read_memory)
7610         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7611         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7612         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7613         Use ui_out_emit_tuple.
7614         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7615         ui_out_emit_tuple.
7616         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7617         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7618         * linux-thread-db.c (info_auto_load_libthread_db): Use
7619         ui_out_emit_tuple.
7620         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7621         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7622         * disasm.c (do_mixed_source_and_assembly_deprecated)
7623         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7624         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7625         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7626         * breakpoint.c (print_one_breakpoint_location)
7627         (print_one_breakpoint): Use ui_out_emit_tuple.
7628         * auto-load.c (print_script, info_auto_load_cmd): Use
7629         ui_out_emit_tuple.
7630         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7631
7632 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
7633
7634         * thread.c (print_thread_info_1): Remove dead code.
7635
7636 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7637
7638         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7639         GDB_SELF_TEST.
7640         * arm-tdep.c (selftests::arm_record_test): Likewise.
7641
7642 2017-04-21  Yao Qi  <yao.qi@linaro.org>
7643
7644         * regcache.c (regcache_restore): Remove argument 2.  Replace
7645         argument 3 with regcache.  Get register status from
7646         src->register_status and get register contents from
7647         register_buffer (src, regnum).
7648         (regcache_cpy): Update.
7649
7650 2017-04-19  Pedro Alves  <palves@redhat.com>
7651
7652         * gdbthread.h (thread): Add missing closing parenthesis in
7653         comment.
7654
7655 2017-04-19  Pedro Alves  <palves@redhat.com>
7656
7657         * common/refcounted-object.h: New file.
7658         * gdbthread.h: Include "common/refcounted-object.h".
7659         (thread_info): Inherit from refcounted_object and add comments.
7660         (thread_info::incref, thread_info::decref)
7661         (thread_info::m_refcount): Delete.
7662         (thread_info::deletable): Use the refcounted_object::refcount()
7663         method.
7664         * inferior.c (current_inferior_): Add comment.
7665         (set_current_inferior): Increment/decrement refcounts.
7666         (prune_inferiors, remove_inferior_command): Skip inferiors marked
7667         not-deletable instead of comparing with the current inferior.
7668         (initialize_inferiors): Increment the initial inferior's refcount.
7669         * inferior.h (struct inferior): Forward declare.
7670         Include "common/refcounted-object.h".
7671         (current_inferior, set_current_inferior): Move declaration to
7672         before struct inferior's definition, and fix comment.
7673         (inferior): Inherit from refcounted_object.  Add comments.
7674         * thread.c (switch_to_thread_no_regs): Reference the thread's
7675         inferior pointer directly instead of doing a ptid lookup.
7676         (switch_to_no_thread): New function.
7677         (switch_to_thread(thread_info *)): New function, factored out
7678         from ...
7679         (switch_to_thread(ptid_t)): ... this.
7680         (restore_current_thread): Delete.
7681         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7682         fields, and add 'inf' field.
7683         (do_restore_current_thread_cleanup): Check whether old->inf is
7684         alive instead of looking up an inferior by ptid.  Use
7685         switch_to_thread and switch_to_no_thread.
7686         (restore_current_thread_cleanup_dtor): Use old->inf directly
7687         instead of lookup up an inferior by id.  Decref the inferior.
7688         Don't restore 'removable'.
7689         (make_cleanup_restore_current_thread): Same the inferior pointer
7690         in old, instead of the inferior number.  Incref the inferior.
7691         Don't save/clear 'removable'.
7692
7693 2017-04-19  Pedro Alves  <palves@redhat.com>
7694
7695         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7696         unittests/scoped_restore-selftests.c.
7697         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7698         * common/scoped_restore.h (scoped_restore_base): Make "class".
7699         (scoped_restore_base::release): New public method.
7700         (scoped_restore_base::scoped_restore_base): New protected ctor.
7701         (scoped_restore_base::m_saved_var): New protected field.
7702         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7703         scoped_restore_base base class instead of m_saved_var directly.
7704         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7705         (scoped_restore_tmpl::scoped_restore_tmpl(const
7706         scoped_restore_tmpl<T>&)): Likewise.
7707         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7708         method.
7709         (scoped_restore_tmpl::saved_var): New method.
7710         (scoped_restore_tmpl::m_saved_var): Delete.
7711         * inferior.h (inferior::detaching): Now a bool.
7712         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7713         cleanup.
7714         * unittests/scoped_restore-selftests.c: New file.
7715
7716 2017-04-19  Pedro Alves  <palves@redhat.com>
7717
7718         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7719         Re-sort in alphabetic order.
7720
7721 2017-04-18  Pedro Alves  <palves@redhat.com>
7722
7723         * xml-support.c (obstack_xml_printf): Delete.
7724         * xml-support.h (obstack_xml_printf): Delete.
7725
7726 2017-04-18  Pedro Alves  <palves@redhat.com>
7727
7728         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7729         vdebug, verror, body_text, start_element, end_element, name,
7730         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7731         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7732         is_xinclude>: Make private and add m_ prefix.
7733         (gdb_xml_parser::body_text): New method, based on ...
7734         (gdb_xml_body_text): ... this.  Adjust.
7735         (gdb_xml_parser::vdebug): New method, based on ...
7736         (gdb_xml_debug): ... this.  Adjust.
7737         (gdb_xml_parser::verror): New method, based on ...
7738         (gdb_xml_error): ... this.  Adjust.
7739         (gdb_xml_parser::start_element): New method, based on ...
7740         (gdb_xml_start_element): ... this.  Adjust.
7741         (gdb_xml_start_element_wrapper): Defer to
7742         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7743         (gdb_xml_parser::end_element): New method, based on ...
7744         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7745         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7746         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7747         (gdb_xml_parser::use_dtd): New method, based on ...
7748         (gdb_xml_use_dtd): ... this.  Adjust.
7749         (gdb_xml_parser::parse): New method, based on ...
7750         (gdb_xml_parse): ... this.  Adjust.
7751         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7752         (xinclude_start_include): Adjust to call the parser's name method.
7753         (xml_xinclude_default, xml_xinclude_start_doctype)
7754         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7755         method.
7756         (xml_process_xincludes): Adjust to call parser methods.
7757         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7758         declarations.
7759
7760 2017-04-18  Pedro Alves  <palves@redhat.com>
7761
7762         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7763         gdb::optional<std::string>.
7764         * xml-support.c: Include <string>.
7765         (scope_level::scope_level(scope_level &&))
7766         (scope_level::~scope_level): Delete.
7767         (scope_level::body): Now a std::string.
7768         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7769         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7770         parameter.
7771         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7772         (xinclude_parsing_data::output): Now a std::string reference.
7773         (xinclude_start_include): Adjust.
7774         (xml_xinclude_default): Adjust.
7775         (xml_process_xincludes): Add 'output' parameter, and return bool.
7776         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7777         and return bool.
7778         * xml-tdesc.c: Include <unordered_map> and <string>.
7779         (tdesc_xml_cache): Delete.
7780         (tdesc_xml_cache_s): Delete.
7781         (xml_cache): Now an std::unordered_map.
7782         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7783         (target_fetch_description_xml): Change return type to
7784         gdb::optional<std::string>, and adjust.
7785         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7786         (target_fetch_description_xml): Change return type to
7787         gdb::optional<std::string>.
7788
7789 2017-04-18  Pedro Alves  <palves@redhat.com>
7790
7791         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7792         unittests/optional-selftests.c.
7793         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7794         * unittests/optional-selftests.c: New file.
7795         * unittests/optional/assignment/1.cc: New file.
7796         * unittests/optional/assignment/2.cc: New file.
7797         * unittests/optional/assignment/3.cc: New file.
7798         * unittests/optional/assignment/4.cc: New file.
7799         * unittests/optional/assignment/5.cc: New file.
7800         * unittests/optional/assignment/6.cc: New file.
7801         * unittests/optional/assignment/7.cc: New file.
7802         * unittests/optional/cons/copy.cc: New file.
7803         * unittests/optional/cons/default.cc: New file.
7804         * unittests/optional/cons/move.cc: New file.
7805         * unittests/optional/cons/value.cc: New file.
7806         * unittests/optional/in_place.cc: New file.
7807         * unittests/optional/observers/1.cc: New file.
7808         * unittests/optional/observers/2.cc: New file.
7809
7810 2017-04-18  Pedro Alves  <palves@redhat.com>
7811
7812         * common/gdb_optional.h: Include common/traits.h.
7813         (in_place_t): New type.
7814         (in_place): New constexpr variable.
7815         (optional::optional): Remove member initialization of
7816         m_instantiated.
7817         (optional::optional(in_place_t...)): New constructor.
7818         (optional::~optional): Use reset.
7819         (optional::optional(const optional&)): New.
7820         (optional::optional(const optional&&)): New.
7821         (optional::optional(T &)): New.
7822         (optional::optional(T &&)): New.
7823         (operator::operator=(const optional &)): New.
7824         (operator::operator=(optional &&)): New.
7825         (operator::operator= (const T &))
7826         (operator::operator= (T &&))
7827         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7828         (operator::reset): New.
7829         (operator::m_instantiated):: Add in-class initializer.
7830         * common/traits.h: Include <type_traits>.
7831         (struct And): New types.
7832
7833 2017-04-18  Pedro Alves  <palves@redhat.com>
7834
7835         * xml-support.c: Include <vector>.
7836         (scope_level::scope_level(const gdb_xml_element *))
7837         (scope_level::scope_level(scope_level&&)): New.
7838         (scope_level::~scope_level): New.
7839         (scope_level_s): Delete.
7840         (gdb_xml_parser::scopes): Now a std::vector.
7841         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7842         Use std::vector.
7843         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7844         scope cleanup code.
7845         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7846         of the scopes member.  Use std::vector::emplace_back.
7847
7848 2017-04-18  Pedro Alves  <palves@redhat.com>
7849
7850         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7851         a bool.
7852         (gdb_xml_end_element): Change type of first parameter.
7853         (gdb_xml_cleanup): Rename to ...
7854         (gdb_xml_parser::~gdb_xml_parser): ... this.
7855         (gdb_xml_create_parser_and_cleanup): Delete with ...
7856         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7857         to this new ctor.
7858         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7859         using gdb_xml_create_parser_and_cleanup.
7860         (xinclude_parsing_data): Add ctor/dtor.
7861         (xml_xinclude_cleanup): Delete.
7862         (xml_process_xincludes): Create a local xinclude_parsing_data
7863         instead of heap-allocating one.  Create a local gdb_xml_parser
7864         instead of heap-allocating one with
7865         gdb_xml_create_parser_and_cleanup.
7866
7867 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7868
7869         PR threads/20743
7870         * fbsd-nat.c (resume_one_thread_cb): Remove.
7871         (resume_all_threads_cb): Remove.
7872         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7873         iterate_over_threads.
7874
7875 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7876
7877         * NEWS: Create a new section for the next release branch.
7878         Rename the section of the current branch, now that it has
7879         been cut.
7880
7881 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7882
7883         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7884         * version.in: Bump version to 8.0.50.DATE-git.
7885
7886 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7887
7888         PR gdb/21385
7889         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7890         independently of the host, and fix build breakage on Cygwin.
7891
7892 2017-04-13  Pedro Alves  <palves@redhat.com>
7893
7894         * inferior.c (free_inferior): Convert to ...
7895         (inferior::~inferior): ... this dtor.
7896         (inferior::inferior): New ctor, factored out from ...
7897         (add_inferior_silent): ... here.  Allocate the inferior with a new
7898         expression.
7899         (delete_inferior): Call delete instead of free_inferior.
7900         * inferior.h (gdb_environ, continuation): Forward declare.
7901         (inferior): Now a class.  Add in-class initialization to all
7902         members.  Make boolean fields bool, except 'detaching'.
7903         (inferior::inferior): New explicit ctor.
7904         (inferior::~inferior): New.
7905
7906 2017-04-13  Pedro Alves  <palves@redhat.com>
7907
7908         * inferior.c (init_inferior_list): Delete.
7909         * inferior.h (init_inferior_list): Delete.
7910
7911 2017-04-13  Pedro Alves  <palves@redhat.com>
7912
7913         PR threads/13217
7914         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7915         (top level): Call it twice, with different thread sets.
7916
7917 2017-04-13  Pedro Alves  <palves@redhat.com>
7918
7919         * thread.c: Include <algorithm>.
7920         (thread_array_cleanup): Delete.
7921         (scoped_inc_dec_ref): New class.
7922         (live_threads_count): New function.
7923         (set_thread_refcount): Delete.
7924         (tp_array_compar_ascending): Now a bool.
7925         (tp_array_compar): Convert to a std::sort comparison function.
7926         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7927         and live_threads_count.
7928
7929 2017-04-13  Pedro Alves  <palves@redhat.com>
7930
7931         * infrun.c (follow_fork_inferior): Also switch the current
7932         inferior.
7933
7934 2017-04-13  Pedro Alves  <palves@redhat.com>
7935
7936         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7937         before calling create_internal_breakpoint.
7938
7939 2017-04-13  Pedro Alves  <palves@redhat.com>
7940
7941         * fork-child.c (execv_argv): New class.
7942         (breakup_args): Refactored as ...
7943         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7944         Copy arguments to storage and replace separators with NULL
7945         terminators in place.
7946         (escape_bang_in_quoted_argument): Adjust to return bool.
7947         (execv_argv::execv_argv): New ctor.
7948         (execv_argv::init_for_shell): New method, factored out from
7949         fork_inferior.  Don't strdup strings into the vector.
7950         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7951         Remove free_vector_argv call.
7952
7953 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7954
7955         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7956         tdep->rx_psw_type.
7957
7958 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7959
7960         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7961         * rx-tdep.c (rx_gdbarch_init): Likewise.
7962
7963 2017-04-13  Pedro Alves  <palves@redhat.com>
7964
7965         * breakpoint.h (struct breakpoint): Reindent.
7966
7967 2017-04-13  Pedro Alves  <palves@redhat.com>
7968
7969         * breakpoint.c (bp_location): Rename to ...
7970         (bp_locations): ... this.  All references updated.
7971         (bp_location_count): Rename to ...
7972         (bp_locations_count): ... this.  All references updated.
7973         (bp_location_placed_address_before_address_max): Rename to ...
7974         (bp_locations_placed_address_before_address_max): ... this.  All
7975         references updated.
7976         (bp_location_shadow_len_after_address_max): Rename to ...
7977         (bp_locations_shadow_len_after_address_max): ... this.  All
7978         references updated.
7979         (bp_location_compare_addrs): Rename to ...
7980         (bp_locations_compare_addrs): ... this.  All references updated.
7981         (bp_location_compare):Rename to ...
7982         (bp_locations_compare): ... this.  All references updated.
7983         (bp_location_target_extensions_update): Rename to ...
7984         (bp_locations_target_extensions_update): ... this.  All references
7985         updated.
7986
7987 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7988
7989         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7990         * common/common.m4: Check headers 'termios.h', 'termio.h' and
7991         'sgtty.h'.
7992         * common/gdb_termios.h: New file, with parts of "terminal.h".
7993         * inflow.c: Include "gdb_termios.h".
7994         * ser-unix.c: Include "gdb_termios.h".
7995         * terminal.h: Move terminal-related defines to
7996         "common/gdb_termios.h".
7997
7998 2017-04-12  Tom Tromey  <tom@tromey.com>
7999
8000         * probe.c (parse_probes): Update.
8001         * location.h (delete_event_location): Don't declare.
8002         (event_location_deleter::operator()): Update.
8003         * location.c (event_location_deleter::operator()): Rename from
8004         delete_event_location.
8005         * linespec.h (linespec_result) <location>: Change type to
8006         event_location_up.
8007         * linespec.c (canonicalize_linespec, event_location_to_sals)
8008         (decode_objc): Update.
8009         (linespec_result): Don't call delete_event_location.
8010         * breakpoint.c (create_breakpoints_sal)
8011         (bkpt_probe_create_sals_from_location)
8012         (strace_marker_create_sals_from_location): Update.
8013
8014 2017-04-12  Tom Tromey  <tom@tromey.com>
8015
8016         * linespec.h (struct linespec_result): Add constructor and
8017         destructor.
8018         (init_linespec_result, destroy_linespec_result)
8019         (make_cleanup_destroy_linespec_result): Don't declare.
8020         * linespec.c (init_linespec_result): Remove.
8021         (linespec_result::~linespec_result): Rename from
8022         destroy_linespec_result.  Update.
8023         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8024         Remove.
8025         * breakpoint.c (create_breakpoint, break_range_command)
8026         (decode_location_default): Update.
8027         * ax-gdb.c (agent_command_1): Update.
8028
8029 2017-04-12  Tom Tromey  <tom@tromey.com>
8030
8031         * remote.c (remote_download_tracepoint): Update.
8032         * python/py-breakpoint.c (bppy_get_location): Update.
8033         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8034         (gdbscm_breakpoint_location): Update.
8035         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8036         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8037         Change type to event_location_up.
8038         * breakpoint.c (create_overlay_event_breakpoint)
8039         (create_longjmp_master_breakpoint)
8040         (create_std_terminate_master_breakpoint)
8041         (create_exception_master_breakpoint)
8042         (breakpoint_event_location_empty_p, print_breakpoint_location)
8043         (print_one_breakpoint_location, create_thread_event_breakpoint)
8044         (init_breakpoint_sal, create_breakpoint)
8045         (print_recreate_ranged_breakpoint, break_range_command)
8046         (init_ada_exception_breakpoint, say_where): Update.
8047         (base_breakpoint_dtor): Don't call delete_event_location.
8048         (bkpt_print_recreate, tracepoint_print_recreate)
8049         (dprintf_print_recreate, update_static_tracepoint)
8050         (breakpoint_re_set_default): Update.
8051
8052 2017-04-12  Tom Tromey  <tom@tromey.com>
8053
8054         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8055         type of "to_do".  Update.
8056         (compute_stack_depth): Use std::vector.
8057
8058 2017-04-12  Tom Tromey  <tom@tromey.com>
8059
8060         * printcmd.c (find_instruction_backward): Use std::vector.
8061
8062 2017-04-12  Tom Tromey  <tom@tromey.com>
8063
8064         * symfile.c (objfilep): Remove typedef.
8065         (reread_symbols): Use a std::vector.
8066
8067 2017-04-12  Tom Tromey  <tom@tromey.com>
8068
8069         * mi/mi-main.c (exec_direction_forward): Remove.
8070         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8071         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8072         scoped_restore.
8073         * guile/guile.c (guile_repl_command, guile_command)
8074         (gdbscm_execute_gdb_command): Use scoped_restore.
8075         * go-exp.y (go_parse): Use scoped_restore.
8076         * d-exp.y (d_parse): Use scoped_restore.
8077         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8078         * c-exp.y (c_parse): Use scoped_restore.
8079
8080 2017-04-12  Tom Tromey  <tom@tromey.com>
8081
8082         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8083         (mi_parse): Update return type.
8084         (mi_parse_free): Remove.
8085         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8086         (mi_parse::~mi_parse): Rename from mi_parse_free.
8087         (mi_parse_cleanup): Remove.
8088         (mi_parse): Return a unique_ptr.  Use new.
8089         * mi/mi-main.c (mi_execute_command): Update.
8090
8091 2017-04-12  Tom Tromey  <tom@tromey.com>
8092
8093         * location.c (explicit_location_lex_one): Return a
8094         unique_xmalloc_ptr.
8095         (string_to_explicit_location): Update.  Remove cleanups.
8096
8097 2017-04-12  Tom Tromey  <tom@tromey.com>
8098
8099         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8100         (compare_value_and_voffset): Change type.  Update.
8101         (compute_vtable_size): Change type of "offset_vec".
8102         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8103         (gnuv3_get_typeid): Remove extraneous declaration.
8104
8105 2017-04-12  Tom Tromey  <tom@tromey.com>
8106
8107         * charset.h (wchar_iterator): Fix comment.
8108
8109 2017-04-12  Tom Tromey  <tom@tromey.com>
8110
8111         * charset.c (iconv_wrapper): New class.
8112         (cleanup_iconv): Remove.
8113         (convert_between_encodings): Use it.
8114
8115 2017-04-12  Tom Tromey  <tom@tromey.com>
8116
8117         * symfile.h (increment_reading_symtab): Update type.
8118         * symfile.c (decrement_reading_symtab): Remove.
8119         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8120         * psymtab.c (psymtab_to_symtab): Update.
8121         * dwarf2read.c (dw2_instantiate_symtab): Update.
8122
8123 2017-04-12  Tom Tromey  <tom@tromey.com>
8124
8125         * jit.c (struct jit_reader): Declare separately.  Add constructor
8126         and destructor.  Change type of "handle".
8127         (loaded_jit_reader): Define separately.
8128         (jit_reader_load): Update.  New "new".
8129         (jit_reader_unload_command): Use "delete".
8130         * gdb-dlfcn.h (struct dlclose_deleter): New.
8131         (gdb_dlhandle_up): New typedef.
8132         (gdb_dlopen, gdb_dlsym): Update types.
8133         (gdb_dlclose): Remove.
8134         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8135         (gdb_dlsym): Change type of "handle".
8136         (make_cleanup_dlclose): Remove.
8137         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8138         * compile/compile-c-support.c (load_libcc): Update.
8139
8140 2017-04-12  Tom Tromey  <tom@tromey.com>
8141
8142         * symtab.h (find_pcs_for_symtab_line): Change return type.
8143         * symtab.c (find_pcs_for_symtab_line): Change return type.
8144         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8145         type of "vec".  Update.
8146         (ltpy_get_pcs_for_line): Update.
8147         * linespec.c (decode_digits_ordinary): Update.
8148
8149 2017-04-12  Tom Tromey  <tom@tromey.com>
8150
8151         * tracepoint.c (actions_command): Update.
8152         * python/python.c (python_command, python_interactive_command):
8153         Update.
8154         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8155         * guile/guile.c (guile_command): Update.
8156         * defs.h (read_command_lines, read_command_lines_1): Return
8157         command_line_up.
8158         (command_lines_deleter): New struct.
8159         (command_line_up): New typedef.
8160         * compile/compile.c (compile_code_command)
8161         (compile_print_command): Update.
8162         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8163         command_line_up.
8164         (make_cleanup_free_command_lines): Remove.
8165         * cli/cli-script.c (get_command_line, read_command_lines_1)
8166         (copy_command_lines): Return command_line_up.
8167         (while_command, if_command, read_command_lines, define_command)
8168         (document_command): Update.
8169         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8170         Remove.
8171         * breakpoint.h (breakpoint_set_commands): Change type of
8172         "commands".
8173         * breakpoint.c (breakpoint_set_commands): Change type of
8174         "commands".  Update.
8175         (do_map_commands_command, update_dprintf_command_list)
8176         (create_tracepoint_from_upload): Update.
8177
8178 2017-04-12  Tom Tromey  <tom@tromey.com>
8179
8180         * tracepoint.c (scope_info): Update.
8181         * spu-tdep.c (spu_catch_start): Update.
8182         * python/python.c (gdbpy_decode_line): Update.
8183         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8184         * python/py-breakpoint.c (bppy_init): Update.
8185         * probe.c (parse_probes): Update.
8186         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8187         * location.h (event_location_deleter): New struct.
8188         (event_location_up): New typedef.
8189         (new_linespec_location, new_address_location, new_probe_location)
8190         (new_explicit_location, copy_event_location)
8191         (string_to_event_location, string_to_event_location_basic)
8192         (string_to_explicit_location): Update return type.
8193         (make_cleanup_delete_event_location): Remove.
8194         * location.c (new_linespec_location, new_address_location)
8195         (new_probe_location, new_explicit_location, copy_event_location):
8196         Return event_location_up.
8197         (delete_event_location_cleanup)
8198         (make_cleanup_delete_event_location): Remove.
8199         (string_to_explicit_location, string_to_event_location_basic)
8200         (string_to_event_location): Return event_location_up.
8201         * linespec.c (canonicalize_linespec, event_location_to_sals)
8202         (decode_line_with_current_source)
8203         (decode_line_with_last_displayed, decode_objc): Update.
8204         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8205         * completer.c (location_completer): Update.
8206         * cli/cli-cmds.c (edit_command, list_command): Update.
8207         * breakpoint.c (create_overlay_event_breakpoint)
8208         (create_longjmp_master_breakpoint)
8209         (create_std_terminate_master_breakpoint)
8210         (create_exception_master_breakpoint)
8211         (create_thread_event_breakpoint): Update.
8212         (init_breakpoint_sal): Update.  Remove some dead code.
8213         (create_breakpoint_sal): Change type of "location".  Update.
8214         (create_breakpoints_sal, create_breakpoint, break_command_1)
8215         (dprintf_command, break_range_command, until_break_command)
8216         (init_ada_exception_breakpoint)
8217         (strace_marker_create_sals_from_location)
8218         (update_static_tracepoint, trace_command, ftrace_command)
8219         (strace_command, create_tracepoint_from_upload): Update.
8220         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8221         * ax-gdb.c (agent_command_1): Update.
8222
8223 2017-04-12  Pedro Alves  <palves@redhat.com>
8224
8225         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8226         * configure.tgt: Handle i[34567]86-*-go32* and
8227         i[34567]86-*-msdosdjgpp*.
8228         * i386-tdep.c (i386_svr4_reg_to_regnum):
8229         Make extern.
8230         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8231         i386-go32-tdep.c.
8232         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8233         * i386-go32-tdep.c: New file.
8234         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8235         declarations.
8236
8237 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8238
8239         * aix-thread.c (pd_status2str): Change return type to const char *.
8240
8241 2017-04-12  Pedro Alves  <palves@redhat.com>
8242
8243         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8244         calls to set_gdbarch_gnu_triplet_regexp.
8245
8246 2017-04-12  Pedro Alves  <palves@redhat.com>
8247
8248         PR gdb/21323
8249         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8250         New enum value.
8251         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8252         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8253         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8254         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8255         * gdbarch.h, gdbarch.c: Regenerate.
8256         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8257         gdbarch_wchar_bit and gdbarch_wchar_signed.
8258         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8259         * arm-tdep.c (arm_gdbarch_init): Likewise.
8260         * avr-tdep.c (avr_gdbarch_init): Likewise.
8261         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8262         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8263         * i386-tdep.c (i386_go32_init_abi): Likewise.
8264         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8265         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8266         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8267         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8268         * sh-tdep.c (sh_gdbarch_init): Likewise.
8269         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8270         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8271         * windows-tdep.c (windows_init_abi): Likewise.
8272         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8273
8274 2017-04-12  Pedro Alves  <palves@redhat.com>
8275
8276         PR c++/21323
8277         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8278         cplus_primitive_type_char32_t>: New enum values.
8279         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8280         and cplus_primitive_type_char32_t.
8281         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8282         32, use the archtecture's built-in type for char16_t and char32_t,
8283         respectively.  Otherwise, fallback to init_integer_type as before,
8284         but make the type unsigned, and issue a complaint.
8285         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8286
8287 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8288
8289         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8290         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8291
8292 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8293
8294         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8295         'const char *'.
8296
8297 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8298
8299         * common/common-utils.c (free_vector_argv): New function.
8300         * common/common-utils.h: Include <vector>.
8301         (free_vector_argv): New prototype.
8302         * darwin-nat.c (darwin_create_inferior): Rewrite function
8303         prototype in order to constify "exec_file" and accept a
8304         "std::string" for "allargs".
8305         * fork-child.c: Include <vector>.
8306         (breakup_args): Rewrite function, using C++.
8307         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8308         and accept "std::string" for "allargs".  Update the code to
8309         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8310         and "execvp".
8311         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8312         order to constify "exec_file" and accept a "std::string" for
8313         "allargs".
8314         * go32-nat.c (go32_create_inferior): Likewise.
8315         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8316         * infcmd.c (run_command_1): Constify "exec_file".  Use
8317         "std::string" for inferior arguments.
8318         * inferior.h (fork_inferior): Update prototype.
8319         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8320         prototype in order to constify "exec_file" and accept a
8321         "std::string" for "allargs".
8322         * nto-procfs.c (procfs_create_inferior): Likewise.
8323         * procfs.c (procfs_create_inferior): Likewise.
8324         * remote-sim.c (gdbsim_create_inferior): Likewise.
8325         * remote.c (extended_remote_run): Update code to accept
8326         "std::string" as argument.
8327         (extended_remote_create_inferior): Rewrite function prototype in
8328         order to constify "exec_file" and accept a "std::string" for
8329         "allargs".
8330         * rs6000-nat.c (super_create_inferior): Likewise.
8331         (rs6000_create_inferior): Likewise.
8332         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8333         * windows-nat.c (windows_create_inferior): Likewise.
8334
8335 2017-04-11  Pedro Alves  <palves@redhat.com>
8336
8337         * thread.c: Fix whitespace throughout.
8338
8339 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8340
8341         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8342
8343 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8344
8345         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8346
8347 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8348
8349         PR gdb/21364
8350         * osdata.c (info_osdata): Check if 'type' is an empty string
8351         instead of NULL.
8352
8353 2017-04-10  Pedro Alves  <palves@redhat.com>
8354
8355         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8356         (ptid_to_global_thread_id, in_thread_list)
8357         (do_captured_list_thread_ids, set_resumed, set_running)
8358         (set_executing, set_stop_requested, finish_thread_state)
8359         (validate_registers_access, can_access_registers_ptid)
8360         (print_thread_info_1, switch_to_thread)
8361         (do_restore_current_thread_cleanup)
8362         (make_cleanup_restore_current_thread, thread_command)
8363         (thread_name_command): Use operator== instead of ptid_equal.
8364
8365 2017-04-10  Pedro Alves  <palves@redhat.com>
8366
8367         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8368         (current_thread_cleanup_chain): Delete.
8369         (restore_current_thread_cleanup_dtor)
8370         (make_cleanup_restore_current_thread): Remove references to
8371         current_thread_cleanup_chain.
8372
8373 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8374
8375         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8376         REG_UNKNOWN.
8377
8378 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8379
8380         PR gdb/19942
8381         * gdbthread.h (thread_info::deletable): New method.
8382         (thread_info::incref): New method.
8383         (thread_info::decref): New method.
8384         (thread_info::refcount): Move it to private.
8385         * infrun.c (save_stop_context): Call inc_refcount.
8386         (release_stop_context_cleanup): Likewise.
8387         * thread.c (set_thread_exited): New function.
8388         (init_thread_list): Delete "tp" only it is deletable, otherwise
8389         call set_thread_exited.
8390         (delete_thread_1): Call set_thread_exited.
8391         (current_thread_cleanup) <inferior_pid>: Remove.
8392         <thread>: New field.
8393         (restore_current_thread_ptid_changed): Removed.
8394         (do_restore_current_thread_cleanup): Adjust.
8395         (restore_current_thread_cleanup_dtor): Don't call
8396         find_thread_ptid.
8397         (set_thread_refcount): Use dec_refcount.
8398         (make_cleanup_restore_current_thread): Adjust.
8399         (thread_apply_all_command): Call inc_refcount.
8400         (_initialize_thread): Don't call
8401         observer_attach_thread_ptid_changed.
8402
8403 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8404
8405         * thread.c (delete_thread_1): Hoist code on marking thread as
8406         exited.
8407
8408 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8409
8410         * windows-nat.c (windows_detach): Initialize ptid with
8411         minus_one_ptid.
8412
8413 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8414
8415         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8416
8417 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8418
8419         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8420         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8421         (bfin_pseudo_register_write): Likewise
8422
8423 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8424
8425         * common/ptid.h (struct ptid): Change to...
8426         (class ptid_t): ... this.
8427         <ptid_t>: New constructors.
8428         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8429         matches>: New methods.
8430         <make_null, make_minus_one>: New static methods.
8431         <pid>: Rename to...
8432         <m_pid>: ...this.
8433         <lwp>: Rename to...
8434         <m_lwp>: ...this.
8435         <tid>: Rename to...
8436         <m_tid>: ...this.
8437         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8438         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8439         as references, move comment to class ptid_t.
8440         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8441         ptid_t static methods.
8442         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8443         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8444         Take ptid arguments as references, implement using ptid_t methods.
8445         * unittests/ptid-selftests.c: New file.
8446         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8447         unittests/ptid-selftests.c.
8448         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8449
8450 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8451
8452         * python/python.c (python_run_simple_file): Cast mode literal to
8453         non-const char pointer as expected by PyFile_FromString.
8454
8455 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8456
8457         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8458         minus_one_ptid and null_ptid.
8459
8460 2017-04-05  Pedro Alves  <palves@redhat.com>
8461
8462         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8463         * configure: Regenerate.
8464
8465 2017-04-05  Pedro Alves  <palves@redhat.com>
8466
8467         * ada-exp.y (yyerror): Constify.
8468         * ada-lang.c (bound_name, get_selections)
8469         (ada_variant_discrim_type)
8470         (ada_variant_discrim_name, ada_value_struct_elt)
8471         (ada_lookup_struct_elt_type, is_unchecked_variant)
8472         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8473         (catch_ada_exception_command_split)
8474         (catch_ada_assert_command_split, catch_assert_command)
8475         (ada_op_name): Constify.
8476         * ada-lang.h (ada_yyerror, get_selections)
8477         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8478         * arc-tdep.c (arc_print_frame_cache): Constify.
8479         * arm-tdep.c (arm_skip_stub): Constify.
8480         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8481         (gen_aggregate_elt_ref): Constify.
8482         * bcache.c (print_bcache_statistics): Constify.
8483         * bcache.h (print_bcache_statistics): Constify.
8484         * break-catch-throw.c (catch_exception_command_1):
8485         * breakpoint.c (struct ep_type_description::description):
8486         Constify.
8487         (add_solib_catchpoint): Constify.
8488         (catch_fork_command_1): Add cast.
8489         (add_catch_command): Constify.
8490         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8491         Constify.
8492         * bsd-uthread.c (bsd_uthread_state): Constify.
8493         * buildsym.c (patch_subfile_names): Constify.
8494         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8495         Constify.
8496         * c-exp.y (yyerror): Constify.
8497         (token::oper): Constify.
8498         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8499         * c-varobj.c (cplus_describe_child): Constify.
8500         * charset.c (find_charset_names): Add cast.
8501         (find_charset_names): Constify array and add const_cast.
8502         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8503         (edit_command): Constify.
8504         * cli/cli-decode.c (lookup_cmd): Constify.
8505         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8506         Constify.
8507         (struct dump_context): Constify.
8508         (add_dump_command, restore_command): Constify.
8509         * cli/cli-script.c (get_command_line): Constify.
8510         * cli/cli-script.h (get_command_line): Constify.
8511         * cli/cli-utils.c (check_for_argument): Constify.
8512         * cli/cli-utils.h (check_for_argument): Constify.
8513         * coff-pe-read.c (struct read_pe_section_data): Constify.
8514         * command.h (lookup_cmd): Constify.
8515         * common/print-utils.c (decimal2str): Constify.
8516         * completer.c (gdb_print_filename): Constify.
8517         * corefile.c (set_gnutarget): Constify.
8518         * cp-name-parser.y (yyerror): Constify.
8519         * cp-valprint.c (cp_print_class_member): Constify.
8520         * cris-tdep.c (cris_register_name, crisv32_register_name):
8521         Constify.
8522         * d-exp.y (yyerror): Constify.
8523         (struct token::oper): Constify.
8524         * d-lang.h (d_yyerror): Constify.
8525         * dbxread.c (struct header_file_location::name): Constify.
8526         (add_old_header_file, add_new_header_file, last_function_name)
8527         (dbx_next_symbol_text, add_bincl_to_list)
8528         (find_corresponding_bincl_psymtab, set_namestring)
8529         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8530         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8531         * defs.h (command_line_input, print_address_symbolic)
8532         (deprecated_readline_begin_hook): Constify.
8533         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8534         Constify.
8535         * event-top.c (handle_line_of_input): Constify and add cast.
8536         * exceptions.c (catch_errors): Constify.
8537         * exceptions.h (catch_errors): Constify.
8538         * expprint.c (print_subexp_standard, op_string, op_name)
8539         (op_name_standard, dump_raw_expression, dump_raw_expression):
8540         * expression.h (op_name, op_string, dump_raw_expression):
8541         Constify.
8542         * f-exp.y (yyerror): Constify.
8543         (struct token::oper): Constify.
8544         (struct f77_boolean_val::name): Constify.
8545         * f-lang.c (f_word_break_characters): Constify.
8546         * f-lang.h (f_yyerror): Constify.
8547         * fork-child.c (fork_inferior): Add cast.
8548         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8549         (new_variant): Constify.
8550         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8551         * gdbarch.c: Regenerate.
8552         * gdbcore.h (set_gnutarget): Constify.
8553         * go-exp.y (yyerror): Constify.
8554         (token::oper): Constify.
8555         * go-lang.h (go_yyerror): Constify.
8556         * go32-nat.c (go32_sysinfo): Constify.
8557         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8558         * guile/scm-cmd.c (cmdscm_function): Constify.
8559         * guile/scm-param.c (pascm_param_value): Constify.
8560         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8561         (h8300sx_register_name): Constify.
8562         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8563         Constify.
8564         * ia64-tdep.c (ia64_register_names): Constify.
8565         * infcmd.c (construct_inferior_arguments): Constify.
8566         (path_command, attach_post_wait): Constify.
8567         * language.c (show_range_command, show_case_command)
8568         (unk_lang_error): Constify.
8569         * language.h (language_defn::la_error)
8570         (language_defn::la_name_of_this): Constify.
8571         * linespec.c (decode_line_2): Constify.
8572         * linux-thread-db.c (thread_db_err_str): Constify.
8573         * lm32-tdep.c (lm32_register_name): Constify.
8574         * m2-exp.y (yyerror): Constify.
8575         * m2-lang.h (m2_yyerror): Constify.
8576         * m32r-tdep.c (m32r_register_names): Constify and make static.
8577         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8578         * m88k-tdep.c (m88k_register_name): Constify.
8579         * macroexp.c (appendmem): Constify.
8580         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8581         (upgrade_type, parse_external, parse_partial_symbols)
8582         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8583         (new_symbol): Constify.
8584         * memattr.c (mem_info_command): Constify.
8585         * mep-tdep.c (register_name_from_keyword): Constify.
8586         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8587         Constify.
8588         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8589         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8590         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8591         cast.
8592         (mi_execute_async_cli_command): Constify.
8593         * mips-tdep.c (mips_register_name): Constify.
8594         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8595         (am33_register_name, am33_2_register_name)
8596         * moxie-tdep.c (moxie_register_names): Constify.
8597         * nat/linux-osdata.c (osdata_type): Constify fields.
8598         * nto-tdep.c (nto_parse_redirection): Constify.
8599         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8600         (lookup_child_selector): Constify.
8601         (objc_methcall::name): Constify.
8602         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8603         (lookup_struct_typedef): Constify.
8604         * objfiles.c (pc_in_section): Constify.
8605         * objfiles.h (pc_in_section): Constify.
8606         * p-exp.y (struct token::oper): Constify.
8607         (yyerror): Constify.
8608         * p-lang.h (pascal_yyerror): Constify.
8609         * parser-defs.h (op_name_standard): Constify.
8610         (op_print::string): Constify.
8611         (exp_descriptor::op_name): Constify.
8612         * printcmd.c (print_address_symbolic): Constify.
8613         * psymtab.c (print_partial_symbols): Constify.
8614         * python/py-breakpoint.c (stop_func): Constify.
8615         (bppy_get_expression): Constify.
8616         * python/py-cmd.c (cmdpy_completer::name): Constify.
8617         (cmdpy_function): Constify.
8618         * python/py-event.c (evpy_add_attribute)
8619         (gdbpy_initialize_event_generic): Constify.
8620         * python/py-event.h (evpy_add_attribute)
8621         (gdbpy_initialize_event_generic): Constify.
8622         * python/py-evts.c (add_new_registry): Constify.
8623         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8624         * python/py-framefilter.c (get_py_iter_from_func): Constify.
8625         * python/py-inferior.c (get_buffer): Add cast.
8626         * python/py-param.c (parm_constant::name): Constify.
8627         * python/py-unwind.c (fprint_frame_id): Constify.
8628         * python/python.c (gdbpy_parameter_value): Constify.
8629         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8630         * remote.c (memory_packet_config::name): Constify.
8631         (show_packet_config_cmd, remote_write_bytes)
8632         (remote_buffer_add_string):
8633         * reverse.c (exec_reverse_once): Constify.
8634         * rs6000-tdep.c (variant::name, variant::description): Constify.
8635         * rust-exp.y (rustyyerror): Constify.
8636         * rust-lang.c (rust_op_name): Constify.
8637         * rust-lang.h (rustyyerror): Constify.
8638         * serial.h (serial_ops::name): Constify.
8639         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8640         (sh_sh3e_register_name, sh_sh2e_register_name)
8641         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8642         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8643         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8644         (sh_sh4al_dsp_register_name): Constify.
8645         * sh64-tdep.c (sh64_register_name): Constify.
8646         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8647         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8648         * stabsread.c (patch_block_stabs, read_type_number)
8649         (ref_map::stabs, ref_add, process_reference)
8650         (symbol_reference_defined, define_symbol, define_symbol)
8651         (error_type, read_type, read_member_functions, read_cpp_abbrev)
8652         (read_one_struct_field, read_struct_fields, read_baseclasses)
8653         (read_tilde_fields, read_struct_type, read_array_type)
8654         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8655         (read_huge_number, read_range_type, read_args, common_block_start)
8656         (find_name_end): Constify.
8657         * stabsread.h (common_block_start, define_symbol)
8658         (process_one_symbol, symbol_reference_defined, ref_add):
8659         * symfile.c (get_section_index, add_symbol_file_command):
8660         * symfile.h (get_section_index): Constify.
8661         * target-descriptions.c (tdesc_type::name): Constify.
8662         (tdesc_free_type): Add cast.
8663         * target.c (find_default_run_target):
8664         (add_deprecated_target_alias, find_default_run_target)
8665         (target_announce_detach): Constify.
8666         (do_option): Constify.
8667         * target.h (add_deprecated_target_alias): Constify.
8668         * thread.c (print_thread_info_1): Constify.
8669         * top.c (deprecated_readline_begin_hook, command_line_input):
8670         Constify.
8671         (init_main): Add casts.
8672         * top.h (handle_line_of_input): Constify.
8673         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8674         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8675         (tfind_command): Rename to ...
8676         (tfind_command_1): ... this and constify.
8677         (tfind_command): New function.
8678         (tfind_end_command, tfind_start_command): Adjust.
8679         (encode_source_string): Constify.
8680         * tracepoint.h (encode_source_string): Constify.
8681         * tui/tui-data.c (tui_partial_win_by_name): Constify.
8682         * tui/tui-data.h (tui_partial_win_by_name): Constify.
8683         * tui/tui-source.c (tui_set_source_content_nil): Constify.
8684         * tui/tui-source.h (tui_set_source_content_nil): Constify.
8685         * tui/tui-win.c (parse_scrolling_args): Constify.
8686         * tui/tui-windata.c (tui_erase_data_content): Constify.
8687         * tui/tui-windata.h (tui_erase_data_content): Constify.
8688         * tui/tui-winsource.c (tui_erase_source_content): Constify.
8689         * tui/tui.c (tui_enable): Add cast.
8690         * utils.c (defaulted_query): Constify.
8691         (init_page_info): Add cast.
8692         (puts_debug, subset_compare): Constify.
8693         * utils.h (subset_compare): Constify.
8694         * varobj.c (varobj_format_string): Constify.
8695         * varobj.h (varobj_format_string): Constify.
8696         * vax-tdep.c (vax_register_name): Constify.
8697         * windows-nat.c (windows_detach): Constify.
8698         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8699         * xml-support.c (gdb_xml_end_element): Constify.
8700         * xml-tdesc.c (tdesc_start_reg): Constify.
8701         * xstormy16-tdep.c (xstormy16_register_name): Constify.
8702         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8703         * xtensa-tdep.h (xtensa_register_t::name): Constify.
8704
8705 2017-04-05  Pedro Alves  <palves@redhat.com>
8706
8707         * proc-api.c (struct trans): Constify.
8708         (procfs_note): Constify.
8709         * proc-events.c (struct trans, syscall_table):
8710         * proc-flags.c (struct trans): Constify.
8711         * proc-utils.h (procfs_note): Constify.
8712         * proc-why.c (struct trans): Constify.
8713         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8714         (procfs_detach): Constify.
8715         * sol-thread.c (struct string_map): Constify.
8716         (td_err_string, td_state_string): Constify.
8717
8718 2017-04-05  Pedro Alves  <palves@redhat.com>
8719
8720         * proc-api.c (procfs_filename): Don't initialize
8721         procfs_filename.
8722         (prepare_to_trace): Assume procfs_filename is non-NULL.
8723         (_initialize_proc_api): Give procfs_filename a default value here.
8724
8725 2017-04-05  Pedro Alves  <palves@redhat.com>
8726
8727         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8728         'cond_string' parameter.
8729         (extract_exception_regexp): Constify 'string' parameter.
8730         (catch_exception_command_1): Constify.
8731         * breakpoint.c (init_catchpoint)
8732         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8733         parameter.
8734         (ep_parse_optional_if_clause, catch_fork_command_1)
8735         (catch_exec_command_1): Constify.
8736         * breakpoint.h (init_catchpoint): Constify 'cond_string'
8737         parameter.
8738         (ep_parse_optional_if_clause): Constify.
8739         * cli/cli-utils.c (remove_trailing_whitespace)
8740         (check_for_argument): Constify.
8741         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8742         non-const overload.
8743         (check_for_argument): Likewise.
8744
8745 2017-04-05  Pedro Alves  <palves@redhat.com>
8746
8747         * event-top.c (command_line_handler): Add cast to execute_command
8748         call.
8749         * record-btrace.c (cmd_record_btrace_bts_start)
8750         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8751         (cmd_record_btrace_start): Add cast to execute_command call.
8752         * record-full.c (record_full_goto_insn):
8753         * record.c (record_start, record_stop): Add cast to
8754         execute_command_to_string calls.
8755         (cmd_record_start): Add cast to execute_command calls.
8756
8757 2017-04-05  Pedro Alves  <palves@redhat.com>
8758
8759         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8760         static inline function.
8761         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8762         array and use gdb_PyArg_ParseTupleAndKeywords.
8763         * python/py-cmd.c (cmdpy_init): Likewise.
8764         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8765         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8766         (infpy_search_memory): Likewise.
8767         * python/py-objfile.c (objfpy_add_separate_debug_file)
8768         (gdbpy_lookup_objfile): Likewise.
8769         * python/py-symbol.c (gdbpy_lookup_symbol)
8770         (gdbpy_lookup_global_symbol): Likewise.
8771         * python/py-type.c (gdbpy_lookup_type): Likewise.
8772         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8773         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8774         Likewise.
8775
8776 2017-04-05  Pedro Alves  <palves@redhat.com>
8777
8778         * python/python-internal.h (gdb_PyGetSetDef): New type.
8779         * python/py-block.c (block_object_getset)
8780         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8781         * python/py-event.c (event_object_getset)
8782         (finish_breakpoint_object_getset): Likewise.
8783         * python/py-inferior.c (inferior_object_getset): Likewise.
8784         * python/py-infthread.c (thread_object_getset): Likewise.
8785         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8786         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8787         * python/py-objfile.c (objfile_getset): Likewise.
8788         * python/py-progspace.c (pspace_getset): Likewise.
8789         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8790         Likewise.
8791         * python/py-record.c (recpy_record_getset): Likewise.
8792         * python/py-symbol.c (symbol_object_getset): Likewise.
8793         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8794         Likewise.
8795         * python/py-type.c (type_object_getset, field_object_getset):
8796         Likewise.
8797         * python/py-value.c (value_object_getset): Likewise.
8798
8799 2017-04-05  Pedro Alves  <palves@redhat.com>
8800
8801         * python/python-internal.h (gdb_PyObject_CallMethod)
8802         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8803         New functions.
8804         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8805         (PySys_GetObject, PySys_SetPath): New macros.
8806
8807 2017-04-05  Pedro Alves  <palves@redhat.com>
8808
8809         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8810         info_osdata_command.
8811         * osdata.c (info_osdata_command): Rename to ...
8812         (info_osdata): ... this.  Constify 'type' parameter, and remove
8813         the 'from_tty' parameter.  Accept NULL TYPE.
8814         (info_osdata_command): New function.
8815         * osdata.h (info_osdata_command): Remove declaration.
8816         (info_osdata): New declaration.
8817
8818 2017-04-05  Pedro Alves  <palves@redhat.com>
8819
8820         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8821         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8822         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8823         parameter.
8824         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8825         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8826         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8827         parameter.
8828         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8829         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8830         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8831         (mi_cmd_file_list_exec_source_files)
8832         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8833         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8834         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8835         parameter.
8836         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8837         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8838         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8839         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8840         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8841         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8842         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8843         'command' parameter.
8844         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8845         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8846         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8847         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8848         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8849         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8850         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8851         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8852         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8853         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8854         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8855         parameter.
8856         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8857         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8858         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8859         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8860         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8861         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8862         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8863         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8864         (mi_cmd_data_list_changed_registers)
8865         (mi_cmd_data_write_register_values)
8866         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8867         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8868         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8869         (mi_cmd_list_features, mi_cmd_list_target_features)
8870         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8871         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8872         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8873         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8874         (mi_cmd_trace_frame_collected): Constify 'command'
8875         parameter.
8876         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8877         'command' parameter.
8878
8879 2017-04-05  Pedro Alves  <palves@redhat.com>
8880
8881         * ada-lang.c (ada_completer_word_break_characters): Now a const
8882         array.
8883         (ada_get_gdb_completer_word_break_characters): Constify.
8884         * completer.c (gdb_completer_command_word_break_characters)
8885         (gdb_completer_file_name_break_characters)
8886         (gdb_completer_quote_characters): Now const arrays.
8887         (get_gdb_completer_quote_characters): Constify.
8888         (set_rl_completer_word_break_characters): New function.
8889         (set_gdb_completion_word_break_characters)
8890         (complete_line_internal): Use it.
8891         * completer.h (get_gdb_completer_quote_characters): Constify.
8892         (set_rl_completer_word_break_characters): Declare.
8893         * f-lang.c (f_word_break_characters): Constify.
8894         * language.c (default_word_break_characters): Constify.
8895         * language.h (language_defn::la_word_break_characters): Constify.
8896         (default_word_break_characters): Constify.
8897         * top.c (init_main): Use set_rl_completer_word_break_characters.
8898
8899 2017-04-05  Pedro Alves  <palves@redhat.com>
8900
8901         * aix-thread.c (aix_thread_pid_to_str)
8902         (aix_thread_extra_thread_info): Constify.
8903         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8904         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8905         (bsd_uthread_pid_to_str): Constify.
8906         * corelow.c (core_pid_to_str): Constify.
8907         * darwin-nat.c (darwin_pid_to_str): Constify.
8908         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8909         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8910         Constify.
8911         * gnu-nat.c (gnu_pid_to_str): Constify.
8912         * go32-nat.c (go32_pid_to_str): Constify.
8913         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8914         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8915         * inferior.c (inferior_pid_to_str): Constify.
8916         * linux-nat.c (linux_nat_pid_to_str): Constify.
8917         * linux-tdep.c (linux_core_pid_to_str): Constify.
8918         * linux-thread-db.c (thread_db_pid_to_str)
8919         (thread_db_extra_thread_info): Constify.
8920         * nto-tdep.c (nto_extra_thread_info): Constify.
8921         * nto-tdep.h (nto_extra_thread_info): Constify.
8922         * obsd-nat.c (obsd_pid_to_str): Constify.
8923         * procfs.c (procfs_pid_to_str): Constify.
8924         * ravenscar-thread.c (ravenscar_extra_thread_info)
8925         (ravenscar_pid_to_str): Constify.
8926         * remote-sim.c (gdbsim_pid_to_str): Constify.
8927         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8928         Constify.
8929         * sol-thread.c (solaris_pid_to_str): Constify.
8930         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8931         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8932         * target.c (default_pid_to_str, target_pid_to_str)
8933         (normal_pid_to_str, default_pid_to_str): Constify.
8934         * target.h (target_ops::to_pid_to_str)
8935         (target_ops::to_extra_thread_info): Constify.
8936         (target_pid_to_str, normal_pid_to_str): Constify.
8937         * windows-nat.c (windows_pid_to_str): Constify.
8938         * gdbarch.sh (core_pid_to_str): Constify.
8939         * target-delegates.c: Regenerate.
8940         * gdbarch.h, gdbarch.c: Regenerate.
8941
8942 2017-04-05  Pedro Alves  <palves@redhat.com>
8943
8944         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8945         the memory of the temporary warning_pre_print override.
8946         * utils.c (warning_pre_print): Constify.
8947         * utils.h (warning_pre_print): Constify.
8948
8949 2017-04-05  Pedro Alves  <palves@redhat.com>
8950
8951         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8952         (shell_command): New function.
8953         (make_command): Use std::string.
8954         (init_cli_cmds): Register shell_command instead of shell_escape.
8955
8956 2017-04-05  Pedro Alves  <palves@redhat.com>
8957
8958         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8959         * tracepoint.c (default_collect): Don't initialize.
8960
8961 2017-04-05  Pedro Alves  <palves@redhat.com>
8962
8963         * macroexp.c (macro_buffer::shared): Now a bool.
8964         (init_buffer): Update.
8965         (init_shared_buffer): Constify 'addr' parameter.
8966         (substitute_args, expand, macro_expand, macro_expand_next): Remove
8967         casts.
8968
8969 2017-04-05  Pedro Alves  <palves@redhat.com>
8970
8971         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8972         * disasm.c (set_disassembler_options): Constify local.
8973         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8974
8975 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
8976
8977         PR gdb/21352
8978         * tracefile.c (tsave_command): Fix argument parsing for '-r'
8979         option.
8980
8981 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8982
8983         * frame.c (frame_unwind_register_unsigned): Call
8984         frame_unwind_register_value.
8985
8986 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8987
8988         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8989         Use gdb_test_multiple, and don't match anchor.
8990
8991 2017-04-05  Pedro Alves  <palves@redhat.com>
8992
8993         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8994         (Write After Approval): Remove Simon Marchi.
8995
8996 2017-04-05  Pedro Alves  <palves@redhat.com>
8997
8998         * common/gdb_optional.h (optional::optional): Make constexpr and
8999         initialize m_dummy.
9000
9001 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9002
9003         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9004         (amd64fbsd_jmp_buf_reg_offset): Remove.
9005         (amd64fbsd_supply_uthread): Remove function.
9006         (amd64fbsd_collect_uthread): Remove function.
9007         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9008         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9009         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9010         (fbsd-nat.c): Update comment.
9011         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9012         (i386fbsd_jmp_buf_reg_offset): Remove.
9013         (i386fbsd_supply_uthread): Remove function.
9014         (i386fbsd_collect_uthread): Remove function.
9015         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9016
9017 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9018
9019         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9020         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9021         * NEWS: Mention that support for FreeBSD/alpha was removed.
9022         * alpha-fbsd-tdep.c: Delete file.
9023         * config/alpha/fbsd.mh: Delete file.
9024         * configure.host: Delete alpha*-*-freebsd* and
9025         alpha*-*-kfreebsd*-gnu.
9026         * configure.tgt: Delete alpha*-*-freebsd* and
9027         alpha*-*-kfreebsd*-gnu.
9028
9029 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9030
9031         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9032         amd64bsd_store_inferior_registers): Use ptid from regcache.
9033
9034 2017-04-04  Pedro Alves  <palves@redhat.com>
9035
9036         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9037         data fields, make them private and add "m_" prefixes.
9038         (lnp_state_machine::lnp_state_machine): New ctor.
9039         (record_line, check_line_address, handle_set_discriminator)
9040         (handle_set_address, handle_advance_pc, handle_special_opcode)
9041         (handle_advance_line, handle_set_file, handle_negate_stmt)
9042         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9043         (end_sequence, advance_line): New methods.
9044         (m_gdbarch, m_record_lines_p): New fields.
9045         (lnp_reader_state): Delete.
9046         (dwarf_record_line): Rename to ...
9047         (lnp_state_machine::record_line): ... adjust.
9048         (init_lnp_state_machine): Delete.
9049         (lnp_state_machine::lnp_state_machine): New.
9050         (check_line_address): Rename to ...
9051         (lnp_state_machine::check_line_address): This.
9052         (dwarf_decode_lines_1): Remove reference to "reader_state".
9053         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9054         State machine internal state manipulation moved to
9055         lnp_state_machine methods.
9056
9057 2017-04-04  Pedro Alves  <palves@redhat.com>
9058
9059         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9060         unittests/offset-type-selftests.c.
9061         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9062         * common/offset-type.h: New file.
9063         * common/preprocessor.h: New file.
9064         * common/traits.h: New file.
9065         * common/valid-expr.h: New file.
9066         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9067         sect_offset and cu_offset strong typedefs throughout.
9068         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9069         typedefs throughout.
9070         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9071         sect_offset and cu_offset strong typedefs throughout.
9072         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9073         typedefs throughout.
9074         * gdbtypes.h: Include "common/offset-type.h".
9075         (cu_offset): Now an offset type (strong typedef) instead of a
9076         struct.
9077         (sect_offset): Likewise.
9078         (union call_site_parameter_u): Rename "param_offset" field to
9079         "param_cu_off".
9080         * unittests/offset-type-selftests.c: New file.
9081
9082 2017-04-04  Pedro Alves  <palves@redhat.com>
9083
9084         * common/underlying.h: New file.
9085         * dwarf2read.c: Include "common/gdb_optional.h" and
9086         "common/underlying.h".
9087         (dir_index, file_name_index): New types.
9088         (file_entry): Use them.
9089         (file_entry::include): Use to_underlying.
9090         (line_header::add_file_name): Use dir_index.
9091         (read_formatted_entries): Use gdb::optional.  Read form before
9092         writting to file_entry.
9093         (dwarf_decode_line_header): Use dir_index.
9094         (lnp_state_machine::current_file): Use to_underlying.
9095         (lnp_state_machine::file): Change type to file_name_index.
9096         (dwarf_record_line): Use to_underlying.
9097         (init_lnp_state_machine): Use file_name_index.
9098         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9099
9100 2017-04-04  Pedro Alves  <palves@redhat.com>
9101
9102         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9103         operator bool, has_value and get methods.
9104
9105 2017-04-04  Pedro Alves  <palves@redhat.com>
9106
9107         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9108         fields.
9109         (line_header): Initialize all data fields.  Change type of
9110         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9111         Change type of include_dirs to std::vector<const char *>.  Remove
9112         num_include_dirs, include_dirs_size.  Change type of file_names to
9113         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9114         (line_header::line_header): New.
9115         (line_header::add_include_dir, line_header::add_file_name): New
9116         methods.
9117         (line_header::include_dir_at): Remove NULL check.
9118         (line_header::file_name_at): Add const overload.
9119         (line_header_up): New unique_ptr typedef.
9120         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9121         std::vector.  Remove free_line_header call.
9122         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9123         free_line_header call.
9124         (free_cu_line_header): Delete.
9125         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9126         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9127         Adjust to use std::vector.
9128         (free_line_header): Delete.
9129         (free_line_header_voidp): Use delete.
9130         (add_include_dir): Replace with ...
9131         (line_header::add_include_dir): ... this method.  Use std::vector.
9132         (add_file_name): Replace with ...
9133         (line_header::add_file_name): ... this method.  Use std::vector.
9134         (add_include_dir_stub): Delete.
9135         (read_formatted_entries): Remove memset.
9136         (dwarf_decode_line_header): Return a line_header_up instead of a
9137         raw pointer.  Remove cleanup handling.  Pass lambdas to
9138         read_formatted_entries.  Adjust to use line_header methods.
9139         (dwarf_decode_lines_1): Adjust to use line_header methods.
9140         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9141         use std::vector.
9142
9143 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9144
9145         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9146         instead of struct ptid.
9147
9148 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9149
9150         * frame.c (get_frame_register_bytes): Unwind using value.
9151         (put_frame_register_bytes): Likewise.
9152
9153 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9154
9155         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9156         aggregate-like.
9157
9158 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9159
9160         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9161
9162 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9163
9164         * gdbthread.h (struct thread_info): Declare constructor and
9165         destructor.  Add some in-class member initializers.
9166         * thread.c (free_thread): Remove.
9167         (init_thread_list): Call delete instead of free_thread.
9168         (new_thread): Call thread_info constructor.
9169         (thread_info::thread_info): New function.
9170         (thread_info::~thread_info): New function.
9171         (delete_thread_1): Call delete instead of free_thread.
9172         (make_cleanup_restore_current_thread): Move tp and frame to
9173         inner block.
9174
9175 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9176
9177         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9178         (arc_skip_prologue): Likewise.
9179         (arc_make_frame_cache): Likewise.
9180         (arc_pv_get_operand): New function.
9181         (arc_is_in_prologue): Likewise.
9182         (arc_analyze_prologue): Likewise.
9183         (arc_print_frame_cache): Likewise.
9184         (MAX_PROLOGUE_LENGTH): New constant.
9185
9186 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9187
9188         * configure.tgt: Add arc-insn.o.
9189         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9190         (dump_arc_instruction_command): New function.
9191         (arc_fprintf_disasm): Likewise.
9192         (arc_disassemble_info): Likewise.
9193         (arc_insn_get_operand_value): Likewise.
9194         (arc_insn_get_operand_value_signed): Likewise.
9195         (arc_insn_get_memory_base_reg): Likewise.
9196         (arc_insn_get_memory_offset): Likewise.
9197         (arc_insn_get_branch_target): Likewise.
9198         (arc_insn_dump): Likewise.
9199         (arc_insn_get_linear_next_pc): Likewise.
9200         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9201         (arc_disassemble_info): Likewise.
9202         (arc_insn_get_branch_target): Likewise.
9203         (arc_insn_get_linear_next_pc): Likewise.
9204         * NEWS: Mention new "maint print arc arc-instruction".
9205
9206 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9207
9208         * arc-tdep (maintenance_print_arc_list): New variable.
9209         (maintenance_print_arc_command): New function.
9210
9211 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9212
9213         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9214         Add "limm" and "reserved".
9215         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9216         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9217         * arc-tdep.h (arc_regnum): Likewise.
9218
9219 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9220
9221         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9222         for THREADPTR register.
9223         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9224         register.
9225         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9226         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9227         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9228
9229 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9230
9231         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9232         registers above gdbarch_num_regs (gdbarch) as privileged in
9233         call0 ABI.
9234
9235 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9236
9237         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9238         for a single specified register or for all registers in
9239         a0_base..a0_base + C0_NREGS range.
9240         (supply_gregset_reg): Call regcache_raw_supply for a single
9241         specified register or for all registers in a0_base..a0_base +
9242         C0_NREGS range.
9243
9244 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9245
9246         * arch/xtensa.h (C0_NREGS): Add definition.
9247         * xtensa-tdep.c (C0_NREGS): Remove definition.
9248
9249 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9250
9251         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9252         Drop xtensa_default_isa initialization.
9253         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9254
9255 2017-03-27  Pedro Alves  <palves@redhat.com>
9256
9257         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9258         (file_entry::include_dir): New method.
9259         (line_header::include_dir_at, line_header::file_name_at): New
9260         methods.
9261         (setup_type_unit_groups, setup_type_unit_groups)
9262         (psymtab_include_file_name): Simplify using the new methods.
9263         (lnp_state_machine) <the_line_header>: New field.
9264         <file>: Add comment.
9265         (lnp_state_machine::current_file): New method.
9266         (dwarf_record_line): Simplify using the new methods.
9267         (init_lnp_state_machine): Initialize the "the_line_header" field.
9268         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9269         Simplify using the new methods.
9270
9271 2017-03-27  Pedro Alves  <palves@redhat.com>
9272
9273         * cp-name-parser.y (make_empty): Delete.
9274         (demangler_special, nested_name, ptr_operator, array_indicator)
9275         (direct_declarator, declarator_1): Use fill_comp instead of
9276         make_empty.
9277
9278 2017-03-27  Pedro Alves  <palves@redhat.com>
9279
9280         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9281         to ATTRIBUTE_PRINTF.
9282         * solib-target.c (library_list_start_list): Print "string" not
9283         "version".
9284         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9285         gdb_xml_error call.
9286
9287 2017-03-27  Pedro Alves  <palves@redhat.com>
9288
9289         * dwarf2read.c (struct file_and_directory): New.
9290         (dwarf2_get_dwz_file): Adjust to use std::string.
9291         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9292         (find_file_and_directory): Adjust to return a file_and_directory
9293         object.
9294         (read_file_scope): Adjust to use file_and_directory.  Remove
9295         make_cleanup/do_cleanups calls.
9296         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9297         make_cleanup/do_cleanups calls.
9298         * python/python.c (do_start_initialization): Adjust to ldirname
9299         returning a std::string.
9300         * utils.c (ldirname): Now returns a std::string.
9301         * utils.h (ldirname): Change return type to std::string.
9302         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9303         returning a std::string.
9304         * xml-tdesc.c (file_read_description_xml): Likewise.
9305
9306 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9307
9308         * regcache.c (regcache_debug_print_register): New function.
9309         * regcache.h (regcache_debug_print_register): New declaration.
9310         * target.c (debug_print_register): Remove.
9311         (target_fetch_registers): Call regcache_debug_print_register.
9312         (target_store_registers): Likewise.
9313
9314 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9315
9316         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9317         reference beyond the 'lh->include_dirs' array before accessing to
9318         it.
9319         (psymtab_include_file_name): Likewise.
9320         (dwarf_decode_lines_1): Likewise.
9321         (dwarf_decode_lines): Likewise.
9322         (file_file_name): Likewise.
9323
9324 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9325
9326         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9327         inferior_ptid.
9328         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9329         ps_lsetfpregs): Likewise.
9330         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9331         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9332         ps_lsetfpregs): Likewise.
9333         * target.c (target_fetch_registers, target_store_registers):
9334         Remove asserts.
9335
9336 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9337
9338         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9339
9340 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9341
9342         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9343         (_initialize_aarch64_tdep): Register it.
9344         (aarch64_record_load_store): Handle PRFM instruction.
9345         (aarch64_process_record_test): New function.
9346
9347 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9348
9349         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9350         indentation.
9351
9352 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9353
9354         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9355
9356 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9357
9358         python/python.c (do_start_initialization): Fix memory leak.
9359
9360 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9361
9362         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9363         using get_ptrace_pid.
9364         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9365         inferior_ptid.
9366         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9367         inferior_ptid instead of pid.
9368
9369 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9370
9371         * aarch64-tdep.c: Wrap locally used classes in anonymous
9372         namespace.
9373         * arm-tdep.c: Likewise.
9374         * linespec.c: Likewise.
9375         * ui-out.c: Likewise.
9376
9377 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9378
9379         PR gdb/19637
9380         * python/lib/gdb/printer/bound_registers.py: Import sys.
9381
9382 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9383
9384         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9385         windows_thread_info parameter and use it instead of
9386         current_thread.
9387         (windows_fetch_inferior_registers): Don't set current_thread,
9388         pass the thread to do_windows_fetch_inferior_registers.  Use
9389         ptid from regcache instead of inferior_ptid.
9390         (do_windows_store_inferior_registers): Add windows_thread_info
9391         parameter and use it instead of current_thread.
9392         (windows_store_inferior_registers): Don't set current_thread,
9393         pass the thread to do_windows_store_inferior_registers.  Use
9394         ptid from regcache instead of inferior_ptid.
9395
9396 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9397
9398         * ser-mingw.c (ser_windows_raw): Remove reference to
9399         struct serial::current_timeout.
9400
9401 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9402
9403         PR tdep/20928
9404         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9405         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9406         (sparc64_fsr_type): Fix %fsr decoding.
9407
9408 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9409
9410         * python/py-record-btrace.c (btpy_insn_data): Change return type
9411         for Python 2.
9412
9413 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9414
9415         * spu-linux-nat.c (spu_fetch_inferior_registers,
9416         spu_store_inferior_registers): Use ptid from regcache, set and
9417         restore inferior_ptid.
9418         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9419         Likewise.
9420
9421 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9422
9423         * i386-linux-nat.c (fetch_register, store_register,
9424         i386_linux_fetch_inferior_registers,
9425         i386_linux_store_inferior_registers): Use ptid from regcache.
9426         * ia64-linux-nat.c (ia64_linux_fetch_register,
9427         ia64_linux_store_register): Likewise.
9428         * inf-ptrace.c (inf_ptrace_fetch_register,
9429         inf_ptrace_store_register): Likewise.
9430         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9431         m32r_linux_store_inferior_registers): Likewise.
9432         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9433         m68kbsd_store_inferior_registers): Likewise.
9434         * m68k-linux-nat.c (fetch_register, store_register,
9435         m68k_linux_fetch_inferior_registers,
9436         m68k_linux_store_inferior_registers): Likewise.
9437         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9438         m88kbsd_store_inferior_registers): Likewise.
9439         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9440         mips_fbsd_store_inferior_registers): Likewise.
9441         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9442         mips64_linux_regsets_store_registers): Likewise.
9443         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9444         mipsnbsd_store_inferior_registers): Likewise.
9445         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9446         mips64obsd_store_inferior_registers): Likewise.
9447         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9448         Likewise.
9449         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9450         ppcfbsd_store_inferior_registers): Likewise.
9451         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9452         ppc_linux_store_inferior_registers): Likewise.
9453         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9454         ppcnbsd_store_inferior_registers): Likewise.
9455         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9456         ppcobsd_store_registers): Likewise.
9457         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9458         Likewise.
9459         * ravenscar-thread.c (ravenscar_fetch_registers,
9460         ravenscar_store_registers, ravenscar_prepare_to_store):
9461         Likewise.
9462         * record-btrace.c (record_btrace_fetch_registers,
9463         record_btrace_store_registers, record_btrace_prepare_to_store):
9464         Likewise.
9465         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9466         Lookup inferior using ptid from regcache, instead of
9467         current_inferior.
9468         * remote.c (remote_fetch_registers, remote_store_registers): Use
9469         ptid from regcache.
9470         * rs6000-nat.c (fetch_register, store_register): Likewise.
9471         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9472         s390_linux_store_inferior_registers): Likewise.
9473         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9474         shnbsd_store_inferior_registers): Likewise.
9475         * sol-thread.c (sol_thread_fetch_registers,
9476         sol_thread_store_registers): Likewise.
9477         * sparc-nat.c (sparc_fetch_inferior_registers,
9478         sparc_store_inferior_registers): Likewise.
9479         * tilegx-linux-nat.c (fetch_inferior_registers,
9480         store_inferior_registers): Likewise.
9481         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9482         vaxbsd_store_inferior_registers): Likewise.
9483         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9484         store_xtregs): Likewise.
9485
9486 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9487
9488         PR gdb/14441
9489         * NEWS: Mention support for rvalue references in GDB and python.
9490         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9491         supports both lvalue and rvalue references.
9492
9493 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9494
9495         PR gdb/14441
9496         * gdbtypes.c (rank_one_type): Implement overloading
9497         resolution rules regarding rvalue references.
9498
9499 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9500
9501         PR gdb/14441
9502         * aarch64-tdep.c (aarch64_type_align)
9503         (aarch64_extract_return_value, aarch64_store_return_value): Change
9504         lvalue reference type checks to general reference type checks.
9505         * amd64-tdep.c (amd64_classify): Likewise.
9506         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9507         Likewise.
9508         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9509         (arm_store_return_value): Likewise.
9510         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9511         * c-typeprint.c (c_print_type): Likewise.
9512         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9513         (cplus_number_of_children, cplus_describe_child): Likewise.
9514         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9515         * completer.c (expression_completer): Likewise.
9516         * cp-support.c (make_symbol_overload_list_adl_namespace):
9517         Likewise.
9518         * darwin-nat-info.c (info_mach_region_command): Likewise.
9519         * dwarf2loc.c (entry_data_value_coerce_ref)
9520         (value_of_dwarf_reg_entry): Likewise.
9521         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9522         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9523         Likewise.
9524         * findvar.c (extract_typed_address, store_typed_address):
9525         Likewise.
9526         * gdbtypes.c (rank_one_type): Likewise.
9527         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9528         * infcall.c (value_arg_coerce): Likewise.
9529         * language.c (pointer_type): Likewise.
9530         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9531         Likewise.
9532         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9533         * mn10300-tdep.c (mn10300_type_align): Likewise.
9534         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9535         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9536         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9537         Likewise.
9538         * printcmd.c (print_formatted, x_command): Likewise.
9539         * python/py-type.c (typy_get_composite, typy_template_argument):
9540         Likewise.
9541         * python/py-value.c (valpy_referenced_value)
9542         (valpy_get_dynamic_type, value_has_field): Likewise.
9543         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9544         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9545         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9546         * spu-tdep.c (spu_scalar_value_p): Likewise.
9547         * symtab.c (lookup_symbol_aux): Likewise.
9548         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9549         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9550         Likewise.
9551         * valops.c (value_cast_pointers, value_cast)
9552         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9553         (value_struct_elt, value_struct_elt_bitpos)
9554         (value_find_oload_method_list, find_overload_match)
9555         (value_rtti_indirect_type): Likewise.
9556         * valprint.c (val_print_scalar_type_p, generic_val_print):
9557         Likewise.
9558         * value.c (value_actual_type, value_as_address, unpack_long)
9559         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9560         (coerce_ref): Likewise.
9561         * varobj.c (varobj_get_value_type): Likewise.
9562
9563 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9564
9565         PR gdb/14441
9566         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9567         table of constants.
9568         * python/lib/gdb/command/explore.py: Support exploring values
9569         of rvalue reference types.
9570         * python/lib/gdb/types.py: Implement get_basic_type() for
9571         rvalue reference types.
9572         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9573         constant.
9574         * python/py-value.c (valpy_getitem): Add an rvalue reference
9575         check.
9576         (valpy_reference_value): Add new parameter "refcode".
9577         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9578         New wrappers for valpy_reference_value().
9579         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9580         (gdbpy_invoke_xmethod): Likewise.
9581
9582 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9583
9584         PR gdb/14441
9585         * dwarf2read.c (process_die, read_type_die_1): Handle the
9586         DW_TAG_rvalue_reference_type DIE.
9587         (read_tag_reference_type): Add new parameter "refcode".
9588
9589 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9590
9591         PR gdb/14441
9592         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9593         (c_type_print_modifier, c_type_print_varspec_suffix)
9594         (c_type_print_base): Support printing rvalue reference types.
9595         * c-valprint.c (c_val_print, c_value_print): Support printing
9596         rvalue reference values.
9597
9598 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9599
9600         PR gdb/14441
9601         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9602         typename.
9603         * cp-support.c (replace_typedefs): Handle
9604         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9605         * python/py-type.c (typy_lookup_type): Likewise.
9606
9607 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9608
9609         PR gdb/14441
9610         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9611         * parse.c (insert_type): Change assert statement.
9612         (follow_types): Handle rvalue reference types.
9613         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9614         constant.
9615
9616 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9617
9618         PR gdb/14441
9619         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9620         value_ref() interface.
9621         * c-valprint.c (c_value_print): Likewise.
9622         * infcall.c (value_arg_coerce): Likewise.
9623         * python/py-value.c (valpy_reference_value): Likewise.
9624         * valops.c (value_cast, value_reinterpret_cast)
9625         (value_dynamic_cast, typecmp): Likewise.
9626         (value_ref): Parameterize by kind of return value reference type.
9627         * value.h (value_ref): Add new parameter "refcode".
9628
9629 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9630
9631         PR gdb/14441
9632         * dwarf2read.c (read_tag_reference_type): Use
9633         lookup_lvalue_reference_type() instead of lookup_reference_type().
9634         * eval.c (evaluate_subexp_standard): Likewise.
9635         * f-exp.y: Likewise.
9636         * gdbtypes.c (make_reference_type, lookup_reference_type):
9637         Generalize with rvalue reference types.
9638         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9639         convenience wrappers for lookup_reference_type().
9640         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9641         reference kind parameter.
9642         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9643         wrappers for lookup_reference_type().
9644         * guile/scm-type.c (gdbscm_type_reference): Use
9645         lookup_lvalue_reference_type() instead of lookup_reference_type().
9646         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9647         * parse.c (follow_types): Likewise.
9648         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9649         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9650         Likewise.
9651         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9652         (gdbpy_invoke_xmethod): Likewise.
9653         * stabsread.c: Provide extra argument to make_reference_type()
9654         call.
9655         * valops.c (value_ref, value_rtti_indirect_type): Use
9656         lookup_lvalue_reference_type() instead of lookup_reference_type().
9657
9658 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9659
9660         PR gdb/14441
9661         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9662         (TYPE_IS_REFERENCE): New macro.
9663         (struct type): Add rvalue_reference_type field.
9664         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9665
9666 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9667
9668         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9669         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9670         New function definition.
9671         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9672         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9673         New function declaration.
9674         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9675         * mi/mi-interp.h: New file.
9676         * solib.c (info_sharedlibrary_command): Replace for loop with
9677         ALL_SO_LIBS macro
9678         * solib.h (update_solib_list): New function declaration.
9679         (so_list_head): Move macro.
9680         * solist.h (ALL_SO_LIBS): New macro.
9681
9682 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9683
9684         * infcmd.c (post_create_inferior): Remove unused argument in
9685         call to solib_add.
9686         * remote.c (remote_start_remote): Likewise.
9687         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9688         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9689         (enable_break): Likewise.
9690         * solib.c (update_solib_list): Remove unused target argument
9691         and its documentation.
9692         (solib_add): Remove unused target argument.  Remove unused
9693         argument in call to update_solib_list.
9694         (info_sharedlibrary_command): Remove unused argument in call
9695         to update_solib_list.
9696         (sharedlibrary_command): Remove unused argument in call to
9697         solib_add.
9698         (handle_solib_event): Likewise.
9699         (reload_shared_libraries): Likewise.
9700         * solib.h (solib_add): Remove unused target argument.
9701
9702 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9703
9704         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9705         (s390_displaced_step_fixup): Cover relative branches with the
9706         default fixup handling.  This fixes lack of support for some
9707         relative branch instructions.
9708
9709 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9710
9711         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9712         ptid from regcache.
9713
9714 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9715
9716         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9717         i386_darwin_store_inferior_registers): Use ptid from regcache.
9718
9719 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9720
9721         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9722         i386bsd_store_inferior_registers): Use ptid from regcache.
9723
9724 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9725
9726         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9727         hppaobsd_store_registers): Use ptid from regcache.
9728
9729 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9730
9731         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9732         hppanbsd_store_registers): Use ptid from regcache.
9733
9734 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9735
9736         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9737         from regcache.  Use get_ptrace_pid.
9738
9739 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9740
9741         * corelow.c (get_core_register_section): Use ptid from regcache,
9742         update doc.
9743
9744 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9745
9746         * bsd-uthread.c (bsd_uthread_fetch_registers,
9747         bsd_uthread_store_registers): Use ptid from regcache, set and
9748         restore inferior_ptid.
9749
9750 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9751
9752         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9753         fetch_fp_regs, store_register, store_regs, store_fp_register,
9754         store_fp_regs): Use ptid from regcache.
9755
9756 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9757
9758         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9759         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9760         store_vfp_regs): Use ptid from regcache.
9761
9762 2017-03-17  Pedro Alves  <palves@redhat.com>
9763
9764         PR remote/21188
9765         * ser-base.c (ser_base_wait_for): Add comment.
9766         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9767         version.
9768         * ser-unix.c (hardwire_raw): Remove reference to
9769         scb->current_timeout.
9770         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9771         (hardwire_ops): Install ser_base_readchar instead of
9772         hardwire_readchar.
9773         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9774         Remove fields.
9775
9776 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9777
9778         PR gdb/19637
9779         * python/lib/gdb/printer/bound_registers.py: Add support for
9780         Python 3.
9781
9782 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9783
9784         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9785         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9786         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9787         byte_offset to subobj_byte_offset.  Fix the handling of
9788         DWARF_VALUE_STACK on big-endian targets when coming via an
9789         implicit pointer.
9790         (dwarf2_evaluate_loc_desc): Adjust call to
9791         dwarf2_evaluate_loc_desc_full.
9792         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9793         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9794
9795 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9796
9797         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9798         and REVSH instructions.
9799
9800 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9801
9802         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9803         (arm_record_test): Declare.
9804         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9805         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9806         align with the manual.
9807         (thumb_record_misc): Adjust the code order to align with the
9808         manual.
9809         (thumb2_record_decode_insn_handler): Fix instruction matching.
9810         (instruction_reader_thumb): New class.
9811         (arm_record_test): New function.
9812
9813 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9814
9815         * arm-tdep.c (abstract_memory_reader): New class.
9816         (instruction_reader): New class.
9817         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9818         (decode_insn): Likewise.
9819
9820 2017-03-16  Doug Evans  <dje@google.com>
9821
9822         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9823         member.  Change type of TYPE member to SCM.  All uses updated.
9824         (lsscm_make_lazy_string_smob): Add assert.
9825         (lsscm_make_lazy_string): Flag bad length values.
9826         (lsscm_elt_type): New function.
9827         (gdbscm_lazy_string_to_value): Rewrite to use
9828         lsscm_safe_lazy_string_to_value.
9829         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9830         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9831         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9832         in incoming type.
9833         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9834         * guile/scm-type.c (tyscm_scm_to_type): New function.
9835
9836 2017-03-15  Doug Evans  <dje@google.com>
9837
9838         PR python/17728, python/18439, python/18779
9839         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9840         member.  Change type of TYPE member to PyObject *.  All uses updated.
9841         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9842         (gdbpy_create_lazy_string_object): Flag bad length values.
9843         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9844         Handle typedefs in incoming type.
9845         (stpy_lazy_string_elt_type): New function.
9846         (gdbpy_extract_lazy_string): Call it.
9847         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9848         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9849         typedefs in incoming type.
9850
9851 2017-03-16  Doug Evans  <dje@google.com>
9852
9853         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9854         * guile/scm-type.c (tyscm_scm_to_type): New function.
9855
9856 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9857
9858         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9859         "ULONGEST" for "skip".
9860
9861 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9862
9863         PR gdb/21220
9864         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9865         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9866         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9867         over ptrace peek/poke until end of buffer or error.
9868
9869 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9870
9871         * parse.c (length_of_subexp): Make static.
9872         * parser-defs.h (length_of_subexp): Remove.
9873
9874 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9875
9876         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9877         as well.
9878
9879 2017-03-14  Pedro Alves  <palves@redhat.com>
9880
9881         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9882         (main): Use std::unique_ptr.  Remove calls to
9883         cp_demangled_name_parse_free.
9884
9885 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9886
9887         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9888         alphabsd_store_inferior_registers): Use regcache->ptid instead
9889         of inferior_ptid.
9890
9891 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9892
9893         * aix-thread.c (aix_thread_fetch_registers,
9894         aix_thread_store_registers): Use regcache->ptid instead of
9895         inferior_ptid.
9896
9897 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9898
9899         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9900         store_gregs_to_thread, fetch_fpregs_from_thread,
9901         store_fpregs_to_thread): Use regcache->ptid instead of
9902         inferior_ptid.
9903
9904 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9905
9906         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9907         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9908         instead of inferior_ptid.
9909
9910 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9911
9912         * target.c (target_fetch_registers, target_store_registers): Add
9913         assert.
9914
9915 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9916
9917         * regcache.h (regcache_get_ptid): New function.
9918         * regcache.c (regcache_get_ptid): New function.
9919
9920 2017-03-13  Mark Wielaard  <mark@klomp.org>
9921
9922         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9923
9924 2017-03-10  Keith Seitz  <keiths@redhat.com>
9925
9926         PR c++/8218
9927         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9928
9929 2017-03-08  Pedro Alves  <palves@redhat.com>
9930
9931         PR gdb/18360
9932         * infrun.c (start_step_over, do_target_resume, resume)
9933         (restart_threads): Assert we're not resuming a thread that is
9934         meant to be stopped.
9935         (infrun_thread_stop_requested_callback): Delete.
9936         (infrun_thread_stop_requested): If the thread is internally
9937         stopped, queue a pending stop event and clear the thread's
9938         inline-frame state.
9939         (handle_stop_requested): New function.
9940         (handle_syscall_event, handle_inferior_event_1): Use
9941         handle_stop_requested.
9942         (handle_stop_requested): New function.
9943         (handle_signal_stop): Set the thread's stop_signal here instead of
9944         at caller.
9945         (finish_step_over): Clear step over info unconditionally.
9946         (handle_signal_stop): If the user had interrupted the event
9947         thread, consider the stop a random signal.
9948         (handle_signal_stop) <signal arrived while stepping over
9949         breakpoint>: Don't restart threads here.
9950         (stop_waiting): Don't clear step-over info here.
9951
9952 2017-03-08  Pedro Alves  <palves@redhat.com>
9953
9954         PR 21206
9955         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9956         goes to argument 2, not 1.
9957
9958 2017-03-08  Pedro Alves  <palves@redhat.com>
9959
9960         PR cli/21218
9961         * top.c (gdb_readline_wrapper): Avoid passing NULL to
9962         display_gdb_prompt.
9963         (command_line_input): Add comment.
9964
9965 2017-03-08  Pedro Alves  <palves@redhat.com>
9966
9967         PR tui/21216
9968         * tui/tui-file.c (tui_file::write): New.
9969         * tui/tui-file.h (tui_file): Override "write".
9970         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9971         factored out from ...
9972         (tui_puts): ... here.
9973         (tui_putc): Use them.
9974         (tui_write): New function.
9975         * tui/tui-io.h (tui_write): Declare.
9976
9977 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9978
9979         * Makefile.in (SFILES): Replace "environ.c" with
9980         "common/environ.c".
9981         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9982         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
9983         to...
9984         * common/environ.c: ... here.
9985         * environ.h: Moved to...
9986         * common/environ.h: ... here.
9987
9988 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9989
9990         * gdbarch.sh (pstring_ptr): New static function.
9991         (gdbarch_disassembler_options): Use it.
9992         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9993         not valid_disassembler_option->name.
9994         * gdbarch.c: Regenerate.
9995
9996 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9997
9998         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9999
10000 2017-03-07  Pedro Alves  <palves@redhat.com>
10001
10002         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10003
10004 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10005
10006         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10007         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10008         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10009         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10010
10011 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10012
10013         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10014
10015 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10016
10017         * remote.c (remote_add_target_side_commands): Use range-based
10018         for loop.
10019
10020 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10021
10022         PR gdb/21165
10023         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10024         value is lazy.
10025         * valprint.c (common_val_print): Likewise.
10026
10027 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10028
10029         * NEWS: Mention new set/show disassembler-options commands.
10030         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10031         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10032         (prospective_options): New static variable.
10033         (gdb_disassembler::gdb_disassembler): Initialize
10034         m_di.disassembler_options.
10035         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10036         (get_disassembler_options): New function.
10037         (set_disassembler_options): Likewise.
10038         (set_disassembler_options_sfunc): Likewise.
10039         (show_disassembler_options_sfunc): Likewise.
10040         (disassembler_options_completer): Likewise.
10041         (_initialize_disasm): Likewise.
10042         * disasm.h (get_disassembler_options): New prototype.
10043         (set_disassembler_options): Likewise.
10044         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10045         (gdbarch_verify_disassembler_options): Likewise.
10046         * gdbarch.c: Regenerate.
10047         * gdbarch.h: Likewise.
10048         * arm-tdep.c (num_disassembly_options): Delete.
10049         (set_disassembly_style): Likewise.
10050         (arm_disassembler_options): New static variable.
10051         (set_disassembly_style_sfunc): Convert short style name into long
10052         option name.  Call set_disassembler_options.
10053         (show_disassembly_style_sfunc): New function.
10054         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10055         set_gdbarch_verify_disassembler_options.
10056         (_initialize_arm_tdep): Delete regnames variable and update callers.
10057         (arm_disassembler_options): Initialize.
10058         (disasm_options): New variable.
10059         (num_disassembly_options): Rename from this...
10060         (num_disassembly_styles): ...to this.  Compute by scanning through
10061         disasm_options.
10062         (valid_disassembly_styles): Initialize using disasm_options.
10063         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10064         set_arm_regname_option.
10065         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10066         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10067         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10068         set_gdbarch_verify_disassembler_options.
10069         * s390-tdep.c (s390_disassembler_options): New static variable.
10070         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10071         set_gdbarch_verify_disassembler_options.
10072
10073 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10074
10075         * remote.c (remote_add_target_side_condition): Remove "struct"
10076         keyword from range-based for loop.
10077
10078 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10079
10080         * remote.c (remote_add_target_side_condition): Use range-based
10081         for loop.  Update comment.
10082
10083 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10084
10085         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10086
10087 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10088
10089         * regcache.c (regcache_raw_update): New function.
10090         (regcache_raw_read): Move code to regcache_raw_update.
10091         * regcache.h (regcache_raw_update): New declaration.
10092         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10093
10094 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10095
10096         * dwarf2read.c (create_debug_type_hash_table): Initialize
10097         header.signature and header.type_offset_in_tu.
10098
10099 2017-02-24  Pedro Alves  <palves@redhat.com>
10100
10101         * symtab.c (make_file_symbol_completion_list_1): Use
10102         add_symtab_completions.
10103
10104 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10105
10106         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10107
10108 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10109
10110         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10111         I386_MAX_REGISTER_SIZE.
10112         (i386_pseudo_register_write): Likewise.
10113         (i386_process_record): Likewise.
10114         * i387-tdep.c (i387_supply_xsave): Likewise.
10115         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10116         (store_register): Likewise.
10117
10118 2017-02-23  Pedro Alves  <palves@redhat.com>
10119
10120         * ada-lang.c: Include "common/function-view.h".
10121         (ada_iterate_over_symbols): Adjust to use function_view as
10122         callback type.
10123         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10124         (ada_make_symbol_completion_list): Use a lambda.
10125         (ada_exc_search_name_matches): Delete.
10126         (name_matches_regex): New.
10127         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10128         * compile/compile-c-support.c: Include "common/function-view.h".
10129         (print_one_macro): Change prototype to accept a ui_file pointer.
10130         (write_macro_definitions): Use a lambda.
10131         * dwarf2read.c: Include "common/function-view.h".
10132         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10133         (dw2_expand_symtabs_matching): Adjust to use function_view as
10134         callback type.
10135         * language.h: Include "common/function-view.h".
10136         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10137         function_view as callback type.
10138         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10139         * linespec.c: Include "common/function-view.h".
10140         (collect_info::add_symbol): New method.
10141         (struct symbol_and_data_callback, iterate_inline_only, struct
10142         symbol_matcher_data, iterate_name_matcher): Delete.
10143         (iterate_over_all_matching_symtabs): Adjust to use function_view
10144         as callback type and lambdas.
10145         (iterate_over_file_blocks): Adjust to use function_view as
10146         callback type.
10147         (decode_compound_collector): Now a class with private fields.
10148         (decode_compound_collector::release_symbols): New method.
10149         (collect_one_symbol): Rename to...
10150         (decode_compound_collector::operator()): ... this and adjust.
10151         (lookup_prefix_sym): decode_compound_collector construction bits
10152         move to decode_compound_collector ctor.  Pass the
10153         decode_compound_collector object directly as callback.  Remove
10154         cleanups and use decode_compound_collector::release_symbols
10155         instead.
10156         (symtab_collector): Now a class with private fields.
10157         (symtab_collector::release_symtabs): New method.
10158         (add_symtabs_to_list): Rename to...
10159         (symtab_collector::operator()): ... this and adjust.
10160         (collect_symtabs_from_filename): symtab_collector construction
10161         bits move to symtab_collector ctor.  Pass the symtab_collector
10162         object directly as callback.  Remove cleanups and use
10163         symtab_collector::release_symtabs instead.
10164         (collect_symbols): Delete.
10165         (add_matching_symbols_to_info): Use lambdas.
10166         * macrocmd.c (print_macro_callback): Delete.
10167         (info_macro_command): Use a lambda.
10168         (info_macros_command): Pass print_macro_definition as callable
10169         directly.
10170         (print_one_macro): Remove 'ignore' parameter.
10171         (macro_list_command): Adjust.
10172         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10173         (macro_for_each_data::user_data): Delete field.
10174         (foreach_macro): Adjust to call the function_view.
10175         (macro_for_each): Adjust to use function_view as callback type.
10176         (foreach_macro_in_scope): Adjust to call the function_view.
10177         (macro_for_each_in_scope): Adjust to use function_view as callback
10178         type.
10179         * macrotab.h: Include "common/function-view.h".
10180         (macro_callback_fn): Declare a prototype instead of a pointer.
10181         Remove "user_data" parameter.
10182         (macro_for_each, macro_for_each_in_scope): Adjust to use
10183         function_view as callback type.
10184         * psymtab.c (partial_map_expand_apply)
10185         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10186         Adjust to use function_view as callback type and to return bool.
10187         (psym_expand_symtabs_matching): Adjust to use function_view as
10188         callback types.
10189         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10190         to use function_view as callback type and to return bool.
10191         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10192         callback types.
10193         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10194         as callback types.
10195         * symfile.h: Include "common/function-view.h".
10196         (expand_symtabs_file_matcher_ftype)
10197         (expand_symtabs_symbol_matcher_ftype)
10198         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10199         return bool.
10200         (quick_symbol_functions::map_symtabs_matching_filename)
10201         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10202         function_view as callback type and return bool.
10203         (expand_symtabs_matching): Adjust to use function_view as callback
10204         type.
10205         (maintenance_expand_name_matcher)
10206         (maintenance_expand_file_matcher): Delete.
10207         (maintenance_expand_symtabs): Use lambdas.
10208         * symtab.c (iterate_over_some_symtabs): Adjust to use
10209         function_view as callback types and return bool.
10210         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10211         of a cleanup.
10212         (lookup_symtab_callback): Delete.
10213         (lookup_symtab): Use a lambda.
10214         (iterate_over_symbols): Adjust to use function_view as callback
10215         type.
10216         (struct search_symbols_data, search_symbols_file_matches)
10217         (search_symbols_name_matches): Delete.
10218         (search_symbols): Use a pair of lambdas.
10219         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10220         (symtab_expansion_callback): Delete.
10221         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10222         * symtab.h: Include "common/function-view.h".
10223         (iterate_over_some_symtabs): Adjust to use function_view as
10224         callback type and return bool.
10225         (iterate_over_symtabs): Adjust to use function_view as callback
10226         type.
10227         (symbol_found_callback_ftype): Remove 'data' parameter and return
10228         bool.
10229         (iterate_over_symbols): Adjust to use function_view as callback
10230         type.
10231
10232 2017-02-23  Pedro Alves  <palves@redhat.com>
10233
10234         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10235         (%.o) <unittests/%.c>: New pattern.
10236         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10237         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10238         * common/function-view.h: New file.
10239         * unittests/function-view-selftests.c: New file.
10240         * configure: Regenerate.
10241
10242 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10243
10244         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10245         inferior_ptid.
10246         * go32-nat.c (go32_thread_alive): Likewise.
10247
10248 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10249
10250         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10251         delete.
10252
10253 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10254
10255         * varobj.c (varobj_clear_saved_item): Use delete instead of
10256         xfree.
10257         (update_dynamic_varobj_children): Likewise.
10258
10259 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10260
10261         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10262
10263 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10264
10265         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10266         m_enum_value to 0 in default constructor.
10267
10268 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10269
10270         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10271         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10272         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10273         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10274         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10275         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10276         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10277         IS_STORE_CONDITIONAL_INSN.
10278
10279 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10280
10281         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10282
10283 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10284
10285         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10286
10287 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10288
10289         * dwarf2read.c (skip_one_die, read_attribute_value)
10290         (dwarf2_const_value_attr, dump_die_shallow)
10291         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10292         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10293
10294 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10295
10296         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10297         (dwarf_parse_macro_header): Accept DWARF version 5.
10298         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10299
10300 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10301
10302         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10303         DW_AT_GNU_*.
10304         * common/common-exceptions.h (enum errors): Likewise.
10305         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10306         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10307         (dwarf_expr_context::execute_stack_op): Likewise.
10308         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10309         Likewise.
10310         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10311         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10312         (show_entry_values_debug, call_site_to_target_addr)
10313         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10314         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10315         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10316         (value_of_dwarf_block_entry, indirect_pieced_value)
10317         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10318         (disassemble_dwarf_expression): Likewise.
10319         * dwarf2read.c (process_die, inherit_abstract_dies)
10320         (read_call_site_scope): Likewise.
10321         * gdbtypes.h (struct func_type, struct call_site_parameter)
10322         (struct call_site): Likewise.
10323         * stack.c (read_frame_arg): Likewise.
10324         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10325
10326 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10327
10328         * defs.h (read_unsigned_leb128): New declaration.
10329         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10330         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10331         (dwarf2_find_location_expression): Call also
10332         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10333         * dwarf2loc.h (dwarf2_version): New declaration.
10334         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10335         rnglists.
10336         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10337         .debug_rnglists.
10338         (struct dwop_section_names): Add loclists_dwo.
10339         (dwop_section_names): Add .debug_loclists.dwo.
10340         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10341         (struct dwarf2_per_cu_data): Add dwarf_version.
10342         (struct dwo_sections): Add loclists.
10343         (struct attr_abbrev): Add implicit_const.
10344         (read_indirect_line_string): New declaration.
10345         (read_unsigned_leb128): Delete declaration.
10346         (rcuh_kind): New definition.
10347         (read_and_check_comp_unit_head): Change parameter
10348         is_debug_types_section to section_kind.
10349         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10350         (read_comp_unit_head): Change parameter abfd to section, add parameter
10351         section_kind.  Handle DWARF-5.
10352         (error_check_comp_unit_head): Accept also DWARF version 5.
10353         (read_and_check_comp_unit_head): Change parameter
10354         is_debug_types_section to section_kind.
10355         (read_and_check_type_unit_head): Delete function.
10356         (read_abbrev_offset): Handle DWARF-5.
10357         (create_debug_type_hash_table): Add parameter section_kind.  Process
10358         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10359         comp_unit_head.
10360         (create_debug_types_hash_table): Update create_debug_type_hash_table
10361         caller.
10362         (create_all_type_units): Call create_debug_type_hash_table.
10363         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10364         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10365         caller.
10366         (skip_one_die): Handle DW_FORM_implicit_const.
10367         (dwarf2_rnglists_process): New function.
10368         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10369         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10370         (read_attribute_value): Handle DW_FORM_implicit_const,
10371         DW_FORM_line_strp.
10372         (read_attribute): Handle DW_FORM_implicit_const.
10373         (read_indirect_string_at_offset_from): New function from
10374         read_indirect_string_at_offset.
10375         (read_indirect_string_at_offset): Call
10376         read_indirect_string_at_offset_from.
10377         (read_indirect_line_string_at_offset): New function.
10378         (read_indirect_string): New function comment.
10379         (read_indirect_line_string): New function.
10380         (read_unsigned_leb128): Make it global.
10381         (dwarf2_string_attr): Handle DWARF-5.
10382         (add_include_dir_stub, read_formatted_entries): New functions.
10383         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10384         Handle DWARF-5.
10385         (per_cu_header_read_in): Update read_comp_unit_head caller.
10386         (dwarf2_version): New function.
10387         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10388         rnglists.
10389         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10390         fields.
10391
10392 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10393
10394         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10395
10396 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10397
10398         * dwarf2read.c (dwarf2_ranges_process): New function from
10399         dwarf2_ranges_read.
10400         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10401         dwarf2_ranges_process.
10402
10403 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10404
10405         * dwarf2read.c (create_debug_type_hash_table): New function from
10406         create_debug_types_hash_table.
10407         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10408         (create_all_type_units, open_and_init_dwo_file): Update
10409         create_debug_types_hash_table callers.
10410
10411 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10412
10413         PR gdb/16188
10414         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10415         refer to 'ap', not 'args'.
10416
10417 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10418             Pedro Alves  <palves@redhat.com>
10419
10420         PR gdb/16188
10421         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10422         calls succeeded.
10423         * fork-child.c (trace_start_error): New function.
10424         (trace_start_error_with_name): Likewise.
10425         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10426         * inf-ptrace.c (inf_ptrace_me): Likewise.
10427         * inferior.h (trace_start_error): New prototype.
10428         (trace_start_error_with_name): Likewise.
10429
10430 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10431
10432         PR gdb/21164
10433         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10434         NULL before using it.
10435         * symmisc.c (maintenance_print_symbols): Likewise.
10436         (maintenance_print_msymbols): Likewise.
10437
10438 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10439
10440         * NEWS: Add record Python bindings entry.
10441
10442 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10443
10444         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10445         py-record-full.o.
10446         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10447         * python/py-record-btrace.c, python/py-record-btrace.h,
10448         python/py-record-full.c, python/py-record-full.h: New file.
10449         * python/py-record.c: Add include for py-record-btrace.h and
10450         py-record-full.h.
10451         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10452         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10453         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10454         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10455         New definition.
10456         (gdbpy_initialize_btrace): New export.
10457         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10458
10459 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10460
10461         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10462         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10463         * python/py-record.c: New file.
10464         * python/python-internal.h (gdbpy_start_recording,
10465         gdbpy_current_recording, gdpy_stop_recording,
10466         gdbpy_initialize_record): New export.
10467         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10468         (python_GdbMethods): Add gdbpy_start_recording,
10469         gdbpy_current_recording and gdbpy_stop_recording.
10470
10471 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10472
10473         * record-btrace.c (record_btrace_record_method): New function.
10474         (init_record_btrace_ops): Initialize to_record_method.
10475         * record-full.c (record_full_record_method): New function.
10476         (init_record_full_ops, init_record_full_core_ops): Add
10477         record_full_record_method.
10478         * record.h (enum record_method): New enum.
10479         * target-debug.h (target_debug_print_enum_record_method: New define.
10480         * target-delegates.c: Regenerate.
10481         * target.c (target_record_method): New function.
10482         * target.h: Include record.h.
10483         (struct target_ops) <to_record_method>: New field.
10484         (target_record_method): New export.
10485
10486 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10487
10488         * record.h (record_start, record_stop): New export.
10489         * record.c (record_start, record_stop): New function.
10490
10491 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10492
10493         * btrace.c (btrace_fetch): Copy function call segments pointer
10494         into a vector.
10495         (btrace_clear): Clear the vector.
10496         (btrace_find_insn_by_number): Use binary search to find the correct
10497         function call segment.
10498         * btrace.h (brace_fun_p): New typedef.
10499         (struct btrace_thread_info) <functions>: New field.
10500
10501 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10502
10503         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10504         * btrace.c (btrace_decode_error): ... here.  New function.
10505         * btrace.h (btrace_decode_error): New export.
10506
10507 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10508
10509         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10510         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10511         btrace_find_insn_by_number): Remove special case for gaps.
10512         * btrace.h (btrace_insn_get_error): New export.
10513         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10514         * record-btrace.c (btrace_insn_history): Print number for gaps.
10515         (record_btrace_info, record_btrace_goto): Handle gaps.
10516
10517 2017-02-14  Tom Tromey  <tom@tromey.com>
10518
10519         PR python/13598:
10520         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10521         event.
10522         * python/py-evts.c (gdbpy_initialize_py_events): Add
10523         before_prompt registry.
10524         * python/py-events.h (events_object) <before_prompt>: New field.
10525
10526 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10527
10528         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10529
10530 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10531
10532         * symfile (_initialize_symfile): Add usage text to the load command's
10533         help text.
10534
10535 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10536
10537         * utils.c (defaulted_query): Don't query on secondary UIs.
10538
10539 2017-02-10  Tom Tromey  <tom@tromey.com>
10540
10541         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10542
10543 2017-02-10  Tom Tromey  <tom@tromey.com>
10544
10545         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10546         "cleanup" local.
10547         * python/py-type.c (typy_legacy_template_argument): Remove
10548         unnecessary "cleanup" local.
10549
10550 2017-02-10  Tom Tromey  <tom@tromey.com>
10551
10552         * python/python.c (do_start_initialization): New function, from
10553         _initialize_python.
10554         (_initialize_python): Call do_start_initialization.
10555         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10556         goto.
10557
10558 2017-02-10  Tom Tromey  <tom@tromey.com>
10559
10560         * python/py-prettyprint.c (pretty_print_one_value): Use
10561         gdbpy_ref.
10562
10563 2017-02-10  Tom Tromey  <tom@tromey.com>
10564
10565         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10566         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10567         gdbpy_ref.
10568         * python/py-type.c (field_new): Use gdbpy_ref.
10569         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10570         gdbpy_ref.
10571         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10572         (py_free_pspace): Likewise.
10573         (pspace_to_pspace_object): Likewise.
10574         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10575         (py_free_objfile): Likewise.
10576         (objfile_to_objfile_object): Likewise.
10577         * python/py-inferior.c (delete_thread_object): Use
10578         gdbpy_ref.
10579         (infpy_read_memory): Likewise.
10580         (py_free_inferior): Likewise.
10581         * python/py-evtregistry.c (create_eventregistry_object): Use
10582         gdbpy_ref.
10583         * python/py-event.c (create_event_object): Use gdbpy_ref.
10584
10585 2017-02-10  Tom Tromey  <tom@tromey.com>
10586
10587         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10588         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10589         used.
10590         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10591         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10592         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10593         python/py-framefilter.c, python/py-function.c,
10594         python/py-inferior.c, python/py-infevents.c,
10595         python/py-linetable.c, python/py-newobjfileevent.c,
10596         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10597         python/py-signalevent.c, python/py-stopevent.c,
10598         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10599         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10600         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10601         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10602
10603 2017-02-10  Tom Tromey  <tom@tromey.com>
10604
10605         * ui-out.h (ui_out_emit_type): New class.
10606         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10607         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10608         and ui_out_emit_tuple.
10609         (enumerate_locals): Likewise.
10610         (py_mi_print_variables, py_print_locals, py_print_args): Use
10611         ui_out_emit_list.
10612         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10613         ui_out_emit_list.
10614         * common/gdb_optional.h: New file.
10615
10616 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10617
10618         * MAINTAINERS (Write After Approval): Update my e-mail address.
10619
10620 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10621
10622         PR gdb/21122
10623         * breakpoint.c (_initialize_breakpoint): Update the help description
10624         of the 'commands' command to indicate that it takes a list argument.
10625
10626 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
10627
10628         * interps.c (current_interp_set_logging): Remove "return".
10629
10630 2017-02-09  Gary Benson  <gbenson@redhat.com>
10631
10632         * symtab.c (add_symtab_completions): Prevent NULL pointer
10633         dereference.
10634
10635 2017-02-08  Pedro Alves  <palves@redhat.com>
10636
10637         * interps.c (interp::interp): Remove reference to quiet_p.
10638         (interp_set): Make static.  Remove dead "Switching to" output
10639         code.
10640         (interp_quiet_p, interp_set_quiet): Delete.
10641         (interpreter_exec_cmd): Don't set the interpreter quiet.
10642         * interps.h (interp_quiet_p): Make static.
10643         (class interp) <quiet_p>: Remove field
10644
10645 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10646
10647         * cli/cli-decode.c (find_command_name_length): Make it extern.
10648         * cli/cli-decode.h (find_command_name_length): Declare.
10649         * cli/cli-script.c (command_name_equals, line_first_arg):
10650         New functions.
10651         (process_next_line): Use cli-decode to parse command names.
10652         (build_command_line): Make args a constant pointer.
10653
10654 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10655
10656         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10657         Remove case-insensitive search.
10658
10659 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
10660
10661         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10662         at the end of the line.  Avoids an ARI warning.
10663
10664 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
10665
10666         * NEWS: Mention support for record/replay of Intel 64 rdrand and
10667         rdseed instructions.
10668         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10669
10670 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
10671
10672         PR tdep/20936
10673         Provide and use sparc32 and sparc64 target description XML files.
10674         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10675         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10676         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10677         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10678         * features/sparc/sparc32-solaris.xml: New file.
10679         * features/sparc/sparc64-solaris.xml: New file.
10680         * features/sparc/sparc32-solaris.c: Generated.
10681         * features/sparc/sparc64-solaris.c: Generated.
10682         * sparc-tdep.h: Account for differences in target descriptions.
10683         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10684         (sparc32_register_type): Use target provided registers.
10685         (validate_tdesc_registers): New function.
10686         (sparc32_gdbarch_init): Use tdesc_has_registers.
10687         Set pseudoregister functions.
10688         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10689         (sparc64_register_type): Use target provided registers.
10690         (sparc64_init_abi): Set pseudoregister functions.
10691
10692 2017-02-03  Tom Tromey  <tom@tromey.com>
10693
10694         PR rust/21097:
10695         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10696         with a single member.
10697
10698 2017-02-03  Pedro Alves  <palves@redhat.com>
10699
10700         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10701         (cli_interp_base::~cli_interp_base): New.
10702         (cli_interp): New struct.
10703         (as_cli_interp): Cast the interp itself to cli_interp.
10704         (cli_interpreter_pre_command_loop): Rename to ...
10705         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
10706         parameter.
10707         (cli_interpreter_init): Rename to ...
10708         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
10709         boolean.  Make extern.
10710         (cli_interpreter_resume): Rename to ...
10711         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
10712         extern.
10713         (cli_interpreter_suspend): Rename to ...
10714         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
10715         extern.
10716         (cli_interpreter_exec): Rename to ...
10717         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
10718         extern.
10719         (cli_interpreter_supports_command_editing): Rename to ...
10720         (cli_interp_base::supports_command_editing): ... this.  Remove
10721         'interp' parameter.  Make extern.
10722         (cli_ui_out): Rename to ...
10723         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
10724         Make extern.
10725         (cli_set_logging): Rename to ...
10726         (cli_interp_base::set_logging): ... this.  Remove 'interp'
10727         parameter.  Make extern.
10728         (cli_interp_procs): Delete.
10729         (cli_interp_factory): Adjust to use "new".
10730         * cli/cli-interp.h: Include "interps.h".
10731         (struct cli_interp_base): New struct.
10732         * interps.c (struct interp): Delete.  Fields moved to interps.h.
10733         (interp_new): Delete.
10734         (interp::interp, interp::~interp): New.
10735         (interp_set): Use bool, and return void.  Assume the interpreter
10736         has suspend, init and resume methods, and that the all return
10737         void.
10738         (set_top_level_interpreter): interp_set returns void.
10739         (interp_ui_out): Adapt.
10740         (current_interp_set_logging): Adapt.
10741         (interp_data): Delete.
10742         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10743         (interp_exec): Adapt.
10744         (top_level_interpreter_data): Delete.
10745         * interps.h (interp_init_ftype, interp_resume_ftype)
10746         (interp_suspend_ftype, interp_exec_ftype)
10747         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10748         (class interp): New.
10749         (interp_new): Delete.
10750         (interp_set): Now returns void.  Use bool.
10751         (interp_data, top_level_interpreter_data): Delete.
10752         * mi/mi-common.h: Include interps.h.
10753         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10754         init, resume, suspect, exec, interp_ui_out, set_logging and
10755         pre_command_loop methods.
10756         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10757         (mi_interpreter_init): Rename to ...
10758         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10759         bool, return void and make extern.  Adjust.
10760         (mi_interpreter_resume): ... Rename to ...
10761         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10762         return void and make extern.  Adjust.
10763         (mi_interpreter_suspend): ... Rename to ...
10764         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10765         return void and make extern.  Adjust.
10766         (mi_interpreter_exec): ... Rename to ...
10767         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10768         extern.  Adjust.
10769         (mi_interpreter_pre_command_loop): ... Rename to ...
10770         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10771         parameter and make extern.
10772         (mi_on_normal_stop_1): Adjust.
10773         (mi_ui_out): Rename to ...
10774         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10775         parameter and make extern.  Adjust.
10776         (mi_set_logging): Rename to ...
10777         (mi_interp::set_logging): ... this.  Remove the 'interp'
10778         parameter and make extern.  Adjust.
10779         (mi_interp_procs): Delete.
10780         (mi_interp_factory): Adjust to use 'new'.
10781         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10782         (mi_print_exception, mi_execute_command, mi_load_progress):
10783         Adjust.
10784         * tui/tui-interp.c (tui_interp): New class.
10785         (as_tui_interp): Return a tui_interp pointer.
10786         (tui_on_normal_stop, tui_on_signal_received)
10787         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10788         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10789         to use interp::interp_ui_out.
10790         (tui_init): Rename to ...
10791         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10792         bool, return void and make extern.  Adjust.
10793         (tui_resume): Rename to ...
10794         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10795         return void and make extern.  Adjust.
10796         (tui_suspend): Rename to ...
10797         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10798         return void and make extern.  Adjust.
10799         (tui_ui_out): Rename to ...
10800         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10801         parameter, and make extern.  Adjust.
10802         (tui_exec): Rename to ...
10803         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10804         make extern.
10805         (tui_interp_procs): Delete.
10806         (tui_interp_factory): Use "new".
10807
10808 2017-02-02  Tom Tromey  <tom@tromey.com>
10809
10810         * rust-exp.y (ends_raw_string, space_then_number)
10811         (rust_identifier_start_p): Return bool.
10812         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10813         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10814         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10815         (rust_chartype_p): Return bool.
10816         (val_print_struct, rust_print_struct_def, rust_print_type):
10817         Update.
10818         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10819         Return bool.
10820
10821 2017-02-02  Tom Tromey  <tom@tromey.com>
10822
10823         * rust-lang.c: Reindent.
10824
10825 2017-02-02  Tom Tromey  <tom@tromey.com>
10826
10827         * rust-lang.h (rust_crate_for_block): Update.
10828         * rust-lang.c (rust_crate_for_block): Return std::string.
10829         (rust_get_disr_info): Use std:;string, not
10830         gdb::unique_xmalloc_ptr.
10831         * rust-exp.y (crate_name): Update.
10832
10833 2017-02-02  Pedro Alves  <palves@redhat.com>
10834
10835         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10836         field out of gdb_disassembler_test and make it static.
10837
10838 2017-02-02  Pedro Alves  <palves@redhat.com>
10839
10840         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10841         mi1_interp and mi_interp fields.
10842
10843 2017-02-02  Pedro Alves  <palves@redhat.com>
10844
10845         * cli/cli-interp.c (struct saved_output_files, saved_output):
10846         Moved from cli/cli-logging.c.
10847         (cli_set_logging): New function.
10848         (cli_interp_procs): Install cli_set_logging.
10849         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10850         Declare.
10851         * cli/cli-logging.c (struct saved_output_files, saved_output):
10852         Moved to cli/cli-interp.c.
10853         (pop_output_files): Don't save outputs here.
10854         (make_logging_output): New function.
10855         (handle_redirections): Don't build tee nor save previous outputs
10856         here.
10857         * interps.c (current_interp_set_logging): Change prototype.
10858         Assume there's always a set_logging_proc method installed.
10859         * interps.h (interp_set_logging_ftype): Change prototype.
10860         (current_interp_set_logging): Change prototype and adjust comment.
10861         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10862         use make_logging_output.
10863         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10864 2017-02-02  Pedro Alves  <palves@redhat.com>
10865
10866         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10867         from ...
10868         (set_logging_overwrite): ... here.
10869         (logging_no_redirect_file): Delete.
10870         (set_logging_redirect): Don't handle redirection on the fly.
10871         Instead warn that "logging off" / "logging on" is necessary.
10872         (pop_output_files): Delete references to logging_no_redirect_file.
10873         (show_logging_command): Always speak in terms of what will happen
10874         once logging is reenabled.
10875
10876 2017-02-02  Pedro Alves  <palves@redhat.com>
10877
10878         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10879
10880 2017-02-02  Pedro Alves  <palves@redhat.com>
10881
10882         * disasm.c (gdb_pretty_print_insn): Rename to ...
10883         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10884         Remove gdbarch parameter.  Adapt to clear the object's buffers
10885         instead of allocating new buffers, and to print using the object's
10886         gdb_disassembler instead of calling gdb_print_insn.
10887         (dump_insns): Use gdb_pretty_print_disassembler.
10888         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10889         (gdb_pretty_print_disassembler): New class.
10890         * record-btrace.c (btrace_insn_history): Use
10891         gdb_pretty_print_disassembler.
10892
10893 2017-02-02  Pedro Alves  <palves@redhat.com>
10894
10895         * ada-lang.c (type_as_string): Use string_file.
10896         * ada-valprint.c (ada_print_floating): Use string_file.
10897         * ada-varobj.c (ada_varobj_scalar_image)
10898         (ada_varobj_get_value_image): Use string_file.
10899         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10900         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10901         * breakpoint.c (update_inserted_breakpoint_locations)
10902         (insert_breakpoint_locations, reattach_breakpoints)
10903         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10904         (print_it_watchpoint): Use string_file.
10905         (save_breakpoints): Use stdio_file.
10906         * c-exp.y (oper): Use string_file.
10907         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10908         tee_file.
10909         (pop_output_files): Use delete.
10910         (handle_redirections): Use stdio_file and tee_file.
10911         * cli/cli-setshow.c (do_show_command): Use string_file.
10912         * compile/compile-c-support.c (c_compute_program): Use
10913         string_file.
10914         * compile/compile-c-symbols.c (generate_vla_size): Take a
10915         'string_file &' instead of a 'ui_file *'.
10916         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10917         of a 'ui_file *'.  Use string_file.
10918         (generate_c_for_variable_locations): Take a 'string_file &'
10919         instead of a 'ui_file *'.
10920         * compile/compile-internal.h (generate_c_for_for_one_variable):
10921         Take a 'string_file &' instead of a 'ui_file *'.
10922         * compile/compile-loc2c.c (push, pushf, unary, binary)
10923         (print_label, pushf_register_address, pushf_register)
10924         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10925         'ui_file *'.  Adjust.
10926         * compile/compile.c (compile_to_object): Use string_file.
10927         * compile/compile.h (compile_dwarf_expr_to_c)
10928         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10929         'ui_file *'.
10930         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10931         (replace_typedefs_qualified_name): Use string_file and
10932         obstack_copy0.
10933         * disasm.c (gdb_pretty_print_insn): Use string_file.
10934         (gdb_disassembly): Adjust reference the null_stream global.
10935         (do_ui_file_delete): Delete.
10936         (gdb_insn_length): Use null_stream.
10937         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10938         * dwarf2loc.c (dwarf2_compile_property_to_c)
10939         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10940         'string_file &' instead of a 'ui_file *'.
10941         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10942         * dwarf2read.c (do_ui_file_peek_last): Delete.
10943         (dwarf2_compute_name): Use string_file.
10944         * event-top.c (gdb_setup_readline): Use stdio_file.
10945         * gdbarch.sh (verify_gdbarch): Use string_file.
10946         * gdbtypes.c (safe_parse_type): Use null_stream.
10947         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10948         string_file.
10949         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10950         'string_file *' instead of a 'ui_file *'.
10951         (gdbscm_arch_disassemble): Use string_file.
10952         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10953         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10954         inherits from ui_file.
10955         (ioscm_file_port_delete, ioscm_file_port_rewind)
10956         (ioscm_file_port_put): Delete.
10957         (ioscm_file_port_write): Rename to ...
10958         (ioscm_file_port::write): ... this.  Remove file_port_magic
10959         checks.
10960         (ioscm_file_port_new): Delete.
10961         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10962         ui_file_up.
10963         * guile/scm-type.c (tyscm_type_name): Use string_file.
10964         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10965         Use string_file.
10966         * infcmd.c (print_return_value_1): Use string_file.
10967         * infrun.c (print_target_wait_results): Use string_file.
10968         * language.c (add_language): Use string_file.
10969         * location.c (explicit_to_string_internal): Use string_file.
10970         * main.c (captured_main_1): Use null_file.
10971         * maint.c (maintenance_print_architecture): Use stdio_file.
10972         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10973         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10974         event_channel>: Change type to mi_console_file pointer.
10975         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10976         (mi_console_file_delete): Delete.
10977         (struct mi_console_file): Delete.
10978         (mi_console_file_magic): Delete.
10979         (mi_console_file_new): Delete.
10980         (mi_console_file::mi_console_file): New.
10981         (mi_console_file_delete): Delete.
10982         (mi_console_file_fputs): Delete.
10983         (mi_console_file::write): New.
10984         (mi_console_raw_packet): Delete.
10985         (mi_console_file::flush): New.
10986         (mi_console_file_flush): Delete.
10987         (mi_console_set_raw): Rename to ...
10988         (mi_console_file::set_raw): ... this.
10989         * mi/mi-console.h (class mi_console_file): New class.
10990         (mi_console_file_new, mi_console_set_raw): Delete.
10991         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10992         (mi_set_logging): Use delete and tee_file.  Adjust.
10993         * mi/mi-main.c (output_register): Use string_file.
10994         (mi_cmd_data_evaluate_expression): Use string_file.
10995         (mi_cmd_data_read_memory): Use string_file.
10996         (mi_cmd_execute, print_variable_or_computed): Use string_file.
10997         * mi/mi-out.c (mi_ui_out::main_stream): New.
10998         (mi_ui_out::rewind): Use main_stream and
10999         string_file.
11000         (mi_ui_out::put): Use main_stream and string_file.
11001         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11002         Allocate a 'string_file' instead.
11003         (mi_out_new): Don't allocate a mem_fileopen stream here.
11004         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11005         (mi_ui_out::main_stream): Declare method.
11006         * printcmd.c (eval_command): Use string_file.
11007         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11008         * python/py-arch.c (archpy_disassemble): Use string_file.
11009         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11010         * python/py-frame.c (frapy_str): Use string_file.
11011         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11012         Use string_file.
11013         * python/py-type.c (typy_str): Use string_file.
11014         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11015         * python/py-value.c (valpy_str): Use string_file.
11016         * record-btrace.c (btrace_insn_history): Use string_file.
11017         * regcache.c (regcache_print): Use stdio_file.
11018         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11019         * remote.c (escape_buffer): Use string_file.
11020         * rust-lang.c (rust_get_disr_info): Use string_file.
11021         * serial.c (serial_open_ops_1): Use stdio_file.
11022         (do_serial_close): Use delete.
11023         * stack.c (print_frame_arg): Use string_file.
11024         (print_frame_args): Remove local mem_fileopen stream, not used.
11025         (print_frame): Use string_file.
11026         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11027         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11028         Take a 'string_file *' instead of a 'ui_file *'.
11029         * top.c (new_ui): Use stdio_file and stderr_file.
11030         (free_ui): Use delete.
11031         (execute_command_to_string): Use string_file.
11032         (quit_confirm): Use string_file.
11033         * tracepoint.c (collection_list::append_exp): Use string_file.
11034         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11035         * tui/tui-file.c: Don't include "ui-file.h".
11036         (enum streamtype, struct tui_stream): Delete.
11037         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11038         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11039         (tui_file::tui_file): New method.
11040         (tui_file_fputs): Delete.
11041         (tui_file_get_strbuf): Delete.
11042         (tui_file::puts): New method.
11043         (tui_file_adjust_strbuf): Delete.
11044         (tui_file_flush): Delete.
11045         (tui_file::flush): New method.
11046         * tui/tui-file.h: Tweak intro comment.
11047         Include ui-file.h.
11048         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11049         (tui_file_adjust_strbuf): Delete declarations.
11050         (class tui_file): New class.
11051         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11052         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11053         (tui_register_format): Use string_stream.
11054         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11055         (tui_get_function_from_frame): Use string_file.
11056         * typeprint.c (type_to_string): Use string_file.
11057         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11058         (null_stream): New global.
11059         (ui_file_delete): Delete.
11060         (ui_file::ui_file): New.
11061         (null_file_isatty): Delete.
11062         (ui_file::~ui_file): New.
11063         (null_file_rewind): Delete.
11064         (ui_file::printf): New.
11065         (null_file_put): Delete.
11066         (null_file_flush): Delete.
11067         (ui_file::putstr): New.
11068         (null_file_write): Delete.
11069         (ui_file::putstrn): New.
11070         (null_file_read): Delete.
11071         (ui_file::putc): New.
11072         (null_file_fputs): Delete.
11073         (null_file_write_async_safe): Delete.
11074         (ui_file::vprintf): New.
11075         (null_file_delete): Delete.
11076         (null_file::write): New.
11077         (null_file_fseek): Delete.
11078         (null_file::puts): New.
11079         (ui_file_data): Delete.
11080         (null_file::write_async_safe): New.
11081         (gdb_flush, ui_file_isatty): Adjust.
11082         (ui_file_put, ui_file_rewind): Delete.
11083         (ui_file_write): Adjust.
11084         (ui_file_write_for_put): Delete.
11085         (ui_file_write_async_safe, ui_file_read): Adjust.
11086         (ui_file_fseek): Delete.
11087         (fputs_unfiltered): Adjust.
11088         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11089         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11090         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11091         (set_ui_file_data): Delete.
11092         (string_file::~string_file, string_file::write)
11093         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11094         (do_ui_file_as_string, ui_file_as_string): Delete.
11095         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11096         (struct mem_file): Delete.
11097         (mem_file_new): Delete.
11098         (stdio_file::stdio_file): New.
11099         (mem_file_delete): Delete.
11100         (stdio_file::stdio_file): New.
11101         (mem_fileopen): Delete.
11102         (stdio_file::~stdio_file): New.
11103         (mem_file_rewind): Delete.
11104         (stdio_file::set_stream): New.
11105         (mem_file_put): Delete.
11106         (stdio_file::open): New.
11107         (mem_file_write): Delete.
11108         (stdio_file_magic, struct stdio_file): Delete.
11109         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11110         (stdio_file::flush): New.
11111         (stdio_file_read): Rename to ...
11112         (stdio_file::read): ... this.  Adjust.
11113         (stdio_file_write): Rename to ...
11114         (stdio_file::write): ... this.  Adjust.
11115         (stdio_file_write_async_safe): Rename to ...
11116         (stdio_file::write_async_safe) ... this.  Adjust.
11117         (stdio_file_fputs): Rename to ...
11118         (stdio_file::puts) ... this.  Adjust.
11119         (stdio_file_isatty): Delete.
11120         (stdio_file_fseek): Delete.
11121         (stdio_file::isatty): New.
11122         (stderr_file_write): Rename to ...
11123         (stderr_file::write) ... this.  Adjust.
11124         (stderr_file_fputs): Rename to ...
11125         (stderr_file::puts) ... this.  Adjust.
11126         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11127         (stderr_file::stderr_file): New.
11128         (tee_file_magic): Delete.
11129         (struct tee_file): Delete.
11130         (tee_file::tee_file): New.
11131         (tee_file_new): Delete.
11132         (tee_file::~tee_file): New.
11133         (tee_file_delete): Delete.
11134         (tee_file_flush): Rename to ...
11135         (tee_file::flush): ... this.  Adjust.
11136         (tee_file_write): Rename to ...
11137         (tee_file::write): ... this.  Adjust.
11138         (tee_file::write_async_safe): New.
11139         (tee_file_fputs): Rename to ...
11140         (tee_file::puts): ... this.  Adjust.
11141         (tee_file_isatty): Rename to ...
11142         (tee_file::isatty): ... this.  Adjust.
11143         * ui-file.h (struct obstack, struct ui_file): Don't
11144         forward-declare.
11145         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11146         (ui_file_write_ftype)
11147         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11148         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11149         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11150         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11151         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11152         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11153         (set_ui_file_fseek): Delete.
11154         (ui_file_data, ui_file_delete, ui_file_rewind)
11155         (struct ui_file): New.
11156         (ui_file_up): New.
11157         (class null_file): New.
11158         (null_stream): Declare.
11159         (ui_file_write_for_put, ui_file_put): Delete.
11160         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11161         Delete.
11162         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11163         (gdb_fopen, tee_file_new): Delete.
11164         (struct string_file): New.
11165         (struct stdio_file): New.
11166         (stdio_file_up): New.
11167         (struct stderr_file): New.
11168         (class tee_file): New.
11169         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11170         of a 'ui_file *'.  Adjust.
11171         * ui-out.h (class ui_out) <field_stream>: Likewise.
11172         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11173         (null_stream): Delete.
11174         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11175         Adjust.
11176         * utils.h (struct ui_file): Delete forward declaration..
11177         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11178         (error_stream): Take a 'string_file &' instead of a
11179         'ui_file *'.
11180         * varobj.c (varobj_value_get_print_value): Use string_file.
11181         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11182         * gdbarch.c: Regenerate.
11183
11184 2017-02-02  Pedro Alves  <palves@redhat.com>
11185
11186         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11187         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11188         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11189         Adjust to call gdb_print_insn instead of
11190         gdb_disassembler::print_insn.
11191         (dump_insns, do_mixed_source_and_assembly_deprecated)
11192         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11193         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11194         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11195         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11196         declaration.
11197         (gdb_pretty_print_insn): Re-add declaration.
11198         * record-btrace.c (btrace_insn_history): Don't allocate a
11199         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11200
11201 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11202
11203         * disasm.h (gdb_disassembly): Remove file_string parameter.
11204         * disasm.c (gdb_disassembly): Likewise.
11205         * cli/cli-cmds.c (print_disassembly): Adapt.
11206         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11207         * stack.c (do_gdb_disassembly): Likewise.
11208
11209 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11210
11211         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11212         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11213         targets.  And if the implicit value is longer than needed, extract
11214         the first bytes instead of the "least significant" ones.
11215
11216 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11217
11218         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11219         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11220         (btrace_fetch): Assert can_access_registers_ptid.
11221         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11222         validate_registers_access.
11223
11224 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11225
11226         * gdbthread.h (can_access_registers_ptid): New.
11227         * thread.c (can_access_registers_ptid): New.
11228
11229 2017-02-01  Pedro Alves  <palves@redhat.com>
11230
11231         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11232
11233 2017-01-31  Pedro Alves  <palves@redhat.com>
11234
11235         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11236         Fix typos.
11237
11238 2017-01-31  Pedro Alves  <palves@redhat.com>
11239
11240         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11241         not used.
11242
11243 2017-01-31  Pedro Alves  <palves@redhat.com>
11244
11245         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11246
11247 2017-01-31  Pedro Alves  <palves@redhat.com>
11248
11249         * common/scoped_restore.h
11250         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11251         change the value's parameter type to T2.
11252         (make_scoped_restore): Likewise.
11253
11254 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11255             Richard Henderson  <rth@redhat.com>
11256
11257         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11258         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11259         GS_BASE for older kernels.
11260         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11261         GS_BASE for older kernels.
11262         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11263         and GS_BASE to the offset table.
11264         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11265         system register group.
11266         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11267         for older kernels.
11268         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11269         amd64 ABI.
11270         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11271         AMD64_GSBASE_REGNUM.
11272         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11273         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11274         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11275         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11276         i386/64bit-segments.xml in those rules.
11277         * features/i386/64bit-segments.xml: New file.
11278         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11279         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11280         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11281         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11282         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11283         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11284         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11285         * features/i386/amd64-avx-linux.c: Regenerated.
11286         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11287         * features/i386/amd64-avx-mpx.c: Regenerated.
11288         * features/i386/amd64-avx512-linux.c: Regenerated.
11289         * features/i386/amd64-linux.c: Regenerated.
11290         * features/i386/amd64-mpx-linux.c: Regenerated.
11291         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11292         * features/i386/i386-avx-mpx.c: Regenerated.
11293         * features/i386/x32-avx-linux.c: Regenerated.
11294         * features/i386/x32-avx512-linux.c: Regenerated.
11295         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11296         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11297         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11298         * regformats/i386/amd64-linux.dat: Regenerated.
11299         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11300         * regformats/i386/x32-avx-linux.dat: Regenerated.
11301         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11302         * regformats/i386/x32-linux.dat: Regenerated.
11303
11304 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11305
11306         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11307         Set to AMD64_NUM_REGS.
11308
11309 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11310
11311         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11312         that checks validity of a register number.
11313
11314 2017-01-27  Kees Cook  <keescook@google.com>
11315
11316         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11317         fetch_fpregs if target has fpa registers.
11318         (arm_linux_store_inferior_registers): Call store_fpregs if target
11319         has fpa registers.
11320
11321 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11322
11323         * cris-tdep.c (cris_gdbarch_init): Remove check for
11324         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11325
11326 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11327
11328         * corelow.c (get_core_register_section): Check for regset
11329         existence before checking for REGSET_VARIABLE_SIZE.
11330
11331 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11332             Pedro Alves  <palves@redhat.com>
11333
11334         PR gdb/20939
11335         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11336         call memory_error, save memaddr instead.
11337         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11338         negative, cal memory_error.
11339         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11340
11341 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11342
11343         * disasm-selftests.c (memory_error_test): New function.
11344         (_initialize_disasm_selftests): Register memory_error_test.
11345
11346 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11347
11348         * Makefile.in (SFILES): Add disasm-selftests.c and
11349         selftest-arch.c.
11350         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11351         * disasm-selftests.c: New file.
11352         * selftest-arch.c: New file.
11353         * selftest-arch.h: New file.
11354
11355 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11356
11357         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11358         to bfd_arch_mep.  Don't return 0 if section is not
11359         found.  Call print_insn_mep.
11360
11361 2017-01-26  Pedro Alves  <palves@redhat.com>
11362             Yao Qi  <yao.qi@linaro.org>
11363
11364         * arm-tdep.c: Include "disasm.h".
11365         (gdb_print_insn_arm): Update code to get gdbarch.
11366         * disasm.c (dis_asm_read_memory): Change it to
11367         gdb_disassembler::dis_asm_read_memory.
11368         (dis_asm_memory_error): Likewise.
11369         (dis_asm_print_address): Likewise.
11370         (gdb_pretty_print_insn): Change it to
11371         gdb_disassembler::pretty_print_insn.
11372         (dump_insns): Add one argument gdb_disassemlber.  All
11373         callers updated.
11374         (do_mixed_source_and_assembly_deprecated): Likewise.
11375         (do_mixed_source_and_assembly): Likewise.
11376         (do_assembly_only): Likewise.
11377         (gdb_disassembler::gdb_disassembler): New.
11378         (gdb_disassembler::print_insn): New.
11379         * disasm.h (class gdb_disassembler): New.
11380         (gdb_pretty_print_insn): Remove declaration.
11381         (gdb_disassemble_info): Likewise.
11382         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11383         (gdbscm_disasm_read_memory_worker): Update.
11384         (gdbscm_disasm_read_memory): Update.
11385         (gdbscm_disasm_memory_error): Remove.
11386         (gdbscm_disasm_print_address): Remove.
11387         (gdbscm_disassembler::gdbscm_disassembler): New.
11388         (gdbscm_print_insn_from_port): Update.
11389         * mips-tdep.c: Include disasm.h.
11390         (gdb_print_insn_mips): Update code to get gdbarch.
11391         * record-btrace.c (btrace_insn_history): Update.
11392         * spu-tdep.c: Include disasm.h.
11393         (struct spu_dis_asm_data): Remove.
11394         (struct spu_dis_asm_info): New.
11395         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11396         SPU id.
11397         (gdb_print_insn_spu): Cast disassemble_info to
11398         spu_dis_asm_info.
11399
11400 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11401
11402         * disasm.c (do_ui_file_delete): Delete.
11403         (gdb_insn_length): Move code creating stream to ...
11404         * utils.c (null_stream): ... here.  New function.
11405         * utils.h (null_stream): Declare.
11406
11407 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11408
11409         * python/py-inferior.c (find_thread_object): Return directly
11410         from the loop.  Remove "found" variable.
11411
11412 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11413
11414         GDB 7.12.1 released.
11415
11416 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11417
11418         * python/py-function.c (fnpy_call): Reorder declarations to have
11419         the gdbpy_enter object declared first.
11420         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11421
11422 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11423
11424         PR python/21068
11425         * python/python-internal.h (PyMem_RawMalloc): Define for
11426         Python < 3.4.
11427         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11428         PyMem_RawMalloc instead of PyMem_Malloc.
11429
11430 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11431             Luis Machado  <lgustavo@codesourcery.com>
11432
11433         * NEWS (New commands): Mention flash-erase.
11434         (New MI commands): Mention target-flash-erase.
11435         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11436         command.
11437         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11438         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11439         * target.c (flash_erase_command): New function.
11440         (initialize_targets): Add new flash-erase command.
11441         * target.h (flash_erase_command): New declaration.
11442
11443 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11444
11445         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11446         HAVE_SYS_PROCFS_H is defined.
11447
11448 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11449
11450         * remote.c (struct cached_reg): Change data into a pointer.
11451         * (stop_reply_dtr): Free data pointers before deleting vector.
11452         (process_stop_reply): Likewise.
11453         (remote_parse_stop_reply): Allocate space for data
11454
11455 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11456
11457         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11458         MAX_REGISTER_SIZE.
11459         (amd64_pseudo_register_read_value): Likewise.
11460         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11461         (store_register_using_P): Likewise.
11462         * regcache.c (regcache_xfer_part): Likewise.
11463
11464 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11465
11466         Split real and pseudo registers.
11467         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11468         (sparc32_pseudo_regnum): New enum.
11469         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11470         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11471         (SPARC32_CP0_REGISTERS): New macro.
11472         (sparc32_pseudo_register_name): New function.
11473         (sparc32_register_name): Use sparc32_pseudo_register_name.
11474         (sparc32_pseudo_register_type): New function.
11475         (sparc32_register_type): Use sparc32_pseudo_register_type.
11476         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11477         pseudo register numbers.
11478         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11479         (SPARC64_CP0_REGISTERS): New macro.
11480         (sparc64_pseudo_register_name): New function.
11481         (sparc64_register_name): Use sparc64_pseudo_register_name.
11482         (sparc64_pseudo_register_type): New function.
11483         (sparc64_register_type): Use sparc64_pseudo_register_type.
11484         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11485         pseudo register numbers.
11486         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11487         sparc64_store_arguments): Handle pseudo register numbers.
11488
11489 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11490
11491         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11492         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11493         output.
11494         (getpkt_or_notif_sane_1): Likewise.
11495
11496 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11497
11498         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11499         of CC.  Pass "-x c++-header" instead of "-x c".
11500
11501 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11502
11503         * remote.c (remote_can_async_p): Update comment.
11504
11505 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11506
11507         * linux-nat.c (linux_nat_can_async_p): Update comment.
11508
11509 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11510
11511         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11512
11513 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11514
11515         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11516
11517 2017-01-10  Tom Tromey  <tom@tromey.com>
11518
11519         * python/py-type.c (typy_legacy_template_argument): Update.
11520         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11521         ~demangle_parse_info): Declare new members.
11522         (cp_demangled_name_to_comp): Return unique_ptr.
11523         (cp_demangled_name_parse_free)
11524         (make_cleanup_cp_demangled_name_parse_free)
11525         (cp_new_demangle_parse_info): Remove.
11526         * cp-support.c (do_demangled_name_parse_free_cleanup)
11527         (make_cleanup_cp_demangled_name_parse_free): Remove.
11528         (inspect_type, cp_canonicalize_string_full)
11529         (cp_canonicalize_string): Update.
11530         (mangled_name_to_comp): Change return type.
11531         (cp_class_name_from_physname, method_name_from_physname)
11532         (cp_func_name, cp_remove_params): Update.
11533         * cp-name-parser.y (demangle_parse_info): New constructor, from
11534         cp_new_demangle_parse_info.
11535         (~demangle_parse_info): New destructor, from
11536         cp_demangled_name_parse_free.
11537         (cp_merge_demangle_parse_infos): Update.
11538         (cp_demangled_name_to_comp): Change return type.
11539
11540 2017-01-10  Tom Tromey  <tom@tromey.com>
11541
11542         * top.c (prevent_dont_repeat): Change return type.
11543         * python/python.c (execute_gdb_command): Use std::string.
11544         Update.
11545         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11546         * command.h (prevent_dont_repeat): Change return type.
11547         * breakpoint.c (bpstat_do_actions_1): Update.
11548
11549 2017-01-10  Tom Tromey  <tom@tromey.com>
11550
11551         * value.h (scoped_value_mark::~scoped_value_mark): Call
11552         free_to_mark.
11553         (scoped_value_mark::free_to_mark): New method.
11554         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11555         scoped_value_mark.
11556
11557 2017-01-10  Tom Tromey  <tom@tromey.com>
11558
11559         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11560         (valpy_reference_value, valpy_const_value, valpy_get_address)
11561         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11562         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11563         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11564         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11565         scoped_value_mark.
11566         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11567         * value.h (scoped_value_mark): New class.
11568
11569 2017-01-10  Tom Tromey  <tom@tromey.com>
11570
11571         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11572         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11573         * psymtab.c (discard_psymtabs_upto): Remove.
11574         (make_cleanup_discard_psymtabs): Remove.
11575         (struct psymtab_state): Remove.
11576
11577 2017-01-10  Tom Tromey  <tom@tromey.com>
11578
11579         * record-full.c (record_full_save_cleanups): Remove.
11580         (record_full_save): Use gdb::unlinker.
11581         * gcore.c (do_bfd_delete_cleanup): Remove.
11582         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11583         cleanups.
11584         * dwarf2read.c (unlink_if_set): Remove.
11585         (write_psymtabs_to_index): Use gdb::unlinker.
11586         * common/gdb_unlinker.h: New file.
11587
11588 2017-01-10  Tom Tromey  <tom@tromey.com>
11589
11590         * windows-tdep.c (windows_xfer_shared_library): Update.
11591         * windows-nat.c (windows_make_so): Update.
11592         * utils.h (make_cleanup_bfd_unref): Remove.
11593         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11594         * symfile.h (symfile_bfd_open)
11595         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11596         * symfile.c (read_symbols, symbol_file_add)
11597         (separate_debug_file_exists): Update.
11598         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11599         (generic_load, reread_symbols): Update.
11600         * symfile-mem.c (symbol_file_add_from_memory): Update.
11601         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11602         (spu_symbol_file_add_from_memory): Update.
11603         * solist.h (struct target_so_ops) <bfd_open>: Return
11604         gdb_bfd_ref_ptr.
11605         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11606         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11607         gdb_bfd_ref_ptr.
11608         (solib_map_sections, reload_shared_libraries_1): Update.
11609         * solib-svr4.c (enable_break): Update.
11610         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11611         * solib-frv.c (enable_break2): Update.
11612         * solib-dsbt.c (enable_break): Update.
11613         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11614         gdb_bfd_ref_ptr.
11615         (darwin_solib_get_all_image_info_addr_at_init): Update.
11616         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11617         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11618         * record-full.c (record_full_save): Update.
11619         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11620         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11621         * minidebug.c (find_separate_debug_file_in_section): Return
11622         gdb_bfd_ref_ptr.
11623         * machoread.c (macho_add_oso_symfile): Change abfd to
11624         gdb_bfd_ref_ptr.
11625         (macho_symfile_read_all_oso): Update.
11626         (macho_check_dsym): Return gdb_bfd_ref_ptr.
11627         (macho_symfile_read): Update.
11628         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11629         (jit_bfd_try_read_symtab): Update.
11630         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11631         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11632         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11633         gdb_bfd_ref_ptr.
11634         (gdb_bfd_ref_policy): New struct.
11635         (gdb_bfd_ref_ptr): New typedef.
11636         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11637         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11638         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11639         gdb_bfd_ref_ptr.
11640         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11641         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11642         (gcore_command): Update.
11643         * exec.c (exec_file_attach): Update.
11644         * elfread.c (elf_symfile_read): Update.
11645         * dwarf2read.c (dwarf2_get_dwz_file): Update.
11646         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11647         (open_and_init_dwo_file): Update.
11648         (open_dwp_file): Return gdb_bfd_ref_ptr.
11649         (open_and_init_dwp_file): Update.
11650         * corelow.c (core_open): Update.
11651         * compile/compile-object-load.c (compile_object_load): Update.
11652         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11653         * coffread.c (coff_symfile_read): Update.
11654         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11655         gdb_bfd_ref_ptr.  Rename.
11656         (dump_bfd_file, restore_command): Update.
11657         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11658         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11659         (find_separate_debug_file_by_buildid): Update.
11660
11661 2017-01-10  Tom Tromey  <tom@tromey.com>
11662
11663         * common/gdb_ref_ptr.h: New file.
11664         * python/py-ref.h (struct gdbpy_ref_policy): New.
11665         (gdbpy_ref): Now a typedef.
11666
11667 2017-01-10  Tom Tromey  <tom@tromey.com>
11668
11669         * utils.h (make_cleanup_htab_delete): Don't declare.
11670         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11671         Remove.
11672         * linespec.c (decode_compound_collector): Add constructor,
11673         destructor.
11674         (lookup_prefix_sym): Remove cleanup.
11675         (symtab_collector): Add constructor, destructor.
11676         (collect_symtabs_from_filename): Remove cleanup.
11677         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11678         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11679         Use htab_up.
11680         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11681         * dwarf2read.c (dw2_expand_symtabs_matching)
11682         (dw2_map_symbol_filenames, dwarf_decode_macros)
11683         (write_psymtabs_to_index): Use htab_up.
11684         * dwarf2loc.c (func_verify_no_selftailcall)
11685         (call_site_find_chain_1, func_verify_no_selftailcall)
11686         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11687         std::vector, gdb::unique_xmalloc_ptr.
11688         (call_sitep): Remove typedef.
11689         (dwarf2_locexpr_baton_eval): Remove unused variable.
11690
11691 2017-01-10  Tom Tromey  <tom@tromey.com>
11692
11693         * python/python-internal.h (make_cleanup_py_decref)
11694         (make_cleanup_py_xdecref): Don't declare.
11695         * python/py-utils.c (py_decref, make_cleanup_py_decref)
11696         (py_xdecref, make_cleanup_py_xdecref): Remove.
11697
11698 2017-01-10  Tom Tromey  <tom@tromey.com>
11699
11700         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11701         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11702
11703 2017-01-10  Tom Tromey  <tom@tromey.com>
11704
11705         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11706
11707 2017-01-10  Tom Tromey  <tom@tromey.com>
11708
11709         * python/py-utils.c (unicode_to_encoded_string)
11710         (python_string_to_target_string)
11711         (python_string_to_target_python_string)
11712         (python_string_to_host_string, gdbpy_obj_to_string)
11713         (get_addr_from_python): Use gdbpy_ref.
11714
11715 2017-01-10  Tom Tromey  <tom@tromey.com>
11716
11717         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11718         gdbpy_ref.
11719
11720 2017-01-10  Tom Tromey  <tom@tromey.com>
11721
11722         * python/python.c (eval_python_command, gdbpy_decode_line)
11723         (gdbpy_run_events, gdbpy_start_type_printers)
11724         (gdbpy_apply_type_printers): Use gdbpy_ref.
11725
11726 2017-01-10  Tom Tromey  <tom@tromey.com>
11727
11728         * python/py-param.c (get_doc_string, compute_enum_values): Use
11729         gdbpy_ref.
11730
11731 2017-01-10  Tom Tromey  <tom@tromey.com>
11732
11733         * python/py-inferior.c (find_thread_object, build_inferior_list):
11734         Use gdbpy_ref.
11735
11736 2017-01-10  Tom Tromey  <tom@tromey.com>
11737
11738         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11739
11740 2017-01-10  Tom Tromey  <tom@tromey.com>
11741
11742         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11743         gdbpy_ref.
11744
11745 2017-01-10  Tom Tromey  <tom@tromey.com>
11746
11747         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11748         extra incref.
11749         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11750         Use gdbpy_ref.
11751
11752 2017-01-10  Tom Tromey  <tom@tromey.com>
11753
11754         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11755         gdbpy_ref.
11756
11757 2017-01-10  Tom Tromey  <tom@tromey.com>
11758
11759         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11760         decref results of PyArg_ParseTupleAndKeywords.
11761
11762 2017-01-10  Tom Tromey  <tom@tromey.com>
11763
11764         * python/python.c (python_run_simple_file): Use
11765         unique_xmalloc_ptr, gdbpy_ref.
11766
11767 2017-01-10  Tom Tromey  <tom@tromey.com>
11768
11769         * python/py-prettyprint.c (print_stack_unless_memory_error)
11770         (print_string_repr, print_children): Use gdbpy_ref.
11771         (dummy_python_frame): New class.
11772         (dummy_python_frame::dummy_python_frame): Rename from
11773         push_dummy_python_frame.
11774         (py_restore_tstate): Remove.
11775
11776 2017-01-10  Tom Tromey  <tom@tromey.com>
11777
11778         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11779
11780 2017-01-10  Tom Tromey  <tom@tromey.com>
11781
11782         * python/python.c (ensure_python_env, restore_python_env):
11783         Remove.
11784         * python/python-internal.h (ensure_python_env): Don't declare.
11785         * varobj.h (varobj_ensure_python_env): Don't declare.
11786         * varobj.c (varobj_ensure_python_env): Remove.
11787
11788 2017-01-10  Tom Tromey  <tom@tromey.com>
11789
11790         * varobj.c (varobj_value_get_print_value): Use
11791         gdbpy_enter_varobj.
11792
11793 2017-01-10  Tom Tromey  <tom@tromey.com>
11794
11795         * python/py-prettyprint.c (print_string_repr, print_children):
11796         Update.
11797         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11798         of "encoding".
11799         * varobj.c (varobj_value_get_print_value): Update.
11800         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11801
11802 2017-01-10  Tom Tromey  <tom@tromey.com>
11803
11804         * varobj.c (varobj_get_display_hint)
11805         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11806         (varobj_set_visualizer, free_variable): Use
11807         gdbpy_enter_varobj.
11808
11809 2017-01-10  Tom Tromey  <tom@tromey.com>
11810
11811         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11812         (do_finish_initialization): New function.  Use gdbpy_ref.
11813         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11814         do_finish_initialization.
11815
11816 2017-01-10  Tom Tromey  <tom@tromey.com>
11817
11818         * python/py-param.c (get_set_value, get_show_value): Use
11819         gdbpy_enter, gdbpy_ref.
11820
11821 2017-01-10  Tom Tromey  <tom@tromey.com>
11822
11823         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11824
11825 2017-01-10  Tom Tromey  <tom@tromey.com>
11826
11827         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11828
11829 2017-01-10  Tom Tromey  <tom@tromey.com>
11830
11831         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11832         Use gdbpy_enter_varobj.
11833
11834 2017-01-10  Tom Tromey  <tom@tromey.com>
11835
11836         * varobj.c (gdbpy_enter_varobj): New constructor.
11837         * python/python-internal.h (gdbpy_enter_varobj): New class.
11838         * python/py-varobj.c (py_varobj_get_iterator): Use
11839         gdbpy_enter_varobj.
11840
11841 2017-01-10  Tom Tromey  <tom@tromey.com>
11842
11843         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11844         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11845         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11846         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11847         unique_xmalloc_ptr.
11848         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11849
11850 2017-01-10  Tom Tromey  <tom@tromey.com>
11851
11852         * python/py-xmethods.c (invoke_match_method): Use
11853         gdbpy_ref.
11854
11855 2017-01-10  Tom Tromey  <tom@tromey.com>
11856
11857         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11858         gdbpy_enter, gdbpy_ref.
11859
11860 2017-01-10  Tom Tromey  <tom@tromey.com>
11861
11862         * python/python.c (python_interactive_command): Use gdbpy_enter.
11863
11864 2017-01-10  Tom Tromey  <tom@tromey.com>
11865
11866         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11867         gdbpy_ref.
11868
11869 2017-01-10  Tom Tromey  <tom@tromey.com>
11870
11871         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11872         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11873
11874 2017-01-10  Tom Tromey  <tom@tromey.com>
11875
11876         * utils.h (htab_deleter): New struct.
11877         (htab_up): New typedef.
11878         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11879         gdbpy_enter, gdbpy_ref, htab_up.
11880
11881 2017-01-10  Tom Tromey  <tom@tromey.com>
11882
11883         * python/py-unwind.c (pending_frame_invalidate): Remove.
11884         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11885
11886 2017-01-10  Tom Tromey  <tom@tromey.com>
11887
11888         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11889         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11890
11891 2017-01-10  Tom Tromey  <tom@tromey.com>
11892
11893         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11894
11895 2017-01-10  Tom Tromey  <tom@tromey.com>
11896
11897         * python/python.c (gdbpy_eval_from_control_command)
11898         (gdbpy_source_script, gdbpy_run_events)
11899         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11900         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11901         gdbpy_enter.
11902
11903 2017-01-10  Tom Tromey  <tom@tromey.com>
11904
11905         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11906
11907 2017-01-10  Tom Tromey  <tom@tromey.com>
11908
11909         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11910
11911 2017-01-10  Tom Tromey  <tom@tromey.com>
11912
11913         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11914         (python_on_inferior_call_pre, python_on_inferior_call_post)
11915         (python_on_memory_change, python_on_register_change)
11916         (python_inferior_exit, python_new_objfile, add_thread_object)
11917         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11918
11919 2017-01-10  Tom Tromey  <tom@tromey.com>
11920
11921         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11922         (bpfinishpy_handle_exit): Use gdbpy_enter.
11923
11924 2017-01-10  Tom Tromey  <tom@tromey.com>
11925
11926         * python/py-cmd.c (cmdpy_destroyer)
11927         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11928         gdbpy_enter.
11929
11930 2017-01-10  Tom Tromey  <tom@tromey.com>
11931
11932         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11933         gdbpy_enter.
11934         (gdbpy_breakpoint_has_cond): Likewise.
11935
11936 2017-01-10  Tom Tromey  <tom@tromey.com>
11937
11938         * python/python.c (gdbpy_enter): New constructor.
11939         (~gdbpy_enter): New destructor.
11940         (restore_python_env, ensure_python_env): Rewrite.
11941         * python/python-internal.h (gdbpy_enter): New class.
11942
11943 2017-01-10  Tom Tromey  <tom@tromey.com>
11944
11945         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11946
11947 2017-01-10  Tom Tromey  <tom@tromey.com>
11948
11949         * python/py-value.c (value_has_field, get_field_flag)
11950         (get_field_type, valpy_getitem, convert_value_from_python): Use
11951         gdbpy_ref.
11952
11953 2017-01-10  Tom Tromey  <tom@tromey.com>
11954
11955         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11956         gdbpy_ref.
11957
11958 2017-01-10  Tom Tromey  <tom@tromey.com>
11959
11960         * python/py-prettyprint.c (search_pp_list)
11961         (find_pretty_printer_from_objfiles)
11962         (find_pretty_printer_from_progspace)
11963         (find_pretty_printer_from_gdb, find_pretty_printer)
11964         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11965         gdbpy_ref.
11966
11967 2017-01-10  Tom Tromey  <tom@tromey.com>
11968
11969         * python/py-param.c (call_doc_function): Use gdbpy_ref.
11970
11971 2017-01-10  Tom Tromey  <tom@tromey.com>
11972
11973         * python/py-linetable.c (build_line_table_tuple_from_pcs)
11974         (ltpy_get_all_source_lines): Use gdbpy_ref.
11975
11976 2017-01-10  Tom Tromey  <tom@tromey.com>
11977
11978         * python/py-framefilter.c (extract_sym, extract_value)
11979         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11980         gdbpy_ref.
11981
11982 2017-01-10  Tom Tromey  <tom@tromey.com>
11983
11984         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11985
11986 2017-01-10  Tom Tromey  <tom@tromey.com>
11987
11988         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11989
11990 2017-01-10  Tom Tromey  <tom@tromey.com>
11991
11992         * python/py-function.c (convert_values_to_python, fnpy_init): Use
11993         gdbpy_ref.
11994
11995 2017-01-10  Tom Tromey  <tom@tromey.com>
11996
11997         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11998
11999 2017-01-10  Tom Tromey  <tom@tromey.com>
12000
12001         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12002         (typy_range): Use gdbpy_ref.
12003
12004 2017-01-10  Tom Tromey  <tom@tromey.com>
12005
12006         * python/py-threadevent.c (create_thread_event_object): Use
12007         gdbpy_ref.
12008         * python/py-stopevent.c (create_stop_event_object): Simplify.
12009         (emit_stop_event): Use gdbpy_ref.
12010         * python/py-signalevent.c (create_signal_event_object): Use
12011         gdbpy_ref.
12012         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12013         (emit_new_objfile_event, create_clear_objfiles_event_object)
12014         (emit_clear_objfiles_event): Use gdbpy_ref.
12015         * python/py-infevents.c (create_inferior_call_event_object)
12016         (create_register_changed_event_object)
12017         (create_memory_changed_event_object, emit_inferior_call_event)
12018         (emit_memory_changed_event, emit_register_changed_event): Use
12019         gdbpy_ref.
12020         * python/py-exitedevent.c (create_exited_event_object)
12021         (emit_exited_event): Use gdbpy_ref.
12022         * python/py-event.h (evpy_emit_event): Remove
12023         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12024         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12025         * python/py-continueevent.c (emit_continue_event): Use
12026         gdbpy_ref.
12027         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12028         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12029         gdbpy_ref.
12030         * python/py-bpevent.c (create_breakpoint_event_object): Use
12031         gdbpy_ref.
12032
12033 2017-01-10  Tom Tromey  <tom@tromey.com>
12034
12035         * python/py-ref.h: New file.
12036
12037 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12038
12039         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12040         void.
12041         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12042         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12043         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12044         * ui-out.c (ui_out::redirect): Likewise.
12045         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12046         * cli/cli-logging.c (set_logging_redirect): Update call site of
12047         ui_out::redirect.
12048         (handle_redirections): Likewise.
12049         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12050         * top.c (execute_command_to_string): Likewise.
12051         * utils.c (do_ui_out_redirect_pop): Likewise.
12052
12053 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12054
12055         * stack.c (_initialize_stack): Update "frame" command help message.
12056
12057 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12058
12059         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12060
12061 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12062
12063         * x86-linux-nat.h: Include gdb_proc_service.h.
12064
12065 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12066
12067         * ser-base.h: Include serial.h.
12068
12069 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12070
12071         * ppc-linux-tdep.h: Include ppc-tdep.h.
12072
12073 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12074
12075         * nat/amd64-linux-siginfo.h: Include signal.h.
12076
12077 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12078
12079         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12080
12081 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12082
12083         * mi/mi-parse.h: Include mi-cmds.h.
12084
12085 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12086
12087         * inf-loop.c: Don't include "target.h".
12088         * inf-loop.h: Include it here.
12089
12090 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12091
12092         * dfp.h: Include "dboulest.h" and "expression.h".
12093
12094 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12095
12096         * ax-gdb.h: Include "ax.h".
12097
12098 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12099
12100         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12101         with nat/gdb_ptrace.h.
12102
12103 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12104
12105         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12106         new line.
12107         (mips64_fbsd_sigframe_init): Likewise.
12108
12109 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12110
12111         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12112         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12113
12114 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12115
12116         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12117         * NEWS: Mention new FreeBSD/mips native configuration.
12118         * config/mips/fbsd.mh: New file.
12119         * configure.host: Add mips*-*-freebsd*.
12120         * mips-fbsd-nat.c: New file.
12121
12122 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12123
12124         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12125         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12126         * NEWS: Mention new FreeBSD/mips target.
12127         * configure.tgt: Add mips*-*-freebsd*.
12128         * mips-fbsd-tdep.c: New file.
12129         * mips-fbsd-tdep.h: New file.
12130
12131 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12132
12133         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12134         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12135
12136 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12137
12138         Update copyright year range in all GDB files.
12139
12140 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12141
12142         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12143
12144 For older changes see ChangeLog-2016.
12145 \f
12146 Local Variables:
12147 mode: change-log
12148 left-margin: 8
12149 fill-column: 74
12150 version-control: never
12151 coding: utf-8
12152 End: