cefba2735141a34287f2c1dcde21c024b634e8c4
[external/binutils.git] / gdb / ChangeLog
1 2017-09-29  Tom Tromey  <tom@tromey.com>
2
3         * mi/mi-parse.c (mi_parse): Remove unused declaration.
4
5 2017-09-29  Tom Tromey  <tom@tromey.com>
6
7         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
8
9 2017-09-29  Tom Tromey  <tom@tromey.com>
10
11         * varobj.h (varobj_gen_name): Return std::string.
12         * varobj.c (varobj_gen_name): Return std::string.
13         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
14         (mi_cmd_var_delete): Don't copy "name".
15
16 2017-09-29  Tom Tromey  <tom@tromey.com>
17
18         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
19         (mi_cmd_break_insert_1): Update.
20
21 2017-09-29  Tom Tromey  <tom@tromey.com>
22
23         * target.h (make_scoped_defer_target_commit_resume): Update.
24         * target.c (make_scoped_defer_target_commit_resume): Rename from
25         make_cleanup_defer_target_commit_resume.  Return a
26         scoped_restore.
27         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
28
29 2017-09-29  Tom Tromey  <tom@tromey.com>
30
31         * main.c (captured_main_1): Remove unused declaration.
32         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
33
34 2017-09-29  Tom Tromey  <tom@tromey.com>
35
36         * symtab.c (search_symbols): Remove unused outer cleanup.
37         (make_source_files_completion_list): Remove unused declaration.
38
39 2017-09-29  Tom Tromey  <tom@tromey.com>
40
41         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
42
43 2017-09-29  Tom Tromey  <tom@tromey.com>
44
45         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
46         gdb::byte_vector.
47
48 2017-09-29  Tom Tromey  <tom@tromey.com>
49
50         * complaints.c (vcomplaint): Use std::string.
51
52 2017-09-29  Tom Tromey  <tom@tromey.com>
53
54         * tracepoint.c (trace_variable_command): Use std::string.
55         (encode_actions_1): Remove unused declarations.
56         (create_tsv_from_upload): Use std::string.
57
58 2017-09-29  Tom Tromey  <tom@tromey.com>
59
60         * cp-support.c (gdb_demangle): Use std::string.
61
62 2017-09-29  Tom Tromey  <tom@tromey.com>
63
64         * stack.c (parse_frame_specification): Use std::string
65         (info_frame_command): Use gdb::unique_xmalloc_ptr.
66
67 2017-09-29  Tom Tromey  <tom@tromey.com>
68
69         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
70
71 2017-09-29  Tom Tromey  <tom@tromey.com>
72
73         * utils.c (vfprintf_maybe_filtered): Use std::string.
74         (vfprintf_unfiltered): Likewise.
75
76 2017-09-29  Tom Tromey  <tom@tromey.com>
77
78         * event-top.c (top_level_prompt): Return std::string.
79         (display_gdb_prompt): Update.
80
81 2017-09-29  Tom Tromey  <tom@tromey.com>
82
83         * unittests/common-utils-selftests.c (format): New function.
84         (string_vprintf_tests): New function.
85         (_initialize_common_utils_selftests): Register new tests.
86         * common/common-utils.c (string_vprintf): New function.
87         * common/common-utils.h (string_vprintf): Declare.
88
89 2017-09-29  Pedro Alves  <palves@redhat.com>
90
91         * common/rsp-low.c (unpack_varlen_hex): Constify.
92         * common/rsp-low.h (unpack_varlen_hex): Constify.
93         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
94         Constify.
95         * remote.c (remote_set_permissions, read_ptid)
96         (remote_current_thread, remote_get_threads_with_qthreadinfo)
97         (remote_static_tracepoint_marker_at)
98         (remote_static_tracepoint_markers_by_strid)
99         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
100         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
101         (parse_tracepoint_definition, parse_tsv_definition)
102         (parse_static_tracepoint_marker_definition): Constify.
103         * tracepoint.h (parse_static_tracepoint_marker_definition)
104         (parse_trace_status, parse_tracepoint_status)
105         (parse_tracepoint_definition, parse_tsv_definition): Constify.
106
107 2017-09-29  Pedro Alves  <palves@redhat.com>
108
109         * remote.c (target_buf, target_buf_size): Delete.
110         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
111         Use the connection's packet buffer instead.
112         All callers adjusted.
113         (_initialize_remote): Remove references to target_buf and
114         target_buf_size.
115
116 2017-09-28  Pedro Alves  <palves@redhat.com>
117
118         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
119         unittests/common-utils-selftests.c.
120         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
121         (COMMON_OBS): Remove utils-selftests.o.
122         * utils-selftests.c: Move to ...
123         * unittests/common-utils-selftests.c: ... here and rename self
124         test to "string_printf".
125
126 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
127
128         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
129         having NULL cus or tus.
130
131 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
132
133         * arm-tdep.c: (convert_from_extended): Remove.
134         (convert_to_extended): Likewise.
135         (arm_extract_return_value): Use convert_typed_floating.
136         (arm_store_return_value): Likewise.
137
138         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
139         * sh-tdep.c: Do not include "floatformat.h".
140         (sh_littlebyte_bigword_type): New function.
141         (sh_register_convert_to_virtual): Use convert_typed_floating.
142         (sh_register_convert_to_raw): Likewise.
143         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
144         (sh64_littlebyte_bigword_type): New function.
145         (sh64_extract_return_value): Use convert_typed_floating.
146         (sh64_register_convert_to_virtual): Likewise.
147         (sh64_register_convert_to_raw): Likewise.
148
149 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
150
151         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
152         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
153
154         * gdbtypes.h (union type_specific): Make field floatformat hold
155         just a single struct floatformat, not an array.
156         (floatformat_from_type): Move here.
157         * gdbtypes.c (floatformat_from_type): Move here.  Update to
158         changed TYPE_FLOATFORMAT definition.
159         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
160         (recursive_dump_type): Likewise.
161         (init_float_type): Install correct floatformat for byte order.
162         (arch_float_type): Likewise.
163
164 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
165
166         * gdbtypes.c (init_type): Change incoming argument from
167         length-in-bytes to length-in-bits.  Assert length is a
168         multiple of TARGET_CHAR_BITS.
169         (arch_type, arch_flags_type): Likewise.
170         (init_integer_type): Update call to init_type.
171         (init_character_type): Likewise.
172         (init_boolean_type): Likewise.
173         (init_float_type): Likewise.
174         (init_decfloat_type): Likewise.
175         (init_complex_type): Likewise.
176         (init_pointer_type): Likewise.
177         (objfile_type): Likewise.
178         (arch_integer_type): Update call to arch_type.
179         (arch_character_type): Likewise.
180         (arch_boolean_type): Likewise.
181         (arch_float_type): Likewise.
182         (arch_decfloat_type): Likewise.
183         (arch_complex_type): Likewise.
184         (arch_pointer_type): Likewise.
185         (gdbtypes_post_init): Likewise.
186
187         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
188         (read_base_type): Likewise.
189         * mdebugread.c (basic_type): Likewise.
190         * stabsread.c (dbx_init_float_type): Likewise.
191         (rs6000_builtin_type): Likewise.
192         (read_range_type): Likewise.  Also, fix call to init_integer_type
193         with erroneous length argument.
194
195         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
196         * d-lang.c (build_d_types): Likewise.
197         * f-lang.c (build_fortran_types): Likewise.
198         * go-lang.c (build_go_types): Likewise.
199         * opencl-lang.c (build_opencl_types): Likewise.
200         * jit.c (finalize_symtab): Likewise.
201         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
202         (build_std_type_info_type): Likewise.
203         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
204         update call to arch_flags_type.
205
206         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
207         arch_type.
208         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
209         * windows-tdep.c (windows_get_tlb_type): Likewise.
210
211         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
212         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
213         * m32c-tdep.c (make_types): Likewise.
214         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
215         (rl78_psw_type): Update call to arch_flags_type.
216         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
217         * rx-tdep.c (rx_psw_type): Likewise.
218         (rx_fpsw_type): Likewise.
219         * sparc-tdep.c (sparc_psr_type): Likewise.
220         (sparc_fsr_type): Likewise.
221         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
222         (sparc64_ccr_type): Likewise.
223         (sparc64_fsr_type): Likewise.
224         (sparc64_fprs_type): Likewise.
225
226 2017-09-27  Tom Tromey  <tom@tromey.com>
227
228         * findcmd.c (find_command): Constify.
229
230 2017-09-27  Tom Tromey  <tom@tromey.com>
231
232         * ada-tasks.c (task_command_1, task_command): Constify.
233
234 2017-09-27  Tom Tromey  <tom@tromey.com>
235
236         * symtab.c (maintenance_print_symbol_cache)
237         (maintenance_flush_symbol_cache)
238         (maintenance_print_symbol_cache_statistics): Constify.
239
240 2017-09-27  Tom Tromey  <tom@tromey.com>
241
242         * inferior.c (detach_inferior_command, kill_inferior_command)
243         (inferior_command): Constify.
244
245 2017-09-27  Tom Tromey  <tom@tromey.com>
246
247         * regcache.c (regcache_print, maintenance_print_registers)
248         (maintenance_print_raw_registers)
249         (maintenance_print_cooked_registers)
250         (maintenance_print_register_groups)
251         (maintenance_print_remote_registers): Constify.
252
253 2017-09-27  Tom Tromey  <tom@tromey.com>
254
255         * printcmd.c (map_display_numbers, undisplay_command)
256         (enable_disable_display_command, enable_display_command)
257         (disable_display_command): Constify.
258
259 2017-09-27  Tom Tromey  <tom@tromey.com>
260
261         * breakpoint.h (delete_command): Don't declare.
262         * breakpoint.c (delete_command, enable_once_command)
263         (enable_count_command, enable_delete_command, breakpoint_1)
264         (maintenance_info_breakpoints, stopin_command, stopat_command)
265         (delete_command, delete_trace_command, save_breakpoints)
266         (save_breakpoints_command, save_tracepoints_command): Constify.
267
268 2017-09-27  Tom Tromey  <tom@tromey.com>
269
270         * macrocmd.c (macro_expand_command, macro_expand_once_command)
271         (skip_ws, extract_identifier, macro_define_command)
272         (macro_undef_command, macro_list_command): Constify.
273
274 2017-09-27  Tom Tromey  <tom@tromey.com>
275
276         * infcmd.c (environment_info, set_environment_command)
277         (unset_environment_command, path_info, info_proc_cmd_1)
278         (info_proc_cmd_mappings, info_proc_cmd_stat)
279         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
280         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
281
282 2017-09-27  Tom Tromey  <tom@tromey.com>
283
284         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
285         Constify.
286
287 2017-09-27  Tom Tromey  <tom@tromey.com>
288
289         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
290
291 2017-09-27  Tom Tromey  <tom@tromey.com>
292
293         * demangle.c (demangle_command): Constify.
294
295 2017-09-27  Tom Tromey  <tom@tromey.com>
296
297         * progspace.c (maintenance_info_program_spaces_command):
298         Constify.
299
300 2017-09-27  Tom Tromey  <tom@tromey.com>
301
302         * compile/compile.c (check_raw_argument, compile_file_command)
303         (compile_code_command, compile_print_command): Constify.
304
305 2017-09-27  Tom Tromey  <tom@tromey.com>
306
307         * reggroups.c (maintenance_print_reggroups): Constify.
308
309 2017-09-27  Tom Tromey  <tom@tromey.com>
310
311         * dwarf2read.c (save_gdb_index_command): Constify.
312
313 2017-09-27  Tom Tromey  <tom@tromey.com>
314
315         * stap-probe.c (info_probes_stap_command): Constify.
316
317 2017-09-27  Tom Tromey  <tom@tromey.com>
318
319         * fork-child.c (unset_exec_wrapper_command): Constify.
320
321 2017-09-27  Tom Tromey  <tom@tromey.com>
322
323         * btrace.c (get_uint, get_context_size, no_chunk)
324         (maint_btrace_packet_history_cmd)
325         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
326         (maint_info_btrace_cmd): Constify.
327
328 2017-09-27  Tom Tromey  <tom@tromey.com>
329
330         * reverse.c (delete_bookmark_command): Constify.
331
332 2017-09-27  Tom Tromey  <tom@tromey.com>
333
334         * remote.c (set_memory_packet_size)
335         (set_memory_write_packet_size, show_memory_write_packet_size)
336         (set_memory_read_packet_size, show_memory_read_packet_size)
337         (compare_sections_command, packet_command, remote_put_command)
338         (remote_get_command, remote_delete_command): Constify.
339
340 2017-09-27  Tom Tromey  <tom@tromey.com>
341
342         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
343         (set_mipsfpu_double_command, set_mipsfpu_none_command)
344         (set_mipsfpu_auto_command): Constify.
345
346 2017-09-27  Tom Tromey  <tom@tromey.com>
347
348         * cli/cli-cmds.h (cd_command): Constify.
349         * cli/cli-cmds.c (cd_command): Constify.
350
351 2017-09-27  Tom Tromey  <tom@tromey.com>
352
353         * thread.c (thread_name_command, thread_find_command): Constify.
354
355 2017-09-27  Tom Tromey  <tom@tromey.com>
356
357         * probe.c (enable_probes_command, disable_probes_command):
358         Constify.
359
360 2017-09-27  Tom Tromey  <tom@tromey.com>
361
362         * symfile.c (symbol_file_command): Constify.
363         * gdbcore.h (deprecated_file_changed_hook): Constify.
364         * exec.c (deprecated_file_changed_hook, exec_file_command)
365         (file_command): Constify.
366         * defs.h (symbol_file_command): Constify.
367
368 2017-09-27  Tom Tromey  <tom@tromey.com>
369
370         * remote-fileio.c (set_system_call_allowed)
371         (show_system_call_allowed): Constify.
372
373 2017-09-27  Tom Tromey  <tom@tromey.com>
374
375         * tracepoint.c (delete_trace_variable_command)
376         (tfind_end_command, tfind_start_command, tfind_pc_command)
377         (tfind_tracepoint_command, tfind_line_command)
378         (tfind_range_command, tfind_outside_command): Constify.
379
380 2017-09-27  Tom Tromey  <tom@tromey.com>
381
382         * ax-gdb.c (maint_agent_printf_command, agent_command)
383         (agent_eval_command): Constify.
384
385 2017-09-27  Tom Tromey  <tom@tromey.com>
386
387         * tracepoint.c (info_scope_command): Constify.
388         * python/python.c (gdbpy_decode_line): Constify.
389         * python/py-breakpoint.c (bppy_init): Constify.
390         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
391         * location.h: (new_linespec_location)
392         (string_to_event_location_basic, string_to_event_location):
393         Constify.
394         * location.c (new_linespec_location)
395         (string_to_event_location_basic, string_to_event_location):
396         Constify.
397         * linespec.h (decode_line_with_current_source)
398         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
399         * linespec.c (linespec_lex_to_end)
400         (decode_line_with_current_source)
401         (decode_line_with_last_displayed): Constify.
402         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
403         Constify.
404         * cli/cli-cmds.c (edit_command, list_command): Constify.
405         * breakpoint.h (until_break_command, watch_command_wrapper)
406         (awatch_command_wrapper, rwatch_command_wrapper)
407         (init_ada_exception_breakpoint): Constify.
408         * breakpoint.c (break_command_1, dprintf_command)
409         (break_range_command, watch_command_wrapper)
410         (rwatch_command_wrapper, awatch_command_wrapper)
411         (until_break_command, init_ada_exception_breakpoint)
412         (strace_marker_create_sals_from_location, trace_command)
413         (ftrace_command, strace_command, struct tracepoint): Constify.
414         * ax-gdb.c (agent_command_1): Constify.
415         * ada-lang.c (ada_exception_sal): Constify.
416
417 2017-09-27  Tom Tromey  <tom@tromey.com>
418
419         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
420         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
421         (get_context_size, no_chunk, get_insn_history_modifiers)
422         (cmd_record_insn_history, get_call_history_modifiers)
423         (cmd_record_call_history): Constify.
424
425 2017-09-27  Tom Tromey  <tom@tromey.com>
426
427         * source.c (show_substitute_path_command)
428         (unset_substitute_path_command, set_substitute_path_command):
429         Constify.
430
431 2017-09-27  Tom Tromey  <tom@tromey.com>
432
433         * typeprint.c (maintenance_print_type): Constify.
434         * maint.c (maintenance_dump_me, maintenance_demangle)
435         (maintenance_time_display, maintenance_info_sections)
436         (maintenance_print_statistics, maintenance_deprecate)
437         (maintenance_undeprecate): Constify.
438         (maintenance_do_deprecate): Constify.  Use std::string.
439         (maintenance_selftest): Constify.
440         * gdbtypes.h (maintenance_print_type): Constify.
441
442 2017-09-27  Tom Tromey  <tom@tromey.com>
443
444         * hppa-tdep.c (unwind_command): Constify.
445
446 2017-09-27  Tom Tromey  <tom@tromey.com>
447
448         * target-descriptions.c (unset_tdesc_filename_cmd)
449         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
450         Constify.
451
452 2017-09-27  Tom Tromey  <tom@tromey.com>
453
454         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
455
456 2017-09-27  Tom Tromey  <tom@tromey.com>
457
458         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
459
460 2017-09-27  Tom Tromey  <tom@tromey.com>
461
462         * tui/tui-regs.c (tui_reg_command): Constify.
463
464 2017-09-27  Tom Tromey  <tom@tromey.com>
465
466         * skip.c (skip_file_command, skip_function_command)
467         (skip_enable_command, skip_disable_command, skip_delete_command):
468         Constify.
469
470 2017-09-27  Tom Tromey  <tom@tromey.com>
471
472         * record-btrace.c (cmd_record_btrace_bts_start)
473         (cmd_record_btrace_pt_start): Constify.
474
475 2017-09-27  Tom Tromey  <tom@tromey.com>
476
477         * symmisc.c (maintenance_print_symbols)
478         (maintenance_print_msymbols, maintenance_print_objfiles)
479         (maintenance_info_symtabs, maintenance_check_symtabs)
480         (maintenance_expand_symtabs, maintenance_info_line_tables):
481         Constify.
482
483 2017-09-27  Tom Tromey  <tom@tromey.com>
484
485         * top.c (new_ui_command): Constify.
486
487 2017-09-27  Tom Tromey  <tom@tromey.com>
488
489         * symfile.c (add_symbol_file_command)
490         (remove_symbol_file_command, list_overlays_command)
491         (map_overlay_command, unmap_overlay_command)
492         (overlay_auto_command, overlay_manual_command)
493         (overlay_off_command, overlay_load_command): Constify.
494
495 2017-09-27  Tom Tromey  <tom@tromey.com>
496
497         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
498         (info_spu_mailbox_command, info_spu_dma_command)
499         (info_spu_proxydma_command): Constify.
500
501 2017-09-27  Tom Tromey  <tom@tromey.com>
502
503         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
504
505 2017-09-27  Tom Tromey  <tom@tromey.com>
506
507         * cli/cli-script.c (user_defined_command): Constify.
508
509 2017-09-27  Tom Tromey  <tom@tromey.com>
510
511         * cli/cli-dump.c (dump_memory_command, dump_value_command)
512         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
513         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
514         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
515         (dump_binary_value, append_binary_memory, append_binary_value):
516         Constify.
517         (struct dump_context) <func>: Constify.
518         (add_dump_command): Update.
519
520 2017-09-27  Tom Tromey  <tom@tromey.com>
521
522         * cli/cli-cmds.c (show_version, show_configuration)
523         (source_command, show_user): Constify.
524
525 2017-09-27  Tom Tromey  <tom@tromey.com>
526
527         * target.c (maintenance_print_target_stack): Constify.
528
529 2017-09-27  Tom Tromey  <tom@tromey.com>
530
531         * interps.c (interpreter_exec_cmd): Constify.
532
533 2017-09-27  Tom Tromey  <tom@tromey.com>
534
535         * record-full.c (cmd_record_full_restore): Constify.
536
537 2017-09-27  Tom Tromey  <tom@tromey.com>
538
539         * memattr.c (enable_mem_command, disable_mem_command)
540         (delete_mem_command): Constify.
541
542 2017-09-27  Tom Tromey  <tom@tromey.com>
543
544         * value.c (show_convenience): Constify.
545
546 2017-09-27  Tom Tromey  <tom@tromey.com>
547
548         * gdbcore.h (core_file_command): Update.
549         * corefile.c (core_file_command): Constify.
550
551 2017-09-27  Tom Tromey  <tom@tromey.com>
552
553         * user-regs.c (maintenance_print_user_registers): Constify.
554
555 2017-09-27  Tom Tromey  <tom@tromey.com>
556
557         * cp-namespace.c (maintenance_cplus_namespace): Constify.
558
559 2017-09-27  Tom Tromey  <tom@tromey.com>
560
561         * cp-support.c (first_component_command): Constify.
562
563 2017-09-27  Tom Tromey  <tom@tromey.com>
564
565         * psymtab.c (maintenance_print_psymbols)
566         (maintenance_info_psymtabs, maintenance_check_psymtabs):
567         Constify.
568
569 2017-09-27  Tom Tromey  <tom@tromey.com>
570
571         * windows-tdep.c (display_tib): Constify.
572
573 2017-09-27  Tom Tromey  <tom@tromey.com>
574
575         * linux-fork.c (delete_checkpoint_command)
576         (detach_checkpoint_command): Constify.
577
578 2017-09-27  Tom Tromey  <tom@tromey.com>
579
580         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
581
582 2017-09-27  Tom Tromey  <tom@tromey.com>
583
584         * arc-tdep.c (dump_arc_instruction_command): Constify.
585
586 2017-09-27  Tom Tromey  <tom@tromey.com>
587
588         * valprint.c (set_radix, show_radix): Constify.
589
590 2017-09-27  Tom Tromey  <tom@tromey.com>
591
592         * dtrace-probe.c (info_probes_dtrace_command): Constify.
593
594 2017-09-27  Tom Tromey  <tom@tromey.com>
595
596         * command.h (not_just_help_class_command): Update.
597         * cli/cli-decode.h (not_just_help_class_command): Update.
598         * cli/cli-decode.c (not_just_help_class_command): Constify.
599
600 2017-09-27  Tom Tromey  <tom@tromey.com>
601
602         * gdb_bfd.c (maintenance_info_bfds): Constify.
603
604 2017-09-27  Tom Tromey  <tom@tromey.com>
605
606         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
607         overloads.
608         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
609         (do_const_cfunc): New function.
610         (cmd_cfunc_eq): New overload.
611         (cli_user_command_p): Check do_const_cfunc.
612         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
613         const_cfunc.
614         * command.h (add_cmd): Add const overload and no-function
615         overload.
616         (set_cmd_cfunc): Add const overload.
617         (cmd_const_cfunc_ftype): Declare.
618         (cmd_cfunc_eq): Add const overload.
619         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
620         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
621         overload.
622
623 2017-09-27  Tom Tromey  <tom@tromey.com>
624
625         * macroexp.c (get_next_token_for_substitution): New function.
626         (substitute_args): Call it.  Check for __VA_OPT__.
627
628 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
629             Pedro Alves <palves@redhat.com>
630
631         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
632         producer_is_icc_lt_14.
633         (producer_is_icc_lt_14): New function.
634         (check_producer): Add code for checking version of ICC.
635         (producer_is_icc): Move to producer.c.
636         (read_structure_type): Restrict ICC workaround to ICC<14.
637         * producer.c: Include selftest.h.
638         (producer_is_icc, producer_parsing_tests, _initialize_producer):
639         New functions.
640         * producer.h (producer_is_icc): New declaration.
641
642 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
643
644         * Makefile.in (SFILES): Add producer.c.
645         (COMMON_OBS): Add producer.o
646         * amd64-tdep.c (producer.h): Add new include.
647         * dwarf2read.c (producer.h): Add new include.
648         * producer.c: New file.
649         * producer.h: New file.
650         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
651         producer.c.
652         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
653         producer.h.
654
655 2017-09-26  Matthias Klose  <doko@ubuntu.com>
656
657         * configure.ac: Search ncursesw before ncurses.
658         Check ncursesw/ncurses.h before ncurses/ncurses.h.
659         * gdb_curses.h: Include <ncursesw/ncurses.h>
660         * config.in, configure: Regenerate.
661
662 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
663
664         PR gdb/22185
665         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
666         obsolete.
667         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
668         Remove i386sol2 support.
669         * configure.nat <i386sol2>: Remove.
670         <sol2-64>: Fold into ...
671         <sol2>: ... this.
672         Move common settings to default section.
673         Add sol-thread.o.
674         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
675         x86_64-*-solaris2.1[0-9]*>: Rename to ...
676         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
677         <i[34567]86-*-solaris*>: Remove.
678         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
679
680         * configure.ac: Remove wctype in libw check.
681         (_MSE_INT_H): Don't define on Solaris 7-9.
682         <solaris*>: Remove libthread_db.so.1 check.
683         * configure: Regenerate.
684         * config.in: Regenerate.
685
686         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
687         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
688         (gdb_ps_size_t): Remove.
689         Use base types in users.
690         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
691
692         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
693
694 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
695
696         PR build/22206
697         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
698         (adi_is_addr_mapped): Likewise.
699         (PSR_ICC): Don't redefine.
700         (PSR_IMPL): Likewise.
701
702 2017-09-25  Tom Tromey  <tom@tromey.com>
703
704         * regcache.c (regcache::dump): Use string_printf.
705
706 2017-09-25  Tom Tromey  <tom@tromey.com>
707
708         * regcache.c (class regcache_invalidator): New.
709         (struct register_to_invalidate): Remove.
710         (make_cleanup_regcache_invalidate): Remove.
711         (regcache::raw_write): Use regcache_invalidator.
712
713 2017-09-25  Tom Tromey  <tom@tromey.com>
714
715         * spu-tdep.c (spu2ppu_sniffer): Update.
716         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
717         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
718         Remove.
719         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
720         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
721         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
722         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
723         (frame_pop): Update.
724
725 2017-09-25  Tom Tromey  <tom@tromey.com>
726
727         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
728         * regcache.h (regcache_xfree): Don't declare.
729         * regcache.c (regcache_xfree): Remove.
730         (do_regcache_xfree): Use delete.
731         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
732         * linux-fork.c (free_fork): Use delete.
733         (fork_save_infrun_state): Likewise.
734         * jit.c (jit_dealloc_cache): Use delete.
735         * infrun.c (discard_infcall_suspend_state): Use delete.
736
737 2017-09-25  Tom Tromey  <tom@tromey.com>
738
739         * regcache.h (regcache_xmalloc): Don't declare.
740         (regcache_raw_set_cached_value): Update comment.
741         * regcache.c (regcache_xmalloc): Remove.
742         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
743         * jit.c (jit_frame_sniffer): Use new.
744         * frame.c (frame_save_as_regcache): Use new.
745
746 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
747
748         * NEWS: Advertise support for guarded-storage registers on IBM z.
749
750 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
751
752         * s390-linux-nat.c (have_regset_gs): New static variable.
753         (s390_linux_fetch_inferior_registers): Handle guarded-storage
754         control block and guarded-storage broadcast control regsets.
755         (s390_read_description): Detect whether the target has
756         guarded-storage support, return appropriate tdesc.
757         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
758         (features/s390x-gs-linux64.c): Likewise.
759         (struct gdbarch_tdep) <have_gs>: New field.
760         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
761         (s390_gsbc_regset): New variables.
762         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
763         and s390_gsbc_regset, if applicable.
764         (s390_core_read_description): Check whether core file was from a
765         target with guarded-storage support; include appropriate regsets.
766         (s390_gdbarch_init): Add registers for guarded-storage support.
767         (_initialize_s390_tdep): Initialize new target descriptions that
768         include registers for guarded-storage support.
769         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
770         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
771         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
772         (S390_NUM_REGS): Adjust macro definition.
773         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
774         (tdesc_s390x_gs_linux64): New declarations.
775
776 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
777
778         * features/s390-gs-linux64.xml: New file.
779         * features/s390-gs.xml: New file.
780         * features/s390-gsbc.xml: New file.
781         * features/s390x-gs-linux64.xml: New file.
782         * features/Makefile (WHICH): Add s390-gs-linux64 and
783         s390x-gs-linux64.
784         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
785         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
786         * features/s390-gs-linux64.c: New generated file.
787         * features/s390x-gs-linux64.c: New file.
788         * regformats/s390-gs-linux64.dat: New file.
789         * regformats/s390x-gs-linux64.dat: New file.
790
791 2017-09-23  Tom Tromey  <tom@tromey.com>
792
793         * defs.h (make_cleanup_override_quit_handler): Don't declare.
794
795 2017-09-22  Tom Tromey  <tom@tromey.com>
796
797         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
798         type to scoped_restore_tmpl.
799         <scoped_input_handler>: Initialize m_quit_handler directly.
800
801 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
802
803         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
804         (cd_command): Likewise.  Free "current_directory" before
805         assigning to it.
806         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
807         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
808         * top.c (gdb_dirbuf): Remove global declaration.
809         * top.h (gdb_dirbuf): Likewise.
810
811 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
812
813         * gnulib/aclocal.m4: Regenerate.
814         * gnulib/config.in: Regenerate.
815         * gnulib/configure: Regenerate.
816         * gnulib/import/Makefile.am: Regenerate.
817         * gnulib/import/Makefile.in: Regenerate.
818         * gnulib/import/assure.h: New file.
819         * gnulib/import/at-func.c: Likewise
820         * gnulib/import/chdir-long.c: New file.
821         * gnulib/import/chdir-long.h: New file.
822         * gnulib/import/cloexec.c: New file.
823         * gnulib/import/cloexec.h: New file.
824         * gnulib/import/close.c: New file.
825         * gnulib/import/closedir.c: New file.
826         * gnulib/import/dirent-private.h: New file.
827         * gnulib/import/dup-safer.c: New file.
828         * gnulib/import/dup.c: New file.
829         * gnulib/import/dup2.c: New file.
830         * gnulib/import/error.c: New file.
831         * gnulib/import/error.h: New file.
832         * gnulib/import/exitfail.c: New file.
833         * gnulib/import/exitfail.h: New file.
834         * gnulib/import/fchdir.c: New file.
835         * gnulib/import/fcntl.c: New file.
836         * gnulib/import/fcntl.in.h: New file.
837         * gnulib/import/fd-hook.c: New file.
838         * gnulib/import/fd-hook.h: New file.
839         * gnulib/import/fd-safer.c: New file.
840         * gnulib/import/fdopendir.c: New file.
841         * gnulib/import/filename.h: New file.
842         * gnulib/import/filenamecat-lgpl.c: New file.
843         * gnulib/import/filenamecat.h: New file.
844         * gnulib/import/fstat.c: New file.
845         * gnulib/import/fstatat.c: New file.
846         * gnulib/import/getcwd-lgpl.c: New file.
847         * gnulib/import/getcwd.c: New file.
848         * gnulib/import/getdtablesize.c: New file.
849         * gnulib/import/getlogin_r.c: New file.
850         * gnulib/import/getprogname.c: New file.
851         * gnulib/import/getprogname.h: New file.
852         * gnulib/import/gettext.h: New file.
853         * gnulib/import/glob-libc.h: New file.
854         * gnulib/import/glob.c: New file.
855         * gnulib/import/glob.in.h: New file.
856         * gnulib/import/intprops.h: New file.
857         * gnulib/import/m4/chdir-long.m4: New file.
858         * gnulib/import/m4/close.m4: New file.
859         * gnulib/import/m4/closedir.m4: New file.
860         * gnulib/import/m4/d-ino.m4: New file.
861         * gnulib/import/m4/d-type.m4: New file.
862         * gnulib/import/m4/dup.m4: New file.
863         * gnulib/import/m4/dup2.m4: New file.
864         * gnulib/import/m4/error.m4: New file.
865         * gnulib/import/m4/fchdir.m4: New file.
866         * gnulib/import/m4/fcntl.m4: New file.
867         * gnulib/import/m4/fcntl_h.m4: New file.
868         * gnulib/import/m4/fdopendir.m4: New file.
869         * gnulib/import/m4/filenamecat.m4: New file.
870         * gnulib/import/m4/fstat.m4: New file.
871         * gnulib/import/m4/fstatat.m4: New file.
872         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
873         * gnulib/import/m4/getcwd-path-max.m4: New file.
874         * gnulib/import/m4/getcwd.m4: New file.
875         * gnulib/import/m4/getdtablesize.m4: New file.
876         * gnulib/import/m4/getlogin_r.m4: New file.
877         * gnulib/import/m4/getprogname.m4: New file.
878         * gnulib/import/m4/glob.m4: New file.
879         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
880         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
881         * gnulib/import/m4/mempcpy.m4: New file.
882         * gnulib/import/m4/memrchr.m4: New file.
883         * gnulib/import/m4/mode_t.m4: New file.
884         * gnulib/import/m4/msvc-inval.m4: New file.
885         * gnulib/import/m4/msvc-nothrow.m4: New file.
886         * gnulib/import/m4/open.m4: New file.
887         * gnulib/import/m4/openat.m4: New file.
888         * gnulib/import/m4/opendir.m4: New file.
889         * gnulib/import/m4/readdir.m4: New file.
890         * gnulib/import/m4/realloc.m4: New file.
891         * gnulib/import/m4/rewinddir.m4: New file.
892         * gnulib/import/m4/save-cwd.m4: New file.
893         * gnulib/import/m4/strdup.m4: New file.
894         * gnulib/import/m4/strerror.m4: New file.
895         * gnulib/import/m4/unistd-safer.m4: New file.
896         * gnulib/import/mempcpy.c: New file.
897         * gnulib/import/memrchr.c: New file.
898         * gnulib/import/msvc-inval.c: New file.
899         * gnulib/import/msvc-inval.h: New file.
900         * gnulib/import/msvc-nothrow.c: New file.
901         * gnulib/import/msvc-nothrow.h: New file.
902         * gnulib/import/open.c: New file.
903         * gnulib/import/openat-die.c: New file.
904         * gnulib/import/openat-priv.h: New file.
905         * gnulib/import/openat-proc.c: New file.
906         * gnulib/import/openat.c: New file.
907         * gnulib/import/openat.h: New file.
908         * gnulib/import/opendir.c: New file.
909         * gnulib/import/pipe-safer.c: New file.
910         * gnulib/import/readdir.c: New file.
911         * gnulib/import/realloc.c: New file.
912         * gnulib/import/rewinddir.c: New file.
913         * gnulib/import/save-cwd.c: New file.
914         * gnulib/import/save-cwd.h: New file.
915         * gnulib/import/strdup.c: New file.
916         * gnulib/import/strerror-override.c: New file.
917         * gnulib/import/strerror-override.h: New file.
918         * gnulib/import/strerror.c: New file.
919         * gnulib/import/unistd--.h: New file.
920         * gnulib/import/unistd-safer.h: New file.
921         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
922         "getcwd" and "glob".
923         * ser-tcp.c: Undefine "close" before redefining it.
924
925 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
926
927         * guile/scm-value.c (gdbscm_value_address): Initialize address,
928         get rid of res_val.
929
930 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
931
932         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
933         <sol2,sparc>: Likewise.
934         <sol2-64,i386>: Likewise.
935
936         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
937         -Wdeprecated-declarations on *-*-solaris*.
938         * configure: Regenerate.
939
940         * procfs.c: Include "nat/inferior.h".
941         (procfs_info_proc): Fix typo.
942
943 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
944
945         * remote.c (vector): Include.
946         (struct private_thread_info): Add field, thread_handle.
947         (free_private_thread_info): Deallocate storage associated with
948         thread handle.
949         (get_private_info_thread): Initialize `thread_handle' field.
950         (struct thread_item): Add field, thread_handle.
951         (clear_threads_listing_context): Deallocate storage associated
952         with thread handle.
953         (start_thread): Add support for "handle" attribute.
954         (thread_attributes): Add "handle".
955         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
956         field.
957         (remote_update_thread_list): Update thread_handle.
958         (remote_thread_handle_to_thread_info): New function.
959         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
960
961 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
962
963         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
964         function.
965         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
966         * python/python-internal.h (thread_object_type): Declare.
967
968 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
969
970         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
971         (target_thread_handle_to_thread_info): Declare.
972         * target.c (target_thread_handle_to_thread_info): New function.
973         * target-delegates.c: Regenerate.
974         * gdbthread.h (find_thread_by_handle): Declare.
975         * thread.c (find_thread_by_handle): New function.
976         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
977         function.
978         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
979
980 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
981
982         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
983
984 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
985
986         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
987
988 2017-09-21  Yao Qi  <yao.qi@linaro.org>
989
990         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
991         to gdb_target_obs.
992
993 2017-09-20  Tom Tromey  <tom@tromey.com>
994
995         * breakpoint.c (struct counted_command_line): Remove.
996         (breakpoint_commands): Update.
997         (alloc_counted_command_line, incref_counted_command_line)
998         (decref_counted_command_line, do_cleanup_counted_command_line)
999         (make_cleanup_decref_counted_command_line): Remove.
1000         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1001         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1002         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1003         (save_breakpoints): Update.
1004         * breakpoint.h (counted_command_line): Now a typedef to
1005         shared_ptr.
1006         (struct breakpoint) <commands>: Now a counted_command_line.
1007         (struct bpstats) <command>: Likewise.
1008
1009 2017-09-20  Tom Tromey  <tom@tromey.com>
1010
1011         * breakpoint.c (struct commands_info, do_map_commands_command):
1012         Remove.
1013         (commands_command_1): Update.
1014         (iterate_over_related_breakpoints): Take a function_view.
1015         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1016         (delete_command): Update.
1017         (map_breakpoint_numbers): Take a function_view.
1018         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1019         (disable_command): Update.
1020         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1021         (enable_command): Update.
1022         (struct disp_data, do_enable_breakpoint_disp)
1023         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1024         (do_map_enable_delete_breakpoint): Remove.
1025         (enable_once_command, enable_count_command, enable_delete_command)
1026         (delete_trace_variable_command): Update.
1027
1028 2017-09-20  Tom Tromey  <tom@tromey.com>
1029
1030         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1031         (bpstat_clear): Use delete.
1032         (bpstats): New constructors.
1033         (bpstat_copy, bpstat_stop_status): Use new.
1034         (dprintf_after_condition_true): Update.
1035         * breakpoint.h (bpstats::bpstats): Add constructors.
1036         (bpstats::~bpstats): Add destructor.
1037
1038 2017-09-20  Pedro Alves  <palves@redhat.com>
1039
1040         * eval.c (make_params): Delete, refactored as ...
1041         (class fake_method): ... this new type's ctor.
1042         (fake_method::~fake_method): New.
1043         (evaluate_subexp_standard): Use 'fake_method'.
1044
1045 2017-09-20  Tom Tromey  <tom@tromey.com>
1046
1047         * windows-nat.c (get_windows_debug_event, windows_wait)
1048         (do_initial_windows_stuff, windows_attach): Update.
1049         * utils.c (vwarning, internal_vproblem): Update.
1050         (ui_unregister_input_event_handler_cleanup)
1051         (prepare_to_handle_input): Remove.
1052         (class scoped_input_handler): New.
1053         (defaulted_query, prompt_for_continue): Update.
1054         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1055         Update.
1056         * top.c (undo_terminal_modifications_before_exit): Update.
1057         * target/target.h (target_terminal_init, target_terminal_inferior)
1058         (target_terminal_ours): Don't declare.
1059         (class target_terminal): New.
1060         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1061         (target_terminal_ours_for_output)
1062         (make_cleanup_restore_target_terminal): Don't declare.
1063         (target_terminal_info): Remove.
1064         * target.c (enum terminal_state, terminal_state): Remove.
1065         (target_terminal::terminal_state): Define.
1066         (target_terminal::init): Rename from target_terminal_init.
1067         (target_terminal::inferior): Rename from
1068         target_terminal_inferior.
1069         (target_terminal::ours): Rename from target_terminal_ours.
1070         (target_terminal::ours_for_output): Rename from
1071         target_terminal_ours_for_output.
1072         (target_terminal::info): New method.
1073         (cleanup_restore_target_terminal)
1074         (make_cleanup_restore_target_terminal): Remove.
1075         * solib.c (handle_solib_event): Update.
1076         * remote.c (remote_serial_quit_handler): Update.
1077         (remote_terminal_inferior, remote_wait_as): Update.
1078         * record-full.c (record_full_wait_1): Update.
1079         * nto-procfs.c (procfs_create_inferior): Update.
1080         * nat/fork-inferior.c (startup_inferior): Update.
1081         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1082         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1083         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1084         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1085         (mi_breakpoint_created, mi_breakpoint_deleted)
1086         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1087         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1088         (mi_user_selected_context_changed, report_initial_inferior):
1089         Update.
1090         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1091         (linux_nat_terminal_inferior): Update.
1092         * infrun.c (follow_fork_inferior)
1093         (handle_vfork_child_exec_or_exit, do_target_resume)
1094         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1095         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1096         Update.
1097         * inflow.c (child_terminal_init, info_terminal_command): Update.
1098         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1099         (attach_command): Update.
1100         * infcall.c (call_thread_fsm_should_stop): Update.
1101         * gnu-nat.c (gnu_attach): Update.
1102         * extension.c (struct active_ext_lang_state)
1103         (restore_active_ext_lang): Update.
1104         * exceptions.c (print_flush): Update.
1105         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1106         (struct quit_handler_cleanup_data, restore_quit_handler)
1107         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1108         Remove.
1109         * cp-support.c (gdb_demangle): Update.
1110         * breakpoint.c (update_inserted_breakpoint_locations)
1111         (insert_breakpoint_locations, handle_jit_event)
1112         (disable_breakpoints_in_unloaded_shlib): Update.
1113         * annotate.c (annotate_breakpoints_invalid)
1114         (annotate_frames_invalid): Update.
1115
1116 2017-09-20  Tom Tromey  <tom@tromey.com>
1117
1118         * main.c (catch_command_errors): Rename from
1119         catch_command_errors_const.
1120         (captured_main_1): Update.
1121
1122 2017-09-20  Pedro Alves  <palves@redhat.com>
1123
1124         * cli/cli-cmds.c (list_command): Use print_sal_location.
1125         (print_sal_location): New function.
1126         (ambiguous_line_spec): Use print_sal_location.
1127         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1128         * symtab.c (find_function_start_sal): Likewise.
1129         * symtab.h (symtab_and_line::symbol): New field.
1130
1131 2017-09-20  Pedro Alves  <palves@redhat.com>
1132
1133         * linespec.c (minsym_found): Handle non-text minsyms.
1134         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1135
1136 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1137
1138         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1139         backslash.
1140
1141 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1142
1143         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1144         vmovups instead vmovaps.
1145         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1146
1147 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1148
1149         * NEWS (Changes since GDB 8.0): Add starti.
1150         * infcmd.c (enum run_break): New.
1151         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1152         case.
1153         (run_command): Use enum run_how.
1154         (start_command): Likewise.
1155         (starti_command): New function.
1156         (RUN_ARGS_HELP): New macro.
1157         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1158         commands.  Add starti command.
1159
1160 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1161
1162         * Makefile.in (monitor.o): Remove the rule.
1163
1164 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1165
1166         * annotate.h (struct annotate_arg_emitter): Use
1167         DISABLE_COPY_AND_ASSIGN.
1168         * common/refcounted-object.h (refcounted_object): Likewise.
1169         * completer.h (struct completion_result): Likewise.
1170         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1171         * filename-seen-cache.h (filename_seen_cache): Likewise.
1172         * gdbcore.h (thread_section_name): Likewise.
1173         * gdb_regex.h (compiled_regex): Likewise.
1174         * gdbthread.h (scoped_restore_current_thread): Likewise.
1175         * inferior.h (scoped_restore_current_inferior): Likewise.
1176         * jit.c (jit_reader): Likewise.
1177         * linespec.h (struct linespec_result): Likewise.
1178         * mi/mi-parse.h (struct mi_parse): Likewise.
1179         * nat/fork-inferior.c (execv_argv): Likewise.
1180         * progspace.h (scoped_restore_current_program_space): Likewise.
1181         * python/python-internal.h (class gdbpy_enter): Likewise.
1182         * regcache.h (regcache): Likewise.
1183         * target-descriptions.c (struct tdesc_reg): Likewise.
1184         (struct tdesc_type): Likewise.
1185         (struct tdesc_feature): Likewise.
1186         * ui-out.h (ui_out_emit_type): Likewise.
1187
1188 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1189
1190         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1191         label abort_expression.
1192
1193 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1194
1195         * common/buffer.c (buffer_xml_printf): Adjust.
1196         * common/xml-utils.c (xml_escape_text): Change return type to
1197         std::string, update code accordingly.
1198         * common/xml-utils.h (xml_escape_text): Change return type to
1199         std::string.
1200         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1201         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1202         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1203         Adjust.
1204
1205 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1206
1207         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1208         (SUBDIR_UNITTESTS_OBS): Add new object file.
1209         * unittests/xml-utils-selftests.c: New file.
1210
1211 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1212
1213         * common/selftest.h (selftest): New struct/interface.
1214         (register_test): Add name parameter, add new overload.
1215         (run_tests): Add filter parameter.
1216         (for_each_selftest_ftype): New typedef.
1217         (for_each_selftest): New declaration.
1218         * common/selftest.c (tests): Change type to
1219         map<string, unique_ptr<selftest>>.
1220         (simple_selftest): New struct.
1221         (register_test): New function.
1222         (register_test): Add name parameter and use it.
1223         (run_tests): Add filter parameter and use it.  Add prints.
1224         Adjust to vector -> map change.
1225         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1226         registering selftests.
1227         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1228         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1229         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1230         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1231         * findvar.c (_initialize_findvar): Likewise.
1232         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1233         * maint.c (maintenance_selftest): Update call to run_tests.
1234         (maintenance_info_selftests): New function.
1235         (_initialize_maint_cmds): Register "maintenance info selftests"
1236         command.  Update "maintenance selftest" doc.
1237         * regcache.c (_initialize_regcache): Add names when registering
1238         selftests.
1239         * rust-exp.y (_initialize_rust_exp): Likewise.
1240         * selftest-arch.c (gdbarch_selftest): New struct.
1241         (gdbarch_tests): Remove.
1242         (register_test_foreach_arch): Add name parameter.  Call
1243         register_test.
1244         (tests_with_arch): Remove, move most content to
1245         gdbarch_selftest::operator().
1246         (_initialize_selftests_foreach_arch): Remove.
1247         * selftest-arch.h (register_test_foreach_arch): Add name
1248         parameter.
1249         (run_tests_with_arch): New declaration.
1250         * utils-selftests.c (_initialize_utils_selftests): Add names
1251         when registering selftests.
1252         * utils.c (_initialize_utils): Likewise.
1253         * unittests/array-view-selftests.c
1254         (_initialize_array_view_selftests): Likewise.
1255         * unittests/environ-selftests.c (_initialize_environ_selftests):
1256         Likewise.
1257         * unittests/function-view-selftests.c
1258         (_initialize_function_view_selftests): Likewise.
1259         * unittests/offset-type-selftests.c
1260         (_initialize_offset_type_selftests): Likewise.
1261         * unittests/optional-selftests.c
1262         (_initialize_optional_selftests): Likewise.
1263         * unittests/scoped_restore-selftests.c
1264         (_initialize_scoped_restore_selftests): Likewise.
1265         * NEWS: Document "maintenance selftest" and "maint info
1266         selftests".
1267
1268 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1269
1270         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1271         scoped_restore.
1272
1273 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1274
1275         * mi/mi-main.c (mi_load_progress): Make uiout variable
1276         a unique_ptr.
1277
1278 2017-09-15  Pedro Alves  <palves@redhat.com>
1279
1280         * compile/compile-c-types.c (convert_enum, convert_int)
1281         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1282
1283 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1284
1285         * dwarf2read.c (copy_string): Remove.
1286         (parse_macro_definition): Replace copy_string with savestring.
1287
1288 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1289
1290         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1291         gdb_target_obs.
1292         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1293         Likewise.
1294         (i[34567]86-*-linux*): Likewise.
1295
1296 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1297
1298         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1299         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1300         <stack>: Change type to std::vector.
1301         <stack_len, stack_allocated>: Remove.
1302         <grow_stack>: Remove.
1303         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1304         (dwarf_expr_context::~dwarf_expr_context): Remove.
1305         (dwarf_expr_context::grow_stack): Remove.
1306         (dwarf_expr_context::push): Adjust.
1307         (dwarf_expr_context::pop): Adjust.
1308         (dwarf_expr_context::fetch): Adjust.
1309         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1310         (dwarf_expr_context::stack_empty_p): Adjust.
1311         (dwarf_expr_context::execute_stack_op): Adjust.
1312
1313 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1314
1315         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1316         return type to bool.
1317         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1318
1319 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1320
1321         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1322         Change type to bool.
1323         (dwarf_stack_value) <in_stack_memory>: Likewise.
1324         (dwarf_expr_context) <push_address>: Change parameter type to
1325         bool.
1326         <fetch_in_stack_memory>: Change return type to bool.
1327         <push>: Change parameter type to bool.
1328         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1329         to bool.
1330         (dwarf_expr_context::push_address): Likewise.
1331         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1332         to bool.
1333         (dwarf_expr_context::execute_stack_op): Adjust.
1334         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1335
1336 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1337
1338         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1339         (struct dwarf_expr_context) <n_pieces>: Remove.
1340         <pieces>: Change type to std::vector.
1341         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1342         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1343         pieces.
1344         (dwarf_expr_context::add_piece): Adjust.
1345         * dwarf2loc.c (struct piece_closure): Initialize fields.
1346         <n_pieces>: Remove.
1347         <pieces>: Change type to std::vector.
1348         (allocate_piece_closure): Adjust, change parameter to
1349         std::vector rvalue and std::move it to piece_closure.
1350         (rw_pieced_value): Adjust.
1351         (check_pieced_synthetic_pointer): Adjust.
1352         (indirect_synthetic_pointer): Adjust.
1353         (coerce_pieced_ref): Adjust.
1354         (free_pieced_value_closure):  Adjust.  Use delete to free
1355         piece_closure.
1356         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1357         to allocate_piece_closure.
1358         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1359
1360 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1361
1362         * probe.h (probe_ops_cp): Remove typedef.
1363         (DEF_VEC_P (probe_ops_cp)): Remove.
1364         (all_probe_ops): Change type to std::vector.
1365         * probe.c (info_probes_for_ops): Adjust to vector change.
1366         (probe_linespec_to_ops): Likewise.
1367         (all_probe_ops): Change type to std::vector.
1368         (_initialize_probe): Adjust to vector change.
1369         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1370         * elfread.c (elf_get_probes): Likewise.
1371         * stap-probe.c (_initialize_stap_probe): Likewise.
1372
1373 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1374
1375         * probe.h (struct bound_probe): Define constructors.
1376         * probe.c (bound_probe_s): Remove typedef.
1377         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1378         (collect_probes): Change return type to std::vector, remove
1379         cleanup.
1380         (compare_probes): Return bool, change parameter type.  Change
1381         semantic to "less than".
1382         (gen_ui_out_table_header_info): Change parameter to std::vector
1383         and update.
1384         (exists_probe_with_pops): Likewise.
1385         (info_probes_for_ops): Update to std::vector change.
1386         (enable_probes_command): Likewise.
1387         (disable_probes_command): Likewise.
1388
1389 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1390
1391         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1392         vec to std::vector.
1393         * probe.c (parse_probes_in_pspace): Update.
1394         (find_probes_in_objfile): Update.
1395         (find_probe_by_pc): Update.
1396         (collect_probes): Update.
1397         (probe_any_get_probes): Update.
1398         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1399         return type to reference to std::vector.
1400         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1401         std::vector and update.
1402         (dtrace_process_dof): Likewise.
1403         (dtrace_get_probes): Likewise.
1404         * elfread.c (elf_get_probes): Change return type to std::vector,
1405         store an std::vector in bfd_data.
1406         (probe_key_free): Update to std::vector.
1407         * stap-probe.c (handle_stap_probe): Change parameter to
1408         std::vector and update.
1409         (stap_get_probes): Likewise.
1410         * symfile-debug.c (debug_sym_get_probes): Change return type to
1411         std::vector and update.
1412
1413 2017-09-11  Tom Tromey  <tom@tromey.com>
1414
1415         * breakpoint.c (program_breakpoint_here_p): Update.
1416         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1417         from make_show_memory_breakpoints_cleanup.  Return a
1418         scoped_restore_tmpl<int>.
1419         (restore_show_memory_breakpoints): Remove.
1420         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1421         * mem-break.c (memory_validate_breakpoint): Update.
1422         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1423         (ia64_memory_remove_breakpoint): Update.
1424         (ia64_breakpoint_from_pc): Update.
1425         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1426         from make_show_memory_breakpoints_cleanup.
1427
1428 2017-09-11  Tom Tromey  <tom@tromey.com>
1429
1430         * d-namespace.c (d_lookup_symbol): Use std::string.
1431         (find_symbol_in_baseclass): Likewise.
1432
1433 2017-09-11  Tom Tromey  <tom@tromey.com>
1434
1435         * ctf.c (ctf_start): Use std::string.
1436
1437 2017-09-11  Tom Tromey  <tom@tromey.com>
1438
1439         * ada-lang.c (is_known_support_routine): Update.
1440         (ada_unhandled_exception_name_addr_from_raise): Update.
1441         * guile/scm-frame.c (gdbscm_frame_name): Update.
1442         * python/py-frame.c (frapy_name): Update.
1443         (frapy_function): Update.
1444         * stack.h (find_frame_funname): Update.
1445         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1446         (print_frame): Update.
1447
1448 2017-09-11  Tom Tromey  <tom@tromey.com>
1449
1450         * findcmd.c (put_bits): Take a gdb::byte_vector.
1451         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1452         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1453         cleanups.
1454         (find_command): Update.
1455
1456 2017-09-11  Tom Tromey  <tom@tromey.com>
1457
1458         * cli/cli-script.c (class scoped_restore_hook_in): New.
1459         (clear_hook_in_cleanup): Remove.
1460         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1461         scoped_restore_hook_in.
1462
1463 2017-09-11  Tom Tromey  <tom@tromey.com>
1464
1465         * cli/cli-script.c (restore_interp): Remove.
1466         (read_command_lines): Use scoped_restore_interp.
1467         * interps.c (scoped_restore_interp::set_temp): Rename from
1468         interp_set_temp.
1469         * interps.h (class scoped_restore_interp): New.
1470         (interp_set_temp): Remove.
1471
1472 2017-09-11  Tom Tromey  <tom@tromey.com>
1473
1474         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1475         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1476         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1477         scoped_restore.
1478         (mi_cmd_break_insert_1): Update.
1479         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1480         scoped_restore.
1481
1482 2017-09-11  Tom Tromey  <tom@tromey.com>
1483
1484         * demangle.c (demangle_command): Update.
1485         * breakpoint.c (disable_command): Update.
1486         (enable_command): Update.
1487         (find_location_by_number): Make "number" const.  Use
1488         get_number_trailer.
1489         * cli/cli-utils.c (extract_arg): Return std::string.
1490         * probe.c (parse_probe_linespec): Update.  Change types.
1491         (collect_probes): Take string arguments.
1492         (parse_probe_linespec): Likewise.
1493         (info_probes_for_ops): Update.
1494         (enable_probes_command): Update.
1495         (disable_probes_command): Update.
1496         * break-catch-sig.c (catch_signal_split_args): Update.
1497         * mi/mi-parse.c (mi_parse): Update.
1498
1499 2017-09-11  Tom Tromey  <tom@tromey.com>
1500
1501         * language.h (language_enum): Make argument const.
1502         * language.c (language_enum): Make argument const.
1503
1504 2017-09-11  Tom Tromey  <tom@tromey.com>
1505
1506         * common/common-utils.h (skip_to_space): Remove macro, redeclare
1507         as function.
1508         (skip_to_space): Rename from skip_to_space_const.
1509         * common/common-utils.c (skip_to_space): New function.
1510         (skip_to_space): Rename from skip_to_space_const.
1511         * cli/cli-utils.h (get_number): Rename from get_number_const.
1512         (extract_arg): Rename from extract_arg_const.
1513         * cli/cli-utils.c (get_number): Rename from get_number_const.
1514         (extract_arg): Rename from extract_arg_const.
1515         (number_or_range_parser::get_number): Use ::get_number.
1516         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1517         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1518         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1519         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1520         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1521         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1522         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1523         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1524
1525 2017-09-11  Tom Tromey  <tom@tromey.com>
1526
1527         * python/python.c (do_start_initialization): Use
1528         py-event-types.def to initialize types.
1529         Define all object type structures.
1530         * python/python-internal.h: Don't declare event initialization
1531         functions.
1532         * python/py-threadevent.c (thread_event_object_type): Don't
1533         define.
1534         * python/py-stopevent.c (stop_event_object_type): Don't define.
1535         * python/py-signalevent.c (signal_event_object_type): Don't
1536         declare or define.
1537         * python/py-newobjfileevent.c (new_objfile_event_object_type)
1538         (clear_objfiles_event_object_type): Don't declare or define.
1539         * python/py-infevents.c (inferior_call_pre_event_object_type)
1540         (inferior_call_post_event_object_type)
1541         (register_changed_event_object_type)
1542         (memory_changed_event_object_type): Don't declare or define.
1543         * python/py-inferior.c (new_thread_event_object_type)
1544         (new_inferior_event_object_type)
1545         (inferior_deleted_event_object_type): Don't declare or define.
1546         * python/py-exitedevent.c (exited_event_object_type): Don't
1547         declare or define.
1548         * python/py-evts.c (gdbpy_initialize_py_events): Use
1549         py-all-events.def.
1550         * python/py-events.h (thread_event_object_type): Don't declare.
1551         (events_object): Use py-all-events.def.
1552         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
1553         py-event-types.def.
1554         * python/py-event-types.def: New file.
1555         * python/py-continueevent.c (create_continue_event_object): Don't
1556         declare or define.
1557         * python/py-bpevent.c (breakpoint_event_object_type): Don't
1558         declare or define.
1559         * python/py-all-events.def: New file.
1560
1561 2017-09-11  Tom Tromey  <tom@tromey.com>
1562
1563         * python/py-threadevent.c (create_thread_event_object): Return
1564         gdbpy_ref.
1565         * python/py-stopevent.h (create_stop_event_object)
1566         (create_breakpoint_event_object, create_signal_event_object):
1567         Update.
1568         * python/py-stopevent.c (create_stop_event_object): Return
1569         gdbpy_ref.
1570         (emit_stop_event): Update.
1571         * python/py-signalevent.c (create_signal_event_object): Return
1572         gdbpy_ref.
1573         * python/py-infevents.c (create_inferior_call_event_object):
1574         Update.
1575         * python/py-event.h (create_event_object)
1576         (create_thread_event_object): Update.
1577         * python/py-event.c (create_event_object): Return gdbpy_ref.
1578         * python/py-continueevent.c: Return gdbpy_ref.
1579         * python/py-bpevent.c (create_breakpoint_event_object): Return
1580         gdbpy_ref.
1581
1582 2017-09-11  Tom Tromey  <tom@tromey.com>
1583
1584         PR python/15622:
1585         * NEWS: Add entry.
1586         * python/python.c (do_start_initialization): Initialize new event
1587         types.
1588         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1589         (gdbpy_initialize_inferior_deleted_event)
1590         (gdbpy_initialize_new_thread_event): Declare.
1591         * python/py-threadevent.c (create_thread_event_object): Add option
1592         "thread" parameter.
1593         * python/py-inferior.c (new_thread_event_object_type)
1594         (new_inferior_event_object_type)
1595         (inferior_deleted_event_object_type): Declare.
1596         (python_new_inferior, python_inferior_deleted): New functions.
1597         (add_thread_object): Emit new_thread event.
1598         (gdbpy_initialize_inferior): Attach new functions to corresponding
1599         observers.
1600         (new_thread, new_inferior, inferior_deleted): Define new event
1601         types.
1602         * python/py-evts.c (gdbpy_initialize_py_events): Add new
1603         registries.
1604         * python/py-events.h (events_object) <new_inferior,
1605         inferior_deleted, new_thread>: New fields.
1606         * python/py-event.h (create_thread_event_breakpoint): Add optional
1607         "thread" parameter.
1608
1609 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1610
1611         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1612         check current_ui instead.
1613         (internal_vproblem): Likewise.
1614
1615 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1616
1617         * thread.c (print_thread_info_1): Remove unnecessary calls to
1618         uiout->is_mi_like_p.
1619
1620 2017-09-09  Tom Tromey  <tom@tromey.com>
1621
1622         * namespace.h (add_using_directive): Update.
1623         * namespace.c (add_using_directive): Change type of excludes to
1624         std::vector.
1625         * dwarf2read.c (read_import_statement): Use std::vector.
1626         (read_namespace): Update.
1627         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1628
1629 2017-09-09  Tom Tromey  <tom@tromey.com>
1630
1631         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1632
1633 2017-09-09  Tom Tromey  <tom@tromey.com>
1634
1635         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1636
1637 2017-09-09  Tom Tromey  <tom@tromey.com>
1638
1639         * stack.c (func_command): Use gdb::def_vector.
1640
1641 2017-09-09  Tom Tromey  <tom@tromey.com>
1642
1643         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1644         ui_out_emit_list, ui_out_emit_tuple.
1645         (mi_cmd_var_update): Likewise.
1646
1647 2017-09-09  Tom Tromey  <tom@tromey.com>
1648
1649         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1650         ui_out_redirect_pop.
1651         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1652         ui_out_redirect_pop.
1653         * utils.c (do_ui_out_redirect_pop)
1654         (make_cleanup_ui_out_redirect_pop): Remove.
1655         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1656         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1657         * ui-out.h (ui_out_redirect_pop): New class.
1658
1659 2017-09-09  Tom Tromey  <tom@tromey.com>
1660
1661         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1662         (list_available_thread_groups, mi_cmd_list_thread_groups)
1663         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1664         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1665         Likewise.
1666
1667 2017-09-09  Tom Tromey  <tom@tromey.com>
1668
1669         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1670         ui_out_emit_tuple.
1671
1672 2017-09-09  Tom Tromey  <tom@tromey.com>
1673
1674         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1675         * stack.c (print_frame): Use ui_out_emit_tuple.
1676         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1677         (info_spu_mailbox_command, info_spu_dma_command)
1678         (info_spu_proxydma_command): Likewise.
1679         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1680         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1681         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1682         ui_out_emit_tuple.
1683         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1684
1685 2017-09-09  Tom Tromey  <tom@tromey.com>
1686
1687         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1688         (class ui_out_emit_table): Update comment.
1689         * ui-out.c (do_cleanup_table_end)
1690         (make_cleanup_ui_out_table_begin_end): Remove.
1691         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1692         (info_spu_dma_cmdlist): Likewise.
1693         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1694         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1695         ui_out_emit_table.
1696
1697 2017-09-09  Tom Tromey  <tom@tromey.com>
1698
1699         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1700         ui_out_emit_list, gdb::optional.
1701
1702 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1703
1704         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1705         prototype.
1706         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1707         prototype.
1708         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1709         prototype.
1710         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1711         * ada-exp.y: Remove _initialize_ada_exp prototype.
1712         * ada-lang.c: Remove _initialize_ada_language prototype.
1713         * ada-tasks.c: Remove _initialize_tasks prototype.
1714         * addrmap.c: Remove _initialize_addrmap prototype.
1715         * agent.c: Remove _initialize_agent prototype.
1716         * aix-thread.c: Remove _initialize_aix_thread prototype.
1717         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1718         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1719         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1720         prototype.
1721         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1722         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1723         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1724         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1725         prototype.
1726         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1727         prototype.
1728         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1729         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1730         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1731         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1732         prototype.
1733         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1734         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1735         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1736         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1737         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1738         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1739         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1740         prototype.
1741         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1742         prototype.
1743         * annotate.c: Remove _initialize_annotate prototype.
1744         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1745         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1746         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1747         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1748         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1749         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1750         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1751         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1752         prototype.
1753         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1754         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1755         * auto-load.c: Remove _initialize_auto_load prototype.
1756         * auxv.c: Remove _initialize_auxv prototype.
1757         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1758         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1759         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1760         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1761         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1762         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1763         prototype.
1764         * break-catch-throw.c: Remove _initialize_break_catch_throw
1765         prototype.
1766         * breakpoint.c: Remove _initialize_breakpoint prototype.
1767         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1768         * btrace.c: Remove _initialize_btrace prototype.
1769         * charset.c: Remove _initialize_charset prototype.
1770         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1771         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1772         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1773         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1774         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1775         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1776         * coffread.c: Remove _initialize_coffread prototype.
1777         * compile/compile.c: Remove _initialize_compile prototype.
1778         * complaints.c: Remove _initialize_complaints prototype.
1779         * completer.c: Remove _initialize_completer prototype.
1780         * copying.awk: Remove _initialize_copying prototype.
1781         * copying.c: Regenerate.
1782         * core-regset.c: Remove _initialize_core_regset prototype.
1783         * corefile.c: Remove _initialize_core prototype.
1784         * corelow.c: Remove _initialize_corelow prototype.
1785         * cp-abi.c: Remove _initialize_cp_abi prototype.
1786         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1787         * cp-support.c: Remove _initialize_cp_support prototype.
1788         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1789         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1790         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1791         * ctf.c: Remove _initialize_ctf prototype.
1792         * d-lang.c: Remove _initialize_d_language prototype.
1793         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1794         prototype.
1795         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1796         * dbxread.c: Remove _initialize_dbxread prototype.
1797         * dcache.c: Remove _initialize_dcache prototype.
1798         * demangle.c: Remove _initialize_demangler prototype.
1799         * disasm-selftests.c: Remove _initialize_disasm_selftests
1800         prototype.
1801         * disasm.c: Remove _initialize_disasm prototype.
1802         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1803         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1804         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1805         prototype.
1806         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1807         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1808         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1809         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1810         * elfread.c: Remove _initialize_elfread prototype.
1811         * exec.c: Remove _initialize_exec prototype.
1812         * extension.c: Remove _initialize_extension prototype.
1813         * f-lang.c: Remove _initialize_f_language prototype.
1814         * f-valprint.c: Remove _initialize_f_valprint prototype.
1815         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1816         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1817         * filesystem.c: Remove _initialize_filesystem prototype.
1818         * findcmd.c: Remove _initialize_mem_search prototype.
1819         * fork-child.c: Remove _initialize_fork_child prototype.
1820         * frame-base.c: Remove _initialize_frame_base prototype.
1821         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1822         * frame.c: Remove _initialize_frame prototype.
1823         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1824         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1825         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1826         * gcore.c: Remove _initialize_gcore prototype.
1827         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1828         * gdbarch.c: Regenerate.
1829         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1830         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1831         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1832         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1833         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1834         * go-lang.c: Remove _initialize_go_language prototype.
1835         * go32-nat.c: Remove _initialize_go32_nat prototype.
1836         * guile/guile.c: Remove _initialize_guile prototype.
1837         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1838         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1839         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1840         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1841         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1842         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1843         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1844         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1845         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1846         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1847         prototype.
1848         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1849         prototype.
1850         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1851         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1852         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1853         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1854         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1855         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1856         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1857         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1858         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1859         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1860         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1861         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1862         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1863         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1864         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1865         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1866         prototype.
1867         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1868         prototype.
1869         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1870         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1871         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1872         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1873         * infcall.c: Remove _initialize_infcall prototype.
1874         * infcmd.c: Remove _initialize_infcmd prototype.
1875         * inferior.c: Remove _initialize_inferiors prototype.
1876         * inflow.c: Remove _initialize_inflow prototype.
1877         * infrun.c: Remove _initialize_infrun prototype.
1878         * interps.c: Remove _initialize_interpreter prototype.
1879         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1880         * jit.c: Remove _initialize_jit prototype.
1881         * language.c: Remove _initialize_language prototype.
1882         * linux-fork.c: Remove _initialize_linux_fork prototype.
1883         * linux-nat.c: Remove _initialize_linux_nat prototype.
1884         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1885         * linux-thread-db.c: Remove _initialize_thread_db prototype.
1886         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1887         * m2-lang.c: Remove _initialize_m2_language prototype.
1888         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1889         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1890         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1891         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1892         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1893         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1894         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1895         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1896         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1897         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1898         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1899         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1900         * machoread.c: Remove _initialize_machoread prototype.
1901         * macrocmd.c: Remove _initialize_macrocmd prototype.
1902         * macroscope.c: Remove _initialize_macroscope prototype.
1903         * maint.c: Remove _initialize_maint_cmds prototype.
1904         * mdebugread.c: Remove _initialize_mdebugread prototype.
1905         * memattr.c: Remove _initialize_mem prototype.
1906         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1907         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1908         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1909         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1910         * mi/mi-main.c: Remove _initialize_mi_main prototype.
1911         * microblaze-linux-tdep.c: Remove
1912         _initialize_microblaze_linux_tdep prototype.
1913         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1914         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1915         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1916         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1917         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1918         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1919         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1920         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1921         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1922         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1923         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1924         prototype.
1925         * mipsread.c: Remove _initialize_mipsread prototype.
1926         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1927         prototype.
1928         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1929         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1930         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1931         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1932         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1933         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1934         prototype.
1935         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1936         * nto-procfs.c: Remove _initialize_procfs prototype.
1937         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1938         * objc-lang.c: Remove _initialize_objc_language prototype.
1939         * objfiles.c: Remove _initialize_objfiles prototype.
1940         * observer.c: Remove observer_test_first_notification_function,
1941         observer_test_second_notification_function,
1942         observer_test_third_notification_function, and
1943         _initialize_observer prototypes.
1944         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1945         * osabi.c: Remove _initialize_gdb_osabi prototype.
1946         * osdata.c: Remove _initialize_osdata prototype.
1947         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1948         * parse.c: Remove _initialize_parse prototype.
1949         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1950         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1951         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1952         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1953         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1954         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1955         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1956         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1957         * printcmd.c: Remove _initialize_printcmd prototype.
1958         * probe.c: Remove _initialize_probe prototype.
1959         * proc-api.c: Remove _initialize_proc_api prototype.
1960         * proc-events.c: Remove _initialize_proc_events prototype.
1961         * proc-service.c: Remove _initialize_proc_service prototype.
1962         * procfs.c: Remove _initialize_procfs prototype.
1963         * psymtab.c: Remove _initialize_psymtab prototype.
1964         * python/python.c: Remove _initialize_python prototype.
1965         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1966         * record-btrace.c: Remove _initialize_record_btrace prototype.
1967         * record-full.c: Remove _initialize_record_full prototype.
1968         * record.c: Remove _initialize_record prototype.
1969         * regcache.c: Remove _initialize_regcache prototype.
1970         * reggroups.c: Remove _initialize_reggroup prototype.
1971         * remote-notif.c: Remove _initialize_notif prototype.
1972         * remote-sim.c: Remove _initialize_remote_sim prototype.
1973         * remote.c: Remove _initialize_remote prototype.
1974         * reverse.c: Remove _initialize_reverse prototype.
1975         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1976         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1977         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1978         prototype.
1979         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1980         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1981         * rust-exp.y: Remove _initialize_rust_exp prototype.
1982         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1983         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1984         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1985         * score-tdep.c: Remove _initialize_score_tdep prototype.
1986         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1987         prototype.
1988         * ser-go32.c: Remove _initialize_ser_dos prototype.
1989         * ser-mingw.c: Remove _initialize_ser_windows prototype.
1990         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1991         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1992         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1993         * serial.c: Remove _initialize_serial prototype.
1994         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1995         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1996         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1997         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1998         * skip.c: Remove _initialize_step_skip prototype.
1999         * sol-thread.c: Remove _initialize_sol_thread prototype.
2000         * solib-aix.c: Remove _initialize_solib_aix prototype.
2001         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2002         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2003         * solib-frv.c: Remove _initialize_frv_solib prototype.
2004         * solib-spu.c: Remove _initialize_spu_solib prototype.
2005         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2006         * solib-target.c: Remove _initialize_solib_target prototype.
2007         * solib.c: Remove _initialize_solib prototype.
2008         * source.c: Remove _initialize_source prototype.
2009         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2010         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2011         prototype.
2012         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2013         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2014         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2015         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2016         prototype.
2017         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2018         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2019         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2020         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2021         prototype.
2022         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2023         prototype.
2024         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2025         prototype.
2026         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2027         prototype.
2028         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2029         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2030         prototype.
2031         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2032         prototype.
2033         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2034         prototype.
2035         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2036         prototype.
2037         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2038         prototype.
2039         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2040         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2041         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2042         * stabsread.c: Remove _initialize_stabsread prototype.
2043         * stack.c: Remove _initialize_stack prototype.
2044         * stap-probe.c: Remove _initialize_stap_probe prototype.
2045         * std-regs.c: Remove _initialize_frame_reg prototype.
2046         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2047         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2048         * symfile.c: Remove _initialize_symfile prototype.
2049         * symmisc.c: Remove _initialize_symmisc prototype.
2050         * symtab.c: Remove _initialize_symtab prototype.
2051         * target-dcache.c: Remove _initialize_target_dcache prototype.
2052         * target-descriptions.c: Remove _initialize_target_descriptions
2053         prototype.
2054         * thread.c: Remove _initialize_thread prototype.
2055         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2056         prototype.
2057         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2058         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2059         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2060         prototype.
2061         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2062         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2063         * tracefile.c: Remove _initialize_tracefile prototype.
2064         * tracepoint.c: Remove _initialize_tracepoint prototype.
2065         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2066         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2067         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2068         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2069         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2070         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2071         * tui/tui.c: Remove _initialize_tui prototype.
2072         * typeprint.c: Remove _initialize_typeprint prototype.
2073         * user-regs.c: Remove _initialize_user_regs prototype.
2074         * utils.c: Remove _initialize_utils prototype.
2075         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2076         * valarith.c: Remove _initialize_valarith prototype.
2077         * valops.c: Remove _initialize_valops prototype.
2078         * valprint.c: Remove _initialize_valprint prototype.
2079         * value.c: Remove _initialize_values prototype.
2080         * varobj.c: Remove _initialize_varobj prototype.
2081         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2082         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2083         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2084         * windows-nat.c: Remove _initialize_windows_nat,
2085         _initialize_check_for_gdb_ini, and _initialize_loadable
2086         prototypes.
2087         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2088         * xcoffread.c: Remove _initialize_xcoffread prototype.
2089         * xml-support.c: Remove _initialize_xml_support prototype.
2090         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2091         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2092         prototype.
2093         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2094         prototype.
2095         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2096
2097 2017-09-08  Keith Seitz  <keiths@redhat.com>
2098
2099         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2100         field.
2101
2102 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2103
2104         * f-valprint.c (f_val_print): Remove check for one byte
2105         sized integers. Remove printing of character type.
2106
2107 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2108             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2109             Bernhard Heckel  <bernhard.heckel@intel.com>
2110
2111         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2112         to maintain proper indentation when printing pointers/refs.
2113
2114 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2115
2116         GDB 8.0.1 released.
2117
2118 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2119
2120         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2121
2122 2017-09-05  Tom Tromey  <tom@tromey.com>
2123
2124         * parse.c (funcall_chain): Now a std::vector.
2125         (start_arglist, end_arglist): Simplify.
2126         (free_funcalls): Remove.
2127         (parse_exp_in_context_1): Remove cleanup.
2128
2129 2017-09-05  Tom Tromey  <tom@tromey.com>
2130
2131         * go-exp.y (go_parse): Don't create a cleanup.
2132
2133 2017-09-05  Tom Tromey  <tom@tromey.com>
2134
2135         * d-exp.y (PrimaryExpression): Use std::string.
2136         (d_parse): Don't create a cleanup.
2137
2138 2017-09-05  Tom Tromey  <tom@tromey.com>
2139
2140         * utils.c (do_clear_parser_state): Remove.
2141         (make_cleanup_clear_parser_state): Remove.
2142         * p-exp.y (pascal_parse): Use scoped_restore.
2143         * m2-exp.y (m2_parse): Use scoped_restore.
2144         * f-exp.y (f_parse): Use scoped_restore.
2145         * d-exp.y (d_parse): Use scoped_restore.
2146         * c-exp.y (c_parse): Use scoped_restore.
2147         * ada-exp.y (ada_parse): Use scoped_restore.
2148         * utils.h (make_cleanup_clear_parser_state): Remove.
2149
2150 2017-09-06  Keith Seitz  <keiths@redhat.com>
2151
2152         * dwarf2read.c (dw2_linkage_name_attr): New function.
2153         (dw2_linkage_name): New function.
2154         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2155         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2156         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2157
2158 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2159
2160         * config/djgpp/djconfig.sh: Correct shell portability issue.
2161
2162 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2163
2164         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2165
2166 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2167
2168         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2169         * NEWS: Mention new FreeBSD/mips native configuration.
2170         * configure.host: Add aarch64*-*-freebsd*.
2171         * configure.nat: Likewise.
2172         * aarch64-fbsd-nat.c: New file.
2173
2174 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2175
2176         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2177         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2178         * NEWS: Mention new FreeBSD/aarch64 target.
2179         * configure.tgt: Add aarch64*-*-freebsd*.
2180         * aarch64-fbsd-tdep.c: New file.
2181         * aarch64-fbsd-tdep.h: New file.
2182
2183 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2184
2185         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2186
2187 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2188
2189         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2190         of TLS symbols.
2191
2192 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2193
2194         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2195         call.
2196
2197 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2198
2199         * infrun.c (follow_exec): Call add_thread after
2200         target_find_description.
2201
2202 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2203
2204         * infrun.c (handle_inferior_event_1): When exec'ing, read
2205         stop_pc after follow_exec.
2206
2207 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2208
2209         * remote.c (process_g_packet): Update error message.
2210
2211 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2212
2213         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2214         targets.
2215
2216 2017-09-05  Pedro Alves  <palves@redhat.com>
2217
2218         * eval.c (eval_call, evaluate_funcall): New functions, factored
2219         out from ...
2220         (evaluate_subexp_standard): ... this.
2221
2222 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2223
2224         * amd64-tdep.c (amd64_target_description): Create target
2225         descriptions.
2226         (_initialize_amd64_tdep): Don't call functions
2227         initialize_tdesc_amd64_*.  Add self tests.
2228         * arch/amd64.c (amd64_create_target_description): Add parameter
2229         is_linux.  Call set_tdesc_osabi if is_linux is true.
2230         * arch/amd64.h (amd64_create_target_description): Update the
2231         declaration.
2232         * arch/i386.c (i386_create_target_description): Add parameter
2233         is_linux.  Call set_tdesc_osabi if is_linux is true.
2234         * arch/i386.h (i386_create_target_description): Update
2235         declaration.
2236         * configure.tgt: Add i386.o to gdb_target_obs.
2237         * features/Makefile (XMLTOC): Remove i386/*.xml.
2238         * features/i386/amd64-avx-avx512.c: Remove.
2239         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2240         * features/i386/amd64-avx-mpx.c: Remove.
2241         * features/i386/amd64-avx.c: Remove.
2242         * features/i386/amd64-mpx.c: Remove.
2243         * features/i386/amd64.c: Remove.
2244         * features/i386/i386-avx-avx512.c: Remove.
2245         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2246         * features/i386/i386-avx-mpx.c: Remove.
2247         * features/i386/i386-avx.c: Remove.
2248         * features/i386/i386-mmx.c: Remove.
2249         * features/i386/i386-mpx.c: Remove.
2250         * features/i386/i386.c: Remove.
2251         * i386-tdep.c: Don't include features/i386/i386*.c., include
2252         target-descriptions.h and arch/i386.h.
2253         (i386_target_description): Create target descriptions.
2254         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2255         functions.  Do self tests.
2256
2257 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2258
2259         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2260         * features/i386/amd64-avx-avx512-linux.c: Removed.
2261         * features/i386/amd64-avx-linux.c: Removed.
2262         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2263         * features/i386/amd64-avx-mpx-linux.c: Removed.
2264         * features/i386/amd64-linux.c: Removed.
2265         * features/i386/amd64-mpx-linux.c: Removed.
2266         * features/i386/x32-avx-avx512-linux.c: Removed.
2267         * features/i386/x32-avx-linux.c: Removed.
2268         * features/i386/x32-linux.c: Removed.
2269
2270 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2271
2272         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2273         features/i386/*.c.
2274         (amd64_linux_read_description): Call
2275         amd64_create_target_description.
2276         * arch/amd64.c: New file.
2277         * arch/amd64.h: New file.
2278         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2279         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2280
2281 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2282
2283         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2284         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2285         (amd64_linux_read_description): Create target descriptions.
2286         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2287         functions.  Add unit tests.
2288         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2289         x32-core.xml.
2290         * features/i386/64bit-avx.c: Generated.
2291         * features/i386/64bit-avx512.c: Generated.
2292         * features/i386/64bit-core.c: Generated.
2293         * features/i386/64bit-linux.c: Generated.
2294         * features/i386/64bit-mpx.c: Generated.
2295         * features/i386/64bit-pkeys.c: Generated.
2296         * features/i386/64bit-segments.c: Generated.
2297         * features/i386/64bit-sse.c: Generated.
2298         * features/i386/x32-core.c: Generated.
2299         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2300         c files for amd64-linux and x32-linux.
2301
2302 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2303
2304         * amd64-linux-tdep.c (amd64_linux_read_description): New
2305         function.
2306         (amd64_linux_core_read_description): Call
2307         amd64_linux_read_description.
2308         (amd64_linux_init_abi): Likewise.
2309         (amd64_x32_linux_init_abi): Likewise.
2310         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2311         * x86-linux-nat.c (x86_linux_read_description): Call
2312         amd64_linux_read_description.
2313
2314 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2315
2316         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2317         comments.
2318
2319 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2320
2321         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2322         * features/i386/i386-avx-avx512-linux.c: Remove.
2323         * features/i386/i386-avx-linux.c: Remove.
2324         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2325         * features/i386/i386-avx-mpx-linux.c: Remove.
2326         * features/i386/i386-linux.c: Remove.
2327         * features/i386/i386-mmx-linux.c: Remove.
2328         * features/i386/i386-mpx-linux.c: Remove.
2329
2330 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2331
2332         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2333         (SFILES): Add arch/i386.c.
2334         (HFILES_NO_SRCDIR): Add arch/i386.h.
2335         * arch/i386.c: New file.
2336         * arch/i386.h: New file.
2337         * arch/tdesc.h (allocate_target_description): Declare.
2338         (set_tdesc_architecture): Declare.
2339         (set_tdesc_osabi): Declare.
2340         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2341         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2342         include arch/i386.h.
2343         (i386_linux_read_description): Remove code and call
2344         i386_create_target_description.
2345         (set_tdesc_architecture): New function.
2346         (set_tdesc_osabi): New function.
2347         * target-descriptions.h (allocate_target_description): Remove.
2348
2349 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2350
2351         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2352         * target-descriptions.c (tdesc_create_feature): Likewise, and
2353         adjust code.
2354         * features/i386/32bit-avx.c: Re-generated.
2355         * features/i386/32bit-avx512.c: Re-generated.
2356         * features/i386/32bit-core.c: Re-generated.
2357         * features/i386/32bit-linux.c: Re-generated.
2358         * features/i386/32bit-mpx.c: Re-generated.
2359         * features/i386/32bit-pkeys.c: Re-generated.
2360         * features/i386/32bit-sse.c: Re-generated.
2361
2362 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2363
2364         * regformats/regdef.h (struct reg): Override operator == and !=.
2365
2366 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2367
2368         * arch/tdesc.h: New file.
2369         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2370         * target-descriptions.c: Update comments.
2371         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2372         declarations.
2373         * features/i386/32bit-avx.c: Re-generated.
2374         * features/i386/32bit-avx512.c: Re-generated.
2375         * features/i386/32bit-core.c: Re-generated.
2376         * features/i386/32bit-linux.c: Re-generated.
2377         * features/i386/32bit-mpx.c: Re-generated.
2378         * features/i386/32bit-pkeys.c: Re-generated.
2379         * features/i386/32bit-sse.c: Re-generated.
2380
2381 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2382
2383         * regformats/regdat.sh: Update generated code.
2384
2385 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2386
2387         * regformats/regdat.sh: Adjust code order.
2388
2389 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2390
2391         * expprint.c (dump_subexp_body_standard): Use constant format
2392         string in fprintf_filtered call.
2393
2394 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2395
2396         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2397         NetBSD/i386.
2398         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2399
2400 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2401
2402         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2403
2404 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2405
2406         * bsd-kvm.o: Define _KMEMUSER.
2407         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2408         * configure: Regenerate.
2409
2410 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2411
2412         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2413         * i386-fbsd-nat.c: Likewise.
2414
2415 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2416
2417         * unittests/array-view-selftests.c: Add include of <array>.
2418
2419 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2420
2421         * spu-tdep.c (flush_ea_cache): Add missing argument to
2422         call_function_by_hand.
2423
2424 2017-09-04  Pedro Alves  <palves@redhat.com>
2425
2426         * NEWS (Safer support for debugging with no debug info): New.
2427
2428 2017-09-04  Pedro Alves  <palves@redhat.com>
2429
2430         * c-exp.y (function_method, function_method_void): Add current
2431         instance flags to TYPE_INSTANCE.
2432         * dwarf2read.c (check_modifier): New.
2433         (compute_delayed_physnames): Assert that only C++ adds delayed
2434         physnames.  Mark fn_fields as const/volatile depending on
2435         physname.
2436         * eval.c (make_params): New type_instance_flags parameter.  Use
2437         it as the new type's instance flags.
2438         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2439         flags element and pass it to make_params.
2440         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2441         instance flags element.
2442         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2443         * gdbtypes.h: Include "enum-flags.h".
2444         (type_instance_flags): New enum-flags type.
2445         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2446         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2447         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2448         (follow_type_instance_flags): New function.
2449         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2450         * parser-defs.h (follow_type_instance_flags): Declare.
2451         * valops.c (value_struct_elt_for_reference): const/volatile must
2452         match too.
2453
2454 2017-09-04  Pedro Alves  <palves@redhat.com>
2455
2456         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2457         function/method scopes; lookup the nested name as a function local
2458         static variable.
2459
2460 2017-09-04  Pedro Alves  <palves@redhat.com>
2461
2462         (%type <voidval>): Add function_method.
2463         * c-exp.y (exp): New production for calls with no arguments.
2464         (function_method, function_method_void_or_typelist): New
2465         productions.
2466         (exp): New production for "method()::static_var".
2467         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2468         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2469         Handle OP_FUNC_STATIC_VAR.
2470         * parse.c (operator_length_standard):
2471         Handle OP_FUNC_STATIC_VAR.
2472
2473 2017-09-04  Pedro Alves  <palves@redhat.com>
2474
2475         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2476         handling.
2477         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2478         Ditto.
2479         * parse.c (operator_length_standard, operator_check_standard):
2480         Ditto.
2481         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2482
2483 2017-09-04  Pedro Alves  <palves@redhat.com>
2484
2485         * ax-gdb.c: Include "typeprint.h".
2486         (gen_expr_for_cast): New function.
2487         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2488         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2489         type is unknown.
2490         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2491         nodebug_data_symbol.
2492         * eval.c: Include "typeprint.h".
2493         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2494         Error out if symbol has unknown type.
2495         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2496         evaluate_subexp_for_cast.
2497         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2498         OP_VAR_MSYM_VALUE.
2499         (evaluate_subexp_for_cast): New function.
2500         * gdbtypes.c (init_nodebug_var_type): New function.
2501         (objfile_type): Use it to initialize types of variables with no
2502         debug info.
2503         * typeprint.c (error_unknown_type): New.
2504         * typeprint.h (error_unknown_type): New declaration.
2505         * compile/compile-c-types.c (convert_type_basic): Handle
2506         TYPE_CODE_ERROR; warn and fallback to int for variables with
2507         unknown type.
2508
2509 2017-09-04  Pedro Alves  <palves@redhat.com>
2510
2511         * eval.c (evaluate_var_value): New function, factored out from ...
2512         (evaluate_subexp_standard): ... here.
2513
2514 2017-09-04  Pedro Alves  <palves@redhat.com>
2515
2516         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2517         Remove useless assignments to 'op'.
2518
2519 2017-09-04  Pedro Alves  <palves@redhat.com>
2520
2521         * eval.c (eval_skip_value): New function.
2522         (evaluate_subexp_standard): Use it.
2523
2524 2017-09-04  Pedro Alves  <palves@redhat.com>
2525
2526         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2527         function name from symbol/minsym and pass it to
2528         error_call_unknown_return_type.
2529
2530 2017-09-04  Pedro Alves  <palves@redhat.com>
2531
2532         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2533         * ax-gdb.c (gen_msym_var_ref): New function.
2534         (gen_expr): Handle OP_VAR_MSYM_VALUE.
2535         * eval.c (evaluate_var_msym_value): New function.
2536         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2537         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2538         to call_function_by_hand.
2539         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2540         Handle OP_VAR_MSYM_VALUE.
2541         (union exp_element) <msymbol>: New field.
2542         * minsyms.h (struct type): Forward declare.
2543         (find_minsym_type_and_address): Declare.
2544         * parse.c (write_exp_elt_msym): New function.
2545         (write_exp_msymbol): Delete, refactored as ...
2546         (find_minsym_type_and_address): ... this new function.
2547         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2548         (operator_length_standard, operator_check_standard): Handle
2549         OP_VAR_MSYM_VALUE.
2550         * std-operator.def (OP_VAR_MSYM_VALUE): New.
2551
2552 2017-09-04  Pedro Alves  <palves@redhat.com>
2553
2554         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2555         TYPE_GNU_IFUNC specially here.  Throw error if return type is
2556         unknown.
2557         * ada-typeprint.c (print_func_type): Handle functions with unknown
2558         return type.
2559         * c-typeprint.c (c_type_print_base): Handle functions and methods
2560         with unknown return type.
2561         * compile/compile-c-symbols.c (convert_symbol_bmsym)
2562         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2563         * compile/compile-c-types.c: Include "objfiles.h".
2564         (convert_func): For functions with unknown return type, warn and
2565         default to int.
2566         * compile/compile-object-run.c (compile_object_run): Adjust call
2567         to call_function_by_hand_dummy.
2568         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2569         call_function_by_hand.
2570         * eval.c (evaluate_subexp_standard): Adjust calls to
2571         call_function_by_hand.  Handle functions and methods with unknown
2572         return type.  Pass expect_type to call_function_by_hand.
2573         * f-typeprint.c (f_type_print_base): Handle functions with unknown
2574         return type.
2575         * gcore.c (call_target_sbrk): Adjust call to
2576         call_function_by_hand.
2577         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2578         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
2579         an integer address type instead of nodebug.
2580         * guile/scm-value.c (gdbscm_value_call): Adjust call to
2581         call_function_by_hand.
2582         * infcall.c (error_call_unknown_return_type): New function.
2583         (call_function_by_hand): New "default_return_type" parameter.
2584         Pass it down.
2585         (call_function_by_hand_dummy): New "default_return_type"
2586         parameter.  Use it instead of defaulting to int.  If there's no
2587         default and the return type is unknown, throw an error.  If
2588         there's a default return type, and the called function has no
2589         debug info, then assume the function is prototyped.
2590         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2591         New "default_return_type" parameter.
2592         (error_call_unknown_return_type): New declaration.
2593         * linux-fork.c (call_lseek): Cast return type of lseek.
2594         (inferior_call_waitpid, checkpoint_command): Adjust calls to
2595         call_function_by_hand.
2596         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2597         calls to call_function_by_hand.
2598         * m2-typeprint.c (m2_procedure): Handle functions with unknown
2599         return type.
2600         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2601         (value_nsstring, print_object_command): Adjust calls to
2602         call_function_by_hand.
2603         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2604         functions with unknown return type.
2605         (pascal_type_print_func_varspec_suffix): New function.
2606         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2607         TYPE_CODE_METHOD>: Use it.
2608         * python/py-value.c (valpy_call): Adjust call to
2609         call_function_by_hand.
2610         * rust-lang.c (rust_evaluate_funcall): Adjust call to
2611         call_function_by_hand.
2612         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2613         call_function_by_hand.
2614         * valops.c (value_allocate_space_in_inferior): Adjust call to
2615         call_function_by_hand.
2616         * typeprint.c (type_print_unknown_return_type): New function.
2617         * typeprint.h (type_print_unknown_return_type): New declaration.
2618
2619 2017-09-04  Pedro Alves  <palves@redhat.com>
2620
2621         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2622         types with more than one parameter as prototyped.
2623
2624 2017-09-04  Pedro Alves  <palves@redhat.com>
2625
2626         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2627         (disassemble_command): Use gdb_disassembly_flags instead of bare
2628         int.
2629         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2630         (dump_insns, do_mixed_source_and_assembly_deprecated)
2631         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2632         Use gdb_disassembly_flags instead of bare int.
2633         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2634         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2635         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2636         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2637         (enum gdb_disassembly_flag): ... values of this new enumeration.
2638         (gdb_disassembly_flags): Define.
2639         (gdb_disassembly)
2640         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2641         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2642         gdb_disassembly_flags instead of bare int.
2643         * record-btrace.c (btrace_insn_history)
2644         (record_btrace_insn_history, record_btrace_insn_history_range)
2645         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2646         instead of bare int.
2647         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2648         Use gdb_disassembly_flags instead of bare int.
2649         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2650         Define.
2651         * target-delegates.c: Regenerate.
2652         * target.c (target_insn_history, target_insn_history_from)
2653         (target_insn_history_range): Use gdb_disassembly_flags instead of
2654         bare int.
2655         * target.h: Include "disasm.h".
2656         (struct target_ops) <to_insn_history, to_insn_history_from,
2657         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2658         int.
2659         (target_insn_history, target_insn_history_from)
2660         (target_insn_history_range): Use gdb_disassembly_flags instead of
2661         bare int.
2662
2663 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2664
2665         * cli/cli-script.c (build_command_line): For if/while commands,
2666         check whether args is empty.
2667
2668 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2669
2670         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2671         (enum command_control_type): Likewise.
2672         (struct command_line): Likewise.
2673         (free_command_lines): Likewise.
2674         (struct command_lines_deleter): Likewise.
2675         (command_line_up): Likewise.
2676         (read_command_lines): Likewise.
2677         (read_command_lines_1): Likewise.
2678         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2679         (enum command_control_type): Likewise.
2680         (struct command_line): Likewise.
2681         (free_command_lines): Likewise.
2682         (struct command_lines_deleter): Likewise.
2683         (command_line_up): Likewise.
2684         (read_command_lines): Likewise.
2685         (read_command_lines_1): Likewise.
2686         * breakpoint.h: Include cli/cli-script.h.
2687         * extension-priv.h: Likewise.
2688         * gdbcmd.h: Likewise.
2689
2690 2017-09-04  Pedro Alves  <palves@redhat.com>
2691
2692         * ada-lang.c (is_known_support_routine): Move sal declaration to
2693         where it is initialized.
2694         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2695         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2696         (clear_command, update_static_tracepoint): Remove init_sal
2697         references.  Move declarations closer to initializations.
2698         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2699         initializations.
2700         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2701         references.  Move sal declarations closer to initializations.
2702         * frame.c (find_frame_sal): Return a symtab_and_line via function
2703         return instead of output parameter.  Remove init_sal references.
2704         * frame.h (find_frame_sal): Return a symtab_and_line via function
2705         return instead of output parameter.
2706         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2707         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2708         instead of memset.
2709         (gdbscm_find_pc_line): Remove init_sal reference.
2710         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2711         references.  Move declarations closer to initializations.
2712         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2713         initializations.
2714         (finish_backward): Remove init_sal references.  Move declarations
2715         closer to initializations.
2716         * infrun.c (process_event_stop_test, handle_step_into_function)
2717         (insert_hp_step_resume_breakpoint_at_frame)
2718         (insert_step_resume_breakpoint_at_caller): Likewise.
2719         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2720         (symbol_to_sal): Likewise.
2721         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2722         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2723         to its initialization.
2724         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2725         init_sal references.  Move declarations closer to initializations.
2726         * source.c (get_current_source_symtab_and_line): Remove brace
2727         initialization.
2728         (set_current_source_symtab_and_line): Now takes the sal by const
2729         reference.  Remove brace initialization.
2730         (line_info): Remove init_sal reference.
2731         * source.h (set_current_source_symtab_and_line): Now takes a
2732         symtab_and_line via const reference.
2733         * stack.c (set_current_sal_from_frame): Adjust.
2734         (print_frame_info): Adjust.
2735         (get_last_displayed_sal): Return the sal via function return
2736         instead of via output parameter.  Simplify.
2737         (frame_info): Adjust.
2738         * stack.h (get_last_displayed_sal): Return the sal via function
2739         return instead of via output parameter.
2740         * symtab.c (init_sal): Delete.
2741         (find_pc_sect_line): Remove init_sal references.  Move
2742         declarations closer to initializations.
2743         (find_function_start_sal): Remove init_sal references.  Move
2744         declarations closer to initializations.
2745         * symtab.h (struct symtab_and_line): In-class initialize all
2746         fields.
2747         * tracepoint.c (set_traceframe_context)
2748         (print_one_static_tracepoint_marker): Remove init_sal references.
2749         Move declarations closer to initializations.
2750         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2751         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2752         declarations closer to initializations.
2753         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2754         init_sal references.  Adjust.
2755
2756 2017-09-04  Pedro Alves  <palves@redhat.com>
2757
2758         * ax-gdb.c (agent_command_1): Use range-for.
2759         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2760         * breakpoint.c: Include "common/array-view.h".
2761         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2762         parameter from struct symtabs_and_lines to
2763         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2764         (breakpoint_sals_to_pc): Change sals parameter from struct
2765         symtabs_and_lines to std::vector reference.
2766         (check_fast_tracepoint_sals): Change sals parameter from struct
2767         symtabs_and_lines to std::array_view.  Use range-for.
2768         (decode_static_tracepoint_spec): Return a std::vector instead of
2769         symtabs_and_lines.  Update.
2770         (create_breakpoint): Update.
2771         (break_range_command, until_break_command, clear_command): Update.
2772         (base_breakpoint_decode_location, bkpt_decode_location)
2773         (bkpt_probe_create_sals_from_location)
2774         (bkpt_probe_decode_location, tracepoint_decode_location)
2775         (tracepoint_probe_decode_location)
2776         (strace_marker_create_sals_from_location): Return a std::vector
2777         instead of symtabs_and_lines.
2778         (strace_marker_create_breakpoints_sal): Update.
2779         (strace_marker_decode_location): Return a std::vector instead of
2780         symtabs_and_lines.  Update.
2781         (update_breakpoint_locations): Change struct symtabs_and_lines
2782         parameters to gdb::array_view.  Adjust.
2783         (location_to_sals): Return a std::vector instead of
2784         symtabs_and_lines.  Update.
2785         (breakpoint_re_set_default): Use std::vector instead of struct
2786         symtabs_and_lines.
2787         (decode_location_default): Return a std::vector instead of
2788         symtabs_and_lines.  Update.
2789         * breakpoint.h: Include "common/array-view.h".
2790         (struct breakpoint_ops) <decode_location>: Now returns a
2791         std::vector instead of returning a symtabs_and_lines via output
2792         parameter.
2793         (update_breakpoint_locations): Change sals parameters to use
2794         gdb::array_view.
2795         * cli/cli-cmds.c (edit_command, list_command): Update to use
2796         std::vector and gdb::array_view.
2797         (ambiguous_line_spec): Adjust to use gdb::array_view and
2798         range-for.
2799         (compare_symtabs): Rename to ...
2800         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2801         const reference and adjust.
2802         (filter_sals): Rewrite using std::vector and standard algorithms.
2803         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2804         (jump_command): Update to use std::vector.
2805         * linespec.c (struct linespec_state) <canonical_names>: Update
2806         comment.
2807         (add_sal_to_sals_basic): Delete.
2808         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2809         (decode_line_2, create_sals_line_offset)
2810         (convert_address_location_to_sals, convert_linespec_to_sals)
2811         (convert_explicit_location_to_sals, parse_linespec)
2812         (event_location_to_sals, decode_line_full, decode_line_1)
2813         (decode_line_with_current_source)
2814         (decode_line_with_last_displayed, decode_objc)
2815         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2816         (linespec_result::~linespec_result): Adjust to use std::vector
2817         instead of symtabs_and_lines.
2818         * linespec.h (linespec_sals::sals): Now a std::vector.
2819         (struct linespec_result): Use std::vector, bool, and in-class
2820         initialization.
2821         (decode_line_1, decode_line_with_current_source)
2822         (decode_line_with_last_displayed): Return std::vector.
2823         * macrocmd.c (info_macros_command): Use std::vector.
2824         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2825         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2826         std::vector.
2827         * probe.h (parse_probes): Return a std::vector.
2828         * python/python.c (gdbpy_decode_line): Use std::vector and
2829         gdb::array_view.
2830         * source.c (select_source_symtab, line_info): Use std::vector.
2831         * stack.c (func_command): Use std::vector.
2832         * symtab.h (struct symtabs_and_lines): Delete.
2833         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2834
2835 2017-09-04  Pedro Alves  <palves@redhat.com>
2836
2837         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2838         unittests/array-view-selftests.c.
2839         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2840         * common/array-view.h: New file.
2841         * unittests/array-view-selftests.c: New file.
2842
2843 2017-09-04  Pedro Alves  <palves@redhat.com>
2844
2845         * cli/cli-cmds.c (edit_command): Pass message to
2846         ambiguous_line_spec.
2847         (list_command): Pass message to ambiguous_line_spec.  Say
2848         "first"/"last" instead of "start" and "end" to be consistent with
2849         the manual.
2850         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
2851         them to print formatted message.
2852
2853 2017-09-04  Pedro Alves  <palves@redhat.com>
2854
2855         * btrace.c (ftrace_add_pt): Pass btrace_insn to
2856         ftrace_update_insns by reference instead of pointer.
2857
2858 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2859
2860         * i386-go32-tdep.c: Include x86-xstate.h.
2861         (i386_go32_init_abi): Call i386_target_description.
2862         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2863         if xcr0 is X86_XSTATE_X87_MASK.
2864         * i386-tdep.h (tdesc_i386): Remove the declaration.
2865         (tdesc_i386_mmx): Likewise.
2866
2867 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2868
2869         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2870         X86_XSTATE_SSE_MASK instead of 0.
2871
2872 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2873
2874         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2875         i386_target_description.
2876         * i386-fbsd-nat.c (i386fbsd_read_description): Call
2877         i386_target_description.
2878         * i386-tdep.c (i386_gdbarch_init): Likewise.
2879
2880 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2881
2882         * amd64-darwin-tdep.c: Include "x86-xstate.h".
2883         (x86_darwin_init_abi_64): Call amd64_target_description.
2884         * amd64-dicos-tdep.c: Likewise.
2885         * amd64-fbsd-nat.c: Likewise.
2886         * amd64-fbsd-tdep.c: Likewise.
2887         * amd64-nbsd-tdep.c: Likewise.
2888         * amd64-obsd-tdep.c: Likewise.
2889         * amd64-sol2-tdep.c: Likewise.
2890         * amd64-windows-tdep.c: Likewise.
2891         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2892
2893 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2894
2895         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2896         (btrace_function) <insn>: Change type to use std::vector.
2897         * btrace.c (ftrace_debug, ftrace_call_num_insn,
2898         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2899         ftrace_update_insns, ftrace_compute_global_level_offset,
2900         btrace_stitch_bts, btrace_clear, btrace_insn_get,
2901         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2902         change to std::vector.
2903         (ftrace_update_insns): Adjust to change to std::vector, change
2904         type of INSN parameter.
2905         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2906         * record-btrace.c (btrace_call_history_insn_range,
2907         btrace_compute_src_line_range,
2908         record_btrace_frame_prev_register): Adjust to change to
2909         std::vector.
2910         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2911         to change to std::vector.
2912
2913 2017-09-03  Tom Tromey  <tom@tromey.com>
2914
2915         * corefile.c (reopen_exec_file): Use std::string.
2916
2917 2017-09-03  Tom Tromey  <tom@tromey.com>
2918
2919         * compile/compile.c (compile_register_name_mangled): Return
2920         std::string.
2921         * compile/compile-loc2c.c (pushf_register_address): Update.
2922         (pushf_register): Update.
2923         * compile/compile-c-types.c (convert_array): Update.
2924         * compile/compile-c-symbols.c (generate_vla_size): Update.
2925         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2926         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2927         (convert_one_symbol): Update.
2928         (generate_c_for_for_one_variable): Update.
2929         * compile/compile-c-support.c (c_get_range_decl_name): Return a
2930         std::string.
2931         (generate_register_struct): Update.
2932         * compile/compile-internal.h (c_get_range_decl_name): Return a
2933         std::string.
2934         (compile_register_name_mangled): Return std::string.
2935
2936 2017-09-03  Tom Tromey  <tom@tromey.com>
2937
2938         * utils.c (perror_string): Return a std::string.
2939         (throw_perror_with_name, perror_warning_with_name): Update.
2940
2941 2017-09-03  Tom Tromey  <tom@tromey.com>
2942
2943         * demangle.c (demangle_command): Use std::string,
2944         unique_xmalloc_ptr.
2945
2946 2017-09-03  Tom Tromey  <tom@tromey.com>
2947
2948         * cli/cli-setshow.c (do_set_command): Use std::string.
2949
2950 2017-09-03  Tom Tromey  <tom@tromey.com>
2951
2952         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2953
2954 2017-09-03  Tom Tromey  <tom@tromey.com>
2955
2956         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2957
2958 2017-09-03  Tom Tromey  <tom@tromey.com>
2959
2960         * mi/mi-cmd-env.c (env_execute_cli_command): Use
2961         gdb::unique_xmalloc_ptr.
2962
2963 2017-09-03  Tom Tromey  <tom@tromey.com>
2964
2965         * thread.c (print_thread_info_1): Use string_printf.
2966         (thread_apply_command, thread_apply_all_command): Use
2967         std::string.
2968
2969 2017-09-03  Tom Tromey  <tom@tromey.com>
2970
2971         * valprint.c (val_print_string): Update.
2972         * gdbcore.h (memory_error_message): Return std::string.
2973         * corefile.c (memory_error_message): Return std::string.
2974         (memory_error): Update.
2975         * breakpoint.c (insert_bp_location): Update.
2976
2977 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
2978
2979         * target/waitstatus.h (target_waitstatus_to_string): Change
2980         return type to std::string.
2981         * target/waitstatus.c (target_waitstatus_to_string): Return
2982         std::string.
2983         * target.h (target_waitstatus_to_string): Remove declaration.
2984         * infrun.c (resume, clear_proceed_status_thread,
2985         print_target_wait_results, do_target_wait, save_waitstatus,
2986         stop_all_threads): Adjust.
2987         * record-btrace.c (record_btrace_wait): Adjust.
2988         * target-debug.h
2989         (target_debug_print_struct_target_waitstatus_p): Adjust.
2990
2991 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
2992
2993         PR gdb/22046
2994         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2995         detection.
2996
2997 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2998
2999         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3000         for setting/unsetting environment variables on the remote target.
3001         (New remote packets): Add entries for QEnvironmentHexEncoded,
3002         QEnvironmentUnset and QEnvironmentReset.
3003         * common/environ.c (gdb_environ::operator=): Extend method to
3004         handle m_user_set_env_list and m_user_unset_env_list.
3005         (gdb_environ::clear): Likewise.
3006         (match_var_in_string): Change type of first parameter from 'char
3007         *' to 'const char *'.
3008         (gdb_environ::set): Extend method to handle
3009         m_user_set_env_list and m_user_unset_env_list.
3010         (gdb_environ::unset): Likewise.
3011         (gdb_environ::clear_user_set_env): New method.
3012         (gdb_environ::user_set_envp): Likewise.
3013         (gdb_environ::user_unset_envp): Likewise.
3014         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3015         m_user_unset_env_list on move constructor/assignment.
3016         (unset): Add new default parameter 'update_unset_list = true'.
3017         (clear_user_set_env): New method.
3018         (user_set_envp): Likewise.
3019         (user_unset_envp): Likewise.
3020         (m_user_set_env_list): New std::set.
3021         (m_user_unset_env_list): Likewise.
3022         * common/rsp-low.c (hex2str): New function.
3023         (bin2hex): New overload for bin2hex function.
3024         * common/rsp-low.c (hex2str): New prototype.
3025         (str2hex): New overload prototype.
3026         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3027         QEnvironmentUnset and QEnvironmentReset.
3028         (remote_protocol_features): Add QEnvironmentHexEncoded,
3029         QEnvironmentUnset and QEnvironmentReset packets.
3030         (send_environment_packet): New function.
3031         (extended_remote_environment_support): Likewise.
3032         (extended_remote_create_inferior): Call
3033         extended_remote_environment_support.
3034         (_initialize_remote): Add QEnvironmentHexEncoded,
3035         QEnvironmentUnset and QEnvironmentReset packet configs.
3036         * unittests/environ-selftests.c (gdb_selftest_env_var):
3037         New variable.
3038         (test_vector_initialization): New function.
3039         (test_init_from_host_environ): Likewise.
3040         (test_reinit_from_host_environ): Likewise.
3041         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3042         Likewise.
3043         (test_unset_set_empty_vector): Likewise.
3044         (test_vector_clear): Likewise.
3045         (test_std_move): Likewise.
3046         (test_move_constructor):
3047         (test_self_move): Likewise.
3048         (test_set_unset_reset): Likewise.
3049         (run_tests): Rewrite in terms of the functions above.
3050
3051 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3052
3053         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3054         (adi_available): Use a temp variable of type CORE_ADDR as argument
3055         3 when calling target_auxv_search.
3056         (adi_normalize_address): Use masks and xor operators to calculate
3057         normalized address.
3058         (adi_read_versions, adi_write_versions, adi_print_versions)
3059         (do_examine, do_assign): Use paddress.
3060
3061 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3062
3063         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3064         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3065         out of loop and add supply of FIR.
3066         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3067         add collect of FIR.
3068
3069 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3070
3071         PR gdb/21827
3072         * cli/cli-script.c (define_command): Don't convert command name
3073         to lower case.
3074
3075 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3076
3077         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3078         Update all callers accordingly. Remove all code blocks handling
3079         the case where DISPP is not NULL.
3080
3081 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3082
3083         PR symtab/22003
3084         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3085         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3086         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3087
3088 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3089
3090         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3091         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3092         (read_comp_units_from_section): New parameter abbrev_section, use
3093         read_and_check_comp_unit_head, allocate signatured_type if needed.
3094         (create_all_comp_units): Update read_comp_units_from_section caller.
3095
3096 2017-08-23  Pedro Alves  <palves@redhat.com>
3097
3098         PR remote/21852
3099         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3100         to null_ptid and switch to thread without reading the registers
3101         after adding the inferior.
3102
3103 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3104
3105         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3106         compile-gcc.
3107         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3108         (compile_to_object): Implement compile_gcc.
3109         (_initialize_compile): Install "set compile-gcc".  Initialize
3110         compile_gcc.
3111
3112 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3113
3114         * compile/compile.c (compile_to_object): Conditionally call
3115         set_verbose.  Conditionally call compile or compile_v0.
3116
3117 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3118
3119         * sparc64-tdep.h: (adi_normalize_address): New export.
3120         * sparc-nat.h: (open_adi_tag_fd): New export.
3121         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3122         * sparc64-linux-tdep.c:
3123         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3124         (sparc64_linux_handle_segmentation_fault): New function.
3125         (sparc64_linux_init_abi): Register
3126         sparc64_linux_handle_segmentation_fault
3127         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3128         (sparc64_addr_bits_remove): New function.
3129         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3130         (MAX_PROC_NAME_SIZE): New macro.
3131         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3132         (sparc64adilist): New variable.
3133         (adi_proc_list): New variable.
3134         (find_adi_info): New function.
3135         (add_adi_info): New function.
3136         (get_adi_info_proc): New function.
3137         (get_adi_info): New function.
3138         (info_adi_command): New function.
3139         (read_maps_entry): New function.
3140         (adi_available): New function.
3141         (adi_normalize_address): New function.
3142         (adi_align_address): New function.
3143         (adi_convert_byte_count): New function.
3144         (adi_tag_fd): New function.
3145         (adi_is_addr_mapped): New function.
3146         (adi_read_versions): New function.
3147         (adi_write_versions): New function.
3148         (adi_print_versions): New function.
3149         (do_examine): New function.
3150         (do_assign): New function.
3151         (adi_examine_command): New function.
3152         (adi_assign_command): New function.
3153         (_initialize_sparc64_adi_tdep): New function.
3154
3155 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3156
3157         * breakpoint.c (breakpoints_info): Rename to ...
3158         (info_breakpoints_command): ... this.
3159         (watchpoints_info): Rename to ...
3160         (info_watchpoints_command): ... this.
3161         (tracepoints_info): Rename to ...
3162         (info_tracepoints_command): ... this.
3163         (_initialize_breakpoint): Adjust.
3164         * dcache.c (dcache_info): Rename to ...
3165         (info_display_command): ... this.
3166         (_initialize_dcache): Adjust.
3167         * frame.h (args_info): Rename to ...
3168         (info_args_command): ... this.
3169         (locals_info): Rename to ...
3170         (info_locals_command): ... this.
3171         * infcmd.c (nofp_registers_info): Rename to ...
3172         (info_registers_command): ... this.
3173         (float_info): Rename to ...
3174         (info_float_command): ... this.
3175         (program_info): Rename to ...
3176         (info_program_command): ... this.
3177         (all_registers_info): Rename to ...
3178         (info_all_registers_command): ... this.
3179         (vector_info): Rename to ...
3180         (info_vector_command): ... this.
3181         (float_info): Rename to ...
3182         (info_float_command): ... this.
3183         (_initialize_infcmd): Adjust.
3184         * inferior.h (term_info): Rename to ...
3185         (info_terminal_command): ... this.
3186         * inflow.c (term_info): Rename to ...
3187         (info_terminal_command): ... this.
3188         (_initialize_inflow): Adjust.
3189         * infrun.c (signals_info): Rename to ...
3190         (info_signals_command): ... this.
3191         (_initialize_infrun): Adjust.
3192         * objc-lang.c (classes_info): Rename to ...
3193         (info_classes_command): ... this.
3194         (selectors_info): Rename to ...
3195         (info_selectors_command): ... this.
3196         (_initialize_objc_language): Adjust.
3197         * printcmd.c (sym_info): Rename to ...
3198         (info_symbol_command): ... this.
3199         (address_info): Rename to ...
3200         (info_address_command): ... this.
3201         (display_info): Rename to ...
3202         (info_display_command): ... this.
3203         (_initialize_printcmd): Adjust.
3204         * reverse.c (bookmarks_info): Rename to ...
3205         (info_breakpoints_command): ... this.
3206         (_initialize_reverse): Adjust.
3207         * ser-go32.c (dos_info): Rename to ...
3208         (info_serial_command): ... this.
3209         (_initialize_ser_dos): Adjust.
3210         * skip.c (skip_info): Rename to ...
3211         (info_skip_command): ... this.
3212         (_initialize_step_skip): Adjust.
3213         * source.c (line_info): Rename to ...
3214         (info_line_command): ... this.
3215         (source_info): Rename to ...
3216         (info_source_command)
3217         * stack.c (frame_info): Rename to ...
3218         (info_frame_command): ... this.
3219         (locals_info): Rename to ...
3220         (info_locals_command): ... this.
3221         (args_info): Rename to ...
3222         (info_args_command): ... this.
3223         (_initialize_stack): Adjust.
3224         * symtab.c (sources_info): Rename to ...
3225         (info_sources_command): ... this.
3226         (variables_info): Rename to ...
3227         (info_variables_command): ... this.
3228         (functions_info): Rename to ...
3229         (info_functions_command): ... this.
3230         (types_info): Rename to ...
3231         (info_types_command): ... this.
3232         (_initialize_symtab): Adjust.
3233         * target.c (target_info): Rename to ...
3234         (info_target_command): ... this.
3235         (initialize_targets): Adjust.
3236         * tracepoint.c (tvariables_info): Rename to ...
3237         (info_tvariables_command): ... this.
3238         (scope_info): Rename to ...
3239         (info_scope_command): ... this.
3240         (trace_dump_actions): Adjust.
3241         (_initialize_tracepoint): Adjust.
3242
3243 2017-08-22  Tom Tromey  <tom@tromey.com>
3244
3245         * breakpoint.h (install_breakpoint): Update.
3246         * breakpoint.c (add_solib_catchpoint): Update.
3247         (install_breakpoint): Change argument to a std::unique_ptr.
3248         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3249         (create_breakpoint_sal, create_breakpoint): Update.
3250         (watch_command_1, catch_exec_command_1)
3251         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3252         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3253         Return the breakpoint.
3254         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3255         (new_single_step_breakpoint): Update.
3256         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3257         std::unique_ptr.
3258         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3259         std::unique_ptr.
3260         * break-catch-sig.c (create_signal_catchpoint): Use
3261         std::unique_ptr.
3262         * ada-lang.c (create_ada_exception_catchpoint): Use
3263         std::unique_ptr.
3264
3265 2017-08-22  Tom Tromey  <tom@tromey.com>
3266
3267         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3268
3269 2017-08-22  Tom Tromey  <tom@tromey.com>
3270
3271         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3272         (lookup_partial_symbol): Update.
3273
3274 2017-08-22  Tom Tromey  <tom@tromey.com>
3275
3276         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3277         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3278         (find_and_open_source, symtab_to_fullname): Update.
3279         * psymtab.c (psymtab_to_fullname): Update.
3280
3281 2017-08-22  Tom Tromey  <tom@tromey.com>
3282
3283         * exec.c (exec_file_attach): Update.
3284         * linux-thread-db.c (try_thread_db_load): Update.
3285         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3286         * utils.c (gdb_realpath): Change return type.
3287         (gdb_realpath_keepfile): Update.
3288         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3289         (_initialize_utils): Register the new self test.
3290         * source.c (openp): Update.
3291         (find_and_open_source): Update.
3292         * nto-tdep.c (nto_find_and_open_solib): Update.
3293         * main.c (set_gdb_data_directory): Update.
3294         (captured_main_1): Update.
3295         * dwarf2read.c (dwarf2_get_dwz_file): Update
3296         (dw2_map_symbol_filenames): Update.
3297         * auto-load.c (auto_load_safe_path_vec_update): Update.
3298         (filename_is_in_auto_load_safe_path_vec): Change type of
3299         "filename_realp".
3300         (auto_load_objfile_script): Update.
3301         (file_is_auto_load_safe): Update.  Use std::string.
3302         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3303
3304 2017-08-22  Tom Tromey  <tom@tromey.com>
3305
3306         * utils.c (gdb_realpath_keepfile): Return a
3307         gdb::unique_xmalloc_ptr.
3308         * exec.c (exec_file_attach): Update.
3309         * utils.h (gdb_realpath_keepfile): Return a
3310         gdb::unique_xmalloc_ptr.
3311
3312 2017-08-22  Tom Tromey  <tom@tromey.com>
3313
3314         * compile/compile.c (compile_file_command): Use
3315         gdb::unique_xmalloc_ptr, std::string.
3316         * utils.c (gdb_abspath): Change return type.
3317         * source.c (openp): Update.
3318         * objfiles.c (allocate_objfile): Update.
3319         * main.c (set_gdb_data_directory): Update.
3320         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3321
3322 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3323
3324         * cli-cmds.c (list_commands): List actual code around more than
3325         one location.
3326
3327 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3328
3329         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3330
3331 2017-08-21  Pedro Alves  <palves@redhat.com>
3332
3333         PR gdb/19487
3334         * c-exp.y (variable production): Handle function aliases.
3335         * minsyms.c (msymbol_is_text): New function.
3336         * minsyms.h (msymbol_is_text): Declare.
3337         * symtab.c (find_function_alias_target): New function.
3338         * symtab.h (find_function_alias_target): Declare.
3339
3340 2017-08-21  Pedro Alves  <palves@redhat.com>
3341
3342         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3343         typedefs.
3344         * typeprint.c (whatis_exp): If handling "whatis", and expression
3345         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3346         typedefs here.
3347         * valops.c (value_cast): Save "to" type before resolving
3348         stubs/typedefs.  Use that type as resulting value's type.
3349
3350 2017-08-18  Tom Tromey  <tom@tromey.com>
3351             Pedro Alves  <palves@redhat.com>
3352
3353         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3354         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3355         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3356         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3357         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3358         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3359         (linux_get_siginfo_data): Add "thread" argument.  Use
3360         scoped_restore.
3361         * linux-nat.c (linux_child_follow_fork)
3362         (check_stopped_by_watchpoint): Use scoped_restore.
3363         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3364         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3365         (restore_inferior_ptid, save_inferior_ptid): Remove.
3366         * btrace.c (btrace_fetch): Use scoped_restore.
3367         * bsd-uthread.c (bsd_uthread_fetch_registers)
3368         (bsd_uthread_store_registers): Use scoped_restore.
3369         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3370         scoped_restore.
3371         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3372         (aix_thread_xfer_partial): Use scoped_restore.
3373         * inferior.h (save_inferior_ptid): Remove.
3374
3375 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3376
3377         PR tdep/21818
3378         * arm-tdep.c (gdb_print_insn_arm): Mark
3379         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3380
3381 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3382
3383         * NEWS: Mention GDBserver's new option "--selftest".
3384         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3385         * selftest.c: Move it to common/selftest.c.
3386         * selftest.h: Move it to common/selftest.h.
3387         * selftest-arch.c (reset): New function.
3388         (tests_with_arch): Call reset.
3389
3390 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3391
3392         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3393         instead of exception_fprintf and printf_filtered.
3394
3395 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3396
3397         * selftest.c (register_self_test): Rename it to
3398         selftests::register_test.
3399         (run_self_tests): selftest::run_tests.
3400         * selftest.h: Update declarations.
3401         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3402         selftests::register_test_foreach_arch.
3403         * selftest-arch.h: Update declaration.
3404         * aarch64-tdep.c: Update.
3405         * arm-tdep.c: Likewise.
3406         * disasm-selftests.c: Likewise.
3407         * dwarf2loc.c: Likewise.
3408         * dwarf2-frame.c: Likewise.
3409         * findvar.c: Likewise.
3410         * gdbarch-selftests.c: Likewise.
3411         * maint.c (maintenance_selftest): Likewise.
3412         * regcache.c: Likewise.
3413         * rust-exp.y: Likewise.
3414         * selftest-arch.c: Likewise.
3415         * unittests/environ-selftests.c: Likewise.
3416         * unittests/function-view-selftests.c: Likewise.
3417         * unittests/offset-type-selftests.c: Likewise.
3418         * unittests/optional-selftests.c: Likewise.
3419         * unittests/scoped_restore-selftests.c: Likewise.
3420         * utils-selftests.c: Likewise.
3421
3422 2017-08-17  Pedro Alves  <palves@redhat.com>
3423
3424         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3425         local.
3426
3427 2017-08-17  Pedro Alves  <palves@redhat.com>
3428
3429         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3430         field.
3431         (reset_die_in_process): Delete, replaced by ...
3432         (process_die_scope): ... this new class.  Make it responsible for
3433         freeing cu->line_header too.
3434         (process_die): Use process_die_scope.
3435         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3436         cu->line_header_die_owner.  Don't release the line header if it's
3437         owned by the CU.
3438         (setup_type_unit_groups): Make the CU/DIE own the line header.
3439         Don't release the line header here.
3440
3441 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3442
3443         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3444
3445 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3446
3447         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3448         Single-Key mode
3449
3450 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3451
3452         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3453         mode command list.
3454
3455 2017-08-15  Stafford Horne  <shorne@gmail.com>
3456
3457         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3458
3459 2017-08-15  Stafford Horne  <shorne@gmail.com>
3460
3461         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3462
3463 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3464
3465         PR gdb/21954
3466         * infcmd.c (unset_environment_command): Use the 'clear' method on
3467         the environment instead of resetting it.
3468
3469 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3470
3471         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3472         platforms.
3473
3474 2017-08-14  Tom Tromey  <tom@tromey.com>
3475
3476         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3477         (print_binary_chars): Likewise.
3478         (BITS_IN_BYTES): Remove.
3479
3480 2017-08-14  Tom Tromey  <tom@tromey.com>
3481
3482         PR gdb/21675
3483         * valprint.c (LOW_ZERO): Change value to 034.
3484         (print_octal_chars): Add static_asserts for octal constants.
3485         * printcmd.c (print_scalar_formatted): Add 'd' case.
3486
3487 2017-08-11  Tom Tromey  <tom@tromey.com>
3488
3489         * symfile.c (add_symbol_file_command): Use std::vector.
3490
3491 2017-08-14  Tom Tromey  <tom@tromey.com>
3492
3493         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3494         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3495         std::move.
3496         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3497
3498 2017-08-11  Pedro Alves  <palves@redhat.com>
3499
3500         * infrun.c (process_event_stop_test): Adjust
3501         function_name_is_marked_for_skip call.
3502         * skip.c: Include <list>.
3503         (skiplist_entry): Make it a class with private fields, and
3504         getters/setters.
3505         (skiplist_entry_chain): Delete.
3506         (skiplist_entries): New.
3507         (skiplist_entry_count): Delete.
3508         (highest_skiplist_entry_num): New.
3509         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3510         (add_skiplist_entry): Delete.
3511         (skiplist_entry::skiplist_entry): New.
3512         (skiplist_entry::add_entry): New.
3513         (skip_file_command, skip_function): Adjust.
3514         (compile_skip_regexp): Delete.
3515         (skip_command): Don't compile regexp here.  Adjust to use
3516         skiplist_entry::add_entry.
3517         (skip_info): Adjust to use range-for and getters.
3518         (skip_enable_command, skip_disable_command): Adjust to use
3519         range-for and setters.
3520         (skip_delete_command): Adjust to use std::list.
3521         (add_skiplist_entry): Delete.
3522         (skip_file_p): Delete, refactored as ...
3523         (skiplist_entry::do_skip_file_p): ... this new method.
3524         (skip_gfile_p): Delete, refactored as ...
3525         (skiplist_entry::do_gskip_file_p): ... this new method.
3526         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3527         (skiplist_entry::skip_function_p): ... this new method.
3528         (function_name_is_marked_for_skip): Now returns bool, and takes
3529         the function sal by const reference.  Adjust to use range-for and
3530         skiplist_entry methods.
3531         (_initialize_step_skip): Remove references to
3532         skiplist_entry_chain, skiplist_entry_count.
3533         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3534         takes the function sal by const reference.
3535
3536 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3537
3538         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3539         (dwarf2_frame_cache): Remove reset_cache_cleanup.
3540         (dwarf2_frame_cache):
3541         * frame-unwind.c (frame_unwind_try_unwinder): Catch
3542         RETURN_MASK_ALL and set *this_case to NULL.
3543         * frame-unwind.h: Update comments.
3544
3545 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3546
3547         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3548         (dwarf2_frame_state_copy_regs): Remove.
3549         (dwarf2_frame_state_free_regs): Remove.
3550         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3551         (dwarf2_restore_rule): Call method .alloc_regs instead of
3552         dwarf2_frame_state_alloc_regs.
3553         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
3554         constructor.  Call std::move.
3555         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3556         (dwarf2_frame_cache): Likewise.
3557
3558         [GDB_SELF_TEST]: Include selftest.h and
3559         selftest-arch.h.
3560         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3561         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3562         execute_cfa_program_test.
3563
3564         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3565         copy ctor, assignment operator, move assignment.
3566         <alloc_regs>: New method.
3567         <swap>: New method.
3568         (struct dwarf2_frame_state): Delete dtor.
3569         (dwarf2_frame_state_alloc_regs): Remove declaration.
3570         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3571         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3572
3573 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3574
3575         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3576         (dwarf2_frame_state::dwarf2_frame_state): New.
3577         (dwarf2_frame_state::~dwarf2_frame_state): New.
3578         (dwarf2_fetch_cfa_info): Update.
3579         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
3580         rather than a pointer.  Update code.
3581         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3582         dtor.
3583         <data_align, code_align, retaddr_column>: Change them to const.
3584         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3585         to bool.
3586
3587 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3588
3589         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3590         <loc.exp>: New field.
3591         * dwarf2-frame.c (execute_cfa_program): Update.
3592         (dwarf2_frame_prev_register): Update.
3593
3594 2017-08-10  Pedro Alves  <palves@redhat.com>
3595
3596         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3597
3598 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3599
3600         * fbsd-nat.c (struct fbsd_fork_info): Remove.
3601         (fbsd_pending_children): Use std::list.
3602         (fbsd_remember_child): Likewise.
3603         (fbsd_is_child_pending): Likewise.
3604         (fbsd_pending_vfork_done): Use std::forward_list.
3605         (fbsd_add_vfork_done): Likewise.
3606         (fbsd_is_vfork_done_pending): Likewise.
3607         (fbsd_next_vfork_done): Likewise.
3608
3609 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3610
3611         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3612         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3613         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3614         for `mapfilename'.
3615         (fbsd_xfer_partial): Use gdb::byte_vector.
3616         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3617
3618 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3619
3620         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3621         "filestuff.h".
3622         (fbsd_find_memory_regions): Fix `mapfile' initialization.
3623
3624 2017-08-09  Tom Tromey  <tom@tromey.com>
3625
3626         * skip.c (skiplist_entry): New constructor.
3627         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3628         (skiplist_entry::file_is_glob): Now bool.
3629         (skiplist_entry::file, skiplist_entry::function): Now
3630         std::string.
3631         (make_skip_entry): Return a unique_ptr.  Use new.
3632         (free_skiplist_entry, free_skiplist_entry_cleanup)
3633         (make_free_skiplist_entry_cleanup): Remove.
3634         (skip_command, skip_disable_command, add_skiplist_entry)
3635         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3636         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3637         (function_name_is_marked_for_skip): Update.
3638         (skip_delete_command): Update.  Use delete.
3639
3640 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3641
3642         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3643         (aarch64_linux_core_read_description): New function.
3644         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3645
3646 2017-08-09  Pedro Alves  <palves@redhat.com>
3647
3648         * cp-name-parser.y (cp_comp_to_string): Return a
3649         gdb::unique_xmalloc_ptr<char>.
3650         * cp-support.c (replace_typedefs_qualified_name)
3651         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3652         (cp_canonicalize_string_full): Use op= instead of explicit
3653         convertion.
3654         (cp_class_name_from_physname, method_name_from_physname)
3655         (cp_func_name, cp_remove_params): Adjust to use
3656         gdb::unique_xmalloc_ptr<char>.
3657         * cp-support.h (cp_comp_to_string): Return a
3658         gdb::unique_xmalloc_ptr<char>.
3659         * python/py-type.c (typy_lookup_type): Adjust to use
3660         gdb::unique_xmalloc_ptr<char>.
3661
3662 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3663
3664         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3665
3666 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3667             Yao Qi  <yao.qi@linaro.org>
3668
3669         * cp-support.c (cp_canonicalize_string_full): Use
3670         gdb::unique_xmalloc_ptr<char>.
3671         (cp_canonicalize_string): Likewise.
3672
3673 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3674
3675         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3676         * regformats/i386/amd64-avx-avx512.dat: Remove.
3677         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3678         * regformats/i386/amd64-avx-mpx.dat:Remove.
3679         * regformats/i386/amd64-avx.dat: Remove.
3680         * regformats/i386/amd64-mpx.dat: Remove.
3681         * regformats/i386/i386-avx-avx512.dat: Remove.
3682         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3683         * regformats/i386/i386-avx-mpx.dat: Remove.
3684         * regformats/i386/i386-mmx.dat: Remove.
3685         * regformats/i386/i386-mpx.dat: Remove.
3686
3687 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3688
3689         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3690         * amd64-tdep.c: Don't include features/i386/x32*.c.
3691         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3692         functions.
3693         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3694         and i386/x32-avx-avx512.
3695         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3696         and i386/x32.xml.
3697         * features/i386/x32-avx-avx512.c: Removed.
3698         * features/i386/x32-avx-avx512.xml: Removed.
3699         * features/i386/x32-avx.c: Removed.
3700         * features/i386/x32-avx.xml: Removed.
3701         * features/i386/x32.c: Removed.
3702         * features/i386/x32.xml: Removed.
3703         * regformats/i386/x32-avx-avx512.dat: Removed.
3704         * regformats/i386/x32-avx.dat: Removed.
3705         * regformats/i386/x32.dat: Removed.
3706
3707 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3708
3709         PR breakpoints/21886
3710         * mem-break.c (default_memory_insert_breakpoint): Use
3711         `->placed_address' rather than `->reqstd_address' for the
3712         breakpoint location.
3713
3714 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3715
3716         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3717         assertions.
3718
3719 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3720
3721         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3722         a union of `tdep_info', `tdesc_data' and `id'.
3723         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3724         rather than `info.tdep_info'.
3725         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3726         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3727         * i386-tdep.c (i386_gdbarch_init): Likewise.
3728         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3729         * mips-tdep.c (mips_gdbarch_init): Likewise.
3730         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3731         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3732         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3733         `info.tdep_info'.
3734         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3735         `info.tdep_info'.
3736         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3737         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3738         `info.tdep_info'.
3739         * spu-tdep.c (spu_gdbarch_init): Likewise.
3740         * gdbarch.h: Regenerate.
3741
3742 2017-08-07  Leszek Swirski  <leszeks@google.com>
3743
3744         PR symtab/20899
3745         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3746
3747 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3748
3749         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3750         (gdbsim_open): Rename gdb_argv args object to argv.
3751
3752 2017-08-05  Tom Tromey  <tom@tromey.com>
3753
3754         * compile/compile-object-load.c (compile_object_load): Use
3755         gdb::unique_xmalloc_ptr.
3756         * cli/cli-dump.c (scan_filename): Rename from
3757         scan_filename_with_cleanup.  Change return type.
3758         (scan_expression): Rename from scan_expression_with_cleanup.
3759         Change return type.
3760         (dump_memory_to_file, dump_value_to_file, restore_command):
3761         Use gdb::unique_xmalloc_ptr.  Update.
3762         * cli/cli-cmds.c (find_and_open_script): Use
3763         gdb::unique_xmalloc_ptr.
3764         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3765         * symmisc.c (maintenance_print_symbols)
3766         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3767         * symfile.c (symfile_bfd_open, generic_load)
3768         (add_symbol_file_command, remove_symbol_file_command): Use
3769         gdb::unique_xmalloc_ptr.
3770         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3771         * psymtab.c (maintenance_print_psymbols): Use
3772         gdb::unique_xmalloc_ptr.
3773         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3774         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3775         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3776         (reload_shared_libraries_1): Likewise.
3777
3778 2017-08-05  Tom Tromey  <tom@tromey.com>
3779
3780         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3781         (rust_op_vector, rust_set_vector): New typedefs.
3782         (current_parser): New global.
3783         (work_obstack): Change to pointer type.  Update all users.
3784         (rust_ast, pstate): Remove globals.
3785         (struct rust_parser): New.
3786         (%union) <params, field_inits>: Change type.
3787         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3788         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3789         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3790         (convert_params_to_types, convert_params_to_expression): Change
3791         type of "params".
3792         (ast_string): Change type of "fields".
3793         (rust_parse): Make a rust_parser.  Remove cleanups.
3794         (rust_lex_tests): Make and install an auto_obstack.
3795
3796 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3797
3798         * configure.srv (ipa_x32_linux_regobj): New.
3799         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3800         instead of X86_TDESC_AVX512.
3801         (initialize_low_tracepoint): Call
3802         init_registers_x32_avx_avx512_linux.
3803
3804 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3805
3806         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3807
3808 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3809
3810         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3811
3812 2017-08-03  Tom Tromey  <tom@tromey.com>
3813
3814         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3815         Remove.
3816         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3817
3818 2017-08-03  Tom Tromey  <tom@tromey.com>
3819
3820         * python/py-param.c (compute_enum_values): Use gdb_argv.
3821
3822 2017-08-03  Tom Tromey  <tom@tromey.com>
3823
3824         * utils.h (struct gdb_argv_deleter): New.
3825         (gdb_argv): New class.
3826         * utils.c (gdb_argv::reset): New method.
3827         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3828         * tracefile.c (tsave_command): Use gdb_argv.
3829         * top.c (new_ui_command): Use gdb_argv.
3830         * symmisc.c (maintenance_print_symbols)
3831         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3832         * symfile.c (symbol_file_command, generic_load)
3833         (remove_symbol_file_command): Use gdb_argv.
3834         * stack.c (backtrace_command): Use gdb_argv.
3835         * source.c (add_path, show_substitute_path_command)
3836         (unset_substitute_path_command, set_substitute_path_command):
3837         Use gdb_argv.
3838         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3839         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3840         * remote.c (extended_remote_run, remote_put_command)
3841         (remote_get_command, remote_delete_command): Use gdb_argv.
3842         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3843         (gdbsim_open): Use gdb_argv.
3844         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3845         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3846         * procfs.c (procfs_info_proc): Use gdb_argv.
3847         * interps.c (interpreter_exec_cmd): Use gdb_argv.
3848         * infrun.c (handle_command): Use gdb_argv.
3849         * inferior.c (add_inferior_command, clone_inferior_command):
3850         Use gdb_argv.
3851         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3852         * exec.c (exec_file_command): Use gdb_argv.
3853         * cli/cli-cmds.c (alias_command): Use gdb_argv.
3854         * compile/compile.c (build_argc_argv): Use gdb_argv.
3855
3856 2017-08-03  Tom Tromey  <tom@tromey.com>
3857
3858         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3859
3860 2017-08-03  Tom Tromey  <tom@tromey.com>
3861
3862         * python/python.c (compute_python_string): Return std::string.
3863         (gdbpy_eval_from_control_command): Update.
3864         (do_start_initialization): Use std::string.
3865         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3866         xstrprintf.
3867         * python/py-breakpoint.c (local_setattro): Use string_printf, not
3868         xstrprintf.
3869
3870 2017-08-03  Tom Tromey  <tom@tromey.com>
3871
3872         * top.h (do_restore_instream_cleanup): Remove.
3873         * top.c (do_restore_instream_cleanup): Remove.
3874         (read_command_file): Use scoped_restore.
3875         * cli/cli-script.c (execute_user_command): Use scoped_restore.
3876
3877 2017-08-03  Tom Tromey  <tom@tromey.com>
3878
3879         * cli/cli-script.c (execute_user_command)
3880         (execute_control_command): Use scoped_restore.
3881
3882 2017-08-03  Tom Tromey  <tom@tromey.com>
3883
3884         * cli/cli-script.c (do_restore_user_call_depth): Remove.
3885         (execute_user_command): Remove user_call_depth; use
3886         user_args_stack's size instead.
3887
3888 2017-08-03  Tom Tromey  <tom@tromey.com>
3889
3890         * top.h (in_user_command): Remove.
3891         * top.c (in_user_command): Remove.
3892         * cli/cli-script.c (do_restore_user_call_depth)
3893         (execute_user_command): Update.
3894
3895 2017-08-03  Tom Tromey  <tom@tromey.com>
3896
3897         * valops.c (search_struct_method): Use gdb::byte_vector.
3898         * valarith.c (value_concat): Use std::vector.
3899         * target.c (memory_xfer_partial): Use gdb::byte_vector.
3900         (simple_search_memory): Likewise.
3901         * printcmd.c (find_string_backward): Use gdb::byte_vector.
3902         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3903         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3904         * elfread.c (elf_rel_plt_read): Use std::string.
3905         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3906         * cli/cli-dump.c (restore_section_callback): Use
3907         gdb::byte_vector.
3908
3909 2017-08-03  Tom Tromey  <tom@tromey.com>
3910
3911         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3912
3913 2017-08-03  Tom Tromey  <tom@tromey.com>
3914
3915         * tui/tui-regs.c (tui_restore_gdbout): Remove.
3916         (tui_register_format): Use scoped_restore.
3917
3918 2017-08-03  Tom Tromey  <tom@tromey.com>
3919
3920         * reverse.c (exec_direction_default): Remove.
3921         (exec_reverse_once): Use scoped_restore.
3922         * remote.c (restore_remote_timeout): Remove.
3923         (remote_flash_erase, remote_flash_write, remote_flash_done)
3924         (readchar, remote_serial_write): Use scoped_restore.
3925         * cli/cli-script.c (struct source_cleanup_lines_args)
3926         (source_cleanup_lines): Remove.
3927         (script_from_file): Use scoped_restore.
3928         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3929         (source_command): Use scoped_restore.
3930
3931 2017-08-03  Tom Tromey  <tom@tromey.com>
3932
3933         * utils.h (make_cleanup_free_so): Remove.
3934         * utils.c (do_free_so, make_cleanup_free_so): Remove.
3935         * solist.h (struct so_deleter): New.
3936         (so_list_up): New typedef.
3937         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3938
3939 2017-08-03  Tom Tromey  <tom@tromey.com>
3940
3941         * utils.h (make_cleanup_restore_current_language): Remove.
3942         * utils.c (do_restore_current_language)
3943         (make_cleanup_restore_current_language): Remove.
3944         * parse.c (parse_exp_in_context_1)
3945         (parse_expression_with_language): Use
3946         scoped_restore_current_language.
3947         * mi/mi-main.c (mi_cmd_execute): Use
3948         scoped_restore_current_language.
3949         * language.h (scoped_restore_current_language): New class.
3950
3951 2017-08-03  Tom Tromey  <tom@tromey.com>
3952
3953         * compile/compile.c (cleanup_unlink_file): Remove.
3954         (compile_to_object): Use gdb::unlinker.
3955         (eval_compile_command): Likewise.
3956
3957 2017-08-03  Tom Tromey  <tom@tromey.com>
3958
3959         * utils.h (make_cleanup_fclose): Remove.
3960         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3961
3962 2017-08-03  Tom Tromey  <tom@tromey.com>
3963
3964         * top.c (open_terminal_stream): Return gdb_file_up.
3965         (new_ui_command): Update.
3966
3967 2017-08-03  Tom Tromey  <tom@tromey.com>
3968
3969         * source.c (print_source_lines_base, forward_search_command)
3970         (reverse_search_command): Use gdb_file_up.
3971
3972 2017-08-03  Tom Tromey  <tom@tromey.com>
3973
3974         * fbsd-nat.c (fbsd_find_memory_regions): Update.
3975
3976 2017-08-03  Tom Tromey  <tom@tromey.com>
3977
3978         * cli/cli-cmds.c (find_and_open_script): Change return type.
3979         Remove "streamp" and "full_path" parameters.
3980         (source_script_with_search): Update.
3981         * auto-load.c (source_script_file): Update.
3982         * cli/cli-cmds.h (find_and_open_script): Change type.
3983         (open_script): New struct.
3984
3985 2017-08-03  Tom Tromey  <tom@tromey.com>
3986
3987         * xml-support.c (xml_fetch_content_from_file): Update.
3988         * ui-file.c (stdio_file::open): Update.
3989         * tracefile-tfile.c (tfile_start): Update.
3990         * remote.c (remote_file_put, remote_file_get): Update.
3991         * nat/linux-procfs.c (linux_proc_get_int)
3992         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3993         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3994         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3995         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3996         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3997         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3998         * linux-nat.c (linux_proc_pending_signals): Update.
3999         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4000         (file_closer): Remove.
4001         * compile/compile.c (compile_to_object): Update.
4002         * common/filestuff.h (struct gdb_file_deleter): New.
4003         (gdb_file_up): New typedef.
4004         (gdb_fopen_cloexec): Change return type.
4005         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4006         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4007         (dump_binary_file, restore_binary_file): Update.
4008         * auto-load.c (auto_load_objfile_script_1): Update.
4009
4010 2017-08-03  Tom Tromey  <tom@tromey.com>
4011
4012         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4013         (info_static_tracepoint_markers_command): Likewise.
4014         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4015         * skip.c (skip_info): Use ui_out_emit_table.
4016         * progspace.c (print_program_space): Use ui_out_emit_table.
4017         * osdata.c (info_osdata): Use ui_out_emit_table.
4018         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4019         ui_out_emit_table.
4020         * linux-thread-db.c (info_auto_load_libthread_db): Use
4021         ui_out_emit_table.
4022         * inferior.c (print_inferior): Use ui_out_emit_table.
4023         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4024         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4025         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4026         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4027         * ui-out.h (class ui_out_emit_table): New.
4028
4029 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4030
4031         * mips-tdep.c (mips_fpu_type_str): New function.
4032         (mips_dump_tdep): Call it.
4033
4034 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4035
4036         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4037         `->mips_fpu_type'.
4038
4039 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4040
4041         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4042
4043 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4044
4045         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4046
4047 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4048
4049         * cli/cli-cmds.c (maintenancechecklist): New variable.
4050         * gdbcmd.h (maintenancechecklist): Declare it.
4051         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4052         Call i386_linux_read_description with different masks.
4053         * maint.c (maintenance_check_command): New function.
4054         (_initialize_maint_cmds): Call add_prefix_cmd.
4055         * target-descriptions.c (tdesc_reg): override operator != and ==.
4056         (tdesc_type): Likewise.
4057         (tdesc_feature): Likewise.
4058         (target_desc): Likewise.
4059         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4060         (maintenance_check_xml_descriptions): New function.
4061         (_initialize_target_descriptions) Add command "xml-descriptions".
4062         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4063
4064 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4065
4066         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4067         Include features/i386/32bit-*.c.
4068         (i386_linux_read_description): Generate target description if it
4069         doesn't exist.
4070         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4071         functions.
4072         * features/i386/32bit-linux.c: Re-generated.
4073         * features/i386/32bit-sse.c: Likewise.
4074         * target-descriptions.c (print_c_feature::visit): Print code to
4075         set register number if needed.
4076         (print_c_feature) <m_next_regnum>: New field.
4077
4078 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4079
4080         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4081         (FEATURE_XMLFILES): New.
4082         (FEATURE_CFILES): New.
4083         New rules.
4084         (clean-cfiles): Remove generated c files.
4085         * features/i386/32bit-avx.c: Generated.
4086         * features/i386/32bit-avx512.c: Generated.
4087         * features/i386/32bit-core.c: Generated.
4088         * features/i386/32bit-linux.c: Generated.
4089         * features/i386/32bit-mpx.c: Generated.
4090         * features/i386/32bit-pkeys.c: Generated.
4091         * features/i386/32bit-sse.c: Generated.
4092         * target-descriptions.c: Include algorithm.
4093         (tdesc_element_visitor): Add method visit_end.
4094         (print_c_tdesc): Implement visit_end.
4095         (print_c_tdesc:: m_filename_after_features): Move it to
4096         protected.
4097         (print_c_feature): New class.
4098         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4099         name starts with "i386/32bit-".
4100
4101 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4102
4103         * target-descriptions.c (tdesc_element_visitor): New class.
4104         (tdesc_element): New class.
4105         (tdesc_reg): Inherit from tdesc_element.
4106         (tdesc_reg::accept): New function.
4107         (tdesc_type): Inherit from tdesc_element.
4108         (tdesc_type::accept): New function.
4109         (tdesc_feature): Inherit from tdesc_element.
4110         (tdesc_feature::accept): New function.
4111         (target_desc): Inherit from tdesc_element.
4112         (target_desc::target_desc): New.
4113         (target_desc::~target_desc): New.
4114         (target_desc::accept): New.
4115         (allocate_target_description): Use new.
4116         (free_target_description): Use delete.
4117         (print_c_tdesc): New class.
4118         (maint_print_c_tdesc_cmd): Adjust.
4119
4120         * features/aarch64.c: Re-generated.
4121         * features/arc-arcompact.c: Re-generated.
4122         * features/arc-v2.c: Re-generated.
4123         * features/arm/arm-with-iwmmxt.c: Re-generated.
4124         * features/arm/arm-with-m.c: Re-generated.
4125         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4126         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4127         * features/arm/arm-with-neon.c: Re-generated.
4128         * features/arm/arm-with-vfpv2.c: Re-generated.
4129         * features/arm/arm-with-vfpv3.c: Re-generated.
4130         * features/i386/amd64-avx-avx512.c: Re-generated.
4131         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4132         * features/i386/amd64-avx.c: Re-generated.
4133         * features/i386/amd64-avx-linux.c: Re-generated.
4134         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4135         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4136         * features/i386/amd64-avx-mpx.c: Re-generated.
4137         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4138         * features/i386/amd64.c: Re-generated.
4139         * features/i386/amd64-linux.c: Re-generated.
4140         * features/i386/amd64-mpx.c: Re-generated.
4141         * features/i386/amd64-mpx-linux.c: Re-generated.
4142         * features/i386/i386-avx-avx512.c: Re-generated.
4143         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4144         * features/i386/i386-avx.c: Re-generated.
4145         * features/i386/i386-avx-linux.c: Re-generated.
4146         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4147         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4148         * features/i386/i386-avx-mpx.c: Re-generated.
4149         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4150         * features/i386/i386.c: Re-generated.
4151         * features/i386/i386-linux.c: Re-generated.
4152         * features/i386/i386-mmx.c: Re-generated.
4153         * features/i386/i386-mmx-linux.c: Re-generated.
4154         * features/i386/i386-mpx.c: Re-generated.
4155         * features/i386/i386-mpx-linux.c: Re-generated.
4156         * features/i386/x32-avx-avx512.c: Re-generated.
4157         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4158         * features/i386/x32-avx.c: Re-generated.
4159         * features/i386/x32-avx-linux.c: Re-generated.
4160         * features/i386/x32.c: Re-generated.
4161         * features/i386/x32-linux.c: Re-generated.
4162         * features/microblaze.c: Re-generated.
4163         * features/microblaze-with-stack-protect.c: Re-generated.
4164         * features/mips64-dsp-linux.c: Re-generated.
4165         * features/mips64-linux.c: Re-generated.
4166         * features/mips-dsp-linux.c: Re-generated.
4167         * features/mips-linux.c: Re-generated.
4168         * features/nds32.c: Re-generated.
4169         * features/nios2.c: Re-generated.
4170         * features/nios2-linux.c: Re-generated.
4171         * features/rs6000/powerpc-32.c: Re-generated.
4172         * features/rs6000/powerpc-32l.c: Re-generated.
4173         * features/rs6000/powerpc-403.c: Re-generated.
4174         * features/rs6000/powerpc-403gc.c : Re-generated.
4175         * features/rs6000/powerpc-405.c: Re-generated.
4176         * features/rs6000/powerpc-505.c: Re-generated.
4177         * features/rs6000/powerpc-601.c: Re-generated.
4178         * features/rs6000/powerpc-602.c: Re-generated.
4179         * features/rs6000/powerpc-603.c: Re-generated.
4180         * features/rs6000/powerpc-604.c: Re-generated.
4181         * features/rs6000/powerpc-64.c: Re-generated.
4182         * features/rs6000/powerpc-64l.c: Re-generated.
4183         * features/rs6000/powerpc-7400.c: Re-generated.
4184         * features/rs6000/powerpc-750.c: Re-generated.
4185         * features/rs6000/powerpc-860.c: Re-generated.
4186         * features/rs6000/powerpc-altivec32.c: Re-generated.
4187         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4188         * features/rs6000/powerpc-altivec64.c: Re-generated.
4189         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4190         * features/rs6000/powerpc-cell32l.c: Re-generated.
4191         * features/rs6000/powerpc-cell64l.c: Re-generated.
4192         * features/rs6000/powerpc-e500.c: Re-generated.
4193         * features/rs6000/powerpc-e500l.c: Re-generated.
4194         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4195         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4196         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4197         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4198         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4199         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4200         * features/rs6000/powerpc-vsx32.c: Re-generated.
4201         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4202         * features/rs6000/powerpc-vsx64.c: Re-generated.
4203         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4204         * features/rs6000/rs6000.c: Re-generated.
4205         * features/s390-linux32.c: Re-generated.
4206         * features/s390-linux32v1.c: Re-generated.
4207         * features/s390-linux32v2.c: Re-generated.
4208         * features/s390-linux64.c: Re-generated.
4209         * features/s390-linux64v1.c: Re-generated.
4210         * features/s390-linux64v2.c: Re-generated.
4211         * features/s390-te-linux64.c: Re-generated.
4212         * features/s390-tevx-linux64.c: Re-generated.
4213         * features/s390-vx-linux64.c: Re-generated.
4214         * features/s390x-linux64.c: Re-generated.
4215         * features/s390x-linux64v1.c: Re-generated.
4216         * features/s390x-linux64v2.c: Re-generated.
4217         * features/s390x-te-linux64.c: Re-generated.
4218         * features/s390x-tevx-linux64.c: Re-generated.
4219         * features/s390x-vx-linux64.c: Re-generated.
4220         * features/sparc/sparc32-solaris.c: Re-generated.
4221         * features/sparc/sparc64-solaris.c: Re-generated.
4222         * features/tic6x-c62x.c: Re-generated.
4223         * features/tic6x-c62x-linux.c: Re-generated.
4224         * features/tic6x-c64x.c: Re-generated.
4225         * features/tic6x-c64x-linux.c: Re-generated.
4226         * features/tic6x-c64xp.c: Re-generated.
4227         * features/tic6x-c64xp-linux.c: Re-generated.
4228
4229 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4230
4231         * i386-linux-tdep.c (i386_linux_read_description): New function.
4232         (i386_linux_core_read_description): Call
4233         i386_linux_read_description.
4234         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4235         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4236         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4237         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4238         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4239         * x86-linux-nat.c (x86_linux_read_description): Call
4240         i386_linux_read_description.
4241
4242 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4243
4244         * NEWS: Mention it.
4245         * features/Makefile (%.c: %.xml): Pass the xml file name to
4246         command "maint print c-tdesc".
4247         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4248         name from 'arg'.
4249
4250 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4251
4252         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4253         in-class initialization.
4254         (tdesc_create_feature): Call new instead of XCNEW.
4255         (free_target_description): Ue delete.
4256
4257 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4258
4259         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4260
4261 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4262
4263         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4264         constant.
4265         (amd64_x32_init_abi): Likewise.
4266         * amd64-tdep.h (amd64_init_abi): Update declaration.
4267         (amd64_x32_init_abi): Likewise.
4268
4269 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4270
4271         PR tdep/21717
4272         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4273         condition for FPSCR.
4274         (arm_linux_store_inferior_registers): Likewise.
4275
4276 2017-07-22  Tom Tromey  <tom@tromey.com>
4277
4278         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4279         <syscalls_counts>: Now a std::vector.
4280         (get_catch_syscall_inferior_data): Use "new".
4281         (catch_syscall_inferior_data_cleanup): Use "delete".
4282         (insert_catch_syscall, remove_catch_syscall)
4283         (clear_syscall_counts): Update.
4284
4285 2017-07-22  Tom Tromey  <tom@tromey.com>
4286
4287         * break-catch-syscall.c (syscall_catchpoint)
4288         <syscalls_to_be_caught>: Now a std::vector<int>
4289         (~syscall_catchpoint): Remove.
4290         (insert_catch_syscall, remove_catch_syscall)
4291         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4292         (print_mention_catch_syscall, print_recreate_catch_syscall):
4293         Update.
4294         (create_syscall_event_catchpoint): Change type of "filter"
4295         parameter.
4296         (catch_syscall_split_args): Return a std::vector.
4297         (catch_syscall_command_1, catching_syscall_number_1): Update.
4298
4299 2017-07-22  Tom Tromey  <tom@tromey.com>
4300
4301         * break-catch-throw.c (struct exception_catchpoint)
4302         <exception_rx>: Now a std::string.
4303         (~exception_catchpoint): Remove.
4304         (print_one_detail_exception_catchpoint): Update.
4305         (handle_gnu_v3_exceptions): Change type of except_rx.
4306         (extract_exception_regexp): Return a std::string.
4307         (catch_exception_command_1): Update.
4308
4309 2017-07-22  Tom Tromey  <tom@tromey.com>
4310
4311         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4312         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4313         std::vector.
4314         <catch_all>: Now a bool.
4315         (~signal_catchpoint): Remove.
4316         (signal_catchpoint_insert_location)
4317         (signal_catchpoint_remove_location)
4318         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4319         (signal_catchpoint_print_mention)
4320         (signal_catchpoint_print_recreate)
4321         (signal_catchpoint_explains_signal): Update.
4322         (create_signal_catchpoint): Change type of "filter" and
4323         "catch_all".
4324         (catch_signal_split_args): Return a std::vector.  Change type of
4325         "catch_all".
4326         (catch_signal_command): Update.
4327
4328 2017-07-20  Pedro Alves  <palves@redhat.com>
4329
4330         * ada-lang.c (ada_language_defn): Make extern.
4331         (_initialize_ada_language): Remove add_language call.
4332         * c-lang.c (c_language_defn, cplus_language_defn)
4333         (asm_language_defn, minimal_language_defn): Make extern.
4334         (_initialize_c_language): Delete.
4335         * completer.c (compare_cstrings): Delete, moved to utils.h.
4336         * d-lang.c (d_language_defn): Make extern.
4337         (_initialize_d_language): Remove add_language calls.
4338         * defs.h (enum language): Add comment.
4339         * f-lang.c (f_language_defn): Make extern.
4340         (_initialize_f_language): Remove add_language call.
4341         * go-lang.c (go_language_defn): Make extern.
4342         (_initialize_go_language): Remove add_language call.
4343         * language.c: Include <algorithm>.
4344         (languages): Redefine as const array.
4345         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4346         (set_language_command): Handle "local".  Use for-range loop.
4347         (set_language): Remove loop.
4348         (language_enum): Rewrite.
4349         (language_def, language_str): Remove loops.
4350         (add_language): Delete.
4351         (add_set_language_command): New, based on add_languages.
4352         (skip_language_trampoline): Adjust.
4353         (local_language_defn): Delete.
4354         (language_gdbarch_post_init): Adjust.
4355         (_initialize_language): Remove add_language calls.  Call
4356         add_set_language_command.
4357         * language.h (add_language): Delete.
4358         (auto_language_defn)
4359         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4360         (asm_language_defn, c_language_defn, cplus_language_defn)
4361         (d_language_defn, f_language_defn, go_language_defn)
4362         (m2_language_defn, objc_language_defn, opencl_language_defn)
4363         (pascal_language_defn, rust_language_defn): Declare.
4364         * m2-lang.c (m2_language_defn): Make extern.
4365         (_initialize_m2_language): Remove add_language call.
4366         * objc-lang.c (objc_language_defn): Make extern.
4367         (_initialize_objc_language): Remove add_language call.
4368         * opencl-lang.c (opencl_language_defn): Make extern.
4369         (_initialize_opencl_language): Remove add_language call.
4370         * p-lang.c (pascal_language_defn): Make extern.
4371         (_initialize_pascal_language): Delete.
4372         * rust-lang.c (rust_language_defn): Make extern.
4373         (_initialize_rust_language): Delete.
4374         * utils.h (compare_cstrings): New static inline function.
4375
4376 2017-07-20  Pedro Alves  <palves@redhat.com>
4377
4378         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4379         (get_var_value): Constify parameters.
4380         (get_int_var_value): Change prototype.
4381         (to_fixed_range_type): Adjust.
4382         * ada-lang.h (get_int_var_value): Change prototype.
4383
4384 2017-07-20  Pedro Alves  <palves@redhat.com>
4385
4386         * dwarf2read.c (dw2_lookup_symbol): Use
4387         SYMBOL_MATCHES_SEARCH_NAME.
4388         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4389
4390 2017-07-20  Pedro Alves  <palves@redhat.com>
4391
4392         * block.c (block_iter_name_step, block_iter_name_first)
4393         (block_iter_name_next): Delete.
4394         (block_lookup_symbol_primary): Adjust to use
4395         dict_iter_match_first/dict_iter_match_next.
4396         * block.h (block_iter_name_first, block_iter_name_next): Delete
4397         declarations.
4398         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4399         dict_iter_match_first/dict_iter_match_next.
4400
4401 2017-07-20  Pedro Alves  <palves@redhat.com>
4402
4403         * cp-support.c (cp_find_first_component_aux): Add missing case for
4404         end of string.
4405
4406 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4407
4408         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4409         of dwo_cu's dwo_file.
4410
4411 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4412
4413         * remote.c (store_registers_using_G): Remove one line comment.
4414
4415 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4416
4417         * regcache.c (regcache_cpy): Simplify it.
4418         (regcache::cpy_no_passthrough): Remove it.
4419         * regcache.h (cpy_no_passthrough): Remove it.
4420         (regcache_dup, regcache_cpy): Update comments.
4421
4422 2017-07-18  Pedro Alves  <palves@redhat.com>
4423
4424         * remote-sim.c (sim_command_completer): Adjust to work with a
4425         completion_tracker instead of a VEC.
4426
4427 2017-07-17  Pedro Alves  <palves@redhat.com>
4428
4429         * completer.c (complete_source_filenames): New function.
4430         (complete_address_and_linespec_locations): New function.
4431         (location_completer): Use complete_address_and_linespec_locations.
4432         (completion_tracker::build_completion_result): Honor the tracker's
4433         request to suppress append.
4434         * completer.h (completion_tracker::suppress_append_ws)
4435         (completion_tracker::set_suppress_append_ws): New methods.
4436         (completion_tracker::m_suppress_append_ws): New field.
4437         (complete_source_filenames): New declaration.
4438         * linespec.c (linespec_complete_what): New.
4439         (struct ls_parser) <complete_what, completion_word,
4440         completion_quote_char, completion_quote_end, completion_tracker>:
4441         New fields.
4442         (string_find_incomplete_keyword_at_end): New.
4443         (linespec_lexer_lex_string): Record quote char.  If in completion
4444         mode, don't throw.
4445         (linespec_lexer_consume_token): Advance the completion word point.
4446         (linespec_lexer_peek_token): Save/restore completion info.
4447         (save_stream_and_consume_token): New.
4448         (set_completion_after_number): New.
4449         (linespec_parse_basic): Set what to complete next depending on
4450         token.  Handle function and label completions specially.
4451         (parse_linespec): Disable objc shortcut in completion mode.  Set
4452         what to complete next depending on token type.  Skip keyword if in
4453         completion mode.
4454         (complete_linespec_component, linespec_complete): New.
4455         * linespec.h (linespec_complete): Declare.
4456
4457 2017-07-17  Pedro Alves  <palves@redhat.com>
4458
4459         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4460         Handle 'operator<' / 'operator<<'.
4461
4462 2017-07-17  Pedro Alves  <palves@redhat.com>
4463
4464         * completer.c (collect_explicit_location_matches): Handle
4465         MATCH_LABEL.
4466         (convert_explicit_location_to_linespec): New, factored out from
4467         ...
4468         (convert_explicit_location_to_sals): ... this.
4469         (complete_label): New.
4470         (linespec_complete_label, find_label_symbols_in_block): New.
4471         (find_label_symbols): Add completion_mode parameter and adjust to
4472         call find_label_symbols_in_block.
4473         * linespec.h (linespec_complete_label): Declare.
4474
4475 2017-07-17  Pedro Alves  <palves@redhat.com>
4476
4477         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4478         complete_symbol_mode parameter.
4479         * cli/cli-cmds.c (complete_command): Get the completion result out
4480         of the handle_brkchars tracker if used a custom word point.
4481         * completer.c: Include "linespec.h".
4482         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4483         (advance_to_expression_complete_word_point): New.
4484         (completion_tracker::completes_to_completion_word): New.
4485         (complete_files_symbols): Pass down
4486         complete_symbol_mode::EXPRESSION.
4487         (explicit_options, probe_options): New.
4488         (collect_explicit_location_matches): Complete on the
4489         explictit_loc->foo instead of word.  Use
4490         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4491         keyword and options completions.
4492         (backup_text_ptr): Delete.
4493         (skip_keyword): New.
4494         (complete_explicit_location): Remove 'word' parameter.  Add
4495         language, quoted_arg_start and quoted_arg_end parameters.
4496         Rewrite, parsing left to right.
4497         (location_completer): Rewrite.
4498         (location_completer_handle_brkchars): New function.
4499         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4500         (enum complete_line_internal_reason): Adjust comments.
4501         (completion_tracker::discard_completions): New.
4502         (completer_handle_brkchars_func_for_completer): Handle
4503         location_completer.
4504         (gdb_custom_word_point_brkchars)
4505         (gdb_org_rl_basic_quote_characters): New.
4506         (gdb_completion_word_break_characters_throw)
4507         (completion_find_completion_word): Handle trackers that use a
4508         custom word point.
4509         (completion_tracker::advance_custom_word_point_by): New.
4510         (completion_tracker::build_completion_result): Don't rely on
4511         readline appending the quote char.
4512         (gdb_rl_attempted_completion_function_throw): Handle trackers that
4513         use a custom word point.
4514         (gdb_rl_attempted_completion_function): Restore
4515         rl_basic_quote_characters.
4516         * completer.h (class completion_tracker): Extend intro comment.
4517         (completion_tracker::set_quote_char)
4518         (completion_tracker::quote_char)
4519         (completion_tracker::set_use_custom_word_point)
4520         (completion_tracker::use_custom_word_point)
4521         (completion_tracker::custom_word_point)
4522         (completion_tracker::set_custom_word_point)
4523         (completion_tracker::advance_custom_word_point_by)
4524         (completion_tracker::completes_to_completion_word)
4525         (completion_tracker::discard_completions): New methods.
4526         (completion_tracker::m_quote_char)
4527         (completion_tracker::m_use_custom_word_point)
4528         (completion_tracker::m_custom_word_point): New fields.
4529         (advance_to_expression_complete_word_point): Declare.
4530         * f-lang.c (f_collect_symbol_completion_matches): Add
4531         complete_symbol_mode parameter.
4532         * language.h (struct language_defn)
4533         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4534         parameter.
4535         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
4536         (linespec_complete_function): New function.
4537         (linespec_lexer_lex_keyword): Adjust.
4538         * linespec.h (linespec_keywords, linespec_complete_function): New
4539         declarations.
4540         * location.c (find_end_quote): New function.
4541         (explicit_location_lex_one): Add explicit_completion_info
4542         parameter.  Save quoting info.  Don't throw if being called for
4543         completion.  Don't handle Ada operators here.
4544         (is_cp_operator, skip_op_false_positives, first_of)
4545         (explicit_location_lex_one_function): New function.
4546         (string_to_explicit_location): Replace 'dont_throw' parameter with
4547         an explicit_completion_info pointer parameter.  Handle it.  Don't
4548         use explicit_location_lex_one to lex function names.  Use
4549         explicit_location_lex_one_function instead.
4550         * location.h (struct explicit_completion_info): New.
4551         (string_to_explicit_location): Replace 'dont_throw' parameter with
4552         an explicit_completion_info pointer parameter.
4553         * symtab.c (default_collect_symbol_completion_matches_break_on):
4554         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
4555         (default_collect_symbol_completion_matches)
4556         (collect_symbol_completion_matches): Add complete_symbol_mode
4557         parameter.
4558         (collect_symbol_completion_matches_type): Pass down
4559         complete_symbol_mode::EXPRESSION.
4560         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4561         parameter.  Handle LINESPEC mode.
4562         * symtab.h (complete_symbol_mode): New.
4563         (default_collect_symbol_completion_matches_break_on)
4564         (default_collect_symbol_completion_matches)
4565         (collect_symbol_completion_matches)
4566         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4567         parameter.
4568
4569 2017-07-17  Pedro Alves  <palves@redhat.com>
4570
4571         * utils.c (enum class strncmp_iw_mode): New.
4572         (strcmp_iw): Rename to ...
4573         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
4574         parameters.  Handle them.
4575         (strncmp_iw): New.
4576         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4577         * utils.h (strncmp_iw): Declare.
4578         (strcmp_iw): Move describing comments here.
4579
4580 2017-07-17  Pedro Alves  <palves@redhat.com>
4581
4582         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4583         CP_OPERATOR_STR.
4584         * c-typeprint.c (is_type_conversion_operator): Use
4585         CP_OPERATOR_STR.
4586         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4587         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4588         CP_OPERATOR_LEN.
4589         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4590         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4591         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4592         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4593         CP_OPERATOR_STR.
4594         * location.c: Include "cp-support.h".
4595         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4596         CP_OPERATOR_STR.
4597         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4598         CP_OPERATOR_LEN.
4599
4600 2017-07-17  Pedro Alves  <palves@redhat.com>
4601
4602         * cli/cli-cmds.c (complete_command): Use a completion tracker
4603         along with completion_find_completion_word for handle_brkchars
4604         phase.
4605         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4606         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4607         (struct gdb_rl_completion_word_info): New.
4608         (gdb_rl_find_completion_word): New.
4609         (completion_find_completion_word): New.
4610         * completer.h (completion_find_completion_word): Declare.
4611
4612 2017-07-17  Pedro Alves  <palves@redhat.com>
4613
4614         * ada-lang.c (symbol_completion_match): Adjust comments.
4615         (symbol_completion_add): Replace vector parameter with
4616         completion_tracker parameter.  Use it.
4617         (ada_make_symbol_completion_list): Rename to...
4618         (ada_collect_symbol_completion_matches): ... this.  Add
4619         completion_tracker parameter and use it.
4620         (ada_language_defn): Adjust.
4621         * break-catch-syscall.c (catch_syscall_completer): Adjust
4622         prototype and work with completion_tracker instead of VEC.
4623         * breakpoint.c (condition_completer): Adjust prototype and work
4624         with completion_tracker instead of VEC.
4625         * c-lang.c (c_language_defn, cplus_language_defn)
4626         (asm_language_defn, minimal_language_defn): Adjust to renames.
4627         * cli/cli-cmds.c (complete_command): Rework using
4628         completion_tracker.  Catch exceptions when completing.
4629         * cli/cli-decode.c (integer_unlimited_completer)
4630         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4631         with completion_tracker instead of VEC.
4632         * command.h (struct completion_tracker): Forward declare.
4633         (completer_ftype, completer_handle_brkchars_ftype): Change
4634         types.
4635         (complete_on_cmdlist, complete_on_enum): Adjust.
4636         * completer.c: Include <algorithm>.
4637         (struct gdb_completer_state): New.
4638         (current_completion): New global.
4639         (readline_line_completion_function): Delete.
4640         (noop_completer, filename_completer)
4641         (filename_completer_handle_brkchars, complete_files_symbols)
4642         (linespec_location_completer): Adjust to work with a
4643         completion_tracker instead of a VEC.
4644         (string_or_empty): New.
4645         (collect_explicit_location_matches): Adjust to work with a
4646         completion_tracker instead of a VEC.
4647         (explicit_location_completer): Rename to ...
4648         (complete_explicit_location): ... this and adjust to work with a
4649         completion_tracker instead of a VEC.
4650         (location_completer): Adjust to work with a completion_tracker
4651         instead of a VEC.
4652         (add_struct_fields): Adjust to work with a completion_list instead
4653         of VEC.
4654         (expression_completer): Rename to ...
4655         (complete_expression): ... this and adjust to work with a
4656         completion_tracker instead of a VEC.  Use complete_files_symbols.
4657         (expression_completer): Reimplement on top of complete_expression.
4658         (symbol_completer): Adjust to work with a completion_tracker
4659         instead of a VEC.
4660         (enum complete_line_internal_reason): Add describing comments.
4661         (complete_line_internal_normal_command): Adjust to work with a
4662         completion_tracker instead of a VEC.
4663         (complete_line_internal): Rename to ...
4664         (complete_line_internal_1): ... this and adjust to work with a
4665         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4666         handle_brkchars phase.
4667         (new_completion_tracker): Delete.
4668         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4669         complete_line_internal_1.
4670         (free_completion_tracker): Delete.
4671         (INITIAL_COMPLETION_HTAB_SIZE): New.
4672         (completion_tracker::completion_tracker)
4673         (completion_tracker::~completion_tracker): New.
4674         (maybe_add_completion): Delete.
4675         (completion_tracker::maybe_add_completion)
4676         (completion_tracker::add_completion)
4677         (completion_tracker::add_completions): New.
4678         (throw_max_completions_reached_error): Delete.
4679         (complete_line): Adjust to work with a completion_tracker instead
4680         of a VEC.  Don't create a completion_tracker_t or check for max
4681         completions here.
4682         (command_completer, command_completer_handle_brkchars)
4683         (signal_completer, reg_or_group_completer_1)
4684         (reg_or_group_completer, default_completer_handle_brkchars):
4685         Adjust to work with a completion_tracker.
4686         (gdb_completion_word_break_characters_throw): New.
4687         (gdb_completion_word_break_characters): Reimplement.
4688         (line_completion_function): Delete.
4689         (completion_tracker::recompute_lowest_common_denominator)
4690         (expand_preserving_ws)
4691         (completion_tracker::build_completion_result)
4692         (completion_result::completion_result)
4693         (completion_result::completion_result)
4694         (completion_result::~completion_result)
4695         (completion_result::completion_result)
4696         (completion_result::release_match_list, compare_cstrings)
4697         (completion_result::sort_match_list)
4698         (completion_result::reset_match_list)
4699         (gdb_rl_attempted_completion_function_throw)
4700         (gdb_rl_attempted_completion_function): New.
4701         * completer.h (completion_list, struct completion_result)
4702         (class completion_tracker): New.
4703         (complete_line): Add completion_tracker parameter.
4704         (readline_line_completion_function): Delete.
4705         (gdb_rl_attempted_completion_function): New.
4706         (noop_completer, filename_completer, expression_completer)
4707         (location_completer, symbol_completer, command_completer)
4708         (signal_completer, reg_or_group_completer): Update prototypes.
4709         (completion_tracker_t, new_completion_tracker)
4710         (make_cleanup_free_completion_tracker): Delete.
4711         (enum maybe_add_completion_enum): Delete.
4712         (maybe_add_completion): Delete.
4713         (throw_max_completions_reached_error): Delete.
4714         * corefile.c (complete_set_gnutarget): Adjust to work with a
4715         completion_tracker instead of a VEC.
4716         * cp-abi.c (cp_abi_completer): Adjust to work with a
4717         completion_tracker instead of a VEC.
4718         * d-lang.c (d_language_defn): Adjust.
4719         * disasm.c (disassembler_options_completer): Adjust to work with a
4720         completion_tracker instead of a VEC.
4721         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4722         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4723         with a completion_tracker instead of a VEC.
4724         (f_language_defn): Adjust.
4725         * go-lang.c (go_language_defn): Adjust.
4726         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4727         Adjust to work with a completion_tracker instead of a VEC.
4728         * infrun.c (handle_completer): Likewise.
4729         * interps.c (interpreter_completer): Likewise.
4730         * interps.h (interpreter_completer): Likewise.
4731         * language.c (unknown_language_defn, auto_language_defn)
4732         (local_language_defn): Adjust.
4733         * language.h (language_defn::la_make_symbol_completion_list):
4734         Rename to ...
4735         (language_defn::la_collect_symbol_completion_matches): ... this
4736         and adjust to work with a completion_tracker instead of a VEC.
4737         * m2-lang.c (m2_language_defn): Adjust.
4738         * objc-lang.c (objc_language_defn): Adjust.
4739         * opencl-lang.c (opencl_language_defn): Adjust.
4740         * p-lang.c (pascal_language_defn): Adjust.
4741         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4742         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4743         with a completion_tracker.
4744         * rust-lang.c (rust_language_defn): Adjust.
4745         * symtab.c (free_completion_list, do_free_completion_list)
4746         (return_val, completion_tracker): Delete.
4747         (completion_list_add_name, completion_list_add_symbol)
4748         (completion_list_add_msymbol, completion_list_objc_symbol)
4749         (completion_list_add_fields, add_symtab_completions): Add
4750         completion_tracker parameter and use it.
4751         (default_make_symbol_completion_list_break_on_1): Rename to...
4752         (default_collect_symbol_completion_matches_break_on): ... this.
4753         Add completion_tracker parameter and use it instead of allocating
4754         a completion tracker here.
4755         (default_make_symbol_completion_list_break_on): Delete old
4756         implementation.
4757         (default_make_symbol_completion_list): Delete.
4758         (default_collect_symbol_completion_matches): New.
4759         (make_symbol_completion_list): Delete.
4760         (collect_symbol_completion_matches): New.
4761         (make_symbol_completion_type): Rename to ...
4762         (collect_symbol_completion_matches_type): ... this.  Add
4763         completion_tracker parameter and use it instead of VEC.
4764         (make_file_symbol_completion_list_1): Rename to...
4765         (collect_file_symbol_completion_matches): ... this.  Add
4766         completion_tracker parameter and use it instead of VEC.
4767         (make_file_symbol_completion_list): Delete.
4768         (add_filename_to_list): Use completion_list instead of a VEC.
4769         (add_partial_filename_data::list): Now a completion_list.
4770         (make_source_files_completion_list): Work with a completion_list
4771         instead of a VEC.
4772         * symtab.h: Include "completer.h".
4773         (default_make_symbol_completion_list_break_on)
4774         (default_make_symbol_completion_list, make_symbol_completion_list)
4775         (make_symbol_completion_type, make_file_symbol_completion_list)
4776         (make_source_files_completion_list): Delete.
4777         (default_collect_symbol_completion_matches_break_on)
4778         (default_collect_symbol_completion_matches)
4779         (collect_symbol_completion_matches)
4780         (collect_symbol_completion_matches_type)
4781         (collect_file_symbol_completion_matches)
4782         (make_source_files_completion_list): New.
4783         * top.c (init_main): Don't install a rl_completion_entry_function
4784         hook.  Install a rl_attempted_completion_function hook instead.
4785         * tui/tui-layout.c (layout_completer): Adjust to work with a
4786         completion_tracker.
4787         * tui/tui-regs.c (tui_reggroup_completer):
4788         * tui/tui-win.c (window_name_completer, focus_completer)
4789         (winheight_completer): Adjust to work with a completion_tracker.
4790         * value.c: Include "completer.h".
4791         (complete_internalvar): Adjust to work with a completion_tracker.
4792         * value.h (complete_internalvar): Likewise.
4793
4794 2017-07-17  Pedro Alves  <palves@redhat.com>
4795
4796         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4797         renames.
4798         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4799         comments to completer_ftype's declaration.
4800         <completer_handle_brkchars>: Change type to
4801         completer_handle_brkchars_ftype.
4802         * command.h (completer_ftype): Add describing comment and give
4803         names to parameters.
4804         (completer_ftype_void): Rename to ...
4805         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4806         (set_cmd_completer_handle_brkchars): Adjust.
4807         * completer.c (filename_completer_handle_brkchars): New function.
4808         (complete_line_internal_normal_command): New function, factored
4809         out from ...
4810         (complete_line_internal): ... here.
4811         (command_completer_handle_brkchars)
4812         (default_completer_handle_brkchars)
4813         (completer_handle_brkchars_func_for_completer): New functions.
4814         * completer.h (set_gdb_completion_word_break_characters): Delete
4815         declaration.
4816         (completer_handle_brkchars_func_for_completer): New declaration.
4817         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4818         completer_handle_brkchars_func_for_completer.
4819
4820 2017-07-17  Pedro Alves  <palves@redhat.com>
4821
4822         * completer.c (symbol_completer): New function, based on
4823         make_symbol_completion_list_fn.
4824         * completer.h (symbol_completer): New declaration.
4825         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4826         * python/py-cmd.c (completers): Adjust.
4827         * symtab.c (make_symbol_completion_list_fn): Delete.
4828         * symtab.h (make_symbol_completion_list_fn): Delete.
4829         * cli/cli-decode.c (add_cmd): Adjust.
4830
4831 2017-07-17  Pedro Alves  <palves@redhat.com>
4832
4833         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4834         * dwarf2read.c: Include "filename-seen-cache.h".
4835         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4836         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4837         * filename-seen-cache.c: New file.
4838         * filename-seen-cache.h: New file.
4839         * symtab.c: Include "filename-seen-cache.h".
4840         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4841         (create_filename_seen_cache, clear_filename_seen_cache)
4842         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4843         to filename-seen-cache.h/filename-seen-cache.c.
4844         (output_source_filename, sources_info)
4845         (maybe_add_partial_symtab_filename)
4846         (make_source_files_completion_list): Adjust to use
4847         filename_seen_cache.
4848
4849 2017-07-17  Pedro Alves  <palves@redhat.com>
4850
4851         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4852         fields.
4853         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4854         dwarf2_debug_sections*)): New.
4855         (dwarf2_per_objfile::dwarf2_per_objfile(const
4856         dwarf2_per_objfile&)): Declare as deleted.
4857         (dwarf2_per_objfile::operator=): Declare as deleted.
4858         (dwarf2_per_objfile::dwarf2_per_objfile)
4859         (dwarf2_per_objfile::~dwarf2_per_objfile)
4860         (dwarf2_per_objfile::free_cached_comp_units): New.
4861         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4862         ctor.  Call dwarf2_per_objfile's ctor manually.
4863         (dwarf2_locate_sections): Deleted/refactored as ...
4864         (dwarf2_per_objfile::locate_sections): ... this new method.
4865         (free_cached_comp_units): Defer to
4866         dwarf2_per_objfile::free_cached_comp_units.
4867         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4868
4869 2017-07-14  Tom Tromey  <tom@tromey.com>
4870
4871         PR rust/21764:
4872         * rust-exp.y (convert_ast_to_expression): Add "want_type"
4873         parameter.
4874         <UNOP_SIZEOF>: Split into separate case.
4875         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
4876
4877 2017-07-14  Tom Tromey  <tom@tromey.com>
4878
4879         PR rust/21763:
4880         * symtab.c (symbol_matches_domain): Add language_rust to special
4881         case.
4882         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4883         treat LOC_TYPEDEF symbols as variables.
4884
4885 2017-07-14  Pedro Alves  <palves@redhat.com>
4886
4887         * symtab.c (make_file_symbol_completion_list_1): Iterate over
4888         symtabs matching all symtabs with SRCFILE as file name instead of
4889         only considering the first hit, with lookup_symtab.
4890
4891 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4894         operator_name parameters.
4895         (gen_expr): Update function call.
4896
4897 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4900         parameter.
4901         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4902         Likewise.
4903         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4904         parameter, use agent_expr::gdbarch instead, update function
4905         calls.
4906         (locexpr_tracepoint_var_ref): Likewise.
4907         (loclist_tracepoint_var_ref): Likewise.
4908         * ax-gdb.c (gen_trace_static_fields): Likewise.
4909         (gen_traced_pop): Likewise.
4910         (gen_frame_args_address): Likewise.
4911         (gen_frame_locals_address): Likewise.
4912         (gen_var_ref): Likewise.
4913         (gen_struct_ref_recursive): Likewise.
4914         (gen_static_field): Likewise.
4915         (gen_maybe_namespace_elt): Likewise.
4916         (gen_expr): Likewise.
4917         (gen_trace_for_var): Likewise.
4918         (gen_trace_for_expr): Likewise.
4919         (gen_trace_for_return_address): Likewise.
4920
4921 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4922
4923         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4924         parameter.
4925         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4926
4927 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4930         from ax, update calls.
4931         (gen_usual_arithmetic): Likewise.
4932         (gen_integral_promotions): Likewise.
4933         (gen_bitfield_ref): Likewise.
4934         (gen_primitive_field): Likewise.
4935         (gen_struct_ref_recursive): Likewise.
4936         (gen_struct_ref): Likewise.
4937         (gen_maybe_namespace_elt): Likewise.
4938         (gen_struct_elt_for_reference): Likewise.
4939         (gen_namespace_elt): Likewise.
4940         (gen_aggregate_elt_ref): Likewise.
4941         (gen_expr): Get gdbarch from ax, update calls.
4942         (gen_expr_binop_rest): Likewise.
4943
4944 2017-07-13  Pedro Alves  <palves@redhat.com>
4945
4946         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4947         as default tdesc.
4948         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4949         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4950         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4951         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
4952         tdep.
4953         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4954         Get final tdesc from the tdep.
4955         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4956         default tdesc.
4957         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4958         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4959         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4960         Use it as default tdesc.
4961         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4962         down to amd_init_abi.  No longer handle fallback tdesc here.
4963         * amd64-tdep.h (tdesc_x32): Declare.
4964         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4965         parameter.
4966         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4967         as default tdesc.
4968
4969 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4970
4971         * s390-linux-tdep.c (s390_process_record): Add support for
4972         instructions new in arch12.
4973
4974 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4975
4976         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4977         PT_GETFSBASE and PT_GETGSBASE.
4978         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4979         PT_SETGSBASE.
4980
4981 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4982
4983         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4984         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4985         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4986         those rules.
4987         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4988         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4989         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4990         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4991         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4992         * features/i386/amd64.xml: Add 64bit-segments.xml.
4993         * features/i386/amd64-avx-avx512.c: Regenerated.
4994         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4995         * features/i386/amd64-avx-mpx.c: Regenerated.
4996         * features/i386/amd64-avx.c: Regenerated.
4997         * features/i386/amd64-mpx.c: Regenerated.
4998         * features/i386/amd64.c: Regenerated.
4999         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5000         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5001         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5002         * regformats/i386/amd64-avx.dat: Regenerated.
5003         * regformats/i386/amd64-mpx.dat: Regenerated.
5004         * regformats/i386/amd64.dat: Regenerated.
5005
5006 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5007
5008         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5009         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5010
5011 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5012
5013         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5014         unsetenv.
5015         * gnulib/aclocal.m4: Regenerate.
5016         * gnulib/config.in: Regenerate.
5017         * gnulib/configure: Regenerate.
5018         * gnulib/import/Makefile.am: Regenerate.
5019         * gnulib/import/Makefile.in: Regenerate.
5020         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5021         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5022         * gnulib/import/m4/environ.m4: New file.
5023         * gnulib/import/m4/setenv.m4: New file.
5024         * gnulib/import/setenv.c: New file.
5025         * gnulib/import/unsetenv.c: New file.
5026
5027 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5028
5029         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5030         address when op is DW_OP_addr.
5031
5032 2017-07-09  Tom Tromey  <tom@tromey.com>
5033
5034         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5035         check and apply to outer type.
5036
5037 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5038
5039         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5040         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5041         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5042         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5043
5044 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5045
5046         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5047
5048 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5049
5050         * corelow.c (get_core_siginfo): Remove.
5051         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5052         instead of get_core_siginfo.
5053         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5054         * gdbarch.h: Re-generate.
5055         * gdbarch.c: Re-generate.
5056         * linux-tdep.c (linux_core_xfer_siginfo): New.
5057         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5058
5059 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5060
5061         * corelow.c (thread_section_name): Move to ...
5062         * gdbcore.h (thread_section_name): ... here.
5063
5064 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5065
5066         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5067         (struct siginfo32): New.
5068         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5069         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5070         via ptrace(PT_LWPINFO).
5071
5072 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5073
5074         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5075         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5076         (fbsd_get_siginfo_type): New.
5077         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5078         (_initialize_fbsd_tdep): New.
5079
5080 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5081
5082         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5083         a singular dwo_unit*) to support multiple CUs in the same way that
5084         multiple TUs are supported.
5085         (create_cus_hash_table): Replace create_dwo_cu with a function for
5086         parsing multiple CUs from a DWO file.
5087         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5088         create_dwo_cu.
5089         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5090         htab_find, rather than comparing the signature to a singleton CU in
5091         the dwo_file.
5092
5093 2017-07-06  Pedro Alves  <palves@redhat.com>
5094
5095         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5096
5097 2017-07-04  Pedro Alves  <palves@redhat.com>
5098
5099         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5100         * gdbtypes.h (TYPE_STATIC): Delete.
5101         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5102         is_synchronized, is_native>: Delete.
5103         <dummy>: Bump.
5104         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5105         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5106         (TYPE_FN_FIELD_ABSTRACT): Delete.
5107
5108 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5109
5110         * buffer.h (buffer_finish): Fix spelling mistakes.
5111
5112 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5113
5114         * .dir-locals.el: Automatically switch to C-style comments in
5115         versions of Emacs that support the feature.
5116
5117 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5118             Pedro Alves  <palves@redhat.com>
5119
5120         PR cli/21688
5121         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5122         (process_next_line): New variable 'inline_cmd'.
5123         Adjust 'if' clauses for "python", "compile" and "guile" to use
5124         'command_name_equals' and check for '!inline_cmd'.
5125
5126 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5127
5128         PR cli/21688
5129         * cli/cli-script.c (command_name_equals_not_inline): New function.
5130         (process_next_line): Adjust 'if' clauses for "python", "compile"
5131         and "guile" to use command_name_equals_not_inline.
5132
5133 2017-06-29  Pedro Alves  <palves@redhat.com>
5134
5135         * completer.c (expression_completer): Call
5136         linespec_location_completer instead of location_completer.
5137
5138 2017-06-29  Pedro Alves  <palves@redhat.com>
5139
5140         * completer.c (expression_completer): Remove code that recomputes
5141         'text' from 'word'.
5142
5143 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5144
5145         * regformats/regdat.sh: Generate code with
5146         "ifndef IN_PROCESS_AGENT".
5147
5148 2017-06-28  Pedro Alves  <palves@redhat.com>
5149
5150         * command.h: Include "common/scoped_restore.h".
5151
5152 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5153
5154         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5155         instead of obstack_grow.
5156
5157 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5158
5159         PR gdb/21337
5160         * symfile.c (reread_symbols): Call objfiles_changed just before
5161         read_symbols.
5162
5163 2017-06-27  Pedro Alves  <palves@redhat.com>
5164
5165         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5166         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5167         (completion_list_add_symbol, completion_list_add_msymbol):
5168         ... these new functions.
5169         (add_symtab_completions)
5170         (default_make_symbol_completion_list_break_on_1): Adjust.
5171
5172 2017-06-27  Pedro Alves  <palves@redhat.com>
5173
5174         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5175         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5176         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5177         dtor.
5178         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5179         'storage_obstack' field an auto_obstack.  In-class initialize all
5180         non-bitfield fields.  Make minsyms_read bool.
5181         * symfile.c (read_symbols): Adjust.
5182
5183 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5184
5185         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5186         (gdbsim_store_register): Likewise.
5187
5188 2017-06-27  Pedro Alves  <palves@redhat.com>
5189
5190         * c-exp.y (name_obstack): Now an auto_obstack.
5191         (yylex): Use auto_obstack::clear.
5192         (c_parse): Use auto_obstack::clear instead of reinitializing and
5193         freeing the obstack.
5194         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5195         * d-exp.y (name_obstack): Now an auto_obstack.
5196         (yylex): Use auto_obstack::clear.
5197         (d_parse): Use auto_obstack::clear instead of reinitializing and
5198         freeing the obstack.
5199         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5200         auto_obstack.
5201         * dwarf2read.c (create_addrmap_from_index)
5202         (dwarf2_build_psymtabs_hard)
5203         (update_enumeration_type_from_children): Likewise.
5204         * gdb_obstack.h (auto_obstack): New type.
5205         * go-exp.y (name_obstack): Now an auto_obstack.
5206         (build_packaged_name): Use auto_obstack::clear.
5207         (go_parse): Use auto_obstack::clear instead of reinitializing and
5208         freeing the obstack.
5209         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5210         auto_obstack.
5211         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5212         * rust-exp.y (work_obstack): Now an auto_obstack.
5213         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5214         reinitializing and freeing the obstack.
5215         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5216         (host_char_to_target): Use auto_obstack.
5217         * utils.h (make_cleanup_obstack_free): Delete declaration.
5218         * valprint.c (generic_emit_char, generic_printstr): Use
5219         auto_obstack.
5220
5221 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5222
5223         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5224         thread.
5225         (darwin_init_thread_list): Don't update dummy thread.
5226         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5227
5228 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5229
5230         * record-full.c (netorder16): Remove.
5231
5232 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5233
5234         * common/diagnostics.h: Define macros for GCC.
5235         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5236         * common/vec.h: Include diagnostics.h.
5237         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5238         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5239         warning.
5240
5241 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5242
5243         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5244         New macro.
5245         * ada-lex.l: Ignore deprecated register warnings.
5246
5247 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5248
5249         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5250         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5251
5252 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5253
5254         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5255         its own line.
5256
5257 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5258
5259         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5260
5261 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5262
5263         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5264         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5265         (xtensa_register_read_masked): Likewise.
5266
5267 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5268
5269         * common/environ.c (gdb_environ::unset): Update comment.
5270
5271 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5272
5273         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5274         registers.
5275
5276 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5277
5278         * record-full.c (record_full_exec_insn): Use byte_vector.
5279
5280 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5281
5282         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5283         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5284
5285 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5286
5287         * remote.c (cached_reg): Move from here...
5288         * regcache.h (cached_reg): ...to here.
5289         * python/py-unwind.c (struct reg_info): Remove.
5290         (cached_frame_info): Use cached_reg_t.
5291         (pyuw_prev_register): Likewise.
5292         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5293         (pyuw_dealloc_cache): Free all registers.
5294
5295 2017-06-22  Pedro Alves  <palves@redhat.com>
5296             Simon Marchi  <simon.marchi@ericsson.com>
5297
5298         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5299         warning.
5300         * common/diagnostics.h: New file.
5301
5302 2017-06-22  Pedro Alves  <palves@redhat.com>
5303
5304         * common/agent.h: Add include guards.
5305
5306 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5307
5308         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5309         talk about addressable units instead of bytes.
5310
5311 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5312
5313         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5314         of '::const_iterator'.
5315
5316 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5317
5318         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5319         'unittests/environ-selftests.c'.
5320         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5321         * charset.c (find_charset_names): Declare object 'iconv_env'.
5322         Update code to use 'iconv_env' object.  Remove call to
5323         'free_environ'.
5324         * common/environ.c: Include <utility>.
5325         (make_environ): Delete function.
5326         (free_environ): Delete function.
5327         (gdb_environ::clear): New function.
5328         (gdb_environ::operator=): New function.
5329         (gdb_environ::get): Likewise.
5330         (environ_vector): Delete function.
5331         (set_in_environ): Delete function.
5332         (gdb_environ::set): New function.
5333         (unset_in_environ): Delete function.
5334         (gdb_environ::unset): New function.
5335         (gdb_environ::envp): Likewise.
5336         * common/environ.h: Include <vector>.
5337         (struct gdb_environ): Delete; transform into...
5338         (class gdb_environ): ... this class.
5339         (free_environ): Delete prototype.
5340         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5341         environ_vector): Likewise.
5342         * infcmd.c (run_command_1): Update code to call
5343         'envp' from 'gdb_environ' class.
5344         (environment_info): Update code to call methods from 'gdb_environ'
5345         class.
5346         (unset_environment_command): Likewise.
5347         (path_info): Likewise.
5348         (path_command): Likewise.
5349         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5350         (inferior::inferior): Initialize 'environment' using the host's
5351         information.
5352         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5353         Include "environ.h".
5354         (class inferior) <environment>: Change type from 'struct
5355         gdb_environ' to 'gdb_environ'.
5356         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5357         methods from 'gdb_environ' class.
5358         * solib.c (solib_find_1): Likewise
5359         * unittests/environ-selftests.c: New file.
5360
5361 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5362
5363         * features/i386/i386-linux.xml: Exchange the order of including
5364         32bit-linux.xml and 32bit-sse.xml.
5365         * features/i386/i386-linux.c: Regenerated.
5366
5367 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5368
5369         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5370         Delete copy ctor and assignment operator.
5371         (tdesc_type): Likewise.
5372         (tdesc_feature): Likewise.
5373         (tdesc_free_reg): Remove.
5374         (tdesc_create_reg): Use new.
5375         (tdesc_free_type): Remove.
5376         (tdesc_create_vector): Use new.
5377         (tdesc_create_union): Likewise.
5378         (tdesc_create_flags): Likewise.
5379         (tdesc_create_enum): Likewise.
5380         (tdesc_free_feature): Delete.
5381         (free_target_description): Use delete.
5382
5383 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5384
5385         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5386         registers.
5387
5388 2017-06-19  Pedro Alves  <palves@redhat.com>
5389
5390         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5391         after gdb::unlinker.
5392
5393 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5394
5395         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5396         gdb_environ to access an environment variable.
5397
5398 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5399
5400         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5401         gdb_byte*.
5402
5403 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5404
5405         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5406
5407 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5408
5409         * configure: Re-generate.
5410         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5411
5412 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5413
5414         * configure: Re-generate.
5415         * warning.m4: Pass -Werror to compiler when checking for
5416         supported warning flags.
5417
5418 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5419
5420         * Makefile.in (COMPILE.pre): Add "-x c++".
5421
5422 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5423             Pedro Alves  <palves@redhat.com>
5424             Yao Qi  <yao.qi@linaro.org>
5425
5426         * defs.h (RequireLongest): New.
5427         (extract_integer): Declare function template.
5428         (extract_signed_integer): Remove the declaration, but define it
5429         static inline.
5430         (extract_unsigned_integer): Likewise.
5431         (store_integer): Declare function template.
5432         (store_signed_integer): Remove the declaration, but define it
5433         static inline.
5434         (store_unsigned_integer): Likewise.
5435         * findvar.c (extract_integer): New function template.
5436         (extract_signed_integer): Remove.
5437         (extract_unsigned_integer): Remove.
5438         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5439         instantiations.
5440         (store_integer): New function template.
5441         (store_signed_integer): Remove.
5442         (store_unsigned_integer): Remove.
5443         (store_integer): Explicit instantiations.
5444         * regcache.c (regcache_raw_read_signed): Update.
5445         (regcache::raw_read): New function.
5446         (regcache::raw_read_signed): Remove.
5447         (regcache::raw_read_unsigned): Remove.
5448         (regcache_raw_read_unsigned): Update.
5449         (regcache_raw_write_unsigned): Update.
5450         (regcache::raw_write_signed): Remove.
5451         (regcache::raw_write): New function.
5452         (regcache_cooked_read_signed): Update.
5453         (regcache::raw_write_unsigned): Remove.
5454         (regcache::cooked_read_signed): Remove.
5455         (regcache_cooked_read_unsigned): Update.
5456         (regcache::cooked_read_unsigned): Remove.
5457         (regcache_cooked_write_signed): Update.
5458         (regcache_cooked_write_unsigned): Update.
5459         * regcache.h (regcache) <raw_read_signed>: Remove.
5460         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5461         <raw_read, raw_write>: New.
5462         <cooked_read_signed, cooked_write_signed>: Remove.
5463         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5464         <cooked_read, cooked_write>: New.
5465         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5466         (sh64_pseudo_register_write): Update.
5467
5468 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5469
5470         * arc-tdep.c (arc_disassembler_options): New variable.
5471         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5472         of default_print_insn.
5473         (arc_delayed_print_insn): Set info->section when needed,
5474         use default_print_insn to retrieve a disassembler.
5475
5476 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5477
5478         PR gdb/21574
5479         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5480         to mention $SHELL and startup-with-shell.
5481
5482 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5483
5484         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5485
5486 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5487
5488         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5489         default_print_insn instead of print_insn_aarch64.
5490         * arm-tdep.c (gdb_print_insn_arm): Call
5491         default_print_insn instead of print_insn_big_arm
5492         and print_insn_little_arm.
5493         * i386-tdep.c (i386_print_insn): Call default_print_insn
5494         instead of print_insn_i386.
5495         * ia64-tdep.c (ia64_print_insn): Call
5496         default_print_insn instead of print_insn_ia64.
5497         * mips-tdep.c (gdb_print_insn_mips): Call
5498         default_print_insn instead of print_insn_big_mips
5499         and print_insn_little_mips.
5500         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5501         instead of print_insn_spu.
5502
5503 2017-06-14  Pedro Alves  <palves@redhat.com>
5504
5505         * ada-lang.c: Include "common/byte-vector.h".
5506         (ada_value_primitive_packed_val): Use gdb::byte_vector.
5507         * charset.c (wchar_iterator::iterate): Resize the vector instead
5508         of reserving it.
5509         * common/byte-vector.h: Include "common/def-vector.h".
5510         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5511         * cli/cli-dump.c: Include "common/byte-vector.h".
5512         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5513         * common/byte-vector.h: New file.
5514         * common/def-vector.h: New file.
5515         * common/default-init-alloc.h: New file.
5516         * dwarf2loc.c: Include "common/byte-vector.h".
5517         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5518         instead of reserving it.
5519         * dwarf2read.c: Include "common/byte-vector.h".
5520         (data_buf::m_vec): Now a gdb::byte_vector.
5521         * gdb_regex.c: Include "common/def-vector.h".
5522         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5523         * mi/mi-main.c: Include "common/byte-vector.h".
5524         (mi_cmd_data_read_memory): Use gdb::byte_vector.
5525         * printcmd.c: Include "common/byte-vector.h".
5526         (print_scalar_formatted): Use gdb::byte_vector.
5527         * valprint.c: Include "common/byte-vector.h".
5528         (maybe_negate_by_bytes, print_decimal_chars): Use
5529         gdb::byte_vector.
5530
5531 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5532
5533         * darwin-nat.c: Include "nat/fork-inferior.h".
5534
5535 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5536
5537         * configure.nat: Factor out Darwin bits that are not
5538         architecture-specific.  Add fork-inferior.o.
5539
5540 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5541
5542         * configure.nat: Factor out AIX bits that are not
5543         architecture-specific.  Add fork-inferior.o.
5544
5545 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5546
5547         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
5548         (read_pieced_value, write_pieced_value): ...here.  Reduce to
5549         wrappers that just call rw_pieced_value.
5550
5551 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5552
5553         * dwarf2loc.c (write_pieced_value): When writing the data for a
5554         memory piece, use write_memory_with_notification instead of
5555         write_memory.
5556
5557 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5558
5559         * valops.c (read_value_memory): Change embedded_offset to
5560         represent a bit offset instead of a byte offset.
5561         * value.h (read_value_memory): Adjust comment.
5562
5563 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5564
5565         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5566         dest_offset_bits and source_offset_bits.
5567         (write_pieced_value): Likewise.
5568
5569 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5570
5571         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5572         given by DW_OP_bit_piece.
5573         (write_pieced_value): Likewise.
5574
5575 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5576
5577         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5578         some other preparations to the places where sufficient information
5579         is available.
5580         (write_pieced_value): Likewise.
5581
5582 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5583
5584         * dwarf2loc.c (bits_to_bytes): New function.
5585         (read_pieced_value): Fix offset calculations for register pieces
5586         on big-endian targets.
5587         (write_pieced_value): Likewise.
5588
5589 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5590
5591         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5592         (write_pieced_value): Likewise.
5593
5594 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5595
5596         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5597         transfer the source value's least significant bits, instead of its
5598         lowest-addressed ones.  Rename type_len to max_offset.
5599         (read_pieced_value): Mirror above changes to write_pieced_value as
5600         applicable.
5601
5602 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5603
5604         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5605         truncate full bytes from dest_offset_bits before using it as an
5606         offset into the buffer.
5607
5608 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5609
5610         * dwarf2loc.c (write_pieced_value): Include transfer size in
5611         byte-wise check.
5612
5613 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5614
5615         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5616         calculation of this_size.
5617
5618 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5619
5620         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5621         when targeting a bit-field.
5622         (write_pieced_value): Likewise.
5623
5624 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5625
5626         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5627         (allocate_piece_closure): Drop addr_size parameter.
5628         (dwarf2_evaluate_loc_desc_full): Adjust call to
5629         allocate_piece_closure.
5630
5631 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5632
5633         PR gdb/21226
5634         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5635         the LSB end, independent of endianness.
5636
5637 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5638
5639         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5640         size capping.
5641
5642 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5643
5644         * mips-linux-nat.c: Move include features/mips*-linux.c to
5645         mips-linux-tdep.c.
5646         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5647         to mips-linux-tdep.c.
5648         * mips-linux-tdep.c: Include features/mips*-linux.c
5649         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5650         functions.
5651         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5652         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5653         (tdesc_mips64_dsp_linux): Declare.
5654
5655 2017-06-12  Tom Tromey  <tom@tromey.com>
5656
5657         * valprint.h (val_print_type_code_int): Remove.
5658         * valprint.c (generic_val_print_int): Always call
5659         val_print_scalar_formatted.
5660         (val_print_type_code_int): Remove.
5661         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5662         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5663         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5664         * ada-valprint.c (ada_val_print_num): Use
5665         val_print_scalar_formatted.
5666
5667 2017-06-12  Tom Tromey  <tom@tromey.com>
5668
5669         * printcmd.c (print_scalar_formatted): Unify the two switches.
5670         Don't convert scalars to LONGEST.
5671
5672 2017-06-12  Tom Tromey  <tom@tromey.com>
5673
5674         PR exp/16225:
5675         * valprint.h (print_decimal_chars): Update.
5676         * valprint.c (maybe_negate_by_bytes): New function.
5677         (print_decimal_chars): Add "is_signed" argument.
5678         * printcmd.c (print_scalar_formatted): Update.
5679
5680 2017-06-12  Tom Tromey  <tom@tromey.com>
5681
5682         PR exp/16225:
5683         * valprint.h (print_binary_chars, print_hex_chars): Update.
5684         * valprint.c (val_print_type_code_int): Update.
5685         (print_binary_chars): Add "zero_pad" argument.
5686         (emit_octal_digit): New function.
5687         (print_octal_chars): Don't zero-pad.
5688         (print_decimal_chars): Likewise.
5689         (print_hex_chars): Add "zero_pad" argument.
5690         * sh64-tdep.c (sh64_do_fp_register): Update.
5691         * regcache.c (regcache::dump): Update.
5692         * printcmd.c (print_scalar_formatted): Update.
5693         * infcmd.c (default_print_one_register_info): Update.
5694
5695 2017-06-12  Pedro Alves  <palves@redhat.com>
5696             Alan Hayward  <alan.hayward@arm.com>
5697
5698         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5699         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5700         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5701         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5702         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5703
5704 2017-06-12  Pedro Alves  <palves@redhat.com>
5705
5706         * dwarf2read.c (mapped_symtab::data): Now a vector of
5707         symtab_index_entry instead of vector of
5708         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5709         whether an element's name is NULL instead of checking whether the
5710         element itself is NULL.
5711         (find_slot): Change return type.  Adjust.
5712         (hash_expand, , add_index_entry, uniquify_cu_indices)
5713         (write_hash_table): Adjust.
5714
5715 2017-06-12  Pedro Alves  <palves@redhat.com>
5716
5717         * dwarf2read.c (recursively_count_psymbols): New function.
5718         (write_psymtabs_to_index): Call it to compute number of psyms and
5719         pass estimate size of psyms_seen to unordered_set's ctor.
5720
5721 2017-06-12  Pedro Alves  <palves@redhat.com>
5722
5723         * dwarf2read.c (write_hash_table): Check if key already exists
5724         before emplacing.
5725
5726 2017-06-12  Pedro Alves  <palves@redhat.com>
5727
5728         * dwarf2read.c (data_buf::append_space): Rename to...
5729         (data_buf::grow): ... this, and make private.  Adjust all callers.
5730         (data_buf::append_uint): New method.
5731         (add_address_entry, write_one_signatured_type)
5732         (write_psymtabs_to_index): Use it.
5733
5734 2017-06-12  Pedro Alves  <palves@redhat.com>
5735
5736         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5737         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5738         (data_buf::file_write): Call ::fwrite directly.
5739
5740 2017-06-12  Pedro Alves  <palves@redhat.com>
5741
5742         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5743         std::vector::erase.
5744
5745 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5746
5747         Code cleanup: C++ify .gdb_index producer.
5748         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5749         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5750         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5751         (create_strtab, add_string): Remove.
5752         (file_write, data_buf): New.
5753         (struct symtab_index_entry): Use std::vector for cu_indices.
5754         (struct mapped_symtab): Use std::vector for data.
5755         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5756         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5757         Remove.
5758         (find_slot): Change return type.  Update it to the new data structures.
5759         (hash_expand, add_index_entry): Update it to the new data structures.
5760         (offset_type_compare): Remove.
5761         (uniquify_cu_indices): Update it to the new data structures.
5762         (c_str_view, c_str_view_hasher, vector_hasher): New.
5763         (add_indices_to_cpool): Remove.
5764         (write_hash_table): Update it to the new data structures.
5765         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5766         (eq_psymtab_cu_index): Remove.
5767         (psym_index_map): New typedef.
5768         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5769         reference and std::unordered_map for cu_index_htab.
5770         (add_address_entry, add_address_entry_worker, write_address_map)
5771         (write_psymbols): Update it to the new data structures.
5772         (write_obstack): Remove.
5773         (struct signatured_type_index_data): Change types_list to a data_buf
5774         reference and psyms_seen to a std::unordered_set reference.
5775         (write_one_signatured_type, recursively_write_psymbols)
5776         (write_psymtabs_to_index): Update it to the new data structures.
5777
5778 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5779
5780         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5781         separate-debug-file commands.
5782         * symfile.h (separate_debug_file_debug): New global.
5783         * symfile.c (separate_debug_file_debug): New global.
5784         (separate_debug_file_exists, find_separate_debug_file): Add
5785         debug output.
5786         (_initialize_symfile): Add "set debug separate-debug-file"
5787         command.
5788         * build-id.c (build_id_to_debug_bfd,
5789         find_separate_debug_file_by_buildid): Add debug output.
5790
5791 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5792
5793         * gdbarch.sh (displaced_step_free_closure): Remove.
5794         * gdbarch.h, gdbarch.c: Re-generate.
5795         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5796         displaced_step_free_closure.
5797         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5798         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5799         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5800         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5801         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5802         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5803         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5804         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5805         * infrun.c (displaced_step_clear): Call xfree instead of
5806         gdbarch_displaced_step_free_closure.
5807
5808 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5809
5810         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5811         NULL".
5812
5813 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5814
5815         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5816         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5817         (mn10300_push_dummy_call): Likewise.
5818
5819 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5820
5821         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5822
5823 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5824
5825         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5826
5827 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5828
5829         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5830         able to start inferiors using a shell.
5831         (New remote packets): Announce new packet "QStartupWithShell".
5832         * remote.c: Add PACKET_QStartupWithShell.
5833         (extended_remote_create_inferior): Handle new
5834         PACKET_QStartupWithShell.
5835         (remote_protocol_features) <QStartupWithShell>: New entry for
5836         PACKET_QStartupWithShell.
5837         (_initialize_remote): Call "add_packet_config_cmd" for
5838         QStartupShell.
5839
5840 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5841             Pedro Alves  <palves@redhat.com>
5842
5843         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5844         and "nat/fork-inferior.h".
5845         * common/common-inferior.h: New file, with contents from
5846         "gdb/inferior.h".
5847         * commom/common-utils.c: Include "common-utils.h".
5848         (stringify_argv): New function.
5849         * common/common-utils.h (stringify_argv): New prototype.
5850         * configure.nat: Add "fork-inferior.o" as a dependency for
5851         "*linux*", "fbsd*" and "nbsd*" hosts.
5852         * corefile.c (get_exec_file): Update comment.
5853         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5854         instead of "startup_inferior".
5855         (darwin_create_inferior): Call "add_thread_silent" after
5856         "fork_inferior".
5857         * fork-child.c: Cleanup unnecessary includes.
5858         (SHELL_FILE): Move to "common/common-fork-child.c".
5859         (environ): Likewise.
5860         (exec_wrapper): Initialize.
5861         (get_exec_wrapper): New function.
5862         (breakup_args): Move to "common/common-fork-child.c"; rename to
5863         "breakup_args_for_exec".
5864         (escape_bang_in_quoted_argument): Move to
5865         "common/common-fork-child.c".
5866         (saved_ui): New variable.
5867         (prefork_hook): New function.
5868         (postfork_hook): Likewise.
5869         (postfork_child_hook): Likewise.
5870         (gdb_startup_inferior): Likewise.
5871         (fork_inferior): Move to "common/common-fork-child.c".  Update
5872         function to support gdbserver.
5873         (startup_inferior): Likewise.
5874         * gdbcore.h (get_exec_file): Remove declaration.
5875         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5876         instead of "startup_inferior".  Call "add_thread_silent" after
5877         "fork_inferior".
5878         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5879         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5880         instead of "startup_inferior".  Call "add_thread_silent" after
5881         "fork_inferior".
5882         * inferior.h: Include "common-inferior.h".
5883         (trace_start_error): Move to "common/common-utils.h".
5884         (trace_start_error_with_name): Likewise.
5885         (fork_inferior): Move prototype to "nat/fork-inferior.h".
5886         (startup_inferior): Likewise.
5887         (gdb_startup_inferior): New prototype.
5888         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5889         * nat/fork-inferior.h: New file.
5890         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5891         instead of "startup_inferior".  Call "add_thread_silent" after
5892         "fork_inferior".
5893         * target.h (target_terminal_init): Move prototype to
5894         "target/target.h".
5895         (target_terminal_inferior): Likewise.
5896         (target_terminal_ours): Likewise.
5897         * target/target.h (target_terminal_init): New prototype, moved
5898         from "target.h".
5899         (target_terminal_inferior): Likewise.
5900         (target_terminal_ours): Likewise.
5901         * utils.c (gdb_flush_out_err): New function.
5902
5903 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5904
5905         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5906         * common/common-gdbthread.h: New file, with parts from
5907         "gdb/gdbthread.h".
5908         * gdbthread.h: Include "common-gdbthread.h".
5909         (switch_to_thread): Moved to "common/common-gdbthread.h".
5910
5911 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5912
5913         * Makefile.in (SFILES): Add "common/job-control.c".
5914         (HFILES_NO_SRCDIR): Add "common/job-control.h".
5915         (COMMON_OBS): Add "job-control.o".
5916         * common/job-control.c: New file, with contents from
5917         "gdb/inflow.c".
5918         * common/job-control.h: New file, with contents from "terminal.h".
5919         * fork-child.c: Include "job-control.h".
5920         * inflow.c: Include "job-control.h".
5921         (gdb_setpgid): Move to "common/common-inflow.c".
5922         (_initialize_inflow): Move setting of "job_control" to
5923         "handle_job_control".
5924         * terminal.h (job_control): Moved to "common/common-terminal.h".
5925         (gdb_setpgid): Likewise.
5926         * top.c: Include "job_control.h".
5927         * utils.c: Likewise.
5928         (job_control): Moved to "job-control.c".
5929
5930 2017-06-07  Pedro Alves  <palves@redhat.com>
5931
5932         * Makefile.in (SFILES): Add gdb_regex.c.
5933         (COMMON_OBS): Add gdb_regex.o.
5934         * ada-lang.c (ada_add_standard_exceptions)
5935         (ada_add_exceptions_from_frame, name_matches_regex)
5936         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5937         parameter type to compiled_regex.  Adjust.
5938         (ada_exceptions_list): Use compiled_regex.
5939         * break-catch-throw.c (exception_catchpoint::pattern): Now a
5940         std::unique_ptr<compiled_regex>.
5941         (exception_catchpoint::~exception_catchpoint): Remove regfree
5942         call.
5943         (check_status_exception_catchpoint): Adjust to use compiled_regex.
5944         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5945         * breakpoint.c (solib_catchpoint::compiled): Now a
5946         std::unique_ptr<compiled_regex>.
5947         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5948         (check_status_catch_solib): Adjust to use compiled_regex.
5949         (add_solib_catchpoint): Adjust to use compiled_regex.
5950         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5951         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5952         compiled_regex reference.  Adjust to use it.
5953         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5954         declaration.  Include "gdb_regex.h".
5955         (apropos_cmd): Change regex parameter to compiled_regex reference.
5956         * gdb_regex.c: New file.
5957         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5958         declarations.
5959         (class compiled_regex): New.
5960         * linux-tdep.c: Include "common/gdb_optional.h".
5961         (struct mapping_regexes): New, factored out from
5962         mapping_is_anonymous_p, and adjusted to use compiled_regex.
5963         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5964         gdb::optional and remove cleanups.  Adjust to compiled_regex.
5965         * probe.c: Include "common/gdb_optional.h".
5966         (collect_probes): Use compiled_regex and gdb::optional and remove
5967         cleanups.
5968         * skip.c: Include "common/gdb_optional.h".
5969         (skiplist_entry::compiled_function_regexp): Now a
5970         gdb::optional<compiled_regex>.
5971         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5972         (free_skiplist_entry): Remove regfree call.
5973         (compile_skip_regexp, skip_rfunction_p): Adjust to use
5974         compiled_regex and gdb::optional.
5975         * symtab.c: Include "common/gdb_optional.h".
5976         (search_symbols): Use compiled_regex and gdb::optional.
5977         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5978         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
5979         to gdb_regex.c.
5980
5981 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5982
5983         * regcache.c (regcache::save): Avoid buffer use.
5984         (regcache::dump): Likewise.
5985
5986 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5987
5988         * sh-tdep.c (sh_pseudo_register_read): Remove
5989         MAX_REGISTER_SIZE.
5990         (sh_pseudo_register_write): Likewise.
5991         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5992         (sh64_pseudo_register_write): Likewise
5993
5994 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5995
5996         * aarch64-tdep.c (aarch64_store_return_value): Use
5997         V_REGISTER_SIZE.
5998         (aarch64_pseudo_read_value): Likewise.
5999         (aarch64_pseudo_write): Likewise.
6000
6001 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6002
6003         * regformats/regdef.h (set_register_cache): Remove the
6004         declaration.
6005
6006 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6007
6008         * frame.c (frame_unwind_register_signed): Use
6009         frame_unwind_register_value.
6010
6011 2017-06-06  Pedro Alves  <palves@redhat.com>
6012
6013         PR breakpoints/21553
6014         * breakpoint.c (create_breakpoints_sal_default)
6015         (init_breakpoint_sal, create_breakpoint_sal): Use
6016         gdb::unique_xmalloc_ptr for string parameters.
6017         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6018         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6019         (base_breakpoint_create_breakpoints_sal)
6020         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6021         (strace_marker_create_breakpoints_sal)
6022         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6023         string parameters.
6024         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6025         gdb::unique_xmalloc_ptr for string parameters.
6026         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6027         parameters.
6028
6029 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6030
6031         * alpha-tdep.c (alpha_register_to_value): Use
6032         get_frame_register_value.
6033         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6034
6035 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6036
6037         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6038         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6039         (ia64_value_to_register): Likewise.
6040         (ia64_extract_return_value): Likewise.
6041         (ia64_store_return_value): Likewise.
6042         (ia64_push_dummy_call): Likewise.
6043
6044 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6045
6046         GDB 8.0 released.
6047
6048 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6051
6052 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6053
6054         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6055         parameter.
6056         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6057
6058 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6059
6060         * event-loop.c (poll_timers): Unallocate timer using delete
6061         instead of xfree.
6062
6063 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6064
6065         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6066         (struct breakpoint) <~breakpoint>: New.
6067         (struct watchpoint): Inherit from breakpoint.
6068         <~watchpoint>: New.
6069         <base>: Remove.
6070         (struct tracepoint): Inherit from breakpoint.
6071         <base>: Remove.
6072         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6073         (struct longjmp_breakpoint): Inherit from breakpoint.
6074         <~longjmp_breakpoint>: New.
6075         <base>: Remove.
6076         (new_breakpoint_from_type): Remove casts.
6077         (watchpoint_in_thread_scope): Remove reference to base field.
6078         (watchpoint_del_at_next_stop): Likewise.
6079         (update_watchpoint): Likewise.
6080         (watchpoint_check): Likewise.
6081         (bpstat_check_watchpoint): Likewise.
6082         (set_longjmp_breakpoint): Likewise.
6083         (struct fork_catchpoint): Inherit from breakpoint.
6084         <base>: Remove.
6085         (struct solib_catchpoint): Inherit from breakpoint.
6086         <~solib_catchpoint>: New.
6087         <base>: Remove.
6088         (dtor_catch_solib): Change to ...
6089         (solib_catchpoint::~solib_catchpoint): ... this.
6090         (breakpoint_hit_catch_solib): Remove reference to base field.
6091         (add_solib_catchpoint): Likewise.
6092         (create_fork_vfork_event_catchpoint): Likewise.
6093         (struct exec_catchpoint): Inherit from breakpoint.
6094         <~exec_catchpoint>: New.
6095         <base>: Remove.
6096         (dtor_catch_exec): Change to ...
6097         (exec_catchpoint::~exec_catchpoint): ... this.
6098         (dtor_watchpoint): Change to ...
6099         (watchpoint::~watchpoint): ... this.
6100         (watch_command_1): Remove reference to base field.
6101         (catch_exec_command_1): Likewise.
6102         (base_breakpoint_dtor): Change to ...
6103         (breakpoint::~breakpoint): ... this.
6104         (base_breakpoint_ops): Remove dtor field value.
6105         (longjmp_bkpt_dtor): Change to ...
6106         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6107         (strace_marker_create_breakpoints_sal): Remove reference to base
6108         field.
6109         (delete_breakpoint): Don't manually call breakpoint destructor.
6110         (create_tracepoint_from_upload): Remove reference to base field.
6111         (trace_pass_set_count): Likewise.
6112         (initialize_breakpoint_ops): Don't initialize
6113         momentary_breakpoint_ops, don't set dtors.
6114         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6115         <~ada_catchpoint>: New.
6116         <base>: Remove.
6117         (create_excep_cond_exprs): Remove reference to base field.
6118         (dtor_exception): Change to ...
6119         (ada_catchpoint::~ada_catchpoint): ... this.
6120         (dtor_catch_exception): Remove.
6121         (dtor_catch_exception_unhandled): Remove.
6122         (dtor_catch_assert): Remove.
6123         (create_ada_exception_catchpoint): Remove reference to base
6124         field.
6125         (initialize_ada_catchpoint_ops): Don't set dtors.
6126         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6127         breakpoint.
6128         <~signal_catchpoint>: New.
6129         <base>: Remove.
6130         (signal_catchpoint_dtor): Change to ...
6131         (signal_catchpoint::~signal_catchpoint): ... this.
6132         (create_signal_catchpoint): Remove reference to base field.
6133         (initialize_signal_catchpoint_ops): Don't set dtor.
6134         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6135         from breakpoint.
6136         <~syscall_catchpoint>: New.
6137         <base>: Remove.
6138         (dtor_catch_syscall): Change to ...
6139         (syscall_catchpoint::~syscall_catchpoint): ... this.
6140         (create_syscall_event_catchpoint): Remove reference to base
6141         field.
6142         (initialize_syscall_catchpoint_ops): Don't set dtor.
6143         * break-catch-throw.c (struct exception_catchpoint): Inherit
6144         from breakpoint.
6145         <~exception_catchpoint>: New.
6146         <base>: Remove.
6147         (dtor_exception_catchpoint): Change to ...
6148         (exception_catchpoint::~exception_catchpoint): ... this.
6149         (handle_gnu_v3_exceptions): Remove reference to base field.
6150         (initialize_throw_catchpoint_ops): Don't set dtor.
6151         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6152         field.
6153         * remote.c (remote_get_tracepoint_status): Likewise.
6154         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6155         * tracefile.c (tracefile_fetch_registers): Likewise.
6156         * tracepoint.c (actions_command): Likewise.
6157         (validate_actionline): Likewise.
6158         (tfind_1): Likewise.
6159         (get_traceframe_location): Likewise.
6160         (find_matching_tracepoint_location): Likewise.
6161         (parse_tracepoint_status): Likewise.
6162         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6163
6164 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6165
6166         * breakpoint.c (struct longjmp_breakpoint): New struct.
6167         (is_tracepoint_type): Change return type to bool.
6168         (is_longjmp_type): New function.
6169         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6170         (set_raw_breakpoint_without_location): Use
6171         new_breakpoint_from_type.
6172         (set_raw_breakpoint): Likewise.
6173
6174 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6175
6176         * breakpoint.c (new_breakpoint_from_type): New function.
6177         (create_breakpoint_sal): Use new_breakpoint_from_type and
6178         unique_ptr.
6179         (create_breakpoint): Likewise.
6180
6181 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6182
6183         * memattr.c (mem_info_command): Rename to ...
6184         (info_mem_command): ... this.
6185         (mem_enable_command): Rename to ...
6186         (enable_mem_command): ... this.
6187         (mem_disable_command): Rename to ...
6188         (disable_mem_command): ... this.
6189         (mem_delete_command): Rename to ...
6190         (delete_mem_command): ... this.
6191         (_initialize_mem): Adjust function names.
6192
6193 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6194
6195         * btrace.c (handle_pt_insn_events): New.
6196         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6197         STATUS.  Split into this and ...
6198         (handle_pt_insn_event_flags): ... this.
6199
6200 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6201
6202         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6203         and struct pt_insn.resynced.
6204         * configure: Regenerated.
6205         * config.in: Regenerated.
6206
6207 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6208
6209         * btrace.c (ftrace_find_call_by_number): New function.
6210         (ftrace_new_function): Store objects, not pointers.
6211         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6212         ftrace_new_gap, ftrace_update_function,
6213         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6214         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6215         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6216         btrace_ends_with_single_insn, btrace_call_get): Account for
6217         btrace_thread_info::functions now storing objects.
6218         * btrace.h (struct btrace_thread_info): Add constructor.
6219         (struct btrace_thread_info) <functions>: Make std::vector.
6220         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6221         Initialize with default values.
6222         * record-btrace.c (record_btrace_frame_sniffer): Account for
6223         btrace_thread_info::functions now storing objects.
6224
6225 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6226
6227         * btrace.c: Remove typedef bfun_s.
6228         (ftrace_new_gap): Directly add gaps to the list of gaps.
6229         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6230         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6231         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6232         instead of gdb VEC.
6233
6234 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6235
6236         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6237         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6238         with btrace_thread_info::next_segment and
6239         btrace_thread_info::prev_segment.
6240         * btrace.h: Remove struct btrace_func_link.
6241         (struct btrace_function): Replace pair of function segment pointers
6242         with pair of indices.
6243         * python/py-record-btrace.c (btpy_call_prev_sibling,
6244         btpy_call_next_sibling): Replace references to
6245         btrace_thread_info::segment with btrace_thread_info::next_segment and
6246         btrace_thread_info::prev_segment.
6247         * record-btrace.c (record_btrace_frame_this_id): Use
6248         btrace_find_call_by_number.
6249
6250 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6251
6252         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6253         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6254         btrace_insn_next, btrace_insn_prev): Remove references to
6255         btrace_thread_info::flow.
6256         * btrace.h (struct btrace_function): Remove FLOW.
6257
6258 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6259
6260         * btrace.c (ftrace_find_call_by_number): New function.
6261         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6262         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6263         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6264         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6265         index.
6266         * btrace.h (struct btrace_function): Turn UP into an index.
6267         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6268         as an index.
6269         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6270         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6271         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6272
6273 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6274
6275         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6276         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6277         ftrace_update_function, ftrace_compute_global_level_offset,
6278         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6279         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6280         btrace_insn_end, btrace_is_empty): Remove references to
6281         btrace_thread_info::begin and btrace_thread_info::end.
6282         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6283         (struct btrace_thread_info) <functions>: Adjust comment.
6284         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6285         btrace_thread_info::begin.
6286
6287 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6288
6289         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6290         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6291         ftrace_update_function): Remove arguments that implicitly were always
6292         BTINFO->END.
6293         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6294         Don't pass BTINFO->END.
6295
6296 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6297
6298         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6299         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6300         btrace_find_insn_by_number): Replace function segment pointer with
6301         index.
6302         (btrace_insn_cmp): Simplify.
6303         * btrace.h: (struct btrace_insn_iterator) Rename index to
6304         insn_index.  Replace function segment pointer with index into function
6305         segment vector.
6306         * record-btrace.c (record_btrace_call_history): Replace function
6307         segment pointer use with index.
6308         (record_btrace_frame_sniffer): Retrieve function call segment through
6309         vector.
6310         (record_btrace_set_replay): Remove defunc't safety check.
6311
6312 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6313
6314         * btrace.c (btrace_ends_with_single_insn): New function.
6315         (btrace_call_get, btrace_call_number, btrace_call_begin,
6316         btrace_call_end, btrace_call_next, btrace_call_prev,
6317         btrace_find_call_by_number): Use index into call segment vector
6318         instead of pointer.
6319         (btrace_call_cmp): Simplify.
6320         * btrace.h (struct btrace_call_iterator): Replace function call segment
6321         pointer with index into vector.
6322         * record-btrace.c (record_btrace_call_history): Use index instead of
6323         pointer.
6324
6325 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6326
6327         * btrace.c (btrace_insn_begin, btrace_insn_end,
6328         btrace_find_insn_by_number): Add btinfo to iterator.
6329         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6330
6331 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6332
6333         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6334         and save pointers directly.
6335         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6336         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6337         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6338         changed signature of functions.
6339         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6340         (btrace_fetch): Remove code that adds btrace_function pointers to
6341         vector of btrace_functions.
6342         (btrace_clear): Simplify freeing vector of btrace_functions.
6343
6344 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6345
6346         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6347         Replace VEC_* with std::vector functions.
6348         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6349         (struct btrace_thread_info)<functions>: Change type to std::vector.
6350
6351 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6352
6353         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6354         "Removed targets and native configurations" up.  Merge duplicate
6355         "New commands" sub-sections.  Add "New options" sub-sections.
6356
6357 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6358
6359         * defs.h (copy_integer_to_size): New declaration.
6360         * findvar.c (copy_integer_to_size): New function.
6361         (do_cint_test): New selftest function.
6362         (copy_integer_to_size_test): Likewise.
6363         (_initialize_findvar): Likewise.
6364         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6365         (mips_fbsd_collect_reg): Use raw_collect_integer.
6366         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6367         (mips64_fill_gregset): Use raw_collect_integer
6368         (mips64_fill_fpregset): Use raw_supply_integer.
6369         * regcache.c (regcache::raw_supply_integer): New function.
6370         (regcache::raw_collect_integer): Likewise.
6371         * regcache.h: (regcache::raw_supply_integer): New declaration.
6372         (regcache::raw_collect_integer): Likewise.
6373
6374 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6375
6376         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6377         (COMMON_OBS): Add gdbarch-selftests.o.
6378         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6379         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6380         * gdbarch-selftests.c: New file.
6381         * regcache.h (regcache) <~regcache>: Mark it virtual if
6382         GDB_SELF_TEST.
6383         <raw_write>: Likewise.
6384
6385 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6386
6387         * regcache.c (current_regcache): Change it to
6388         regcache::current_regcache.
6389         (regcache_observer_target_changed): Update.
6390         (regcache_thread_ptid_changed): Make it a regcache static
6391         method.
6392         (regcache_thread_ptid_changed): Update.
6393         (class regcache_access): New.
6394         (current_regcache_test): Update.
6395         (_initialize_regcache): Update.
6396         * regcache.h: Include forward_list.
6397         (regcache): Declare regcache_thread_ptid_changed and declare
6398         registers_changed_ptid as friend.
6399
6400 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6401
6402         * i387-tdep.c (i387_register_to_value): Use register_size
6403         instead of TYPE_LENGTH.
6404         * m68k-tdep.c (m68k_register_to_value): Likewise.
6405
6406 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6407
6408         * i387-tdep.c (i387_convert_register_p): Return false if type
6409         code isn't TYPE_CODE_FLT.
6410
6411 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6412
6413         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6414         length is 4.
6415         (alpha_register_to_value): Remove type length check.
6416         (alpha_value_to_register): Likewise.
6417
6418 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6419
6420         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6421         TYPE_CODE_FLT.
6422
6423 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6424
6425         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6426         TYPE_CODE_FLT or not.
6427
6428 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6429
6430         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6431         * avr-tdep.c (avr_gdbarch_init): Likewise.
6432         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6433         * cris-tdep.c (cris_gdbarch_init): Likewise.
6434         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6435         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6436         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6437         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6438         * mep-tdep.c (mep_gdbarch_init): Likewise.
6439         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6440         * mips-tdep.c (mips_gdbarch_init): Likewise.
6441         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6442         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6443         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6444         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6445         * v850-tdep.c (v850_gdbarch_init): Likewise.
6446
6447 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6448
6449         * selftest-arch.c (tests_with_arch): Call registers_changed
6450         and reinit_frame_cache.
6451         * selftest.c (run_self_tests): Likewise.
6452
6453 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6454
6455         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6456         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6457
6458 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6459
6460         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6461         set_gdbarch_print_insn.
6462
6463 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6464
6465         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6466         set_gdbarch_print_insn.
6467
6468 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6469
6470         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6471         set_gdbarch_print_insn.
6472         * arc-tdep.c (arc_gdbarch_init): Likewise.
6473         * arch-utils.c: include dis-asm.h.
6474         (default_print_insn): New function.
6475         * arch-utils.h (default_print_insn): Declare.
6476         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6477         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6478         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6479         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6480         * frv-tdep.c (frv_gdbarch_init): Likewise.
6481         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6482         * gdbarch.sh (print_insn): Use default_print_insn.
6483         * gdbarch.c: Regenerated.
6484         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6485         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6486         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6487         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6488         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6489         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6490         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6491         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6492         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6493         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6494         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6495         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6496         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6497         * mt-tdep.c (mt_gdbarch_init): Likewise.
6498         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6499         * nios2-tdep.c (nios2_print_insn): Remove.
6500         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6501         * rx-tdep.c (rx_gdbarch_init): Likewise.
6502         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6503         * score-tdep.c (score_print_insn): Remove.
6504         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6505         * sh-tdep.c (sh_gdbarch_init): Likewise.
6506         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6507         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6508         * tic6x-tdep.c (tic6x_print_insn): Remove.
6509         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6510         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6511         * v850-tdep.c (v850_gdbarch_init): Likewise.
6512         * vax-tdep.c (vax_gdbarch_init): Likewise.
6513         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6514         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6515
6516 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6517
6518         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6519         (MIPS_FP0_REGNUM): Remove.
6520         (MIPS_FSR_REGNUM): Remove.
6521         (mips_fbsd_supply_fpregs): Use mips_regnum.
6522         (mips_fbsd_supply_gregs): Likewise.
6523         (mips_fbsd_collect_fpregs): Likewise.
6524         (mips_fbsd_collect_gregs): Likewise.
6525
6526 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6527
6528         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6529         (getpfpregs_supplies): New function.
6530         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6531         getfpregs_supplies.
6532         (mips_fbsd_store_inferior_registers): Likewise.
6533
6534 2017-05-22  Pedro Alves <palves@redhat.com>
6535
6536         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6537         maintainer.
6538
6539 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
6540
6541         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6542         (store_register): Likewise.
6543         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6544         (get_decimal_float_return_value): Likewise.
6545         (do_ppc_sysv_return_value): Likewise.
6546         (ppc64_sysv_abi_push_integer): Likewise.
6547         (ppc64_sysv_abi_push_freg): Likewise.
6548         (ppc64_sysv_abi_return_value_base): Likewise.
6549         (ppc64_sysv_abi_return_value): Likewise.
6550         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6551         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6552         * rs6000-nat.c: Likewise.
6553         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6554         (rs6000_value_to_register): Likewise.
6555         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6556
6557 2017-05-21  Tom Tromey  <tom@tromey.com>
6558
6559         PR rust/21466:
6560         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6561         arrays as "[T]", not "[T; ]".
6562
6563 2017-05-19  Tom Tromey  <tom@tromey.com>
6564
6565         PR rust/21484:
6566         * rust-lang.c (exp_descriptor_rust): New function.
6567         (rust_language_defn): Use it.
6568         * p-lang.c (pascal_language_defn): Update.
6569         * opencl-lang.c (opencl_language_defn): Update.
6570         * objc-lang.c (objc_language_defn): Update.
6571         * m2-lang.c (m2_language_defn): Update.
6572         * language.h (struct language_defn)
6573         <la_watch_location_expression>: New member.
6574         * language.c (unknown_language_defn, auto_language_defn)
6575         (local_language_defn): Update.
6576         * go-lang.c (go_language_defn): Update.
6577         * f-lang.c (f_language_defn): Update.
6578         * d-lang.c (d_language_defn): Update.
6579         * c-lang.h (c_watch_location_expression): Declare.
6580         * c-lang.c (c_watch_location_expression): New function.
6581         (c_language_defn, cplus_language_defn, asm_language_defn)
6582         (minimal_language_defn): Use it.
6583         * breakpoint.c (watch_command_1): Call
6584         la_watch_location_expression.
6585         * ada-lang.c (ada_language_defn): Update.
6586
6587 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6588
6589         PR tui/21482
6590         * gdb_curses.h (NOMACROS): Define.
6591         (NCURSES_NOMACROS): Define.
6592
6593 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6594
6595         PR tui/21482
6596         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6597         arg to char *.
6598         * tui/tui-wingeneral.c (box_win): Likewise.
6599         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6600         (tui_show_source_line): Likewise.
6601         (tui_show_exec_info_content): Likewise.
6602
6603 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6604
6605         * sparc-tdep.c (sparc_structure_return_p)
6606         (sparc_arg_on_registers_p): New functions.
6607         (sparc32_store_arguments): Use them.
6608         * sparc64-tdep.c (sparc64_16_byte_align_p)
6609         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6610         Handle TYPE_CODE_ARRAY.
6611
6612 2017-05-17  Yao Qi  <yao.qi@linaro.org>
6613
6614         * cli/cli-decode.c (add_alias_cmd): New function.
6615         * command.h (add_alias_cmd): Declare.
6616         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6617         instead call add_alias_cmd.
6618
6619 2017-05-17  Pedro Alves  <palves@redhat.com>
6620
6621         * Makefile.in (nat_extra_makefile_frag): Rename to ...
6622         (nat_makefile_frag): ... this.  All references updated.
6623         * configure.ac: Likewise.
6624         * configure.nat: Likewise.  Enhance comments.
6625         * configure: Regenerate.
6626
6627 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6628
6629         * procfs.c (procfs_create_inferior): Change prototype to match
6630         definition.
6631
6632 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6633
6634         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6635         C++ compiler warning.
6636
6637 2017-05-12  Tom Tromey  <tom@tromey.com>
6638
6639         PR rust/21483:
6640         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6641         recurse, just call value_struct_elt directly.
6642
6643 2017-05-12  Tom Tromey  <tom@tromey.com>
6644
6645         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6646         OP_RUST_ARRAY>: Fix.
6647
6648 2017-05-12  Tom Tromey  <tom@tromey.com>
6649
6650         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6651
6652 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6653
6654         * regcache.c: Include <forward_list>.
6655         (struct regcache_list): Remove.
6656         (current_regcache): Update.
6657         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6658         (regcache_thread_ptid_changed): Likewise.
6659         (registers_changed_ptid): Likewise.
6660         (current_regcache_size): Likewise.
6661
6662 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6663
6664         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6665         (current_regcache_size): New function.
6666         (current_regcache_test): New function.
6667         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6668
6669 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6670
6671         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6672         (print_gp_register_row): Use get_frame_register_value.
6673
6674 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6675
6676         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6677         (mips_supply_fpregset): Likewise.
6678         (mips64_supply_gregset): Likewise.
6679
6680 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6681
6682         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6683         regcache->raw_supply_zeroed.
6684
6685 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6686
6687         * configure.nat: Rearrange 'case' statements to match
6688         host before cpu.
6689
6690 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6691
6692         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6693         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6694         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6695         "@nat_extra_makefile_frag@".
6696         (Makefile): Remove dependency on "@frags@".
6697         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6698         (data-directory/Makefile): Likewise.
6699         * config/aarch64/linux.mh: Deleted; moved contents to
6700         "gdb/configure.nat".
6701         * config/alpha/alpha-linux.mh: Likewise.
6702         * config/alpha/nbsd.mh: Likewise.
6703         * config/arm/linux.mh: Likewise.
6704         * config/arm/nbsdelf.mh: Likewise.
6705         * config/i386/cygwin.mh: Likewise.
6706         * config/i386/cygwin64.mh: Likewise.
6707         * config/i386/darwin.mh: Likewise.
6708         * config/i386/fbsd.mh: Likewise.
6709         * config/i386/fbsd64.mh: Likewise.
6710         * config/i386/go32.mh: Likewise.
6711         * config/i386/i386gnu.mh: Likewise.
6712         * config/i386/i386sol2.mh: Likewise.
6713         * config/i386/linux.mh: Likewise.
6714         * config/i386/linux64.mh: Likewise.
6715         * config/i386/mingw.mh: Likewise.
6716         * config/i386/mingw64.mh: Likewise.
6717         * config/i386/nbsd64.mh: Likewise.
6718         * config/i386/nbsdelf.mh: Likewise.
6719         * config/i386/nto.mh: Likewise.
6720         * config/i386/obsd.mh: Likewise.
6721         * config/i386/obsd64.mh: Likewise.
6722         * config/i386/sol2-64.mh: Likewise.
6723         * config/ia64/linux.mh: Likewise.
6724         * config/m32r/linux.mh: Likewise.
6725         * config/m68k/linux.mh: Likewise.
6726         * config/m68k/nbsdelf.mh: Likewise.
6727         * config/m68k/obsd.mh: Likewise.
6728         * config/m88k/obsd.mh: Likewise.
6729         * config/mips/fbsd.mh: Likewise.
6730         * config/mips/linux.mh: Likewise.
6731         * config/mips/nbsd.mh: Likewise.
6732         * config/mips/obsd64.mh: Likewise.
6733         * config/pa/linux.mh: Likewise.
6734         * config/pa/nbsd.mh: Likewise.
6735         * config/pa/obsd.mh: Likewise.
6736         * config/powerpc/aix.mh: Likewise.
6737         * config/powerpc/fbsd.mh: Likewise.
6738         * config/powerpc/linux.mh: Likewise.
6739         * config/powerpc/nbsd.mh: Likewise.
6740         * config/powerpc/obsd.mh: Likewise.
6741         * config/powerpc/ppc64-linux.mh: Likewise.
6742         * config/powerpc/spu-linux.mh: Likewise.
6743         * config/s390/linux.mh: Likewise.
6744         * config/sh/nbsd.mh: Likewise.
6745         * config/sparc/fbsd.mh: Likewise.
6746         * config/sparc/linux.mh: Likewise.
6747         * config/sparc/linux64.mh: Likewise.
6748         * config/sparc/nbsd64.mh: Likewise.
6749         * config/sparc/nbsdelf.mh: Likewise.
6750         * config/sparc/obsd64.mh: Likewise.
6751         * config/sparc/sol2.mh: Likewise.
6752         * config/tilegx/linux.mh: Likewise.
6753         * config/vax/nbsdelf.mh: Likewise.
6754         * config/vax/obsd.mh: Likewise.
6755         * config/xtensa/linux.mh: Likewise.
6756         * config/i386/i386gnu.mn: New file, with excerpts from
6757         "config/i386/i386gnu.mh".
6758         * configure: Regenerate.
6759         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6760         *.mh files under "gdb/config".
6761         * configure.nat: New file, with contents from the
6762         "gdb/config/*/*.mh" files.
6763
6764 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6765
6766         * btrace.c (btrace_clear): Free insn vector.
6767
6768 2017-05-05  Pedro Alves  <palves@redhat.com>
6769
6770         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6771         * configure: Regenerate.
6772
6773 2017-05-04  Pedro Alves  <palves@redhat.com>
6774
6775         * Makefile.in (SFILES): Add progspace-and-thread.c.
6776         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6777         (COMMON_OBS): Add progspace-and-thread.o.
6778         * breakpoint.c: Include "progspace-and-thread.h".
6779         (update_inserted_breakpoint_locations)
6780         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6781         Use scoped_restore_current_pspace_and_thread.
6782         (create_std_terminate_master_breakpoint): Use
6783         scoped_restore_current_program_space.
6784         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6785         (print_breakpoint_location): Use
6786         scoped_restore_current_program_space.
6787         (bp_loc_is_permanent): Use
6788         scoped_restore_current_pspace_and_thread.
6789         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6790         (download_tracepoint_locations): Use
6791         scoped_restore_current_pspace_and_thread.
6792         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6793         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6794         (enum step_over_calls_kind): Moved from inferior.h.
6795         (class scoped_restore_current_thread): New class.
6796         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6797         declaration.
6798         (scoped_restore_current_thread): New class.
6799         * infcmd.c: Include "common/gdb_optional.h".
6800         (continue_1, proceed_after_attach): Use
6801         scoped_restore_current_thread.
6802         (notice_new_inferior): Use scoped_restore_current_thread.
6803         * inferior.c: Include "progspace-and-thread.h".
6804         (restore_inferior, save_current_inferior): Delete.
6805         (add_inferior_command, clone_inferior_command): Use
6806         scoped_restore_current_pspace_and_thread.
6807         * inferior.h (scoped_restore_current_inferior): New class.
6808         * infrun.c: Include "progspace-and-thread.h" and
6809         "common/gdb_optional.h".
6810         (follow_fork_inferior): Use
6811         scoped_restore_current_pspace_and_thread.
6812         (scoped_restore_exited_inferior): New class.
6813         (handle_vfork_child_exec_or_exit): Use
6814         scoped_restore_exited_inferior,
6815         scoped_restore_current_pspace_and_thread,
6816         scoped_restore_current_thread and scoped_restore.
6817         (fetch_inferior_event): Use scoped_restore_current_thread.
6818         * linespec.c (decode_line_full, decode_line_1): Use
6819         scoped_restore_current_program_space.
6820         * mi/mi-main.c: Include "progspace-and-thread.h".
6821         (exec_continue): Use scoped_restore_current_thread.
6822         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6823         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6824         * proc-service.c (ps_pglobal_lookup): Use
6825         scoped_restore_current_program_space.
6826         * progspace-and-thread.c: New file.
6827         * progspace-and-thread.h: New file.
6828         * progspace.c (release_program_space, clone_program_space): Use
6829         scoped_restore_current_program_space.
6830         (restore_program_space, save_current_program_space)
6831         (save_current_space_and_thread): Delete.
6832         (switch_to_program_space_and_thread): Moved to
6833         progspace-and-thread.c.
6834         * progspace.h (save_current_program_space)
6835         (save_current_space_and_thread): Delete declarations.
6836         (scoped_restore_current_program_space): New class.
6837         * remote.c (remote_btrace_maybe_reopen): Use
6838         scoped_restore_current_thread.
6839         * symtab.c: Include "progspace-and-thread.h".
6840         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6841         * thread.c (print_thread_info_1): Use
6842         scoped_restore_current_thread.
6843         (struct current_thread_cleanup): Delete.
6844         (do_restore_current_thread_cleanup)
6845         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6846         (scoped_restore_current_thread::~scoped_restore_current_thread):
6847         ... this new dtor.
6848         (make_cleanup_restore_current_thread): Rename/convert to ...
6849         (scoped_restore_current_thread::scoped_restore_current_thread):
6850         ... this new ctor.
6851         (thread_apply_all_command): Use scoped_restore_current_thread.
6852         (thread_apply_command): Use scoped_restore_current_thread.
6853         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6854         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6855
6856 2017-05-04  Pedro Alves  <palves@redhat.com>
6857
6858         * thread.c (make_cleanup_restore_current_thread): Move
6859         find_thread_ptid call before the is_stopped call.  Assert that the
6860         thread is found.  Replace is_stopped call by checking the thread's
6861         state directly.  Remove unnecessary NULL-thread check.
6862
6863 2017-05-04  Pedro Alves  <palves@redhat.com>
6864
6865         * corelow.c (thread_section_name): New class.
6866         (get_core_register_section, get_core_siginfo): Use it.
6867
6868 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6869
6870         * corelow.c (sniff_core_bfd): Remove extra semicolon.
6871         (get_core_register_section): Remove xfree of NULL pointer.
6872
6873 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
6874
6875         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6876         * regcache.c (regcache::raw_supply_zeroed): New function.
6877         * regcache.h (regcache::raw_supply_zeroed): New declaration.
6878
6879 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6880
6881         * gdbarch.sh: Remove commented out definition of
6882         TARGET_CHAR_BIT.
6883         * gdbarch.h: Re-generate.
6884
6885 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
6886
6887         * configure: Regenerate.
6888
6889 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
6890
6891         * solib-target.c (solib_target_relocate_section_addresses):
6892         Remove num_section_bases, num_bases, segment_bases variables.
6893
6894 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6895
6896         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6897
6898 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6899
6900         * solib-target.c: Include <vector>
6901         (struct lm_info_target) <~lm_info_target>: Remove.
6902         <segment_bases, section_bases>: Change type to
6903         std::vector<CORE_ADDR>.
6904         (library_list_start_segment, library_list_start_section,
6905         library_list_end_library,
6906         solib_target_relocate_section_addresses): Adjust.
6907
6908 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6909
6910         * gdbarch.sh (software_single_step): Change return type to
6911         std::vector<CORE_ADDR>.
6912         * gdbarch.c, gdbarch.h: Re-generate.
6913         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6914         Adjust.
6915         (arm_deal_with_atomic_sequence_raw): Adjust.
6916         (thumb_get_next_pcs_raw): Adjust.
6917         (arm_get_next_pcs_raw): Adjust.
6918         (arm_get_next_pcs): Adjust.
6919         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6920         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6921         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6922         (alpha_software_single_step): Adjust.
6923         * alpha-tdep.h (alpha_software_single_step): Adjust.
6924         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6925         * arm-tdep.c (arm_software_single_step): Adjust.
6926         (arm_breakpoint_kind_from_current_state): Adjust.
6927         * arm-tdep.h (arm_software_single_step): Adjust.
6928         * breakpoint.c (insert_single_step_breakpoint): Adjust.
6929         * cris-tdep.c (cris_software_single_step): Adjust.
6930         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6931         (micromips_deal_with_atomic_sequence): Adjust.
6932         (deal_with_atomic_sequence): Adjust.
6933         (mips_software_single_step): Adjust.
6934         * mips-tdep.h (mips_software_single_step): Adjust.
6935         * moxie-tdep.c (moxie_software_single_step): Adjust.
6936         * nios2-tdep.c (nios2_software_single_step): Adjust.
6937         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6938         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6939         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6940         * s390-linux-tdep.c (s390_software_single_step): Adjust.
6941         * sparc-tdep.c (sparc_software_single_step): Adjust.
6942         * spu-tdep.c (spu_software_single_step): Adjust.
6943         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6944
6945 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6946
6947         * gdbarch.sh: Use semi-colon as field separator instead of colon.
6948         * gdbarch.h: Re-generate.
6949
6950 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6951
6952         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6953         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6954         * python/py-instruction.c, python/py-instruction.h: New file.
6955         * python/py-record.c: Add py-instruction.h include.
6956         (gdbpy_initialize_record): Make gdb.Instruction a super class of
6957         gdb.RecordInstruction.
6958         * python/python-internal.h: Add gdbpy_initialize_instruction
6959         declaration.
6960         * python/python.c (do_start_initialization): Add
6961         gdbpy_initialize_instruction.
6962
6963 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6964
6965         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6966         Remove.
6967         (btrace_func_from_recpy_func): New function.
6968         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6969         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6970         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6971         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6972         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6973         Also, use new helper functions.
6974         (btpy_list_item): Use new helper functions.
6975         (recpy_bt_function_call_history): Use new type name.
6976         (btpy_call_getset): Remove.
6977         (gdbpy_initialize_btrace): Remove code to initialize
6978         gdb.BtraceFunctionCall.
6979         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6980         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6981         recpy_bt_func_prev, recpy_bt_func_next): New export.
6982         * python/py-record.c (recpy_func_type): New static object.
6983         (recpy_func_new, recpy_func_level, recpy_func_symbol,
6984         recpy_func_instructions, recpy_func_up, recpy_func_prev,
6985         recpy_func_next): New function.
6986         (recpy_element_hash, recpy_element_richcompare): Updated comment.
6987         (recpy_func_getset): New static object.
6988         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6989         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6990
6991 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6992
6993         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6994         (btpy_object, btpy_insn_type, btpy_new): Remove.
6995         (btpy_list_object): Use gdb.RecordInstruction type instead of
6996         gdb.BtraceInstruction type.
6997         (btrace_insn_from_recpy_insn): New function.
6998         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6999         btpy_new.
7000         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7001         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7002         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7003         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7004         instead of btpy_object.
7005         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7006         btpy_insn_data, btpy_insn_decode): Rename to ...
7007         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7008         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7009         recpy_bt_insn_decode): This.  Also, use new helper functions.
7010         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7011         recpy_insn_type.
7012         (btpy_insn_getset): Remove.
7013         (gdbpy_initialize_btrace): Remove code to initialize
7014         gdb.BtraceInstruction.  Use recpy_element_object.
7015         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7016         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7017         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7018         * python/py-record.c (recpy_insn_type): New static object.
7019         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7020         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7021         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7022         New function.
7023         (recpy_insn_getset): New static object.
7024         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7025         * python/py-record.h (recpy_element_object): New typedef.
7026         (recpy_insn_type, recpy_insn_new): New export.
7027
7028 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7029
7030         * py-record-btrace.c (btpy_insn_new): Removed.
7031         (btpy_insn_or_gap_new): New function.
7032         (btpy_insn_error): Removed.
7033         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7034         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7035         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7036         btpy_insn_or_gap_new instead of btpy_insn_new.
7037         (btpy_insn_getset): Remove btpy_insn_error.
7038         * py-record.c (recpy_gap_type): New static object.
7039         (recpy_gap_object): New typedef.
7040         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7041         recpy_gap_reason_string): New function.
7042         (recpy_gap_getset): New static object.
7043         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7044         * py-record.h (recpy_gap_new): New export.
7045
7046 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7047
7048         * python/py-record.c (recpy_ptid): Remove.
7049         (recpy_record_getset): Remove recpy_ptid.
7050
7051 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7052
7053         * btrace.c (btrace_fetch): Set inferior_ptid.
7054         * python/py-record-btrace.c: Add "py-record.h" include.
7055         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7056         recpy_bt_end, recpy_bt_instruction_history,
7057         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7058         in gdb.Record object instead of current ptid.
7059         * python/py-record.c: Include new "py-record.h" file.
7060         (recpy_record_object): Moved to py-record.h.
7061         * python/py-record.h: New file.
7062
7063 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7064
7065         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7066         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7067         indentation.
7068
7069 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7070
7071         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7072         the past maintainers section.
7073
7074 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7075
7076         * infcmd.c (get_return_value): Use regcache ctor, and remove
7077         cleanup.
7078
7079 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7080             Pedro Alves  <palves@redhat.com>
7081
7082         * regcache.c (regcache::regcache): New tag dispatch ctor.
7083         (do_cooked_read): Moved above.
7084         (regcache_dup): Use the tag dispatch ctor..
7085         * regcache.h (regcache): Declare ctor, delete copy ctor and
7086         assignment operator, remove friend regcache_dup.
7087
7088 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7089
7090         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7091         call method save instead of regcache_cpy.
7092         * regcache.h (struct regcache): Make regcache_dup a friend.
7093
7094 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7095
7096         * regcache.c (struct regcache): Move to regcache.h
7097         (regcache::arch): New method.
7098         (regcache_get_ptid): Update.
7099         (get_regcache_arch): Call arch method.
7100         (get_regcache_aspace): Call method aspace.
7101         (register_buffer): Change it to method.
7102         (regcache_save): Change it to regcache::save.
7103         (regcache_restore): Likewise.
7104         (regcache_cpy_no_passthrough): Remove the declaration.
7105         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7106         (regcache_cpy_no_passthrough): Change it to method
7107         cpy_no_passthrough.
7108         (regcache_register_status): Change it to method
7109         get_register_status.
7110         (regcache_invalidate): Change it to method invalidate.
7111         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7112         (regcache_raw_update): Change it to method raw_update.
7113         (regcache_raw_read): Likewise.
7114         (regcache_raw_read_signed): Likewise.
7115         (regcache_raw_read_unsigned): Likewise.
7116         (regcache_raw_write_signed): Likewise.
7117         (regcache_raw_write_unsigned): Likewise.
7118         (regcache_cooked_read): Likewise.
7119         (regcache_cooked_read_value): Likewise.
7120         (regcache_cooked_read_signed): Likewise.
7121         (regcache_cooked_read_unsigned): Likewise.
7122         (regcache_cooked_write_signed): Likewise.
7123         (regcache_cooked_write_unsigned): Likewise.
7124         (regcache_raw_set_cached_value): Likewise.
7125         (regcache_raw_write): Likewise.
7126         (regcache_cooked_write): Likewise.
7127         (regcache_xfer_part): Likewise.
7128         (regcache_raw_read_part): Likewise.
7129         (regcache_raw_write_part): Likewise.
7130         (regcache_cooked_read_part): Likewise.
7131         (regcache_cooked_write_part): Likewise.
7132         (regcache_raw_supply): Likewise.
7133         (regcache_raw_collect): Likewise.
7134         (regcache_transfer_regset): Likewise.
7135         (regcache_supply_regset): Likewise.
7136         (regcache_collect_regset): Likewise.
7137         (regcache_debug_print_register): Likewise.
7138         (enum regcache_dump_what): Move it to regcache.h.
7139         (regcache_dump): Change it to method dump.
7140         * regcache.h (enum regcache_dump_what): New.
7141         (class regcache): New.
7142         * target.c (target_fetch_registers): Call method
7143         debug_print_register.
7144         (target_store_registers): Likewise.
7145
7146 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7147
7148         * windows-nat.c (struct lm_info_windows): Initialize field.
7149         (windows_make_so): Allocate lm_info_windows with new.
7150         (windows_free_so): Free lm_info_windows with delete.
7151
7152 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7153
7154         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7155         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7156         cleanup.
7157         (darwin_free_so): Free lm_info_darwin with delete.
7158
7159 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7160
7161         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7162         <l_addr_p>: Change type to bool.
7163         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7164         (svr4_free_so): Free lm_info_svr4 with delete.
7165         (svr4_copy_library_list): Replace memcpy with call to copy
7166         constructor.
7167         (library_list_start_library, svr4_default_sos): Allocate
7168         lm_info_svr4 with new.
7169
7170 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7171
7172         * solib-target.c (struct lm_info_target): Add destructor,
7173         initialize fields.
7174         <name>: Change type to std::string.
7175         (library_list_start_library): Allocate lm_info_target with new.
7176         (solib_target_free_library_list): Free lm_info_target with
7177         delete.
7178         (solib_target_current_sos): Adapt to std::string.
7179         (solib_target_free_so): Free lm_info_target with delete.
7180
7181 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7182
7183         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7184         fields.
7185         (frv_current_sos): Allocate lm_info_frv with new.
7186         (frv_relocate_main_executable): Free lm_info_frv with delete,
7187         allocate with new.
7188         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7189
7190 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7191
7192         * solib-frv.c (struct lm_info_frv): Fix indentation.
7193
7194 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7195
7196         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7197         map field.
7198         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7199         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7200         and allocate with new.
7201         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7202
7203 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7204
7205         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7206         <filename, member_name>: Change type to std::string.
7207         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7208         (library_list_start_library): Allocate lm_info_aix with new.
7209         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7210         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7211         with copy constructor.
7212
7213 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7214
7215         * solist.h (struct lm_info): Remove.
7216         (struct lm_info_base): New class.
7217         (struct so_list) <lm_info>: Change type to lm_info_base *.
7218         * nto-tdep.c (struct lm_info): Remove.
7219         (lm_addr): Adjust.
7220         * solib-aix.c (struct lm_info): Rename to ...
7221         (struct lm_info_aix): ... this.  Extend lm_info_base.
7222         (lm_info_p): Rename to ...
7223         (lm_info_aix_p): ... this, and adjust.
7224         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7225         solib_aix_parse_libraries, library_list_start_library,
7226         solib_aix_free_library_list, solib_aix_parse_libraries,
7227         solib_aix_get_library_list,
7228         solib_aix_relocate_section_addresses, solib_aix_free_so,
7229         solib_aix_get_section_offsets,
7230         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7231         Adjust.
7232         (struct solib_aix_inferior_data) <library_list>: Adjust.
7233         * solib-darwin.c (struct lm_info): Rename to ...
7234         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7235         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7236         * solib-dsbt.c (struct lm_info): Rename to ...
7237         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7238         (struct dsbt_info) <main_executable_lm_info): Adjust.
7239         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7240         dsbt_relocate_section_addresses): Adjust.
7241         * solib-frv.c (struct lm_info): Rename to ...
7242         (struct lm_info_frv): ... this.  Extend lm_info_base.
7243         (main_executable_lm_info): Adjust.
7244         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7245         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7246         find_canonical_descriptor_in_load_object,
7247         frv_fdpic_find_canonical_descriptor): Adjust.
7248         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7249         to lm_info_svr4.
7250         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7251         svr4_clear_so, svr4_copy_library_list,
7252         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7253         svr4_current_sos, svr4_fetch_objfile_link_map,
7254         solist_update_incremental): Adjust.
7255         * solib-svr4.h (struct lm_info_svr4): Move here from
7256         solib-svr4.c.
7257         * solib-target.c (struct lm_info): Rename to ...
7258         (struct lm_info_target): ... this.  Extend lm_info_base.
7259         (lm_info_p): Rename to ...
7260         (lm_info_target_p): ... this.
7261         (solib_target_parse_libraries, library_list_start_segment,
7262         library_list_start_section, library_list_start_library,
7263         library_list_end_library, solib_target_free_library_list,
7264         solib_target_current_sos, solib_target_free_so,
7265         solib_target_relocate_section_addresses): Adjust.
7266         * windows-nat.c (struct lm_info): Rename to ...
7267         (struct lm_info_windows): ... this.  Extend lm_info_base.
7268         (windows_make_so, handle_load_dll, handle_unload_dll,
7269         windows_xfer_shared_libraries): Adjust.
7270
7271 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7272
7273         * solib-darwin.c (struct darwin_so_list): Remove.
7274         (darwin_current_sos): Allocate an so_list object instead of a
7275         darwin_so_list, separately allocate an lm_info object.
7276         (darwin_free_so): Free lm_info.
7277
7278 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7279
7280         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7281         with fprintf_filtered.
7282
7283 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7284
7285         * regcache.c (regcache::regcache): New function.
7286         (regcache::~regcache): New function.
7287         (regcache_xmalloc_1): Remove.
7288         (regcache_xmalloc): Call new regcache.
7289         (regcache_xfree): Call delete regcache.
7290         (get_thread_arch_aspace_regcache): Call new regcache.
7291
7292 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7293
7294         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7295         lwp instead of ptid_get_lwp.
7296
7297 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7298
7299         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7300         lwp_info instead of getting from inferior_ptid.
7301
7302 2017-04-27  Keith Seitz  <keiths@redhat.com>
7303
7304         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7305         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7306         (CV_CONVERSION_BADNESS): Define.
7307         (rank_one_type): Remove overly restrictive rvalue reference
7308         rank checks.
7309         Add cv-qualifier checks and subranks for type equality.
7310         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7311         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7312         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7313
7314 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7315
7316         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7317         count when creating the object.
7318
7319 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7320             Ulrich Weigand  <uweigand@de.ibm.com>
7321
7322         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7323         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7324         is used in AIX.
7325         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7326         (process_xcoff_symbol): Likewise.
7327         (scan_xcoff_symtab): Likewise.
7328
7329 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7330
7331         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7332         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7333         (ia64_access_reg): Use get_frame_register_unsigned.
7334         (ia64_access_rse_reg): Likewise.
7335         (ia64_libunwind_frame_prev_register): Likewise.
7336
7337 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7338
7339         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7340         * gdbarch.c: Regenerated.
7341         * gdbarch.h: Regenerated.
7342         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7343         visibility external.
7344         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7345         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7346         (enum cfa_how_kind): Move to ...
7347         (struct dwarf2_frame_state_reg_info): Likewise.
7348         (struct dwarf2_frame_state): Likewise.
7349         * dwarf2-frame.h: ... here.
7350         (dwarf2_frame_state_alloc_regs): New declaration.
7351         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7352         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7353
7354 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7355
7356         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7357         regcache_raw_read_unsigned.
7358         (xtensa_pseudo_register_write): Likewise.
7359
7360 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7361
7362         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7363         (nds32_pseudo_register_write): Likewise.
7364
7365 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7366
7367         * regcache.c (struct regcache) <readonly_p>: Change its type
7368         to bool.
7369         (regcache_xmalloc_1): Update parameter type and callers update.
7370
7371 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7372
7373         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7374         set_gdbarch_wchar_bit.
7375         * arm-tdep.c (arm_gdbarch_init): Likewise.
7376
7377 2017-04-25  Pedro Alves  <palves@redhat.com>
7378
7379         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7380         (BothAreRelocatable, memcopy, memmove): Don't define.
7381         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7382         macros.
7383
7384 2017-04-25  Pedro Alves  <palves@redhat.com>
7385
7386         * common/common-defs.h: Include "common/poison.h".
7387         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7388         and adjust.
7389         * common/poison.h: New file.
7390         * common/traits.h: Include <type_traits>.
7391         (Not, Or, Requires): New, moved from common/function-view.h.
7392
7393 2017-04-25  Pedro Alves  <palves@redhat.com>
7394
7395         * breakpoint.h (struct breakpoint): In-class initialize all
7396         fields.  Make boolean fields "bool".
7397         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7398         memset call and initializations no longer necessary.
7399
7400 2017-04-25  Pedro Alves  <palves@redhat.com>
7401
7402         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7403         reference.
7404         (pt_btrace_insn): New function.
7405         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7406
7407 2017-04-25  Pedro Alves  <palves@redhat.com>
7408
7409         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7410         "base" field and inherit from "bp_location" instead.  Add
7411         non-default ctor.
7412         (allocate_location_exception): Use new non-default ctor.
7413         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7414         (init_bp_location): Convert to ...
7415         (bp_location::bp_location): ... this new ctor, and remove memset
7416         call.
7417         (base_breakpoint_allocate_location): Use the new non-default ctor.
7418         * breakpoint.h (bp_location): Now a class.  Declare default and
7419         non-default ctors.  In-class initialize all members.
7420         (init_bp_location): Remove declaration.
7421
7422 2017-04-25  Pedro Alves  <palves@redhat.com>
7423
7424         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7425         assignment operator.
7426
7427 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7428
7429         * doublest.c (convert_doublest_to_floatformat): Call
7430         floatformat_totalsize_bytes.
7431
7432 2017-04-22  Tom Tromey  <tom@tromey.com>
7433
7434         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7435         ui_out_emit_list.
7436         * stack.c (print_frame): Use ui_out_emit_list.
7437         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7438         ui_out_emit_list.
7439         * mi/mi-main.c (print_one_inferior)
7440         (mi_cmd_data_list_register_names)
7441         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7442         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7443         ui_out_emit_list.
7444         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7445         (mi_output_solib_attribs): Use ui_out_emit_list,
7446         ui_out_emit_tuple.
7447         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7448         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7449         (mi_cmd_stack_list_args, list_args_or_locals): Use
7450         ui_out_emit_list.
7451         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7452         * breakpoint.c (print_solib_event, output_thread_groups): Use
7453         ui_out_emit_list.
7454
7455 2017-04-22  Tom Tromey  <tom@tromey.com>
7456
7457         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7458         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7459         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7460
7461 2017-04-22  Tom Tromey  <tom@tromey.com>
7462
7463         * tracepoint.c (tvariables_info_1)
7464         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7465
7466 2017-04-22  Tom Tromey  <tom@tromey.com>
7467
7468         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7469         annotate_arg_emitter.
7470         * breakpoint.c (print_mention_watchpoint)
7471         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7472         * annotate.h (struct annotate_arg_emitter): New.
7473
7474 2017-04-22  Tom Tromey  <tom@tromey.com>
7475
7476         * record-btrace.c (record_btrace_insn_history)
7477         (record_btrace_insn_history_range, record_btrace_call_history)
7478         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7479         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7480         ui_out_emit_tuple.
7481         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7482         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7483         * skip.c (skip_info): Use ui_out_emit_tuple.
7484         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7485         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7486         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7487         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7488         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7489         ui_out_emit_tuple.
7490         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7491         (output_register, mi_cmd_data_read_memory)
7492         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7493         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7494         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7495         Use ui_out_emit_tuple.
7496         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7497         ui_out_emit_tuple.
7498         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7499         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7500         * linux-thread-db.c (info_auto_load_libthread_db): Use
7501         ui_out_emit_tuple.
7502         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7503         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7504         * disasm.c (do_mixed_source_and_assembly_deprecated)
7505         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7506         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7507         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7508         * breakpoint.c (print_one_breakpoint_location)
7509         (print_one_breakpoint): Use ui_out_emit_tuple.
7510         * auto-load.c (print_script, info_auto_load_cmd): Use
7511         ui_out_emit_tuple.
7512         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7513
7514 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
7515
7516         * thread.c (print_thread_info_1): Remove dead code.
7517
7518 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7519
7520         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7521         GDB_SELF_TEST.
7522         * arm-tdep.c (selftests::arm_record_test): Likewise.
7523
7524 2017-04-21  Yao Qi  <yao.qi@linaro.org>
7525
7526         * regcache.c (regcache_restore): Remove argument 2.  Replace
7527         argument 3 with regcache.  Get register status from
7528         src->register_status and get register contents from
7529         register_buffer (src, regnum).
7530         (regcache_cpy): Update.
7531
7532 2017-04-19  Pedro Alves  <palves@redhat.com>
7533
7534         * gdbthread.h (thread): Add missing closing parenthesis in
7535         comment.
7536
7537 2017-04-19  Pedro Alves  <palves@redhat.com>
7538
7539         * common/refcounted-object.h: New file.
7540         * gdbthread.h: Include "common/refcounted-object.h".
7541         (thread_info): Inherit from refcounted_object and add comments.
7542         (thread_info::incref, thread_info::decref)
7543         (thread_info::m_refcount): Delete.
7544         (thread_info::deletable): Use the refcounted_object::refcount()
7545         method.
7546         * inferior.c (current_inferior_): Add comment.
7547         (set_current_inferior): Increment/decrement refcounts.
7548         (prune_inferiors, remove_inferior_command): Skip inferiors marked
7549         not-deletable instead of comparing with the current inferior.
7550         (initialize_inferiors): Increment the initial inferior's refcount.
7551         * inferior.h (struct inferior): Forward declare.
7552         Include "common/refcounted-object.h".
7553         (current_inferior, set_current_inferior): Move declaration to
7554         before struct inferior's definition, and fix comment.
7555         (inferior): Inherit from refcounted_object.  Add comments.
7556         * thread.c (switch_to_thread_no_regs): Reference the thread's
7557         inferior pointer directly instead of doing a ptid lookup.
7558         (switch_to_no_thread): New function.
7559         (switch_to_thread(thread_info *)): New function, factored out
7560         from ...
7561         (switch_to_thread(ptid_t)): ... this.
7562         (restore_current_thread): Delete.
7563         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7564         fields, and add 'inf' field.
7565         (do_restore_current_thread_cleanup): Check whether old->inf is
7566         alive instead of looking up an inferior by ptid.  Use
7567         switch_to_thread and switch_to_no_thread.
7568         (restore_current_thread_cleanup_dtor): Use old->inf directly
7569         instead of lookup up an inferior by id.  Decref the inferior.
7570         Don't restore 'removable'.
7571         (make_cleanup_restore_current_thread): Same the inferior pointer
7572         in old, instead of the inferior number.  Incref the inferior.
7573         Don't save/clear 'removable'.
7574
7575 2017-04-19  Pedro Alves  <palves@redhat.com>
7576
7577         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7578         unittests/scoped_restore-selftests.c.
7579         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7580         * common/scoped_restore.h (scoped_restore_base): Make "class".
7581         (scoped_restore_base::release): New public method.
7582         (scoped_restore_base::scoped_restore_base): New protected ctor.
7583         (scoped_restore_base::m_saved_var): New protected field.
7584         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7585         scoped_restore_base base class instead of m_saved_var directly.
7586         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7587         (scoped_restore_tmpl::scoped_restore_tmpl(const
7588         scoped_restore_tmpl<T>&)): Likewise.
7589         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7590         method.
7591         (scoped_restore_tmpl::saved_var): New method.
7592         (scoped_restore_tmpl::m_saved_var): Delete.
7593         * inferior.h (inferior::detaching): Now a bool.
7594         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7595         cleanup.
7596         * unittests/scoped_restore-selftests.c: New file.
7597
7598 2017-04-19  Pedro Alves  <palves@redhat.com>
7599
7600         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7601         Re-sort in alphabetic order.
7602
7603 2017-04-18  Pedro Alves  <palves@redhat.com>
7604
7605         * xml-support.c (obstack_xml_printf): Delete.
7606         * xml-support.h (obstack_xml_printf): Delete.
7607
7608 2017-04-18  Pedro Alves  <palves@redhat.com>
7609
7610         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7611         vdebug, verror, body_text, start_element, end_element, name,
7612         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7613         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7614         is_xinclude>: Make private and add m_ prefix.
7615         (gdb_xml_parser::body_text): New method, based on ...
7616         (gdb_xml_body_text): ... this.  Adjust.
7617         (gdb_xml_parser::vdebug): New method, based on ...
7618         (gdb_xml_debug): ... this.  Adjust.
7619         (gdb_xml_parser::verror): New method, based on ...
7620         (gdb_xml_error): ... this.  Adjust.
7621         (gdb_xml_parser::start_element): New method, based on ...
7622         (gdb_xml_start_element): ... this.  Adjust.
7623         (gdb_xml_start_element_wrapper): Defer to
7624         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7625         (gdb_xml_parser::end_element): New method, based on ...
7626         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7627         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7628         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7629         (gdb_xml_parser::use_dtd): New method, based on ...
7630         (gdb_xml_use_dtd): ... this.  Adjust.
7631         (gdb_xml_parser::parse): New method, based on ...
7632         (gdb_xml_parse): ... this.  Adjust.
7633         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7634         (xinclude_start_include): Adjust to call the parser's name method.
7635         (xml_xinclude_default, xml_xinclude_start_doctype)
7636         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7637         method.
7638         (xml_process_xincludes): Adjust to call parser methods.
7639         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7640         declarations.
7641
7642 2017-04-18  Pedro Alves  <palves@redhat.com>
7643
7644         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7645         gdb::optional<std::string>.
7646         * xml-support.c: Include <string>.
7647         (scope_level::scope_level(scope_level &&))
7648         (scope_level::~scope_level): Delete.
7649         (scope_level::body): Now a std::string.
7650         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7651         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7652         parameter.
7653         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7654         (xinclude_parsing_data::output): Now a std::string reference.
7655         (xinclude_start_include): Adjust.
7656         (xml_xinclude_default): Adjust.
7657         (xml_process_xincludes): Add 'output' parameter, and return bool.
7658         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7659         and return bool.
7660         * xml-tdesc.c: Include <unordered_map> and <string>.
7661         (tdesc_xml_cache): Delete.
7662         (tdesc_xml_cache_s): Delete.
7663         (xml_cache): Now an std::unordered_map.
7664         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7665         (target_fetch_description_xml): Change return type to
7666         gdb::optional<std::string>, and adjust.
7667         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7668         (target_fetch_description_xml): Change return type to
7669         gdb::optional<std::string>.
7670
7671 2017-04-18  Pedro Alves  <palves@redhat.com>
7672
7673         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7674         unittests/optional-selftests.c.
7675         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7676         * unittests/optional-selftests.c: New file.
7677         * unittests/optional/assignment/1.cc: New file.
7678         * unittests/optional/assignment/2.cc: New file.
7679         * unittests/optional/assignment/3.cc: New file.
7680         * unittests/optional/assignment/4.cc: New file.
7681         * unittests/optional/assignment/5.cc: New file.
7682         * unittests/optional/assignment/6.cc: New file.
7683         * unittests/optional/assignment/7.cc: New file.
7684         * unittests/optional/cons/copy.cc: New file.
7685         * unittests/optional/cons/default.cc: New file.
7686         * unittests/optional/cons/move.cc: New file.
7687         * unittests/optional/cons/value.cc: New file.
7688         * unittests/optional/in_place.cc: New file.
7689         * unittests/optional/observers/1.cc: New file.
7690         * unittests/optional/observers/2.cc: New file.
7691
7692 2017-04-18  Pedro Alves  <palves@redhat.com>
7693
7694         * common/gdb_optional.h: Include common/traits.h.
7695         (in_place_t): New type.
7696         (in_place): New constexpr variable.
7697         (optional::optional): Remove member initialization of
7698         m_instantiated.
7699         (optional::optional(in_place_t...)): New constructor.
7700         (optional::~optional): Use reset.
7701         (optional::optional(const optional&)): New.
7702         (optional::optional(const optional&&)): New.
7703         (optional::optional(T &)): New.
7704         (optional::optional(T &&)): New.
7705         (operator::operator=(const optional &)): New.
7706         (operator::operator=(optional &&)): New.
7707         (operator::operator= (const T &))
7708         (operator::operator= (T &&))
7709         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7710         (operator::reset): New.
7711         (operator::m_instantiated):: Add in-class initializer.
7712         * common/traits.h: Include <type_traits>.
7713         (struct And): New types.
7714
7715 2017-04-18  Pedro Alves  <palves@redhat.com>
7716
7717         * xml-support.c: Include <vector>.
7718         (scope_level::scope_level(const gdb_xml_element *))
7719         (scope_level::scope_level(scope_level&&)): New.
7720         (scope_level::~scope_level): New.
7721         (scope_level_s): Delete.
7722         (gdb_xml_parser::scopes): Now a std::vector.
7723         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7724         Use std::vector.
7725         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7726         scope cleanup code.
7727         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7728         of the scopes member.  Use std::vector::emplace_back.
7729
7730 2017-04-18  Pedro Alves  <palves@redhat.com>
7731
7732         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7733         a bool.
7734         (gdb_xml_end_element): Change type of first parameter.
7735         (gdb_xml_cleanup): Rename to ...
7736         (gdb_xml_parser::~gdb_xml_parser): ... this.
7737         (gdb_xml_create_parser_and_cleanup): Delete with ...
7738         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7739         to this new ctor.
7740         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7741         using gdb_xml_create_parser_and_cleanup.
7742         (xinclude_parsing_data): Add ctor/dtor.
7743         (xml_xinclude_cleanup): Delete.
7744         (xml_process_xincludes): Create a local xinclude_parsing_data
7745         instead of heap-allocating one.  Create a local gdb_xml_parser
7746         instead of heap-allocating one with
7747         gdb_xml_create_parser_and_cleanup.
7748
7749 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7750
7751         PR threads/20743
7752         * fbsd-nat.c (resume_one_thread_cb): Remove.
7753         (resume_all_threads_cb): Remove.
7754         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7755         iterate_over_threads.
7756
7757 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7758
7759         * NEWS: Create a new section for the next release branch.
7760         Rename the section of the current branch, now that it has
7761         been cut.
7762
7763 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7764
7765         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7766         * version.in: Bump version to 8.0.50.DATE-git.
7767
7768 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7769
7770         PR gdb/21385
7771         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7772         independently of the host, and fix build breakage on Cygwin.
7773
7774 2017-04-13  Pedro Alves  <palves@redhat.com>
7775
7776         * inferior.c (free_inferior): Convert to ...
7777         (inferior::~inferior): ... this dtor.
7778         (inferior::inferior): New ctor, factored out from ...
7779         (add_inferior_silent): ... here.  Allocate the inferior with a new
7780         expression.
7781         (delete_inferior): Call delete instead of free_inferior.
7782         * inferior.h (gdb_environ, continuation): Forward declare.
7783         (inferior): Now a class.  Add in-class initialization to all
7784         members.  Make boolean fields bool, except 'detaching'.
7785         (inferior::inferior): New explicit ctor.
7786         (inferior::~inferior): New.
7787
7788 2017-04-13  Pedro Alves  <palves@redhat.com>
7789
7790         * inferior.c (init_inferior_list): Delete.
7791         * inferior.h (init_inferior_list): Delete.
7792
7793 2017-04-13  Pedro Alves  <palves@redhat.com>
7794
7795         PR threads/13217
7796         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7797         (top level): Call it twice, with different thread sets.
7798
7799 2017-04-13  Pedro Alves  <palves@redhat.com>
7800
7801         * thread.c: Include <algorithm>.
7802         (thread_array_cleanup): Delete.
7803         (scoped_inc_dec_ref): New class.
7804         (live_threads_count): New function.
7805         (set_thread_refcount): Delete.
7806         (tp_array_compar_ascending): Now a bool.
7807         (tp_array_compar): Convert to a std::sort comparison function.
7808         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7809         and live_threads_count.
7810
7811 2017-04-13  Pedro Alves  <palves@redhat.com>
7812
7813         * infrun.c (follow_fork_inferior): Also switch the current
7814         inferior.
7815
7816 2017-04-13  Pedro Alves  <palves@redhat.com>
7817
7818         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7819         before calling create_internal_breakpoint.
7820
7821 2017-04-13  Pedro Alves  <palves@redhat.com>
7822
7823         * fork-child.c (execv_argv): New class.
7824         (breakup_args): Refactored as ...
7825         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7826         Copy arguments to storage and replace separators with NULL
7827         terminators in place.
7828         (escape_bang_in_quoted_argument): Adjust to return bool.
7829         (execv_argv::execv_argv): New ctor.
7830         (execv_argv::init_for_shell): New method, factored out from
7831         fork_inferior.  Don't strdup strings into the vector.
7832         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7833         Remove free_vector_argv call.
7834
7835 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7836
7837         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7838         tdep->rx_psw_type.
7839
7840 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7841
7842         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7843         * rx-tdep.c (rx_gdbarch_init): Likewise.
7844
7845 2017-04-13  Pedro Alves  <palves@redhat.com>
7846
7847         * breakpoint.h (struct breakpoint): Reindent.
7848
7849 2017-04-13  Pedro Alves  <palves@redhat.com>
7850
7851         * breakpoint.c (bp_location): Rename to ...
7852         (bp_locations): ... this.  All references updated.
7853         (bp_location_count): Rename to ...
7854         (bp_locations_count): ... this.  All references updated.
7855         (bp_location_placed_address_before_address_max): Rename to ...
7856         (bp_locations_placed_address_before_address_max): ... this.  All
7857         references updated.
7858         (bp_location_shadow_len_after_address_max): Rename to ...
7859         (bp_locations_shadow_len_after_address_max): ... this.  All
7860         references updated.
7861         (bp_location_compare_addrs): Rename to ...
7862         (bp_locations_compare_addrs): ... this.  All references updated.
7863         (bp_location_compare):Rename to ...
7864         (bp_locations_compare): ... this.  All references updated.
7865         (bp_location_target_extensions_update): Rename to ...
7866         (bp_locations_target_extensions_update): ... this.  All references
7867         updated.
7868
7869 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7870
7871         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7872         * common/common.m4: Check headers 'termios.h', 'termio.h' and
7873         'sgtty.h'.
7874         * common/gdb_termios.h: New file, with parts of "terminal.h".
7875         * inflow.c: Include "gdb_termios.h".
7876         * ser-unix.c: Include "gdb_termios.h".
7877         * terminal.h: Move terminal-related defines to
7878         "common/gdb_termios.h".
7879
7880 2017-04-12  Tom Tromey  <tom@tromey.com>
7881
7882         * probe.c (parse_probes): Update.
7883         * location.h (delete_event_location): Don't declare.
7884         (event_location_deleter::operator()): Update.
7885         * location.c (event_location_deleter::operator()): Rename from
7886         delete_event_location.
7887         * linespec.h (linespec_result) <location>: Change type to
7888         event_location_up.
7889         * linespec.c (canonicalize_linespec, event_location_to_sals)
7890         (decode_objc): Update.
7891         (linespec_result): Don't call delete_event_location.
7892         * breakpoint.c (create_breakpoints_sal)
7893         (bkpt_probe_create_sals_from_location)
7894         (strace_marker_create_sals_from_location): Update.
7895
7896 2017-04-12  Tom Tromey  <tom@tromey.com>
7897
7898         * linespec.h (struct linespec_result): Add constructor and
7899         destructor.
7900         (init_linespec_result, destroy_linespec_result)
7901         (make_cleanup_destroy_linespec_result): Don't declare.
7902         * linespec.c (init_linespec_result): Remove.
7903         (linespec_result::~linespec_result): Rename from
7904         destroy_linespec_result.  Update.
7905         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7906         Remove.
7907         * breakpoint.c (create_breakpoint, break_range_command)
7908         (decode_location_default): Update.
7909         * ax-gdb.c (agent_command_1): Update.
7910
7911 2017-04-12  Tom Tromey  <tom@tromey.com>
7912
7913         * remote.c (remote_download_tracepoint): Update.
7914         * python/py-breakpoint.c (bppy_get_location): Update.
7915         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7916         (gdbscm_breakpoint_location): Update.
7917         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7918         * breakpoint.h (struct breakpoint) <location, location_range_end>:
7919         Change type to event_location_up.
7920         * breakpoint.c (create_overlay_event_breakpoint)
7921         (create_longjmp_master_breakpoint)
7922         (create_std_terminate_master_breakpoint)
7923         (create_exception_master_breakpoint)
7924         (breakpoint_event_location_empty_p, print_breakpoint_location)
7925         (print_one_breakpoint_location, create_thread_event_breakpoint)
7926         (init_breakpoint_sal, create_breakpoint)
7927         (print_recreate_ranged_breakpoint, break_range_command)
7928         (init_ada_exception_breakpoint, say_where): Update.
7929         (base_breakpoint_dtor): Don't call delete_event_location.
7930         (bkpt_print_recreate, tracepoint_print_recreate)
7931         (dprintf_print_recreate, update_static_tracepoint)
7932         (breakpoint_re_set_default): Update.
7933
7934 2017-04-12  Tom Tromey  <tom@tromey.com>
7935
7936         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7937         type of "to_do".  Update.
7938         (compute_stack_depth): Use std::vector.
7939
7940 2017-04-12  Tom Tromey  <tom@tromey.com>
7941
7942         * printcmd.c (find_instruction_backward): Use std::vector.
7943
7944 2017-04-12  Tom Tromey  <tom@tromey.com>
7945
7946         * symfile.c (objfilep): Remove typedef.
7947         (reread_symbols): Use a std::vector.
7948
7949 2017-04-12  Tom Tromey  <tom@tromey.com>
7950
7951         * mi/mi-main.c (exec_direction_forward): Remove.
7952         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7953         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7954         scoped_restore.
7955         * guile/guile.c (guile_repl_command, guile_command)
7956         (gdbscm_execute_gdb_command): Use scoped_restore.
7957         * go-exp.y (go_parse): Use scoped_restore.
7958         * d-exp.y (d_parse): Use scoped_restore.
7959         * cli/cli-decode.c (cmd_func): Use scoped_restore.
7960         * c-exp.y (c_parse): Use scoped_restore.
7961
7962 2017-04-12  Tom Tromey  <tom@tromey.com>
7963
7964         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7965         (mi_parse): Update return type.
7966         (mi_parse_free): Remove.
7967         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7968         (mi_parse::~mi_parse): Rename from mi_parse_free.
7969         (mi_parse_cleanup): Remove.
7970         (mi_parse): Return a unique_ptr.  Use new.
7971         * mi/mi-main.c (mi_execute_command): Update.
7972
7973 2017-04-12  Tom Tromey  <tom@tromey.com>
7974
7975         * location.c (explicit_location_lex_one): Return a
7976         unique_xmalloc_ptr.
7977         (string_to_explicit_location): Update.  Remove cleanups.
7978
7979 2017-04-12  Tom Tromey  <tom@tromey.com>
7980
7981         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7982         (compare_value_and_voffset): Change type.  Update.
7983         (compute_vtable_size): Change type of "offset_vec".
7984         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
7985         (gnuv3_get_typeid): Remove extraneous declaration.
7986
7987 2017-04-12  Tom Tromey  <tom@tromey.com>
7988
7989         * charset.h (wchar_iterator): Fix comment.
7990
7991 2017-04-12  Tom Tromey  <tom@tromey.com>
7992
7993         * charset.c (iconv_wrapper): New class.
7994         (cleanup_iconv): Remove.
7995         (convert_between_encodings): Use it.
7996
7997 2017-04-12  Tom Tromey  <tom@tromey.com>
7998
7999         * symfile.h (increment_reading_symtab): Update type.
8000         * symfile.c (decrement_reading_symtab): Remove.
8001         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8002         * psymtab.c (psymtab_to_symtab): Update.
8003         * dwarf2read.c (dw2_instantiate_symtab): Update.
8004
8005 2017-04-12  Tom Tromey  <tom@tromey.com>
8006
8007         * jit.c (struct jit_reader): Declare separately.  Add constructor
8008         and destructor.  Change type of "handle".
8009         (loaded_jit_reader): Define separately.
8010         (jit_reader_load): Update.  New "new".
8011         (jit_reader_unload_command): Use "delete".
8012         * gdb-dlfcn.h (struct dlclose_deleter): New.
8013         (gdb_dlhandle_up): New typedef.
8014         (gdb_dlopen, gdb_dlsym): Update types.
8015         (gdb_dlclose): Remove.
8016         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8017         (gdb_dlsym): Change type of "handle".
8018         (make_cleanup_dlclose): Remove.
8019         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8020         * compile/compile-c-support.c (load_libcc): Update.
8021
8022 2017-04-12  Tom Tromey  <tom@tromey.com>
8023
8024         * symtab.h (find_pcs_for_symtab_line): Change return type.
8025         * symtab.c (find_pcs_for_symtab_line): Change return type.
8026         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8027         type of "vec".  Update.
8028         (ltpy_get_pcs_for_line): Update.
8029         * linespec.c (decode_digits_ordinary): Update.
8030
8031 2017-04-12  Tom Tromey  <tom@tromey.com>
8032
8033         * tracepoint.c (actions_command): Update.
8034         * python/python.c (python_command, python_interactive_command):
8035         Update.
8036         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8037         * guile/guile.c (guile_command): Update.
8038         * defs.h (read_command_lines, read_command_lines_1): Return
8039         command_line_up.
8040         (command_lines_deleter): New struct.
8041         (command_line_up): New typedef.
8042         * compile/compile.c (compile_code_command)
8043         (compile_print_command): Update.
8044         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8045         command_line_up.
8046         (make_cleanup_free_command_lines): Remove.
8047         * cli/cli-script.c (get_command_line, read_command_lines_1)
8048         (copy_command_lines): Return command_line_up.
8049         (while_command, if_command, read_command_lines, define_command)
8050         (document_command): Update.
8051         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8052         Remove.
8053         * breakpoint.h (breakpoint_set_commands): Change type of
8054         "commands".
8055         * breakpoint.c (breakpoint_set_commands): Change type of
8056         "commands".  Update.
8057         (do_map_commands_command, update_dprintf_command_list)
8058         (create_tracepoint_from_upload): Update.
8059
8060 2017-04-12  Tom Tromey  <tom@tromey.com>
8061
8062         * tracepoint.c (scope_info): Update.
8063         * spu-tdep.c (spu_catch_start): Update.
8064         * python/python.c (gdbpy_decode_line): Update.
8065         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8066         * python/py-breakpoint.c (bppy_init): Update.
8067         * probe.c (parse_probes): Update.
8068         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8069         * location.h (event_location_deleter): New struct.
8070         (event_location_up): New typedef.
8071         (new_linespec_location, new_address_location, new_probe_location)
8072         (new_explicit_location, copy_event_location)
8073         (string_to_event_location, string_to_event_location_basic)
8074         (string_to_explicit_location): Update return type.
8075         (make_cleanup_delete_event_location): Remove.
8076         * location.c (new_linespec_location, new_address_location)
8077         (new_probe_location, new_explicit_location, copy_event_location):
8078         Return event_location_up.
8079         (delete_event_location_cleanup)
8080         (make_cleanup_delete_event_location): Remove.
8081         (string_to_explicit_location, string_to_event_location_basic)
8082         (string_to_event_location): Return event_location_up.
8083         * linespec.c (canonicalize_linespec, event_location_to_sals)
8084         (decode_line_with_current_source)
8085         (decode_line_with_last_displayed, decode_objc): Update.
8086         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8087         * completer.c (location_completer): Update.
8088         * cli/cli-cmds.c (edit_command, list_command): Update.
8089         * breakpoint.c (create_overlay_event_breakpoint)
8090         (create_longjmp_master_breakpoint)
8091         (create_std_terminate_master_breakpoint)
8092         (create_exception_master_breakpoint)
8093         (create_thread_event_breakpoint): Update.
8094         (init_breakpoint_sal): Update.  Remove some dead code.
8095         (create_breakpoint_sal): Change type of "location".  Update.
8096         (create_breakpoints_sal, create_breakpoint, break_command_1)
8097         (dprintf_command, break_range_command, until_break_command)
8098         (init_ada_exception_breakpoint)
8099         (strace_marker_create_sals_from_location)
8100         (update_static_tracepoint, trace_command, ftrace_command)
8101         (strace_command, create_tracepoint_from_upload): Update.
8102         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8103         * ax-gdb.c (agent_command_1): Update.
8104
8105 2017-04-12  Pedro Alves  <palves@redhat.com>
8106
8107         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8108         * configure.tgt: Handle i[34567]86-*-go32* and
8109         i[34567]86-*-msdosdjgpp*.
8110         * i386-tdep.c (i386_svr4_reg_to_regnum):
8111         Make extern.
8112         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8113         i386-go32-tdep.c.
8114         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8115         * i386-go32-tdep.c: New file.
8116         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8117         declarations.
8118
8119 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8120
8121         * aix-thread.c (pd_status2str): Change return type to const char *.
8122
8123 2017-04-12  Pedro Alves  <palves@redhat.com>
8124
8125         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8126         calls to set_gdbarch_gnu_triplet_regexp.
8127
8128 2017-04-12  Pedro Alves  <palves@redhat.com>
8129
8130         PR gdb/21323
8131         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8132         New enum value.
8133         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8134         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8135         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8136         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8137         * gdbarch.h, gdbarch.c: Regenerate.
8138         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8139         gdbarch_wchar_bit and gdbarch_wchar_signed.
8140         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8141         * arm-tdep.c (arm_gdbarch_init): Likewise.
8142         * avr-tdep.c (avr_gdbarch_init): Likewise.
8143         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8144         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8145         * i386-tdep.c (i386_go32_init_abi): Likewise.
8146         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8147         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8148         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8149         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8150         * sh-tdep.c (sh_gdbarch_init): Likewise.
8151         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8152         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8153         * windows-tdep.c (windows_init_abi): Likewise.
8154         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8155
8156 2017-04-12  Pedro Alves  <palves@redhat.com>
8157
8158         PR c++/21323
8159         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8160         cplus_primitive_type_char32_t>: New enum values.
8161         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8162         and cplus_primitive_type_char32_t.
8163         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8164         32, use the archtecture's built-in type for char16_t and char32_t,
8165         respectively.  Otherwise, fallback to init_integer_type as before,
8166         but make the type unsigned, and issue a complaint.
8167         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8168
8169 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8170
8171         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8172         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8173
8174 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8175
8176         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8177         'const char *'.
8178
8179 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8180
8181         * common/common-utils.c (free_vector_argv): New function.
8182         * common/common-utils.h: Include <vector>.
8183         (free_vector_argv): New prototype.
8184         * darwin-nat.c (darwin_create_inferior): Rewrite function
8185         prototype in order to constify "exec_file" and accept a
8186         "std::string" for "allargs".
8187         * fork-child.c: Include <vector>.
8188         (breakup_args): Rewrite function, using C++.
8189         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8190         and accept "std::string" for "allargs".  Update the code to
8191         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8192         and "execvp".
8193         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8194         order to constify "exec_file" and accept a "std::string" for
8195         "allargs".
8196         * go32-nat.c (go32_create_inferior): Likewise.
8197         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8198         * infcmd.c (run_command_1): Constify "exec_file".  Use
8199         "std::string" for inferior arguments.
8200         * inferior.h (fork_inferior): Update prototype.
8201         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8202         prototype in order to constify "exec_file" and accept a
8203         "std::string" for "allargs".
8204         * nto-procfs.c (procfs_create_inferior): Likewise.
8205         * procfs.c (procfs_create_inferior): Likewise.
8206         * remote-sim.c (gdbsim_create_inferior): Likewise.
8207         * remote.c (extended_remote_run): Update code to accept
8208         "std::string" as argument.
8209         (extended_remote_create_inferior): Rewrite function prototype in
8210         order to constify "exec_file" and accept a "std::string" for
8211         "allargs".
8212         * rs6000-nat.c (super_create_inferior): Likewise.
8213         (rs6000_create_inferior): Likewise.
8214         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8215         * windows-nat.c (windows_create_inferior): Likewise.
8216
8217 2017-04-11  Pedro Alves  <palves@redhat.com>
8218
8219         * thread.c: Fix whitespace throughout.
8220
8221 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8222
8223         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8224
8225 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8226
8227         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8228
8229 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8230
8231         PR gdb/21364
8232         * osdata.c (info_osdata): Check if 'type' is an empty string
8233         instead of NULL.
8234
8235 2017-04-10  Pedro Alves  <palves@redhat.com>
8236
8237         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8238         (ptid_to_global_thread_id, in_thread_list)
8239         (do_captured_list_thread_ids, set_resumed, set_running)
8240         (set_executing, set_stop_requested, finish_thread_state)
8241         (validate_registers_access, can_access_registers_ptid)
8242         (print_thread_info_1, switch_to_thread)
8243         (do_restore_current_thread_cleanup)
8244         (make_cleanup_restore_current_thread, thread_command)
8245         (thread_name_command): Use operator== instead of ptid_equal.
8246
8247 2017-04-10  Pedro Alves  <palves@redhat.com>
8248
8249         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8250         (current_thread_cleanup_chain): Delete.
8251         (restore_current_thread_cleanup_dtor)
8252         (make_cleanup_restore_current_thread): Remove references to
8253         current_thread_cleanup_chain.
8254
8255 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8256
8257         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8258         REG_UNKNOWN.
8259
8260 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8261
8262         PR gdb/19942
8263         * gdbthread.h (thread_info::deletable): New method.
8264         (thread_info::incref): New method.
8265         (thread_info::decref): New method.
8266         (thread_info::refcount): Move it to private.
8267         * infrun.c (save_stop_context): Call inc_refcount.
8268         (release_stop_context_cleanup): Likewise.
8269         * thread.c (set_thread_exited): New function.
8270         (init_thread_list): Delete "tp" only it is deletable, otherwise
8271         call set_thread_exited.
8272         (delete_thread_1): Call set_thread_exited.
8273         (current_thread_cleanup) <inferior_pid>: Remove.
8274         <thread>: New field.
8275         (restore_current_thread_ptid_changed): Removed.
8276         (do_restore_current_thread_cleanup): Adjust.
8277         (restore_current_thread_cleanup_dtor): Don't call
8278         find_thread_ptid.
8279         (set_thread_refcount): Use dec_refcount.
8280         (make_cleanup_restore_current_thread): Adjust.
8281         (thread_apply_all_command): Call inc_refcount.
8282         (_initialize_thread): Don't call
8283         observer_attach_thread_ptid_changed.
8284
8285 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8286
8287         * thread.c (delete_thread_1): Hoist code on marking thread as
8288         exited.
8289
8290 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8291
8292         * windows-nat.c (windows_detach): Initialize ptid with
8293         minus_one_ptid.
8294
8295 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8296
8297         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8298
8299 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8300
8301         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8302         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8303         (bfin_pseudo_register_write): Likewise
8304
8305 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8306
8307         * common/ptid.h (struct ptid): Change to...
8308         (class ptid_t): ... this.
8309         <ptid_t>: New constructors.
8310         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8311         matches>: New methods.
8312         <make_null, make_minus_one>: New static methods.
8313         <pid>: Rename to...
8314         <m_pid>: ...this.
8315         <lwp>: Rename to...
8316         <m_lwp>: ...this.
8317         <tid>: Rename to...
8318         <m_tid>: ...this.
8319         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8320         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8321         as references, move comment to class ptid_t.
8322         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8323         ptid_t static methods.
8324         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8325         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8326         Take ptid arguments as references, implement using ptid_t methods.
8327         * unittests/ptid-selftests.c: New file.
8328         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8329         unittests/ptid-selftests.c.
8330         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8331
8332 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8333
8334         * python/python.c (python_run_simple_file): Cast mode literal to
8335         non-const char pointer as expected by PyFile_FromString.
8336
8337 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8338
8339         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8340         minus_one_ptid and null_ptid.
8341
8342 2017-04-05  Pedro Alves  <palves@redhat.com>
8343
8344         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8345         * configure: Regenerate.
8346
8347 2017-04-05  Pedro Alves  <palves@redhat.com>
8348
8349         * ada-exp.y (yyerror): Constify.
8350         * ada-lang.c (bound_name, get_selections)
8351         (ada_variant_discrim_type)
8352         (ada_variant_discrim_name, ada_value_struct_elt)
8353         (ada_lookup_struct_elt_type, is_unchecked_variant)
8354         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8355         (catch_ada_exception_command_split)
8356         (catch_ada_assert_command_split, catch_assert_command)
8357         (ada_op_name): Constify.
8358         * ada-lang.h (ada_yyerror, get_selections)
8359         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8360         * arc-tdep.c (arc_print_frame_cache): Constify.
8361         * arm-tdep.c (arm_skip_stub): Constify.
8362         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8363         (gen_aggregate_elt_ref): Constify.
8364         * bcache.c (print_bcache_statistics): Constify.
8365         * bcache.h (print_bcache_statistics): Constify.
8366         * break-catch-throw.c (catch_exception_command_1):
8367         * breakpoint.c (struct ep_type_description::description):
8368         Constify.
8369         (add_solib_catchpoint): Constify.
8370         (catch_fork_command_1): Add cast.
8371         (add_catch_command): Constify.
8372         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8373         Constify.
8374         * bsd-uthread.c (bsd_uthread_state): Constify.
8375         * buildsym.c (patch_subfile_names): Constify.
8376         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8377         Constify.
8378         * c-exp.y (yyerror): Constify.
8379         (token::oper): Constify.
8380         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8381         * c-varobj.c (cplus_describe_child): Constify.
8382         * charset.c (find_charset_names): Add cast.
8383         (find_charset_names): Constify array and add const_cast.
8384         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8385         (edit_command): Constify.
8386         * cli/cli-decode.c (lookup_cmd): Constify.
8387         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8388         Constify.
8389         (struct dump_context): Constify.
8390         (add_dump_command, restore_command): Constify.
8391         * cli/cli-script.c (get_command_line): Constify.
8392         * cli/cli-script.h (get_command_line): Constify.
8393         * cli/cli-utils.c (check_for_argument): Constify.
8394         * cli/cli-utils.h (check_for_argument): Constify.
8395         * coff-pe-read.c (struct read_pe_section_data): Constify.
8396         * command.h (lookup_cmd): Constify.
8397         * common/print-utils.c (decimal2str): Constify.
8398         * completer.c (gdb_print_filename): Constify.
8399         * corefile.c (set_gnutarget): Constify.
8400         * cp-name-parser.y (yyerror): Constify.
8401         * cp-valprint.c (cp_print_class_member): Constify.
8402         * cris-tdep.c (cris_register_name, crisv32_register_name):
8403         Constify.
8404         * d-exp.y (yyerror): Constify.
8405         (struct token::oper): Constify.
8406         * d-lang.h (d_yyerror): Constify.
8407         * dbxread.c (struct header_file_location::name): Constify.
8408         (add_old_header_file, add_new_header_file, last_function_name)
8409         (dbx_next_symbol_text, add_bincl_to_list)
8410         (find_corresponding_bincl_psymtab, set_namestring)
8411         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8412         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8413         * defs.h (command_line_input, print_address_symbolic)
8414         (deprecated_readline_begin_hook): Constify.
8415         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8416         Constify.
8417         * event-top.c (handle_line_of_input): Constify and add cast.
8418         * exceptions.c (catch_errors): Constify.
8419         * exceptions.h (catch_errors): Constify.
8420         * expprint.c (print_subexp_standard, op_string, op_name)
8421         (op_name_standard, dump_raw_expression, dump_raw_expression):
8422         * expression.h (op_name, op_string, dump_raw_expression):
8423         Constify.
8424         * f-exp.y (yyerror): Constify.
8425         (struct token::oper): Constify.
8426         (struct f77_boolean_val::name): Constify.
8427         * f-lang.c (f_word_break_characters): Constify.
8428         * f-lang.h (f_yyerror): Constify.
8429         * fork-child.c (fork_inferior): Add cast.
8430         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8431         (new_variant): Constify.
8432         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8433         * gdbarch.c: Regenerate.
8434         * gdbcore.h (set_gnutarget): Constify.
8435         * go-exp.y (yyerror): Constify.
8436         (token::oper): Constify.
8437         * go-lang.h (go_yyerror): Constify.
8438         * go32-nat.c (go32_sysinfo): Constify.
8439         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8440         * guile/scm-cmd.c (cmdscm_function): Constify.
8441         * guile/scm-param.c (pascm_param_value): Constify.
8442         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8443         (h8300sx_register_name): Constify.
8444         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8445         Constify.
8446         * ia64-tdep.c (ia64_register_names): Constify.
8447         * infcmd.c (construct_inferior_arguments): Constify.
8448         (path_command, attach_post_wait): Constify.
8449         * language.c (show_range_command, show_case_command)
8450         (unk_lang_error): Constify.
8451         * language.h (language_defn::la_error)
8452         (language_defn::la_name_of_this): Constify.
8453         * linespec.c (decode_line_2): Constify.
8454         * linux-thread-db.c (thread_db_err_str): Constify.
8455         * lm32-tdep.c (lm32_register_name): Constify.
8456         * m2-exp.y (yyerror): Constify.
8457         * m2-lang.h (m2_yyerror): Constify.
8458         * m32r-tdep.c (m32r_register_names): Constify and make static.
8459         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8460         * m88k-tdep.c (m88k_register_name): Constify.
8461         * macroexp.c (appendmem): Constify.
8462         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8463         (upgrade_type, parse_external, parse_partial_symbols)
8464         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8465         (new_symbol): Constify.
8466         * memattr.c (mem_info_command): Constify.
8467         * mep-tdep.c (register_name_from_keyword): Constify.
8468         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8469         Constify.
8470         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8471         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8472         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8473         cast.
8474         (mi_execute_async_cli_command): Constify.
8475         * mips-tdep.c (mips_register_name): Constify.
8476         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8477         (am33_register_name, am33_2_register_name)
8478         * moxie-tdep.c (moxie_register_names): Constify.
8479         * nat/linux-osdata.c (osdata_type): Constify fields.
8480         * nto-tdep.c (nto_parse_redirection): Constify.
8481         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8482         (lookup_child_selector): Constify.
8483         (objc_methcall::name): Constify.
8484         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8485         (lookup_struct_typedef): Constify.
8486         * objfiles.c (pc_in_section): Constify.
8487         * objfiles.h (pc_in_section): Constify.
8488         * p-exp.y (struct token::oper): Constify.
8489         (yyerror): Constify.
8490         * p-lang.h (pascal_yyerror): Constify.
8491         * parser-defs.h (op_name_standard): Constify.
8492         (op_print::string): Constify.
8493         (exp_descriptor::op_name): Constify.
8494         * printcmd.c (print_address_symbolic): Constify.
8495         * psymtab.c (print_partial_symbols): Constify.
8496         * python/py-breakpoint.c (stop_func): Constify.
8497         (bppy_get_expression): Constify.
8498         * python/py-cmd.c (cmdpy_completer::name): Constify.
8499         (cmdpy_function): Constify.
8500         * python/py-event.c (evpy_add_attribute)
8501         (gdbpy_initialize_event_generic): Constify.
8502         * python/py-event.h (evpy_add_attribute)
8503         (gdbpy_initialize_event_generic): Constify.
8504         * python/py-evts.c (add_new_registry): Constify.
8505         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8506         * python/py-framefilter.c (get_py_iter_from_func): Constify.
8507         * python/py-inferior.c (get_buffer): Add cast.
8508         * python/py-param.c (parm_constant::name): Constify.
8509         * python/py-unwind.c (fprint_frame_id): Constify.
8510         * python/python.c (gdbpy_parameter_value): Constify.
8511         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8512         * remote.c (memory_packet_config::name): Constify.
8513         (show_packet_config_cmd, remote_write_bytes)
8514         (remote_buffer_add_string):
8515         * reverse.c (exec_reverse_once): Constify.
8516         * rs6000-tdep.c (variant::name, variant::description): Constify.
8517         * rust-exp.y (rustyyerror): Constify.
8518         * rust-lang.c (rust_op_name): Constify.
8519         * rust-lang.h (rustyyerror): Constify.
8520         * serial.h (serial_ops::name): Constify.
8521         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8522         (sh_sh3e_register_name, sh_sh2e_register_name)
8523         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8524         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8525         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8526         (sh_sh4al_dsp_register_name): Constify.
8527         * sh64-tdep.c (sh64_register_name): Constify.
8528         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8529         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8530         * stabsread.c (patch_block_stabs, read_type_number)
8531         (ref_map::stabs, ref_add, process_reference)
8532         (symbol_reference_defined, define_symbol, define_symbol)
8533         (error_type, read_type, read_member_functions, read_cpp_abbrev)
8534         (read_one_struct_field, read_struct_fields, read_baseclasses)
8535         (read_tilde_fields, read_struct_type, read_array_type)
8536         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8537         (read_huge_number, read_range_type, read_args, common_block_start)
8538         (find_name_end): Constify.
8539         * stabsread.h (common_block_start, define_symbol)
8540         (process_one_symbol, symbol_reference_defined, ref_add):
8541         * symfile.c (get_section_index, add_symbol_file_command):
8542         * symfile.h (get_section_index): Constify.
8543         * target-descriptions.c (tdesc_type::name): Constify.
8544         (tdesc_free_type): Add cast.
8545         * target.c (find_default_run_target):
8546         (add_deprecated_target_alias, find_default_run_target)
8547         (target_announce_detach): Constify.
8548         (do_option): Constify.
8549         * target.h (add_deprecated_target_alias): Constify.
8550         * thread.c (print_thread_info_1): Constify.
8551         * top.c (deprecated_readline_begin_hook, command_line_input):
8552         Constify.
8553         (init_main): Add casts.
8554         * top.h (handle_line_of_input): Constify.
8555         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8556         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8557         (tfind_command): Rename to ...
8558         (tfind_command_1): ... this and constify.
8559         (tfind_command): New function.
8560         (tfind_end_command, tfind_start_command): Adjust.
8561         (encode_source_string): Constify.
8562         * tracepoint.h (encode_source_string): Constify.
8563         * tui/tui-data.c (tui_partial_win_by_name): Constify.
8564         * tui/tui-data.h (tui_partial_win_by_name): Constify.
8565         * tui/tui-source.c (tui_set_source_content_nil): Constify.
8566         * tui/tui-source.h (tui_set_source_content_nil): Constify.
8567         * tui/tui-win.c (parse_scrolling_args): Constify.
8568         * tui/tui-windata.c (tui_erase_data_content): Constify.
8569         * tui/tui-windata.h (tui_erase_data_content): Constify.
8570         * tui/tui-winsource.c (tui_erase_source_content): Constify.
8571         * tui/tui.c (tui_enable): Add cast.
8572         * utils.c (defaulted_query): Constify.
8573         (init_page_info): Add cast.
8574         (puts_debug, subset_compare): Constify.
8575         * utils.h (subset_compare): Constify.
8576         * varobj.c (varobj_format_string): Constify.
8577         * varobj.h (varobj_format_string): Constify.
8578         * vax-tdep.c (vax_register_name): Constify.
8579         * windows-nat.c (windows_detach): Constify.
8580         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8581         * xml-support.c (gdb_xml_end_element): Constify.
8582         * xml-tdesc.c (tdesc_start_reg): Constify.
8583         * xstormy16-tdep.c (xstormy16_register_name): Constify.
8584         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8585         * xtensa-tdep.h (xtensa_register_t::name): Constify.
8586
8587 2017-04-05  Pedro Alves  <palves@redhat.com>
8588
8589         * proc-api.c (struct trans): Constify.
8590         (procfs_note): Constify.
8591         * proc-events.c (struct trans, syscall_table):
8592         * proc-flags.c (struct trans): Constify.
8593         * proc-utils.h (procfs_note): Constify.
8594         * proc-why.c (struct trans): Constify.
8595         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8596         (procfs_detach): Constify.
8597         * sol-thread.c (struct string_map): Constify.
8598         (td_err_string, td_state_string): Constify.
8599
8600 2017-04-05  Pedro Alves  <palves@redhat.com>
8601
8602         * proc-api.c (procfs_filename): Don't initialize
8603         procfs_filename.
8604         (prepare_to_trace): Assume procfs_filename is non-NULL.
8605         (_initialize_proc_api): Give procfs_filename a default value here.
8606
8607 2017-04-05  Pedro Alves  <palves@redhat.com>
8608
8609         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8610         'cond_string' parameter.
8611         (extract_exception_regexp): Constify 'string' parameter.
8612         (catch_exception_command_1): Constify.
8613         * breakpoint.c (init_catchpoint)
8614         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8615         parameter.
8616         (ep_parse_optional_if_clause, catch_fork_command_1)
8617         (catch_exec_command_1): Constify.
8618         * breakpoint.h (init_catchpoint): Constify 'cond_string'
8619         parameter.
8620         (ep_parse_optional_if_clause): Constify.
8621         * cli/cli-utils.c (remove_trailing_whitespace)
8622         (check_for_argument): Constify.
8623         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8624         non-const overload.
8625         (check_for_argument): Likewise.
8626
8627 2017-04-05  Pedro Alves  <palves@redhat.com>
8628
8629         * event-top.c (command_line_handler): Add cast to execute_command
8630         call.
8631         * record-btrace.c (cmd_record_btrace_bts_start)
8632         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8633         (cmd_record_btrace_start): Add cast to execute_command call.
8634         * record-full.c (record_full_goto_insn):
8635         * record.c (record_start, record_stop): Add cast to
8636         execute_command_to_string calls.
8637         (cmd_record_start): Add cast to execute_command calls.
8638
8639 2017-04-05  Pedro Alves  <palves@redhat.com>
8640
8641         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8642         static inline function.
8643         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8644         array and use gdb_PyArg_ParseTupleAndKeywords.
8645         * python/py-cmd.c (cmdpy_init): Likewise.
8646         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8647         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8648         (infpy_search_memory): Likewise.
8649         * python/py-objfile.c (objfpy_add_separate_debug_file)
8650         (gdbpy_lookup_objfile): Likewise.
8651         * python/py-symbol.c (gdbpy_lookup_symbol)
8652         (gdbpy_lookup_global_symbol): Likewise.
8653         * python/py-type.c (gdbpy_lookup_type): Likewise.
8654         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8655         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8656         Likewise.
8657
8658 2017-04-05  Pedro Alves  <palves@redhat.com>
8659
8660         * python/python-internal.h (gdb_PyGetSetDef): New type.
8661         * python/py-block.c (block_object_getset)
8662         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8663         * python/py-event.c (event_object_getset)
8664         (finish_breakpoint_object_getset): Likewise.
8665         * python/py-inferior.c (inferior_object_getset): Likewise.
8666         * python/py-infthread.c (thread_object_getset): Likewise.
8667         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8668         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8669         * python/py-objfile.c (objfile_getset): Likewise.
8670         * python/py-progspace.c (pspace_getset): Likewise.
8671         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8672         Likewise.
8673         * python/py-record.c (recpy_record_getset): Likewise.
8674         * python/py-symbol.c (symbol_object_getset): Likewise.
8675         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8676         Likewise.
8677         * python/py-type.c (type_object_getset, field_object_getset):
8678         Likewise.
8679         * python/py-value.c (value_object_getset): Likewise.
8680
8681 2017-04-05  Pedro Alves  <palves@redhat.com>
8682
8683         * python/python-internal.h (gdb_PyObject_CallMethod)
8684         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8685         New functions.
8686         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8687         (PySys_GetObject, PySys_SetPath): New macros.
8688
8689 2017-04-05  Pedro Alves  <palves@redhat.com>
8690
8691         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8692         info_osdata_command.
8693         * osdata.c (info_osdata_command): Rename to ...
8694         (info_osdata): ... this.  Constify 'type' parameter, and remove
8695         the 'from_tty' parameter.  Accept NULL TYPE.
8696         (info_osdata_command): New function.
8697         * osdata.h (info_osdata_command): Remove declaration.
8698         (info_osdata): New declaration.
8699
8700 2017-04-05  Pedro Alves  <palves@redhat.com>
8701
8702         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8703         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8704         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8705         parameter.
8706         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8707         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8708         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8709         parameter.
8710         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8711         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8712         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8713         (mi_cmd_file_list_exec_source_files)
8714         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8715         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8716         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8717         parameter.
8718         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8719         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8720         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8721         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8722         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8723         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8724         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8725         'command' parameter.
8726         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8727         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8728         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8729         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8730         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8731         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8732         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8733         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8734         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8735         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8736         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8737         parameter.
8738         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8739         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8740         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8741         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8742         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8743         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8744         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8745         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8746         (mi_cmd_data_list_changed_registers)
8747         (mi_cmd_data_write_register_values)
8748         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8749         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8750         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8751         (mi_cmd_list_features, mi_cmd_list_target_features)
8752         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8753         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8754         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8755         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8756         (mi_cmd_trace_frame_collected): Constify 'command'
8757         parameter.
8758         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8759         'command' parameter.
8760
8761 2017-04-05  Pedro Alves  <palves@redhat.com>
8762
8763         * ada-lang.c (ada_completer_word_break_characters): Now a const
8764         array.
8765         (ada_get_gdb_completer_word_break_characters): Constify.
8766         * completer.c (gdb_completer_command_word_break_characters)
8767         (gdb_completer_file_name_break_characters)
8768         (gdb_completer_quote_characters): Now const arrays.
8769         (get_gdb_completer_quote_characters): Constify.
8770         (set_rl_completer_word_break_characters): New function.
8771         (set_gdb_completion_word_break_characters)
8772         (complete_line_internal): Use it.
8773         * completer.h (get_gdb_completer_quote_characters): Constify.
8774         (set_rl_completer_word_break_characters): Declare.
8775         * f-lang.c (f_word_break_characters): Constify.
8776         * language.c (default_word_break_characters): Constify.
8777         * language.h (language_defn::la_word_break_characters): Constify.
8778         (default_word_break_characters): Constify.
8779         * top.c (init_main): Use set_rl_completer_word_break_characters.
8780
8781 2017-04-05  Pedro Alves  <palves@redhat.com>
8782
8783         * aix-thread.c (aix_thread_pid_to_str)
8784         (aix_thread_extra_thread_info): Constify.
8785         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8786         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8787         (bsd_uthread_pid_to_str): Constify.
8788         * corelow.c (core_pid_to_str): Constify.
8789         * darwin-nat.c (darwin_pid_to_str): Constify.
8790         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8791         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8792         Constify.
8793         * gnu-nat.c (gnu_pid_to_str): Constify.
8794         * go32-nat.c (go32_pid_to_str): Constify.
8795         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8796         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8797         * inferior.c (inferior_pid_to_str): Constify.
8798         * linux-nat.c (linux_nat_pid_to_str): Constify.
8799         * linux-tdep.c (linux_core_pid_to_str): Constify.
8800         * linux-thread-db.c (thread_db_pid_to_str)
8801         (thread_db_extra_thread_info): Constify.
8802         * nto-tdep.c (nto_extra_thread_info): Constify.
8803         * nto-tdep.h (nto_extra_thread_info): Constify.
8804         * obsd-nat.c (obsd_pid_to_str): Constify.
8805         * procfs.c (procfs_pid_to_str): Constify.
8806         * ravenscar-thread.c (ravenscar_extra_thread_info)
8807         (ravenscar_pid_to_str): Constify.
8808         * remote-sim.c (gdbsim_pid_to_str): Constify.
8809         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8810         Constify.
8811         * sol-thread.c (solaris_pid_to_str): Constify.
8812         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8813         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8814         * target.c (default_pid_to_str, target_pid_to_str)
8815         (normal_pid_to_str, default_pid_to_str): Constify.
8816         * target.h (target_ops::to_pid_to_str)
8817         (target_ops::to_extra_thread_info): Constify.
8818         (target_pid_to_str, normal_pid_to_str): Constify.
8819         * windows-nat.c (windows_pid_to_str): Constify.
8820         * gdbarch.sh (core_pid_to_str): Constify.
8821         * target-delegates.c: Regenerate.
8822         * gdbarch.h, gdbarch.c: Regenerate.
8823
8824 2017-04-05  Pedro Alves  <palves@redhat.com>
8825
8826         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8827         the memory of the temporary warning_pre_print override.
8828         * utils.c (warning_pre_print): Constify.
8829         * utils.h (warning_pre_print): Constify.
8830
8831 2017-04-05  Pedro Alves  <palves@redhat.com>
8832
8833         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8834         (shell_command): New function.
8835         (make_command): Use std::string.
8836         (init_cli_cmds): Register shell_command instead of shell_escape.
8837
8838 2017-04-05  Pedro Alves  <palves@redhat.com>
8839
8840         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8841         * tracepoint.c (default_collect): Don't initialize.
8842
8843 2017-04-05  Pedro Alves  <palves@redhat.com>
8844
8845         * macroexp.c (macro_buffer::shared): Now a bool.
8846         (init_buffer): Update.
8847         (init_shared_buffer): Constify 'addr' parameter.
8848         (substitute_args, expand, macro_expand, macro_expand_next): Remove
8849         casts.
8850
8851 2017-04-05  Pedro Alves  <palves@redhat.com>
8852
8853         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8854         * disasm.c (set_disassembler_options): Constify local.
8855         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8856
8857 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
8858
8859         PR gdb/21352
8860         * tracefile.c (tsave_command): Fix argument parsing for '-r'
8861         option.
8862
8863 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8864
8865         * frame.c (frame_unwind_register_unsigned): Call
8866         frame_unwind_register_value.
8867
8868 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8869
8870         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8871         Use gdb_test_multiple, and don't match anchor.
8872
8873 2017-04-05  Pedro Alves  <palves@redhat.com>
8874
8875         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8876         (Write After Approval): Remove Simon Marchi.
8877
8878 2017-04-05  Pedro Alves  <palves@redhat.com>
8879
8880         * common/gdb_optional.h (optional::optional): Make constexpr and
8881         initialize m_dummy.
8882
8883 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8884
8885         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8886         (amd64fbsd_jmp_buf_reg_offset): Remove.
8887         (amd64fbsd_supply_uthread): Remove function.
8888         (amd64fbsd_collect_uthread): Remove function.
8889         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8890         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8891         (x86_64-*-freebsd*): Remove bsd-uthread.o.
8892         (fbsd-nat.c): Update comment.
8893         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8894         (i386fbsd_jmp_buf_reg_offset): Remove.
8895         (i386fbsd_supply_uthread): Remove function.
8896         (i386fbsd_collect_uthread): Remove function.
8897         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8898
8899 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8900
8901         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8902         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8903         * NEWS: Mention that support for FreeBSD/alpha was removed.
8904         * alpha-fbsd-tdep.c: Delete file.
8905         * config/alpha/fbsd.mh: Delete file.
8906         * configure.host: Delete alpha*-*-freebsd* and
8907         alpha*-*-kfreebsd*-gnu.
8908         * configure.tgt: Delete alpha*-*-freebsd* and
8909         alpha*-*-kfreebsd*-gnu.
8910
8911 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8912
8913         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8914         amd64bsd_store_inferior_registers): Use ptid from regcache.
8915
8916 2017-04-04  Pedro Alves  <palves@redhat.com>
8917
8918         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
8919         data fields, make them private and add "m_" prefixes.
8920         (lnp_state_machine::lnp_state_machine): New ctor.
8921         (record_line, check_line_address, handle_set_discriminator)
8922         (handle_set_address, handle_advance_pc, handle_special_opcode)
8923         (handle_advance_line, handle_set_file, handle_negate_stmt)
8924         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8925         (end_sequence, advance_line): New methods.
8926         (m_gdbarch, m_record_lines_p): New fields.
8927         (lnp_reader_state): Delete.
8928         (dwarf_record_line): Rename to ...
8929         (lnp_state_machine::record_line): ... adjust.
8930         (init_lnp_state_machine): Delete.
8931         (lnp_state_machine::lnp_state_machine): New.
8932         (check_line_address): Rename to ...
8933         (lnp_state_machine::check_line_address): This.
8934         (dwarf_decode_lines_1): Remove reference to "reader_state".
8935         Adjust lnp_state_machine having a non-default ctor.  Use bool.
8936         State machine internal state manipulation moved to
8937         lnp_state_machine methods.
8938
8939 2017-04-04  Pedro Alves  <palves@redhat.com>
8940
8941         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8942         unittests/offset-type-selftests.c.
8943         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8944         * common/offset-type.h: New file.
8945         * common/preprocessor.h: New file.
8946         * common/traits.h: New file.
8947         * common/valid-expr.h: New file.
8948         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
8949         sect_offset and cu_offset strong typedefs throughout.
8950         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8951         typedefs throughout.
8952         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
8953         sect_offset and cu_offset strong typedefs throughout.
8954         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8955         typedefs throughout.
8956         * gdbtypes.h: Include "common/offset-type.h".
8957         (cu_offset): Now an offset type (strong typedef) instead of a
8958         struct.
8959         (sect_offset): Likewise.
8960         (union call_site_parameter_u): Rename "param_offset" field to
8961         "param_cu_off".
8962         * unittests/offset-type-selftests.c: New file.
8963
8964 2017-04-04  Pedro Alves  <palves@redhat.com>
8965
8966         * common/underlying.h: New file.
8967         * dwarf2read.c: Include "common/gdb_optional.h" and
8968         "common/underlying.h".
8969         (dir_index, file_name_index): New types.
8970         (file_entry): Use them.
8971         (file_entry::include): Use to_underlying.
8972         (line_header::add_file_name): Use dir_index.
8973         (read_formatted_entries): Use gdb::optional.  Read form before
8974         writting to file_entry.
8975         (dwarf_decode_line_header): Use dir_index.
8976         (lnp_state_machine::current_file): Use to_underlying.
8977         (lnp_state_machine::file): Change type to file_name_index.
8978         (dwarf_record_line): Use to_underlying.
8979         (init_lnp_state_machine): Use file_name_index.
8980         (dwarf_decode_lines_1): Use dir_index and file_name_index.
8981
8982 2017-04-04  Pedro Alves  <palves@redhat.com>
8983
8984         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8985         operator bool, has_value and get methods.
8986
8987 2017-04-04  Pedro Alves  <palves@redhat.com>
8988
8989         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8990         fields.
8991         (line_header): Initialize all data fields.  Change type of
8992         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8993         Change type of include_dirs to std::vector<const char *>.  Remove
8994         num_include_dirs, include_dirs_size.  Change type of file_names to
8995         std::vector<file_entry>.  Remove num_file_names, file_names_size.
8996         (line_header::line_header): New.
8997         (line_header::add_include_dir, line_header::add_file_name): New
8998         methods.
8999         (line_header::include_dir_at): Remove NULL check.
9000         (line_header::file_name_at): Add const overload.
9001         (line_header_up): New unique_ptr typedef.
9002         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9003         std::vector.  Remove free_line_header call.
9004         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9005         free_line_header call.
9006         (free_cu_line_header): Delete.
9007         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9008         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9009         Adjust to use std::vector.
9010         (free_line_header): Delete.
9011         (free_line_header_voidp): Use delete.
9012         (add_include_dir): Replace with ...
9013         (line_header::add_include_dir): ... this method.  Use std::vector.
9014         (add_file_name): Replace with ...
9015         (line_header::add_file_name): ... this method.  Use std::vector.
9016         (add_include_dir_stub): Delete.
9017         (read_formatted_entries): Remove memset.
9018         (dwarf_decode_line_header): Return a line_header_up instead of a
9019         raw pointer.  Remove cleanup handling.  Pass lambdas to
9020         read_formatted_entries.  Adjust to use line_header methods.
9021         (dwarf_decode_lines_1): Adjust to use line_header methods.
9022         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9023         use std::vector.
9024
9025 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9026
9027         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9028         instead of struct ptid.
9029
9030 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9031
9032         * frame.c (get_frame_register_bytes): Unwind using value.
9033         (put_frame_register_bytes): Likewise.
9034
9035 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9036
9037         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9038         aggregate-like.
9039
9040 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9041
9042         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9043
9044 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9045
9046         * gdbthread.h (struct thread_info): Declare constructor and
9047         destructor.  Add some in-class member initializers.
9048         * thread.c (free_thread): Remove.
9049         (init_thread_list): Call delete instead of free_thread.
9050         (new_thread): Call thread_info constructor.
9051         (thread_info::thread_info): New function.
9052         (thread_info::~thread_info): New function.
9053         (delete_thread_1): Call delete instead of free_thread.
9054         (make_cleanup_restore_current_thread): Move tp and frame to
9055         inner block.
9056
9057 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9058
9059         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9060         (arc_skip_prologue): Likewise.
9061         (arc_make_frame_cache): Likewise.
9062         (arc_pv_get_operand): New function.
9063         (arc_is_in_prologue): Likewise.
9064         (arc_analyze_prologue): Likewise.
9065         (arc_print_frame_cache): Likewise.
9066         (MAX_PROLOGUE_LENGTH): New constant.
9067
9068 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9069
9070         * configure.tgt: Add arc-insn.o.
9071         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9072         (dump_arc_instruction_command): New function.
9073         (arc_fprintf_disasm): Likewise.
9074         (arc_disassemble_info): Likewise.
9075         (arc_insn_get_operand_value): Likewise.
9076         (arc_insn_get_operand_value_signed): Likewise.
9077         (arc_insn_get_memory_base_reg): Likewise.
9078         (arc_insn_get_memory_offset): Likewise.
9079         (arc_insn_get_branch_target): Likewise.
9080         (arc_insn_dump): Likewise.
9081         (arc_insn_get_linear_next_pc): Likewise.
9082         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9083         (arc_disassemble_info): Likewise.
9084         (arc_insn_get_branch_target): Likewise.
9085         (arc_insn_get_linear_next_pc): Likewise.
9086         * NEWS: Mention new "maint print arc arc-instruction".
9087
9088 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9089
9090         * arc-tdep (maintenance_print_arc_list): New variable.
9091         (maintenance_print_arc_command): New function.
9092
9093 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9094
9095         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9096         Add "limm" and "reserved".
9097         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9098         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9099         * arc-tdep.h (arc_regnum): Likewise.
9100
9101 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9102
9103         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9104         for THREADPTR register.
9105         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9106         register.
9107         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9108         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9109         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9110
9111 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9112
9113         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9114         registers above gdbarch_num_regs (gdbarch) as privileged in
9115         call0 ABI.
9116
9117 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9118
9119         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9120         for a single specified register or for all registers in
9121         a0_base..a0_base + C0_NREGS range.
9122         (supply_gregset_reg): Call regcache_raw_supply for a single
9123         specified register or for all registers in a0_base..a0_base +
9124         C0_NREGS range.
9125
9126 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9127
9128         * arch/xtensa.h (C0_NREGS): Add definition.
9129         * xtensa-tdep.c (C0_NREGS): Remove definition.
9130
9131 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9132
9133         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9134         Drop xtensa_default_isa initialization.
9135         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9136
9137 2017-03-27  Pedro Alves  <palves@redhat.com>
9138
9139         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9140         (file_entry::include_dir): New method.
9141         (line_header::include_dir_at, line_header::file_name_at): New
9142         methods.
9143         (setup_type_unit_groups, setup_type_unit_groups)
9144         (psymtab_include_file_name): Simplify using the new methods.
9145         (lnp_state_machine) <the_line_header>: New field.
9146         <file>: Add comment.
9147         (lnp_state_machine::current_file): New method.
9148         (dwarf_record_line): Simplify using the new methods.
9149         (init_lnp_state_machine): Initialize the "the_line_header" field.
9150         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9151         Simplify using the new methods.
9152
9153 2017-03-27  Pedro Alves  <palves@redhat.com>
9154
9155         * cp-name-parser.y (make_empty): Delete.
9156         (demangler_special, nested_name, ptr_operator, array_indicator)
9157         (direct_declarator, declarator_1): Use fill_comp instead of
9158         make_empty.
9159
9160 2017-03-27  Pedro Alves  <palves@redhat.com>
9161
9162         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9163         to ATTRIBUTE_PRINTF.
9164         * solib-target.c (library_list_start_list): Print "string" not
9165         "version".
9166         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9167         gdb_xml_error call.
9168
9169 2017-03-27  Pedro Alves  <palves@redhat.com>
9170
9171         * dwarf2read.c (struct file_and_directory): New.
9172         (dwarf2_get_dwz_file): Adjust to use std::string.
9173         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9174         (find_file_and_directory): Adjust to return a file_and_directory
9175         object.
9176         (read_file_scope): Adjust to use file_and_directory.  Remove
9177         make_cleanup/do_cleanups calls.
9178         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9179         make_cleanup/do_cleanups calls.
9180         * python/python.c (do_start_initialization): Adjust to ldirname
9181         returning a std::string.
9182         * utils.c (ldirname): Now returns a std::string.
9183         * utils.h (ldirname): Change return type to std::string.
9184         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9185         returning a std::string.
9186         * xml-tdesc.c (file_read_description_xml): Likewise.
9187
9188 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9189
9190         * regcache.c (regcache_debug_print_register): New function.
9191         * regcache.h (regcache_debug_print_register): New declaration.
9192         * target.c (debug_print_register): Remove.
9193         (target_fetch_registers): Call regcache_debug_print_register.
9194         (target_store_registers): Likewise.
9195
9196 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9197
9198         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9199         reference beyond the 'lh->include_dirs' array before accessing to
9200         it.
9201         (psymtab_include_file_name): Likewise.
9202         (dwarf_decode_lines_1): Likewise.
9203         (dwarf_decode_lines): Likewise.
9204         (file_file_name): Likewise.
9205
9206 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9207
9208         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9209         inferior_ptid.
9210         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9211         ps_lsetfpregs): Likewise.
9212         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9213         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9214         ps_lsetfpregs): Likewise.
9215         * target.c (target_fetch_registers, target_store_registers):
9216         Remove asserts.
9217
9218 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9219
9220         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9221
9222 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9223
9224         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9225         (_initialize_aarch64_tdep): Register it.
9226         (aarch64_record_load_store): Handle PRFM instruction.
9227         (aarch64_process_record_test): New function.
9228
9229 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9230
9231         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9232         indentation.
9233
9234 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9235
9236         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9237
9238 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9239
9240         python/python.c (do_start_initialization): Fix memory leak.
9241
9242 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9243
9244         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9245         using get_ptrace_pid.
9246         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9247         inferior_ptid.
9248         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9249         inferior_ptid instead of pid.
9250
9251 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9252
9253         * aarch64-tdep.c: Wrap locally used classes in anonymous
9254         namespace.
9255         * arm-tdep.c: Likewise.
9256         * linespec.c: Likewise.
9257         * ui-out.c: Likewise.
9258
9259 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9260
9261         PR gdb/19637
9262         * python/lib/gdb/printer/bound_registers.py: Import sys.
9263
9264 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9265
9266         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9267         windows_thread_info parameter and use it instead of
9268         current_thread.
9269         (windows_fetch_inferior_registers): Don't set current_thread,
9270         pass the thread to do_windows_fetch_inferior_registers.  Use
9271         ptid from regcache instead of inferior_ptid.
9272         (do_windows_store_inferior_registers): Add windows_thread_info
9273         parameter and use it instead of current_thread.
9274         (windows_store_inferior_registers): Don't set current_thread,
9275         pass the thread to do_windows_store_inferior_registers.  Use
9276         ptid from regcache instead of inferior_ptid.
9277
9278 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9279
9280         * ser-mingw.c (ser_windows_raw): Remove reference to
9281         struct serial::current_timeout.
9282
9283 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9284
9285         PR tdep/20928
9286         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9287         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9288         (sparc64_fsr_type): Fix %fsr decoding.
9289
9290 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9291
9292         * python/py-record-btrace.c (btpy_insn_data): Change return type
9293         for Python 2.
9294
9295 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9296
9297         * spu-linux-nat.c (spu_fetch_inferior_registers,
9298         spu_store_inferior_registers): Use ptid from regcache, set and
9299         restore inferior_ptid.
9300         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9301         Likewise.
9302
9303 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9304
9305         * i386-linux-nat.c (fetch_register, store_register,
9306         i386_linux_fetch_inferior_registers,
9307         i386_linux_store_inferior_registers): Use ptid from regcache.
9308         * ia64-linux-nat.c (ia64_linux_fetch_register,
9309         ia64_linux_store_register): Likewise.
9310         * inf-ptrace.c (inf_ptrace_fetch_register,
9311         inf_ptrace_store_register): Likewise.
9312         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9313         m32r_linux_store_inferior_registers): Likewise.
9314         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9315         m68kbsd_store_inferior_registers): Likewise.
9316         * m68k-linux-nat.c (fetch_register, store_register,
9317         m68k_linux_fetch_inferior_registers,
9318         m68k_linux_store_inferior_registers): Likewise.
9319         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9320         m88kbsd_store_inferior_registers): Likewise.
9321         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9322         mips_fbsd_store_inferior_registers): Likewise.
9323         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9324         mips64_linux_regsets_store_registers): Likewise.
9325         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9326         mipsnbsd_store_inferior_registers): Likewise.
9327         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9328         mips64obsd_store_inferior_registers): Likewise.
9329         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9330         Likewise.
9331         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9332         ppcfbsd_store_inferior_registers): Likewise.
9333         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9334         ppc_linux_store_inferior_registers): Likewise.
9335         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9336         ppcnbsd_store_inferior_registers): Likewise.
9337         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9338         ppcobsd_store_registers): Likewise.
9339         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9340         Likewise.
9341         * ravenscar-thread.c (ravenscar_fetch_registers,
9342         ravenscar_store_registers, ravenscar_prepare_to_store):
9343         Likewise.
9344         * record-btrace.c (record_btrace_fetch_registers,
9345         record_btrace_store_registers, record_btrace_prepare_to_store):
9346         Likewise.
9347         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9348         Lookup inferior using ptid from regcache, instead of
9349         current_inferior.
9350         * remote.c (remote_fetch_registers, remote_store_registers): Use
9351         ptid from regcache.
9352         * rs6000-nat.c (fetch_register, store_register): Likewise.
9353         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9354         s390_linux_store_inferior_registers): Likewise.
9355         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9356         shnbsd_store_inferior_registers): Likewise.
9357         * sol-thread.c (sol_thread_fetch_registers,
9358         sol_thread_store_registers): Likewise.
9359         * sparc-nat.c (sparc_fetch_inferior_registers,
9360         sparc_store_inferior_registers): Likewise.
9361         * tilegx-linux-nat.c (fetch_inferior_registers,
9362         store_inferior_registers): Likewise.
9363         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9364         vaxbsd_store_inferior_registers): Likewise.
9365         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9366         store_xtregs): Likewise.
9367
9368 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9369
9370         PR gdb/14441
9371         * NEWS: Mention support for rvalue references in GDB and python.
9372         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9373         supports both lvalue and rvalue references.
9374
9375 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9376
9377         PR gdb/14441
9378         * gdbtypes.c (rank_one_type): Implement overloading
9379         resolution rules regarding rvalue references.
9380
9381 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9382
9383         PR gdb/14441
9384         * aarch64-tdep.c (aarch64_type_align)
9385         (aarch64_extract_return_value, aarch64_store_return_value): Change
9386         lvalue reference type checks to general reference type checks.
9387         * amd64-tdep.c (amd64_classify): Likewise.
9388         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9389         Likewise.
9390         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9391         (arm_store_return_value): Likewise.
9392         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9393         * c-typeprint.c (c_print_type): Likewise.
9394         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9395         (cplus_number_of_children, cplus_describe_child): Likewise.
9396         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9397         * completer.c (expression_completer): Likewise.
9398         * cp-support.c (make_symbol_overload_list_adl_namespace):
9399         Likewise.
9400         * darwin-nat-info.c (info_mach_region_command): Likewise.
9401         * dwarf2loc.c (entry_data_value_coerce_ref)
9402         (value_of_dwarf_reg_entry): Likewise.
9403         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9404         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9405         Likewise.
9406         * findvar.c (extract_typed_address, store_typed_address):
9407         Likewise.
9408         * gdbtypes.c (rank_one_type): Likewise.
9409         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9410         * infcall.c (value_arg_coerce): Likewise.
9411         * language.c (pointer_type): Likewise.
9412         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9413         Likewise.
9414         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9415         * mn10300-tdep.c (mn10300_type_align): Likewise.
9416         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9417         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9418         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9419         Likewise.
9420         * printcmd.c (print_formatted, x_command): Likewise.
9421         * python/py-type.c (typy_get_composite, typy_template_argument):
9422         Likewise.
9423         * python/py-value.c (valpy_referenced_value)
9424         (valpy_get_dynamic_type, value_has_field): Likewise.
9425         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9426         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9427         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9428         * spu-tdep.c (spu_scalar_value_p): Likewise.
9429         * symtab.c (lookup_symbol_aux): Likewise.
9430         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9431         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9432         Likewise.
9433         * valops.c (value_cast_pointers, value_cast)
9434         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9435         (value_struct_elt, value_struct_elt_bitpos)
9436         (value_find_oload_method_list, find_overload_match)
9437         (value_rtti_indirect_type): Likewise.
9438         * valprint.c (val_print_scalar_type_p, generic_val_print):
9439         Likewise.
9440         * value.c (value_actual_type, value_as_address, unpack_long)
9441         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9442         (coerce_ref): Likewise.
9443         * varobj.c (varobj_get_value_type): Likewise.
9444
9445 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9446
9447         PR gdb/14441
9448         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9449         table of constants.
9450         * python/lib/gdb/command/explore.py: Support exploring values
9451         of rvalue reference types.
9452         * python/lib/gdb/types.py: Implement get_basic_type() for
9453         rvalue reference types.
9454         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9455         constant.
9456         * python/py-value.c (valpy_getitem): Add an rvalue reference
9457         check.
9458         (valpy_reference_value): Add new parameter "refcode".
9459         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9460         New wrappers for valpy_reference_value().
9461         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9462         (gdbpy_invoke_xmethod): Likewise.
9463
9464 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9465
9466         PR gdb/14441
9467         * dwarf2read.c (process_die, read_type_die_1): Handle the
9468         DW_TAG_rvalue_reference_type DIE.
9469         (read_tag_reference_type): Add new parameter "refcode".
9470
9471 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9472
9473         PR gdb/14441
9474         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9475         (c_type_print_modifier, c_type_print_varspec_suffix)
9476         (c_type_print_base): Support printing rvalue reference types.
9477         * c-valprint.c (c_val_print, c_value_print): Support printing
9478         rvalue reference values.
9479
9480 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9481
9482         PR gdb/14441
9483         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9484         typename.
9485         * cp-support.c (replace_typedefs): Handle
9486         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9487         * python/py-type.c (typy_lookup_type): Likewise.
9488
9489 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9490
9491         PR gdb/14441
9492         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9493         * parse.c (insert_type): Change assert statement.
9494         (follow_types): Handle rvalue reference types.
9495         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9496         constant.
9497
9498 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9499
9500         PR gdb/14441
9501         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9502         value_ref() interface.
9503         * c-valprint.c (c_value_print): Likewise.
9504         * infcall.c (value_arg_coerce): Likewise.
9505         * python/py-value.c (valpy_reference_value): Likewise.
9506         * valops.c (value_cast, value_reinterpret_cast)
9507         (value_dynamic_cast, typecmp): Likewise.
9508         (value_ref): Parameterize by kind of return value reference type.
9509         * value.h (value_ref): Add new parameter "refcode".
9510
9511 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9512
9513         PR gdb/14441
9514         * dwarf2read.c (read_tag_reference_type): Use
9515         lookup_lvalue_reference_type() instead of lookup_reference_type().
9516         * eval.c (evaluate_subexp_standard): Likewise.
9517         * f-exp.y: Likewise.
9518         * gdbtypes.c (make_reference_type, lookup_reference_type):
9519         Generalize with rvalue reference types.
9520         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9521         convenience wrappers for lookup_reference_type().
9522         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9523         reference kind parameter.
9524         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9525         wrappers for lookup_reference_type().
9526         * guile/scm-type.c (gdbscm_type_reference): Use
9527         lookup_lvalue_reference_type() instead of lookup_reference_type().
9528         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9529         * parse.c (follow_types): Likewise.
9530         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9531         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9532         Likewise.
9533         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9534         (gdbpy_invoke_xmethod): Likewise.
9535         * stabsread.c: Provide extra argument to make_reference_type()
9536         call.
9537         * valops.c (value_ref, value_rtti_indirect_type): Use
9538         lookup_lvalue_reference_type() instead of lookup_reference_type().
9539
9540 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9541
9542         PR gdb/14441
9543         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9544         (TYPE_IS_REFERENCE): New macro.
9545         (struct type): Add rvalue_reference_type field.
9546         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9547
9548 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9549
9550         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9551         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9552         New function definition.
9553         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9554         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9555         New function declaration.
9556         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9557         * mi/mi-interp.h: New file.
9558         * solib.c (info_sharedlibrary_command): Replace for loop with
9559         ALL_SO_LIBS macro
9560         * solib.h (update_solib_list): New function declaration.
9561         (so_list_head): Move macro.
9562         * solist.h (ALL_SO_LIBS): New macro.
9563
9564 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9565
9566         * infcmd.c (post_create_inferior): Remove unused argument in
9567         call to solib_add.
9568         * remote.c (remote_start_remote): Likewise.
9569         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9570         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9571         (enable_break): Likewise.
9572         * solib.c (update_solib_list): Remove unused target argument
9573         and its documentation.
9574         (solib_add): Remove unused target argument.  Remove unused
9575         argument in call to update_solib_list.
9576         (info_sharedlibrary_command): Remove unused argument in call
9577         to update_solib_list.
9578         (sharedlibrary_command): Remove unused argument in call to
9579         solib_add.
9580         (handle_solib_event): Likewise.
9581         (reload_shared_libraries): Likewise.
9582         * solib.h (solib_add): Remove unused target argument.
9583
9584 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9585
9586         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9587         (s390_displaced_step_fixup): Cover relative branches with the
9588         default fixup handling.  This fixes lack of support for some
9589         relative branch instructions.
9590
9591 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9592
9593         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9594         ptid from regcache.
9595
9596 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9597
9598         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9599         i386_darwin_store_inferior_registers): Use ptid from regcache.
9600
9601 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9602
9603         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9604         i386bsd_store_inferior_registers): Use ptid from regcache.
9605
9606 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9607
9608         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9609         hppaobsd_store_registers): Use ptid from regcache.
9610
9611 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9612
9613         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9614         hppanbsd_store_registers): Use ptid from regcache.
9615
9616 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9617
9618         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9619         from regcache.  Use get_ptrace_pid.
9620
9621 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9622
9623         * corelow.c (get_core_register_section): Use ptid from regcache,
9624         update doc.
9625
9626 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9627
9628         * bsd-uthread.c (bsd_uthread_fetch_registers,
9629         bsd_uthread_store_registers): Use ptid from regcache, set and
9630         restore inferior_ptid.
9631
9632 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9633
9634         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9635         fetch_fp_regs, store_register, store_regs, store_fp_register,
9636         store_fp_regs): Use ptid from regcache.
9637
9638 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9639
9640         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9641         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9642         store_vfp_regs): Use ptid from regcache.
9643
9644 2017-03-17  Pedro Alves  <palves@redhat.com>
9645
9646         PR remote/21188
9647         * ser-base.c (ser_base_wait_for): Add comment.
9648         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9649         version.
9650         * ser-unix.c (hardwire_raw): Remove reference to
9651         scb->current_timeout.
9652         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9653         (hardwire_ops): Install ser_base_readchar instead of
9654         hardwire_readchar.
9655         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9656         Remove fields.
9657
9658 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9659
9660         PR gdb/19637
9661         * python/lib/gdb/printer/bound_registers.py: Add support for
9662         Python 3.
9663
9664 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9665
9666         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9667         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9668         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9669         byte_offset to subobj_byte_offset.  Fix the handling of
9670         DWARF_VALUE_STACK on big-endian targets when coming via an
9671         implicit pointer.
9672         (dwarf2_evaluate_loc_desc): Adjust call to
9673         dwarf2_evaluate_loc_desc_full.
9674         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9675         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9676
9677 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9678
9679         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9680         and REVSH instructions.
9681
9682 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9683
9684         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9685         (arm_record_test): Declare.
9686         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9687         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9688         align with the manual.
9689         (thumb_record_misc): Adjust the code order to align with the
9690         manual.
9691         (thumb2_record_decode_insn_handler): Fix instruction matching.
9692         (instruction_reader_thumb): New class.
9693         (arm_record_test): New function.
9694
9695 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9696
9697         * arm-tdep.c (abstract_memory_reader): New class.
9698         (instruction_reader): New class.
9699         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9700         (decode_insn): Likewise.
9701
9702 2017-03-16  Doug Evans  <dje@google.com>
9703
9704         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9705         member.  Change type of TYPE member to SCM.  All uses updated.
9706         (lsscm_make_lazy_string_smob): Add assert.
9707         (lsscm_make_lazy_string): Flag bad length values.
9708         (lsscm_elt_type): New function.
9709         (gdbscm_lazy_string_to_value): Rewrite to use
9710         lsscm_safe_lazy_string_to_value.
9711         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9712         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9713         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9714         in incoming type.
9715         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9716         * guile/scm-type.c (tyscm_scm_to_type): New function.
9717
9718 2017-03-15  Doug Evans  <dje@google.com>
9719
9720         PR python/17728, python/18439, python/18779
9721         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9722         member.  Change type of TYPE member to PyObject *.  All uses updated.
9723         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9724         (gdbpy_create_lazy_string_object): Flag bad length values.
9725         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9726         Handle typedefs in incoming type.
9727         (stpy_lazy_string_elt_type): New function.
9728         (gdbpy_extract_lazy_string): Call it.
9729         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9730         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9731         typedefs in incoming type.
9732
9733 2017-03-16  Doug Evans  <dje@google.com>
9734
9735         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9736         * guile/scm-type.c (tyscm_scm_to_type): New function.
9737
9738 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9739
9740         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9741         "ULONGEST" for "skip".
9742
9743 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9744
9745         PR gdb/21220
9746         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9747         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9748         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9749         over ptrace peek/poke until end of buffer or error.
9750
9751 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9752
9753         * parse.c (length_of_subexp): Make static.
9754         * parser-defs.h (length_of_subexp): Remove.
9755
9756 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9757
9758         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9759         as well.
9760
9761 2017-03-14  Pedro Alves  <palves@redhat.com>
9762
9763         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9764         (main): Use std::unique_ptr.  Remove calls to
9765         cp_demangled_name_parse_free.
9766
9767 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9768
9769         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9770         alphabsd_store_inferior_registers): Use regcache->ptid instead
9771         of inferior_ptid.
9772
9773 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9774
9775         * aix-thread.c (aix_thread_fetch_registers,
9776         aix_thread_store_registers): Use regcache->ptid instead of
9777         inferior_ptid.
9778
9779 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9780
9781         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9782         store_gregs_to_thread, fetch_fpregs_from_thread,
9783         store_fpregs_to_thread): Use regcache->ptid instead of
9784         inferior_ptid.
9785
9786 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9787
9788         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9789         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9790         instead of inferior_ptid.
9791
9792 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9793
9794         * target.c (target_fetch_registers, target_store_registers): Add
9795         assert.
9796
9797 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9798
9799         * regcache.h (regcache_get_ptid): New function.
9800         * regcache.c (regcache_get_ptid): New function.
9801
9802 2017-03-13  Mark Wielaard  <mark@klomp.org>
9803
9804         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9805
9806 2017-03-10  Keith Seitz  <keiths@redhat.com>
9807
9808         PR c++/8218
9809         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9810
9811 2017-03-08  Pedro Alves  <palves@redhat.com>
9812
9813         PR gdb/18360
9814         * infrun.c (start_step_over, do_target_resume, resume)
9815         (restart_threads): Assert we're not resuming a thread that is
9816         meant to be stopped.
9817         (infrun_thread_stop_requested_callback): Delete.
9818         (infrun_thread_stop_requested): If the thread is internally
9819         stopped, queue a pending stop event and clear the thread's
9820         inline-frame state.
9821         (handle_stop_requested): New function.
9822         (handle_syscall_event, handle_inferior_event_1): Use
9823         handle_stop_requested.
9824         (handle_stop_requested): New function.
9825         (handle_signal_stop): Set the thread's stop_signal here instead of
9826         at caller.
9827         (finish_step_over): Clear step over info unconditionally.
9828         (handle_signal_stop): If the user had interrupted the event
9829         thread, consider the stop a random signal.
9830         (handle_signal_stop) <signal arrived while stepping over
9831         breakpoint>: Don't restart threads here.
9832         (stop_waiting): Don't clear step-over info here.
9833
9834 2017-03-08  Pedro Alves  <palves@redhat.com>
9835
9836         PR 21206
9837         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9838         goes to argument 2, not 1.
9839
9840 2017-03-08  Pedro Alves  <palves@redhat.com>
9841
9842         PR cli/21218
9843         * top.c (gdb_readline_wrapper): Avoid passing NULL to
9844         display_gdb_prompt.
9845         (command_line_input): Add comment.
9846
9847 2017-03-08  Pedro Alves  <palves@redhat.com>
9848
9849         PR tui/21216
9850         * tui/tui-file.c (tui_file::write): New.
9851         * tui/tui-file.h (tui_file): Override "write".
9852         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9853         factored out from ...
9854         (tui_puts): ... here.
9855         (tui_putc): Use them.
9856         (tui_write): New function.
9857         * tui/tui-io.h (tui_write): Declare.
9858
9859 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9860
9861         * Makefile.in (SFILES): Replace "environ.c" with
9862         "common/environ.c".
9863         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9864         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
9865         to...
9866         * common/environ.c: ... here.
9867         * environ.h: Moved to...
9868         * common/environ.h: ... here.
9869
9870 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9871
9872         * gdbarch.sh (pstring_ptr): New static function.
9873         (gdbarch_disassembler_options): Use it.
9874         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9875         not valid_disassembler_option->name.
9876         * gdbarch.c: Regenerate.
9877
9878 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9879
9880         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9881
9882 2017-03-07  Pedro Alves  <palves@redhat.com>
9883
9884         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9885
9886 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9887
9888         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9889         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9890         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9891         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9892
9893 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
9894
9895         * xtensa-linux-nat.c (fetch_gregs): Remove const.
9896
9897 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
9898
9899         * remote.c (remote_add_target_side_commands): Use range-based
9900         for loop.
9901
9902 2017-03-03  Yao Qi  <yao.qi@linaro.org>
9903
9904         PR gdb/21165
9905         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9906         value is lazy.
9907         * valprint.c (common_val_print): Likewise.
9908
9909 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
9910
9911         * NEWS: Mention new set/show disassembler-options commands.
9912         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9913         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9914         (prospective_options): New static variable.
9915         (gdb_disassembler::gdb_disassembler): Initialize
9916         m_di.disassembler_options.
9917         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9918         (get_disassembler_options): New function.
9919         (set_disassembler_options): Likewise.
9920         (set_disassembler_options_sfunc): Likewise.
9921         (show_disassembler_options_sfunc): Likewise.
9922         (disassembler_options_completer): Likewise.
9923         (_initialize_disasm): Likewise.
9924         * disasm.h (get_disassembler_options): New prototype.
9925         (set_disassembler_options): Likewise.
9926         * gdbarch.sh (gdbarch_disassembler_options): New variable.
9927         (gdbarch_verify_disassembler_options): Likewise.
9928         * gdbarch.c: Regenerate.
9929         * gdbarch.h: Likewise.
9930         * arm-tdep.c (num_disassembly_options): Delete.
9931         (set_disassembly_style): Likewise.
9932         (arm_disassembler_options): New static variable.
9933         (set_disassembly_style_sfunc): Convert short style name into long
9934         option name.  Call set_disassembler_options.
9935         (show_disassembly_style_sfunc): New function.
9936         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9937         set_gdbarch_verify_disassembler_options.
9938         (_initialize_arm_tdep): Delete regnames variable and update callers.
9939         (arm_disassembler_options): Initialize.
9940         (disasm_options): New variable.
9941         (num_disassembly_options): Rename from this...
9942         (num_disassembly_styles): ...to this.  Compute by scanning through
9943         disasm_options.
9944         (valid_disassembly_styles): Initialize using disasm_options.
9945         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9946         set_arm_regname_option.
9947         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9948         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9949         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9950         set_gdbarch_verify_disassembler_options.
9951         * s390-tdep.c (s390_disassembler_options): New static variable.
9952         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9953         set_gdbarch_verify_disassembler_options.
9954
9955 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9956
9957         * remote.c (remote_add_target_side_condition): Remove "struct"
9958         keyword from range-based for loop.
9959
9960 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9961
9962         * remote.c (remote_add_target_side_condition): Use range-based
9963         for loop.  Update comment.
9964
9965 2017-02-27  Yao Qi  <yao.qi@linaro.org>
9966
9967         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9968
9969 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
9970
9971         * regcache.c (regcache_raw_update): New function.
9972         (regcache_raw_read): Move code to regcache_raw_update.
9973         * regcache.h (regcache_raw_update): New declaration.
9974         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9975
9976 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
9977
9978         * dwarf2read.c (create_debug_type_hash_table): Initialize
9979         header.signature and header.type_offset_in_tu.
9980
9981 2017-02-24  Pedro Alves  <palves@redhat.com>
9982
9983         * symtab.c (make_file_symbol_completion_list_1): Use
9984         add_symtab_completions.
9985
9986 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9987
9988         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9989
9990 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9991
9992         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9993         I386_MAX_REGISTER_SIZE.
9994         (i386_pseudo_register_write): Likewise.
9995         (i386_process_record): Likewise.
9996         * i387-tdep.c (i387_supply_xsave): Likewise.
9997         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9998         (store_register): Likewise.
9999
10000 2017-02-23  Pedro Alves  <palves@redhat.com>
10001
10002         * ada-lang.c: Include "common/function-view.h".
10003         (ada_iterate_over_symbols): Adjust to use function_view as
10004         callback type.
10005         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10006         (ada_make_symbol_completion_list): Use a lambda.
10007         (ada_exc_search_name_matches): Delete.
10008         (name_matches_regex): New.
10009         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10010         * compile/compile-c-support.c: Include "common/function-view.h".
10011         (print_one_macro): Change prototype to accept a ui_file pointer.
10012         (write_macro_definitions): Use a lambda.
10013         * dwarf2read.c: Include "common/function-view.h".
10014         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10015         (dw2_expand_symtabs_matching): Adjust to use function_view as
10016         callback type.
10017         * language.h: Include "common/function-view.h".
10018         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10019         function_view as callback type.
10020         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10021         * linespec.c: Include "common/function-view.h".
10022         (collect_info::add_symbol): New method.
10023         (struct symbol_and_data_callback, iterate_inline_only, struct
10024         symbol_matcher_data, iterate_name_matcher): Delete.
10025         (iterate_over_all_matching_symtabs): Adjust to use function_view
10026         as callback type and lambdas.
10027         (iterate_over_file_blocks): Adjust to use function_view as
10028         callback type.
10029         (decode_compound_collector): Now a class with private fields.
10030         (decode_compound_collector::release_symbols): New method.
10031         (collect_one_symbol): Rename to...
10032         (decode_compound_collector::operator()): ... this and adjust.
10033         (lookup_prefix_sym): decode_compound_collector construction bits
10034         move to decode_compound_collector ctor.  Pass the
10035         decode_compound_collector object directly as callback.  Remove
10036         cleanups and use decode_compound_collector::release_symbols
10037         instead.
10038         (symtab_collector): Now a class with private fields.
10039         (symtab_collector::release_symtabs): New method.
10040         (add_symtabs_to_list): Rename to...
10041         (symtab_collector::operator()): ... this and adjust.
10042         (collect_symtabs_from_filename): symtab_collector construction
10043         bits move to symtab_collector ctor.  Pass the symtab_collector
10044         object directly as callback.  Remove cleanups and use
10045         symtab_collector::release_symtabs instead.
10046         (collect_symbols): Delete.
10047         (add_matching_symbols_to_info): Use lambdas.
10048         * macrocmd.c (print_macro_callback): Delete.
10049         (info_macro_command): Use a lambda.
10050         (info_macros_command): Pass print_macro_definition as callable
10051         directly.
10052         (print_one_macro): Remove 'ignore' parameter.
10053         (macro_list_command): Adjust.
10054         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10055         (macro_for_each_data::user_data): Delete field.
10056         (foreach_macro): Adjust to call the function_view.
10057         (macro_for_each): Adjust to use function_view as callback type.
10058         (foreach_macro_in_scope): Adjust to call the function_view.
10059         (macro_for_each_in_scope): Adjust to use function_view as callback
10060         type.
10061         * macrotab.h: Include "common/function-view.h".
10062         (macro_callback_fn): Declare a prototype instead of a pointer.
10063         Remove "user_data" parameter.
10064         (macro_for_each, macro_for_each_in_scope): Adjust to use
10065         function_view as callback type.
10066         * psymtab.c (partial_map_expand_apply)
10067         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10068         Adjust to use function_view as callback type and to return bool.
10069         (psym_expand_symtabs_matching): Adjust to use function_view as
10070         callback types.
10071         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10072         to use function_view as callback type and to return bool.
10073         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10074         callback types.
10075         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10076         as callback types.
10077         * symfile.h: Include "common/function-view.h".
10078         (expand_symtabs_file_matcher_ftype)
10079         (expand_symtabs_symbol_matcher_ftype)
10080         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10081         return bool.
10082         (quick_symbol_functions::map_symtabs_matching_filename)
10083         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10084         function_view as callback type and return bool.
10085         (expand_symtabs_matching): Adjust to use function_view as callback
10086         type.
10087         (maintenance_expand_name_matcher)
10088         (maintenance_expand_file_matcher): Delete.
10089         (maintenance_expand_symtabs): Use lambdas.
10090         * symtab.c (iterate_over_some_symtabs): Adjust to use
10091         function_view as callback types and return bool.
10092         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10093         of a cleanup.
10094         (lookup_symtab_callback): Delete.
10095         (lookup_symtab): Use a lambda.
10096         (iterate_over_symbols): Adjust to use function_view as callback
10097         type.
10098         (struct search_symbols_data, search_symbols_file_matches)
10099         (search_symbols_name_matches): Delete.
10100         (search_symbols): Use a pair of lambdas.
10101         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10102         (symtab_expansion_callback): Delete.
10103         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10104         * symtab.h: Include "common/function-view.h".
10105         (iterate_over_some_symtabs): Adjust to use function_view as
10106         callback type and return bool.
10107         (iterate_over_symtabs): Adjust to use function_view as callback
10108         type.
10109         (symbol_found_callback_ftype): Remove 'data' parameter and return
10110         bool.
10111         (iterate_over_symbols): Adjust to use function_view as callback
10112         type.
10113
10114 2017-02-23  Pedro Alves  <palves@redhat.com>
10115
10116         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10117         (%.o) <unittests/%.c>: New pattern.
10118         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10119         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10120         * common/function-view.h: New file.
10121         * unittests/function-view-selftests.c: New file.
10122         * configure: Regenerate.
10123
10124 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10125
10126         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10127         inferior_ptid.
10128         * go32-nat.c (go32_thread_alive): Likewise.
10129
10130 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10131
10132         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10133         delete.
10134
10135 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10136
10137         * varobj.c (varobj_clear_saved_item): Use delete instead of
10138         xfree.
10139         (update_dynamic_varobj_children): Likewise.
10140
10141 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10142
10143         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10144
10145 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10146
10147         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10148         m_enum_value to 0 in default constructor.
10149
10150 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10151
10152         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10153         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10154         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10155         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10156         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10157         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10158         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10159         IS_STORE_CONDITIONAL_INSN.
10160
10161 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10162
10163         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10164
10165 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10166
10167         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10168
10169 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10170
10171         * dwarf2read.c (skip_one_die, read_attribute_value)
10172         (dwarf2_const_value_attr, dump_die_shallow)
10173         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10174         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10175
10176 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10177
10178         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10179         (dwarf_parse_macro_header): Accept DWARF version 5.
10180         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10181
10182 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10183
10184         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10185         DW_AT_GNU_*.
10186         * common/common-exceptions.h (enum errors): Likewise.
10187         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10188         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10189         (dwarf_expr_context::execute_stack_op): Likewise.
10190         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10191         Likewise.
10192         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10193         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10194         (show_entry_values_debug, call_site_to_target_addr)
10195         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10196         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10197         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10198         (value_of_dwarf_block_entry, indirect_pieced_value)
10199         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10200         (disassemble_dwarf_expression): Likewise.
10201         * dwarf2read.c (process_die, inherit_abstract_dies)
10202         (read_call_site_scope): Likewise.
10203         * gdbtypes.h (struct func_type, struct call_site_parameter)
10204         (struct call_site): Likewise.
10205         * stack.c (read_frame_arg): Likewise.
10206         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10207
10208 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10209
10210         * defs.h (read_unsigned_leb128): New declaration.
10211         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10212         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10213         (dwarf2_find_location_expression): Call also
10214         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10215         * dwarf2loc.h (dwarf2_version): New declaration.
10216         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10217         rnglists.
10218         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10219         .debug_rnglists.
10220         (struct dwop_section_names): Add loclists_dwo.
10221         (dwop_section_names): Add .debug_loclists.dwo.
10222         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10223         (struct dwarf2_per_cu_data): Add dwarf_version.
10224         (struct dwo_sections): Add loclists.
10225         (struct attr_abbrev): Add implicit_const.
10226         (read_indirect_line_string): New declaration.
10227         (read_unsigned_leb128): Delete declaration.
10228         (rcuh_kind): New definition.
10229         (read_and_check_comp_unit_head): Change parameter
10230         is_debug_types_section to section_kind.
10231         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10232         (read_comp_unit_head): Change parameter abfd to section, add parameter
10233         section_kind.  Handle DWARF-5.
10234         (error_check_comp_unit_head): Accept also DWARF version 5.
10235         (read_and_check_comp_unit_head): Change parameter
10236         is_debug_types_section to section_kind.
10237         (read_and_check_type_unit_head): Delete function.
10238         (read_abbrev_offset): Handle DWARF-5.
10239         (create_debug_type_hash_table): Add parameter section_kind.  Process
10240         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10241         comp_unit_head.
10242         (create_debug_types_hash_table): Update create_debug_type_hash_table
10243         caller.
10244         (create_all_type_units): Call create_debug_type_hash_table.
10245         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10246         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10247         caller.
10248         (skip_one_die): Handle DW_FORM_implicit_const.
10249         (dwarf2_rnglists_process): New function.
10250         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10251         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10252         (read_attribute_value): Handle DW_FORM_implicit_const,
10253         DW_FORM_line_strp.
10254         (read_attribute): Handle DW_FORM_implicit_const.
10255         (read_indirect_string_at_offset_from): New function from
10256         read_indirect_string_at_offset.
10257         (read_indirect_string_at_offset): Call
10258         read_indirect_string_at_offset_from.
10259         (read_indirect_line_string_at_offset): New function.
10260         (read_indirect_string): New function comment.
10261         (read_indirect_line_string): New function.
10262         (read_unsigned_leb128): Make it global.
10263         (dwarf2_string_attr): Handle DWARF-5.
10264         (add_include_dir_stub, read_formatted_entries): New functions.
10265         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10266         Handle DWARF-5.
10267         (per_cu_header_read_in): Update read_comp_unit_head caller.
10268         (dwarf2_version): New function.
10269         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10270         rnglists.
10271         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10272         fields.
10273
10274 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10275
10276         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10277
10278 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10279
10280         * dwarf2read.c (dwarf2_ranges_process): New function from
10281         dwarf2_ranges_read.
10282         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10283         dwarf2_ranges_process.
10284
10285 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10286
10287         * dwarf2read.c (create_debug_type_hash_table): New function from
10288         create_debug_types_hash_table.
10289         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10290         (create_all_type_units, open_and_init_dwo_file): Update
10291         create_debug_types_hash_table callers.
10292
10293 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10294
10295         PR gdb/16188
10296         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10297         refer to 'ap', not 'args'.
10298
10299 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10300             Pedro Alves  <palves@redhat.com>
10301
10302         PR gdb/16188
10303         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10304         calls succeeded.
10305         * fork-child.c (trace_start_error): New function.
10306         (trace_start_error_with_name): Likewise.
10307         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10308         * inf-ptrace.c (inf_ptrace_me): Likewise.
10309         * inferior.h (trace_start_error): New prototype.
10310         (trace_start_error_with_name): Likewise.
10311
10312 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10313
10314         PR gdb/21164
10315         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10316         NULL before using it.
10317         * symmisc.c (maintenance_print_symbols): Likewise.
10318         (maintenance_print_msymbols): Likewise.
10319
10320 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10321
10322         * NEWS: Add record Python bindings entry.
10323
10324 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10325
10326         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10327         py-record-full.o.
10328         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10329         * python/py-record-btrace.c, python/py-record-btrace.h,
10330         python/py-record-full.c, python/py-record-full.h: New file.
10331         * python/py-record.c: Add include for py-record-btrace.h and
10332         py-record-full.h.
10333         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10334         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10335         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10336         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10337         New definition.
10338         (gdbpy_initialize_btrace): New export.
10339         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10340
10341 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10342
10343         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10344         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10345         * python/py-record.c: New file.
10346         * python/python-internal.h (gdbpy_start_recording,
10347         gdbpy_current_recording, gdpy_stop_recording,
10348         gdbpy_initialize_record): New export.
10349         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10350         (python_GdbMethods): Add gdbpy_start_recording,
10351         gdbpy_current_recording and gdbpy_stop_recording.
10352
10353 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10354
10355         * record-btrace.c (record_btrace_record_method): New function.
10356         (init_record_btrace_ops): Initialize to_record_method.
10357         * record-full.c (record_full_record_method): New function.
10358         (init_record_full_ops, init_record_full_core_ops): Add
10359         record_full_record_method.
10360         * record.h (enum record_method): New enum.
10361         * target-debug.h (target_debug_print_enum_record_method: New define.
10362         * target-delegates.c: Regenerate.
10363         * target.c (target_record_method): New function.
10364         * target.h: Include record.h.
10365         (struct target_ops) <to_record_method>: New field.
10366         (target_record_method): New export.
10367
10368 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10369
10370         * record.h (record_start, record_stop): New export.
10371         * record.c (record_start, record_stop): New function.
10372
10373 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10374
10375         * btrace.c (btrace_fetch): Copy function call segments pointer
10376         into a vector.
10377         (btrace_clear): Clear the vector.
10378         (btrace_find_insn_by_number): Use binary search to find the correct
10379         function call segment.
10380         * btrace.h (brace_fun_p): New typedef.
10381         (struct btrace_thread_info) <functions>: New field.
10382
10383 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10384
10385         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10386         * btrace.c (btrace_decode_error): ... here.  New function.
10387         * btrace.h (btrace_decode_error): New export.
10388
10389 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10390
10391         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10392         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10393         btrace_find_insn_by_number): Remove special case for gaps.
10394         * btrace.h (btrace_insn_get_error): New export.
10395         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10396         * record-btrace.c (btrace_insn_history): Print number for gaps.
10397         (record_btrace_info, record_btrace_goto): Handle gaps.
10398
10399 2017-02-14  Tom Tromey  <tom@tromey.com>
10400
10401         PR python/13598:
10402         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10403         event.
10404         * python/py-evts.c (gdbpy_initialize_py_events): Add
10405         before_prompt registry.
10406         * python/py-events.h (events_object) <before_prompt>: New field.
10407
10408 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10409
10410         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10411
10412 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10413
10414         * symfile (_initialize_symfile): Add usage text to the load command's
10415         help text.
10416
10417 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10418
10419         * utils.c (defaulted_query): Don't query on secondary UIs.
10420
10421 2017-02-10  Tom Tromey  <tom@tromey.com>
10422
10423         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10424
10425 2017-02-10  Tom Tromey  <tom@tromey.com>
10426
10427         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10428         "cleanup" local.
10429         * python/py-type.c (typy_legacy_template_argument): Remove
10430         unnecessary "cleanup" local.
10431
10432 2017-02-10  Tom Tromey  <tom@tromey.com>
10433
10434         * python/python.c (do_start_initialization): New function, from
10435         _initialize_python.
10436         (_initialize_python): Call do_start_initialization.
10437         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10438         goto.
10439
10440 2017-02-10  Tom Tromey  <tom@tromey.com>
10441
10442         * python/py-prettyprint.c (pretty_print_one_value): Use
10443         gdbpy_ref.
10444
10445 2017-02-10  Tom Tromey  <tom@tromey.com>
10446
10447         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10448         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10449         gdbpy_ref.
10450         * python/py-type.c (field_new): Use gdbpy_ref.
10451         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10452         gdbpy_ref.
10453         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10454         (py_free_pspace): Likewise.
10455         (pspace_to_pspace_object): Likewise.
10456         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10457         (py_free_objfile): Likewise.
10458         (objfile_to_objfile_object): Likewise.
10459         * python/py-inferior.c (delete_thread_object): Use
10460         gdbpy_ref.
10461         (infpy_read_memory): Likewise.
10462         (py_free_inferior): Likewise.
10463         * python/py-evtregistry.c (create_eventregistry_object): Use
10464         gdbpy_ref.
10465         * python/py-event.c (create_event_object): Use gdbpy_ref.
10466
10467 2017-02-10  Tom Tromey  <tom@tromey.com>
10468
10469         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10470         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10471         used.
10472         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10473         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10474         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10475         python/py-framefilter.c, python/py-function.c,
10476         python/py-inferior.c, python/py-infevents.c,
10477         python/py-linetable.c, python/py-newobjfileevent.c,
10478         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10479         python/py-signalevent.c, python/py-stopevent.c,
10480         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10481         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10482         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10483         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10484
10485 2017-02-10  Tom Tromey  <tom@tromey.com>
10486
10487         * ui-out.h (ui_out_emit_type): New class.
10488         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10489         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10490         and ui_out_emit_tuple.
10491         (enumerate_locals): Likewise.
10492         (py_mi_print_variables, py_print_locals, py_print_args): Use
10493         ui_out_emit_list.
10494         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10495         ui_out_emit_list.
10496         * common/gdb_optional.h: New file.
10497
10498 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10499
10500         * MAINTAINERS (Write After Approval): Update my e-mail address.
10501
10502 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10503
10504         PR gdb/21122
10505         * breakpoint.c (_initialize_breakpoint): Update the help description
10506         of the 'commands' command to indicate that it takes a list argument.
10507
10508 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
10509
10510         * interps.c (current_interp_set_logging): Remove "return".
10511
10512 2017-02-09  Gary Benson  <gbenson@redhat.com>
10513
10514         * symtab.c (add_symtab_completions): Prevent NULL pointer
10515         dereference.
10516
10517 2017-02-08  Pedro Alves  <palves@redhat.com>
10518
10519         * interps.c (interp::interp): Remove reference to quiet_p.
10520         (interp_set): Make static.  Remove dead "Switching to" output
10521         code.
10522         (interp_quiet_p, interp_set_quiet): Delete.
10523         (interpreter_exec_cmd): Don't set the interpreter quiet.
10524         * interps.h (interp_quiet_p): Make static.
10525         (class interp) <quiet_p>: Remove field
10526
10527 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10528
10529         * cli/cli-decode.c (find_command_name_length): Make it extern.
10530         * cli/cli-decode.h (find_command_name_length): Declare.
10531         * cli/cli-script.c (command_name_equals, line_first_arg):
10532         New functions.
10533         (process_next_line): Use cli-decode to parse command names.
10534         (build_command_line): Make args a constant pointer.
10535
10536 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10537
10538         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10539         Remove case-insensitive search.
10540
10541 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
10542
10543         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10544         at the end of the line.  Avoids an ARI warning.
10545
10546 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
10547
10548         * NEWS: Mention support for record/replay of Intel 64 rdrand and
10549         rdseed instructions.
10550         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10551
10552 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
10553
10554         PR tdep/20936
10555         Provide and use sparc32 and sparc64 target description XML files.
10556         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10557         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10558         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10559         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10560         * features/sparc/sparc32-solaris.xml: New file.
10561         * features/sparc/sparc64-solaris.xml: New file.
10562         * features/sparc/sparc32-solaris.c: Generated.
10563         * features/sparc/sparc64-solaris.c: Generated.
10564         * sparc-tdep.h: Account for differences in target descriptions.
10565         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10566         (sparc32_register_type): Use target provided registers.
10567         (validate_tdesc_registers): New function.
10568         (sparc32_gdbarch_init): Use tdesc_has_registers.
10569         Set pseudoregister functions.
10570         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10571         (sparc64_register_type): Use target provided registers.
10572         (sparc64_init_abi): Set pseudoregister functions.
10573
10574 2017-02-03  Tom Tromey  <tom@tromey.com>
10575
10576         PR rust/21097:
10577         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10578         with a single member.
10579
10580 2017-02-03  Pedro Alves  <palves@redhat.com>
10581
10582         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10583         (cli_interp_base::~cli_interp_base): New.
10584         (cli_interp): New struct.
10585         (as_cli_interp): Cast the interp itself to cli_interp.
10586         (cli_interpreter_pre_command_loop): Rename to ...
10587         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
10588         parameter.
10589         (cli_interpreter_init): Rename to ...
10590         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
10591         boolean.  Make extern.
10592         (cli_interpreter_resume): Rename to ...
10593         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
10594         extern.
10595         (cli_interpreter_suspend): Rename to ...
10596         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
10597         extern.
10598         (cli_interpreter_exec): Rename to ...
10599         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
10600         extern.
10601         (cli_interpreter_supports_command_editing): Rename to ...
10602         (cli_interp_base::supports_command_editing): ... this.  Remove
10603         'interp' parameter.  Make extern.
10604         (cli_ui_out): Rename to ...
10605         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
10606         Make extern.
10607         (cli_set_logging): Rename to ...
10608         (cli_interp_base::set_logging): ... this.  Remove 'interp'
10609         parameter.  Make extern.
10610         (cli_interp_procs): Delete.
10611         (cli_interp_factory): Adjust to use "new".
10612         * cli/cli-interp.h: Include "interps.h".
10613         (struct cli_interp_base): New struct.
10614         * interps.c (struct interp): Delete.  Fields moved to interps.h.
10615         (interp_new): Delete.
10616         (interp::interp, interp::~interp): New.
10617         (interp_set): Use bool, and return void.  Assume the interpreter
10618         has suspend, init and resume methods, and that the all return
10619         void.
10620         (set_top_level_interpreter): interp_set returns void.
10621         (interp_ui_out): Adapt.
10622         (current_interp_set_logging): Adapt.
10623         (interp_data): Delete.
10624         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10625         (interp_exec): Adapt.
10626         (top_level_interpreter_data): Delete.
10627         * interps.h (interp_init_ftype, interp_resume_ftype)
10628         (interp_suspend_ftype, interp_exec_ftype)
10629         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10630         (class interp): New.
10631         (interp_new): Delete.
10632         (interp_set): Now returns void.  Use bool.
10633         (interp_data, top_level_interpreter_data): Delete.
10634         * mi/mi-common.h: Include interps.h.
10635         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10636         init, resume, suspect, exec, interp_ui_out, set_logging and
10637         pre_command_loop methods.
10638         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10639         (mi_interpreter_init): Rename to ...
10640         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10641         bool, return void and make extern.  Adjust.
10642         (mi_interpreter_resume): ... Rename to ...
10643         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10644         return void and make extern.  Adjust.
10645         (mi_interpreter_suspend): ... Rename to ...
10646         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10647         return void and make extern.  Adjust.
10648         (mi_interpreter_exec): ... Rename to ...
10649         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10650         extern.  Adjust.
10651         (mi_interpreter_pre_command_loop): ... Rename to ...
10652         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10653         parameter and make extern.
10654         (mi_on_normal_stop_1): Adjust.
10655         (mi_ui_out): Rename to ...
10656         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10657         parameter and make extern.  Adjust.
10658         (mi_set_logging): Rename to ...
10659         (mi_interp::set_logging): ... this.  Remove the 'interp'
10660         parameter and make extern.  Adjust.
10661         (mi_interp_procs): Delete.
10662         (mi_interp_factory): Adjust to use 'new'.
10663         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10664         (mi_print_exception, mi_execute_command, mi_load_progress):
10665         Adjust.
10666         * tui/tui-interp.c (tui_interp): New class.
10667         (as_tui_interp): Return a tui_interp pointer.
10668         (tui_on_normal_stop, tui_on_signal_received)
10669         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10670         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10671         to use interp::interp_ui_out.
10672         (tui_init): Rename to ...
10673         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10674         bool, return void and make extern.  Adjust.
10675         (tui_resume): Rename to ...
10676         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10677         return void and make extern.  Adjust.
10678         (tui_suspend): Rename to ...
10679         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10680         return void and make extern.  Adjust.
10681         (tui_ui_out): Rename to ...
10682         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10683         parameter, and make extern.  Adjust.
10684         (tui_exec): Rename to ...
10685         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10686         make extern.
10687         (tui_interp_procs): Delete.
10688         (tui_interp_factory): Use "new".
10689
10690 2017-02-02  Tom Tromey  <tom@tromey.com>
10691
10692         * rust-exp.y (ends_raw_string, space_then_number)
10693         (rust_identifier_start_p): Return bool.
10694         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10695         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10696         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10697         (rust_chartype_p): Return bool.
10698         (val_print_struct, rust_print_struct_def, rust_print_type):
10699         Update.
10700         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10701         Return bool.
10702
10703 2017-02-02  Tom Tromey  <tom@tromey.com>
10704
10705         * rust-lang.c: Reindent.
10706
10707 2017-02-02  Tom Tromey  <tom@tromey.com>
10708
10709         * rust-lang.h (rust_crate_for_block): Update.
10710         * rust-lang.c (rust_crate_for_block): Return std::string.
10711         (rust_get_disr_info): Use std:;string, not
10712         gdb::unique_xmalloc_ptr.
10713         * rust-exp.y (crate_name): Update.
10714
10715 2017-02-02  Pedro Alves  <palves@redhat.com>
10716
10717         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10718         field out of gdb_disassembler_test and make it static.
10719
10720 2017-02-02  Pedro Alves  <palves@redhat.com>
10721
10722         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10723         mi1_interp and mi_interp fields.
10724
10725 2017-02-02  Pedro Alves  <palves@redhat.com>
10726
10727         * cli/cli-interp.c (struct saved_output_files, saved_output):
10728         Moved from cli/cli-logging.c.
10729         (cli_set_logging): New function.
10730         (cli_interp_procs): Install cli_set_logging.
10731         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10732         Declare.
10733         * cli/cli-logging.c (struct saved_output_files, saved_output):
10734         Moved to cli/cli-interp.c.
10735         (pop_output_files): Don't save outputs here.
10736         (make_logging_output): New function.
10737         (handle_redirections): Don't build tee nor save previous outputs
10738         here.
10739         * interps.c (current_interp_set_logging): Change prototype.
10740         Assume there's always a set_logging_proc method installed.
10741         * interps.h (interp_set_logging_ftype): Change prototype.
10742         (current_interp_set_logging): Change prototype and adjust comment.
10743         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10744         use make_logging_output.
10745         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10746 2017-02-02  Pedro Alves  <palves@redhat.com>
10747
10748         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10749         from ...
10750         (set_logging_overwrite): ... here.
10751         (logging_no_redirect_file): Delete.
10752         (set_logging_redirect): Don't handle redirection on the fly.
10753         Instead warn that "logging off" / "logging on" is necessary.
10754         (pop_output_files): Delete references to logging_no_redirect_file.
10755         (show_logging_command): Always speak in terms of what will happen
10756         once logging is reenabled.
10757
10758 2017-02-02  Pedro Alves  <palves@redhat.com>
10759
10760         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10761
10762 2017-02-02  Pedro Alves  <palves@redhat.com>
10763
10764         * disasm.c (gdb_pretty_print_insn): Rename to ...
10765         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10766         Remove gdbarch parameter.  Adapt to clear the object's buffers
10767         instead of allocating new buffers, and to print using the object's
10768         gdb_disassembler instead of calling gdb_print_insn.
10769         (dump_insns): Use gdb_pretty_print_disassembler.
10770         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10771         (gdb_pretty_print_disassembler): New class.
10772         * record-btrace.c (btrace_insn_history): Use
10773         gdb_pretty_print_disassembler.
10774
10775 2017-02-02  Pedro Alves  <palves@redhat.com>
10776
10777         * ada-lang.c (type_as_string): Use string_file.
10778         * ada-valprint.c (ada_print_floating): Use string_file.
10779         * ada-varobj.c (ada_varobj_scalar_image)
10780         (ada_varobj_get_value_image): Use string_file.
10781         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10782         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10783         * breakpoint.c (update_inserted_breakpoint_locations)
10784         (insert_breakpoint_locations, reattach_breakpoints)
10785         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10786         (print_it_watchpoint): Use string_file.
10787         (save_breakpoints): Use stdio_file.
10788         * c-exp.y (oper): Use string_file.
10789         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10790         tee_file.
10791         (pop_output_files): Use delete.
10792         (handle_redirections): Use stdio_file and tee_file.
10793         * cli/cli-setshow.c (do_show_command): Use string_file.
10794         * compile/compile-c-support.c (c_compute_program): Use
10795         string_file.
10796         * compile/compile-c-symbols.c (generate_vla_size): Take a
10797         'string_file &' instead of a 'ui_file *'.
10798         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10799         of a 'ui_file *'.  Use string_file.
10800         (generate_c_for_variable_locations): Take a 'string_file &'
10801         instead of a 'ui_file *'.
10802         * compile/compile-internal.h (generate_c_for_for_one_variable):
10803         Take a 'string_file &' instead of a 'ui_file *'.
10804         * compile/compile-loc2c.c (push, pushf, unary, binary)
10805         (print_label, pushf_register_address, pushf_register)
10806         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10807         'ui_file *'.  Adjust.
10808         * compile/compile.c (compile_to_object): Use string_file.
10809         * compile/compile.h (compile_dwarf_expr_to_c)
10810         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10811         'ui_file *'.
10812         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10813         (replace_typedefs_qualified_name): Use string_file and
10814         obstack_copy0.
10815         * disasm.c (gdb_pretty_print_insn): Use string_file.
10816         (gdb_disassembly): Adjust reference the null_stream global.
10817         (do_ui_file_delete): Delete.
10818         (gdb_insn_length): Use null_stream.
10819         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10820         * dwarf2loc.c (dwarf2_compile_property_to_c)
10821         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10822         'string_file &' instead of a 'ui_file *'.
10823         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10824         * dwarf2read.c (do_ui_file_peek_last): Delete.
10825         (dwarf2_compute_name): Use string_file.
10826         * event-top.c (gdb_setup_readline): Use stdio_file.
10827         * gdbarch.sh (verify_gdbarch): Use string_file.
10828         * gdbtypes.c (safe_parse_type): Use null_stream.
10829         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10830         string_file.
10831         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10832         'string_file *' instead of a 'ui_file *'.
10833         (gdbscm_arch_disassemble): Use string_file.
10834         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10835         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10836         inherits from ui_file.
10837         (ioscm_file_port_delete, ioscm_file_port_rewind)
10838         (ioscm_file_port_put): Delete.
10839         (ioscm_file_port_write): Rename to ...
10840         (ioscm_file_port::write): ... this.  Remove file_port_magic
10841         checks.
10842         (ioscm_file_port_new): Delete.
10843         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10844         ui_file_up.
10845         * guile/scm-type.c (tyscm_type_name): Use string_file.
10846         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10847         Use string_file.
10848         * infcmd.c (print_return_value_1): Use string_file.
10849         * infrun.c (print_target_wait_results): Use string_file.
10850         * language.c (add_language): Use string_file.
10851         * location.c (explicit_to_string_internal): Use string_file.
10852         * main.c (captured_main_1): Use null_file.
10853         * maint.c (maintenance_print_architecture): Use stdio_file.
10854         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10855         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10856         event_channel>: Change type to mi_console_file pointer.
10857         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10858         (mi_console_file_delete): Delete.
10859         (struct mi_console_file): Delete.
10860         (mi_console_file_magic): Delete.
10861         (mi_console_file_new): Delete.
10862         (mi_console_file::mi_console_file): New.
10863         (mi_console_file_delete): Delete.
10864         (mi_console_file_fputs): Delete.
10865         (mi_console_file::write): New.
10866         (mi_console_raw_packet): Delete.
10867         (mi_console_file::flush): New.
10868         (mi_console_file_flush): Delete.
10869         (mi_console_set_raw): Rename to ...
10870         (mi_console_file::set_raw): ... this.
10871         * mi/mi-console.h (class mi_console_file): New class.
10872         (mi_console_file_new, mi_console_set_raw): Delete.
10873         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10874         (mi_set_logging): Use delete and tee_file.  Adjust.
10875         * mi/mi-main.c (output_register): Use string_file.
10876         (mi_cmd_data_evaluate_expression): Use string_file.
10877         (mi_cmd_data_read_memory): Use string_file.
10878         (mi_cmd_execute, print_variable_or_computed): Use string_file.
10879         * mi/mi-out.c (mi_ui_out::main_stream): New.
10880         (mi_ui_out::rewind): Use main_stream and
10881         string_file.
10882         (mi_ui_out::put): Use main_stream and string_file.
10883         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10884         Allocate a 'string_file' instead.
10885         (mi_out_new): Don't allocate a mem_fileopen stream here.
10886         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10887         (mi_ui_out::main_stream): Declare method.
10888         * printcmd.c (eval_command): Use string_file.
10889         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10890         * python/py-arch.c (archpy_disassemble): Use string_file.
10891         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10892         * python/py-frame.c (frapy_str): Use string_file.
10893         * python/py-framefilter.c (py_print_type, py_print_single_arg):
10894         Use string_file.
10895         * python/py-type.c (typy_str): Use string_file.
10896         * python/py-unwind.c (unwind_infopy_str): Use string_file.
10897         * python/py-value.c (valpy_str): Use string_file.
10898         * record-btrace.c (btrace_insn_history): Use string_file.
10899         * regcache.c (regcache_print): Use stdio_file.
10900         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10901         * remote.c (escape_buffer): Use string_file.
10902         * rust-lang.c (rust_get_disr_info): Use string_file.
10903         * serial.c (serial_open_ops_1): Use stdio_file.
10904         (do_serial_close): Use delete.
10905         * stack.c (print_frame_arg): Use string_file.
10906         (print_frame_args): Remove local mem_fileopen stream, not used.
10907         (print_frame): Use string_file.
10908         * symmisc.c (maintenance_print_symbols): Use stdio_file.
10909         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10910         Take a 'string_file *' instead of a 'ui_file *'.
10911         * top.c (new_ui): Use stdio_file and stderr_file.
10912         (free_ui): Use delete.
10913         (execute_command_to_string): Use string_file.
10914         (quit_confirm): Use string_file.
10915         * tracepoint.c (collection_list::append_exp): Use string_file.
10916         * tui/tui-disasm.c (tui_disassemble): Use string_file.
10917         * tui/tui-file.c: Don't include "ui-file.h".
10918         (enum streamtype, struct tui_stream): Delete.
10919         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10920         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10921         (tui_file::tui_file): New method.
10922         (tui_file_fputs): Delete.
10923         (tui_file_get_strbuf): Delete.
10924         (tui_file::puts): New method.
10925         (tui_file_adjust_strbuf): Delete.
10926         (tui_file_flush): Delete.
10927         (tui_file::flush): New method.
10928         * tui/tui-file.h: Tweak intro comment.
10929         Include ui-file.h.
10930         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10931         (tui_file_adjust_strbuf): Delete declarations.
10932         (class tui_file): New class.
10933         * tui/tui-io.c (tui_initialize_io): Use tui_file.
10934         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10935         (tui_register_format): Use string_stream.
10936         * tui/tui-stack.c (tui_make_status_line): Use string_file.
10937         (tui_get_function_from_frame): Use string_file.
10938         * typeprint.c (type_to_string): Use string_file.
10939         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10940         (null_stream): New global.
10941         (ui_file_delete): Delete.
10942         (ui_file::ui_file): New.
10943         (null_file_isatty): Delete.
10944         (ui_file::~ui_file): New.
10945         (null_file_rewind): Delete.
10946         (ui_file::printf): New.
10947         (null_file_put): Delete.
10948         (null_file_flush): Delete.
10949         (ui_file::putstr): New.
10950         (null_file_write): Delete.
10951         (ui_file::putstrn): New.
10952         (null_file_read): Delete.
10953         (ui_file::putc): New.
10954         (null_file_fputs): Delete.
10955         (null_file_write_async_safe): Delete.
10956         (ui_file::vprintf): New.
10957         (null_file_delete): Delete.
10958         (null_file::write): New.
10959         (null_file_fseek): Delete.
10960         (null_file::puts): New.
10961         (ui_file_data): Delete.
10962         (null_file::write_async_safe): New.
10963         (gdb_flush, ui_file_isatty): Adjust.
10964         (ui_file_put, ui_file_rewind): Delete.
10965         (ui_file_write): Adjust.
10966         (ui_file_write_for_put): Delete.
10967         (ui_file_write_async_safe, ui_file_read): Adjust.
10968         (ui_file_fseek): Delete.
10969         (fputs_unfiltered): Adjust.
10970         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10971         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10972         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10973         (set_ui_file_data): Delete.
10974         (string_file::~string_file, string_file::write)
10975         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10976         (do_ui_file_as_string, ui_file_as_string): Delete.
10977         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10978         (struct mem_file): Delete.
10979         (mem_file_new): Delete.
10980         (stdio_file::stdio_file): New.
10981         (mem_file_delete): Delete.
10982         (stdio_file::stdio_file): New.
10983         (mem_fileopen): Delete.
10984         (stdio_file::~stdio_file): New.
10985         (mem_file_rewind): Delete.
10986         (stdio_file::set_stream): New.
10987         (mem_file_put): Delete.
10988         (stdio_file::open): New.
10989         (mem_file_write): Delete.
10990         (stdio_file_magic, struct stdio_file): Delete.
10991         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10992         (stdio_file::flush): New.
10993         (stdio_file_read): Rename to ...
10994         (stdio_file::read): ... this.  Adjust.
10995         (stdio_file_write): Rename to ...
10996         (stdio_file::write): ... this.  Adjust.
10997         (stdio_file_write_async_safe): Rename to ...
10998         (stdio_file::write_async_safe) ... this.  Adjust.
10999         (stdio_file_fputs): Rename to ...
11000         (stdio_file::puts) ... this.  Adjust.
11001         (stdio_file_isatty): Delete.
11002         (stdio_file_fseek): Delete.
11003         (stdio_file::isatty): New.
11004         (stderr_file_write): Rename to ...
11005         (stderr_file::write) ... this.  Adjust.
11006         (stderr_file_fputs): Rename to ...
11007         (stderr_file::puts) ... this.  Adjust.
11008         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11009         (stderr_file::stderr_file): New.
11010         (tee_file_magic): Delete.
11011         (struct tee_file): Delete.
11012         (tee_file::tee_file): New.
11013         (tee_file_new): Delete.
11014         (tee_file::~tee_file): New.
11015         (tee_file_delete): Delete.
11016         (tee_file_flush): Rename to ...
11017         (tee_file::flush): ... this.  Adjust.
11018         (tee_file_write): Rename to ...
11019         (tee_file::write): ... this.  Adjust.
11020         (tee_file::write_async_safe): New.
11021         (tee_file_fputs): Rename to ...
11022         (tee_file::puts): ... this.  Adjust.
11023         (tee_file_isatty): Rename to ...
11024         (tee_file::isatty): ... this.  Adjust.
11025         * ui-file.h (struct obstack, struct ui_file): Don't
11026         forward-declare.
11027         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11028         (ui_file_write_ftype)
11029         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11030         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11031         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11032         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11033         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11034         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11035         (set_ui_file_fseek): Delete.
11036         (ui_file_data, ui_file_delete, ui_file_rewind)
11037         (struct ui_file): New.
11038         (ui_file_up): New.
11039         (class null_file): New.
11040         (null_stream): Declare.
11041         (ui_file_write_for_put, ui_file_put): Delete.
11042         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11043         Delete.
11044         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11045         (gdb_fopen, tee_file_new): Delete.
11046         (struct string_file): New.
11047         (struct stdio_file): New.
11048         (stdio_file_up): New.
11049         (struct stderr_file): New.
11050         (class tee_file): New.
11051         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11052         of a 'ui_file *'.  Adjust.
11053         * ui-out.h (class ui_out) <field_stream>: Likewise.
11054         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11055         (null_stream): Delete.
11056         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11057         Adjust.
11058         * utils.h (struct ui_file): Delete forward declaration..
11059         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11060         (error_stream): Take a 'string_file &' instead of a
11061         'ui_file *'.
11062         * varobj.c (varobj_value_get_print_value): Use string_file.
11063         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11064         * gdbarch.c: Regenerate.
11065
11066 2017-02-02  Pedro Alves  <palves@redhat.com>
11067
11068         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11069         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11070         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11071         Adjust to call gdb_print_insn instead of
11072         gdb_disassembler::print_insn.
11073         (dump_insns, do_mixed_source_and_assembly_deprecated)
11074         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11075         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11076         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11077         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11078         declaration.
11079         (gdb_pretty_print_insn): Re-add declaration.
11080         * record-btrace.c (btrace_insn_history): Don't allocate a
11081         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11082
11083 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11084
11085         * disasm.h (gdb_disassembly): Remove file_string parameter.
11086         * disasm.c (gdb_disassembly): Likewise.
11087         * cli/cli-cmds.c (print_disassembly): Adapt.
11088         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11089         * stack.c (do_gdb_disassembly): Likewise.
11090
11091 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11092
11093         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11094         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11095         targets.  And if the implicit value is longer than needed, extract
11096         the first bytes instead of the "least significant" ones.
11097
11098 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11099
11100         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11101         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11102         (btrace_fetch): Assert can_access_registers_ptid.
11103         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11104         validate_registers_access.
11105
11106 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11107
11108         * gdbthread.h (can_access_registers_ptid): New.
11109         * thread.c (can_access_registers_ptid): New.
11110
11111 2017-02-01  Pedro Alves  <palves@redhat.com>
11112
11113         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11114
11115 2017-01-31  Pedro Alves  <palves@redhat.com>
11116
11117         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11118         Fix typos.
11119
11120 2017-01-31  Pedro Alves  <palves@redhat.com>
11121
11122         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11123         not used.
11124
11125 2017-01-31  Pedro Alves  <palves@redhat.com>
11126
11127         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11128
11129 2017-01-31  Pedro Alves  <palves@redhat.com>
11130
11131         * common/scoped_restore.h
11132         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11133         change the value's parameter type to T2.
11134         (make_scoped_restore): Likewise.
11135
11136 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11137             Richard Henderson  <rth@redhat.com>
11138
11139         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11140         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11141         GS_BASE for older kernels.
11142         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11143         GS_BASE for older kernels.
11144         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11145         and GS_BASE to the offset table.
11146         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11147         system register group.
11148         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11149         for older kernels.
11150         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11151         amd64 ABI.
11152         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11153         AMD64_GSBASE_REGNUM.
11154         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11155         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11156         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11157         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11158         i386/64bit-segments.xml in those rules.
11159         * features/i386/64bit-segments.xml: New file.
11160         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11161         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11162         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11163         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11164         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11165         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11166         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11167         * features/i386/amd64-avx-linux.c: Regenerated.
11168         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11169         * features/i386/amd64-avx-mpx.c: Regenerated.
11170         * features/i386/amd64-avx512-linux.c: Regenerated.
11171         * features/i386/amd64-linux.c: Regenerated.
11172         * features/i386/amd64-mpx-linux.c: Regenerated.
11173         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11174         * features/i386/i386-avx-mpx.c: Regenerated.
11175         * features/i386/x32-avx-linux.c: Regenerated.
11176         * features/i386/x32-avx512-linux.c: Regenerated.
11177         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11178         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11179         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11180         * regformats/i386/amd64-linux.dat: Regenerated.
11181         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11182         * regformats/i386/x32-avx-linux.dat: Regenerated.
11183         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11184         * regformats/i386/x32-linux.dat: Regenerated.
11185
11186 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11187
11188         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11189         Set to AMD64_NUM_REGS.
11190
11191 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11192
11193         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11194         that checks validity of a register number.
11195
11196 2017-01-27  Kees Cook  <keescook@google.com>
11197
11198         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11199         fetch_fpregs if target has fpa registers.
11200         (arm_linux_store_inferior_registers): Call store_fpregs if target
11201         has fpa registers.
11202
11203 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11204
11205         * cris-tdep.c (cris_gdbarch_init): Remove check for
11206         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11207
11208 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11209
11210         * corelow.c (get_core_register_section): Check for regset
11211         existence before checking for REGSET_VARIABLE_SIZE.
11212
11213 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11214             Pedro Alves  <palves@redhat.com>
11215
11216         PR gdb/20939
11217         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11218         call memory_error, save memaddr instead.
11219         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11220         negative, cal memory_error.
11221         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11222
11223 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11224
11225         * disasm-selftests.c (memory_error_test): New function.
11226         (_initialize_disasm_selftests): Register memory_error_test.
11227
11228 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11229
11230         * Makefile.in (SFILES): Add disasm-selftests.c and
11231         selftest-arch.c.
11232         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11233         * disasm-selftests.c: New file.
11234         * selftest-arch.c: New file.
11235         * selftest-arch.h: New file.
11236
11237 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11238
11239         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11240         to bfd_arch_mep.  Don't return 0 if section is not
11241         found.  Call print_insn_mep.
11242
11243 2017-01-26  Pedro Alves  <palves@redhat.com>
11244             Yao Qi  <yao.qi@linaro.org>
11245
11246         * arm-tdep.c: Include "disasm.h".
11247         (gdb_print_insn_arm): Update code to get gdbarch.
11248         * disasm.c (dis_asm_read_memory): Change it to
11249         gdb_disassembler::dis_asm_read_memory.
11250         (dis_asm_memory_error): Likewise.
11251         (dis_asm_print_address): Likewise.
11252         (gdb_pretty_print_insn): Change it to
11253         gdb_disassembler::pretty_print_insn.
11254         (dump_insns): Add one argument gdb_disassemlber.  All
11255         callers updated.
11256         (do_mixed_source_and_assembly_deprecated): Likewise.
11257         (do_mixed_source_and_assembly): Likewise.
11258         (do_assembly_only): Likewise.
11259         (gdb_disassembler::gdb_disassembler): New.
11260         (gdb_disassembler::print_insn): New.
11261         * disasm.h (class gdb_disassembler): New.
11262         (gdb_pretty_print_insn): Remove declaration.
11263         (gdb_disassemble_info): Likewise.
11264         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11265         (gdbscm_disasm_read_memory_worker): Update.
11266         (gdbscm_disasm_read_memory): Update.
11267         (gdbscm_disasm_memory_error): Remove.
11268         (gdbscm_disasm_print_address): Remove.
11269         (gdbscm_disassembler::gdbscm_disassembler): New.
11270         (gdbscm_print_insn_from_port): Update.
11271         * mips-tdep.c: Include disasm.h.
11272         (gdb_print_insn_mips): Update code to get gdbarch.
11273         * record-btrace.c (btrace_insn_history): Update.
11274         * spu-tdep.c: Include disasm.h.
11275         (struct spu_dis_asm_data): Remove.
11276         (struct spu_dis_asm_info): New.
11277         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11278         SPU id.
11279         (gdb_print_insn_spu): Cast disassemble_info to
11280         spu_dis_asm_info.
11281
11282 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11283
11284         * disasm.c (do_ui_file_delete): Delete.
11285         (gdb_insn_length): Move code creating stream to ...
11286         * utils.c (null_stream): ... here.  New function.
11287         * utils.h (null_stream): Declare.
11288
11289 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11290
11291         * python/py-inferior.c (find_thread_object): Return directly
11292         from the loop.  Remove "found" variable.
11293
11294 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11295
11296         GDB 7.12.1 released.
11297
11298 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11299
11300         * python/py-function.c (fnpy_call): Reorder declarations to have
11301         the gdbpy_enter object declared first.
11302         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11303
11304 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11305
11306         PR python/21068
11307         * python/python-internal.h (PyMem_RawMalloc): Define for
11308         Python < 3.4.
11309         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11310         PyMem_RawMalloc instead of PyMem_Malloc.
11311
11312 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11313             Luis Machado  <lgustavo@codesourcery.com>
11314
11315         * NEWS (New commands): Mention flash-erase.
11316         (New MI commands): Mention target-flash-erase.
11317         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11318         command.
11319         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11320         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11321         * target.c (flash_erase_command): New function.
11322         (initialize_targets): Add new flash-erase command.
11323         * target.h (flash_erase_command): New declaration.
11324
11325 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11326
11327         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11328         HAVE_SYS_PROCFS_H is defined.
11329
11330 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11331
11332         * remote.c (struct cached_reg): Change data into a pointer.
11333         * (stop_reply_dtr): Free data pointers before deleting vector.
11334         (process_stop_reply): Likewise.
11335         (remote_parse_stop_reply): Allocate space for data
11336
11337 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11338
11339         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11340         MAX_REGISTER_SIZE.
11341         (amd64_pseudo_register_read_value): Likewise.
11342         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11343         (store_register_using_P): Likewise.
11344         * regcache.c (regcache_xfer_part): Likewise.
11345
11346 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11347
11348         Split real and pseudo registers.
11349         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11350         (sparc32_pseudo_regnum): New enum.
11351         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11352         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11353         (SPARC32_CP0_REGISTERS): New macro.
11354         (sparc32_pseudo_register_name): New function.
11355         (sparc32_register_name): Use sparc32_pseudo_register_name.
11356         (sparc32_pseudo_register_type): New function.
11357         (sparc32_register_type): Use sparc32_pseudo_register_type.
11358         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11359         pseudo register numbers.
11360         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11361         (SPARC64_CP0_REGISTERS): New macro.
11362         (sparc64_pseudo_register_name): New function.
11363         (sparc64_register_name): Use sparc64_pseudo_register_name.
11364         (sparc64_pseudo_register_type): New function.
11365         (sparc64_register_type): Use sparc64_pseudo_register_type.
11366         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11367         pseudo register numbers.
11368         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11369         sparc64_store_arguments): Handle pseudo register numbers.
11370
11371 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11372
11373         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11374         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11375         output.
11376         (getpkt_or_notif_sane_1): Likewise.
11377
11378 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11379
11380         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11381         of CC.  Pass "-x c++-header" instead of "-x c".
11382
11383 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11384
11385         * remote.c (remote_can_async_p): Update comment.
11386
11387 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11388
11389         * linux-nat.c (linux_nat_can_async_p): Update comment.
11390
11391 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11392
11393         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11394
11395 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11398
11399 2017-01-10  Tom Tromey  <tom@tromey.com>
11400
11401         * python/py-type.c (typy_legacy_template_argument): Update.
11402         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11403         ~demangle_parse_info): Declare new members.
11404         (cp_demangled_name_to_comp): Return unique_ptr.
11405         (cp_demangled_name_parse_free)
11406         (make_cleanup_cp_demangled_name_parse_free)
11407         (cp_new_demangle_parse_info): Remove.
11408         * cp-support.c (do_demangled_name_parse_free_cleanup)
11409         (make_cleanup_cp_demangled_name_parse_free): Remove.
11410         (inspect_type, cp_canonicalize_string_full)
11411         (cp_canonicalize_string): Update.
11412         (mangled_name_to_comp): Change return type.
11413         (cp_class_name_from_physname, method_name_from_physname)
11414         (cp_func_name, cp_remove_params): Update.
11415         * cp-name-parser.y (demangle_parse_info): New constructor, from
11416         cp_new_demangle_parse_info.
11417         (~demangle_parse_info): New destructor, from
11418         cp_demangled_name_parse_free.
11419         (cp_merge_demangle_parse_infos): Update.
11420         (cp_demangled_name_to_comp): Change return type.
11421
11422 2017-01-10  Tom Tromey  <tom@tromey.com>
11423
11424         * top.c (prevent_dont_repeat): Change return type.
11425         * python/python.c (execute_gdb_command): Use std::string.
11426         Update.
11427         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11428         * command.h (prevent_dont_repeat): Change return type.
11429         * breakpoint.c (bpstat_do_actions_1): Update.
11430
11431 2017-01-10  Tom Tromey  <tom@tromey.com>
11432
11433         * value.h (scoped_value_mark::~scoped_value_mark): Call
11434         free_to_mark.
11435         (scoped_value_mark::free_to_mark): New method.
11436         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11437         scoped_value_mark.
11438
11439 2017-01-10  Tom Tromey  <tom@tromey.com>
11440
11441         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11442         (valpy_reference_value, valpy_const_value, valpy_get_address)
11443         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11444         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11445         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11446         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11447         scoped_value_mark.
11448         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11449         * value.h (scoped_value_mark): New class.
11450
11451 2017-01-10  Tom Tromey  <tom@tromey.com>
11452
11453         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11454         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11455         * psymtab.c (discard_psymtabs_upto): Remove.
11456         (make_cleanup_discard_psymtabs): Remove.
11457         (struct psymtab_state): Remove.
11458
11459 2017-01-10  Tom Tromey  <tom@tromey.com>
11460
11461         * record-full.c (record_full_save_cleanups): Remove.
11462         (record_full_save): Use gdb::unlinker.
11463         * gcore.c (do_bfd_delete_cleanup): Remove.
11464         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11465         cleanups.
11466         * dwarf2read.c (unlink_if_set): Remove.
11467         (write_psymtabs_to_index): Use gdb::unlinker.
11468         * common/gdb_unlinker.h: New file.
11469
11470 2017-01-10  Tom Tromey  <tom@tromey.com>
11471
11472         * windows-tdep.c (windows_xfer_shared_library): Update.
11473         * windows-nat.c (windows_make_so): Update.
11474         * utils.h (make_cleanup_bfd_unref): Remove.
11475         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11476         * symfile.h (symfile_bfd_open)
11477         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11478         * symfile.c (read_symbols, symbol_file_add)
11479         (separate_debug_file_exists): Update.
11480         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11481         (generic_load, reread_symbols): Update.
11482         * symfile-mem.c (symbol_file_add_from_memory): Update.
11483         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11484         (spu_symbol_file_add_from_memory): Update.
11485         * solist.h (struct target_so_ops) <bfd_open>: Return
11486         gdb_bfd_ref_ptr.
11487         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11488         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11489         gdb_bfd_ref_ptr.
11490         (solib_map_sections, reload_shared_libraries_1): Update.
11491         * solib-svr4.c (enable_break): Update.
11492         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11493         * solib-frv.c (enable_break2): Update.
11494         * solib-dsbt.c (enable_break): Update.
11495         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11496         gdb_bfd_ref_ptr.
11497         (darwin_solib_get_all_image_info_addr_at_init): Update.
11498         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11499         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11500         * record-full.c (record_full_save): Update.
11501         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11502         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11503         * minidebug.c (find_separate_debug_file_in_section): Return
11504         gdb_bfd_ref_ptr.
11505         * machoread.c (macho_add_oso_symfile): Change abfd to
11506         gdb_bfd_ref_ptr.
11507         (macho_symfile_read_all_oso): Update.
11508         (macho_check_dsym): Return gdb_bfd_ref_ptr.
11509         (macho_symfile_read): Update.
11510         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11511         (jit_bfd_try_read_symtab): Update.
11512         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11513         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11514         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11515         gdb_bfd_ref_ptr.
11516         (gdb_bfd_ref_policy): New struct.
11517         (gdb_bfd_ref_ptr): New typedef.
11518         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11519         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11520         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11521         gdb_bfd_ref_ptr.
11522         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11523         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11524         (gcore_command): Update.
11525         * exec.c (exec_file_attach): Update.
11526         * elfread.c (elf_symfile_read): Update.
11527         * dwarf2read.c (dwarf2_get_dwz_file): Update.
11528         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11529         (open_and_init_dwo_file): Update.
11530         (open_dwp_file): Return gdb_bfd_ref_ptr.
11531         (open_and_init_dwp_file): Update.
11532         * corelow.c (core_open): Update.
11533         * compile/compile-object-load.c (compile_object_load): Update.
11534         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11535         * coffread.c (coff_symfile_read): Update.
11536         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11537         gdb_bfd_ref_ptr.  Rename.
11538         (dump_bfd_file, restore_command): Update.
11539         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11540         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11541         (find_separate_debug_file_by_buildid): Update.
11542
11543 2017-01-10  Tom Tromey  <tom@tromey.com>
11544
11545         * common/gdb_ref_ptr.h: New file.
11546         * python/py-ref.h (struct gdbpy_ref_policy): New.
11547         (gdbpy_ref): Now a typedef.
11548
11549 2017-01-10  Tom Tromey  <tom@tromey.com>
11550
11551         * utils.h (make_cleanup_htab_delete): Don't declare.
11552         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11553         Remove.
11554         * linespec.c (decode_compound_collector): Add constructor,
11555         destructor.
11556         (lookup_prefix_sym): Remove cleanup.
11557         (symtab_collector): Add constructor, destructor.
11558         (collect_symtabs_from_filename): Remove cleanup.
11559         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11560         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11561         Use htab_up.
11562         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11563         * dwarf2read.c (dw2_expand_symtabs_matching)
11564         (dw2_map_symbol_filenames, dwarf_decode_macros)
11565         (write_psymtabs_to_index): Use htab_up.
11566         * dwarf2loc.c (func_verify_no_selftailcall)
11567         (call_site_find_chain_1, func_verify_no_selftailcall)
11568         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11569         std::vector, gdb::unique_xmalloc_ptr.
11570         (call_sitep): Remove typedef.
11571         (dwarf2_locexpr_baton_eval): Remove unused variable.
11572
11573 2017-01-10  Tom Tromey  <tom@tromey.com>
11574
11575         * python/python-internal.h (make_cleanup_py_decref)
11576         (make_cleanup_py_xdecref): Don't declare.
11577         * python/py-utils.c (py_decref, make_cleanup_py_decref)
11578         (py_xdecref, make_cleanup_py_xdecref): Remove.
11579
11580 2017-01-10  Tom Tromey  <tom@tromey.com>
11581
11582         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11583         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11584
11585 2017-01-10  Tom Tromey  <tom@tromey.com>
11586
11587         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11588
11589 2017-01-10  Tom Tromey  <tom@tromey.com>
11590
11591         * python/py-utils.c (unicode_to_encoded_string)
11592         (python_string_to_target_string)
11593         (python_string_to_target_python_string)
11594         (python_string_to_host_string, gdbpy_obj_to_string)
11595         (get_addr_from_python): Use gdbpy_ref.
11596
11597 2017-01-10  Tom Tromey  <tom@tromey.com>
11598
11599         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11600         gdbpy_ref.
11601
11602 2017-01-10  Tom Tromey  <tom@tromey.com>
11603
11604         * python/python.c (eval_python_command, gdbpy_decode_line)
11605         (gdbpy_run_events, gdbpy_start_type_printers)
11606         (gdbpy_apply_type_printers): Use gdbpy_ref.
11607
11608 2017-01-10  Tom Tromey  <tom@tromey.com>
11609
11610         * python/py-param.c (get_doc_string, compute_enum_values): Use
11611         gdbpy_ref.
11612
11613 2017-01-10  Tom Tromey  <tom@tromey.com>
11614
11615         * python/py-inferior.c (find_thread_object, build_inferior_list):
11616         Use gdbpy_ref.
11617
11618 2017-01-10  Tom Tromey  <tom@tromey.com>
11619
11620         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11621
11622 2017-01-10  Tom Tromey  <tom@tromey.com>
11623
11624         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11625         gdbpy_ref.
11626
11627 2017-01-10  Tom Tromey  <tom@tromey.com>
11628
11629         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11630         extra incref.
11631         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11632         Use gdbpy_ref.
11633
11634 2017-01-10  Tom Tromey  <tom@tromey.com>
11635
11636         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11637         gdbpy_ref.
11638
11639 2017-01-10  Tom Tromey  <tom@tromey.com>
11640
11641         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11642         decref results of PyArg_ParseTupleAndKeywords.
11643
11644 2017-01-10  Tom Tromey  <tom@tromey.com>
11645
11646         * python/python.c (python_run_simple_file): Use
11647         unique_xmalloc_ptr, gdbpy_ref.
11648
11649 2017-01-10  Tom Tromey  <tom@tromey.com>
11650
11651         * python/py-prettyprint.c (print_stack_unless_memory_error)
11652         (print_string_repr, print_children): Use gdbpy_ref.
11653         (dummy_python_frame): New class.
11654         (dummy_python_frame::dummy_python_frame): Rename from
11655         push_dummy_python_frame.
11656         (py_restore_tstate): Remove.
11657
11658 2017-01-10  Tom Tromey  <tom@tromey.com>
11659
11660         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11661
11662 2017-01-10  Tom Tromey  <tom@tromey.com>
11663
11664         * python/python.c (ensure_python_env, restore_python_env):
11665         Remove.
11666         * python/python-internal.h (ensure_python_env): Don't declare.
11667         * varobj.h (varobj_ensure_python_env): Don't declare.
11668         * varobj.c (varobj_ensure_python_env): Remove.
11669
11670 2017-01-10  Tom Tromey  <tom@tromey.com>
11671
11672         * varobj.c (varobj_value_get_print_value): Use
11673         gdbpy_enter_varobj.
11674
11675 2017-01-10  Tom Tromey  <tom@tromey.com>
11676
11677         * python/py-prettyprint.c (print_string_repr, print_children):
11678         Update.
11679         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11680         of "encoding".
11681         * varobj.c (varobj_value_get_print_value): Update.
11682         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11683
11684 2017-01-10  Tom Tromey  <tom@tromey.com>
11685
11686         * varobj.c (varobj_get_display_hint)
11687         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11688         (varobj_set_visualizer, free_variable): Use
11689         gdbpy_enter_varobj.
11690
11691 2017-01-10  Tom Tromey  <tom@tromey.com>
11692
11693         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11694         (do_finish_initialization): New function.  Use gdbpy_ref.
11695         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11696         do_finish_initialization.
11697
11698 2017-01-10  Tom Tromey  <tom@tromey.com>
11699
11700         * python/py-param.c (get_set_value, get_show_value): Use
11701         gdbpy_enter, gdbpy_ref.
11702
11703 2017-01-10  Tom Tromey  <tom@tromey.com>
11704
11705         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11706
11707 2017-01-10  Tom Tromey  <tom@tromey.com>
11708
11709         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11710
11711 2017-01-10  Tom Tromey  <tom@tromey.com>
11712
11713         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11714         Use gdbpy_enter_varobj.
11715
11716 2017-01-10  Tom Tromey  <tom@tromey.com>
11717
11718         * varobj.c (gdbpy_enter_varobj): New constructor.
11719         * python/python-internal.h (gdbpy_enter_varobj): New class.
11720         * python/py-varobj.c (py_varobj_get_iterator): Use
11721         gdbpy_enter_varobj.
11722
11723 2017-01-10  Tom Tromey  <tom@tromey.com>
11724
11725         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11726         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11727         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11728         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11729         unique_xmalloc_ptr.
11730         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11731
11732 2017-01-10  Tom Tromey  <tom@tromey.com>
11733
11734         * python/py-xmethods.c (invoke_match_method): Use
11735         gdbpy_ref.
11736
11737 2017-01-10  Tom Tromey  <tom@tromey.com>
11738
11739         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11740         gdbpy_enter, gdbpy_ref.
11741
11742 2017-01-10  Tom Tromey  <tom@tromey.com>
11743
11744         * python/python.c (python_interactive_command): Use gdbpy_enter.
11745
11746 2017-01-10  Tom Tromey  <tom@tromey.com>
11747
11748         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11749         gdbpy_ref.
11750
11751 2017-01-10  Tom Tromey  <tom@tromey.com>
11752
11753         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11754         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11755
11756 2017-01-10  Tom Tromey  <tom@tromey.com>
11757
11758         * utils.h (htab_deleter): New struct.
11759         (htab_up): New typedef.
11760         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11761         gdbpy_enter, gdbpy_ref, htab_up.
11762
11763 2017-01-10  Tom Tromey  <tom@tromey.com>
11764
11765         * python/py-unwind.c (pending_frame_invalidate): Remove.
11766         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11767
11768 2017-01-10  Tom Tromey  <tom@tromey.com>
11769
11770         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11771         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11772
11773 2017-01-10  Tom Tromey  <tom@tromey.com>
11774
11775         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11776
11777 2017-01-10  Tom Tromey  <tom@tromey.com>
11778
11779         * python/python.c (gdbpy_eval_from_control_command)
11780         (gdbpy_source_script, gdbpy_run_events)
11781         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11782         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11783         gdbpy_enter.
11784
11785 2017-01-10  Tom Tromey  <tom@tromey.com>
11786
11787         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11788
11789 2017-01-10  Tom Tromey  <tom@tromey.com>
11790
11791         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11792
11793 2017-01-10  Tom Tromey  <tom@tromey.com>
11794
11795         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11796         (python_on_inferior_call_pre, python_on_inferior_call_post)
11797         (python_on_memory_change, python_on_register_change)
11798         (python_inferior_exit, python_new_objfile, add_thread_object)
11799         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11800
11801 2017-01-10  Tom Tromey  <tom@tromey.com>
11802
11803         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11804         (bpfinishpy_handle_exit): Use gdbpy_enter.
11805
11806 2017-01-10  Tom Tromey  <tom@tromey.com>
11807
11808         * python/py-cmd.c (cmdpy_destroyer)
11809         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11810         gdbpy_enter.
11811
11812 2017-01-10  Tom Tromey  <tom@tromey.com>
11813
11814         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11815         gdbpy_enter.
11816         (gdbpy_breakpoint_has_cond): Likewise.
11817
11818 2017-01-10  Tom Tromey  <tom@tromey.com>
11819
11820         * python/python.c (gdbpy_enter): New constructor.
11821         (~gdbpy_enter): New destructor.
11822         (restore_python_env, ensure_python_env): Rewrite.
11823         * python/python-internal.h (gdbpy_enter): New class.
11824
11825 2017-01-10  Tom Tromey  <tom@tromey.com>
11826
11827         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11828
11829 2017-01-10  Tom Tromey  <tom@tromey.com>
11830
11831         * python/py-value.c (value_has_field, get_field_flag)
11832         (get_field_type, valpy_getitem, convert_value_from_python): Use
11833         gdbpy_ref.
11834
11835 2017-01-10  Tom Tromey  <tom@tromey.com>
11836
11837         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11838         gdbpy_ref.
11839
11840 2017-01-10  Tom Tromey  <tom@tromey.com>
11841
11842         * python/py-prettyprint.c (search_pp_list)
11843         (find_pretty_printer_from_objfiles)
11844         (find_pretty_printer_from_progspace)
11845         (find_pretty_printer_from_gdb, find_pretty_printer)
11846         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11847         gdbpy_ref.
11848
11849 2017-01-10  Tom Tromey  <tom@tromey.com>
11850
11851         * python/py-param.c (call_doc_function): Use gdbpy_ref.
11852
11853 2017-01-10  Tom Tromey  <tom@tromey.com>
11854
11855         * python/py-linetable.c (build_line_table_tuple_from_pcs)
11856         (ltpy_get_all_source_lines): Use gdbpy_ref.
11857
11858 2017-01-10  Tom Tromey  <tom@tromey.com>
11859
11860         * python/py-framefilter.c (extract_sym, extract_value)
11861         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11862         gdbpy_ref.
11863
11864 2017-01-10  Tom Tromey  <tom@tromey.com>
11865
11866         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11867
11868 2017-01-10  Tom Tromey  <tom@tromey.com>
11869
11870         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11871
11872 2017-01-10  Tom Tromey  <tom@tromey.com>
11873
11874         * python/py-function.c (convert_values_to_python, fnpy_init): Use
11875         gdbpy_ref.
11876
11877 2017-01-10  Tom Tromey  <tom@tromey.com>
11878
11879         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11880
11881 2017-01-10  Tom Tromey  <tom@tromey.com>
11882
11883         * python/py-type.c (convert_field, make_fielditem, typy_fields)
11884         (typy_range): Use gdbpy_ref.
11885
11886 2017-01-10  Tom Tromey  <tom@tromey.com>
11887
11888         * python/py-threadevent.c (create_thread_event_object): Use
11889         gdbpy_ref.
11890         * python/py-stopevent.c (create_stop_event_object): Simplify.
11891         (emit_stop_event): Use gdbpy_ref.
11892         * python/py-signalevent.c (create_signal_event_object): Use
11893         gdbpy_ref.
11894         * python/py-newobjfileevent.c (create_new_objfile_event_object)
11895         (emit_new_objfile_event, create_clear_objfiles_event_object)
11896         (emit_clear_objfiles_event): Use gdbpy_ref.
11897         * python/py-infevents.c (create_inferior_call_event_object)
11898         (create_register_changed_event_object)
11899         (create_memory_changed_event_object, emit_inferior_call_event)
11900         (emit_memory_changed_event, emit_register_changed_event): Use
11901         gdbpy_ref.
11902         * python/py-exitedevent.c (create_exited_event_object)
11903         (emit_exited_event): Use gdbpy_ref.
11904         * python/py-event.h (evpy_emit_event): Remove
11905         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11906         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11907         * python/py-continueevent.c (emit_continue_event): Use
11908         gdbpy_ref.
11909         * python/py-breakpoint.c (gdbpy_breakpoint_created)
11910         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11911         gdbpy_ref.
11912         * python/py-bpevent.c (create_breakpoint_event_object): Use
11913         gdbpy_ref.
11914
11915 2017-01-10  Tom Tromey  <tom@tromey.com>
11916
11917         * python/py-ref.h: New file.
11918
11919 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11920
11921         * cli-out.c (cli_ui_out::do_redirect): Change return type to
11922         void.
11923         * cli-out.h (cli_ui_out::do_redirect): Likewise.
11924         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11925         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11926         * ui-out.c (ui_out::redirect): Likewise.
11927         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11928         * cli/cli-logging.c (set_logging_redirect): Update call site of
11929         ui_out::redirect.
11930         (handle_redirections): Likewise.
11931         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11932         * top.c (execute_command_to_string): Likewise.
11933         * utils.c (do_ui_out_redirect_pop): Likewise.
11934
11935 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11936
11937         * stack.c (_initialize_stack): Update "frame" command help message.
11938
11939 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
11940
11941         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11942
11943 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11944
11945         * x86-linux-nat.h: Include gdb_proc_service.h.
11946
11947 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11948
11949         * ser-base.h: Include serial.h.
11950
11951 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11952
11953         * ppc-linux-tdep.h: Include ppc-tdep.h.
11954
11955 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11956
11957         * nat/amd64-linux-siginfo.h: Include signal.h.
11958
11959 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11960
11961         * nat/aarch64-linux-hw-point.h: Include break-common.h.
11962
11963 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11964
11965         * mi/mi-parse.h: Include mi-cmds.h.
11966
11967 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11968
11969         * inf-loop.c: Don't include "target.h".
11970         * inf-loop.h: Include it here.
11971
11972 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11973
11974         * dfp.h: Include "dboulest.h" and "expression.h".
11975
11976 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11977
11978         * ax-gdb.h: Include "ax.h".
11979
11980 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11981
11982         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11983         with nat/gdb_ptrace.h.
11984
11985 2017-01-05  Yao Qi  <yao.qi@linaro.org>
11986
11987         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11988         new line.
11989         (mips64_fbsd_sigframe_init): Likewise.
11990
11991 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11992
11993         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11994         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11995
11996 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11997
11998         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11999         * NEWS: Mention new FreeBSD/mips native configuration.
12000         * config/mips/fbsd.mh: New file.
12001         * configure.host: Add mips*-*-freebsd*.
12002         * mips-fbsd-nat.c: New file.
12003
12004 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12005
12006         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12007         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12008         * NEWS: Mention new FreeBSD/mips target.
12009         * configure.tgt: Add mips*-*-freebsd*.
12010         * mips-fbsd-tdep.c: New file.
12011         * mips-fbsd-tdep.h: New file.
12012
12013 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12014
12015         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12016         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12017
12018 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12019
12020         Update copyright year range in all GDB files.
12021
12022 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12023
12024         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12025
12026 For older changes see ChangeLog-2016.
12027 \f
12028 Local Variables:
12029 mode: change-log
12030 left-margin: 8
12031 fill-column: 74
12032 version-control: never
12033 coding: utf-8
12034 End: