Remove cleanups from mi-cmd-var.c
[external/binutils.git] / gdb / ChangeLog
1 2017-09-29  Tom Tromey  <tom@tromey.com>
2
3         * varobj.h (varobj_gen_name): Return std::string.
4         * varobj.c (varobj_gen_name): Return std::string.
5         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6         (mi_cmd_var_delete): Don't copy "name".
7
8 2017-09-29  Tom Tromey  <tom@tromey.com>
9
10         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
11         (mi_cmd_break_insert_1): Update.
12
13 2017-09-29  Tom Tromey  <tom@tromey.com>
14
15         * target.h (make_scoped_defer_target_commit_resume): Update.
16         * target.c (make_scoped_defer_target_commit_resume): Rename from
17         make_cleanup_defer_target_commit_resume.  Return a
18         scoped_restore.
19         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
20
21 2017-09-29  Tom Tromey  <tom@tromey.com>
22
23         * main.c (captured_main_1): Remove unused declaration.
24         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
25
26 2017-09-29  Tom Tromey  <tom@tromey.com>
27
28         * symtab.c (search_symbols): Remove unused outer cleanup.
29         (make_source_files_completion_list): Remove unused declaration.
30
31 2017-09-29  Tom Tromey  <tom@tromey.com>
32
33         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
34
35 2017-09-29  Tom Tromey  <tom@tromey.com>
36
37         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
38         gdb::byte_vector.
39
40 2017-09-29  Tom Tromey  <tom@tromey.com>
41
42         * complaints.c (vcomplaint): Use std::string.
43
44 2017-09-29  Tom Tromey  <tom@tromey.com>
45
46         * tracepoint.c (trace_variable_command): Use std::string.
47         (encode_actions_1): Remove unused declarations.
48         (create_tsv_from_upload): Use std::string.
49
50 2017-09-29  Tom Tromey  <tom@tromey.com>
51
52         * cp-support.c (gdb_demangle): Use std::string.
53
54 2017-09-29  Tom Tromey  <tom@tromey.com>
55
56         * stack.c (parse_frame_specification): Use std::string
57         (info_frame_command): Use gdb::unique_xmalloc_ptr.
58
59 2017-09-29  Tom Tromey  <tom@tromey.com>
60
61         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
62
63 2017-09-29  Tom Tromey  <tom@tromey.com>
64
65         * utils.c (vfprintf_maybe_filtered): Use std::string.
66         (vfprintf_unfiltered): Likewise.
67
68 2017-09-29  Tom Tromey  <tom@tromey.com>
69
70         * event-top.c (top_level_prompt): Return std::string.
71         (display_gdb_prompt): Update.
72
73 2017-09-29  Tom Tromey  <tom@tromey.com>
74
75         * unittests/common-utils-selftests.c (format): New function.
76         (string_vprintf_tests): New function.
77         (_initialize_common_utils_selftests): Register new tests.
78         * common/common-utils.c (string_vprintf): New function.
79         * common/common-utils.h (string_vprintf): Declare.
80
81 2017-09-29  Pedro Alves  <palves@redhat.com>
82
83         * common/rsp-low.c (unpack_varlen_hex): Constify.
84         * common/rsp-low.h (unpack_varlen_hex): Constify.
85         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
86         Constify.
87         * remote.c (remote_set_permissions, read_ptid)
88         (remote_current_thread, remote_get_threads_with_qthreadinfo)
89         (remote_static_tracepoint_marker_at)
90         (remote_static_tracepoint_markers_by_strid)
91         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
92         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
93         (parse_tracepoint_definition, parse_tsv_definition)
94         (parse_static_tracepoint_marker_definition): Constify.
95         * tracepoint.h (parse_static_tracepoint_marker_definition)
96         (parse_trace_status, parse_tracepoint_status)
97         (parse_tracepoint_definition, parse_tsv_definition): Constify.
98
99 2017-09-29  Pedro Alves  <palves@redhat.com>
100
101         * remote.c (target_buf, target_buf_size): Delete.
102         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
103         Use the connection's packet buffer instead.
104         All callers adjusted.
105         (_initialize_remote): Remove references to target_buf and
106         target_buf_size.
107
108 2017-09-28  Pedro Alves  <palves@redhat.com>
109
110         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
111         unittests/common-utils-selftests.c.
112         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
113         (COMMON_OBS): Remove utils-selftests.o.
114         * utils-selftests.c: Move to ...
115         * unittests/common-utils-selftests.c: ... here and rename self
116         test to "string_printf".
117
118 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
119
120         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
121         having NULL cus or tus.
122
123 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
124
125         * arm-tdep.c: (convert_from_extended): Remove.
126         (convert_to_extended): Likewise.
127         (arm_extract_return_value): Use convert_typed_floating.
128         (arm_store_return_value): Likewise.
129
130         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
131         * sh-tdep.c: Do not include "floatformat.h".
132         (sh_littlebyte_bigword_type): New function.
133         (sh_register_convert_to_virtual): Use convert_typed_floating.
134         (sh_register_convert_to_raw): Likewise.
135         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
136         (sh64_littlebyte_bigword_type): New function.
137         (sh64_extract_return_value): Use convert_typed_floating.
138         (sh64_register_convert_to_virtual): Likewise.
139         (sh64_register_convert_to_raw): Likewise.
140
141 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
142
143         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
144         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
145
146         * gdbtypes.h (union type_specific): Make field floatformat hold
147         just a single struct floatformat, not an array.
148         (floatformat_from_type): Move here.
149         * gdbtypes.c (floatformat_from_type): Move here.  Update to
150         changed TYPE_FLOATFORMAT definition.
151         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
152         (recursive_dump_type): Likewise.
153         (init_float_type): Install correct floatformat for byte order.
154         (arch_float_type): Likewise.
155
156 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
157
158         * gdbtypes.c (init_type): Change incoming argument from
159         length-in-bytes to length-in-bits.  Assert length is a
160         multiple of TARGET_CHAR_BITS.
161         (arch_type, arch_flags_type): Likewise.
162         (init_integer_type): Update call to init_type.
163         (init_character_type): Likewise.
164         (init_boolean_type): Likewise.
165         (init_float_type): Likewise.
166         (init_decfloat_type): Likewise.
167         (init_complex_type): Likewise.
168         (init_pointer_type): Likewise.
169         (objfile_type): Likewise.
170         (arch_integer_type): Update call to arch_type.
171         (arch_character_type): Likewise.
172         (arch_boolean_type): Likewise.
173         (arch_float_type): Likewise.
174         (arch_decfloat_type): Likewise.
175         (arch_complex_type): Likewise.
176         (arch_pointer_type): Likewise.
177         (gdbtypes_post_init): Likewise.
178
179         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
180         (read_base_type): Likewise.
181         * mdebugread.c (basic_type): Likewise.
182         * stabsread.c (dbx_init_float_type): Likewise.
183         (rs6000_builtin_type): Likewise.
184         (read_range_type): Likewise.  Also, fix call to init_integer_type
185         with erroneous length argument.
186
187         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
188         * d-lang.c (build_d_types): Likewise.
189         * f-lang.c (build_fortran_types): Likewise.
190         * go-lang.c (build_go_types): Likewise.
191         * opencl-lang.c (build_opencl_types): Likewise.
192         * jit.c (finalize_symtab): Likewise.
193         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
194         (build_std_type_info_type): Likewise.
195         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
196         update call to arch_flags_type.
197
198         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
199         arch_type.
200         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
201         * windows-tdep.c (windows_get_tlb_type): Likewise.
202
203         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
204         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
205         * m32c-tdep.c (make_types): Likewise.
206         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
207         (rl78_psw_type): Update call to arch_flags_type.
208         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
209         * rx-tdep.c (rx_psw_type): Likewise.
210         (rx_fpsw_type): Likewise.
211         * sparc-tdep.c (sparc_psr_type): Likewise.
212         (sparc_fsr_type): Likewise.
213         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
214         (sparc64_ccr_type): Likewise.
215         (sparc64_fsr_type): Likewise.
216         (sparc64_fprs_type): Likewise.
217
218 2017-09-27  Tom Tromey  <tom@tromey.com>
219
220         * findcmd.c (find_command): Constify.
221
222 2017-09-27  Tom Tromey  <tom@tromey.com>
223
224         * ada-tasks.c (task_command_1, task_command): Constify.
225
226 2017-09-27  Tom Tromey  <tom@tromey.com>
227
228         * symtab.c (maintenance_print_symbol_cache)
229         (maintenance_flush_symbol_cache)
230         (maintenance_print_symbol_cache_statistics): Constify.
231
232 2017-09-27  Tom Tromey  <tom@tromey.com>
233
234         * inferior.c (detach_inferior_command, kill_inferior_command)
235         (inferior_command): Constify.
236
237 2017-09-27  Tom Tromey  <tom@tromey.com>
238
239         * regcache.c (regcache_print, maintenance_print_registers)
240         (maintenance_print_raw_registers)
241         (maintenance_print_cooked_registers)
242         (maintenance_print_register_groups)
243         (maintenance_print_remote_registers): Constify.
244
245 2017-09-27  Tom Tromey  <tom@tromey.com>
246
247         * printcmd.c (map_display_numbers, undisplay_command)
248         (enable_disable_display_command, enable_display_command)
249         (disable_display_command): Constify.
250
251 2017-09-27  Tom Tromey  <tom@tromey.com>
252
253         * breakpoint.h (delete_command): Don't declare.
254         * breakpoint.c (delete_command, enable_once_command)
255         (enable_count_command, enable_delete_command, breakpoint_1)
256         (maintenance_info_breakpoints, stopin_command, stopat_command)
257         (delete_command, delete_trace_command, save_breakpoints)
258         (save_breakpoints_command, save_tracepoints_command): Constify.
259
260 2017-09-27  Tom Tromey  <tom@tromey.com>
261
262         * macrocmd.c (macro_expand_command, macro_expand_once_command)
263         (skip_ws, extract_identifier, macro_define_command)
264         (macro_undef_command, macro_list_command): Constify.
265
266 2017-09-27  Tom Tromey  <tom@tromey.com>
267
268         * infcmd.c (environment_info, set_environment_command)
269         (unset_environment_command, path_info, info_proc_cmd_1)
270         (info_proc_cmd_mappings, info_proc_cmd_stat)
271         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
272         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
273
274 2017-09-27  Tom Tromey  <tom@tromey.com>
275
276         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
277         Constify.
278
279 2017-09-27  Tom Tromey  <tom@tromey.com>
280
281         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
282
283 2017-09-27  Tom Tromey  <tom@tromey.com>
284
285         * demangle.c (demangle_command): Constify.
286
287 2017-09-27  Tom Tromey  <tom@tromey.com>
288
289         * progspace.c (maintenance_info_program_spaces_command):
290         Constify.
291
292 2017-09-27  Tom Tromey  <tom@tromey.com>
293
294         * compile/compile.c (check_raw_argument, compile_file_command)
295         (compile_code_command, compile_print_command): Constify.
296
297 2017-09-27  Tom Tromey  <tom@tromey.com>
298
299         * reggroups.c (maintenance_print_reggroups): Constify.
300
301 2017-09-27  Tom Tromey  <tom@tromey.com>
302
303         * dwarf2read.c (save_gdb_index_command): Constify.
304
305 2017-09-27  Tom Tromey  <tom@tromey.com>
306
307         * stap-probe.c (info_probes_stap_command): Constify.
308
309 2017-09-27  Tom Tromey  <tom@tromey.com>
310
311         * fork-child.c (unset_exec_wrapper_command): Constify.
312
313 2017-09-27  Tom Tromey  <tom@tromey.com>
314
315         * btrace.c (get_uint, get_context_size, no_chunk)
316         (maint_btrace_packet_history_cmd)
317         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
318         (maint_info_btrace_cmd): Constify.
319
320 2017-09-27  Tom Tromey  <tom@tromey.com>
321
322         * reverse.c (delete_bookmark_command): Constify.
323
324 2017-09-27  Tom Tromey  <tom@tromey.com>
325
326         * remote.c (set_memory_packet_size)
327         (set_memory_write_packet_size, show_memory_write_packet_size)
328         (set_memory_read_packet_size, show_memory_read_packet_size)
329         (compare_sections_command, packet_command, remote_put_command)
330         (remote_get_command, remote_delete_command): Constify.
331
332 2017-09-27  Tom Tromey  <tom@tromey.com>
333
334         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
335         (set_mipsfpu_double_command, set_mipsfpu_none_command)
336         (set_mipsfpu_auto_command): Constify.
337
338 2017-09-27  Tom Tromey  <tom@tromey.com>
339
340         * cli/cli-cmds.h (cd_command): Constify.
341         * cli/cli-cmds.c (cd_command): Constify.
342
343 2017-09-27  Tom Tromey  <tom@tromey.com>
344
345         * thread.c (thread_name_command, thread_find_command): Constify.
346
347 2017-09-27  Tom Tromey  <tom@tromey.com>
348
349         * probe.c (enable_probes_command, disable_probes_command):
350         Constify.
351
352 2017-09-27  Tom Tromey  <tom@tromey.com>
353
354         * symfile.c (symbol_file_command): Constify.
355         * gdbcore.h (deprecated_file_changed_hook): Constify.
356         * exec.c (deprecated_file_changed_hook, exec_file_command)
357         (file_command): Constify.
358         * defs.h (symbol_file_command): Constify.
359
360 2017-09-27  Tom Tromey  <tom@tromey.com>
361
362         * remote-fileio.c (set_system_call_allowed)
363         (show_system_call_allowed): Constify.
364
365 2017-09-27  Tom Tromey  <tom@tromey.com>
366
367         * tracepoint.c (delete_trace_variable_command)
368         (tfind_end_command, tfind_start_command, tfind_pc_command)
369         (tfind_tracepoint_command, tfind_line_command)
370         (tfind_range_command, tfind_outside_command): Constify.
371
372 2017-09-27  Tom Tromey  <tom@tromey.com>
373
374         * ax-gdb.c (maint_agent_printf_command, agent_command)
375         (agent_eval_command): Constify.
376
377 2017-09-27  Tom Tromey  <tom@tromey.com>
378
379         * tracepoint.c (info_scope_command): Constify.
380         * python/python.c (gdbpy_decode_line): Constify.
381         * python/py-breakpoint.c (bppy_init): Constify.
382         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
383         * location.h: (new_linespec_location)
384         (string_to_event_location_basic, string_to_event_location):
385         Constify.
386         * location.c (new_linespec_location)
387         (string_to_event_location_basic, string_to_event_location):
388         Constify.
389         * linespec.h (decode_line_with_current_source)
390         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
391         * linespec.c (linespec_lex_to_end)
392         (decode_line_with_current_source)
393         (decode_line_with_last_displayed): Constify.
394         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
395         Constify.
396         * cli/cli-cmds.c (edit_command, list_command): Constify.
397         * breakpoint.h (until_break_command, watch_command_wrapper)
398         (awatch_command_wrapper, rwatch_command_wrapper)
399         (init_ada_exception_breakpoint): Constify.
400         * breakpoint.c (break_command_1, dprintf_command)
401         (break_range_command, watch_command_wrapper)
402         (rwatch_command_wrapper, awatch_command_wrapper)
403         (until_break_command, init_ada_exception_breakpoint)
404         (strace_marker_create_sals_from_location, trace_command)
405         (ftrace_command, strace_command, struct tracepoint): Constify.
406         * ax-gdb.c (agent_command_1): Constify.
407         * ada-lang.c (ada_exception_sal): Constify.
408
409 2017-09-27  Tom Tromey  <tom@tromey.com>
410
411         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
412         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
413         (get_context_size, no_chunk, get_insn_history_modifiers)
414         (cmd_record_insn_history, get_call_history_modifiers)
415         (cmd_record_call_history): Constify.
416
417 2017-09-27  Tom Tromey  <tom@tromey.com>
418
419         * source.c (show_substitute_path_command)
420         (unset_substitute_path_command, set_substitute_path_command):
421         Constify.
422
423 2017-09-27  Tom Tromey  <tom@tromey.com>
424
425         * typeprint.c (maintenance_print_type): Constify.
426         * maint.c (maintenance_dump_me, maintenance_demangle)
427         (maintenance_time_display, maintenance_info_sections)
428         (maintenance_print_statistics, maintenance_deprecate)
429         (maintenance_undeprecate): Constify.
430         (maintenance_do_deprecate): Constify.  Use std::string.
431         (maintenance_selftest): Constify.
432         * gdbtypes.h (maintenance_print_type): Constify.
433
434 2017-09-27  Tom Tromey  <tom@tromey.com>
435
436         * hppa-tdep.c (unwind_command): Constify.
437
438 2017-09-27  Tom Tromey  <tom@tromey.com>
439
440         * target-descriptions.c (unset_tdesc_filename_cmd)
441         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
442         Constify.
443
444 2017-09-27  Tom Tromey  <tom@tromey.com>
445
446         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
447
448 2017-09-27  Tom Tromey  <tom@tromey.com>
449
450         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
451
452 2017-09-27  Tom Tromey  <tom@tromey.com>
453
454         * tui/tui-regs.c (tui_reg_command): Constify.
455
456 2017-09-27  Tom Tromey  <tom@tromey.com>
457
458         * skip.c (skip_file_command, skip_function_command)
459         (skip_enable_command, skip_disable_command, skip_delete_command):
460         Constify.
461
462 2017-09-27  Tom Tromey  <tom@tromey.com>
463
464         * record-btrace.c (cmd_record_btrace_bts_start)
465         (cmd_record_btrace_pt_start): Constify.
466
467 2017-09-27  Tom Tromey  <tom@tromey.com>
468
469         * symmisc.c (maintenance_print_symbols)
470         (maintenance_print_msymbols, maintenance_print_objfiles)
471         (maintenance_info_symtabs, maintenance_check_symtabs)
472         (maintenance_expand_symtabs, maintenance_info_line_tables):
473         Constify.
474
475 2017-09-27  Tom Tromey  <tom@tromey.com>
476
477         * top.c (new_ui_command): Constify.
478
479 2017-09-27  Tom Tromey  <tom@tromey.com>
480
481         * symfile.c (add_symbol_file_command)
482         (remove_symbol_file_command, list_overlays_command)
483         (map_overlay_command, unmap_overlay_command)
484         (overlay_auto_command, overlay_manual_command)
485         (overlay_off_command, overlay_load_command): Constify.
486
487 2017-09-27  Tom Tromey  <tom@tromey.com>
488
489         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
490         (info_spu_mailbox_command, info_spu_dma_command)
491         (info_spu_proxydma_command): Constify.
492
493 2017-09-27  Tom Tromey  <tom@tromey.com>
494
495         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
496
497 2017-09-27  Tom Tromey  <tom@tromey.com>
498
499         * cli/cli-script.c (user_defined_command): Constify.
500
501 2017-09-27  Tom Tromey  <tom@tromey.com>
502
503         * cli/cli-dump.c (dump_memory_command, dump_value_command)
504         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
505         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
506         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
507         (dump_binary_value, append_binary_memory, append_binary_value):
508         Constify.
509         (struct dump_context) <func>: Constify.
510         (add_dump_command): Update.
511
512 2017-09-27  Tom Tromey  <tom@tromey.com>
513
514         * cli/cli-cmds.c (show_version, show_configuration)
515         (source_command, show_user): Constify.
516
517 2017-09-27  Tom Tromey  <tom@tromey.com>
518
519         * target.c (maintenance_print_target_stack): Constify.
520
521 2017-09-27  Tom Tromey  <tom@tromey.com>
522
523         * interps.c (interpreter_exec_cmd): Constify.
524
525 2017-09-27  Tom Tromey  <tom@tromey.com>
526
527         * record-full.c (cmd_record_full_restore): Constify.
528
529 2017-09-27  Tom Tromey  <tom@tromey.com>
530
531         * memattr.c (enable_mem_command, disable_mem_command)
532         (delete_mem_command): Constify.
533
534 2017-09-27  Tom Tromey  <tom@tromey.com>
535
536         * value.c (show_convenience): Constify.
537
538 2017-09-27  Tom Tromey  <tom@tromey.com>
539
540         * gdbcore.h (core_file_command): Update.
541         * corefile.c (core_file_command): Constify.
542
543 2017-09-27  Tom Tromey  <tom@tromey.com>
544
545         * user-regs.c (maintenance_print_user_registers): Constify.
546
547 2017-09-27  Tom Tromey  <tom@tromey.com>
548
549         * cp-namespace.c (maintenance_cplus_namespace): Constify.
550
551 2017-09-27  Tom Tromey  <tom@tromey.com>
552
553         * cp-support.c (first_component_command): Constify.
554
555 2017-09-27  Tom Tromey  <tom@tromey.com>
556
557         * psymtab.c (maintenance_print_psymbols)
558         (maintenance_info_psymtabs, maintenance_check_psymtabs):
559         Constify.
560
561 2017-09-27  Tom Tromey  <tom@tromey.com>
562
563         * windows-tdep.c (display_tib): Constify.
564
565 2017-09-27  Tom Tromey  <tom@tromey.com>
566
567         * linux-fork.c (delete_checkpoint_command)
568         (detach_checkpoint_command): Constify.
569
570 2017-09-27  Tom Tromey  <tom@tromey.com>
571
572         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
573
574 2017-09-27  Tom Tromey  <tom@tromey.com>
575
576         * arc-tdep.c (dump_arc_instruction_command): Constify.
577
578 2017-09-27  Tom Tromey  <tom@tromey.com>
579
580         * valprint.c (set_radix, show_radix): Constify.
581
582 2017-09-27  Tom Tromey  <tom@tromey.com>
583
584         * dtrace-probe.c (info_probes_dtrace_command): Constify.
585
586 2017-09-27  Tom Tromey  <tom@tromey.com>
587
588         * command.h (not_just_help_class_command): Update.
589         * cli/cli-decode.h (not_just_help_class_command): Update.
590         * cli/cli-decode.c (not_just_help_class_command): Constify.
591
592 2017-09-27  Tom Tromey  <tom@tromey.com>
593
594         * gdb_bfd.c (maintenance_info_bfds): Constify.
595
596 2017-09-27  Tom Tromey  <tom@tromey.com>
597
598         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
599         overloads.
600         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
601         (do_const_cfunc): New function.
602         (cmd_cfunc_eq): New overload.
603         (cli_user_command_p): Check do_const_cfunc.
604         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
605         const_cfunc.
606         * command.h (add_cmd): Add const overload and no-function
607         overload.
608         (set_cmd_cfunc): Add const overload.
609         (cmd_const_cfunc_ftype): Declare.
610         (cmd_cfunc_eq): Add const overload.
611         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
612         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
613         overload.
614
615 2017-09-27  Tom Tromey  <tom@tromey.com>
616
617         * macroexp.c (get_next_token_for_substitution): New function.
618         (substitute_args): Call it.  Check for __VA_OPT__.
619
620 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
621             Pedro Alves <palves@redhat.com>
622
623         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
624         producer_is_icc_lt_14.
625         (producer_is_icc_lt_14): New function.
626         (check_producer): Add code for checking version of ICC.
627         (producer_is_icc): Move to producer.c.
628         (read_structure_type): Restrict ICC workaround to ICC<14.
629         * producer.c: Include selftest.h.
630         (producer_is_icc, producer_parsing_tests, _initialize_producer):
631         New functions.
632         * producer.h (producer_is_icc): New declaration.
633
634 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
635
636         * Makefile.in (SFILES): Add producer.c.
637         (COMMON_OBS): Add producer.o
638         * amd64-tdep.c (producer.h): Add new include.
639         * dwarf2read.c (producer.h): Add new include.
640         * producer.c: New file.
641         * producer.h: New file.
642         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
643         producer.c.
644         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
645         producer.h.
646
647 2017-09-26  Matthias Klose  <doko@ubuntu.com>
648
649         * configure.ac: Search ncursesw before ncurses.
650         Check ncursesw/ncurses.h before ncurses/ncurses.h.
651         * gdb_curses.h: Include <ncursesw/ncurses.h>
652         * config.in, configure: Regenerate.
653
654 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
655
656         PR gdb/22185
657         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
658         obsolete.
659         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
660         Remove i386sol2 support.
661         * configure.nat <i386sol2>: Remove.
662         <sol2-64>: Fold into ...
663         <sol2>: ... this.
664         Move common settings to default section.
665         Add sol-thread.o.
666         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
667         x86_64-*-solaris2.1[0-9]*>: Rename to ...
668         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
669         <i[34567]86-*-solaris*>: Remove.
670         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
671
672         * configure.ac: Remove wctype in libw check.
673         (_MSE_INT_H): Don't define on Solaris 7-9.
674         <solaris*>: Remove libthread_db.so.1 check.
675         * configure: Regenerate.
676         * config.in: Regenerate.
677
678         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
679         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
680         (gdb_ps_size_t): Remove.
681         Use base types in users.
682         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
683
684         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
685
686 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
687
688         PR build/22206
689         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
690         (adi_is_addr_mapped): Likewise.
691         (PSR_ICC): Don't redefine.
692         (PSR_IMPL): Likewise.
693
694 2017-09-25  Tom Tromey  <tom@tromey.com>
695
696         * regcache.c (regcache::dump): Use string_printf.
697
698 2017-09-25  Tom Tromey  <tom@tromey.com>
699
700         * regcache.c (class regcache_invalidator): New.
701         (struct register_to_invalidate): Remove.
702         (make_cleanup_regcache_invalidate): Remove.
703         (regcache::raw_write): Use regcache_invalidator.
704
705 2017-09-25  Tom Tromey  <tom@tromey.com>
706
707         * spu-tdep.c (spu2ppu_sniffer): Update.
708         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
709         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
710         Remove.
711         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
712         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
713         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
714         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
715         (frame_pop): Update.
716
717 2017-09-25  Tom Tromey  <tom@tromey.com>
718
719         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
720         * regcache.h (regcache_xfree): Don't declare.
721         * regcache.c (regcache_xfree): Remove.
722         (do_regcache_xfree): Use delete.
723         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
724         * linux-fork.c (free_fork): Use delete.
725         (fork_save_infrun_state): Likewise.
726         * jit.c (jit_dealloc_cache): Use delete.
727         * infrun.c (discard_infcall_suspend_state): Use delete.
728
729 2017-09-25  Tom Tromey  <tom@tromey.com>
730
731         * regcache.h (regcache_xmalloc): Don't declare.
732         (regcache_raw_set_cached_value): Update comment.
733         * regcache.c (regcache_xmalloc): Remove.
734         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
735         * jit.c (jit_frame_sniffer): Use new.
736         * frame.c (frame_save_as_regcache): Use new.
737
738 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
739
740         * NEWS: Advertise support for guarded-storage registers on IBM z.
741
742 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
743
744         * s390-linux-nat.c (have_regset_gs): New static variable.
745         (s390_linux_fetch_inferior_registers): Handle guarded-storage
746         control block and guarded-storage broadcast control regsets.
747         (s390_read_description): Detect whether the target has
748         guarded-storage support, return appropriate tdesc.
749         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
750         (features/s390x-gs-linux64.c): Likewise.
751         (struct gdbarch_tdep) <have_gs>: New field.
752         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
753         (s390_gsbc_regset): New variables.
754         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
755         and s390_gsbc_regset, if applicable.
756         (s390_core_read_description): Check whether core file was from a
757         target with guarded-storage support; include appropriate regsets.
758         (s390_gdbarch_init): Add registers for guarded-storage support.
759         (_initialize_s390_tdep): Initialize new target descriptions that
760         include registers for guarded-storage support.
761         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
762         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
763         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
764         (S390_NUM_REGS): Adjust macro definition.
765         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
766         (tdesc_s390x_gs_linux64): New declarations.
767
768 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
769
770         * features/s390-gs-linux64.xml: New file.
771         * features/s390-gs.xml: New file.
772         * features/s390-gsbc.xml: New file.
773         * features/s390x-gs-linux64.xml: New file.
774         * features/Makefile (WHICH): Add s390-gs-linux64 and
775         s390x-gs-linux64.
776         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
777         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
778         * features/s390-gs-linux64.c: New generated file.
779         * features/s390x-gs-linux64.c: New file.
780         * regformats/s390-gs-linux64.dat: New file.
781         * regformats/s390x-gs-linux64.dat: New file.
782
783 2017-09-23  Tom Tromey  <tom@tromey.com>
784
785         * defs.h (make_cleanup_override_quit_handler): Don't declare.
786
787 2017-09-22  Tom Tromey  <tom@tromey.com>
788
789         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
790         type to scoped_restore_tmpl.
791         <scoped_input_handler>: Initialize m_quit_handler directly.
792
793 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
794
795         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
796         (cd_command): Likewise.  Free "current_directory" before
797         assigning to it.
798         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
799         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
800         * top.c (gdb_dirbuf): Remove global declaration.
801         * top.h (gdb_dirbuf): Likewise.
802
803 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
804
805         * gnulib/aclocal.m4: Regenerate.
806         * gnulib/config.in: Regenerate.
807         * gnulib/configure: Regenerate.
808         * gnulib/import/Makefile.am: Regenerate.
809         * gnulib/import/Makefile.in: Regenerate.
810         * gnulib/import/assure.h: New file.
811         * gnulib/import/at-func.c: Likewise
812         * gnulib/import/chdir-long.c: New file.
813         * gnulib/import/chdir-long.h: New file.
814         * gnulib/import/cloexec.c: New file.
815         * gnulib/import/cloexec.h: New file.
816         * gnulib/import/close.c: New file.
817         * gnulib/import/closedir.c: New file.
818         * gnulib/import/dirent-private.h: New file.
819         * gnulib/import/dup-safer.c: New file.
820         * gnulib/import/dup.c: New file.
821         * gnulib/import/dup2.c: New file.
822         * gnulib/import/error.c: New file.
823         * gnulib/import/error.h: New file.
824         * gnulib/import/exitfail.c: New file.
825         * gnulib/import/exitfail.h: New file.
826         * gnulib/import/fchdir.c: New file.
827         * gnulib/import/fcntl.c: New file.
828         * gnulib/import/fcntl.in.h: New file.
829         * gnulib/import/fd-hook.c: New file.
830         * gnulib/import/fd-hook.h: New file.
831         * gnulib/import/fd-safer.c: New file.
832         * gnulib/import/fdopendir.c: New file.
833         * gnulib/import/filename.h: New file.
834         * gnulib/import/filenamecat-lgpl.c: New file.
835         * gnulib/import/filenamecat.h: New file.
836         * gnulib/import/fstat.c: New file.
837         * gnulib/import/fstatat.c: New file.
838         * gnulib/import/getcwd-lgpl.c: New file.
839         * gnulib/import/getcwd.c: New file.
840         * gnulib/import/getdtablesize.c: New file.
841         * gnulib/import/getlogin_r.c: New file.
842         * gnulib/import/getprogname.c: New file.
843         * gnulib/import/getprogname.h: New file.
844         * gnulib/import/gettext.h: New file.
845         * gnulib/import/glob-libc.h: New file.
846         * gnulib/import/glob.c: New file.
847         * gnulib/import/glob.in.h: New file.
848         * gnulib/import/intprops.h: New file.
849         * gnulib/import/m4/chdir-long.m4: New file.
850         * gnulib/import/m4/close.m4: New file.
851         * gnulib/import/m4/closedir.m4: New file.
852         * gnulib/import/m4/d-ino.m4: New file.
853         * gnulib/import/m4/d-type.m4: New file.
854         * gnulib/import/m4/dup.m4: New file.
855         * gnulib/import/m4/dup2.m4: New file.
856         * gnulib/import/m4/error.m4: New file.
857         * gnulib/import/m4/fchdir.m4: New file.
858         * gnulib/import/m4/fcntl.m4: New file.
859         * gnulib/import/m4/fcntl_h.m4: New file.
860         * gnulib/import/m4/fdopendir.m4: New file.
861         * gnulib/import/m4/filenamecat.m4: New file.
862         * gnulib/import/m4/fstat.m4: New file.
863         * gnulib/import/m4/fstatat.m4: New file.
864         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
865         * gnulib/import/m4/getcwd-path-max.m4: New file.
866         * gnulib/import/m4/getcwd.m4: New file.
867         * gnulib/import/m4/getdtablesize.m4: New file.
868         * gnulib/import/m4/getlogin_r.m4: New file.
869         * gnulib/import/m4/getprogname.m4: New file.
870         * gnulib/import/m4/glob.m4: New file.
871         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
872         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
873         * gnulib/import/m4/mempcpy.m4: New file.
874         * gnulib/import/m4/memrchr.m4: New file.
875         * gnulib/import/m4/mode_t.m4: New file.
876         * gnulib/import/m4/msvc-inval.m4: New file.
877         * gnulib/import/m4/msvc-nothrow.m4: New file.
878         * gnulib/import/m4/open.m4: New file.
879         * gnulib/import/m4/openat.m4: New file.
880         * gnulib/import/m4/opendir.m4: New file.
881         * gnulib/import/m4/readdir.m4: New file.
882         * gnulib/import/m4/realloc.m4: New file.
883         * gnulib/import/m4/rewinddir.m4: New file.
884         * gnulib/import/m4/save-cwd.m4: New file.
885         * gnulib/import/m4/strdup.m4: New file.
886         * gnulib/import/m4/strerror.m4: New file.
887         * gnulib/import/m4/unistd-safer.m4: New file.
888         * gnulib/import/mempcpy.c: New file.
889         * gnulib/import/memrchr.c: New file.
890         * gnulib/import/msvc-inval.c: New file.
891         * gnulib/import/msvc-inval.h: New file.
892         * gnulib/import/msvc-nothrow.c: New file.
893         * gnulib/import/msvc-nothrow.h: New file.
894         * gnulib/import/open.c: New file.
895         * gnulib/import/openat-die.c: New file.
896         * gnulib/import/openat-priv.h: New file.
897         * gnulib/import/openat-proc.c: New file.
898         * gnulib/import/openat.c: New file.
899         * gnulib/import/openat.h: New file.
900         * gnulib/import/opendir.c: New file.
901         * gnulib/import/pipe-safer.c: New file.
902         * gnulib/import/readdir.c: New file.
903         * gnulib/import/realloc.c: New file.
904         * gnulib/import/rewinddir.c: New file.
905         * gnulib/import/save-cwd.c: New file.
906         * gnulib/import/save-cwd.h: New file.
907         * gnulib/import/strdup.c: New file.
908         * gnulib/import/strerror-override.c: New file.
909         * gnulib/import/strerror-override.h: New file.
910         * gnulib/import/strerror.c: New file.
911         * gnulib/import/unistd--.h: New file.
912         * gnulib/import/unistd-safer.h: New file.
913         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
914         "getcwd" and "glob".
915         * ser-tcp.c: Undefine "close" before redefining it.
916
917 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
918
919         * guile/scm-value.c (gdbscm_value_address): Initialize address,
920         get rid of res_val.
921
922 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
923
924         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
925         <sol2,sparc>: Likewise.
926         <sol2-64,i386>: Likewise.
927
928         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
929         -Wdeprecated-declarations on *-*-solaris*.
930         * configure: Regenerate.
931
932         * procfs.c: Include "nat/inferior.h".
933         (procfs_info_proc): Fix typo.
934
935 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
936
937         * remote.c (vector): Include.
938         (struct private_thread_info): Add field, thread_handle.
939         (free_private_thread_info): Deallocate storage associated with
940         thread handle.
941         (get_private_info_thread): Initialize `thread_handle' field.
942         (struct thread_item): Add field, thread_handle.
943         (clear_threads_listing_context): Deallocate storage associated
944         with thread handle.
945         (start_thread): Add support for "handle" attribute.
946         (thread_attributes): Add "handle".
947         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
948         field.
949         (remote_update_thread_list): Update thread_handle.
950         (remote_thread_handle_to_thread_info): New function.
951         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
952
953 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
954
955         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
956         function.
957         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
958         * python/python-internal.h (thread_object_type): Declare.
959
960 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
961
962         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
963         (target_thread_handle_to_thread_info): Declare.
964         * target.c (target_thread_handle_to_thread_info): New function.
965         * target-delegates.c: Regenerate.
966         * gdbthread.h (find_thread_by_handle): Declare.
967         * thread.c (find_thread_by_handle): New function.
968         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
969         function.
970         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
971
972 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
973
974         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
975
976 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
977
978         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
979
980 2017-09-21  Yao Qi  <yao.qi@linaro.org>
981
982         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
983         to gdb_target_obs.
984
985 2017-09-20  Tom Tromey  <tom@tromey.com>
986
987         * breakpoint.c (struct counted_command_line): Remove.
988         (breakpoint_commands): Update.
989         (alloc_counted_command_line, incref_counted_command_line)
990         (decref_counted_command_line, do_cleanup_counted_command_line)
991         (make_cleanup_decref_counted_command_line): Remove.
992         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
993         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
994         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
995         (save_breakpoints): Update.
996         * breakpoint.h (counted_command_line): Now a typedef to
997         shared_ptr.
998         (struct breakpoint) <commands>: Now a counted_command_line.
999         (struct bpstats) <command>: Likewise.
1000
1001 2017-09-20  Tom Tromey  <tom@tromey.com>
1002
1003         * breakpoint.c (struct commands_info, do_map_commands_command):
1004         Remove.
1005         (commands_command_1): Update.
1006         (iterate_over_related_breakpoints): Take a function_view.
1007         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1008         (delete_command): Update.
1009         (map_breakpoint_numbers): Take a function_view.
1010         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1011         (disable_command): Update.
1012         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1013         (enable_command): Update.
1014         (struct disp_data, do_enable_breakpoint_disp)
1015         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1016         (do_map_enable_delete_breakpoint): Remove.
1017         (enable_once_command, enable_count_command, enable_delete_command)
1018         (delete_trace_variable_command): Update.
1019
1020 2017-09-20  Tom Tromey  <tom@tromey.com>
1021
1022         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1023         (bpstat_clear): Use delete.
1024         (bpstats): New constructors.
1025         (bpstat_copy, bpstat_stop_status): Use new.
1026         (dprintf_after_condition_true): Update.
1027         * breakpoint.h (bpstats::bpstats): Add constructors.
1028         (bpstats::~bpstats): Add destructor.
1029
1030 2017-09-20  Pedro Alves  <palves@redhat.com>
1031
1032         * eval.c (make_params): Delete, refactored as ...
1033         (class fake_method): ... this new type's ctor.
1034         (fake_method::~fake_method): New.
1035         (evaluate_subexp_standard): Use 'fake_method'.
1036
1037 2017-09-20  Tom Tromey  <tom@tromey.com>
1038
1039         * windows-nat.c (get_windows_debug_event, windows_wait)
1040         (do_initial_windows_stuff, windows_attach): Update.
1041         * utils.c (vwarning, internal_vproblem): Update.
1042         (ui_unregister_input_event_handler_cleanup)
1043         (prepare_to_handle_input): Remove.
1044         (class scoped_input_handler): New.
1045         (defaulted_query, prompt_for_continue): Update.
1046         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1047         Update.
1048         * top.c (undo_terminal_modifications_before_exit): Update.
1049         * target/target.h (target_terminal_init, target_terminal_inferior)
1050         (target_terminal_ours): Don't declare.
1051         (class target_terminal): New.
1052         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1053         (target_terminal_ours_for_output)
1054         (make_cleanup_restore_target_terminal): Don't declare.
1055         (target_terminal_info): Remove.
1056         * target.c (enum terminal_state, terminal_state): Remove.
1057         (target_terminal::terminal_state): Define.
1058         (target_terminal::init): Rename from target_terminal_init.
1059         (target_terminal::inferior): Rename from
1060         target_terminal_inferior.
1061         (target_terminal::ours): Rename from target_terminal_ours.
1062         (target_terminal::ours_for_output): Rename from
1063         target_terminal_ours_for_output.
1064         (target_terminal::info): New method.
1065         (cleanup_restore_target_terminal)
1066         (make_cleanup_restore_target_terminal): Remove.
1067         * solib.c (handle_solib_event): Update.
1068         * remote.c (remote_serial_quit_handler): Update.
1069         (remote_terminal_inferior, remote_wait_as): Update.
1070         * record-full.c (record_full_wait_1): Update.
1071         * nto-procfs.c (procfs_create_inferior): Update.
1072         * nat/fork-inferior.c (startup_inferior): Update.
1073         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1074         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1075         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1076         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1077         (mi_breakpoint_created, mi_breakpoint_deleted)
1078         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1079         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1080         (mi_user_selected_context_changed, report_initial_inferior):
1081         Update.
1082         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1083         (linux_nat_terminal_inferior): Update.
1084         * infrun.c (follow_fork_inferior)
1085         (handle_vfork_child_exec_or_exit, do_target_resume)
1086         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1087         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1088         Update.
1089         * inflow.c (child_terminal_init, info_terminal_command): Update.
1090         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1091         (attach_command): Update.
1092         * infcall.c (call_thread_fsm_should_stop): Update.
1093         * gnu-nat.c (gnu_attach): Update.
1094         * extension.c (struct active_ext_lang_state)
1095         (restore_active_ext_lang): Update.
1096         * exceptions.c (print_flush): Update.
1097         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1098         (struct quit_handler_cleanup_data, restore_quit_handler)
1099         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1100         Remove.
1101         * cp-support.c (gdb_demangle): Update.
1102         * breakpoint.c (update_inserted_breakpoint_locations)
1103         (insert_breakpoint_locations, handle_jit_event)
1104         (disable_breakpoints_in_unloaded_shlib): Update.
1105         * annotate.c (annotate_breakpoints_invalid)
1106         (annotate_frames_invalid): Update.
1107
1108 2017-09-20  Tom Tromey  <tom@tromey.com>
1109
1110         * main.c (catch_command_errors): Rename from
1111         catch_command_errors_const.
1112         (captured_main_1): Update.
1113
1114 2017-09-20  Pedro Alves  <palves@redhat.com>
1115
1116         * cli/cli-cmds.c (list_command): Use print_sal_location.
1117         (print_sal_location): New function.
1118         (ambiguous_line_spec): Use print_sal_location.
1119         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1120         * symtab.c (find_function_start_sal): Likewise.
1121         * symtab.h (symtab_and_line::symbol): New field.
1122
1123 2017-09-20  Pedro Alves  <palves@redhat.com>
1124
1125         * linespec.c (minsym_found): Handle non-text minsyms.
1126         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1127
1128 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1129
1130         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1131         backslash.
1132
1133 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1134
1135         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1136         vmovups instead vmovaps.
1137         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1138
1139 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1140
1141         * NEWS (Changes since GDB 8.0): Add starti.
1142         * infcmd.c (enum run_break): New.
1143         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1144         case.
1145         (run_command): Use enum run_how.
1146         (start_command): Likewise.
1147         (starti_command): New function.
1148         (RUN_ARGS_HELP): New macro.
1149         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1150         commands.  Add starti command.
1151
1152 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1153
1154         * Makefile.in (monitor.o): Remove the rule.
1155
1156 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1157
1158         * annotate.h (struct annotate_arg_emitter): Use
1159         DISABLE_COPY_AND_ASSIGN.
1160         * common/refcounted-object.h (refcounted_object): Likewise.
1161         * completer.h (struct completion_result): Likewise.
1162         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1163         * filename-seen-cache.h (filename_seen_cache): Likewise.
1164         * gdbcore.h (thread_section_name): Likewise.
1165         * gdb_regex.h (compiled_regex): Likewise.
1166         * gdbthread.h (scoped_restore_current_thread): Likewise.
1167         * inferior.h (scoped_restore_current_inferior): Likewise.
1168         * jit.c (jit_reader): Likewise.
1169         * linespec.h (struct linespec_result): Likewise.
1170         * mi/mi-parse.h (struct mi_parse): Likewise.
1171         * nat/fork-inferior.c (execv_argv): Likewise.
1172         * progspace.h (scoped_restore_current_program_space): Likewise.
1173         * python/python-internal.h (class gdbpy_enter): Likewise.
1174         * regcache.h (regcache): Likewise.
1175         * target-descriptions.c (struct tdesc_reg): Likewise.
1176         (struct tdesc_type): Likewise.
1177         (struct tdesc_feature): Likewise.
1178         * ui-out.h (ui_out_emit_type): Likewise.
1179
1180 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1181
1182         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1183         label abort_expression.
1184
1185 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1186
1187         * common/buffer.c (buffer_xml_printf): Adjust.
1188         * common/xml-utils.c (xml_escape_text): Change return type to
1189         std::string, update code accordingly.
1190         * common/xml-utils.h (xml_escape_text): Change return type to
1191         std::string.
1192         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1193         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1194         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1195         Adjust.
1196
1197 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1198
1199         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1200         (SUBDIR_UNITTESTS_OBS): Add new object file.
1201         * unittests/xml-utils-selftests.c: New file.
1202
1203 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1204
1205         * common/selftest.h (selftest): New struct/interface.
1206         (register_test): Add name parameter, add new overload.
1207         (run_tests): Add filter parameter.
1208         (for_each_selftest_ftype): New typedef.
1209         (for_each_selftest): New declaration.
1210         * common/selftest.c (tests): Change type to
1211         map<string, unique_ptr<selftest>>.
1212         (simple_selftest): New struct.
1213         (register_test): New function.
1214         (register_test): Add name parameter and use it.
1215         (run_tests): Add filter parameter and use it.  Add prints.
1216         Adjust to vector -> map change.
1217         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1218         registering selftests.
1219         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1220         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1221         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1222         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1223         * findvar.c (_initialize_findvar): Likewise.
1224         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1225         * maint.c (maintenance_selftest): Update call to run_tests.
1226         (maintenance_info_selftests): New function.
1227         (_initialize_maint_cmds): Register "maintenance info selftests"
1228         command.  Update "maintenance selftest" doc.
1229         * regcache.c (_initialize_regcache): Add names when registering
1230         selftests.
1231         * rust-exp.y (_initialize_rust_exp): Likewise.
1232         * selftest-arch.c (gdbarch_selftest): New struct.
1233         (gdbarch_tests): Remove.
1234         (register_test_foreach_arch): Add name parameter.  Call
1235         register_test.
1236         (tests_with_arch): Remove, move most content to
1237         gdbarch_selftest::operator().
1238         (_initialize_selftests_foreach_arch): Remove.
1239         * selftest-arch.h (register_test_foreach_arch): Add name
1240         parameter.
1241         (run_tests_with_arch): New declaration.
1242         * utils-selftests.c (_initialize_utils_selftests): Add names
1243         when registering selftests.
1244         * utils.c (_initialize_utils): Likewise.
1245         * unittests/array-view-selftests.c
1246         (_initialize_array_view_selftests): Likewise.
1247         * unittests/environ-selftests.c (_initialize_environ_selftests):
1248         Likewise.
1249         * unittests/function-view-selftests.c
1250         (_initialize_function_view_selftests): Likewise.
1251         * unittests/offset-type-selftests.c
1252         (_initialize_offset_type_selftests): Likewise.
1253         * unittests/optional-selftests.c
1254         (_initialize_optional_selftests): Likewise.
1255         * unittests/scoped_restore-selftests.c
1256         (_initialize_scoped_restore_selftests): Likewise.
1257         * NEWS: Document "maintenance selftest" and "maint info
1258         selftests".
1259
1260 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1261
1262         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1263         scoped_restore.
1264
1265 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1266
1267         * mi/mi-main.c (mi_load_progress): Make uiout variable
1268         a unique_ptr.
1269
1270 2017-09-15  Pedro Alves  <palves@redhat.com>
1271
1272         * compile/compile-c-types.c (convert_enum, convert_int)
1273         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1274
1275 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1276
1277         * dwarf2read.c (copy_string): Remove.
1278         (parse_macro_definition): Replace copy_string with savestring.
1279
1280 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1281
1282         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1283         gdb_target_obs.
1284         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1285         Likewise.
1286         (i[34567]86-*-linux*): Likewise.
1287
1288 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1289
1290         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1291         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1292         <stack>: Change type to std::vector.
1293         <stack_len, stack_allocated>: Remove.
1294         <grow_stack>: Remove.
1295         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1296         (dwarf_expr_context::~dwarf_expr_context): Remove.
1297         (dwarf_expr_context::grow_stack): Remove.
1298         (dwarf_expr_context::push): Adjust.
1299         (dwarf_expr_context::pop): Adjust.
1300         (dwarf_expr_context::fetch): Adjust.
1301         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1302         (dwarf_expr_context::stack_empty_p): Adjust.
1303         (dwarf_expr_context::execute_stack_op): Adjust.
1304
1305 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1306
1307         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1308         return type to bool.
1309         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1310
1311 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1312
1313         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1314         Change type to bool.
1315         (dwarf_stack_value) <in_stack_memory>: Likewise.
1316         (dwarf_expr_context) <push_address>: Change parameter type to
1317         bool.
1318         <fetch_in_stack_memory>: Change return type to bool.
1319         <push>: Change parameter type to bool.
1320         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1321         to bool.
1322         (dwarf_expr_context::push_address): Likewise.
1323         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1324         to bool.
1325         (dwarf_expr_context::execute_stack_op): Adjust.
1326         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1327
1328 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1329
1330         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1331         (struct dwarf_expr_context) <n_pieces>: Remove.
1332         <pieces>: Change type to std::vector.
1333         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1334         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1335         pieces.
1336         (dwarf_expr_context::add_piece): Adjust.
1337         * dwarf2loc.c (struct piece_closure): Initialize fields.
1338         <n_pieces>: Remove.
1339         <pieces>: Change type to std::vector.
1340         (allocate_piece_closure): Adjust, change parameter to
1341         std::vector rvalue and std::move it to piece_closure.
1342         (rw_pieced_value): Adjust.
1343         (check_pieced_synthetic_pointer): Adjust.
1344         (indirect_synthetic_pointer): Adjust.
1345         (coerce_pieced_ref): Adjust.
1346         (free_pieced_value_closure):  Adjust.  Use delete to free
1347         piece_closure.
1348         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1349         to allocate_piece_closure.
1350         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1351
1352 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1353
1354         * probe.h (probe_ops_cp): Remove typedef.
1355         (DEF_VEC_P (probe_ops_cp)): Remove.
1356         (all_probe_ops): Change type to std::vector.
1357         * probe.c (info_probes_for_ops): Adjust to vector change.
1358         (probe_linespec_to_ops): Likewise.
1359         (all_probe_ops): Change type to std::vector.
1360         (_initialize_probe): Adjust to vector change.
1361         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1362         * elfread.c (elf_get_probes): Likewise.
1363         * stap-probe.c (_initialize_stap_probe): Likewise.
1364
1365 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1366
1367         * probe.h (struct bound_probe): Define constructors.
1368         * probe.c (bound_probe_s): Remove typedef.
1369         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1370         (collect_probes): Change return type to std::vector, remove
1371         cleanup.
1372         (compare_probes): Return bool, change parameter type.  Change
1373         semantic to "less than".
1374         (gen_ui_out_table_header_info): Change parameter to std::vector
1375         and update.
1376         (exists_probe_with_pops): Likewise.
1377         (info_probes_for_ops): Update to std::vector change.
1378         (enable_probes_command): Likewise.
1379         (disable_probes_command): Likewise.
1380
1381 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1382
1383         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1384         vec to std::vector.
1385         * probe.c (parse_probes_in_pspace): Update.
1386         (find_probes_in_objfile): Update.
1387         (find_probe_by_pc): Update.
1388         (collect_probes): Update.
1389         (probe_any_get_probes): Update.
1390         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1391         return type to reference to std::vector.
1392         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1393         std::vector and update.
1394         (dtrace_process_dof): Likewise.
1395         (dtrace_get_probes): Likewise.
1396         * elfread.c (elf_get_probes): Change return type to std::vector,
1397         store an std::vector in bfd_data.
1398         (probe_key_free): Update to std::vector.
1399         * stap-probe.c (handle_stap_probe): Change parameter to
1400         std::vector and update.
1401         (stap_get_probes): Likewise.
1402         * symfile-debug.c (debug_sym_get_probes): Change return type to
1403         std::vector and update.
1404
1405 2017-09-11  Tom Tromey  <tom@tromey.com>
1406
1407         * breakpoint.c (program_breakpoint_here_p): Update.
1408         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1409         from make_show_memory_breakpoints_cleanup.  Return a
1410         scoped_restore_tmpl<int>.
1411         (restore_show_memory_breakpoints): Remove.
1412         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1413         * mem-break.c (memory_validate_breakpoint): Update.
1414         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1415         (ia64_memory_remove_breakpoint): Update.
1416         (ia64_breakpoint_from_pc): Update.
1417         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1418         from make_show_memory_breakpoints_cleanup.
1419
1420 2017-09-11  Tom Tromey  <tom@tromey.com>
1421
1422         * d-namespace.c (d_lookup_symbol): Use std::string.
1423         (find_symbol_in_baseclass): Likewise.
1424
1425 2017-09-11  Tom Tromey  <tom@tromey.com>
1426
1427         * ctf.c (ctf_start): Use std::string.
1428
1429 2017-09-11  Tom Tromey  <tom@tromey.com>
1430
1431         * ada-lang.c (is_known_support_routine): Update.
1432         (ada_unhandled_exception_name_addr_from_raise): Update.
1433         * guile/scm-frame.c (gdbscm_frame_name): Update.
1434         * python/py-frame.c (frapy_name): Update.
1435         (frapy_function): Update.
1436         * stack.h (find_frame_funname): Update.
1437         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1438         (print_frame): Update.
1439
1440 2017-09-11  Tom Tromey  <tom@tromey.com>
1441
1442         * findcmd.c (put_bits): Take a gdb::byte_vector.
1443         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1444         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1445         cleanups.
1446         (find_command): Update.
1447
1448 2017-09-11  Tom Tromey  <tom@tromey.com>
1449
1450         * cli/cli-script.c (class scoped_restore_hook_in): New.
1451         (clear_hook_in_cleanup): Remove.
1452         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1453         scoped_restore_hook_in.
1454
1455 2017-09-11  Tom Tromey  <tom@tromey.com>
1456
1457         * cli/cli-script.c (restore_interp): Remove.
1458         (read_command_lines): Use scoped_restore_interp.
1459         * interps.c (scoped_restore_interp::set_temp): Rename from
1460         interp_set_temp.
1461         * interps.h (class scoped_restore_interp): New.
1462         (interp_set_temp): Remove.
1463
1464 2017-09-11  Tom Tromey  <tom@tromey.com>
1465
1466         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1467         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1468         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1469         scoped_restore.
1470         (mi_cmd_break_insert_1): Update.
1471         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1472         scoped_restore.
1473
1474 2017-09-11  Tom Tromey  <tom@tromey.com>
1475
1476         * demangle.c (demangle_command): Update.
1477         * breakpoint.c (disable_command): Update.
1478         (enable_command): Update.
1479         (find_location_by_number): Make "number" const.  Use
1480         get_number_trailer.
1481         * cli/cli-utils.c (extract_arg): Return std::string.
1482         * probe.c (parse_probe_linespec): Update.  Change types.
1483         (collect_probes): Take string arguments.
1484         (parse_probe_linespec): Likewise.
1485         (info_probes_for_ops): Update.
1486         (enable_probes_command): Update.
1487         (disable_probes_command): Update.
1488         * break-catch-sig.c (catch_signal_split_args): Update.
1489         * mi/mi-parse.c (mi_parse): Update.
1490
1491 2017-09-11  Tom Tromey  <tom@tromey.com>
1492
1493         * language.h (language_enum): Make argument const.
1494         * language.c (language_enum): Make argument const.
1495
1496 2017-09-11  Tom Tromey  <tom@tromey.com>
1497
1498         * common/common-utils.h (skip_to_space): Remove macro, redeclare
1499         as function.
1500         (skip_to_space): Rename from skip_to_space_const.
1501         * common/common-utils.c (skip_to_space): New function.
1502         (skip_to_space): Rename from skip_to_space_const.
1503         * cli/cli-utils.h (get_number): Rename from get_number_const.
1504         (extract_arg): Rename from extract_arg_const.
1505         * cli/cli-utils.c (get_number): Rename from get_number_const.
1506         (extract_arg): Rename from extract_arg_const.
1507         (number_or_range_parser::get_number): Use ::get_number.
1508         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1509         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1510         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1511         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1512         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1513         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1514         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1515         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1516
1517 2017-09-11  Tom Tromey  <tom@tromey.com>
1518
1519         * python/python.c (do_start_initialization): Use
1520         py-event-types.def to initialize types.
1521         Define all object type structures.
1522         * python/python-internal.h: Don't declare event initialization
1523         functions.
1524         * python/py-threadevent.c (thread_event_object_type): Don't
1525         define.
1526         * python/py-stopevent.c (stop_event_object_type): Don't define.
1527         * python/py-signalevent.c (signal_event_object_type): Don't
1528         declare or define.
1529         * python/py-newobjfileevent.c (new_objfile_event_object_type)
1530         (clear_objfiles_event_object_type): Don't declare or define.
1531         * python/py-infevents.c (inferior_call_pre_event_object_type)
1532         (inferior_call_post_event_object_type)
1533         (register_changed_event_object_type)
1534         (memory_changed_event_object_type): Don't declare or define.
1535         * python/py-inferior.c (new_thread_event_object_type)
1536         (new_inferior_event_object_type)
1537         (inferior_deleted_event_object_type): Don't declare or define.
1538         * python/py-exitedevent.c (exited_event_object_type): Don't
1539         declare or define.
1540         * python/py-evts.c (gdbpy_initialize_py_events): Use
1541         py-all-events.def.
1542         * python/py-events.h (thread_event_object_type): Don't declare.
1543         (events_object): Use py-all-events.def.
1544         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
1545         py-event-types.def.
1546         * python/py-event-types.def: New file.
1547         * python/py-continueevent.c (create_continue_event_object): Don't
1548         declare or define.
1549         * python/py-bpevent.c (breakpoint_event_object_type): Don't
1550         declare or define.
1551         * python/py-all-events.def: New file.
1552
1553 2017-09-11  Tom Tromey  <tom@tromey.com>
1554
1555         * python/py-threadevent.c (create_thread_event_object): Return
1556         gdbpy_ref.
1557         * python/py-stopevent.h (create_stop_event_object)
1558         (create_breakpoint_event_object, create_signal_event_object):
1559         Update.
1560         * python/py-stopevent.c (create_stop_event_object): Return
1561         gdbpy_ref.
1562         (emit_stop_event): Update.
1563         * python/py-signalevent.c (create_signal_event_object): Return
1564         gdbpy_ref.
1565         * python/py-infevents.c (create_inferior_call_event_object):
1566         Update.
1567         * python/py-event.h (create_event_object)
1568         (create_thread_event_object): Update.
1569         * python/py-event.c (create_event_object): Return gdbpy_ref.
1570         * python/py-continueevent.c: Return gdbpy_ref.
1571         * python/py-bpevent.c (create_breakpoint_event_object): Return
1572         gdbpy_ref.
1573
1574 2017-09-11  Tom Tromey  <tom@tromey.com>
1575
1576         PR python/15622:
1577         * NEWS: Add entry.
1578         * python/python.c (do_start_initialization): Initialize new event
1579         types.
1580         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1581         (gdbpy_initialize_inferior_deleted_event)
1582         (gdbpy_initialize_new_thread_event): Declare.
1583         * python/py-threadevent.c (create_thread_event_object): Add option
1584         "thread" parameter.
1585         * python/py-inferior.c (new_thread_event_object_type)
1586         (new_inferior_event_object_type)
1587         (inferior_deleted_event_object_type): Declare.
1588         (python_new_inferior, python_inferior_deleted): New functions.
1589         (add_thread_object): Emit new_thread event.
1590         (gdbpy_initialize_inferior): Attach new functions to corresponding
1591         observers.
1592         (new_thread, new_inferior, inferior_deleted): Define new event
1593         types.
1594         * python/py-evts.c (gdbpy_initialize_py_events): Add new
1595         registries.
1596         * python/py-events.h (events_object) <new_inferior,
1597         inferior_deleted, new_thread>: New fields.
1598         * python/py-event.h (create_thread_event_breakpoint): Add optional
1599         "thread" parameter.
1600
1601 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1602
1603         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1604         check current_ui instead.
1605         (internal_vproblem): Likewise.
1606
1607 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1608
1609         * thread.c (print_thread_info_1): Remove unnecessary calls to
1610         uiout->is_mi_like_p.
1611
1612 2017-09-09  Tom Tromey  <tom@tromey.com>
1613
1614         * namespace.h (add_using_directive): Update.
1615         * namespace.c (add_using_directive): Change type of excludes to
1616         std::vector.
1617         * dwarf2read.c (read_import_statement): Use std::vector.
1618         (read_namespace): Update.
1619         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1620
1621 2017-09-09  Tom Tromey  <tom@tromey.com>
1622
1623         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1624
1625 2017-09-09  Tom Tromey  <tom@tromey.com>
1626
1627         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1628
1629 2017-09-09  Tom Tromey  <tom@tromey.com>
1630
1631         * stack.c (func_command): Use gdb::def_vector.
1632
1633 2017-09-09  Tom Tromey  <tom@tromey.com>
1634
1635         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1636         ui_out_emit_list, ui_out_emit_tuple.
1637         (mi_cmd_var_update): Likewise.
1638
1639 2017-09-09  Tom Tromey  <tom@tromey.com>
1640
1641         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1642         ui_out_redirect_pop.
1643         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1644         ui_out_redirect_pop.
1645         * utils.c (do_ui_out_redirect_pop)
1646         (make_cleanup_ui_out_redirect_pop): Remove.
1647         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1648         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1649         * ui-out.h (ui_out_redirect_pop): New class.
1650
1651 2017-09-09  Tom Tromey  <tom@tromey.com>
1652
1653         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1654         (list_available_thread_groups, mi_cmd_list_thread_groups)
1655         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1656         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1657         Likewise.
1658
1659 2017-09-09  Tom Tromey  <tom@tromey.com>
1660
1661         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1662         ui_out_emit_tuple.
1663
1664 2017-09-09  Tom Tromey  <tom@tromey.com>
1665
1666         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1667         * stack.c (print_frame): Use ui_out_emit_tuple.
1668         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1669         (info_spu_mailbox_command, info_spu_dma_command)
1670         (info_spu_proxydma_command): Likewise.
1671         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1672         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1673         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1674         ui_out_emit_tuple.
1675         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1676
1677 2017-09-09  Tom Tromey  <tom@tromey.com>
1678
1679         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1680         (class ui_out_emit_table): Update comment.
1681         * ui-out.c (do_cleanup_table_end)
1682         (make_cleanup_ui_out_table_begin_end): Remove.
1683         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1684         (info_spu_dma_cmdlist): Likewise.
1685         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1686         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1687         ui_out_emit_table.
1688
1689 2017-09-09  Tom Tromey  <tom@tromey.com>
1690
1691         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1692         ui_out_emit_list, gdb::optional.
1693
1694 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1695
1696         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1697         prototype.
1698         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1699         prototype.
1700         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1701         prototype.
1702         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1703         * ada-exp.y: Remove _initialize_ada_exp prototype.
1704         * ada-lang.c: Remove _initialize_ada_language prototype.
1705         * ada-tasks.c: Remove _initialize_tasks prototype.
1706         * addrmap.c: Remove _initialize_addrmap prototype.
1707         * agent.c: Remove _initialize_agent prototype.
1708         * aix-thread.c: Remove _initialize_aix_thread prototype.
1709         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1710         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1711         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1712         prototype.
1713         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1714         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1715         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1716         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1717         prototype.
1718         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1719         prototype.
1720         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1721         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1722         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1723         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1724         prototype.
1725         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1726         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1727         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1728         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1729         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1730         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1731         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1732         prototype.
1733         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1734         prototype.
1735         * annotate.c: Remove _initialize_annotate prototype.
1736         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1737         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1738         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1739         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1740         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1741         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1742         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1743         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1744         prototype.
1745         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1746         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1747         * auto-load.c: Remove _initialize_auto_load prototype.
1748         * auxv.c: Remove _initialize_auxv prototype.
1749         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1750         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1751         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1752         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1753         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1754         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1755         prototype.
1756         * break-catch-throw.c: Remove _initialize_break_catch_throw
1757         prototype.
1758         * breakpoint.c: Remove _initialize_breakpoint prototype.
1759         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1760         * btrace.c: Remove _initialize_btrace prototype.
1761         * charset.c: Remove _initialize_charset prototype.
1762         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1763         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1764         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1765         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1766         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1767         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1768         * coffread.c: Remove _initialize_coffread prototype.
1769         * compile/compile.c: Remove _initialize_compile prototype.
1770         * complaints.c: Remove _initialize_complaints prototype.
1771         * completer.c: Remove _initialize_completer prototype.
1772         * copying.awk: Remove _initialize_copying prototype.
1773         * copying.c: Regenerate.
1774         * core-regset.c: Remove _initialize_core_regset prototype.
1775         * corefile.c: Remove _initialize_core prototype.
1776         * corelow.c: Remove _initialize_corelow prototype.
1777         * cp-abi.c: Remove _initialize_cp_abi prototype.
1778         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1779         * cp-support.c: Remove _initialize_cp_support prototype.
1780         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1781         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1782         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1783         * ctf.c: Remove _initialize_ctf prototype.
1784         * d-lang.c: Remove _initialize_d_language prototype.
1785         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1786         prototype.
1787         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1788         * dbxread.c: Remove _initialize_dbxread prototype.
1789         * dcache.c: Remove _initialize_dcache prototype.
1790         * demangle.c: Remove _initialize_demangler prototype.
1791         * disasm-selftests.c: Remove _initialize_disasm_selftests
1792         prototype.
1793         * disasm.c: Remove _initialize_disasm prototype.
1794         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1795         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1796         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1797         prototype.
1798         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1799         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1800         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1801         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1802         * elfread.c: Remove _initialize_elfread prototype.
1803         * exec.c: Remove _initialize_exec prototype.
1804         * extension.c: Remove _initialize_extension prototype.
1805         * f-lang.c: Remove _initialize_f_language prototype.
1806         * f-valprint.c: Remove _initialize_f_valprint prototype.
1807         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1808         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1809         * filesystem.c: Remove _initialize_filesystem prototype.
1810         * findcmd.c: Remove _initialize_mem_search prototype.
1811         * fork-child.c: Remove _initialize_fork_child prototype.
1812         * frame-base.c: Remove _initialize_frame_base prototype.
1813         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1814         * frame.c: Remove _initialize_frame prototype.
1815         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1816         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1817         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1818         * gcore.c: Remove _initialize_gcore prototype.
1819         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1820         * gdbarch.c: Regenerate.
1821         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1822         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1823         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1824         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1825         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1826         * go-lang.c: Remove _initialize_go_language prototype.
1827         * go32-nat.c: Remove _initialize_go32_nat prototype.
1828         * guile/guile.c: Remove _initialize_guile prototype.
1829         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1830         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1831         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1832         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1833         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1834         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1835         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1836         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1837         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1838         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1839         prototype.
1840         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1841         prototype.
1842         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1843         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1844         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1845         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1846         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1847         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1848         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1849         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1850         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1851         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1852         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1853         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1854         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1855         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1856         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1857         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1858         prototype.
1859         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1860         prototype.
1861         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1862         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1863         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1864         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1865         * infcall.c: Remove _initialize_infcall prototype.
1866         * infcmd.c: Remove _initialize_infcmd prototype.
1867         * inferior.c: Remove _initialize_inferiors prototype.
1868         * inflow.c: Remove _initialize_inflow prototype.
1869         * infrun.c: Remove _initialize_infrun prototype.
1870         * interps.c: Remove _initialize_interpreter prototype.
1871         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1872         * jit.c: Remove _initialize_jit prototype.
1873         * language.c: Remove _initialize_language prototype.
1874         * linux-fork.c: Remove _initialize_linux_fork prototype.
1875         * linux-nat.c: Remove _initialize_linux_nat prototype.
1876         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1877         * linux-thread-db.c: Remove _initialize_thread_db prototype.
1878         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1879         * m2-lang.c: Remove _initialize_m2_language prototype.
1880         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1881         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1882         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1883         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1884         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1885         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1886         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1887         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1888         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1889         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1890         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1891         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1892         * machoread.c: Remove _initialize_machoread prototype.
1893         * macrocmd.c: Remove _initialize_macrocmd prototype.
1894         * macroscope.c: Remove _initialize_macroscope prototype.
1895         * maint.c: Remove _initialize_maint_cmds prototype.
1896         * mdebugread.c: Remove _initialize_mdebugread prototype.
1897         * memattr.c: Remove _initialize_mem prototype.
1898         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1899         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1900         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1901         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1902         * mi/mi-main.c: Remove _initialize_mi_main prototype.
1903         * microblaze-linux-tdep.c: Remove
1904         _initialize_microblaze_linux_tdep prototype.
1905         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1906         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1907         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1908         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1909         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1910         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1911         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1912         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1913         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1914         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1915         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1916         prototype.
1917         * mipsread.c: Remove _initialize_mipsread prototype.
1918         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1919         prototype.
1920         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1921         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1922         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1923         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1924         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1925         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1926         prototype.
1927         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1928         * nto-procfs.c: Remove _initialize_procfs prototype.
1929         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1930         * objc-lang.c: Remove _initialize_objc_language prototype.
1931         * objfiles.c: Remove _initialize_objfiles prototype.
1932         * observer.c: Remove observer_test_first_notification_function,
1933         observer_test_second_notification_function,
1934         observer_test_third_notification_function, and
1935         _initialize_observer prototypes.
1936         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1937         * osabi.c: Remove _initialize_gdb_osabi prototype.
1938         * osdata.c: Remove _initialize_osdata prototype.
1939         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1940         * parse.c: Remove _initialize_parse prototype.
1941         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1942         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1943         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1944         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1945         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1946         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1947         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1948         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1949         * printcmd.c: Remove _initialize_printcmd prototype.
1950         * probe.c: Remove _initialize_probe prototype.
1951         * proc-api.c: Remove _initialize_proc_api prototype.
1952         * proc-events.c: Remove _initialize_proc_events prototype.
1953         * proc-service.c: Remove _initialize_proc_service prototype.
1954         * procfs.c: Remove _initialize_procfs prototype.
1955         * psymtab.c: Remove _initialize_psymtab prototype.
1956         * python/python.c: Remove _initialize_python prototype.
1957         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1958         * record-btrace.c: Remove _initialize_record_btrace prototype.
1959         * record-full.c: Remove _initialize_record_full prototype.
1960         * record.c: Remove _initialize_record prototype.
1961         * regcache.c: Remove _initialize_regcache prototype.
1962         * reggroups.c: Remove _initialize_reggroup prototype.
1963         * remote-notif.c: Remove _initialize_notif prototype.
1964         * remote-sim.c: Remove _initialize_remote_sim prototype.
1965         * remote.c: Remove _initialize_remote prototype.
1966         * reverse.c: Remove _initialize_reverse prototype.
1967         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1968         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1969         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1970         prototype.
1971         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1972         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1973         * rust-exp.y: Remove _initialize_rust_exp prototype.
1974         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1975         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1976         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1977         * score-tdep.c: Remove _initialize_score_tdep prototype.
1978         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1979         prototype.
1980         * ser-go32.c: Remove _initialize_ser_dos prototype.
1981         * ser-mingw.c: Remove _initialize_ser_windows prototype.
1982         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1983         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1984         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1985         * serial.c: Remove _initialize_serial prototype.
1986         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1987         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1988         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1989         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1990         * skip.c: Remove _initialize_step_skip prototype.
1991         * sol-thread.c: Remove _initialize_sol_thread prototype.
1992         * solib-aix.c: Remove _initialize_solib_aix prototype.
1993         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1994         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1995         * solib-frv.c: Remove _initialize_frv_solib prototype.
1996         * solib-spu.c: Remove _initialize_spu_solib prototype.
1997         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1998         * solib-target.c: Remove _initialize_solib_target prototype.
1999         * solib.c: Remove _initialize_solib prototype.
2000         * source.c: Remove _initialize_source prototype.
2001         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2002         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2003         prototype.
2004         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2005         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2006         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2007         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2008         prototype.
2009         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2010         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2011         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2012         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2013         prototype.
2014         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2015         prototype.
2016         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2017         prototype.
2018         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2019         prototype.
2020         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2021         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2022         prototype.
2023         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2024         prototype.
2025         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2026         prototype.
2027         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2028         prototype.
2029         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2030         prototype.
2031         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2032         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2033         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2034         * stabsread.c: Remove _initialize_stabsread prototype.
2035         * stack.c: Remove _initialize_stack prototype.
2036         * stap-probe.c: Remove _initialize_stap_probe prototype.
2037         * std-regs.c: Remove _initialize_frame_reg prototype.
2038         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2039         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2040         * symfile.c: Remove _initialize_symfile prototype.
2041         * symmisc.c: Remove _initialize_symmisc prototype.
2042         * symtab.c: Remove _initialize_symtab prototype.
2043         * target-dcache.c: Remove _initialize_target_dcache prototype.
2044         * target-descriptions.c: Remove _initialize_target_descriptions
2045         prototype.
2046         * thread.c: Remove _initialize_thread prototype.
2047         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2048         prototype.
2049         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2050         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2051         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2052         prototype.
2053         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2054         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2055         * tracefile.c: Remove _initialize_tracefile prototype.
2056         * tracepoint.c: Remove _initialize_tracepoint prototype.
2057         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2058         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2059         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2060         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2061         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2062         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2063         * tui/tui.c: Remove _initialize_tui prototype.
2064         * typeprint.c: Remove _initialize_typeprint prototype.
2065         * user-regs.c: Remove _initialize_user_regs prototype.
2066         * utils.c: Remove _initialize_utils prototype.
2067         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2068         * valarith.c: Remove _initialize_valarith prototype.
2069         * valops.c: Remove _initialize_valops prototype.
2070         * valprint.c: Remove _initialize_valprint prototype.
2071         * value.c: Remove _initialize_values prototype.
2072         * varobj.c: Remove _initialize_varobj prototype.
2073         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2074         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2075         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2076         * windows-nat.c: Remove _initialize_windows_nat,
2077         _initialize_check_for_gdb_ini, and _initialize_loadable
2078         prototypes.
2079         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2080         * xcoffread.c: Remove _initialize_xcoffread prototype.
2081         * xml-support.c: Remove _initialize_xml_support prototype.
2082         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2083         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2084         prototype.
2085         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2086         prototype.
2087         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2088
2089 2017-09-08  Keith Seitz  <keiths@redhat.com>
2090
2091         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2092         field.
2093
2094 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2095
2096         * f-valprint.c (f_val_print): Remove check for one byte
2097         sized integers. Remove printing of character type.
2098
2099 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2100             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2101             Bernhard Heckel  <bernhard.heckel@intel.com>
2102
2103         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2104         to maintain proper indentation when printing pointers/refs.
2105
2106 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2107
2108         GDB 8.0.1 released.
2109
2110 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2111
2112         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2113
2114 2017-09-05  Tom Tromey  <tom@tromey.com>
2115
2116         * parse.c (funcall_chain): Now a std::vector.
2117         (start_arglist, end_arglist): Simplify.
2118         (free_funcalls): Remove.
2119         (parse_exp_in_context_1): Remove cleanup.
2120
2121 2017-09-05  Tom Tromey  <tom@tromey.com>
2122
2123         * go-exp.y (go_parse): Don't create a cleanup.
2124
2125 2017-09-05  Tom Tromey  <tom@tromey.com>
2126
2127         * d-exp.y (PrimaryExpression): Use std::string.
2128         (d_parse): Don't create a cleanup.
2129
2130 2017-09-05  Tom Tromey  <tom@tromey.com>
2131
2132         * utils.c (do_clear_parser_state): Remove.
2133         (make_cleanup_clear_parser_state): Remove.
2134         * p-exp.y (pascal_parse): Use scoped_restore.
2135         * m2-exp.y (m2_parse): Use scoped_restore.
2136         * f-exp.y (f_parse): Use scoped_restore.
2137         * d-exp.y (d_parse): Use scoped_restore.
2138         * c-exp.y (c_parse): Use scoped_restore.
2139         * ada-exp.y (ada_parse): Use scoped_restore.
2140         * utils.h (make_cleanup_clear_parser_state): Remove.
2141
2142 2017-09-06  Keith Seitz  <keiths@redhat.com>
2143
2144         * dwarf2read.c (dw2_linkage_name_attr): New function.
2145         (dw2_linkage_name): New function.
2146         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2147         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2148         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2149
2150 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2151
2152         * config/djgpp/djconfig.sh: Correct shell portability issue.
2153
2154 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2155
2156         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2157
2158 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2159
2160         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2161         * NEWS: Mention new FreeBSD/mips native configuration.
2162         * configure.host: Add aarch64*-*-freebsd*.
2163         * configure.nat: Likewise.
2164         * aarch64-fbsd-nat.c: New file.
2165
2166 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2167
2168         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2169         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2170         * NEWS: Mention new FreeBSD/aarch64 target.
2171         * configure.tgt: Add aarch64*-*-freebsd*.
2172         * aarch64-fbsd-tdep.c: New file.
2173         * aarch64-fbsd-tdep.h: New file.
2174
2175 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2176
2177         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2178
2179 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2180
2181         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2182         of TLS symbols.
2183
2184 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2185
2186         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2187         call.
2188
2189 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2190
2191         * infrun.c (follow_exec): Call add_thread after
2192         target_find_description.
2193
2194 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2195
2196         * infrun.c (handle_inferior_event_1): When exec'ing, read
2197         stop_pc after follow_exec.
2198
2199 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2200
2201         * remote.c (process_g_packet): Update error message.
2202
2203 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2204
2205         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2206         targets.
2207
2208 2017-09-05  Pedro Alves  <palves@redhat.com>
2209
2210         * eval.c (eval_call, evaluate_funcall): New functions, factored
2211         out from ...
2212         (evaluate_subexp_standard): ... this.
2213
2214 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2215
2216         * amd64-tdep.c (amd64_target_description): Create target
2217         descriptions.
2218         (_initialize_amd64_tdep): Don't call functions
2219         initialize_tdesc_amd64_*.  Add self tests.
2220         * arch/amd64.c (amd64_create_target_description): Add parameter
2221         is_linux.  Call set_tdesc_osabi if is_linux is true.
2222         * arch/amd64.h (amd64_create_target_description): Update the
2223         declaration.
2224         * arch/i386.c (i386_create_target_description): Add parameter
2225         is_linux.  Call set_tdesc_osabi if is_linux is true.
2226         * arch/i386.h (i386_create_target_description): Update
2227         declaration.
2228         * configure.tgt: Add i386.o to gdb_target_obs.
2229         * features/Makefile (XMLTOC): Remove i386/*.xml.
2230         * features/i386/amd64-avx-avx512.c: Remove.
2231         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2232         * features/i386/amd64-avx-mpx.c: Remove.
2233         * features/i386/amd64-avx.c: Remove.
2234         * features/i386/amd64-mpx.c: Remove.
2235         * features/i386/amd64.c: Remove.
2236         * features/i386/i386-avx-avx512.c: Remove.
2237         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2238         * features/i386/i386-avx-mpx.c: Remove.
2239         * features/i386/i386-avx.c: Remove.
2240         * features/i386/i386-mmx.c: Remove.
2241         * features/i386/i386-mpx.c: Remove.
2242         * features/i386/i386.c: Remove.
2243         * i386-tdep.c: Don't include features/i386/i386*.c., include
2244         target-descriptions.h and arch/i386.h.
2245         (i386_target_description): Create target descriptions.
2246         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2247         functions.  Do self tests.
2248
2249 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2250
2251         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2252         * features/i386/amd64-avx-avx512-linux.c: Removed.
2253         * features/i386/amd64-avx-linux.c: Removed.
2254         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2255         * features/i386/amd64-avx-mpx-linux.c: Removed.
2256         * features/i386/amd64-linux.c: Removed.
2257         * features/i386/amd64-mpx-linux.c: Removed.
2258         * features/i386/x32-avx-avx512-linux.c: Removed.
2259         * features/i386/x32-avx-linux.c: Removed.
2260         * features/i386/x32-linux.c: Removed.
2261
2262 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2263
2264         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2265         features/i386/*.c.
2266         (amd64_linux_read_description): Call
2267         amd64_create_target_description.
2268         * arch/amd64.c: New file.
2269         * arch/amd64.h: New file.
2270         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2271         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2272
2273 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2274
2275         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2276         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2277         (amd64_linux_read_description): Create target descriptions.
2278         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2279         functions.  Add unit tests.
2280         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2281         x32-core.xml.
2282         * features/i386/64bit-avx.c: Generated.
2283         * features/i386/64bit-avx512.c: Generated.
2284         * features/i386/64bit-core.c: Generated.
2285         * features/i386/64bit-linux.c: Generated.
2286         * features/i386/64bit-mpx.c: Generated.
2287         * features/i386/64bit-pkeys.c: Generated.
2288         * features/i386/64bit-segments.c: Generated.
2289         * features/i386/64bit-sse.c: Generated.
2290         * features/i386/x32-core.c: Generated.
2291         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2292         c files for amd64-linux and x32-linux.
2293
2294 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2295
2296         * amd64-linux-tdep.c (amd64_linux_read_description): New
2297         function.
2298         (amd64_linux_core_read_description): Call
2299         amd64_linux_read_description.
2300         (amd64_linux_init_abi): Likewise.
2301         (amd64_x32_linux_init_abi): Likewise.
2302         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2303         * x86-linux-nat.c (x86_linux_read_description): Call
2304         amd64_linux_read_description.
2305
2306 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2307
2308         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2309         comments.
2310
2311 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2312
2313         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2314         * features/i386/i386-avx-avx512-linux.c: Remove.
2315         * features/i386/i386-avx-linux.c: Remove.
2316         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2317         * features/i386/i386-avx-mpx-linux.c: Remove.
2318         * features/i386/i386-linux.c: Remove.
2319         * features/i386/i386-mmx-linux.c: Remove.
2320         * features/i386/i386-mpx-linux.c: Remove.
2321
2322 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2323
2324         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2325         (SFILES): Add arch/i386.c.
2326         (HFILES_NO_SRCDIR): Add arch/i386.h.
2327         * arch/i386.c: New file.
2328         * arch/i386.h: New file.
2329         * arch/tdesc.h (allocate_target_description): Declare.
2330         (set_tdesc_architecture): Declare.
2331         (set_tdesc_osabi): Declare.
2332         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2333         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2334         include arch/i386.h.
2335         (i386_linux_read_description): Remove code and call
2336         i386_create_target_description.
2337         (set_tdesc_architecture): New function.
2338         (set_tdesc_osabi): New function.
2339         * target-descriptions.h (allocate_target_description): Remove.
2340
2341 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2342
2343         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2344         * target-descriptions.c (tdesc_create_feature): Likewise, and
2345         adjust code.
2346         * features/i386/32bit-avx.c: Re-generated.
2347         * features/i386/32bit-avx512.c: Re-generated.
2348         * features/i386/32bit-core.c: Re-generated.
2349         * features/i386/32bit-linux.c: Re-generated.
2350         * features/i386/32bit-mpx.c: Re-generated.
2351         * features/i386/32bit-pkeys.c: Re-generated.
2352         * features/i386/32bit-sse.c: Re-generated.
2353
2354 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2355
2356         * regformats/regdef.h (struct reg): Override operator == and !=.
2357
2358 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2359
2360         * arch/tdesc.h: New file.
2361         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2362         * target-descriptions.c: Update comments.
2363         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2364         declarations.
2365         * features/i386/32bit-avx.c: Re-generated.
2366         * features/i386/32bit-avx512.c: Re-generated.
2367         * features/i386/32bit-core.c: Re-generated.
2368         * features/i386/32bit-linux.c: Re-generated.
2369         * features/i386/32bit-mpx.c: Re-generated.
2370         * features/i386/32bit-pkeys.c: Re-generated.
2371         * features/i386/32bit-sse.c: Re-generated.
2372
2373 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2374
2375         * regformats/regdat.sh: Update generated code.
2376
2377 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2378
2379         * regformats/regdat.sh: Adjust code order.
2380
2381 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2382
2383         * expprint.c (dump_subexp_body_standard): Use constant format
2384         string in fprintf_filtered call.
2385
2386 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2387
2388         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2389         NetBSD/i386.
2390         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2391
2392 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2393
2394         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2395
2396 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2397
2398         * bsd-kvm.o: Define _KMEMUSER.
2399         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2400         * configure: Regenerate.
2401
2402 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2403
2404         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2405         * i386-fbsd-nat.c: Likewise.
2406
2407 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2408
2409         * unittests/array-view-selftests.c: Add include of <array>.
2410
2411 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2412
2413         * spu-tdep.c (flush_ea_cache): Add missing argument to
2414         call_function_by_hand.
2415
2416 2017-09-04  Pedro Alves  <palves@redhat.com>
2417
2418         * NEWS (Safer support for debugging with no debug info): New.
2419
2420 2017-09-04  Pedro Alves  <palves@redhat.com>
2421
2422         * c-exp.y (function_method, function_method_void): Add current
2423         instance flags to TYPE_INSTANCE.
2424         * dwarf2read.c (check_modifier): New.
2425         (compute_delayed_physnames): Assert that only C++ adds delayed
2426         physnames.  Mark fn_fields as const/volatile depending on
2427         physname.
2428         * eval.c (make_params): New type_instance_flags parameter.  Use
2429         it as the new type's instance flags.
2430         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2431         flags element and pass it to make_params.
2432         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2433         instance flags element.
2434         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2435         * gdbtypes.h: Include "enum-flags.h".
2436         (type_instance_flags): New enum-flags type.
2437         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2438         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2439         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2440         (follow_type_instance_flags): New function.
2441         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2442         * parser-defs.h (follow_type_instance_flags): Declare.
2443         * valops.c (value_struct_elt_for_reference): const/volatile must
2444         match too.
2445
2446 2017-09-04  Pedro Alves  <palves@redhat.com>
2447
2448         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2449         function/method scopes; lookup the nested name as a function local
2450         static variable.
2451
2452 2017-09-04  Pedro Alves  <palves@redhat.com>
2453
2454         (%type <voidval>): Add function_method.
2455         * c-exp.y (exp): New production for calls with no arguments.
2456         (function_method, function_method_void_or_typelist): New
2457         productions.
2458         (exp): New production for "method()::static_var".
2459         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2460         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2461         Handle OP_FUNC_STATIC_VAR.
2462         * parse.c (operator_length_standard):
2463         Handle OP_FUNC_STATIC_VAR.
2464
2465 2017-09-04  Pedro Alves  <palves@redhat.com>
2466
2467         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2468         handling.
2469         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2470         Ditto.
2471         * parse.c (operator_length_standard, operator_check_standard):
2472         Ditto.
2473         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2474
2475 2017-09-04  Pedro Alves  <palves@redhat.com>
2476
2477         * ax-gdb.c: Include "typeprint.h".
2478         (gen_expr_for_cast): New function.
2479         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2480         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2481         type is unknown.
2482         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2483         nodebug_data_symbol.
2484         * eval.c: Include "typeprint.h".
2485         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2486         Error out if symbol has unknown type.
2487         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2488         evaluate_subexp_for_cast.
2489         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2490         OP_VAR_MSYM_VALUE.
2491         (evaluate_subexp_for_cast): New function.
2492         * gdbtypes.c (init_nodebug_var_type): New function.
2493         (objfile_type): Use it to initialize types of variables with no
2494         debug info.
2495         * typeprint.c (error_unknown_type): New.
2496         * typeprint.h (error_unknown_type): New declaration.
2497         * compile/compile-c-types.c (convert_type_basic): Handle
2498         TYPE_CODE_ERROR; warn and fallback to int for variables with
2499         unknown type.
2500
2501 2017-09-04  Pedro Alves  <palves@redhat.com>
2502
2503         * eval.c (evaluate_var_value): New function, factored out from ...
2504         (evaluate_subexp_standard): ... here.
2505
2506 2017-09-04  Pedro Alves  <palves@redhat.com>
2507
2508         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2509         Remove useless assignments to 'op'.
2510
2511 2017-09-04  Pedro Alves  <palves@redhat.com>
2512
2513         * eval.c (eval_skip_value): New function.
2514         (evaluate_subexp_standard): Use it.
2515
2516 2017-09-04  Pedro Alves  <palves@redhat.com>
2517
2518         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2519         function name from symbol/minsym and pass it to
2520         error_call_unknown_return_type.
2521
2522 2017-09-04  Pedro Alves  <palves@redhat.com>
2523
2524         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2525         * ax-gdb.c (gen_msym_var_ref): New function.
2526         (gen_expr): Handle OP_VAR_MSYM_VALUE.
2527         * eval.c (evaluate_var_msym_value): New function.
2528         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2529         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2530         to call_function_by_hand.
2531         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2532         Handle OP_VAR_MSYM_VALUE.
2533         (union exp_element) <msymbol>: New field.
2534         * minsyms.h (struct type): Forward declare.
2535         (find_minsym_type_and_address): Declare.
2536         * parse.c (write_exp_elt_msym): New function.
2537         (write_exp_msymbol): Delete, refactored as ...
2538         (find_minsym_type_and_address): ... this new function.
2539         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2540         (operator_length_standard, operator_check_standard): Handle
2541         OP_VAR_MSYM_VALUE.
2542         * std-operator.def (OP_VAR_MSYM_VALUE): New.
2543
2544 2017-09-04  Pedro Alves  <palves@redhat.com>
2545
2546         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2547         TYPE_GNU_IFUNC specially here.  Throw error if return type is
2548         unknown.
2549         * ada-typeprint.c (print_func_type): Handle functions with unknown
2550         return type.
2551         * c-typeprint.c (c_type_print_base): Handle functions and methods
2552         with unknown return type.
2553         * compile/compile-c-symbols.c (convert_symbol_bmsym)
2554         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2555         * compile/compile-c-types.c: Include "objfiles.h".
2556         (convert_func): For functions with unknown return type, warn and
2557         default to int.
2558         * compile/compile-object-run.c (compile_object_run): Adjust call
2559         to call_function_by_hand_dummy.
2560         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2561         call_function_by_hand.
2562         * eval.c (evaluate_subexp_standard): Adjust calls to
2563         call_function_by_hand.  Handle functions and methods with unknown
2564         return type.  Pass expect_type to call_function_by_hand.
2565         * f-typeprint.c (f_type_print_base): Handle functions with unknown
2566         return type.
2567         * gcore.c (call_target_sbrk): Adjust call to
2568         call_function_by_hand.
2569         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2570         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
2571         an integer address type instead of nodebug.
2572         * guile/scm-value.c (gdbscm_value_call): Adjust call to
2573         call_function_by_hand.
2574         * infcall.c (error_call_unknown_return_type): New function.
2575         (call_function_by_hand): New "default_return_type" parameter.
2576         Pass it down.
2577         (call_function_by_hand_dummy): New "default_return_type"
2578         parameter.  Use it instead of defaulting to int.  If there's no
2579         default and the return type is unknown, throw an error.  If
2580         there's a default return type, and the called function has no
2581         debug info, then assume the function is prototyped.
2582         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2583         New "default_return_type" parameter.
2584         (error_call_unknown_return_type): New declaration.
2585         * linux-fork.c (call_lseek): Cast return type of lseek.
2586         (inferior_call_waitpid, checkpoint_command): Adjust calls to
2587         call_function_by_hand.
2588         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2589         calls to call_function_by_hand.
2590         * m2-typeprint.c (m2_procedure): Handle functions with unknown
2591         return type.
2592         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2593         (value_nsstring, print_object_command): Adjust calls to
2594         call_function_by_hand.
2595         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2596         functions with unknown return type.
2597         (pascal_type_print_func_varspec_suffix): New function.
2598         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2599         TYPE_CODE_METHOD>: Use it.
2600         * python/py-value.c (valpy_call): Adjust call to
2601         call_function_by_hand.
2602         * rust-lang.c (rust_evaluate_funcall): Adjust call to
2603         call_function_by_hand.
2604         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2605         call_function_by_hand.
2606         * valops.c (value_allocate_space_in_inferior): Adjust call to
2607         call_function_by_hand.
2608         * typeprint.c (type_print_unknown_return_type): New function.
2609         * typeprint.h (type_print_unknown_return_type): New declaration.
2610
2611 2017-09-04  Pedro Alves  <palves@redhat.com>
2612
2613         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2614         types with more than one parameter as prototyped.
2615
2616 2017-09-04  Pedro Alves  <palves@redhat.com>
2617
2618         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2619         (disassemble_command): Use gdb_disassembly_flags instead of bare
2620         int.
2621         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2622         (dump_insns, do_mixed_source_and_assembly_deprecated)
2623         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2624         Use gdb_disassembly_flags instead of bare int.
2625         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2626         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2627         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2628         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2629         (enum gdb_disassembly_flag): ... values of this new enumeration.
2630         (gdb_disassembly_flags): Define.
2631         (gdb_disassembly)
2632         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2633         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2634         gdb_disassembly_flags instead of bare int.
2635         * record-btrace.c (btrace_insn_history)
2636         (record_btrace_insn_history, record_btrace_insn_history_range)
2637         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2638         instead of bare int.
2639         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2640         Use gdb_disassembly_flags instead of bare int.
2641         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2642         Define.
2643         * target-delegates.c: Regenerate.
2644         * target.c (target_insn_history, target_insn_history_from)
2645         (target_insn_history_range): Use gdb_disassembly_flags instead of
2646         bare int.
2647         * target.h: Include "disasm.h".
2648         (struct target_ops) <to_insn_history, to_insn_history_from,
2649         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2650         int.
2651         (target_insn_history, target_insn_history_from)
2652         (target_insn_history_range): Use gdb_disassembly_flags instead of
2653         bare int.
2654
2655 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2656
2657         * cli/cli-script.c (build_command_line): For if/while commands,
2658         check whether args is empty.
2659
2660 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2661
2662         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2663         (enum command_control_type): Likewise.
2664         (struct command_line): Likewise.
2665         (free_command_lines): Likewise.
2666         (struct command_lines_deleter): Likewise.
2667         (command_line_up): Likewise.
2668         (read_command_lines): Likewise.
2669         (read_command_lines_1): Likewise.
2670         * defs.h (enum misc_command_type): Move to cli/cli-script.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         * breakpoint.h: Include cli/cli-script.h.
2679         * extension-priv.h: Likewise.
2680         * gdbcmd.h: Likewise.
2681
2682 2017-09-04  Pedro Alves  <palves@redhat.com>
2683
2684         * ada-lang.c (is_known_support_routine): Move sal declaration to
2685         where it is initialized.
2686         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2687         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2688         (clear_command, update_static_tracepoint): Remove init_sal
2689         references.  Move declarations closer to initializations.
2690         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2691         initializations.
2692         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2693         references.  Move sal declarations closer to initializations.
2694         * frame.c (find_frame_sal): Return a symtab_and_line via function
2695         return instead of output parameter.  Remove init_sal references.
2696         * frame.h (find_frame_sal): Return a symtab_and_line via function
2697         return instead of output parameter.
2698         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2699         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2700         instead of memset.
2701         (gdbscm_find_pc_line): Remove init_sal reference.
2702         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2703         references.  Move declarations closer to initializations.
2704         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2705         initializations.
2706         (finish_backward): Remove init_sal references.  Move declarations
2707         closer to initializations.
2708         * infrun.c (process_event_stop_test, handle_step_into_function)
2709         (insert_hp_step_resume_breakpoint_at_frame)
2710         (insert_step_resume_breakpoint_at_caller): Likewise.
2711         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2712         (symbol_to_sal): Likewise.
2713         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2714         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2715         to its initialization.
2716         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2717         init_sal references.  Move declarations closer to initializations.
2718         * source.c (get_current_source_symtab_and_line): Remove brace
2719         initialization.
2720         (set_current_source_symtab_and_line): Now takes the sal by const
2721         reference.  Remove brace initialization.
2722         (line_info): Remove init_sal reference.
2723         * source.h (set_current_source_symtab_and_line): Now takes a
2724         symtab_and_line via const reference.
2725         * stack.c (set_current_sal_from_frame): Adjust.
2726         (print_frame_info): Adjust.
2727         (get_last_displayed_sal): Return the sal via function return
2728         instead of via output parameter.  Simplify.
2729         (frame_info): Adjust.
2730         * stack.h (get_last_displayed_sal): Return the sal via function
2731         return instead of via output parameter.
2732         * symtab.c (init_sal): Delete.
2733         (find_pc_sect_line): Remove init_sal references.  Move
2734         declarations closer to initializations.
2735         (find_function_start_sal): Remove init_sal references.  Move
2736         declarations closer to initializations.
2737         * symtab.h (struct symtab_and_line): In-class initialize all
2738         fields.
2739         * tracepoint.c (set_traceframe_context)
2740         (print_one_static_tracepoint_marker): Remove init_sal references.
2741         Move declarations closer to initializations.
2742         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2743         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2744         declarations closer to initializations.
2745         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2746         init_sal references.  Adjust.
2747
2748 2017-09-04  Pedro Alves  <palves@redhat.com>
2749
2750         * ax-gdb.c (agent_command_1): Use range-for.
2751         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2752         * breakpoint.c: Include "common/array-view.h".
2753         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2754         parameter from struct symtabs_and_lines to
2755         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2756         (breakpoint_sals_to_pc): Change sals parameter from struct
2757         symtabs_and_lines to std::vector reference.
2758         (check_fast_tracepoint_sals): Change sals parameter from struct
2759         symtabs_and_lines to std::array_view.  Use range-for.
2760         (decode_static_tracepoint_spec): Return a std::vector instead of
2761         symtabs_and_lines.  Update.
2762         (create_breakpoint): Update.
2763         (break_range_command, until_break_command, clear_command): Update.
2764         (base_breakpoint_decode_location, bkpt_decode_location)
2765         (bkpt_probe_create_sals_from_location)
2766         (bkpt_probe_decode_location, tracepoint_decode_location)
2767         (tracepoint_probe_decode_location)
2768         (strace_marker_create_sals_from_location): Return a std::vector
2769         instead of symtabs_and_lines.
2770         (strace_marker_create_breakpoints_sal): Update.
2771         (strace_marker_decode_location): Return a std::vector instead of
2772         symtabs_and_lines.  Update.
2773         (update_breakpoint_locations): Change struct symtabs_and_lines
2774         parameters to gdb::array_view.  Adjust.
2775         (location_to_sals): Return a std::vector instead of
2776         symtabs_and_lines.  Update.
2777         (breakpoint_re_set_default): Use std::vector instead of struct
2778         symtabs_and_lines.
2779         (decode_location_default): Return a std::vector instead of
2780         symtabs_and_lines.  Update.
2781         * breakpoint.h: Include "common/array-view.h".
2782         (struct breakpoint_ops) <decode_location>: Now returns a
2783         std::vector instead of returning a symtabs_and_lines via output
2784         parameter.
2785         (update_breakpoint_locations): Change sals parameters to use
2786         gdb::array_view.
2787         * cli/cli-cmds.c (edit_command, list_command): Update to use
2788         std::vector and gdb::array_view.
2789         (ambiguous_line_spec): Adjust to use gdb::array_view and
2790         range-for.
2791         (compare_symtabs): Rename to ...
2792         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2793         const reference and adjust.
2794         (filter_sals): Rewrite using std::vector and standard algorithms.
2795         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2796         (jump_command): Update to use std::vector.
2797         * linespec.c (struct linespec_state) <canonical_names>: Update
2798         comment.
2799         (add_sal_to_sals_basic): Delete.
2800         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2801         (decode_line_2, create_sals_line_offset)
2802         (convert_address_location_to_sals, convert_linespec_to_sals)
2803         (convert_explicit_location_to_sals, parse_linespec)
2804         (event_location_to_sals, decode_line_full, decode_line_1)
2805         (decode_line_with_current_source)
2806         (decode_line_with_last_displayed, decode_objc)
2807         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2808         (linespec_result::~linespec_result): Adjust to use std::vector
2809         instead of symtabs_and_lines.
2810         * linespec.h (linespec_sals::sals): Now a std::vector.
2811         (struct linespec_result): Use std::vector, bool, and in-class
2812         initialization.
2813         (decode_line_1, decode_line_with_current_source)
2814         (decode_line_with_last_displayed): Return std::vector.
2815         * macrocmd.c (info_macros_command): Use std::vector.
2816         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2817         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2818         std::vector.
2819         * probe.h (parse_probes): Return a std::vector.
2820         * python/python.c (gdbpy_decode_line): Use std::vector and
2821         gdb::array_view.
2822         * source.c (select_source_symtab, line_info): Use std::vector.
2823         * stack.c (func_command): Use std::vector.
2824         * symtab.h (struct symtabs_and_lines): Delete.
2825         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2826
2827 2017-09-04  Pedro Alves  <palves@redhat.com>
2828
2829         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2830         unittests/array-view-selftests.c.
2831         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2832         * common/array-view.h: New file.
2833         * unittests/array-view-selftests.c: New file.
2834
2835 2017-09-04  Pedro Alves  <palves@redhat.com>
2836
2837         * cli/cli-cmds.c (edit_command): Pass message to
2838         ambiguous_line_spec.
2839         (list_command): Pass message to ambiguous_line_spec.  Say
2840         "first"/"last" instead of "start" and "end" to be consistent with
2841         the manual.
2842         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
2843         them to print formatted message.
2844
2845 2017-09-04  Pedro Alves  <palves@redhat.com>
2846
2847         * btrace.c (ftrace_add_pt): Pass btrace_insn to
2848         ftrace_update_insns by reference instead of pointer.
2849
2850 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2851
2852         * i386-go32-tdep.c: Include x86-xstate.h.
2853         (i386_go32_init_abi): Call i386_target_description.
2854         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2855         if xcr0 is X86_XSTATE_X87_MASK.
2856         * i386-tdep.h (tdesc_i386): Remove the declaration.
2857         (tdesc_i386_mmx): Likewise.
2858
2859 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2860
2861         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2862         X86_XSTATE_SSE_MASK instead of 0.
2863
2864 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2865
2866         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2867         i386_target_description.
2868         * i386-fbsd-nat.c (i386fbsd_read_description): Call
2869         i386_target_description.
2870         * i386-tdep.c (i386_gdbarch_init): Likewise.
2871
2872 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2873
2874         * amd64-darwin-tdep.c: Include "x86-xstate.h".
2875         (x86_darwin_init_abi_64): Call amd64_target_description.
2876         * amd64-dicos-tdep.c: Likewise.
2877         * amd64-fbsd-nat.c: Likewise.
2878         * amd64-fbsd-tdep.c: Likewise.
2879         * amd64-nbsd-tdep.c: Likewise.
2880         * amd64-obsd-tdep.c: Likewise.
2881         * amd64-sol2-tdep.c: Likewise.
2882         * amd64-windows-tdep.c: Likewise.
2883         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2884
2885 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2886
2887         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2888         (btrace_function) <insn>: Change type to use std::vector.
2889         * btrace.c (ftrace_debug, ftrace_call_num_insn,
2890         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2891         ftrace_update_insns, ftrace_compute_global_level_offset,
2892         btrace_stitch_bts, btrace_clear, btrace_insn_get,
2893         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2894         change to std::vector.
2895         (ftrace_update_insns): Adjust to change to std::vector, change
2896         type of INSN parameter.
2897         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2898         * record-btrace.c (btrace_call_history_insn_range,
2899         btrace_compute_src_line_range,
2900         record_btrace_frame_prev_register): Adjust to change to
2901         std::vector.
2902         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2903         to change to std::vector.
2904
2905 2017-09-03  Tom Tromey  <tom@tromey.com>
2906
2907         * corefile.c (reopen_exec_file): Use std::string.
2908
2909 2017-09-03  Tom Tromey  <tom@tromey.com>
2910
2911         * compile/compile.c (compile_register_name_mangled): Return
2912         std::string.
2913         * compile/compile-loc2c.c (pushf_register_address): Update.
2914         (pushf_register): Update.
2915         * compile/compile-c-types.c (convert_array): Update.
2916         * compile/compile-c-symbols.c (generate_vla_size): Update.
2917         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2918         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2919         (convert_one_symbol): Update.
2920         (generate_c_for_for_one_variable): Update.
2921         * compile/compile-c-support.c (c_get_range_decl_name): Return a
2922         std::string.
2923         (generate_register_struct): Update.
2924         * compile/compile-internal.h (c_get_range_decl_name): Return a
2925         std::string.
2926         (compile_register_name_mangled): Return std::string.
2927
2928 2017-09-03  Tom Tromey  <tom@tromey.com>
2929
2930         * utils.c (perror_string): Return a std::string.
2931         (throw_perror_with_name, perror_warning_with_name): Update.
2932
2933 2017-09-03  Tom Tromey  <tom@tromey.com>
2934
2935         * demangle.c (demangle_command): Use std::string,
2936         unique_xmalloc_ptr.
2937
2938 2017-09-03  Tom Tromey  <tom@tromey.com>
2939
2940         * cli/cli-setshow.c (do_set_command): Use std::string.
2941
2942 2017-09-03  Tom Tromey  <tom@tromey.com>
2943
2944         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2945
2946 2017-09-03  Tom Tromey  <tom@tromey.com>
2947
2948         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2949
2950 2017-09-03  Tom Tromey  <tom@tromey.com>
2951
2952         * mi/mi-cmd-env.c (env_execute_cli_command): Use
2953         gdb::unique_xmalloc_ptr.
2954
2955 2017-09-03  Tom Tromey  <tom@tromey.com>
2956
2957         * thread.c (print_thread_info_1): Use string_printf.
2958         (thread_apply_command, thread_apply_all_command): Use
2959         std::string.
2960
2961 2017-09-03  Tom Tromey  <tom@tromey.com>
2962
2963         * valprint.c (val_print_string): Update.
2964         * gdbcore.h (memory_error_message): Return std::string.
2965         * corefile.c (memory_error_message): Return std::string.
2966         (memory_error): Update.
2967         * breakpoint.c (insert_bp_location): Update.
2968
2969 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
2970
2971         * target/waitstatus.h (target_waitstatus_to_string): Change
2972         return type to std::string.
2973         * target/waitstatus.c (target_waitstatus_to_string): Return
2974         std::string.
2975         * target.h (target_waitstatus_to_string): Remove declaration.
2976         * infrun.c (resume, clear_proceed_status_thread,
2977         print_target_wait_results, do_target_wait, save_waitstatus,
2978         stop_all_threads): Adjust.
2979         * record-btrace.c (record_btrace_wait): Adjust.
2980         * target-debug.h
2981         (target_debug_print_struct_target_waitstatus_p): Adjust.
2982
2983 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
2984
2985         PR gdb/22046
2986         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2987         detection.
2988
2989 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2990
2991         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2992         for setting/unsetting environment variables on the remote target.
2993         (New remote packets): Add entries for QEnvironmentHexEncoded,
2994         QEnvironmentUnset and QEnvironmentReset.
2995         * common/environ.c (gdb_environ::operator=): Extend method to
2996         handle m_user_set_env_list and m_user_unset_env_list.
2997         (gdb_environ::clear): Likewise.
2998         (match_var_in_string): Change type of first parameter from 'char
2999         *' to 'const char *'.
3000         (gdb_environ::set): Extend method to handle
3001         m_user_set_env_list and m_user_unset_env_list.
3002         (gdb_environ::unset): Likewise.
3003         (gdb_environ::clear_user_set_env): New method.
3004         (gdb_environ::user_set_envp): Likewise.
3005         (gdb_environ::user_unset_envp): Likewise.
3006         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3007         m_user_unset_env_list on move constructor/assignment.
3008         (unset): Add new default parameter 'update_unset_list = true'.
3009         (clear_user_set_env): New method.
3010         (user_set_envp): Likewise.
3011         (user_unset_envp): Likewise.
3012         (m_user_set_env_list): New std::set.
3013         (m_user_unset_env_list): Likewise.
3014         * common/rsp-low.c (hex2str): New function.
3015         (bin2hex): New overload for bin2hex function.
3016         * common/rsp-low.c (hex2str): New prototype.
3017         (str2hex): New overload prototype.
3018         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3019         QEnvironmentUnset and QEnvironmentReset.
3020         (remote_protocol_features): Add QEnvironmentHexEncoded,
3021         QEnvironmentUnset and QEnvironmentReset packets.
3022         (send_environment_packet): New function.
3023         (extended_remote_environment_support): Likewise.
3024         (extended_remote_create_inferior): Call
3025         extended_remote_environment_support.
3026         (_initialize_remote): Add QEnvironmentHexEncoded,
3027         QEnvironmentUnset and QEnvironmentReset packet configs.
3028         * unittests/environ-selftests.c (gdb_selftest_env_var):
3029         New variable.
3030         (test_vector_initialization): New function.
3031         (test_init_from_host_environ): Likewise.
3032         (test_reinit_from_host_environ): Likewise.
3033         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3034         Likewise.
3035         (test_unset_set_empty_vector): Likewise.
3036         (test_vector_clear): Likewise.
3037         (test_std_move): Likewise.
3038         (test_move_constructor):
3039         (test_self_move): Likewise.
3040         (test_set_unset_reset): Likewise.
3041         (run_tests): Rewrite in terms of the functions above.
3042
3043 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3044
3045         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3046         (adi_available): Use a temp variable of type CORE_ADDR as argument
3047         3 when calling target_auxv_search.
3048         (adi_normalize_address): Use masks and xor operators to calculate
3049         normalized address.
3050         (adi_read_versions, adi_write_versions, adi_print_versions)
3051         (do_examine, do_assign): Use paddress.
3052
3053 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3054
3055         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3056         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3057         out of loop and add supply of FIR.
3058         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3059         add collect of FIR.
3060
3061 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3062
3063         PR gdb/21827
3064         * cli/cli-script.c (define_command): Don't convert command name
3065         to lower case.
3066
3067 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3068
3069         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3070         Update all callers accordingly. Remove all code blocks handling
3071         the case where DISPP is not NULL.
3072
3073 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3074
3075         PR symtab/22003
3076         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3077         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3078         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3079
3080 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3081
3082         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3083         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3084         (read_comp_units_from_section): New parameter abbrev_section, use
3085         read_and_check_comp_unit_head, allocate signatured_type if needed.
3086         (create_all_comp_units): Update read_comp_units_from_section caller.
3087
3088 2017-08-23  Pedro Alves  <palves@redhat.com>
3089
3090         PR remote/21852
3091         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3092         to null_ptid and switch to thread without reading the registers
3093         after adding the inferior.
3094
3095 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3096
3097         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3098         compile-gcc.
3099         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3100         (compile_to_object): Implement compile_gcc.
3101         (_initialize_compile): Install "set compile-gcc".  Initialize
3102         compile_gcc.
3103
3104 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3105
3106         * compile/compile.c (compile_to_object): Conditionally call
3107         set_verbose.  Conditionally call compile or compile_v0.
3108
3109 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3110
3111         * sparc64-tdep.h: (adi_normalize_address): New export.
3112         * sparc-nat.h: (open_adi_tag_fd): New export.
3113         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3114         * sparc64-linux-tdep.c:
3115         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3116         (sparc64_linux_handle_segmentation_fault): New function.
3117         (sparc64_linux_init_abi): Register
3118         sparc64_linux_handle_segmentation_fault
3119         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3120         (sparc64_addr_bits_remove): New function.
3121         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3122         (MAX_PROC_NAME_SIZE): New macro.
3123         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3124         (sparc64adilist): New variable.
3125         (adi_proc_list): New variable.
3126         (find_adi_info): New function.
3127         (add_adi_info): New function.
3128         (get_adi_info_proc): New function.
3129         (get_adi_info): New function.
3130         (info_adi_command): New function.
3131         (read_maps_entry): New function.
3132         (adi_available): New function.
3133         (adi_normalize_address): New function.
3134         (adi_align_address): New function.
3135         (adi_convert_byte_count): New function.
3136         (adi_tag_fd): New function.
3137         (adi_is_addr_mapped): New function.
3138         (adi_read_versions): New function.
3139         (adi_write_versions): New function.
3140         (adi_print_versions): New function.
3141         (do_examine): New function.
3142         (do_assign): New function.
3143         (adi_examine_command): New function.
3144         (adi_assign_command): New function.
3145         (_initialize_sparc64_adi_tdep): New function.
3146
3147 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3148
3149         * breakpoint.c (breakpoints_info): Rename to ...
3150         (info_breakpoints_command): ... this.
3151         (watchpoints_info): Rename to ...
3152         (info_watchpoints_command): ... this.
3153         (tracepoints_info): Rename to ...
3154         (info_tracepoints_command): ... this.
3155         (_initialize_breakpoint): Adjust.
3156         * dcache.c (dcache_info): Rename to ...
3157         (info_display_command): ... this.
3158         (_initialize_dcache): Adjust.
3159         * frame.h (args_info): Rename to ...
3160         (info_args_command): ... this.
3161         (locals_info): Rename to ...
3162         (info_locals_command): ... this.
3163         * infcmd.c (nofp_registers_info): Rename to ...
3164         (info_registers_command): ... this.
3165         (float_info): Rename to ...
3166         (info_float_command): ... this.
3167         (program_info): Rename to ...
3168         (info_program_command): ... this.
3169         (all_registers_info): Rename to ...
3170         (info_all_registers_command): ... this.
3171         (vector_info): Rename to ...
3172         (info_vector_command): ... this.
3173         (float_info): Rename to ...
3174         (info_float_command): ... this.
3175         (_initialize_infcmd): Adjust.
3176         * inferior.h (term_info): Rename to ...
3177         (info_terminal_command): ... this.
3178         * inflow.c (term_info): Rename to ...
3179         (info_terminal_command): ... this.
3180         (_initialize_inflow): Adjust.
3181         * infrun.c (signals_info): Rename to ...
3182         (info_signals_command): ... this.
3183         (_initialize_infrun): Adjust.
3184         * objc-lang.c (classes_info): Rename to ...
3185         (info_classes_command): ... this.
3186         (selectors_info): Rename to ...
3187         (info_selectors_command): ... this.
3188         (_initialize_objc_language): Adjust.
3189         * printcmd.c (sym_info): Rename to ...
3190         (info_symbol_command): ... this.
3191         (address_info): Rename to ...
3192         (info_address_command): ... this.
3193         (display_info): Rename to ...
3194         (info_display_command): ... this.
3195         (_initialize_printcmd): Adjust.
3196         * reverse.c (bookmarks_info): Rename to ...
3197         (info_breakpoints_command): ... this.
3198         (_initialize_reverse): Adjust.
3199         * ser-go32.c (dos_info): Rename to ...
3200         (info_serial_command): ... this.
3201         (_initialize_ser_dos): Adjust.
3202         * skip.c (skip_info): Rename to ...
3203         (info_skip_command): ... this.
3204         (_initialize_step_skip): Adjust.
3205         * source.c (line_info): Rename to ...
3206         (info_line_command): ... this.
3207         (source_info): Rename to ...
3208         (info_source_command)
3209         * stack.c (frame_info): Rename to ...
3210         (info_frame_command): ... this.
3211         (locals_info): Rename to ...
3212         (info_locals_command): ... this.
3213         (args_info): Rename to ...
3214         (info_args_command): ... this.
3215         (_initialize_stack): Adjust.
3216         * symtab.c (sources_info): Rename to ...
3217         (info_sources_command): ... this.
3218         (variables_info): Rename to ...
3219         (info_variables_command): ... this.
3220         (functions_info): Rename to ...
3221         (info_functions_command): ... this.
3222         (types_info): Rename to ...
3223         (info_types_command): ... this.
3224         (_initialize_symtab): Adjust.
3225         * target.c (target_info): Rename to ...
3226         (info_target_command): ... this.
3227         (initialize_targets): Adjust.
3228         * tracepoint.c (tvariables_info): Rename to ...
3229         (info_tvariables_command): ... this.
3230         (scope_info): Rename to ...
3231         (info_scope_command): ... this.
3232         (trace_dump_actions): Adjust.
3233         (_initialize_tracepoint): Adjust.
3234
3235 2017-08-22  Tom Tromey  <tom@tromey.com>
3236
3237         * breakpoint.h (install_breakpoint): Update.
3238         * breakpoint.c (add_solib_catchpoint): Update.
3239         (install_breakpoint): Change argument to a std::unique_ptr.
3240         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3241         (create_breakpoint_sal, create_breakpoint): Update.
3242         (watch_command_1, catch_exec_command_1)
3243         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3244         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3245         Return the breakpoint.
3246         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3247         (new_single_step_breakpoint): Update.
3248         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3249         std::unique_ptr.
3250         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3251         std::unique_ptr.
3252         * break-catch-sig.c (create_signal_catchpoint): Use
3253         std::unique_ptr.
3254         * ada-lang.c (create_ada_exception_catchpoint): Use
3255         std::unique_ptr.
3256
3257 2017-08-22  Tom Tromey  <tom@tromey.com>
3258
3259         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3260
3261 2017-08-22  Tom Tromey  <tom@tromey.com>
3262
3263         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3264         (lookup_partial_symbol): Update.
3265
3266 2017-08-22  Tom Tromey  <tom@tromey.com>
3267
3268         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3269         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3270         (find_and_open_source, symtab_to_fullname): Update.
3271         * psymtab.c (psymtab_to_fullname): Update.
3272
3273 2017-08-22  Tom Tromey  <tom@tromey.com>
3274
3275         * exec.c (exec_file_attach): Update.
3276         * linux-thread-db.c (try_thread_db_load): Update.
3277         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3278         * utils.c (gdb_realpath): Change return type.
3279         (gdb_realpath_keepfile): Update.
3280         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3281         (_initialize_utils): Register the new self test.
3282         * source.c (openp): Update.
3283         (find_and_open_source): Update.
3284         * nto-tdep.c (nto_find_and_open_solib): Update.
3285         * main.c (set_gdb_data_directory): Update.
3286         (captured_main_1): Update.
3287         * dwarf2read.c (dwarf2_get_dwz_file): Update
3288         (dw2_map_symbol_filenames): Update.
3289         * auto-load.c (auto_load_safe_path_vec_update): Update.
3290         (filename_is_in_auto_load_safe_path_vec): Change type of
3291         "filename_realp".
3292         (auto_load_objfile_script): Update.
3293         (file_is_auto_load_safe): Update.  Use std::string.
3294         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3295
3296 2017-08-22  Tom Tromey  <tom@tromey.com>
3297
3298         * utils.c (gdb_realpath_keepfile): Return a
3299         gdb::unique_xmalloc_ptr.
3300         * exec.c (exec_file_attach): Update.
3301         * utils.h (gdb_realpath_keepfile): Return a
3302         gdb::unique_xmalloc_ptr.
3303
3304 2017-08-22  Tom Tromey  <tom@tromey.com>
3305
3306         * compile/compile.c (compile_file_command): Use
3307         gdb::unique_xmalloc_ptr, std::string.
3308         * utils.c (gdb_abspath): Change return type.
3309         * source.c (openp): Update.
3310         * objfiles.c (allocate_objfile): Update.
3311         * main.c (set_gdb_data_directory): Update.
3312         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3313
3314 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3315
3316         * cli-cmds.c (list_commands): List actual code around more than
3317         one location.
3318
3319 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3320
3321         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3322
3323 2017-08-21  Pedro Alves  <palves@redhat.com>
3324
3325         PR gdb/19487
3326         * c-exp.y (variable production): Handle function aliases.
3327         * minsyms.c (msymbol_is_text): New function.
3328         * minsyms.h (msymbol_is_text): Declare.
3329         * symtab.c (find_function_alias_target): New function.
3330         * symtab.h (find_function_alias_target): Declare.
3331
3332 2017-08-21  Pedro Alves  <palves@redhat.com>
3333
3334         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3335         typedefs.
3336         * typeprint.c (whatis_exp): If handling "whatis", and expression
3337         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3338         typedefs here.
3339         * valops.c (value_cast): Save "to" type before resolving
3340         stubs/typedefs.  Use that type as resulting value's type.
3341
3342 2017-08-18  Tom Tromey  <tom@tromey.com>
3343             Pedro Alves  <palves@redhat.com>
3344
3345         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3346         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3347         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3348         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3349         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3350         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3351         (linux_get_siginfo_data): Add "thread" argument.  Use
3352         scoped_restore.
3353         * linux-nat.c (linux_child_follow_fork)
3354         (check_stopped_by_watchpoint): Use scoped_restore.
3355         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3356         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3357         (restore_inferior_ptid, save_inferior_ptid): Remove.
3358         * btrace.c (btrace_fetch): Use scoped_restore.
3359         * bsd-uthread.c (bsd_uthread_fetch_registers)
3360         (bsd_uthread_store_registers): Use scoped_restore.
3361         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3362         scoped_restore.
3363         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3364         (aix_thread_xfer_partial): Use scoped_restore.
3365         * inferior.h (save_inferior_ptid): Remove.
3366
3367 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3368
3369         PR tdep/21818
3370         * arm-tdep.c (gdb_print_insn_arm): Mark
3371         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3372
3373 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3374
3375         * NEWS: Mention GDBserver's new option "--selftest".
3376         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3377         * selftest.c: Move it to common/selftest.c.
3378         * selftest.h: Move it to common/selftest.h.
3379         * selftest-arch.c (reset): New function.
3380         (tests_with_arch): Call reset.
3381
3382 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3383
3384         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3385         instead of exception_fprintf and printf_filtered.
3386
3387 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3388
3389         * selftest.c (register_self_test): Rename it to
3390         selftests::register_test.
3391         (run_self_tests): selftest::run_tests.
3392         * selftest.h: Update declarations.
3393         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3394         selftests::register_test_foreach_arch.
3395         * selftest-arch.h: Update declaration.
3396         * aarch64-tdep.c: Update.
3397         * arm-tdep.c: Likewise.
3398         * disasm-selftests.c: Likewise.
3399         * dwarf2loc.c: Likewise.
3400         * dwarf2-frame.c: Likewise.
3401         * findvar.c: Likewise.
3402         * gdbarch-selftests.c: Likewise.
3403         * maint.c (maintenance_selftest): Likewise.
3404         * regcache.c: Likewise.
3405         * rust-exp.y: Likewise.
3406         * selftest-arch.c: Likewise.
3407         * unittests/environ-selftests.c: Likewise.
3408         * unittests/function-view-selftests.c: Likewise.
3409         * unittests/offset-type-selftests.c: Likewise.
3410         * unittests/optional-selftests.c: Likewise.
3411         * unittests/scoped_restore-selftests.c: Likewise.
3412         * utils-selftests.c: Likewise.
3413
3414 2017-08-17  Pedro Alves  <palves@redhat.com>
3415
3416         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3417         local.
3418
3419 2017-08-17  Pedro Alves  <palves@redhat.com>
3420
3421         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3422         field.
3423         (reset_die_in_process): Delete, replaced by ...
3424         (process_die_scope): ... this new class.  Make it responsible for
3425         freeing cu->line_header too.
3426         (process_die): Use process_die_scope.
3427         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3428         cu->line_header_die_owner.  Don't release the line header if it's
3429         owned by the CU.
3430         (setup_type_unit_groups): Make the CU/DIE own the line header.
3431         Don't release the line header here.
3432
3433 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3434
3435         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3436
3437 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3438
3439         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3440         Single-Key mode
3441
3442 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3443
3444         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3445         mode command list.
3446
3447 2017-08-15  Stafford Horne  <shorne@gmail.com>
3448
3449         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3450
3451 2017-08-15  Stafford Horne  <shorne@gmail.com>
3452
3453         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3454
3455 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3456
3457         PR gdb/21954
3458         * infcmd.c (unset_environment_command): Use the 'clear' method on
3459         the environment instead of resetting it.
3460
3461 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3462
3463         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3464         platforms.
3465
3466 2017-08-14  Tom Tromey  <tom@tromey.com>
3467
3468         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3469         (print_binary_chars): Likewise.
3470         (BITS_IN_BYTES): Remove.
3471
3472 2017-08-14  Tom Tromey  <tom@tromey.com>
3473
3474         PR gdb/21675
3475         * valprint.c (LOW_ZERO): Change value to 034.
3476         (print_octal_chars): Add static_asserts for octal constants.
3477         * printcmd.c (print_scalar_formatted): Add 'd' case.
3478
3479 2017-08-11  Tom Tromey  <tom@tromey.com>
3480
3481         * symfile.c (add_symbol_file_command): Use std::vector.
3482
3483 2017-08-14  Tom Tromey  <tom@tromey.com>
3484
3485         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3486         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3487         std::move.
3488         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3489
3490 2017-08-11  Pedro Alves  <palves@redhat.com>
3491
3492         * infrun.c (process_event_stop_test): Adjust
3493         function_name_is_marked_for_skip call.
3494         * skip.c: Include <list>.
3495         (skiplist_entry): Make it a class with private fields, and
3496         getters/setters.
3497         (skiplist_entry_chain): Delete.
3498         (skiplist_entries): New.
3499         (skiplist_entry_count): Delete.
3500         (highest_skiplist_entry_num): New.
3501         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3502         (add_skiplist_entry): Delete.
3503         (skiplist_entry::skiplist_entry): New.
3504         (skiplist_entry::add_entry): New.
3505         (skip_file_command, skip_function): Adjust.
3506         (compile_skip_regexp): Delete.
3507         (skip_command): Don't compile regexp here.  Adjust to use
3508         skiplist_entry::add_entry.
3509         (skip_info): Adjust to use range-for and getters.
3510         (skip_enable_command, skip_disable_command): Adjust to use
3511         range-for and setters.
3512         (skip_delete_command): Adjust to use std::list.
3513         (add_skiplist_entry): Delete.
3514         (skip_file_p): Delete, refactored as ...
3515         (skiplist_entry::do_skip_file_p): ... this new method.
3516         (skip_gfile_p): Delete, refactored as ...
3517         (skiplist_entry::do_gskip_file_p): ... this new method.
3518         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3519         (skiplist_entry::skip_function_p): ... this new method.
3520         (function_name_is_marked_for_skip): Now returns bool, and takes
3521         the function sal by const reference.  Adjust to use range-for and
3522         skiplist_entry methods.
3523         (_initialize_step_skip): Remove references to
3524         skiplist_entry_chain, skiplist_entry_count.
3525         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3526         takes the function sal by const reference.
3527
3528 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3529
3530         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3531         (dwarf2_frame_cache): Remove reset_cache_cleanup.
3532         (dwarf2_frame_cache):
3533         * frame-unwind.c (frame_unwind_try_unwinder): Catch
3534         RETURN_MASK_ALL and set *this_case to NULL.
3535         * frame-unwind.h: Update comments.
3536
3537 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3538
3539         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3540         (dwarf2_frame_state_copy_regs): Remove.
3541         (dwarf2_frame_state_free_regs): Remove.
3542         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3543         (dwarf2_restore_rule): Call method .alloc_regs instead of
3544         dwarf2_frame_state_alloc_regs.
3545         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
3546         constructor.  Call std::move.
3547         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3548         (dwarf2_frame_cache): Likewise.
3549
3550         [GDB_SELF_TEST]: Include selftest.h and
3551         selftest-arch.h.
3552         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3553         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3554         execute_cfa_program_test.
3555
3556         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3557         copy ctor, assignment operator, move assignment.
3558         <alloc_regs>: New method.
3559         <swap>: New method.
3560         (struct dwarf2_frame_state): Delete dtor.
3561         (dwarf2_frame_state_alloc_regs): Remove declaration.
3562         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3563         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3564
3565 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3566
3567         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3568         (dwarf2_frame_state::dwarf2_frame_state): New.
3569         (dwarf2_frame_state::~dwarf2_frame_state): New.
3570         (dwarf2_fetch_cfa_info): Update.
3571         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
3572         rather than a pointer.  Update code.
3573         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3574         dtor.
3575         <data_align, code_align, retaddr_column>: Change them to const.
3576         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3577         to bool.
3578
3579 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3580
3581         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3582         <loc.exp>: New field.
3583         * dwarf2-frame.c (execute_cfa_program): Update.
3584         (dwarf2_frame_prev_register): Update.
3585
3586 2017-08-10  Pedro Alves  <palves@redhat.com>
3587
3588         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3589
3590 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3591
3592         * fbsd-nat.c (struct fbsd_fork_info): Remove.
3593         (fbsd_pending_children): Use std::list.
3594         (fbsd_remember_child): Likewise.
3595         (fbsd_is_child_pending): Likewise.
3596         (fbsd_pending_vfork_done): Use std::forward_list.
3597         (fbsd_add_vfork_done): Likewise.
3598         (fbsd_is_vfork_done_pending): Likewise.
3599         (fbsd_next_vfork_done): Likewise.
3600
3601 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3602
3603         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3604         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3605         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3606         for `mapfilename'.
3607         (fbsd_xfer_partial): Use gdb::byte_vector.
3608         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3609
3610 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3611
3612         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3613         "filestuff.h".
3614         (fbsd_find_memory_regions): Fix `mapfile' initialization.
3615
3616 2017-08-09  Tom Tromey  <tom@tromey.com>
3617
3618         * skip.c (skiplist_entry): New constructor.
3619         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3620         (skiplist_entry::file_is_glob): Now bool.
3621         (skiplist_entry::file, skiplist_entry::function): Now
3622         std::string.
3623         (make_skip_entry): Return a unique_ptr.  Use new.
3624         (free_skiplist_entry, free_skiplist_entry_cleanup)
3625         (make_free_skiplist_entry_cleanup): Remove.
3626         (skip_command, skip_disable_command, add_skiplist_entry)
3627         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3628         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3629         (function_name_is_marked_for_skip): Update.
3630         (skip_delete_command): Update.  Use delete.
3631
3632 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3633
3634         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3635         (aarch64_linux_core_read_description): New function.
3636         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3637
3638 2017-08-09  Pedro Alves  <palves@redhat.com>
3639
3640         * cp-name-parser.y (cp_comp_to_string): Return a
3641         gdb::unique_xmalloc_ptr<char>.
3642         * cp-support.c (replace_typedefs_qualified_name)
3643         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3644         (cp_canonicalize_string_full): Use op= instead of explicit
3645         convertion.
3646         (cp_class_name_from_physname, method_name_from_physname)
3647         (cp_func_name, cp_remove_params): Adjust to use
3648         gdb::unique_xmalloc_ptr<char>.
3649         * cp-support.h (cp_comp_to_string): Return a
3650         gdb::unique_xmalloc_ptr<char>.
3651         * python/py-type.c (typy_lookup_type): Adjust to use
3652         gdb::unique_xmalloc_ptr<char>.
3653
3654 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3655
3656         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3657
3658 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3659             Yao Qi  <yao.qi@linaro.org>
3660
3661         * cp-support.c (cp_canonicalize_string_full): Use
3662         gdb::unique_xmalloc_ptr<char>.
3663         (cp_canonicalize_string): Likewise.
3664
3665 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3666
3667         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3668         * regformats/i386/amd64-avx-avx512.dat: Remove.
3669         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3670         * regformats/i386/amd64-avx-mpx.dat:Remove.
3671         * regformats/i386/amd64-avx.dat: Remove.
3672         * regformats/i386/amd64-mpx.dat: Remove.
3673         * regformats/i386/i386-avx-avx512.dat: Remove.
3674         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3675         * regformats/i386/i386-avx-mpx.dat: Remove.
3676         * regformats/i386/i386-mmx.dat: Remove.
3677         * regformats/i386/i386-mpx.dat: Remove.
3678
3679 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3680
3681         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3682         * amd64-tdep.c: Don't include features/i386/x32*.c.
3683         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3684         functions.
3685         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3686         and i386/x32-avx-avx512.
3687         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3688         and i386/x32.xml.
3689         * features/i386/x32-avx-avx512.c: Removed.
3690         * features/i386/x32-avx-avx512.xml: Removed.
3691         * features/i386/x32-avx.c: Removed.
3692         * features/i386/x32-avx.xml: Removed.
3693         * features/i386/x32.c: Removed.
3694         * features/i386/x32.xml: Removed.
3695         * regformats/i386/x32-avx-avx512.dat: Removed.
3696         * regformats/i386/x32-avx.dat: Removed.
3697         * regformats/i386/x32.dat: Removed.
3698
3699 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3700
3701         PR breakpoints/21886
3702         * mem-break.c (default_memory_insert_breakpoint): Use
3703         `->placed_address' rather than `->reqstd_address' for the
3704         breakpoint location.
3705
3706 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3707
3708         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3709         assertions.
3710
3711 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3712
3713         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3714         a union of `tdep_info', `tdesc_data' and `id'.
3715         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3716         rather than `info.tdep_info'.
3717         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3718         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3719         * i386-tdep.c (i386_gdbarch_init): Likewise.
3720         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3721         * mips-tdep.c (mips_gdbarch_init): Likewise.
3722         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3723         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3724         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3725         `info.tdep_info'.
3726         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3727         `info.tdep_info'.
3728         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3729         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3730         `info.tdep_info'.
3731         * spu-tdep.c (spu_gdbarch_init): Likewise.
3732         * gdbarch.h: Regenerate.
3733
3734 2017-08-07  Leszek Swirski  <leszeks@google.com>
3735
3736         PR symtab/20899
3737         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3738
3739 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3740
3741         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3742         (gdbsim_open): Rename gdb_argv args object to argv.
3743
3744 2017-08-05  Tom Tromey  <tom@tromey.com>
3745
3746         * compile/compile-object-load.c (compile_object_load): Use
3747         gdb::unique_xmalloc_ptr.
3748         * cli/cli-dump.c (scan_filename): Rename from
3749         scan_filename_with_cleanup.  Change return type.
3750         (scan_expression): Rename from scan_expression_with_cleanup.
3751         Change return type.
3752         (dump_memory_to_file, dump_value_to_file, restore_command):
3753         Use gdb::unique_xmalloc_ptr.  Update.
3754         * cli/cli-cmds.c (find_and_open_script): Use
3755         gdb::unique_xmalloc_ptr.
3756         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3757         * symmisc.c (maintenance_print_symbols)
3758         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3759         * symfile.c (symfile_bfd_open, generic_load)
3760         (add_symbol_file_command, remove_symbol_file_command): Use
3761         gdb::unique_xmalloc_ptr.
3762         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3763         * psymtab.c (maintenance_print_psymbols): Use
3764         gdb::unique_xmalloc_ptr.
3765         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3766         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3767         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3768         (reload_shared_libraries_1): Likewise.
3769
3770 2017-08-05  Tom Tromey  <tom@tromey.com>
3771
3772         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3773         (rust_op_vector, rust_set_vector): New typedefs.
3774         (current_parser): New global.
3775         (work_obstack): Change to pointer type.  Update all users.
3776         (rust_ast, pstate): Remove globals.
3777         (struct rust_parser): New.
3778         (%union) <params, field_inits>: Change type.
3779         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3780         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3781         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3782         (convert_params_to_types, convert_params_to_expression): Change
3783         type of "params".
3784         (ast_string): Change type of "fields".
3785         (rust_parse): Make a rust_parser.  Remove cleanups.
3786         (rust_lex_tests): Make and install an auto_obstack.
3787
3788 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3789
3790         * configure.srv (ipa_x32_linux_regobj): New.
3791         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3792         instead of X86_TDESC_AVX512.
3793         (initialize_low_tracepoint): Call
3794         init_registers_x32_avx_avx512_linux.
3795
3796 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3797
3798         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3799
3800 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3801
3802         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3803
3804 2017-08-03  Tom Tromey  <tom@tromey.com>
3805
3806         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3807         Remove.
3808         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3809
3810 2017-08-03  Tom Tromey  <tom@tromey.com>
3811
3812         * python/py-param.c (compute_enum_values): Use gdb_argv.
3813
3814 2017-08-03  Tom Tromey  <tom@tromey.com>
3815
3816         * utils.h (struct gdb_argv_deleter): New.
3817         (gdb_argv): New class.
3818         * utils.c (gdb_argv::reset): New method.
3819         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3820         * tracefile.c (tsave_command): Use gdb_argv.
3821         * top.c (new_ui_command): Use gdb_argv.
3822         * symmisc.c (maintenance_print_symbols)
3823         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3824         * symfile.c (symbol_file_command, generic_load)
3825         (remove_symbol_file_command): Use gdb_argv.
3826         * stack.c (backtrace_command): Use gdb_argv.
3827         * source.c (add_path, show_substitute_path_command)
3828         (unset_substitute_path_command, set_substitute_path_command):
3829         Use gdb_argv.
3830         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3831         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3832         * remote.c (extended_remote_run, remote_put_command)
3833         (remote_get_command, remote_delete_command): Use gdb_argv.
3834         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3835         (gdbsim_open): Use gdb_argv.
3836         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3837         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3838         * procfs.c (procfs_info_proc): Use gdb_argv.
3839         * interps.c (interpreter_exec_cmd): Use gdb_argv.
3840         * infrun.c (handle_command): Use gdb_argv.
3841         * inferior.c (add_inferior_command, clone_inferior_command):
3842         Use gdb_argv.
3843         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3844         * exec.c (exec_file_command): Use gdb_argv.
3845         * cli/cli-cmds.c (alias_command): Use gdb_argv.
3846         * compile/compile.c (build_argc_argv): Use gdb_argv.
3847
3848 2017-08-03  Tom Tromey  <tom@tromey.com>
3849
3850         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3851
3852 2017-08-03  Tom Tromey  <tom@tromey.com>
3853
3854         * python/python.c (compute_python_string): Return std::string.
3855         (gdbpy_eval_from_control_command): Update.
3856         (do_start_initialization): Use std::string.
3857         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3858         xstrprintf.
3859         * python/py-breakpoint.c (local_setattro): Use string_printf, not
3860         xstrprintf.
3861
3862 2017-08-03  Tom Tromey  <tom@tromey.com>
3863
3864         * top.h (do_restore_instream_cleanup): Remove.
3865         * top.c (do_restore_instream_cleanup): Remove.
3866         (read_command_file): Use scoped_restore.
3867         * cli/cli-script.c (execute_user_command): Use scoped_restore.
3868
3869 2017-08-03  Tom Tromey  <tom@tromey.com>
3870
3871         * cli/cli-script.c (execute_user_command)
3872         (execute_control_command): Use scoped_restore.
3873
3874 2017-08-03  Tom Tromey  <tom@tromey.com>
3875
3876         * cli/cli-script.c (do_restore_user_call_depth): Remove.
3877         (execute_user_command): Remove user_call_depth; use
3878         user_args_stack's size instead.
3879
3880 2017-08-03  Tom Tromey  <tom@tromey.com>
3881
3882         * top.h (in_user_command): Remove.
3883         * top.c (in_user_command): Remove.
3884         * cli/cli-script.c (do_restore_user_call_depth)
3885         (execute_user_command): Update.
3886
3887 2017-08-03  Tom Tromey  <tom@tromey.com>
3888
3889         * valops.c (search_struct_method): Use gdb::byte_vector.
3890         * valarith.c (value_concat): Use std::vector.
3891         * target.c (memory_xfer_partial): Use gdb::byte_vector.
3892         (simple_search_memory): Likewise.
3893         * printcmd.c (find_string_backward): Use gdb::byte_vector.
3894         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3895         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3896         * elfread.c (elf_rel_plt_read): Use std::string.
3897         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3898         * cli/cli-dump.c (restore_section_callback): Use
3899         gdb::byte_vector.
3900
3901 2017-08-03  Tom Tromey  <tom@tromey.com>
3902
3903         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3904
3905 2017-08-03  Tom Tromey  <tom@tromey.com>
3906
3907         * tui/tui-regs.c (tui_restore_gdbout): Remove.
3908         (tui_register_format): Use scoped_restore.
3909
3910 2017-08-03  Tom Tromey  <tom@tromey.com>
3911
3912         * reverse.c (exec_direction_default): Remove.
3913         (exec_reverse_once): Use scoped_restore.
3914         * remote.c (restore_remote_timeout): Remove.
3915         (remote_flash_erase, remote_flash_write, remote_flash_done)
3916         (readchar, remote_serial_write): Use scoped_restore.
3917         * cli/cli-script.c (struct source_cleanup_lines_args)
3918         (source_cleanup_lines): Remove.
3919         (script_from_file): Use scoped_restore.
3920         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3921         (source_command): Use scoped_restore.
3922
3923 2017-08-03  Tom Tromey  <tom@tromey.com>
3924
3925         * utils.h (make_cleanup_free_so): Remove.
3926         * utils.c (do_free_so, make_cleanup_free_so): Remove.
3927         * solist.h (struct so_deleter): New.
3928         (so_list_up): New typedef.
3929         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3930
3931 2017-08-03  Tom Tromey  <tom@tromey.com>
3932
3933         * utils.h (make_cleanup_restore_current_language): Remove.
3934         * utils.c (do_restore_current_language)
3935         (make_cleanup_restore_current_language): Remove.
3936         * parse.c (parse_exp_in_context_1)
3937         (parse_expression_with_language): Use
3938         scoped_restore_current_language.
3939         * mi/mi-main.c (mi_cmd_execute): Use
3940         scoped_restore_current_language.
3941         * language.h (scoped_restore_current_language): New class.
3942
3943 2017-08-03  Tom Tromey  <tom@tromey.com>
3944
3945         * compile/compile.c (cleanup_unlink_file): Remove.
3946         (compile_to_object): Use gdb::unlinker.
3947         (eval_compile_command): Likewise.
3948
3949 2017-08-03  Tom Tromey  <tom@tromey.com>
3950
3951         * utils.h (make_cleanup_fclose): Remove.
3952         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3953
3954 2017-08-03  Tom Tromey  <tom@tromey.com>
3955
3956         * top.c (open_terminal_stream): Return gdb_file_up.
3957         (new_ui_command): Update.
3958
3959 2017-08-03  Tom Tromey  <tom@tromey.com>
3960
3961         * source.c (print_source_lines_base, forward_search_command)
3962         (reverse_search_command): Use gdb_file_up.
3963
3964 2017-08-03  Tom Tromey  <tom@tromey.com>
3965
3966         * fbsd-nat.c (fbsd_find_memory_regions): Update.
3967
3968 2017-08-03  Tom Tromey  <tom@tromey.com>
3969
3970         * cli/cli-cmds.c (find_and_open_script): Change return type.
3971         Remove "streamp" and "full_path" parameters.
3972         (source_script_with_search): Update.
3973         * auto-load.c (source_script_file): Update.
3974         * cli/cli-cmds.h (find_and_open_script): Change type.
3975         (open_script): New struct.
3976
3977 2017-08-03  Tom Tromey  <tom@tromey.com>
3978
3979         * xml-support.c (xml_fetch_content_from_file): Update.
3980         * ui-file.c (stdio_file::open): Update.
3981         * tracefile-tfile.c (tfile_start): Update.
3982         * remote.c (remote_file_put, remote_file_get): Update.
3983         * nat/linux-procfs.c (linux_proc_get_int)
3984         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3985         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3986         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3987         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3988         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3989         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3990         * linux-nat.c (linux_proc_pending_signals): Update.
3991         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3992         (file_closer): Remove.
3993         * compile/compile.c (compile_to_object): Update.
3994         * common/filestuff.h (struct gdb_file_deleter): New.
3995         (gdb_file_up): New typedef.
3996         (gdb_fopen_cloexec): Change return type.
3997         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3998         * cli/cli-dump.c (fopen_with_cleanup): Remove.
3999         (dump_binary_file, restore_binary_file): Update.
4000         * auto-load.c (auto_load_objfile_script_1): Update.
4001
4002 2017-08-03  Tom Tromey  <tom@tromey.com>
4003
4004         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4005         (info_static_tracepoint_markers_command): Likewise.
4006         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4007         * skip.c (skip_info): Use ui_out_emit_table.
4008         * progspace.c (print_program_space): Use ui_out_emit_table.
4009         * osdata.c (info_osdata): Use ui_out_emit_table.
4010         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4011         ui_out_emit_table.
4012         * linux-thread-db.c (info_auto_load_libthread_db): Use
4013         ui_out_emit_table.
4014         * inferior.c (print_inferior): Use ui_out_emit_table.
4015         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4016         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4017         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4018         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4019         * ui-out.h (class ui_out_emit_table): New.
4020
4021 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4022
4023         * mips-tdep.c (mips_fpu_type_str): New function.
4024         (mips_dump_tdep): Call it.
4025
4026 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4027
4028         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4029         `->mips_fpu_type'.
4030
4031 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4032
4033         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4034
4035 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4036
4037         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4038
4039 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4040
4041         * cli/cli-cmds.c (maintenancechecklist): New variable.
4042         * gdbcmd.h (maintenancechecklist): Declare it.
4043         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4044         Call i386_linux_read_description with different masks.
4045         * maint.c (maintenance_check_command): New function.
4046         (_initialize_maint_cmds): Call add_prefix_cmd.
4047         * target-descriptions.c (tdesc_reg): override operator != and ==.
4048         (tdesc_type): Likewise.
4049         (tdesc_feature): Likewise.
4050         (target_desc): Likewise.
4051         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4052         (maintenance_check_xml_descriptions): New function.
4053         (_initialize_target_descriptions) Add command "xml-descriptions".
4054         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4055
4056 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4057
4058         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4059         Include features/i386/32bit-*.c.
4060         (i386_linux_read_description): Generate target description if it
4061         doesn't exist.
4062         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4063         functions.
4064         * features/i386/32bit-linux.c: Re-generated.
4065         * features/i386/32bit-sse.c: Likewise.
4066         * target-descriptions.c (print_c_feature::visit): Print code to
4067         set register number if needed.
4068         (print_c_feature) <m_next_regnum>: New field.
4069
4070 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4071
4072         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4073         (FEATURE_XMLFILES): New.
4074         (FEATURE_CFILES): New.
4075         New rules.
4076         (clean-cfiles): Remove generated c files.
4077         * features/i386/32bit-avx.c: Generated.
4078         * features/i386/32bit-avx512.c: Generated.
4079         * features/i386/32bit-core.c: Generated.
4080         * features/i386/32bit-linux.c: Generated.
4081         * features/i386/32bit-mpx.c: Generated.
4082         * features/i386/32bit-pkeys.c: Generated.
4083         * features/i386/32bit-sse.c: Generated.
4084         * target-descriptions.c: Include algorithm.
4085         (tdesc_element_visitor): Add method visit_end.
4086         (print_c_tdesc): Implement visit_end.
4087         (print_c_tdesc:: m_filename_after_features): Move it to
4088         protected.
4089         (print_c_feature): New class.
4090         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4091         name starts with "i386/32bit-".
4092
4093 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4094
4095         * target-descriptions.c (tdesc_element_visitor): New class.
4096         (tdesc_element): New class.
4097         (tdesc_reg): Inherit from tdesc_element.
4098         (tdesc_reg::accept): New function.
4099         (tdesc_type): Inherit from tdesc_element.
4100         (tdesc_type::accept): New function.
4101         (tdesc_feature): Inherit from tdesc_element.
4102         (tdesc_feature::accept): New function.
4103         (target_desc): Inherit from tdesc_element.
4104         (target_desc::target_desc): New.
4105         (target_desc::~target_desc): New.
4106         (target_desc::accept): New.
4107         (allocate_target_description): Use new.
4108         (free_target_description): Use delete.
4109         (print_c_tdesc): New class.
4110         (maint_print_c_tdesc_cmd): Adjust.
4111
4112         * features/aarch64.c: Re-generated.
4113         * features/arc-arcompact.c: Re-generated.
4114         * features/arc-v2.c: Re-generated.
4115         * features/arm/arm-with-iwmmxt.c: Re-generated.
4116         * features/arm/arm-with-m.c: Re-generated.
4117         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4118         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4119         * features/arm/arm-with-neon.c: Re-generated.
4120         * features/arm/arm-with-vfpv2.c: Re-generated.
4121         * features/arm/arm-with-vfpv3.c: Re-generated.
4122         * features/i386/amd64-avx-avx512.c: Re-generated.
4123         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4124         * features/i386/amd64-avx.c: Re-generated.
4125         * features/i386/amd64-avx-linux.c: Re-generated.
4126         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4127         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4128         * features/i386/amd64-avx-mpx.c: Re-generated.
4129         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4130         * features/i386/amd64.c: Re-generated.
4131         * features/i386/amd64-linux.c: Re-generated.
4132         * features/i386/amd64-mpx.c: Re-generated.
4133         * features/i386/amd64-mpx-linux.c: Re-generated.
4134         * features/i386/i386-avx-avx512.c: Re-generated.
4135         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4136         * features/i386/i386-avx.c: Re-generated.
4137         * features/i386/i386-avx-linux.c: Re-generated.
4138         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4139         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4140         * features/i386/i386-avx-mpx.c: Re-generated.
4141         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4142         * features/i386/i386.c: Re-generated.
4143         * features/i386/i386-linux.c: Re-generated.
4144         * features/i386/i386-mmx.c: Re-generated.
4145         * features/i386/i386-mmx-linux.c: Re-generated.
4146         * features/i386/i386-mpx.c: Re-generated.
4147         * features/i386/i386-mpx-linux.c: Re-generated.
4148         * features/i386/x32-avx-avx512.c: Re-generated.
4149         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4150         * features/i386/x32-avx.c: Re-generated.
4151         * features/i386/x32-avx-linux.c: Re-generated.
4152         * features/i386/x32.c: Re-generated.
4153         * features/i386/x32-linux.c: Re-generated.
4154         * features/microblaze.c: Re-generated.
4155         * features/microblaze-with-stack-protect.c: Re-generated.
4156         * features/mips64-dsp-linux.c: Re-generated.
4157         * features/mips64-linux.c: Re-generated.
4158         * features/mips-dsp-linux.c: Re-generated.
4159         * features/mips-linux.c: Re-generated.
4160         * features/nds32.c: Re-generated.
4161         * features/nios2.c: Re-generated.
4162         * features/nios2-linux.c: Re-generated.
4163         * features/rs6000/powerpc-32.c: Re-generated.
4164         * features/rs6000/powerpc-32l.c: Re-generated.
4165         * features/rs6000/powerpc-403.c: Re-generated.
4166         * features/rs6000/powerpc-403gc.c : Re-generated.
4167         * features/rs6000/powerpc-405.c: Re-generated.
4168         * features/rs6000/powerpc-505.c: Re-generated.
4169         * features/rs6000/powerpc-601.c: Re-generated.
4170         * features/rs6000/powerpc-602.c: Re-generated.
4171         * features/rs6000/powerpc-603.c: Re-generated.
4172         * features/rs6000/powerpc-604.c: Re-generated.
4173         * features/rs6000/powerpc-64.c: Re-generated.
4174         * features/rs6000/powerpc-64l.c: Re-generated.
4175         * features/rs6000/powerpc-7400.c: Re-generated.
4176         * features/rs6000/powerpc-750.c: Re-generated.
4177         * features/rs6000/powerpc-860.c: Re-generated.
4178         * features/rs6000/powerpc-altivec32.c: Re-generated.
4179         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4180         * features/rs6000/powerpc-altivec64.c: Re-generated.
4181         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4182         * features/rs6000/powerpc-cell32l.c: Re-generated.
4183         * features/rs6000/powerpc-cell64l.c: Re-generated.
4184         * features/rs6000/powerpc-e500.c: Re-generated.
4185         * features/rs6000/powerpc-e500l.c: Re-generated.
4186         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4187         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4188         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4189         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4190         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4191         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4192         * features/rs6000/powerpc-vsx32.c: Re-generated.
4193         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4194         * features/rs6000/powerpc-vsx64.c: Re-generated.
4195         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4196         * features/rs6000/rs6000.c: Re-generated.
4197         * features/s390-linux32.c: Re-generated.
4198         * features/s390-linux32v1.c: Re-generated.
4199         * features/s390-linux32v2.c: Re-generated.
4200         * features/s390-linux64.c: Re-generated.
4201         * features/s390-linux64v1.c: Re-generated.
4202         * features/s390-linux64v2.c: Re-generated.
4203         * features/s390-te-linux64.c: Re-generated.
4204         * features/s390-tevx-linux64.c: Re-generated.
4205         * features/s390-vx-linux64.c: Re-generated.
4206         * features/s390x-linux64.c: Re-generated.
4207         * features/s390x-linux64v1.c: Re-generated.
4208         * features/s390x-linux64v2.c: Re-generated.
4209         * features/s390x-te-linux64.c: Re-generated.
4210         * features/s390x-tevx-linux64.c: Re-generated.
4211         * features/s390x-vx-linux64.c: Re-generated.
4212         * features/sparc/sparc32-solaris.c: Re-generated.
4213         * features/sparc/sparc64-solaris.c: Re-generated.
4214         * features/tic6x-c62x.c: Re-generated.
4215         * features/tic6x-c62x-linux.c: Re-generated.
4216         * features/tic6x-c64x.c: Re-generated.
4217         * features/tic6x-c64x-linux.c: Re-generated.
4218         * features/tic6x-c64xp.c: Re-generated.
4219         * features/tic6x-c64xp-linux.c: Re-generated.
4220
4221 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4222
4223         * i386-linux-tdep.c (i386_linux_read_description): New function.
4224         (i386_linux_core_read_description): Call
4225         i386_linux_read_description.
4226         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4227         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4228         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4229         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4230         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4231         * x86-linux-nat.c (x86_linux_read_description): Call
4232         i386_linux_read_description.
4233
4234 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4235
4236         * NEWS: Mention it.
4237         * features/Makefile (%.c: %.xml): Pass the xml file name to
4238         command "maint print c-tdesc".
4239         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4240         name from 'arg'.
4241
4242 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4243
4244         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4245         in-class initialization.
4246         (tdesc_create_feature): Call new instead of XCNEW.
4247         (free_target_description): Ue delete.
4248
4249 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4250
4251         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4252
4253 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4254
4255         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4256         constant.
4257         (amd64_x32_init_abi): Likewise.
4258         * amd64-tdep.h (amd64_init_abi): Update declaration.
4259         (amd64_x32_init_abi): Likewise.
4260
4261 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4262
4263         PR tdep/21717
4264         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4265         condition for FPSCR.
4266         (arm_linux_store_inferior_registers): Likewise.
4267
4268 2017-07-22  Tom Tromey  <tom@tromey.com>
4269
4270         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4271         <syscalls_counts>: Now a std::vector.
4272         (get_catch_syscall_inferior_data): Use "new".
4273         (catch_syscall_inferior_data_cleanup): Use "delete".
4274         (insert_catch_syscall, remove_catch_syscall)
4275         (clear_syscall_counts): Update.
4276
4277 2017-07-22  Tom Tromey  <tom@tromey.com>
4278
4279         * break-catch-syscall.c (syscall_catchpoint)
4280         <syscalls_to_be_caught>: Now a std::vector<int>
4281         (~syscall_catchpoint): Remove.
4282         (insert_catch_syscall, remove_catch_syscall)
4283         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4284         (print_mention_catch_syscall, print_recreate_catch_syscall):
4285         Update.
4286         (create_syscall_event_catchpoint): Change type of "filter"
4287         parameter.
4288         (catch_syscall_split_args): Return a std::vector.
4289         (catch_syscall_command_1, catching_syscall_number_1): Update.
4290
4291 2017-07-22  Tom Tromey  <tom@tromey.com>
4292
4293         * break-catch-throw.c (struct exception_catchpoint)
4294         <exception_rx>: Now a std::string.
4295         (~exception_catchpoint): Remove.
4296         (print_one_detail_exception_catchpoint): Update.
4297         (handle_gnu_v3_exceptions): Change type of except_rx.
4298         (extract_exception_regexp): Return a std::string.
4299         (catch_exception_command_1): Update.
4300
4301 2017-07-22  Tom Tromey  <tom@tromey.com>
4302
4303         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4304         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4305         std::vector.
4306         <catch_all>: Now a bool.
4307         (~signal_catchpoint): Remove.
4308         (signal_catchpoint_insert_location)
4309         (signal_catchpoint_remove_location)
4310         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4311         (signal_catchpoint_print_mention)
4312         (signal_catchpoint_print_recreate)
4313         (signal_catchpoint_explains_signal): Update.
4314         (create_signal_catchpoint): Change type of "filter" and
4315         "catch_all".
4316         (catch_signal_split_args): Return a std::vector.  Change type of
4317         "catch_all".
4318         (catch_signal_command): Update.
4319
4320 2017-07-20  Pedro Alves  <palves@redhat.com>
4321
4322         * ada-lang.c (ada_language_defn): Make extern.
4323         (_initialize_ada_language): Remove add_language call.
4324         * c-lang.c (c_language_defn, cplus_language_defn)
4325         (asm_language_defn, minimal_language_defn): Make extern.
4326         (_initialize_c_language): Delete.
4327         * completer.c (compare_cstrings): Delete, moved to utils.h.
4328         * d-lang.c (d_language_defn): Make extern.
4329         (_initialize_d_language): Remove add_language calls.
4330         * defs.h (enum language): Add comment.
4331         * f-lang.c (f_language_defn): Make extern.
4332         (_initialize_f_language): Remove add_language call.
4333         * go-lang.c (go_language_defn): Make extern.
4334         (_initialize_go_language): Remove add_language call.
4335         * language.c: Include <algorithm>.
4336         (languages): Redefine as const array.
4337         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4338         (set_language_command): Handle "local".  Use for-range loop.
4339         (set_language): Remove loop.
4340         (language_enum): Rewrite.
4341         (language_def, language_str): Remove loops.
4342         (add_language): Delete.
4343         (add_set_language_command): New, based on add_languages.
4344         (skip_language_trampoline): Adjust.
4345         (local_language_defn): Delete.
4346         (language_gdbarch_post_init): Adjust.
4347         (_initialize_language): Remove add_language calls.  Call
4348         add_set_language_command.
4349         * language.h (add_language): Delete.
4350         (auto_language_defn)
4351         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4352         (asm_language_defn, c_language_defn, cplus_language_defn)
4353         (d_language_defn, f_language_defn, go_language_defn)
4354         (m2_language_defn, objc_language_defn, opencl_language_defn)
4355         (pascal_language_defn, rust_language_defn): Declare.
4356         * m2-lang.c (m2_language_defn): Make extern.
4357         (_initialize_m2_language): Remove add_language call.
4358         * objc-lang.c (objc_language_defn): Make extern.
4359         (_initialize_objc_language): Remove add_language call.
4360         * opencl-lang.c (opencl_language_defn): Make extern.
4361         (_initialize_opencl_language): Remove add_language call.
4362         * p-lang.c (pascal_language_defn): Make extern.
4363         (_initialize_pascal_language): Delete.
4364         * rust-lang.c (rust_language_defn): Make extern.
4365         (_initialize_rust_language): Delete.
4366         * utils.h (compare_cstrings): New static inline function.
4367
4368 2017-07-20  Pedro Alves  <palves@redhat.com>
4369
4370         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4371         (get_var_value): Constify parameters.
4372         (get_int_var_value): Change prototype.
4373         (to_fixed_range_type): Adjust.
4374         * ada-lang.h (get_int_var_value): Change prototype.
4375
4376 2017-07-20  Pedro Alves  <palves@redhat.com>
4377
4378         * dwarf2read.c (dw2_lookup_symbol): Use
4379         SYMBOL_MATCHES_SEARCH_NAME.
4380         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4381
4382 2017-07-20  Pedro Alves  <palves@redhat.com>
4383
4384         * block.c (block_iter_name_step, block_iter_name_first)
4385         (block_iter_name_next): Delete.
4386         (block_lookup_symbol_primary): Adjust to use
4387         dict_iter_match_first/dict_iter_match_next.
4388         * block.h (block_iter_name_first, block_iter_name_next): Delete
4389         declarations.
4390         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4391         dict_iter_match_first/dict_iter_match_next.
4392
4393 2017-07-20  Pedro Alves  <palves@redhat.com>
4394
4395         * cp-support.c (cp_find_first_component_aux): Add missing case for
4396         end of string.
4397
4398 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4399
4400         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4401         of dwo_cu's dwo_file.
4402
4403 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4404
4405         * remote.c (store_registers_using_G): Remove one line comment.
4406
4407 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4408
4409         * regcache.c (regcache_cpy): Simplify it.
4410         (regcache::cpy_no_passthrough): Remove it.
4411         * regcache.h (cpy_no_passthrough): Remove it.
4412         (regcache_dup, regcache_cpy): Update comments.
4413
4414 2017-07-18  Pedro Alves  <palves@redhat.com>
4415
4416         * remote-sim.c (sim_command_completer): Adjust to work with a
4417         completion_tracker instead of a VEC.
4418
4419 2017-07-17  Pedro Alves  <palves@redhat.com>
4420
4421         * completer.c (complete_source_filenames): New function.
4422         (complete_address_and_linespec_locations): New function.
4423         (location_completer): Use complete_address_and_linespec_locations.
4424         (completion_tracker::build_completion_result): Honor the tracker's
4425         request to suppress append.
4426         * completer.h (completion_tracker::suppress_append_ws)
4427         (completion_tracker::set_suppress_append_ws): New methods.
4428         (completion_tracker::m_suppress_append_ws): New field.
4429         (complete_source_filenames): New declaration.
4430         * linespec.c (linespec_complete_what): New.
4431         (struct ls_parser) <complete_what, completion_word,
4432         completion_quote_char, completion_quote_end, completion_tracker>:
4433         New fields.
4434         (string_find_incomplete_keyword_at_end): New.
4435         (linespec_lexer_lex_string): Record quote char.  If in completion
4436         mode, don't throw.
4437         (linespec_lexer_consume_token): Advance the completion word point.
4438         (linespec_lexer_peek_token): Save/restore completion info.
4439         (save_stream_and_consume_token): New.
4440         (set_completion_after_number): New.
4441         (linespec_parse_basic): Set what to complete next depending on
4442         token.  Handle function and label completions specially.
4443         (parse_linespec): Disable objc shortcut in completion mode.  Set
4444         what to complete next depending on token type.  Skip keyword if in
4445         completion mode.
4446         (complete_linespec_component, linespec_complete): New.
4447         * linespec.h (linespec_complete): Declare.
4448
4449 2017-07-17  Pedro Alves  <palves@redhat.com>
4450
4451         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4452         Handle 'operator<' / 'operator<<'.
4453
4454 2017-07-17  Pedro Alves  <palves@redhat.com>
4455
4456         * completer.c (collect_explicit_location_matches): Handle
4457         MATCH_LABEL.
4458         (convert_explicit_location_to_linespec): New, factored out from
4459         ...
4460         (convert_explicit_location_to_sals): ... this.
4461         (complete_label): New.
4462         (linespec_complete_label, find_label_symbols_in_block): New.
4463         (find_label_symbols): Add completion_mode parameter and adjust to
4464         call find_label_symbols_in_block.
4465         * linespec.h (linespec_complete_label): Declare.
4466
4467 2017-07-17  Pedro Alves  <palves@redhat.com>
4468
4469         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4470         complete_symbol_mode parameter.
4471         * cli/cli-cmds.c (complete_command): Get the completion result out
4472         of the handle_brkchars tracker if used a custom word point.
4473         * completer.c: Include "linespec.h".
4474         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4475         (advance_to_expression_complete_word_point): New.
4476         (completion_tracker::completes_to_completion_word): New.
4477         (complete_files_symbols): Pass down
4478         complete_symbol_mode::EXPRESSION.
4479         (explicit_options, probe_options): New.
4480         (collect_explicit_location_matches): Complete on the
4481         explictit_loc->foo instead of word.  Use
4482         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4483         keyword and options completions.
4484         (backup_text_ptr): Delete.
4485         (skip_keyword): New.
4486         (complete_explicit_location): Remove 'word' parameter.  Add
4487         language, quoted_arg_start and quoted_arg_end parameters.
4488         Rewrite, parsing left to right.
4489         (location_completer): Rewrite.
4490         (location_completer_handle_brkchars): New function.
4491         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4492         (enum complete_line_internal_reason): Adjust comments.
4493         (completion_tracker::discard_completions): New.
4494         (completer_handle_brkchars_func_for_completer): Handle
4495         location_completer.
4496         (gdb_custom_word_point_brkchars)
4497         (gdb_org_rl_basic_quote_characters): New.
4498         (gdb_completion_word_break_characters_throw)
4499         (completion_find_completion_word): Handle trackers that use a
4500         custom word point.
4501         (completion_tracker::advance_custom_word_point_by): New.
4502         (completion_tracker::build_completion_result): Don't rely on
4503         readline appending the quote char.
4504         (gdb_rl_attempted_completion_function_throw): Handle trackers that
4505         use a custom word point.
4506         (gdb_rl_attempted_completion_function): Restore
4507         rl_basic_quote_characters.
4508         * completer.h (class completion_tracker): Extend intro comment.
4509         (completion_tracker::set_quote_char)
4510         (completion_tracker::quote_char)
4511         (completion_tracker::set_use_custom_word_point)
4512         (completion_tracker::use_custom_word_point)
4513         (completion_tracker::custom_word_point)
4514         (completion_tracker::set_custom_word_point)
4515         (completion_tracker::advance_custom_word_point_by)
4516         (completion_tracker::completes_to_completion_word)
4517         (completion_tracker::discard_completions): New methods.
4518         (completion_tracker::m_quote_char)
4519         (completion_tracker::m_use_custom_word_point)
4520         (completion_tracker::m_custom_word_point): New fields.
4521         (advance_to_expression_complete_word_point): Declare.
4522         * f-lang.c (f_collect_symbol_completion_matches): Add
4523         complete_symbol_mode parameter.
4524         * language.h (struct language_defn)
4525         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4526         parameter.
4527         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
4528         (linespec_complete_function): New function.
4529         (linespec_lexer_lex_keyword): Adjust.
4530         * linespec.h (linespec_keywords, linespec_complete_function): New
4531         declarations.
4532         * location.c (find_end_quote): New function.
4533         (explicit_location_lex_one): Add explicit_completion_info
4534         parameter.  Save quoting info.  Don't throw if being called for
4535         completion.  Don't handle Ada operators here.
4536         (is_cp_operator, skip_op_false_positives, first_of)
4537         (explicit_location_lex_one_function): New function.
4538         (string_to_explicit_location): Replace 'dont_throw' parameter with
4539         an explicit_completion_info pointer parameter.  Handle it.  Don't
4540         use explicit_location_lex_one to lex function names.  Use
4541         explicit_location_lex_one_function instead.
4542         * location.h (struct explicit_completion_info): New.
4543         (string_to_explicit_location): Replace 'dont_throw' parameter with
4544         an explicit_completion_info pointer parameter.
4545         * symtab.c (default_collect_symbol_completion_matches_break_on):
4546         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
4547         (default_collect_symbol_completion_matches)
4548         (collect_symbol_completion_matches): Add complete_symbol_mode
4549         parameter.
4550         (collect_symbol_completion_matches_type): Pass down
4551         complete_symbol_mode::EXPRESSION.
4552         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4553         parameter.  Handle LINESPEC mode.
4554         * symtab.h (complete_symbol_mode): New.
4555         (default_collect_symbol_completion_matches_break_on)
4556         (default_collect_symbol_completion_matches)
4557         (collect_symbol_completion_matches)
4558         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4559         parameter.
4560
4561 2017-07-17  Pedro Alves  <palves@redhat.com>
4562
4563         * utils.c (enum class strncmp_iw_mode): New.
4564         (strcmp_iw): Rename to ...
4565         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
4566         parameters.  Handle them.
4567         (strncmp_iw): New.
4568         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4569         * utils.h (strncmp_iw): Declare.
4570         (strcmp_iw): Move describing comments here.
4571
4572 2017-07-17  Pedro Alves  <palves@redhat.com>
4573
4574         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4575         CP_OPERATOR_STR.
4576         * c-typeprint.c (is_type_conversion_operator): Use
4577         CP_OPERATOR_STR.
4578         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4579         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4580         CP_OPERATOR_LEN.
4581         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4582         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4583         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4584         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4585         CP_OPERATOR_STR.
4586         * location.c: Include "cp-support.h".
4587         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4588         CP_OPERATOR_STR.
4589         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4590         CP_OPERATOR_LEN.
4591
4592 2017-07-17  Pedro Alves  <palves@redhat.com>
4593
4594         * cli/cli-cmds.c (complete_command): Use a completion tracker
4595         along with completion_find_completion_word for handle_brkchars
4596         phase.
4597         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4598         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4599         (struct gdb_rl_completion_word_info): New.
4600         (gdb_rl_find_completion_word): New.
4601         (completion_find_completion_word): New.
4602         * completer.h (completion_find_completion_word): Declare.
4603
4604 2017-07-17  Pedro Alves  <palves@redhat.com>
4605
4606         * ada-lang.c (symbol_completion_match): Adjust comments.
4607         (symbol_completion_add): Replace vector parameter with
4608         completion_tracker parameter.  Use it.
4609         (ada_make_symbol_completion_list): Rename to...
4610         (ada_collect_symbol_completion_matches): ... this.  Add
4611         completion_tracker parameter and use it.
4612         (ada_language_defn): Adjust.
4613         * break-catch-syscall.c (catch_syscall_completer): Adjust
4614         prototype and work with completion_tracker instead of VEC.
4615         * breakpoint.c (condition_completer): Adjust prototype and work
4616         with completion_tracker instead of VEC.
4617         * c-lang.c (c_language_defn, cplus_language_defn)
4618         (asm_language_defn, minimal_language_defn): Adjust to renames.
4619         * cli/cli-cmds.c (complete_command): Rework using
4620         completion_tracker.  Catch exceptions when completing.
4621         * cli/cli-decode.c (integer_unlimited_completer)
4622         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4623         with completion_tracker instead of VEC.
4624         * command.h (struct completion_tracker): Forward declare.
4625         (completer_ftype, completer_handle_brkchars_ftype): Change
4626         types.
4627         (complete_on_cmdlist, complete_on_enum): Adjust.
4628         * completer.c: Include <algorithm>.
4629         (struct gdb_completer_state): New.
4630         (current_completion): New global.
4631         (readline_line_completion_function): Delete.
4632         (noop_completer, filename_completer)
4633         (filename_completer_handle_brkchars, complete_files_symbols)
4634         (linespec_location_completer): Adjust to work with a
4635         completion_tracker instead of a VEC.
4636         (string_or_empty): New.
4637         (collect_explicit_location_matches): Adjust to work with a
4638         completion_tracker instead of a VEC.
4639         (explicit_location_completer): Rename to ...
4640         (complete_explicit_location): ... this and adjust to work with a
4641         completion_tracker instead of a VEC.
4642         (location_completer): Adjust to work with a completion_tracker
4643         instead of a VEC.
4644         (add_struct_fields): Adjust to work with a completion_list instead
4645         of VEC.
4646         (expression_completer): Rename to ...
4647         (complete_expression): ... this and adjust to work with a
4648         completion_tracker instead of a VEC.  Use complete_files_symbols.
4649         (expression_completer): Reimplement on top of complete_expression.
4650         (symbol_completer): Adjust to work with a completion_tracker
4651         instead of a VEC.
4652         (enum complete_line_internal_reason): Add describing comments.
4653         (complete_line_internal_normal_command): Adjust to work with a
4654         completion_tracker instead of a VEC.
4655         (complete_line_internal): Rename to ...
4656         (complete_line_internal_1): ... this and adjust to work with a
4657         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4658         handle_brkchars phase.
4659         (new_completion_tracker): Delete.
4660         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4661         complete_line_internal_1.
4662         (free_completion_tracker): Delete.
4663         (INITIAL_COMPLETION_HTAB_SIZE): New.
4664         (completion_tracker::completion_tracker)
4665         (completion_tracker::~completion_tracker): New.
4666         (maybe_add_completion): Delete.
4667         (completion_tracker::maybe_add_completion)
4668         (completion_tracker::add_completion)
4669         (completion_tracker::add_completions): New.
4670         (throw_max_completions_reached_error): Delete.
4671         (complete_line): Adjust to work with a completion_tracker instead
4672         of a VEC.  Don't create a completion_tracker_t or check for max
4673         completions here.
4674         (command_completer, command_completer_handle_brkchars)
4675         (signal_completer, reg_or_group_completer_1)
4676         (reg_or_group_completer, default_completer_handle_brkchars):
4677         Adjust to work with a completion_tracker.
4678         (gdb_completion_word_break_characters_throw): New.
4679         (gdb_completion_word_break_characters): Reimplement.
4680         (line_completion_function): Delete.
4681         (completion_tracker::recompute_lowest_common_denominator)
4682         (expand_preserving_ws)
4683         (completion_tracker::build_completion_result)
4684         (completion_result::completion_result)
4685         (completion_result::completion_result)
4686         (completion_result::~completion_result)
4687         (completion_result::completion_result)
4688         (completion_result::release_match_list, compare_cstrings)
4689         (completion_result::sort_match_list)
4690         (completion_result::reset_match_list)
4691         (gdb_rl_attempted_completion_function_throw)
4692         (gdb_rl_attempted_completion_function): New.
4693         * completer.h (completion_list, struct completion_result)
4694         (class completion_tracker): New.
4695         (complete_line): Add completion_tracker parameter.
4696         (readline_line_completion_function): Delete.
4697         (gdb_rl_attempted_completion_function): New.
4698         (noop_completer, filename_completer, expression_completer)
4699         (location_completer, symbol_completer, command_completer)
4700         (signal_completer, reg_or_group_completer): Update prototypes.
4701         (completion_tracker_t, new_completion_tracker)
4702         (make_cleanup_free_completion_tracker): Delete.
4703         (enum maybe_add_completion_enum): Delete.
4704         (maybe_add_completion): Delete.
4705         (throw_max_completions_reached_error): Delete.
4706         * corefile.c (complete_set_gnutarget): Adjust to work with a
4707         completion_tracker instead of a VEC.
4708         * cp-abi.c (cp_abi_completer): Adjust to work with a
4709         completion_tracker instead of a VEC.
4710         * d-lang.c (d_language_defn): Adjust.
4711         * disasm.c (disassembler_options_completer): Adjust to work with a
4712         completion_tracker instead of a VEC.
4713         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4714         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4715         with a completion_tracker instead of a VEC.
4716         (f_language_defn): Adjust.
4717         * go-lang.c (go_language_defn): Adjust.
4718         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4719         Adjust to work with a completion_tracker instead of a VEC.
4720         * infrun.c (handle_completer): Likewise.
4721         * interps.c (interpreter_completer): Likewise.
4722         * interps.h (interpreter_completer): Likewise.
4723         * language.c (unknown_language_defn, auto_language_defn)
4724         (local_language_defn): Adjust.
4725         * language.h (language_defn::la_make_symbol_completion_list):
4726         Rename to ...
4727         (language_defn::la_collect_symbol_completion_matches): ... this
4728         and adjust to work with a completion_tracker instead of a VEC.
4729         * m2-lang.c (m2_language_defn): Adjust.
4730         * objc-lang.c (objc_language_defn): Adjust.
4731         * opencl-lang.c (opencl_language_defn): Adjust.
4732         * p-lang.c (pascal_language_defn): Adjust.
4733         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4734         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4735         with a completion_tracker.
4736         * rust-lang.c (rust_language_defn): Adjust.
4737         * symtab.c (free_completion_list, do_free_completion_list)
4738         (return_val, completion_tracker): Delete.
4739         (completion_list_add_name, completion_list_add_symbol)
4740         (completion_list_add_msymbol, completion_list_objc_symbol)
4741         (completion_list_add_fields, add_symtab_completions): Add
4742         completion_tracker parameter and use it.
4743         (default_make_symbol_completion_list_break_on_1): Rename to...
4744         (default_collect_symbol_completion_matches_break_on): ... this.
4745         Add completion_tracker parameter and use it instead of allocating
4746         a completion tracker here.
4747         (default_make_symbol_completion_list_break_on): Delete old
4748         implementation.
4749         (default_make_symbol_completion_list): Delete.
4750         (default_collect_symbol_completion_matches): New.
4751         (make_symbol_completion_list): Delete.
4752         (collect_symbol_completion_matches): New.
4753         (make_symbol_completion_type): Rename to ...
4754         (collect_symbol_completion_matches_type): ... this.  Add
4755         completion_tracker parameter and use it instead of VEC.
4756         (make_file_symbol_completion_list_1): Rename to...
4757         (collect_file_symbol_completion_matches): ... this.  Add
4758         completion_tracker parameter and use it instead of VEC.
4759         (make_file_symbol_completion_list): Delete.
4760         (add_filename_to_list): Use completion_list instead of a VEC.
4761         (add_partial_filename_data::list): Now a completion_list.
4762         (make_source_files_completion_list): Work with a completion_list
4763         instead of a VEC.
4764         * symtab.h: Include "completer.h".
4765         (default_make_symbol_completion_list_break_on)
4766         (default_make_symbol_completion_list, make_symbol_completion_list)
4767         (make_symbol_completion_type, make_file_symbol_completion_list)
4768         (make_source_files_completion_list): Delete.
4769         (default_collect_symbol_completion_matches_break_on)
4770         (default_collect_symbol_completion_matches)
4771         (collect_symbol_completion_matches)
4772         (collect_symbol_completion_matches_type)
4773         (collect_file_symbol_completion_matches)
4774         (make_source_files_completion_list): New.
4775         * top.c (init_main): Don't install a rl_completion_entry_function
4776         hook.  Install a rl_attempted_completion_function hook instead.
4777         * tui/tui-layout.c (layout_completer): Adjust to work with a
4778         completion_tracker.
4779         * tui/tui-regs.c (tui_reggroup_completer):
4780         * tui/tui-win.c (window_name_completer, focus_completer)
4781         (winheight_completer): Adjust to work with a completion_tracker.
4782         * value.c: Include "completer.h".
4783         (complete_internalvar): Adjust to work with a completion_tracker.
4784         * value.h (complete_internalvar): Likewise.
4785
4786 2017-07-17  Pedro Alves  <palves@redhat.com>
4787
4788         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4789         renames.
4790         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4791         comments to completer_ftype's declaration.
4792         <completer_handle_brkchars>: Change type to
4793         completer_handle_brkchars_ftype.
4794         * command.h (completer_ftype): Add describing comment and give
4795         names to parameters.
4796         (completer_ftype_void): Rename to ...
4797         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4798         (set_cmd_completer_handle_brkchars): Adjust.
4799         * completer.c (filename_completer_handle_brkchars): New function.
4800         (complete_line_internal_normal_command): New function, factored
4801         out from ...
4802         (complete_line_internal): ... here.
4803         (command_completer_handle_brkchars)
4804         (default_completer_handle_brkchars)
4805         (completer_handle_brkchars_func_for_completer): New functions.
4806         * completer.h (set_gdb_completion_word_break_characters): Delete
4807         declaration.
4808         (completer_handle_brkchars_func_for_completer): New declaration.
4809         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4810         completer_handle_brkchars_func_for_completer.
4811
4812 2017-07-17  Pedro Alves  <palves@redhat.com>
4813
4814         * completer.c (symbol_completer): New function, based on
4815         make_symbol_completion_list_fn.
4816         * completer.h (symbol_completer): New declaration.
4817         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4818         * python/py-cmd.c (completers): Adjust.
4819         * symtab.c (make_symbol_completion_list_fn): Delete.
4820         * symtab.h (make_symbol_completion_list_fn): Delete.
4821         * cli/cli-decode.c (add_cmd): Adjust.
4822
4823 2017-07-17  Pedro Alves  <palves@redhat.com>
4824
4825         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4826         * dwarf2read.c: Include "filename-seen-cache.h".
4827         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4828         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4829         * filename-seen-cache.c: New file.
4830         * filename-seen-cache.h: New file.
4831         * symtab.c: Include "filename-seen-cache.h".
4832         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4833         (create_filename_seen_cache, clear_filename_seen_cache)
4834         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4835         to filename-seen-cache.h/filename-seen-cache.c.
4836         (output_source_filename, sources_info)
4837         (maybe_add_partial_symtab_filename)
4838         (make_source_files_completion_list): Adjust to use
4839         filename_seen_cache.
4840
4841 2017-07-17  Pedro Alves  <palves@redhat.com>
4842
4843         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4844         fields.
4845         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4846         dwarf2_debug_sections*)): New.
4847         (dwarf2_per_objfile::dwarf2_per_objfile(const
4848         dwarf2_per_objfile&)): Declare as deleted.
4849         (dwarf2_per_objfile::operator=): Declare as deleted.
4850         (dwarf2_per_objfile::dwarf2_per_objfile)
4851         (dwarf2_per_objfile::~dwarf2_per_objfile)
4852         (dwarf2_per_objfile::free_cached_comp_units): New.
4853         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4854         ctor.  Call dwarf2_per_objfile's ctor manually.
4855         (dwarf2_locate_sections): Deleted/refactored as ...
4856         (dwarf2_per_objfile::locate_sections): ... this new method.
4857         (free_cached_comp_units): Defer to
4858         dwarf2_per_objfile::free_cached_comp_units.
4859         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4860
4861 2017-07-14  Tom Tromey  <tom@tromey.com>
4862
4863         PR rust/21764:
4864         * rust-exp.y (convert_ast_to_expression): Add "want_type"
4865         parameter.
4866         <UNOP_SIZEOF>: Split into separate case.
4867         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
4868
4869 2017-07-14  Tom Tromey  <tom@tromey.com>
4870
4871         PR rust/21763:
4872         * symtab.c (symbol_matches_domain): Add language_rust to special
4873         case.
4874         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4875         treat LOC_TYPEDEF symbols as variables.
4876
4877 2017-07-14  Pedro Alves  <palves@redhat.com>
4878
4879         * symtab.c (make_file_symbol_completion_list_1): Iterate over
4880         symtabs matching all symtabs with SRCFILE as file name instead of
4881         only considering the first hit, with lookup_symtab.
4882
4883 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4884
4885         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4886         operator_name parameters.
4887         (gen_expr): Update function call.
4888
4889 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4890
4891         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4892         parameter.
4893         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4894         Likewise.
4895         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4896         parameter, use agent_expr::gdbarch instead, update function
4897         calls.
4898         (locexpr_tracepoint_var_ref): Likewise.
4899         (loclist_tracepoint_var_ref): Likewise.
4900         * ax-gdb.c (gen_trace_static_fields): Likewise.
4901         (gen_traced_pop): Likewise.
4902         (gen_frame_args_address): Likewise.
4903         (gen_frame_locals_address): Likewise.
4904         (gen_var_ref): Likewise.
4905         (gen_struct_ref_recursive): Likewise.
4906         (gen_static_field): Likewise.
4907         (gen_maybe_namespace_elt): Likewise.
4908         (gen_expr): Likewise.
4909         (gen_trace_for_var): Likewise.
4910         (gen_trace_for_expr): Likewise.
4911         (gen_trace_for_return_address): Likewise.
4912
4913 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4914
4915         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4916         parameter.
4917         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4918
4919 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4920
4921         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4922         from ax, update calls.
4923         (gen_usual_arithmetic): Likewise.
4924         (gen_integral_promotions): Likewise.
4925         (gen_bitfield_ref): Likewise.
4926         (gen_primitive_field): Likewise.
4927         (gen_struct_ref_recursive): Likewise.
4928         (gen_struct_ref): Likewise.
4929         (gen_maybe_namespace_elt): Likewise.
4930         (gen_struct_elt_for_reference): Likewise.
4931         (gen_namespace_elt): Likewise.
4932         (gen_aggregate_elt_ref): Likewise.
4933         (gen_expr): Get gdbarch from ax, update calls.
4934         (gen_expr_binop_rest): Likewise.
4935
4936 2017-07-13  Pedro Alves  <palves@redhat.com>
4937
4938         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4939         as default tdesc.
4940         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4941         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4942         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4943         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
4944         tdep.
4945         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4946         Get final tdesc from the tdep.
4947         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4948         default tdesc.
4949         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4950         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4951         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4952         Use it as default tdesc.
4953         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4954         down to amd_init_abi.  No longer handle fallback tdesc here.
4955         * amd64-tdep.h (tdesc_x32): Declare.
4956         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4957         parameter.
4958         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4959         as default tdesc.
4960
4961 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4962
4963         * s390-linux-tdep.c (s390_process_record): Add support for
4964         instructions new in arch12.
4965
4966 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4967
4968         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4969         PT_GETFSBASE and PT_GETGSBASE.
4970         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4971         PT_SETGSBASE.
4972
4973 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4974
4975         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4976         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4977         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4978         those rules.
4979         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4980         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4981         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4982         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4983         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4984         * features/i386/amd64.xml: Add 64bit-segments.xml.
4985         * features/i386/amd64-avx-avx512.c: Regenerated.
4986         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4987         * features/i386/amd64-avx-mpx.c: Regenerated.
4988         * features/i386/amd64-avx.c: Regenerated.
4989         * features/i386/amd64-mpx.c: Regenerated.
4990         * features/i386/amd64.c: Regenerated.
4991         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4992         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4993         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4994         * regformats/i386/amd64-avx.dat: Regenerated.
4995         * regformats/i386/amd64-mpx.dat: Regenerated.
4996         * regformats/i386/amd64.dat: Regenerated.
4997
4998 2017-07-10  Yao Qi  <yao.qi@linaro.org>
4999
5000         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5001         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5002
5003 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5004
5005         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5006         unsetenv.
5007         * gnulib/aclocal.m4: Regenerate.
5008         * gnulib/config.in: Regenerate.
5009         * gnulib/configure: Regenerate.
5010         * gnulib/import/Makefile.am: Regenerate.
5011         * gnulib/import/Makefile.in: Regenerate.
5012         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5013         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5014         * gnulib/import/m4/environ.m4: New file.
5015         * gnulib/import/m4/setenv.m4: New file.
5016         * gnulib/import/setenv.c: New file.
5017         * gnulib/import/unsetenv.c: New file.
5018
5019 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5020
5021         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5022         address when op is DW_OP_addr.
5023
5024 2017-07-09  Tom Tromey  <tom@tromey.com>
5025
5026         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5027         check and apply to outer type.
5028
5029 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5030
5031         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5032         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5033         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5034         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5035
5036 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5037
5038         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5039
5040 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5041
5042         * corelow.c (get_core_siginfo): Remove.
5043         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5044         instead of get_core_siginfo.
5045         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5046         * gdbarch.h: Re-generate.
5047         * gdbarch.c: Re-generate.
5048         * linux-tdep.c (linux_core_xfer_siginfo): New.
5049         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5050
5051 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5052
5053         * corelow.c (thread_section_name): Move to ...
5054         * gdbcore.h (thread_section_name): ... here.
5055
5056 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5057
5058         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5059         (struct siginfo32): New.
5060         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5061         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5062         via ptrace(PT_LWPINFO).
5063
5064 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5065
5066         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5067         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5068         (fbsd_get_siginfo_type): New.
5069         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5070         (_initialize_fbsd_tdep): New.
5071
5072 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5073
5074         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5075         a singular dwo_unit*) to support multiple CUs in the same way that
5076         multiple TUs are supported.
5077         (create_cus_hash_table): Replace create_dwo_cu with a function for
5078         parsing multiple CUs from a DWO file.
5079         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5080         create_dwo_cu.
5081         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5082         htab_find, rather than comparing the signature to a singleton CU in
5083         the dwo_file.
5084
5085 2017-07-06  Pedro Alves  <palves@redhat.com>
5086
5087         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5088
5089 2017-07-04  Pedro Alves  <palves@redhat.com>
5090
5091         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5092         * gdbtypes.h (TYPE_STATIC): Delete.
5093         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5094         is_synchronized, is_native>: Delete.
5095         <dummy>: Bump.
5096         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5097         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5098         (TYPE_FN_FIELD_ABSTRACT): Delete.
5099
5100 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5101
5102         * buffer.h (buffer_finish): Fix spelling mistakes.
5103
5104 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5105
5106         * .dir-locals.el: Automatically switch to C-style comments in
5107         versions of Emacs that support the feature.
5108
5109 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5110             Pedro Alves  <palves@redhat.com>
5111
5112         PR cli/21688
5113         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5114         (process_next_line): New variable 'inline_cmd'.
5115         Adjust 'if' clauses for "python", "compile" and "guile" to use
5116         'command_name_equals' and check for '!inline_cmd'.
5117
5118 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5119
5120         PR cli/21688
5121         * cli/cli-script.c (command_name_equals_not_inline): New function.
5122         (process_next_line): Adjust 'if' clauses for "python", "compile"
5123         and "guile" to use command_name_equals_not_inline.
5124
5125 2017-06-29  Pedro Alves  <palves@redhat.com>
5126
5127         * completer.c (expression_completer): Call
5128         linespec_location_completer instead of location_completer.
5129
5130 2017-06-29  Pedro Alves  <palves@redhat.com>
5131
5132         * completer.c (expression_completer): Remove code that recomputes
5133         'text' from 'word'.
5134
5135 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5136
5137         * regformats/regdat.sh: Generate code with
5138         "ifndef IN_PROCESS_AGENT".
5139
5140 2017-06-28  Pedro Alves  <palves@redhat.com>
5141
5142         * command.h: Include "common/scoped_restore.h".
5143
5144 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5145
5146         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5147         instead of obstack_grow.
5148
5149 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5150
5151         PR gdb/21337
5152         * symfile.c (reread_symbols): Call objfiles_changed just before
5153         read_symbols.
5154
5155 2017-06-27  Pedro Alves  <palves@redhat.com>
5156
5157         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5158         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5159         (completion_list_add_symbol, completion_list_add_msymbol):
5160         ... these new functions.
5161         (add_symtab_completions)
5162         (default_make_symbol_completion_list_break_on_1): Adjust.
5163
5164 2017-06-27  Pedro Alves  <palves@redhat.com>
5165
5166         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5167         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5168         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5169         dtor.
5170         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5171         'storage_obstack' field an auto_obstack.  In-class initialize all
5172         non-bitfield fields.  Make minsyms_read bool.
5173         * symfile.c (read_symbols): Adjust.
5174
5175 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5176
5177         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5178         (gdbsim_store_register): Likewise.
5179
5180 2017-06-27  Pedro Alves  <palves@redhat.com>
5181
5182         * c-exp.y (name_obstack): Now an auto_obstack.
5183         (yylex): Use auto_obstack::clear.
5184         (c_parse): Use auto_obstack::clear instead of reinitializing and
5185         freeing the obstack.
5186         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5187         * d-exp.y (name_obstack): Now an auto_obstack.
5188         (yylex): Use auto_obstack::clear.
5189         (d_parse): Use auto_obstack::clear instead of reinitializing and
5190         freeing the obstack.
5191         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5192         auto_obstack.
5193         * dwarf2read.c (create_addrmap_from_index)
5194         (dwarf2_build_psymtabs_hard)
5195         (update_enumeration_type_from_children): Likewise.
5196         * gdb_obstack.h (auto_obstack): New type.
5197         * go-exp.y (name_obstack): Now an auto_obstack.
5198         (build_packaged_name): Use auto_obstack::clear.
5199         (go_parse): Use auto_obstack::clear instead of reinitializing and
5200         freeing the obstack.
5201         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5202         auto_obstack.
5203         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5204         * rust-exp.y (work_obstack): Now an auto_obstack.
5205         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5206         reinitializing and freeing the obstack.
5207         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5208         (host_char_to_target): Use auto_obstack.
5209         * utils.h (make_cleanup_obstack_free): Delete declaration.
5210         * valprint.c (generic_emit_char, generic_printstr): Use
5211         auto_obstack.
5212
5213 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5214
5215         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5216         thread.
5217         (darwin_init_thread_list): Don't update dummy thread.
5218         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5219
5220 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5221
5222         * record-full.c (netorder16): Remove.
5223
5224 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5225
5226         * common/diagnostics.h: Define macros for GCC.
5227         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5228         * common/vec.h: Include diagnostics.h.
5229         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5230         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5231         warning.
5232
5233 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5234
5235         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5236         New macro.
5237         * ada-lex.l: Ignore deprecated register warnings.
5238
5239 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5240
5241         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5242         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5243
5244 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5245
5246         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5247         its own line.
5248
5249 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5250
5251         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5252
5253 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5254
5255         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5256         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5257         (xtensa_register_read_masked): Likewise.
5258
5259 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5260
5261         * common/environ.c (gdb_environ::unset): Update comment.
5262
5263 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5264
5265         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5266         registers.
5267
5268 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5269
5270         * record-full.c (record_full_exec_insn): Use byte_vector.
5271
5272 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5273
5274         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5275         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5276
5277 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5278
5279         * remote.c (cached_reg): Move from here...
5280         * regcache.h (cached_reg): ...to here.
5281         * python/py-unwind.c (struct reg_info): Remove.
5282         (cached_frame_info): Use cached_reg_t.
5283         (pyuw_prev_register): Likewise.
5284         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5285         (pyuw_dealloc_cache): Free all registers.
5286
5287 2017-06-22  Pedro Alves  <palves@redhat.com>
5288             Simon Marchi  <simon.marchi@ericsson.com>
5289
5290         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5291         warning.
5292         * common/diagnostics.h: New file.
5293
5294 2017-06-22  Pedro Alves  <palves@redhat.com>
5295
5296         * common/agent.h: Add include guards.
5297
5298 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5299
5300         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5301         talk about addressable units instead of bytes.
5302
5303 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5304
5305         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5306         of '::const_iterator'.
5307
5308 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5309
5310         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5311         'unittests/environ-selftests.c'.
5312         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5313         * charset.c (find_charset_names): Declare object 'iconv_env'.
5314         Update code to use 'iconv_env' object.  Remove call to
5315         'free_environ'.
5316         * common/environ.c: Include <utility>.
5317         (make_environ): Delete function.
5318         (free_environ): Delete function.
5319         (gdb_environ::clear): New function.
5320         (gdb_environ::operator=): New function.
5321         (gdb_environ::get): Likewise.
5322         (environ_vector): Delete function.
5323         (set_in_environ): Delete function.
5324         (gdb_environ::set): New function.
5325         (unset_in_environ): Delete function.
5326         (gdb_environ::unset): New function.
5327         (gdb_environ::envp): Likewise.
5328         * common/environ.h: Include <vector>.
5329         (struct gdb_environ): Delete; transform into...
5330         (class gdb_environ): ... this class.
5331         (free_environ): Delete prototype.
5332         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5333         environ_vector): Likewise.
5334         * infcmd.c (run_command_1): Update code to call
5335         'envp' from 'gdb_environ' class.
5336         (environment_info): Update code to call methods from 'gdb_environ'
5337         class.
5338         (unset_environment_command): Likewise.
5339         (path_info): Likewise.
5340         (path_command): Likewise.
5341         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5342         (inferior::inferior): Initialize 'environment' using the host's
5343         information.
5344         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5345         Include "environ.h".
5346         (class inferior) <environment>: Change type from 'struct
5347         gdb_environ' to 'gdb_environ'.
5348         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5349         methods from 'gdb_environ' class.
5350         * solib.c (solib_find_1): Likewise
5351         * unittests/environ-selftests.c: New file.
5352
5353 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5354
5355         * features/i386/i386-linux.xml: Exchange the order of including
5356         32bit-linux.xml and 32bit-sse.xml.
5357         * features/i386/i386-linux.c: Regenerated.
5358
5359 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5360
5361         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5362         Delete copy ctor and assignment operator.
5363         (tdesc_type): Likewise.
5364         (tdesc_feature): Likewise.
5365         (tdesc_free_reg): Remove.
5366         (tdesc_create_reg): Use new.
5367         (tdesc_free_type): Remove.
5368         (tdesc_create_vector): Use new.
5369         (tdesc_create_union): Likewise.
5370         (tdesc_create_flags): Likewise.
5371         (tdesc_create_enum): Likewise.
5372         (tdesc_free_feature): Delete.
5373         (free_target_description): Use delete.
5374
5375 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5376
5377         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5378         registers.
5379
5380 2017-06-19  Pedro Alves  <palves@redhat.com>
5381
5382         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5383         after gdb::unlinker.
5384
5385 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5386
5387         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5388         gdb_environ to access an environment variable.
5389
5390 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5391
5392         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5393         gdb_byte*.
5394
5395 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5396
5397         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5398
5399 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5400
5401         * configure: Re-generate.
5402         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5403
5404 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5405
5406         * configure: Re-generate.
5407         * warning.m4: Pass -Werror to compiler when checking for
5408         supported warning flags.
5409
5410 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5411
5412         * Makefile.in (COMPILE.pre): Add "-x c++".
5413
5414 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5415             Pedro Alves  <palves@redhat.com>
5416             Yao Qi  <yao.qi@linaro.org>
5417
5418         * defs.h (RequireLongest): New.
5419         (extract_integer): Declare function template.
5420         (extract_signed_integer): Remove the declaration, but define it
5421         static inline.
5422         (extract_unsigned_integer): Likewise.
5423         (store_integer): Declare function template.
5424         (store_signed_integer): Remove the declaration, but define it
5425         static inline.
5426         (store_unsigned_integer): Likewise.
5427         * findvar.c (extract_integer): New function template.
5428         (extract_signed_integer): Remove.
5429         (extract_unsigned_integer): Remove.
5430         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5431         instantiations.
5432         (store_integer): New function template.
5433         (store_signed_integer): Remove.
5434         (store_unsigned_integer): Remove.
5435         (store_integer): Explicit instantiations.
5436         * regcache.c (regcache_raw_read_signed): Update.
5437         (regcache::raw_read): New function.
5438         (regcache::raw_read_signed): Remove.
5439         (regcache::raw_read_unsigned): Remove.
5440         (regcache_raw_read_unsigned): Update.
5441         (regcache_raw_write_unsigned): Update.
5442         (regcache::raw_write_signed): Remove.
5443         (regcache::raw_write): New function.
5444         (regcache_cooked_read_signed): Update.
5445         (regcache::raw_write_unsigned): Remove.
5446         (regcache::cooked_read_signed): Remove.
5447         (regcache_cooked_read_unsigned): Update.
5448         (regcache::cooked_read_unsigned): Remove.
5449         (regcache_cooked_write_signed): Update.
5450         (regcache_cooked_write_unsigned): Update.
5451         * regcache.h (regcache) <raw_read_signed>: Remove.
5452         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5453         <raw_read, raw_write>: New.
5454         <cooked_read_signed, cooked_write_signed>: Remove.
5455         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5456         <cooked_read, cooked_write>: New.
5457         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5458         (sh64_pseudo_register_write): Update.
5459
5460 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5461
5462         * arc-tdep.c (arc_disassembler_options): New variable.
5463         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5464         of default_print_insn.
5465         (arc_delayed_print_insn): Set info->section when needed,
5466         use default_print_insn to retrieve a disassembler.
5467
5468 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5469
5470         PR gdb/21574
5471         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5472         to mention $SHELL and startup-with-shell.
5473
5474 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5475
5476         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5477
5478 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5479
5480         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5481         default_print_insn instead of print_insn_aarch64.
5482         * arm-tdep.c (gdb_print_insn_arm): Call
5483         default_print_insn instead of print_insn_big_arm
5484         and print_insn_little_arm.
5485         * i386-tdep.c (i386_print_insn): Call default_print_insn
5486         instead of print_insn_i386.
5487         * ia64-tdep.c (ia64_print_insn): Call
5488         default_print_insn instead of print_insn_ia64.
5489         * mips-tdep.c (gdb_print_insn_mips): Call
5490         default_print_insn instead of print_insn_big_mips
5491         and print_insn_little_mips.
5492         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5493         instead of print_insn_spu.
5494
5495 2017-06-14  Pedro Alves  <palves@redhat.com>
5496
5497         * ada-lang.c: Include "common/byte-vector.h".
5498         (ada_value_primitive_packed_val): Use gdb::byte_vector.
5499         * charset.c (wchar_iterator::iterate): Resize the vector instead
5500         of reserving it.
5501         * common/byte-vector.h: Include "common/def-vector.h".
5502         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5503         * cli/cli-dump.c: Include "common/byte-vector.h".
5504         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5505         * common/byte-vector.h: New file.
5506         * common/def-vector.h: New file.
5507         * common/default-init-alloc.h: New file.
5508         * dwarf2loc.c: Include "common/byte-vector.h".
5509         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5510         instead of reserving it.
5511         * dwarf2read.c: Include "common/byte-vector.h".
5512         (data_buf::m_vec): Now a gdb::byte_vector.
5513         * gdb_regex.c: Include "common/def-vector.h".
5514         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5515         * mi/mi-main.c: Include "common/byte-vector.h".
5516         (mi_cmd_data_read_memory): Use gdb::byte_vector.
5517         * printcmd.c: Include "common/byte-vector.h".
5518         (print_scalar_formatted): Use gdb::byte_vector.
5519         * valprint.c: Include "common/byte-vector.h".
5520         (maybe_negate_by_bytes, print_decimal_chars): Use
5521         gdb::byte_vector.
5522
5523 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5524
5525         * darwin-nat.c: Include "nat/fork-inferior.h".
5526
5527 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5528
5529         * configure.nat: Factor out Darwin bits that are not
5530         architecture-specific.  Add fork-inferior.o.
5531
5532 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5533
5534         * configure.nat: Factor out AIX bits that are not
5535         architecture-specific.  Add fork-inferior.o.
5536
5537 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5538
5539         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
5540         (read_pieced_value, write_pieced_value): ...here.  Reduce to
5541         wrappers that just call rw_pieced_value.
5542
5543 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5544
5545         * dwarf2loc.c (write_pieced_value): When writing the data for a
5546         memory piece, use write_memory_with_notification instead of
5547         write_memory.
5548
5549 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5550
5551         * valops.c (read_value_memory): Change embedded_offset to
5552         represent a bit offset instead of a byte offset.
5553         * value.h (read_value_memory): Adjust comment.
5554
5555 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5556
5557         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5558         dest_offset_bits and source_offset_bits.
5559         (write_pieced_value): Likewise.
5560
5561 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5562
5563         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5564         given by DW_OP_bit_piece.
5565         (write_pieced_value): Likewise.
5566
5567 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5568
5569         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5570         some other preparations to the places where sufficient information
5571         is available.
5572         (write_pieced_value): Likewise.
5573
5574 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5575
5576         * dwarf2loc.c (bits_to_bytes): New function.
5577         (read_pieced_value): Fix offset calculations for register pieces
5578         on big-endian targets.
5579         (write_pieced_value): Likewise.
5580
5581 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5582
5583         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5584         (write_pieced_value): Likewise.
5585
5586 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5587
5588         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5589         transfer the source value's least significant bits, instead of its
5590         lowest-addressed ones.  Rename type_len to max_offset.
5591         (read_pieced_value): Mirror above changes to write_pieced_value as
5592         applicable.
5593
5594 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5595
5596         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5597         truncate full bytes from dest_offset_bits before using it as an
5598         offset into the buffer.
5599
5600 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5601
5602         * dwarf2loc.c (write_pieced_value): Include transfer size in
5603         byte-wise check.
5604
5605 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5606
5607         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5608         calculation of this_size.
5609
5610 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5611
5612         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5613         when targeting a bit-field.
5614         (write_pieced_value): Likewise.
5615
5616 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5617
5618         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5619         (allocate_piece_closure): Drop addr_size parameter.
5620         (dwarf2_evaluate_loc_desc_full): Adjust call to
5621         allocate_piece_closure.
5622
5623 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5624
5625         PR gdb/21226
5626         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5627         the LSB end, independent of endianness.
5628
5629 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5630
5631         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5632         size capping.
5633
5634 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5635
5636         * mips-linux-nat.c: Move include features/mips*-linux.c to
5637         mips-linux-tdep.c.
5638         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5639         to mips-linux-tdep.c.
5640         * mips-linux-tdep.c: Include features/mips*-linux.c
5641         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5642         functions.
5643         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5644         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5645         (tdesc_mips64_dsp_linux): Declare.
5646
5647 2017-06-12  Tom Tromey  <tom@tromey.com>
5648
5649         * valprint.h (val_print_type_code_int): Remove.
5650         * valprint.c (generic_val_print_int): Always call
5651         val_print_scalar_formatted.
5652         (val_print_type_code_int): Remove.
5653         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5654         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5655         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5656         * ada-valprint.c (ada_val_print_num): Use
5657         val_print_scalar_formatted.
5658
5659 2017-06-12  Tom Tromey  <tom@tromey.com>
5660
5661         * printcmd.c (print_scalar_formatted): Unify the two switches.
5662         Don't convert scalars to LONGEST.
5663
5664 2017-06-12  Tom Tromey  <tom@tromey.com>
5665
5666         PR exp/16225:
5667         * valprint.h (print_decimal_chars): Update.
5668         * valprint.c (maybe_negate_by_bytes): New function.
5669         (print_decimal_chars): Add "is_signed" argument.
5670         * printcmd.c (print_scalar_formatted): Update.
5671
5672 2017-06-12  Tom Tromey  <tom@tromey.com>
5673
5674         PR exp/16225:
5675         * valprint.h (print_binary_chars, print_hex_chars): Update.
5676         * valprint.c (val_print_type_code_int): Update.
5677         (print_binary_chars): Add "zero_pad" argument.
5678         (emit_octal_digit): New function.
5679         (print_octal_chars): Don't zero-pad.
5680         (print_decimal_chars): Likewise.
5681         (print_hex_chars): Add "zero_pad" argument.
5682         * sh64-tdep.c (sh64_do_fp_register): Update.
5683         * regcache.c (regcache::dump): Update.
5684         * printcmd.c (print_scalar_formatted): Update.
5685         * infcmd.c (default_print_one_register_info): Update.
5686
5687 2017-06-12  Pedro Alves  <palves@redhat.com>
5688             Alan Hayward  <alan.hayward@arm.com>
5689
5690         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5691         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5692         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5693         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5694         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5695
5696 2017-06-12  Pedro Alves  <palves@redhat.com>
5697
5698         * dwarf2read.c (mapped_symtab::data): Now a vector of
5699         symtab_index_entry instead of vector of
5700         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5701         whether an element's name is NULL instead of checking whether the
5702         element itself is NULL.
5703         (find_slot): Change return type.  Adjust.
5704         (hash_expand, , add_index_entry, uniquify_cu_indices)
5705         (write_hash_table): Adjust.
5706
5707 2017-06-12  Pedro Alves  <palves@redhat.com>
5708
5709         * dwarf2read.c (recursively_count_psymbols): New function.
5710         (write_psymtabs_to_index): Call it to compute number of psyms and
5711         pass estimate size of psyms_seen to unordered_set's ctor.
5712
5713 2017-06-12  Pedro Alves  <palves@redhat.com>
5714
5715         * dwarf2read.c (write_hash_table): Check if key already exists
5716         before emplacing.
5717
5718 2017-06-12  Pedro Alves  <palves@redhat.com>
5719
5720         * dwarf2read.c (data_buf::append_space): Rename to...
5721         (data_buf::grow): ... this, and make private.  Adjust all callers.
5722         (data_buf::append_uint): New method.
5723         (add_address_entry, write_one_signatured_type)
5724         (write_psymtabs_to_index): Use it.
5725
5726 2017-06-12  Pedro Alves  <palves@redhat.com>
5727
5728         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5729         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5730         (data_buf::file_write): Call ::fwrite directly.
5731
5732 2017-06-12  Pedro Alves  <palves@redhat.com>
5733
5734         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5735         std::vector::erase.
5736
5737 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5738
5739         Code cleanup: C++ify .gdb_index producer.
5740         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5741         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5742         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5743         (create_strtab, add_string): Remove.
5744         (file_write, data_buf): New.
5745         (struct symtab_index_entry): Use std::vector for cu_indices.
5746         (struct mapped_symtab): Use std::vector for data.
5747         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5748         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5749         Remove.
5750         (find_slot): Change return type.  Update it to the new data structures.
5751         (hash_expand, add_index_entry): Update it to the new data structures.
5752         (offset_type_compare): Remove.
5753         (uniquify_cu_indices): Update it to the new data structures.
5754         (c_str_view, c_str_view_hasher, vector_hasher): New.
5755         (add_indices_to_cpool): Remove.
5756         (write_hash_table): Update it to the new data structures.
5757         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5758         (eq_psymtab_cu_index): Remove.
5759         (psym_index_map): New typedef.
5760         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5761         reference and std::unordered_map for cu_index_htab.
5762         (add_address_entry, add_address_entry_worker, write_address_map)
5763         (write_psymbols): Update it to the new data structures.
5764         (write_obstack): Remove.
5765         (struct signatured_type_index_data): Change types_list to a data_buf
5766         reference and psyms_seen to a std::unordered_set reference.
5767         (write_one_signatured_type, recursively_write_psymbols)
5768         (write_psymtabs_to_index): Update it to the new data structures.
5769
5770 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5771
5772         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5773         separate-debug-file commands.
5774         * symfile.h (separate_debug_file_debug): New global.
5775         * symfile.c (separate_debug_file_debug): New global.
5776         (separate_debug_file_exists, find_separate_debug_file): Add
5777         debug output.
5778         (_initialize_symfile): Add "set debug separate-debug-file"
5779         command.
5780         * build-id.c (build_id_to_debug_bfd,
5781         find_separate_debug_file_by_buildid): Add debug output.
5782
5783 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5784
5785         * gdbarch.sh (displaced_step_free_closure): Remove.
5786         * gdbarch.h, gdbarch.c: Re-generate.
5787         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5788         displaced_step_free_closure.
5789         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5790         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5791         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5792         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5793         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5794         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5795         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5796         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5797         * infrun.c (displaced_step_clear): Call xfree instead of
5798         gdbarch_displaced_step_free_closure.
5799
5800 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5801
5802         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5803         NULL".
5804
5805 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5806
5807         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5808         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5809         (mn10300_push_dummy_call): Likewise.
5810
5811 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5812
5813         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5814
5815 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5816
5817         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5818
5819 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5820
5821         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5822         able to start inferiors using a shell.
5823         (New remote packets): Announce new packet "QStartupWithShell".
5824         * remote.c: Add PACKET_QStartupWithShell.
5825         (extended_remote_create_inferior): Handle new
5826         PACKET_QStartupWithShell.
5827         (remote_protocol_features) <QStartupWithShell>: New entry for
5828         PACKET_QStartupWithShell.
5829         (_initialize_remote): Call "add_packet_config_cmd" for
5830         QStartupShell.
5831
5832 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5833             Pedro Alves  <palves@redhat.com>
5834
5835         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5836         and "nat/fork-inferior.h".
5837         * common/common-inferior.h: New file, with contents from
5838         "gdb/inferior.h".
5839         * commom/common-utils.c: Include "common-utils.h".
5840         (stringify_argv): New function.
5841         * common/common-utils.h (stringify_argv): New prototype.
5842         * configure.nat: Add "fork-inferior.o" as a dependency for
5843         "*linux*", "fbsd*" and "nbsd*" hosts.
5844         * corefile.c (get_exec_file): Update comment.
5845         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5846         instead of "startup_inferior".
5847         (darwin_create_inferior): Call "add_thread_silent" after
5848         "fork_inferior".
5849         * fork-child.c: Cleanup unnecessary includes.
5850         (SHELL_FILE): Move to "common/common-fork-child.c".
5851         (environ): Likewise.
5852         (exec_wrapper): Initialize.
5853         (get_exec_wrapper): New function.
5854         (breakup_args): Move to "common/common-fork-child.c"; rename to
5855         "breakup_args_for_exec".
5856         (escape_bang_in_quoted_argument): Move to
5857         "common/common-fork-child.c".
5858         (saved_ui): New variable.
5859         (prefork_hook): New function.
5860         (postfork_hook): Likewise.
5861         (postfork_child_hook): Likewise.
5862         (gdb_startup_inferior): Likewise.
5863         (fork_inferior): Move to "common/common-fork-child.c".  Update
5864         function to support gdbserver.
5865         (startup_inferior): Likewise.
5866         * gdbcore.h (get_exec_file): Remove declaration.
5867         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5868         instead of "startup_inferior".  Call "add_thread_silent" after
5869         "fork_inferior".
5870         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5871         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5872         instead of "startup_inferior".  Call "add_thread_silent" after
5873         "fork_inferior".
5874         * inferior.h: Include "common-inferior.h".
5875         (trace_start_error): Move to "common/common-utils.h".
5876         (trace_start_error_with_name): Likewise.
5877         (fork_inferior): Move prototype to "nat/fork-inferior.h".
5878         (startup_inferior): Likewise.
5879         (gdb_startup_inferior): New prototype.
5880         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5881         * nat/fork-inferior.h: New file.
5882         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5883         instead of "startup_inferior".  Call "add_thread_silent" after
5884         "fork_inferior".
5885         * target.h (target_terminal_init): Move prototype to
5886         "target/target.h".
5887         (target_terminal_inferior): Likewise.
5888         (target_terminal_ours): Likewise.
5889         * target/target.h (target_terminal_init): New prototype, moved
5890         from "target.h".
5891         (target_terminal_inferior): Likewise.
5892         (target_terminal_ours): Likewise.
5893         * utils.c (gdb_flush_out_err): New function.
5894
5895 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5896
5897         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5898         * common/common-gdbthread.h: New file, with parts from
5899         "gdb/gdbthread.h".
5900         * gdbthread.h: Include "common-gdbthread.h".
5901         (switch_to_thread): Moved to "common/common-gdbthread.h".
5902
5903 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5904
5905         * Makefile.in (SFILES): Add "common/job-control.c".
5906         (HFILES_NO_SRCDIR): Add "common/job-control.h".
5907         (COMMON_OBS): Add "job-control.o".
5908         * common/job-control.c: New file, with contents from
5909         "gdb/inflow.c".
5910         * common/job-control.h: New file, with contents from "terminal.h".
5911         * fork-child.c: Include "job-control.h".
5912         * inflow.c: Include "job-control.h".
5913         (gdb_setpgid): Move to "common/common-inflow.c".
5914         (_initialize_inflow): Move setting of "job_control" to
5915         "handle_job_control".
5916         * terminal.h (job_control): Moved to "common/common-terminal.h".
5917         (gdb_setpgid): Likewise.
5918         * top.c: Include "job_control.h".
5919         * utils.c: Likewise.
5920         (job_control): Moved to "job-control.c".
5921
5922 2017-06-07  Pedro Alves  <palves@redhat.com>
5923
5924         * Makefile.in (SFILES): Add gdb_regex.c.
5925         (COMMON_OBS): Add gdb_regex.o.
5926         * ada-lang.c (ada_add_standard_exceptions)
5927         (ada_add_exceptions_from_frame, name_matches_regex)
5928         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5929         parameter type to compiled_regex.  Adjust.
5930         (ada_exceptions_list): Use compiled_regex.
5931         * break-catch-throw.c (exception_catchpoint::pattern): Now a
5932         std::unique_ptr<compiled_regex>.
5933         (exception_catchpoint::~exception_catchpoint): Remove regfree
5934         call.
5935         (check_status_exception_catchpoint): Adjust to use compiled_regex.
5936         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5937         * breakpoint.c (solib_catchpoint::compiled): Now a
5938         std::unique_ptr<compiled_regex>.
5939         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5940         (check_status_catch_solib): Adjust to use compiled_regex.
5941         (add_solib_catchpoint): Adjust to use compiled_regex.
5942         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5943         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5944         compiled_regex reference.  Adjust to use it.
5945         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5946         declaration.  Include "gdb_regex.h".
5947         (apropos_cmd): Change regex parameter to compiled_regex reference.
5948         * gdb_regex.c: New file.
5949         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5950         declarations.
5951         (class compiled_regex): New.
5952         * linux-tdep.c: Include "common/gdb_optional.h".
5953         (struct mapping_regexes): New, factored out from
5954         mapping_is_anonymous_p, and adjusted to use compiled_regex.
5955         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5956         gdb::optional and remove cleanups.  Adjust to compiled_regex.
5957         * probe.c: Include "common/gdb_optional.h".
5958         (collect_probes): Use compiled_regex and gdb::optional and remove
5959         cleanups.
5960         * skip.c: Include "common/gdb_optional.h".
5961         (skiplist_entry::compiled_function_regexp): Now a
5962         gdb::optional<compiled_regex>.
5963         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5964         (free_skiplist_entry): Remove regfree call.
5965         (compile_skip_regexp, skip_rfunction_p): Adjust to use
5966         compiled_regex and gdb::optional.
5967         * symtab.c: Include "common/gdb_optional.h".
5968         (search_symbols): Use compiled_regex and gdb::optional.
5969         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5970         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
5971         to gdb_regex.c.
5972
5973 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5974
5975         * regcache.c (regcache::save): Avoid buffer use.
5976         (regcache::dump): Likewise.
5977
5978 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5979
5980         * sh-tdep.c (sh_pseudo_register_read): Remove
5981         MAX_REGISTER_SIZE.
5982         (sh_pseudo_register_write): Likewise.
5983         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5984         (sh64_pseudo_register_write): Likewise
5985
5986 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5987
5988         * aarch64-tdep.c (aarch64_store_return_value): Use
5989         V_REGISTER_SIZE.
5990         (aarch64_pseudo_read_value): Likewise.
5991         (aarch64_pseudo_write): Likewise.
5992
5993 2017-06-06  Yao Qi  <yao.qi@linaro.org>
5994
5995         * regformats/regdef.h (set_register_cache): Remove the
5996         declaration.
5997
5998 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
5999
6000         * frame.c (frame_unwind_register_signed): Use
6001         frame_unwind_register_value.
6002
6003 2017-06-06  Pedro Alves  <palves@redhat.com>
6004
6005         PR breakpoints/21553
6006         * breakpoint.c (create_breakpoints_sal_default)
6007         (init_breakpoint_sal, create_breakpoint_sal): Use
6008         gdb::unique_xmalloc_ptr for string parameters.
6009         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6010         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6011         (base_breakpoint_create_breakpoints_sal)
6012         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6013         (strace_marker_create_breakpoints_sal)
6014         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6015         string parameters.
6016         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6017         gdb::unique_xmalloc_ptr for string parameters.
6018         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6019         parameters.
6020
6021 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6022
6023         * alpha-tdep.c (alpha_register_to_value): Use
6024         get_frame_register_value.
6025         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6026
6027 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6028
6029         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6030         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6031         (ia64_value_to_register): Likewise.
6032         (ia64_extract_return_value): Likewise.
6033         (ia64_store_return_value): Likewise.
6034         (ia64_push_dummy_call): Likewise.
6035
6036 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6037
6038         GDB 8.0 released.
6039
6040 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6041
6042         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6043
6044 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6045
6046         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6047         parameter.
6048         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6049
6050 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6051
6052         * event-loop.c (poll_timers): Unallocate timer using delete
6053         instead of xfree.
6054
6055 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6056
6057         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6058         (struct breakpoint) <~breakpoint>: New.
6059         (struct watchpoint): Inherit from breakpoint.
6060         <~watchpoint>: New.
6061         <base>: Remove.
6062         (struct tracepoint): Inherit from breakpoint.
6063         <base>: Remove.
6064         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6065         (struct longjmp_breakpoint): Inherit from breakpoint.
6066         <~longjmp_breakpoint>: New.
6067         <base>: Remove.
6068         (new_breakpoint_from_type): Remove casts.
6069         (watchpoint_in_thread_scope): Remove reference to base field.
6070         (watchpoint_del_at_next_stop): Likewise.
6071         (update_watchpoint): Likewise.
6072         (watchpoint_check): Likewise.
6073         (bpstat_check_watchpoint): Likewise.
6074         (set_longjmp_breakpoint): Likewise.
6075         (struct fork_catchpoint): Inherit from breakpoint.
6076         <base>: Remove.
6077         (struct solib_catchpoint): Inherit from breakpoint.
6078         <~solib_catchpoint>: New.
6079         <base>: Remove.
6080         (dtor_catch_solib): Change to ...
6081         (solib_catchpoint::~solib_catchpoint): ... this.
6082         (breakpoint_hit_catch_solib): Remove reference to base field.
6083         (add_solib_catchpoint): Likewise.
6084         (create_fork_vfork_event_catchpoint): Likewise.
6085         (struct exec_catchpoint): Inherit from breakpoint.
6086         <~exec_catchpoint>: New.
6087         <base>: Remove.
6088         (dtor_catch_exec): Change to ...
6089         (exec_catchpoint::~exec_catchpoint): ... this.
6090         (dtor_watchpoint): Change to ...
6091         (watchpoint::~watchpoint): ... this.
6092         (watch_command_1): Remove reference to base field.
6093         (catch_exec_command_1): Likewise.
6094         (base_breakpoint_dtor): Change to ...
6095         (breakpoint::~breakpoint): ... this.
6096         (base_breakpoint_ops): Remove dtor field value.
6097         (longjmp_bkpt_dtor): Change to ...
6098         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6099         (strace_marker_create_breakpoints_sal): Remove reference to base
6100         field.
6101         (delete_breakpoint): Don't manually call breakpoint destructor.
6102         (create_tracepoint_from_upload): Remove reference to base field.
6103         (trace_pass_set_count): Likewise.
6104         (initialize_breakpoint_ops): Don't initialize
6105         momentary_breakpoint_ops, don't set dtors.
6106         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6107         <~ada_catchpoint>: New.
6108         <base>: Remove.
6109         (create_excep_cond_exprs): Remove reference to base field.
6110         (dtor_exception): Change to ...
6111         (ada_catchpoint::~ada_catchpoint): ... this.
6112         (dtor_catch_exception): Remove.
6113         (dtor_catch_exception_unhandled): Remove.
6114         (dtor_catch_assert): Remove.
6115         (create_ada_exception_catchpoint): Remove reference to base
6116         field.
6117         (initialize_ada_catchpoint_ops): Don't set dtors.
6118         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6119         breakpoint.
6120         <~signal_catchpoint>: New.
6121         <base>: Remove.
6122         (signal_catchpoint_dtor): Change to ...
6123         (signal_catchpoint::~signal_catchpoint): ... this.
6124         (create_signal_catchpoint): Remove reference to base field.
6125         (initialize_signal_catchpoint_ops): Don't set dtor.
6126         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6127         from breakpoint.
6128         <~syscall_catchpoint>: New.
6129         <base>: Remove.
6130         (dtor_catch_syscall): Change to ...
6131         (syscall_catchpoint::~syscall_catchpoint): ... this.
6132         (create_syscall_event_catchpoint): Remove reference to base
6133         field.
6134         (initialize_syscall_catchpoint_ops): Don't set dtor.
6135         * break-catch-throw.c (struct exception_catchpoint): Inherit
6136         from breakpoint.
6137         <~exception_catchpoint>: New.
6138         <base>: Remove.
6139         (dtor_exception_catchpoint): Change to ...
6140         (exception_catchpoint::~exception_catchpoint): ... this.
6141         (handle_gnu_v3_exceptions): Remove reference to base field.
6142         (initialize_throw_catchpoint_ops): Don't set dtor.
6143         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6144         field.
6145         * remote.c (remote_get_tracepoint_status): Likewise.
6146         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6147         * tracefile.c (tracefile_fetch_registers): Likewise.
6148         * tracepoint.c (actions_command): Likewise.
6149         (validate_actionline): Likewise.
6150         (tfind_1): Likewise.
6151         (get_traceframe_location): Likewise.
6152         (find_matching_tracepoint_location): Likewise.
6153         (parse_tracepoint_status): Likewise.
6154         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6155
6156 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6157
6158         * breakpoint.c (struct longjmp_breakpoint): New struct.
6159         (is_tracepoint_type): Change return type to bool.
6160         (is_longjmp_type): New function.
6161         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6162         (set_raw_breakpoint_without_location): Use
6163         new_breakpoint_from_type.
6164         (set_raw_breakpoint): Likewise.
6165
6166 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6167
6168         * breakpoint.c (new_breakpoint_from_type): New function.
6169         (create_breakpoint_sal): Use new_breakpoint_from_type and
6170         unique_ptr.
6171         (create_breakpoint): Likewise.
6172
6173 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6174
6175         * memattr.c (mem_info_command): Rename to ...
6176         (info_mem_command): ... this.
6177         (mem_enable_command): Rename to ...
6178         (enable_mem_command): ... this.
6179         (mem_disable_command): Rename to ...
6180         (disable_mem_command): ... this.
6181         (mem_delete_command): Rename to ...
6182         (delete_mem_command): ... this.
6183         (_initialize_mem): Adjust function names.
6184
6185 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6186
6187         * btrace.c (handle_pt_insn_events): New.
6188         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6189         STATUS.  Split into this and ...
6190         (handle_pt_insn_event_flags): ... this.
6191
6192 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6193
6194         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6195         and struct pt_insn.resynced.
6196         * configure: Regenerated.
6197         * config.in: Regenerated.
6198
6199 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6200
6201         * btrace.c (ftrace_find_call_by_number): New function.
6202         (ftrace_new_function): Store objects, not pointers.
6203         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6204         ftrace_new_gap, ftrace_update_function,
6205         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6206         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6207         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6208         btrace_ends_with_single_insn, btrace_call_get): Account for
6209         btrace_thread_info::functions now storing objects.
6210         * btrace.h (struct btrace_thread_info): Add constructor.
6211         (struct btrace_thread_info) <functions>: Make std::vector.
6212         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6213         Initialize with default values.
6214         * record-btrace.c (record_btrace_frame_sniffer): Account for
6215         btrace_thread_info::functions now storing objects.
6216
6217 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6218
6219         * btrace.c: Remove typedef bfun_s.
6220         (ftrace_new_gap): Directly add gaps to the list of gaps.
6221         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6222         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6223         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6224         instead of gdb VEC.
6225
6226 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6227
6228         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6229         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6230         with btrace_thread_info::next_segment and
6231         btrace_thread_info::prev_segment.
6232         * btrace.h: Remove struct btrace_func_link.
6233         (struct btrace_function): Replace pair of function segment pointers
6234         with pair of indices.
6235         * python/py-record-btrace.c (btpy_call_prev_sibling,
6236         btpy_call_next_sibling): Replace references to
6237         btrace_thread_info::segment with btrace_thread_info::next_segment and
6238         btrace_thread_info::prev_segment.
6239         * record-btrace.c (record_btrace_frame_this_id): Use
6240         btrace_find_call_by_number.
6241
6242 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6243
6244         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6245         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6246         btrace_insn_next, btrace_insn_prev): Remove references to
6247         btrace_thread_info::flow.
6248         * btrace.h (struct btrace_function): Remove FLOW.
6249
6250 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6251
6252         * btrace.c (ftrace_find_call_by_number): New function.
6253         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6254         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6255         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6256         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6257         index.
6258         * btrace.h (struct btrace_function): Turn UP into an index.
6259         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6260         as an index.
6261         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6262         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6263         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6264
6265 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6266
6267         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6268         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6269         ftrace_update_function, ftrace_compute_global_level_offset,
6270         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6271         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6272         btrace_insn_end, btrace_is_empty): Remove references to
6273         btrace_thread_info::begin and btrace_thread_info::end.
6274         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6275         (struct btrace_thread_info) <functions>: Adjust comment.
6276         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6277         btrace_thread_info::begin.
6278
6279 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6280
6281         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6282         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6283         ftrace_update_function): Remove arguments that implicitly were always
6284         BTINFO->END.
6285         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6286         Don't pass BTINFO->END.
6287
6288 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6289
6290         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6291         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6292         btrace_find_insn_by_number): Replace function segment pointer with
6293         index.
6294         (btrace_insn_cmp): Simplify.
6295         * btrace.h: (struct btrace_insn_iterator) Rename index to
6296         insn_index.  Replace function segment pointer with index into function
6297         segment vector.
6298         * record-btrace.c (record_btrace_call_history): Replace function
6299         segment pointer use with index.
6300         (record_btrace_frame_sniffer): Retrieve function call segment through
6301         vector.
6302         (record_btrace_set_replay): Remove defunc't safety check.
6303
6304 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6305
6306         * btrace.c (btrace_ends_with_single_insn): New function.
6307         (btrace_call_get, btrace_call_number, btrace_call_begin,
6308         btrace_call_end, btrace_call_next, btrace_call_prev,
6309         btrace_find_call_by_number): Use index into call segment vector
6310         instead of pointer.
6311         (btrace_call_cmp): Simplify.
6312         * btrace.h (struct btrace_call_iterator): Replace function call segment
6313         pointer with index into vector.
6314         * record-btrace.c (record_btrace_call_history): Use index instead of
6315         pointer.
6316
6317 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6318
6319         * btrace.c (btrace_insn_begin, btrace_insn_end,
6320         btrace_find_insn_by_number): Add btinfo to iterator.
6321         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6322
6323 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6324
6325         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6326         and save pointers directly.
6327         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6328         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6329         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6330         changed signature of functions.
6331         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6332         (btrace_fetch): Remove code that adds btrace_function pointers to
6333         vector of btrace_functions.
6334         (btrace_clear): Simplify freeing vector of btrace_functions.
6335
6336 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6337
6338         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6339         Replace VEC_* with std::vector functions.
6340         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6341         (struct btrace_thread_info)<functions>: Change type to std::vector.
6342
6343 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6344
6345         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6346         "Removed targets and native configurations" up.  Merge duplicate
6347         "New commands" sub-sections.  Add "New options" sub-sections.
6348
6349 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6350
6351         * defs.h (copy_integer_to_size): New declaration.
6352         * findvar.c (copy_integer_to_size): New function.
6353         (do_cint_test): New selftest function.
6354         (copy_integer_to_size_test): Likewise.
6355         (_initialize_findvar): Likewise.
6356         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6357         (mips_fbsd_collect_reg): Use raw_collect_integer.
6358         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6359         (mips64_fill_gregset): Use raw_collect_integer
6360         (mips64_fill_fpregset): Use raw_supply_integer.
6361         * regcache.c (regcache::raw_supply_integer): New function.
6362         (regcache::raw_collect_integer): Likewise.
6363         * regcache.h: (regcache::raw_supply_integer): New declaration.
6364         (regcache::raw_collect_integer): Likewise.
6365
6366 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6367
6368         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6369         (COMMON_OBS): Add gdbarch-selftests.o.
6370         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6371         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6372         * gdbarch-selftests.c: New file.
6373         * regcache.h (regcache) <~regcache>: Mark it virtual if
6374         GDB_SELF_TEST.
6375         <raw_write>: Likewise.
6376
6377 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6378
6379         * regcache.c (current_regcache): Change it to
6380         regcache::current_regcache.
6381         (regcache_observer_target_changed): Update.
6382         (regcache_thread_ptid_changed): Make it a regcache static
6383         method.
6384         (regcache_thread_ptid_changed): Update.
6385         (class regcache_access): New.
6386         (current_regcache_test): Update.
6387         (_initialize_regcache): Update.
6388         * regcache.h: Include forward_list.
6389         (regcache): Declare regcache_thread_ptid_changed and declare
6390         registers_changed_ptid as friend.
6391
6392 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6393
6394         * i387-tdep.c (i387_register_to_value): Use register_size
6395         instead of TYPE_LENGTH.
6396         * m68k-tdep.c (m68k_register_to_value): Likewise.
6397
6398 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6399
6400         * i387-tdep.c (i387_convert_register_p): Return false if type
6401         code isn't TYPE_CODE_FLT.
6402
6403 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6404
6405         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6406         length is 4.
6407         (alpha_register_to_value): Remove type length check.
6408         (alpha_value_to_register): Likewise.
6409
6410 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6411
6412         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6413         TYPE_CODE_FLT.
6414
6415 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6416
6417         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6418         TYPE_CODE_FLT or not.
6419
6420 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6421
6422         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6423         * avr-tdep.c (avr_gdbarch_init): Likewise.
6424         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6425         * cris-tdep.c (cris_gdbarch_init): Likewise.
6426         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6427         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6428         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6429         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6430         * mep-tdep.c (mep_gdbarch_init): Likewise.
6431         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6432         * mips-tdep.c (mips_gdbarch_init): Likewise.
6433         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6434         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6435         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6436         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6437         * v850-tdep.c (v850_gdbarch_init): Likewise.
6438
6439 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6440
6441         * selftest-arch.c (tests_with_arch): Call registers_changed
6442         and reinit_frame_cache.
6443         * selftest.c (run_self_tests): Likewise.
6444
6445 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6446
6447         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6448         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6449
6450 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6451
6452         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6453         set_gdbarch_print_insn.
6454
6455 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6456
6457         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6458         set_gdbarch_print_insn.
6459
6460 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6461
6462         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6463         set_gdbarch_print_insn.
6464         * arc-tdep.c (arc_gdbarch_init): Likewise.
6465         * arch-utils.c: include dis-asm.h.
6466         (default_print_insn): New function.
6467         * arch-utils.h (default_print_insn): Declare.
6468         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6469         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6470         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6471         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6472         * frv-tdep.c (frv_gdbarch_init): Likewise.
6473         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6474         * gdbarch.sh (print_insn): Use default_print_insn.
6475         * gdbarch.c: Regenerated.
6476         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6477         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6478         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6479         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6480         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6481         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6482         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6483         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6484         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6485         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6486         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6487         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6488         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6489         * mt-tdep.c (mt_gdbarch_init): Likewise.
6490         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6491         * nios2-tdep.c (nios2_print_insn): Remove.
6492         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6493         * rx-tdep.c (rx_gdbarch_init): Likewise.
6494         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6495         * score-tdep.c (score_print_insn): Remove.
6496         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6497         * sh-tdep.c (sh_gdbarch_init): Likewise.
6498         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6499         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6500         * tic6x-tdep.c (tic6x_print_insn): Remove.
6501         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6502         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6503         * v850-tdep.c (v850_gdbarch_init): Likewise.
6504         * vax-tdep.c (vax_gdbarch_init): Likewise.
6505         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6506         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6507
6508 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6509
6510         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6511         (MIPS_FP0_REGNUM): Remove.
6512         (MIPS_FSR_REGNUM): Remove.
6513         (mips_fbsd_supply_fpregs): Use mips_regnum.
6514         (mips_fbsd_supply_gregs): Likewise.
6515         (mips_fbsd_collect_fpregs): Likewise.
6516         (mips_fbsd_collect_gregs): Likewise.
6517
6518 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6519
6520         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6521         (getpfpregs_supplies): New function.
6522         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6523         getfpregs_supplies.
6524         (mips_fbsd_store_inferior_registers): Likewise.
6525
6526 2017-05-22  Pedro Alves <palves@redhat.com>
6527
6528         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6529         maintainer.
6530
6531 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
6532
6533         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6534         (store_register): Likewise.
6535         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6536         (get_decimal_float_return_value): Likewise.
6537         (do_ppc_sysv_return_value): Likewise.
6538         (ppc64_sysv_abi_push_integer): Likewise.
6539         (ppc64_sysv_abi_push_freg): Likewise.
6540         (ppc64_sysv_abi_return_value_base): Likewise.
6541         (ppc64_sysv_abi_return_value): Likewise.
6542         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6543         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6544         * rs6000-nat.c: Likewise.
6545         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6546         (rs6000_value_to_register): Likewise.
6547         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6548
6549 2017-05-21  Tom Tromey  <tom@tromey.com>
6550
6551         PR rust/21466:
6552         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6553         arrays as "[T]", not "[T; ]".
6554
6555 2017-05-19  Tom Tromey  <tom@tromey.com>
6556
6557         PR rust/21484:
6558         * rust-lang.c (exp_descriptor_rust): New function.
6559         (rust_language_defn): Use it.
6560         * p-lang.c (pascal_language_defn): Update.
6561         * opencl-lang.c (opencl_language_defn): Update.
6562         * objc-lang.c (objc_language_defn): Update.
6563         * m2-lang.c (m2_language_defn): Update.
6564         * language.h (struct language_defn)
6565         <la_watch_location_expression>: New member.
6566         * language.c (unknown_language_defn, auto_language_defn)
6567         (local_language_defn): Update.
6568         * go-lang.c (go_language_defn): Update.
6569         * f-lang.c (f_language_defn): Update.
6570         * d-lang.c (d_language_defn): Update.
6571         * c-lang.h (c_watch_location_expression): Declare.
6572         * c-lang.c (c_watch_location_expression): New function.
6573         (c_language_defn, cplus_language_defn, asm_language_defn)
6574         (minimal_language_defn): Use it.
6575         * breakpoint.c (watch_command_1): Call
6576         la_watch_location_expression.
6577         * ada-lang.c (ada_language_defn): Update.
6578
6579 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6580
6581         PR tui/21482
6582         * gdb_curses.h (NOMACROS): Define.
6583         (NCURSES_NOMACROS): Define.
6584
6585 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6586
6587         PR tui/21482
6588         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6589         arg to char *.
6590         * tui/tui-wingeneral.c (box_win): Likewise.
6591         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6592         (tui_show_source_line): Likewise.
6593         (tui_show_exec_info_content): Likewise.
6594
6595 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6596
6597         * sparc-tdep.c (sparc_structure_return_p)
6598         (sparc_arg_on_registers_p): New functions.
6599         (sparc32_store_arguments): Use them.
6600         * sparc64-tdep.c (sparc64_16_byte_align_p)
6601         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6602         Handle TYPE_CODE_ARRAY.
6603
6604 2017-05-17  Yao Qi  <yao.qi@linaro.org>
6605
6606         * cli/cli-decode.c (add_alias_cmd): New function.
6607         * command.h (add_alias_cmd): Declare.
6608         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6609         instead call add_alias_cmd.
6610
6611 2017-05-17  Pedro Alves  <palves@redhat.com>
6612
6613         * Makefile.in (nat_extra_makefile_frag): Rename to ...
6614         (nat_makefile_frag): ... this.  All references updated.
6615         * configure.ac: Likewise.
6616         * configure.nat: Likewise.  Enhance comments.
6617         * configure: Regenerate.
6618
6619 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6620
6621         * procfs.c (procfs_create_inferior): Change prototype to match
6622         definition.
6623
6624 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6625
6626         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6627         C++ compiler warning.
6628
6629 2017-05-12  Tom Tromey  <tom@tromey.com>
6630
6631         PR rust/21483:
6632         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6633         recurse, just call value_struct_elt directly.
6634
6635 2017-05-12  Tom Tromey  <tom@tromey.com>
6636
6637         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6638         OP_RUST_ARRAY>: Fix.
6639
6640 2017-05-12  Tom Tromey  <tom@tromey.com>
6641
6642         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6643
6644 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6645
6646         * regcache.c: Include <forward_list>.
6647         (struct regcache_list): Remove.
6648         (current_regcache): Update.
6649         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6650         (regcache_thread_ptid_changed): Likewise.
6651         (registers_changed_ptid): Likewise.
6652         (current_regcache_size): Likewise.
6653
6654 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6655
6656         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6657         (current_regcache_size): New function.
6658         (current_regcache_test): New function.
6659         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6660
6661 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6662
6663         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6664         (print_gp_register_row): Use get_frame_register_value.
6665
6666 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6667
6668         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6669         (mips_supply_fpregset): Likewise.
6670         (mips64_supply_gregset): Likewise.
6671
6672 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6673
6674         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6675         regcache->raw_supply_zeroed.
6676
6677 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6678
6679         * configure.nat: Rearrange 'case' statements to match
6680         host before cpu.
6681
6682 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6683
6684         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6685         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6686         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6687         "@nat_extra_makefile_frag@".
6688         (Makefile): Remove dependency on "@frags@".
6689         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6690         (data-directory/Makefile): Likewise.
6691         * config/aarch64/linux.mh: Deleted; moved contents to
6692         "gdb/configure.nat".
6693         * config/alpha/alpha-linux.mh: Likewise.
6694         * config/alpha/nbsd.mh: Likewise.
6695         * config/arm/linux.mh: Likewise.
6696         * config/arm/nbsdelf.mh: Likewise.
6697         * config/i386/cygwin.mh: Likewise.
6698         * config/i386/cygwin64.mh: Likewise.
6699         * config/i386/darwin.mh: Likewise.
6700         * config/i386/fbsd.mh: Likewise.
6701         * config/i386/fbsd64.mh: Likewise.
6702         * config/i386/go32.mh: Likewise.
6703         * config/i386/i386gnu.mh: Likewise.
6704         * config/i386/i386sol2.mh: Likewise.
6705         * config/i386/linux.mh: Likewise.
6706         * config/i386/linux64.mh: Likewise.
6707         * config/i386/mingw.mh: Likewise.
6708         * config/i386/mingw64.mh: Likewise.
6709         * config/i386/nbsd64.mh: Likewise.
6710         * config/i386/nbsdelf.mh: Likewise.
6711         * config/i386/nto.mh: Likewise.
6712         * config/i386/obsd.mh: Likewise.
6713         * config/i386/obsd64.mh: Likewise.
6714         * config/i386/sol2-64.mh: Likewise.
6715         * config/ia64/linux.mh: Likewise.
6716         * config/m32r/linux.mh: Likewise.
6717         * config/m68k/linux.mh: Likewise.
6718         * config/m68k/nbsdelf.mh: Likewise.
6719         * config/m68k/obsd.mh: Likewise.
6720         * config/m88k/obsd.mh: Likewise.
6721         * config/mips/fbsd.mh: Likewise.
6722         * config/mips/linux.mh: Likewise.
6723         * config/mips/nbsd.mh: Likewise.
6724         * config/mips/obsd64.mh: Likewise.
6725         * config/pa/linux.mh: Likewise.
6726         * config/pa/nbsd.mh: Likewise.
6727         * config/pa/obsd.mh: Likewise.
6728         * config/powerpc/aix.mh: Likewise.
6729         * config/powerpc/fbsd.mh: Likewise.
6730         * config/powerpc/linux.mh: Likewise.
6731         * config/powerpc/nbsd.mh: Likewise.
6732         * config/powerpc/obsd.mh: Likewise.
6733         * config/powerpc/ppc64-linux.mh: Likewise.
6734         * config/powerpc/spu-linux.mh: Likewise.
6735         * config/s390/linux.mh: Likewise.
6736         * config/sh/nbsd.mh: Likewise.
6737         * config/sparc/fbsd.mh: Likewise.
6738         * config/sparc/linux.mh: Likewise.
6739         * config/sparc/linux64.mh: Likewise.
6740         * config/sparc/nbsd64.mh: Likewise.
6741         * config/sparc/nbsdelf.mh: Likewise.
6742         * config/sparc/obsd64.mh: Likewise.
6743         * config/sparc/sol2.mh: Likewise.
6744         * config/tilegx/linux.mh: Likewise.
6745         * config/vax/nbsdelf.mh: Likewise.
6746         * config/vax/obsd.mh: Likewise.
6747         * config/xtensa/linux.mh: Likewise.
6748         * config/i386/i386gnu.mn: New file, with excerpts from
6749         "config/i386/i386gnu.mh".
6750         * configure: Regenerate.
6751         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6752         *.mh files under "gdb/config".
6753         * configure.nat: New file, with contents from the
6754         "gdb/config/*/*.mh" files.
6755
6756 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6757
6758         * btrace.c (btrace_clear): Free insn vector.
6759
6760 2017-05-05  Pedro Alves  <palves@redhat.com>
6761
6762         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6763         * configure: Regenerate.
6764
6765 2017-05-04  Pedro Alves  <palves@redhat.com>
6766
6767         * Makefile.in (SFILES): Add progspace-and-thread.c.
6768         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6769         (COMMON_OBS): Add progspace-and-thread.o.
6770         * breakpoint.c: Include "progspace-and-thread.h".
6771         (update_inserted_breakpoint_locations)
6772         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6773         Use scoped_restore_current_pspace_and_thread.
6774         (create_std_terminate_master_breakpoint): Use
6775         scoped_restore_current_program_space.
6776         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6777         (print_breakpoint_location): Use
6778         scoped_restore_current_program_space.
6779         (bp_loc_is_permanent): Use
6780         scoped_restore_current_pspace_and_thread.
6781         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6782         (download_tracepoint_locations): Use
6783         scoped_restore_current_pspace_and_thread.
6784         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6785         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6786         (enum step_over_calls_kind): Moved from inferior.h.
6787         (class scoped_restore_current_thread): New class.
6788         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6789         declaration.
6790         (scoped_restore_current_thread): New class.
6791         * infcmd.c: Include "common/gdb_optional.h".
6792         (continue_1, proceed_after_attach): Use
6793         scoped_restore_current_thread.
6794         (notice_new_inferior): Use scoped_restore_current_thread.
6795         * inferior.c: Include "progspace-and-thread.h".
6796         (restore_inferior, save_current_inferior): Delete.
6797         (add_inferior_command, clone_inferior_command): Use
6798         scoped_restore_current_pspace_and_thread.
6799         * inferior.h (scoped_restore_current_inferior): New class.
6800         * infrun.c: Include "progspace-and-thread.h" and
6801         "common/gdb_optional.h".
6802         (follow_fork_inferior): Use
6803         scoped_restore_current_pspace_and_thread.
6804         (scoped_restore_exited_inferior): New class.
6805         (handle_vfork_child_exec_or_exit): Use
6806         scoped_restore_exited_inferior,
6807         scoped_restore_current_pspace_and_thread,
6808         scoped_restore_current_thread and scoped_restore.
6809         (fetch_inferior_event): Use scoped_restore_current_thread.
6810         * linespec.c (decode_line_full, decode_line_1): Use
6811         scoped_restore_current_program_space.
6812         * mi/mi-main.c: Include "progspace-and-thread.h".
6813         (exec_continue): Use scoped_restore_current_thread.
6814         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6815         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6816         * proc-service.c (ps_pglobal_lookup): Use
6817         scoped_restore_current_program_space.
6818         * progspace-and-thread.c: New file.
6819         * progspace-and-thread.h: New file.
6820         * progspace.c (release_program_space, clone_program_space): Use
6821         scoped_restore_current_program_space.
6822         (restore_program_space, save_current_program_space)
6823         (save_current_space_and_thread): Delete.
6824         (switch_to_program_space_and_thread): Moved to
6825         progspace-and-thread.c.
6826         * progspace.h (save_current_program_space)
6827         (save_current_space_and_thread): Delete declarations.
6828         (scoped_restore_current_program_space): New class.
6829         * remote.c (remote_btrace_maybe_reopen): Use
6830         scoped_restore_current_thread.
6831         * symtab.c: Include "progspace-and-thread.h".
6832         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6833         * thread.c (print_thread_info_1): Use
6834         scoped_restore_current_thread.
6835         (struct current_thread_cleanup): Delete.
6836         (do_restore_current_thread_cleanup)
6837         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6838         (scoped_restore_current_thread::~scoped_restore_current_thread):
6839         ... this new dtor.
6840         (make_cleanup_restore_current_thread): Rename/convert to ...
6841         (scoped_restore_current_thread::scoped_restore_current_thread):
6842         ... this new ctor.
6843         (thread_apply_all_command): Use scoped_restore_current_thread.
6844         (thread_apply_command): Use scoped_restore_current_thread.
6845         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6846         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6847
6848 2017-05-04  Pedro Alves  <palves@redhat.com>
6849
6850         * thread.c (make_cleanup_restore_current_thread): Move
6851         find_thread_ptid call before the is_stopped call.  Assert that the
6852         thread is found.  Replace is_stopped call by checking the thread's
6853         state directly.  Remove unnecessary NULL-thread check.
6854
6855 2017-05-04  Pedro Alves  <palves@redhat.com>
6856
6857         * corelow.c (thread_section_name): New class.
6858         (get_core_register_section, get_core_siginfo): Use it.
6859
6860 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6861
6862         * corelow.c (sniff_core_bfd): Remove extra semicolon.
6863         (get_core_register_section): Remove xfree of NULL pointer.
6864
6865 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
6866
6867         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6868         * regcache.c (regcache::raw_supply_zeroed): New function.
6869         * regcache.h (regcache::raw_supply_zeroed): New declaration.
6870
6871 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6872
6873         * gdbarch.sh: Remove commented out definition of
6874         TARGET_CHAR_BIT.
6875         * gdbarch.h: Re-generate.
6876
6877 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
6878
6879         * configure: Regenerate.
6880
6881 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
6882
6883         * solib-target.c (solib_target_relocate_section_addresses):
6884         Remove num_section_bases, num_bases, segment_bases variables.
6885
6886 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6887
6888         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6889
6890 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6891
6892         * solib-target.c: Include <vector>
6893         (struct lm_info_target) <~lm_info_target>: Remove.
6894         <segment_bases, section_bases>: Change type to
6895         std::vector<CORE_ADDR>.
6896         (library_list_start_segment, library_list_start_section,
6897         library_list_end_library,
6898         solib_target_relocate_section_addresses): Adjust.
6899
6900 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6901
6902         * gdbarch.sh (software_single_step): Change return type to
6903         std::vector<CORE_ADDR>.
6904         * gdbarch.c, gdbarch.h: Re-generate.
6905         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6906         Adjust.
6907         (arm_deal_with_atomic_sequence_raw): Adjust.
6908         (thumb_get_next_pcs_raw): Adjust.
6909         (arm_get_next_pcs_raw): Adjust.
6910         (arm_get_next_pcs): Adjust.
6911         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6912         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6913         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6914         (alpha_software_single_step): Adjust.
6915         * alpha-tdep.h (alpha_software_single_step): Adjust.
6916         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6917         * arm-tdep.c (arm_software_single_step): Adjust.
6918         (arm_breakpoint_kind_from_current_state): Adjust.
6919         * arm-tdep.h (arm_software_single_step): Adjust.
6920         * breakpoint.c (insert_single_step_breakpoint): Adjust.
6921         * cris-tdep.c (cris_software_single_step): Adjust.
6922         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6923         (micromips_deal_with_atomic_sequence): Adjust.
6924         (deal_with_atomic_sequence): Adjust.
6925         (mips_software_single_step): Adjust.
6926         * mips-tdep.h (mips_software_single_step): Adjust.
6927         * moxie-tdep.c (moxie_software_single_step): Adjust.
6928         * nios2-tdep.c (nios2_software_single_step): Adjust.
6929         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6930         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6931         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6932         * s390-linux-tdep.c (s390_software_single_step): Adjust.
6933         * sparc-tdep.c (sparc_software_single_step): Adjust.
6934         * spu-tdep.c (spu_software_single_step): Adjust.
6935         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6936
6937 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6938
6939         * gdbarch.sh: Use semi-colon as field separator instead of colon.
6940         * gdbarch.h: Re-generate.
6941
6942 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6943
6944         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6945         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6946         * python/py-instruction.c, python/py-instruction.h: New file.
6947         * python/py-record.c: Add py-instruction.h include.
6948         (gdbpy_initialize_record): Make gdb.Instruction a super class of
6949         gdb.RecordInstruction.
6950         * python/python-internal.h: Add gdbpy_initialize_instruction
6951         declaration.
6952         * python/python.c (do_start_initialization): Add
6953         gdbpy_initialize_instruction.
6954
6955 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6956
6957         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6958         Remove.
6959         (btrace_func_from_recpy_func): New function.
6960         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6961         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6962         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6963         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6964         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6965         Also, use new helper functions.
6966         (btpy_list_item): Use new helper functions.
6967         (recpy_bt_function_call_history): Use new type name.
6968         (btpy_call_getset): Remove.
6969         (gdbpy_initialize_btrace): Remove code to initialize
6970         gdb.BtraceFunctionCall.
6971         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6972         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6973         recpy_bt_func_prev, recpy_bt_func_next): New export.
6974         * python/py-record.c (recpy_func_type): New static object.
6975         (recpy_func_new, recpy_func_level, recpy_func_symbol,
6976         recpy_func_instructions, recpy_func_up, recpy_func_prev,
6977         recpy_func_next): New function.
6978         (recpy_element_hash, recpy_element_richcompare): Updated comment.
6979         (recpy_func_getset): New static object.
6980         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6981         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6982
6983 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6984
6985         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6986         (btpy_object, btpy_insn_type, btpy_new): Remove.
6987         (btpy_list_object): Use gdb.RecordInstruction type instead of
6988         gdb.BtraceInstruction type.
6989         (btrace_insn_from_recpy_insn): New function.
6990         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6991         btpy_new.
6992         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6993         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6994         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6995         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6996         instead of btpy_object.
6997         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6998         btpy_insn_data, btpy_insn_decode): Rename to ...
6999         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7000         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7001         recpy_bt_insn_decode): This.  Also, use new helper functions.
7002         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7003         recpy_insn_type.
7004         (btpy_insn_getset): Remove.
7005         (gdbpy_initialize_btrace): Remove code to initialize
7006         gdb.BtraceInstruction.  Use recpy_element_object.
7007         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7008         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7009         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7010         * python/py-record.c (recpy_insn_type): New static object.
7011         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7012         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7013         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7014         New function.
7015         (recpy_insn_getset): New static object.
7016         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7017         * python/py-record.h (recpy_element_object): New typedef.
7018         (recpy_insn_type, recpy_insn_new): New export.
7019
7020 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7021
7022         * py-record-btrace.c (btpy_insn_new): Removed.
7023         (btpy_insn_or_gap_new): New function.
7024         (btpy_insn_error): Removed.
7025         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7026         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7027         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7028         btpy_insn_or_gap_new instead of btpy_insn_new.
7029         (btpy_insn_getset): Remove btpy_insn_error.
7030         * py-record.c (recpy_gap_type): New static object.
7031         (recpy_gap_object): New typedef.
7032         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7033         recpy_gap_reason_string): New function.
7034         (recpy_gap_getset): New static object.
7035         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7036         * py-record.h (recpy_gap_new): New export.
7037
7038 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7039
7040         * python/py-record.c (recpy_ptid): Remove.
7041         (recpy_record_getset): Remove recpy_ptid.
7042
7043 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7044
7045         * btrace.c (btrace_fetch): Set inferior_ptid.
7046         * python/py-record-btrace.c: Add "py-record.h" include.
7047         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7048         recpy_bt_end, recpy_bt_instruction_history,
7049         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7050         in gdb.Record object instead of current ptid.
7051         * python/py-record.c: Include new "py-record.h" file.
7052         (recpy_record_object): Moved to py-record.h.
7053         * python/py-record.h: New file.
7054
7055 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7056
7057         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7058         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7059         indentation.
7060
7061 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7062
7063         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7064         the past maintainers section.
7065
7066 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7067
7068         * infcmd.c (get_return_value): Use regcache ctor, and remove
7069         cleanup.
7070
7071 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7072             Pedro Alves  <palves@redhat.com>
7073
7074         * regcache.c (regcache::regcache): New tag dispatch ctor.
7075         (do_cooked_read): Moved above.
7076         (regcache_dup): Use the tag dispatch ctor..
7077         * regcache.h (regcache): Declare ctor, delete copy ctor and
7078         assignment operator, remove friend regcache_dup.
7079
7080 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7081
7082         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7083         call method save instead of regcache_cpy.
7084         * regcache.h (struct regcache): Make regcache_dup a friend.
7085
7086 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7087
7088         * regcache.c (struct regcache): Move to regcache.h
7089         (regcache::arch): New method.
7090         (regcache_get_ptid): Update.
7091         (get_regcache_arch): Call arch method.
7092         (get_regcache_aspace): Call method aspace.
7093         (register_buffer): Change it to method.
7094         (regcache_save): Change it to regcache::save.
7095         (regcache_restore): Likewise.
7096         (regcache_cpy_no_passthrough): Remove the declaration.
7097         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7098         (regcache_cpy_no_passthrough): Change it to method
7099         cpy_no_passthrough.
7100         (regcache_register_status): Change it to method
7101         get_register_status.
7102         (regcache_invalidate): Change it to method invalidate.
7103         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7104         (regcache_raw_update): Change it to method raw_update.
7105         (regcache_raw_read): Likewise.
7106         (regcache_raw_read_signed): Likewise.
7107         (regcache_raw_read_unsigned): Likewise.
7108         (regcache_raw_write_signed): Likewise.
7109         (regcache_raw_write_unsigned): Likewise.
7110         (regcache_cooked_read): Likewise.
7111         (regcache_cooked_read_value): Likewise.
7112         (regcache_cooked_read_signed): Likewise.
7113         (regcache_cooked_read_unsigned): Likewise.
7114         (regcache_cooked_write_signed): Likewise.
7115         (regcache_cooked_write_unsigned): Likewise.
7116         (regcache_raw_set_cached_value): Likewise.
7117         (regcache_raw_write): Likewise.
7118         (regcache_cooked_write): Likewise.
7119         (regcache_xfer_part): Likewise.
7120         (regcache_raw_read_part): Likewise.
7121         (regcache_raw_write_part): Likewise.
7122         (regcache_cooked_read_part): Likewise.
7123         (regcache_cooked_write_part): Likewise.
7124         (regcache_raw_supply): Likewise.
7125         (regcache_raw_collect): Likewise.
7126         (regcache_transfer_regset): Likewise.
7127         (regcache_supply_regset): Likewise.
7128         (regcache_collect_regset): Likewise.
7129         (regcache_debug_print_register): Likewise.
7130         (enum regcache_dump_what): Move it to regcache.h.
7131         (regcache_dump): Change it to method dump.
7132         * regcache.h (enum regcache_dump_what): New.
7133         (class regcache): New.
7134         * target.c (target_fetch_registers): Call method
7135         debug_print_register.
7136         (target_store_registers): Likewise.
7137
7138 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7139
7140         * windows-nat.c (struct lm_info_windows): Initialize field.
7141         (windows_make_so): Allocate lm_info_windows with new.
7142         (windows_free_so): Free lm_info_windows with delete.
7143
7144 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7145
7146         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7147         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7148         cleanup.
7149         (darwin_free_so): Free lm_info_darwin with delete.
7150
7151 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7152
7153         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7154         <l_addr_p>: Change type to bool.
7155         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7156         (svr4_free_so): Free lm_info_svr4 with delete.
7157         (svr4_copy_library_list): Replace memcpy with call to copy
7158         constructor.
7159         (library_list_start_library, svr4_default_sos): Allocate
7160         lm_info_svr4 with new.
7161
7162 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7163
7164         * solib-target.c (struct lm_info_target): Add destructor,
7165         initialize fields.
7166         <name>: Change type to std::string.
7167         (library_list_start_library): Allocate lm_info_target with new.
7168         (solib_target_free_library_list): Free lm_info_target with
7169         delete.
7170         (solib_target_current_sos): Adapt to std::string.
7171         (solib_target_free_so): Free lm_info_target with delete.
7172
7173 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7174
7175         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7176         fields.
7177         (frv_current_sos): Allocate lm_info_frv with new.
7178         (frv_relocate_main_executable): Free lm_info_frv with delete,
7179         allocate with new.
7180         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7181
7182 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7183
7184         * solib-frv.c (struct lm_info_frv): Fix indentation.
7185
7186 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7187
7188         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7189         map field.
7190         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7191         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7192         and allocate with new.
7193         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7194
7195 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7196
7197         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7198         <filename, member_name>: Change type to std::string.
7199         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7200         (library_list_start_library): Allocate lm_info_aix with new.
7201         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7202         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7203         with copy constructor.
7204
7205 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7206
7207         * solist.h (struct lm_info): Remove.
7208         (struct lm_info_base): New class.
7209         (struct so_list) <lm_info>: Change type to lm_info_base *.
7210         * nto-tdep.c (struct lm_info): Remove.
7211         (lm_addr): Adjust.
7212         * solib-aix.c (struct lm_info): Rename to ...
7213         (struct lm_info_aix): ... this.  Extend lm_info_base.
7214         (lm_info_p): Rename to ...
7215         (lm_info_aix_p): ... this, and adjust.
7216         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7217         solib_aix_parse_libraries, library_list_start_library,
7218         solib_aix_free_library_list, solib_aix_parse_libraries,
7219         solib_aix_get_library_list,
7220         solib_aix_relocate_section_addresses, solib_aix_free_so,
7221         solib_aix_get_section_offsets,
7222         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7223         Adjust.
7224         (struct solib_aix_inferior_data) <library_list>: Adjust.
7225         * solib-darwin.c (struct lm_info): Rename to ...
7226         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7227         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7228         * solib-dsbt.c (struct lm_info): Rename to ...
7229         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7230         (struct dsbt_info) <main_executable_lm_info): Adjust.
7231         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7232         dsbt_relocate_section_addresses): Adjust.
7233         * solib-frv.c (struct lm_info): Rename to ...
7234         (struct lm_info_frv): ... this.  Extend lm_info_base.
7235         (main_executable_lm_info): Adjust.
7236         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7237         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7238         find_canonical_descriptor_in_load_object,
7239         frv_fdpic_find_canonical_descriptor): Adjust.
7240         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7241         to lm_info_svr4.
7242         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7243         svr4_clear_so, svr4_copy_library_list,
7244         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7245         svr4_current_sos, svr4_fetch_objfile_link_map,
7246         solist_update_incremental): Adjust.
7247         * solib-svr4.h (struct lm_info_svr4): Move here from
7248         solib-svr4.c.
7249         * solib-target.c (struct lm_info): Rename to ...
7250         (struct lm_info_target): ... this.  Extend lm_info_base.
7251         (lm_info_p): Rename to ...
7252         (lm_info_target_p): ... this.
7253         (solib_target_parse_libraries, library_list_start_segment,
7254         library_list_start_section, library_list_start_library,
7255         library_list_end_library, solib_target_free_library_list,
7256         solib_target_current_sos, solib_target_free_so,
7257         solib_target_relocate_section_addresses): Adjust.
7258         * windows-nat.c (struct lm_info): Rename to ...
7259         (struct lm_info_windows): ... this.  Extend lm_info_base.
7260         (windows_make_so, handle_load_dll, handle_unload_dll,
7261         windows_xfer_shared_libraries): Adjust.
7262
7263 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7264
7265         * solib-darwin.c (struct darwin_so_list): Remove.
7266         (darwin_current_sos): Allocate an so_list object instead of a
7267         darwin_so_list, separately allocate an lm_info object.
7268         (darwin_free_so): Free lm_info.
7269
7270 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7271
7272         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7273         with fprintf_filtered.
7274
7275 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7276
7277         * regcache.c (regcache::regcache): New function.
7278         (regcache::~regcache): New function.
7279         (regcache_xmalloc_1): Remove.
7280         (regcache_xmalloc): Call new regcache.
7281         (regcache_xfree): Call delete regcache.
7282         (get_thread_arch_aspace_regcache): Call new regcache.
7283
7284 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7285
7286         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7287         lwp instead of ptid_get_lwp.
7288
7289 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7290
7291         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7292         lwp_info instead of getting from inferior_ptid.
7293
7294 2017-04-27  Keith Seitz  <keiths@redhat.com>
7295
7296         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7297         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7298         (CV_CONVERSION_BADNESS): Define.
7299         (rank_one_type): Remove overly restrictive rvalue reference
7300         rank checks.
7301         Add cv-qualifier checks and subranks for type equality.
7302         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7303         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7304         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7305
7306 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7307
7308         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7309         count when creating the object.
7310
7311 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7312             Ulrich Weigand  <uweigand@de.ibm.com>
7313
7314         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7315         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7316         is used in AIX.
7317         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7318         (process_xcoff_symbol): Likewise.
7319         (scan_xcoff_symtab): Likewise.
7320
7321 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7322
7323         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7324         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7325         (ia64_access_reg): Use get_frame_register_unsigned.
7326         (ia64_access_rse_reg): Likewise.
7327         (ia64_libunwind_frame_prev_register): Likewise.
7328
7329 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7330
7331         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7332         * gdbarch.c: Regenerated.
7333         * gdbarch.h: Regenerated.
7334         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7335         visibility external.
7336         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7337         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7338         (enum cfa_how_kind): Move to ...
7339         (struct dwarf2_frame_state_reg_info): Likewise.
7340         (struct dwarf2_frame_state): Likewise.
7341         * dwarf2-frame.h: ... here.
7342         (dwarf2_frame_state_alloc_regs): New declaration.
7343         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7344         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7345
7346 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7347
7348         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7349         regcache_raw_read_unsigned.
7350         (xtensa_pseudo_register_write): Likewise.
7351
7352 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7353
7354         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7355         (nds32_pseudo_register_write): Likewise.
7356
7357 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7358
7359         * regcache.c (struct regcache) <readonly_p>: Change its type
7360         to bool.
7361         (regcache_xmalloc_1): Update parameter type and callers update.
7362
7363 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7364
7365         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7366         set_gdbarch_wchar_bit.
7367         * arm-tdep.c (arm_gdbarch_init): Likewise.
7368
7369 2017-04-25  Pedro Alves  <palves@redhat.com>
7370
7371         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7372         (BothAreRelocatable, memcopy, memmove): Don't define.
7373         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7374         macros.
7375
7376 2017-04-25  Pedro Alves  <palves@redhat.com>
7377
7378         * common/common-defs.h: Include "common/poison.h".
7379         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7380         and adjust.
7381         * common/poison.h: New file.
7382         * common/traits.h: Include <type_traits>.
7383         (Not, Or, Requires): New, moved from common/function-view.h.
7384
7385 2017-04-25  Pedro Alves  <palves@redhat.com>
7386
7387         * breakpoint.h (struct breakpoint): In-class initialize all
7388         fields.  Make boolean fields "bool".
7389         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7390         memset call and initializations no longer necessary.
7391
7392 2017-04-25  Pedro Alves  <palves@redhat.com>
7393
7394         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7395         reference.
7396         (pt_btrace_insn): New function.
7397         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7398
7399 2017-04-25  Pedro Alves  <palves@redhat.com>
7400
7401         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7402         "base" field and inherit from "bp_location" instead.  Add
7403         non-default ctor.
7404         (allocate_location_exception): Use new non-default ctor.
7405         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7406         (init_bp_location): Convert to ...
7407         (bp_location::bp_location): ... this new ctor, and remove memset
7408         call.
7409         (base_breakpoint_allocate_location): Use the new non-default ctor.
7410         * breakpoint.h (bp_location): Now a class.  Declare default and
7411         non-default ctors.  In-class initialize all members.
7412         (init_bp_location): Remove declaration.
7413
7414 2017-04-25  Pedro Alves  <palves@redhat.com>
7415
7416         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7417         assignment operator.
7418
7419 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7420
7421         * doublest.c (convert_doublest_to_floatformat): Call
7422         floatformat_totalsize_bytes.
7423
7424 2017-04-22  Tom Tromey  <tom@tromey.com>
7425
7426         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7427         ui_out_emit_list.
7428         * stack.c (print_frame): Use ui_out_emit_list.
7429         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7430         ui_out_emit_list.
7431         * mi/mi-main.c (print_one_inferior)
7432         (mi_cmd_data_list_register_names)
7433         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7434         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7435         ui_out_emit_list.
7436         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7437         (mi_output_solib_attribs): Use ui_out_emit_list,
7438         ui_out_emit_tuple.
7439         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7440         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7441         (mi_cmd_stack_list_args, list_args_or_locals): Use
7442         ui_out_emit_list.
7443         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7444         * breakpoint.c (print_solib_event, output_thread_groups): Use
7445         ui_out_emit_list.
7446
7447 2017-04-22  Tom Tromey  <tom@tromey.com>
7448
7449         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7450         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7451         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7452
7453 2017-04-22  Tom Tromey  <tom@tromey.com>
7454
7455         * tracepoint.c (tvariables_info_1)
7456         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7457
7458 2017-04-22  Tom Tromey  <tom@tromey.com>
7459
7460         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7461         annotate_arg_emitter.
7462         * breakpoint.c (print_mention_watchpoint)
7463         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7464         * annotate.h (struct annotate_arg_emitter): New.
7465
7466 2017-04-22  Tom Tromey  <tom@tromey.com>
7467
7468         * record-btrace.c (record_btrace_insn_history)
7469         (record_btrace_insn_history_range, record_btrace_call_history)
7470         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7471         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7472         ui_out_emit_tuple.
7473         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7474         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7475         * skip.c (skip_info): Use ui_out_emit_tuple.
7476         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7477         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7478         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7479         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7480         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7481         ui_out_emit_tuple.
7482         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7483         (output_register, mi_cmd_data_read_memory)
7484         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7485         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7486         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7487         Use ui_out_emit_tuple.
7488         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7489         ui_out_emit_tuple.
7490         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7491         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7492         * linux-thread-db.c (info_auto_load_libthread_db): Use
7493         ui_out_emit_tuple.
7494         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7495         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7496         * disasm.c (do_mixed_source_and_assembly_deprecated)
7497         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7498         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7499         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7500         * breakpoint.c (print_one_breakpoint_location)
7501         (print_one_breakpoint): Use ui_out_emit_tuple.
7502         * auto-load.c (print_script, info_auto_load_cmd): Use
7503         ui_out_emit_tuple.
7504         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7505
7506 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
7507
7508         * thread.c (print_thread_info_1): Remove dead code.
7509
7510 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7511
7512         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7513         GDB_SELF_TEST.
7514         * arm-tdep.c (selftests::arm_record_test): Likewise.
7515
7516 2017-04-21  Yao Qi  <yao.qi@linaro.org>
7517
7518         * regcache.c (regcache_restore): Remove argument 2.  Replace
7519         argument 3 with regcache.  Get register status from
7520         src->register_status and get register contents from
7521         register_buffer (src, regnum).
7522         (regcache_cpy): Update.
7523
7524 2017-04-19  Pedro Alves  <palves@redhat.com>
7525
7526         * gdbthread.h (thread): Add missing closing parenthesis in
7527         comment.
7528
7529 2017-04-19  Pedro Alves  <palves@redhat.com>
7530
7531         * common/refcounted-object.h: New file.
7532         * gdbthread.h: Include "common/refcounted-object.h".
7533         (thread_info): Inherit from refcounted_object and add comments.
7534         (thread_info::incref, thread_info::decref)
7535         (thread_info::m_refcount): Delete.
7536         (thread_info::deletable): Use the refcounted_object::refcount()
7537         method.
7538         * inferior.c (current_inferior_): Add comment.
7539         (set_current_inferior): Increment/decrement refcounts.
7540         (prune_inferiors, remove_inferior_command): Skip inferiors marked
7541         not-deletable instead of comparing with the current inferior.
7542         (initialize_inferiors): Increment the initial inferior's refcount.
7543         * inferior.h (struct inferior): Forward declare.
7544         Include "common/refcounted-object.h".
7545         (current_inferior, set_current_inferior): Move declaration to
7546         before struct inferior's definition, and fix comment.
7547         (inferior): Inherit from refcounted_object.  Add comments.
7548         * thread.c (switch_to_thread_no_regs): Reference the thread's
7549         inferior pointer directly instead of doing a ptid lookup.
7550         (switch_to_no_thread): New function.
7551         (switch_to_thread(thread_info *)): New function, factored out
7552         from ...
7553         (switch_to_thread(ptid_t)): ... this.
7554         (restore_current_thread): Delete.
7555         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7556         fields, and add 'inf' field.
7557         (do_restore_current_thread_cleanup): Check whether old->inf is
7558         alive instead of looking up an inferior by ptid.  Use
7559         switch_to_thread and switch_to_no_thread.
7560         (restore_current_thread_cleanup_dtor): Use old->inf directly
7561         instead of lookup up an inferior by id.  Decref the inferior.
7562         Don't restore 'removable'.
7563         (make_cleanup_restore_current_thread): Same the inferior pointer
7564         in old, instead of the inferior number.  Incref the inferior.
7565         Don't save/clear 'removable'.
7566
7567 2017-04-19  Pedro Alves  <palves@redhat.com>
7568
7569         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7570         unittests/scoped_restore-selftests.c.
7571         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7572         * common/scoped_restore.h (scoped_restore_base): Make "class".
7573         (scoped_restore_base::release): New public method.
7574         (scoped_restore_base::scoped_restore_base): New protected ctor.
7575         (scoped_restore_base::m_saved_var): New protected field.
7576         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7577         scoped_restore_base base class instead of m_saved_var directly.
7578         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7579         (scoped_restore_tmpl::scoped_restore_tmpl(const
7580         scoped_restore_tmpl<T>&)): Likewise.
7581         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7582         method.
7583         (scoped_restore_tmpl::saved_var): New method.
7584         (scoped_restore_tmpl::m_saved_var): Delete.
7585         * inferior.h (inferior::detaching): Now a bool.
7586         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7587         cleanup.
7588         * unittests/scoped_restore-selftests.c: New file.
7589
7590 2017-04-19  Pedro Alves  <palves@redhat.com>
7591
7592         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7593         Re-sort in alphabetic order.
7594
7595 2017-04-18  Pedro Alves  <palves@redhat.com>
7596
7597         * xml-support.c (obstack_xml_printf): Delete.
7598         * xml-support.h (obstack_xml_printf): Delete.
7599
7600 2017-04-18  Pedro Alves  <palves@redhat.com>
7601
7602         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7603         vdebug, verror, body_text, start_element, end_element, name,
7604         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7605         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7606         is_xinclude>: Make private and add m_ prefix.
7607         (gdb_xml_parser::body_text): New method, based on ...
7608         (gdb_xml_body_text): ... this.  Adjust.
7609         (gdb_xml_parser::vdebug): New method, based on ...
7610         (gdb_xml_debug): ... this.  Adjust.
7611         (gdb_xml_parser::verror): New method, based on ...
7612         (gdb_xml_error): ... this.  Adjust.
7613         (gdb_xml_parser::start_element): New method, based on ...
7614         (gdb_xml_start_element): ... this.  Adjust.
7615         (gdb_xml_start_element_wrapper): Defer to
7616         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7617         (gdb_xml_parser::end_element): New method, based on ...
7618         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7619         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7620         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7621         (gdb_xml_parser::use_dtd): New method, based on ...
7622         (gdb_xml_use_dtd): ... this.  Adjust.
7623         (gdb_xml_parser::parse): New method, based on ...
7624         (gdb_xml_parse): ... this.  Adjust.
7625         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7626         (xinclude_start_include): Adjust to call the parser's name method.
7627         (xml_xinclude_default, xml_xinclude_start_doctype)
7628         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7629         method.
7630         (xml_process_xincludes): Adjust to call parser methods.
7631         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7632         declarations.
7633
7634 2017-04-18  Pedro Alves  <palves@redhat.com>
7635
7636         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7637         gdb::optional<std::string>.
7638         * xml-support.c: Include <string>.
7639         (scope_level::scope_level(scope_level &&))
7640         (scope_level::~scope_level): Delete.
7641         (scope_level::body): Now a std::string.
7642         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7643         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7644         parameter.
7645         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7646         (xinclude_parsing_data::output): Now a std::string reference.
7647         (xinclude_start_include): Adjust.
7648         (xml_xinclude_default): Adjust.
7649         (xml_process_xincludes): Add 'output' parameter, and return bool.
7650         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7651         and return bool.
7652         * xml-tdesc.c: Include <unordered_map> and <string>.
7653         (tdesc_xml_cache): Delete.
7654         (tdesc_xml_cache_s): Delete.
7655         (xml_cache): Now an std::unordered_map.
7656         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7657         (target_fetch_description_xml): Change return type to
7658         gdb::optional<std::string>, and adjust.
7659         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7660         (target_fetch_description_xml): Change return type to
7661         gdb::optional<std::string>.
7662
7663 2017-04-18  Pedro Alves  <palves@redhat.com>
7664
7665         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7666         unittests/optional-selftests.c.
7667         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7668         * unittests/optional-selftests.c: New file.
7669         * unittests/optional/assignment/1.cc: New file.
7670         * unittests/optional/assignment/2.cc: New file.
7671         * unittests/optional/assignment/3.cc: New file.
7672         * unittests/optional/assignment/4.cc: New file.
7673         * unittests/optional/assignment/5.cc: New file.
7674         * unittests/optional/assignment/6.cc: New file.
7675         * unittests/optional/assignment/7.cc: New file.
7676         * unittests/optional/cons/copy.cc: New file.
7677         * unittests/optional/cons/default.cc: New file.
7678         * unittests/optional/cons/move.cc: New file.
7679         * unittests/optional/cons/value.cc: New file.
7680         * unittests/optional/in_place.cc: New file.
7681         * unittests/optional/observers/1.cc: New file.
7682         * unittests/optional/observers/2.cc: New file.
7683
7684 2017-04-18  Pedro Alves  <palves@redhat.com>
7685
7686         * common/gdb_optional.h: Include common/traits.h.
7687         (in_place_t): New type.
7688         (in_place): New constexpr variable.
7689         (optional::optional): Remove member initialization of
7690         m_instantiated.
7691         (optional::optional(in_place_t...)): New constructor.
7692         (optional::~optional): Use reset.
7693         (optional::optional(const optional&)): New.
7694         (optional::optional(const optional&&)): New.
7695         (optional::optional(T &)): New.
7696         (optional::optional(T &&)): New.
7697         (operator::operator=(const optional &)): New.
7698         (operator::operator=(optional &&)): New.
7699         (operator::operator= (const T &))
7700         (operator::operator= (T &&))
7701         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7702         (operator::reset): New.
7703         (operator::m_instantiated):: Add in-class initializer.
7704         * common/traits.h: Include <type_traits>.
7705         (struct And): New types.
7706
7707 2017-04-18  Pedro Alves  <palves@redhat.com>
7708
7709         * xml-support.c: Include <vector>.
7710         (scope_level::scope_level(const gdb_xml_element *))
7711         (scope_level::scope_level(scope_level&&)): New.
7712         (scope_level::~scope_level): New.
7713         (scope_level_s): Delete.
7714         (gdb_xml_parser::scopes): Now a std::vector.
7715         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7716         Use std::vector.
7717         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7718         scope cleanup code.
7719         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7720         of the scopes member.  Use std::vector::emplace_back.
7721
7722 2017-04-18  Pedro Alves  <palves@redhat.com>
7723
7724         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7725         a bool.
7726         (gdb_xml_end_element): Change type of first parameter.
7727         (gdb_xml_cleanup): Rename to ...
7728         (gdb_xml_parser::~gdb_xml_parser): ... this.
7729         (gdb_xml_create_parser_and_cleanup): Delete with ...
7730         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7731         to this new ctor.
7732         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7733         using gdb_xml_create_parser_and_cleanup.
7734         (xinclude_parsing_data): Add ctor/dtor.
7735         (xml_xinclude_cleanup): Delete.
7736         (xml_process_xincludes): Create a local xinclude_parsing_data
7737         instead of heap-allocating one.  Create a local gdb_xml_parser
7738         instead of heap-allocating one with
7739         gdb_xml_create_parser_and_cleanup.
7740
7741 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7742
7743         PR threads/20743
7744         * fbsd-nat.c (resume_one_thread_cb): Remove.
7745         (resume_all_threads_cb): Remove.
7746         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7747         iterate_over_threads.
7748
7749 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7750
7751         * NEWS: Create a new section for the next release branch.
7752         Rename the section of the current branch, now that it has
7753         been cut.
7754
7755 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7756
7757         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7758         * version.in: Bump version to 8.0.50.DATE-git.
7759
7760 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7761
7762         PR gdb/21385
7763         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7764         independently of the host, and fix build breakage on Cygwin.
7765
7766 2017-04-13  Pedro Alves  <palves@redhat.com>
7767
7768         * inferior.c (free_inferior): Convert to ...
7769         (inferior::~inferior): ... this dtor.
7770         (inferior::inferior): New ctor, factored out from ...
7771         (add_inferior_silent): ... here.  Allocate the inferior with a new
7772         expression.
7773         (delete_inferior): Call delete instead of free_inferior.
7774         * inferior.h (gdb_environ, continuation): Forward declare.
7775         (inferior): Now a class.  Add in-class initialization to all
7776         members.  Make boolean fields bool, except 'detaching'.
7777         (inferior::inferior): New explicit ctor.
7778         (inferior::~inferior): New.
7779
7780 2017-04-13  Pedro Alves  <palves@redhat.com>
7781
7782         * inferior.c (init_inferior_list): Delete.
7783         * inferior.h (init_inferior_list): Delete.
7784
7785 2017-04-13  Pedro Alves  <palves@redhat.com>
7786
7787         PR threads/13217
7788         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7789         (top level): Call it twice, with different thread sets.
7790
7791 2017-04-13  Pedro Alves  <palves@redhat.com>
7792
7793         * thread.c: Include <algorithm>.
7794         (thread_array_cleanup): Delete.
7795         (scoped_inc_dec_ref): New class.
7796         (live_threads_count): New function.
7797         (set_thread_refcount): Delete.
7798         (tp_array_compar_ascending): Now a bool.
7799         (tp_array_compar): Convert to a std::sort comparison function.
7800         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7801         and live_threads_count.
7802
7803 2017-04-13  Pedro Alves  <palves@redhat.com>
7804
7805         * infrun.c (follow_fork_inferior): Also switch the current
7806         inferior.
7807
7808 2017-04-13  Pedro Alves  <palves@redhat.com>
7809
7810         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7811         before calling create_internal_breakpoint.
7812
7813 2017-04-13  Pedro Alves  <palves@redhat.com>
7814
7815         * fork-child.c (execv_argv): New class.
7816         (breakup_args): Refactored as ...
7817         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7818         Copy arguments to storage and replace separators with NULL
7819         terminators in place.
7820         (escape_bang_in_quoted_argument): Adjust to return bool.
7821         (execv_argv::execv_argv): New ctor.
7822         (execv_argv::init_for_shell): New method, factored out from
7823         fork_inferior.  Don't strdup strings into the vector.
7824         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7825         Remove free_vector_argv call.
7826
7827 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7828
7829         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7830         tdep->rx_psw_type.
7831
7832 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7833
7834         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7835         * rx-tdep.c (rx_gdbarch_init): Likewise.
7836
7837 2017-04-13  Pedro Alves  <palves@redhat.com>
7838
7839         * breakpoint.h (struct breakpoint): Reindent.
7840
7841 2017-04-13  Pedro Alves  <palves@redhat.com>
7842
7843         * breakpoint.c (bp_location): Rename to ...
7844         (bp_locations): ... this.  All references updated.
7845         (bp_location_count): Rename to ...
7846         (bp_locations_count): ... this.  All references updated.
7847         (bp_location_placed_address_before_address_max): Rename to ...
7848         (bp_locations_placed_address_before_address_max): ... this.  All
7849         references updated.
7850         (bp_location_shadow_len_after_address_max): Rename to ...
7851         (bp_locations_shadow_len_after_address_max): ... this.  All
7852         references updated.
7853         (bp_location_compare_addrs): Rename to ...
7854         (bp_locations_compare_addrs): ... this.  All references updated.
7855         (bp_location_compare):Rename to ...
7856         (bp_locations_compare): ... this.  All references updated.
7857         (bp_location_target_extensions_update): Rename to ...
7858         (bp_locations_target_extensions_update): ... this.  All references
7859         updated.
7860
7861 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7862
7863         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7864         * common/common.m4: Check headers 'termios.h', 'termio.h' and
7865         'sgtty.h'.
7866         * common/gdb_termios.h: New file, with parts of "terminal.h".
7867         * inflow.c: Include "gdb_termios.h".
7868         * ser-unix.c: Include "gdb_termios.h".
7869         * terminal.h: Move terminal-related defines to
7870         "common/gdb_termios.h".
7871
7872 2017-04-12  Tom Tromey  <tom@tromey.com>
7873
7874         * probe.c (parse_probes): Update.
7875         * location.h (delete_event_location): Don't declare.
7876         (event_location_deleter::operator()): Update.
7877         * location.c (event_location_deleter::operator()): Rename from
7878         delete_event_location.
7879         * linespec.h (linespec_result) <location>: Change type to
7880         event_location_up.
7881         * linespec.c (canonicalize_linespec, event_location_to_sals)
7882         (decode_objc): Update.
7883         (linespec_result): Don't call delete_event_location.
7884         * breakpoint.c (create_breakpoints_sal)
7885         (bkpt_probe_create_sals_from_location)
7886         (strace_marker_create_sals_from_location): Update.
7887
7888 2017-04-12  Tom Tromey  <tom@tromey.com>
7889
7890         * linespec.h (struct linespec_result): Add constructor and
7891         destructor.
7892         (init_linespec_result, destroy_linespec_result)
7893         (make_cleanup_destroy_linespec_result): Don't declare.
7894         * linespec.c (init_linespec_result): Remove.
7895         (linespec_result::~linespec_result): Rename from
7896         destroy_linespec_result.  Update.
7897         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7898         Remove.
7899         * breakpoint.c (create_breakpoint, break_range_command)
7900         (decode_location_default): Update.
7901         * ax-gdb.c (agent_command_1): Update.
7902
7903 2017-04-12  Tom Tromey  <tom@tromey.com>
7904
7905         * remote.c (remote_download_tracepoint): Update.
7906         * python/py-breakpoint.c (bppy_get_location): Update.
7907         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7908         (gdbscm_breakpoint_location): Update.
7909         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7910         * breakpoint.h (struct breakpoint) <location, location_range_end>:
7911         Change type to event_location_up.
7912         * breakpoint.c (create_overlay_event_breakpoint)
7913         (create_longjmp_master_breakpoint)
7914         (create_std_terminate_master_breakpoint)
7915         (create_exception_master_breakpoint)
7916         (breakpoint_event_location_empty_p, print_breakpoint_location)
7917         (print_one_breakpoint_location, create_thread_event_breakpoint)
7918         (init_breakpoint_sal, create_breakpoint)
7919         (print_recreate_ranged_breakpoint, break_range_command)
7920         (init_ada_exception_breakpoint, say_where): Update.
7921         (base_breakpoint_dtor): Don't call delete_event_location.
7922         (bkpt_print_recreate, tracepoint_print_recreate)
7923         (dprintf_print_recreate, update_static_tracepoint)
7924         (breakpoint_re_set_default): Update.
7925
7926 2017-04-12  Tom Tromey  <tom@tromey.com>
7927
7928         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7929         type of "to_do".  Update.
7930         (compute_stack_depth): Use std::vector.
7931
7932 2017-04-12  Tom Tromey  <tom@tromey.com>
7933
7934         * printcmd.c (find_instruction_backward): Use std::vector.
7935
7936 2017-04-12  Tom Tromey  <tom@tromey.com>
7937
7938         * symfile.c (objfilep): Remove typedef.
7939         (reread_symbols): Use a std::vector.
7940
7941 2017-04-12  Tom Tromey  <tom@tromey.com>
7942
7943         * mi/mi-main.c (exec_direction_forward): Remove.
7944         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7945         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7946         scoped_restore.
7947         * guile/guile.c (guile_repl_command, guile_command)
7948         (gdbscm_execute_gdb_command): Use scoped_restore.
7949         * go-exp.y (go_parse): Use scoped_restore.
7950         * d-exp.y (d_parse): Use scoped_restore.
7951         * cli/cli-decode.c (cmd_func): Use scoped_restore.
7952         * c-exp.y (c_parse): Use scoped_restore.
7953
7954 2017-04-12  Tom Tromey  <tom@tromey.com>
7955
7956         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7957         (mi_parse): Update return type.
7958         (mi_parse_free): Remove.
7959         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7960         (mi_parse::~mi_parse): Rename from mi_parse_free.
7961         (mi_parse_cleanup): Remove.
7962         (mi_parse): Return a unique_ptr.  Use new.
7963         * mi/mi-main.c (mi_execute_command): Update.
7964
7965 2017-04-12  Tom Tromey  <tom@tromey.com>
7966
7967         * location.c (explicit_location_lex_one): Return a
7968         unique_xmalloc_ptr.
7969         (string_to_explicit_location): Update.  Remove cleanups.
7970
7971 2017-04-12  Tom Tromey  <tom@tromey.com>
7972
7973         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7974         (compare_value_and_voffset): Change type.  Update.
7975         (compute_vtable_size): Change type of "offset_vec".
7976         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
7977         (gnuv3_get_typeid): Remove extraneous declaration.
7978
7979 2017-04-12  Tom Tromey  <tom@tromey.com>
7980
7981         * charset.h (wchar_iterator): Fix comment.
7982
7983 2017-04-12  Tom Tromey  <tom@tromey.com>
7984
7985         * charset.c (iconv_wrapper): New class.
7986         (cleanup_iconv): Remove.
7987         (convert_between_encodings): Use it.
7988
7989 2017-04-12  Tom Tromey  <tom@tromey.com>
7990
7991         * symfile.h (increment_reading_symtab): Update type.
7992         * symfile.c (decrement_reading_symtab): Remove.
7993         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7994         * psymtab.c (psymtab_to_symtab): Update.
7995         * dwarf2read.c (dw2_instantiate_symtab): Update.
7996
7997 2017-04-12  Tom Tromey  <tom@tromey.com>
7998
7999         * jit.c (struct jit_reader): Declare separately.  Add constructor
8000         and destructor.  Change type of "handle".
8001         (loaded_jit_reader): Define separately.
8002         (jit_reader_load): Update.  New "new".
8003         (jit_reader_unload_command): Use "delete".
8004         * gdb-dlfcn.h (struct dlclose_deleter): New.
8005         (gdb_dlhandle_up): New typedef.
8006         (gdb_dlopen, gdb_dlsym): Update types.
8007         (gdb_dlclose): Remove.
8008         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8009         (gdb_dlsym): Change type of "handle".
8010         (make_cleanup_dlclose): Remove.
8011         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8012         * compile/compile-c-support.c (load_libcc): Update.
8013
8014 2017-04-12  Tom Tromey  <tom@tromey.com>
8015
8016         * symtab.h (find_pcs_for_symtab_line): Change return type.
8017         * symtab.c (find_pcs_for_symtab_line): Change return type.
8018         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8019         type of "vec".  Update.
8020         (ltpy_get_pcs_for_line): Update.
8021         * linespec.c (decode_digits_ordinary): Update.
8022
8023 2017-04-12  Tom Tromey  <tom@tromey.com>
8024
8025         * tracepoint.c (actions_command): Update.
8026         * python/python.c (python_command, python_interactive_command):
8027         Update.
8028         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8029         * guile/guile.c (guile_command): Update.
8030         * defs.h (read_command_lines, read_command_lines_1): Return
8031         command_line_up.
8032         (command_lines_deleter): New struct.
8033         (command_line_up): New typedef.
8034         * compile/compile.c (compile_code_command)
8035         (compile_print_command): Update.
8036         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8037         command_line_up.
8038         (make_cleanup_free_command_lines): Remove.
8039         * cli/cli-script.c (get_command_line, read_command_lines_1)
8040         (copy_command_lines): Return command_line_up.
8041         (while_command, if_command, read_command_lines, define_command)
8042         (document_command): Update.
8043         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8044         Remove.
8045         * breakpoint.h (breakpoint_set_commands): Change type of
8046         "commands".
8047         * breakpoint.c (breakpoint_set_commands): Change type of
8048         "commands".  Update.
8049         (do_map_commands_command, update_dprintf_command_list)
8050         (create_tracepoint_from_upload): Update.
8051
8052 2017-04-12  Tom Tromey  <tom@tromey.com>
8053
8054         * tracepoint.c (scope_info): Update.
8055         * spu-tdep.c (spu_catch_start): Update.
8056         * python/python.c (gdbpy_decode_line): Update.
8057         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8058         * python/py-breakpoint.c (bppy_init): Update.
8059         * probe.c (parse_probes): Update.
8060         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8061         * location.h (event_location_deleter): New struct.
8062         (event_location_up): New typedef.
8063         (new_linespec_location, new_address_location, new_probe_location)
8064         (new_explicit_location, copy_event_location)
8065         (string_to_event_location, string_to_event_location_basic)
8066         (string_to_explicit_location): Update return type.
8067         (make_cleanup_delete_event_location): Remove.
8068         * location.c (new_linespec_location, new_address_location)
8069         (new_probe_location, new_explicit_location, copy_event_location):
8070         Return event_location_up.
8071         (delete_event_location_cleanup)
8072         (make_cleanup_delete_event_location): Remove.
8073         (string_to_explicit_location, string_to_event_location_basic)
8074         (string_to_event_location): Return event_location_up.
8075         * linespec.c (canonicalize_linespec, event_location_to_sals)
8076         (decode_line_with_current_source)
8077         (decode_line_with_last_displayed, decode_objc): Update.
8078         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8079         * completer.c (location_completer): Update.
8080         * cli/cli-cmds.c (edit_command, list_command): Update.
8081         * breakpoint.c (create_overlay_event_breakpoint)
8082         (create_longjmp_master_breakpoint)
8083         (create_std_terminate_master_breakpoint)
8084         (create_exception_master_breakpoint)
8085         (create_thread_event_breakpoint): Update.
8086         (init_breakpoint_sal): Update.  Remove some dead code.
8087         (create_breakpoint_sal): Change type of "location".  Update.
8088         (create_breakpoints_sal, create_breakpoint, break_command_1)
8089         (dprintf_command, break_range_command, until_break_command)
8090         (init_ada_exception_breakpoint)
8091         (strace_marker_create_sals_from_location)
8092         (update_static_tracepoint, trace_command, ftrace_command)
8093         (strace_command, create_tracepoint_from_upload): Update.
8094         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8095         * ax-gdb.c (agent_command_1): Update.
8096
8097 2017-04-12  Pedro Alves  <palves@redhat.com>
8098
8099         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8100         * configure.tgt: Handle i[34567]86-*-go32* and
8101         i[34567]86-*-msdosdjgpp*.
8102         * i386-tdep.c (i386_svr4_reg_to_regnum):
8103         Make extern.
8104         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8105         i386-go32-tdep.c.
8106         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8107         * i386-go32-tdep.c: New file.
8108         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8109         declarations.
8110
8111 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8112
8113         * aix-thread.c (pd_status2str): Change return type to const char *.
8114
8115 2017-04-12  Pedro Alves  <palves@redhat.com>
8116
8117         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8118         calls to set_gdbarch_gnu_triplet_regexp.
8119
8120 2017-04-12  Pedro Alves  <palves@redhat.com>
8121
8122         PR gdb/21323
8123         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8124         New enum value.
8125         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8126         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8127         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8128         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8129         * gdbarch.h, gdbarch.c: Regenerate.
8130         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8131         gdbarch_wchar_bit and gdbarch_wchar_signed.
8132         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8133         * arm-tdep.c (arm_gdbarch_init): Likewise.
8134         * avr-tdep.c (avr_gdbarch_init): Likewise.
8135         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8136         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8137         * i386-tdep.c (i386_go32_init_abi): Likewise.
8138         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8139         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8140         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8141         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8142         * sh-tdep.c (sh_gdbarch_init): Likewise.
8143         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8144         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8145         * windows-tdep.c (windows_init_abi): Likewise.
8146         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8147
8148 2017-04-12  Pedro Alves  <palves@redhat.com>
8149
8150         PR c++/21323
8151         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8152         cplus_primitive_type_char32_t>: New enum values.
8153         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8154         and cplus_primitive_type_char32_t.
8155         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8156         32, use the archtecture's built-in type for char16_t and char32_t,
8157         respectively.  Otherwise, fallback to init_integer_type as before,
8158         but make the type unsigned, and issue a complaint.
8159         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8160
8161 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8162
8163         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8164         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8165
8166 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8167
8168         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8169         'const char *'.
8170
8171 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8172
8173         * common/common-utils.c (free_vector_argv): New function.
8174         * common/common-utils.h: Include <vector>.
8175         (free_vector_argv): New prototype.
8176         * darwin-nat.c (darwin_create_inferior): Rewrite function
8177         prototype in order to constify "exec_file" and accept a
8178         "std::string" for "allargs".
8179         * fork-child.c: Include <vector>.
8180         (breakup_args): Rewrite function, using C++.
8181         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8182         and accept "std::string" for "allargs".  Update the code to
8183         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8184         and "execvp".
8185         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8186         order to constify "exec_file" and accept a "std::string" for
8187         "allargs".
8188         * go32-nat.c (go32_create_inferior): Likewise.
8189         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8190         * infcmd.c (run_command_1): Constify "exec_file".  Use
8191         "std::string" for inferior arguments.
8192         * inferior.h (fork_inferior): Update prototype.
8193         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8194         prototype in order to constify "exec_file" and accept a
8195         "std::string" for "allargs".
8196         * nto-procfs.c (procfs_create_inferior): Likewise.
8197         * procfs.c (procfs_create_inferior): Likewise.
8198         * remote-sim.c (gdbsim_create_inferior): Likewise.
8199         * remote.c (extended_remote_run): Update code to accept
8200         "std::string" as argument.
8201         (extended_remote_create_inferior): Rewrite function prototype in
8202         order to constify "exec_file" and accept a "std::string" for
8203         "allargs".
8204         * rs6000-nat.c (super_create_inferior): Likewise.
8205         (rs6000_create_inferior): Likewise.
8206         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8207         * windows-nat.c (windows_create_inferior): Likewise.
8208
8209 2017-04-11  Pedro Alves  <palves@redhat.com>
8210
8211         * thread.c: Fix whitespace throughout.
8212
8213 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8214
8215         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8216
8217 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8218
8219         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8220
8221 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8222
8223         PR gdb/21364
8224         * osdata.c (info_osdata): Check if 'type' is an empty string
8225         instead of NULL.
8226
8227 2017-04-10  Pedro Alves  <palves@redhat.com>
8228
8229         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8230         (ptid_to_global_thread_id, in_thread_list)
8231         (do_captured_list_thread_ids, set_resumed, set_running)
8232         (set_executing, set_stop_requested, finish_thread_state)
8233         (validate_registers_access, can_access_registers_ptid)
8234         (print_thread_info_1, switch_to_thread)
8235         (do_restore_current_thread_cleanup)
8236         (make_cleanup_restore_current_thread, thread_command)
8237         (thread_name_command): Use operator== instead of ptid_equal.
8238
8239 2017-04-10  Pedro Alves  <palves@redhat.com>
8240
8241         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8242         (current_thread_cleanup_chain): Delete.
8243         (restore_current_thread_cleanup_dtor)
8244         (make_cleanup_restore_current_thread): Remove references to
8245         current_thread_cleanup_chain.
8246
8247 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8248
8249         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8250         REG_UNKNOWN.
8251
8252 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8253
8254         PR gdb/19942
8255         * gdbthread.h (thread_info::deletable): New method.
8256         (thread_info::incref): New method.
8257         (thread_info::decref): New method.
8258         (thread_info::refcount): Move it to private.
8259         * infrun.c (save_stop_context): Call inc_refcount.
8260         (release_stop_context_cleanup): Likewise.
8261         * thread.c (set_thread_exited): New function.
8262         (init_thread_list): Delete "tp" only it is deletable, otherwise
8263         call set_thread_exited.
8264         (delete_thread_1): Call set_thread_exited.
8265         (current_thread_cleanup) <inferior_pid>: Remove.
8266         <thread>: New field.
8267         (restore_current_thread_ptid_changed): Removed.
8268         (do_restore_current_thread_cleanup): Adjust.
8269         (restore_current_thread_cleanup_dtor): Don't call
8270         find_thread_ptid.
8271         (set_thread_refcount): Use dec_refcount.
8272         (make_cleanup_restore_current_thread): Adjust.
8273         (thread_apply_all_command): Call inc_refcount.
8274         (_initialize_thread): Don't call
8275         observer_attach_thread_ptid_changed.
8276
8277 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8278
8279         * thread.c (delete_thread_1): Hoist code on marking thread as
8280         exited.
8281
8282 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8283
8284         * windows-nat.c (windows_detach): Initialize ptid with
8285         minus_one_ptid.
8286
8287 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8288
8289         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8290
8291 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8292
8293         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8294         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8295         (bfin_pseudo_register_write): Likewise
8296
8297 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8298
8299         * common/ptid.h (struct ptid): Change to...
8300         (class ptid_t): ... this.
8301         <ptid_t>: New constructors.
8302         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8303         matches>: New methods.
8304         <make_null, make_minus_one>: New static methods.
8305         <pid>: Rename to...
8306         <m_pid>: ...this.
8307         <lwp>: Rename to...
8308         <m_lwp>: ...this.
8309         <tid>: Rename to...
8310         <m_tid>: ...this.
8311         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8312         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8313         as references, move comment to class ptid_t.
8314         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8315         ptid_t static methods.
8316         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8317         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8318         Take ptid arguments as references, implement using ptid_t methods.
8319         * unittests/ptid-selftests.c: New file.
8320         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8321         unittests/ptid-selftests.c.
8322         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8323
8324 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8325
8326         * python/python.c (python_run_simple_file): Cast mode literal to
8327         non-const char pointer as expected by PyFile_FromString.
8328
8329 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8330
8331         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8332         minus_one_ptid and null_ptid.
8333
8334 2017-04-05  Pedro Alves  <palves@redhat.com>
8335
8336         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8337         * configure: Regenerate.
8338
8339 2017-04-05  Pedro Alves  <palves@redhat.com>
8340
8341         * ada-exp.y (yyerror): Constify.
8342         * ada-lang.c (bound_name, get_selections)
8343         (ada_variant_discrim_type)
8344         (ada_variant_discrim_name, ada_value_struct_elt)
8345         (ada_lookup_struct_elt_type, is_unchecked_variant)
8346         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8347         (catch_ada_exception_command_split)
8348         (catch_ada_assert_command_split, catch_assert_command)
8349         (ada_op_name): Constify.
8350         * ada-lang.h (ada_yyerror, get_selections)
8351         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8352         * arc-tdep.c (arc_print_frame_cache): Constify.
8353         * arm-tdep.c (arm_skip_stub): Constify.
8354         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8355         (gen_aggregate_elt_ref): Constify.
8356         * bcache.c (print_bcache_statistics): Constify.
8357         * bcache.h (print_bcache_statistics): Constify.
8358         * break-catch-throw.c (catch_exception_command_1):
8359         * breakpoint.c (struct ep_type_description::description):
8360         Constify.
8361         (add_solib_catchpoint): Constify.
8362         (catch_fork_command_1): Add cast.
8363         (add_catch_command): Constify.
8364         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8365         Constify.
8366         * bsd-uthread.c (bsd_uthread_state): Constify.
8367         * buildsym.c (patch_subfile_names): Constify.
8368         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8369         Constify.
8370         * c-exp.y (yyerror): Constify.
8371         (token::oper): Constify.
8372         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8373         * c-varobj.c (cplus_describe_child): Constify.
8374         * charset.c (find_charset_names): Add cast.
8375         (find_charset_names): Constify array and add const_cast.
8376         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8377         (edit_command): Constify.
8378         * cli/cli-decode.c (lookup_cmd): Constify.
8379         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8380         Constify.
8381         (struct dump_context): Constify.
8382         (add_dump_command, restore_command): Constify.
8383         * cli/cli-script.c (get_command_line): Constify.
8384         * cli/cli-script.h (get_command_line): Constify.
8385         * cli/cli-utils.c (check_for_argument): Constify.
8386         * cli/cli-utils.h (check_for_argument): Constify.
8387         * coff-pe-read.c (struct read_pe_section_data): Constify.
8388         * command.h (lookup_cmd): Constify.
8389         * common/print-utils.c (decimal2str): Constify.
8390         * completer.c (gdb_print_filename): Constify.
8391         * corefile.c (set_gnutarget): Constify.
8392         * cp-name-parser.y (yyerror): Constify.
8393         * cp-valprint.c (cp_print_class_member): Constify.
8394         * cris-tdep.c (cris_register_name, crisv32_register_name):
8395         Constify.
8396         * d-exp.y (yyerror): Constify.
8397         (struct token::oper): Constify.
8398         * d-lang.h (d_yyerror): Constify.
8399         * dbxread.c (struct header_file_location::name): Constify.
8400         (add_old_header_file, add_new_header_file, last_function_name)
8401         (dbx_next_symbol_text, add_bincl_to_list)
8402         (find_corresponding_bincl_psymtab, set_namestring)
8403         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8404         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8405         * defs.h (command_line_input, print_address_symbolic)
8406         (deprecated_readline_begin_hook): Constify.
8407         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8408         Constify.
8409         * event-top.c (handle_line_of_input): Constify and add cast.
8410         * exceptions.c (catch_errors): Constify.
8411         * exceptions.h (catch_errors): Constify.
8412         * expprint.c (print_subexp_standard, op_string, op_name)
8413         (op_name_standard, dump_raw_expression, dump_raw_expression):
8414         * expression.h (op_name, op_string, dump_raw_expression):
8415         Constify.
8416         * f-exp.y (yyerror): Constify.
8417         (struct token::oper): Constify.
8418         (struct f77_boolean_val::name): Constify.
8419         * f-lang.c (f_word_break_characters): Constify.
8420         * f-lang.h (f_yyerror): Constify.
8421         * fork-child.c (fork_inferior): Add cast.
8422         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8423         (new_variant): Constify.
8424         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8425         * gdbarch.c: Regenerate.
8426         * gdbcore.h (set_gnutarget): Constify.
8427         * go-exp.y (yyerror): Constify.
8428         (token::oper): Constify.
8429         * go-lang.h (go_yyerror): Constify.
8430         * go32-nat.c (go32_sysinfo): Constify.
8431         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8432         * guile/scm-cmd.c (cmdscm_function): Constify.
8433         * guile/scm-param.c (pascm_param_value): Constify.
8434         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8435         (h8300sx_register_name): Constify.
8436         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8437         Constify.
8438         * ia64-tdep.c (ia64_register_names): Constify.
8439         * infcmd.c (construct_inferior_arguments): Constify.
8440         (path_command, attach_post_wait): Constify.
8441         * language.c (show_range_command, show_case_command)
8442         (unk_lang_error): Constify.
8443         * language.h (language_defn::la_error)
8444         (language_defn::la_name_of_this): Constify.
8445         * linespec.c (decode_line_2): Constify.
8446         * linux-thread-db.c (thread_db_err_str): Constify.
8447         * lm32-tdep.c (lm32_register_name): Constify.
8448         * m2-exp.y (yyerror): Constify.
8449         * m2-lang.h (m2_yyerror): Constify.
8450         * m32r-tdep.c (m32r_register_names): Constify and make static.
8451         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8452         * m88k-tdep.c (m88k_register_name): Constify.
8453         * macroexp.c (appendmem): Constify.
8454         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8455         (upgrade_type, parse_external, parse_partial_symbols)
8456         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8457         (new_symbol): Constify.
8458         * memattr.c (mem_info_command): Constify.
8459         * mep-tdep.c (register_name_from_keyword): Constify.
8460         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8461         Constify.
8462         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8463         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8464         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8465         cast.
8466         (mi_execute_async_cli_command): Constify.
8467         * mips-tdep.c (mips_register_name): Constify.
8468         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8469         (am33_register_name, am33_2_register_name)
8470         * moxie-tdep.c (moxie_register_names): Constify.
8471         * nat/linux-osdata.c (osdata_type): Constify fields.
8472         * nto-tdep.c (nto_parse_redirection): Constify.
8473         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8474         (lookup_child_selector): Constify.
8475         (objc_methcall::name): Constify.
8476         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8477         (lookup_struct_typedef): Constify.
8478         * objfiles.c (pc_in_section): Constify.
8479         * objfiles.h (pc_in_section): Constify.
8480         * p-exp.y (struct token::oper): Constify.
8481         (yyerror): Constify.
8482         * p-lang.h (pascal_yyerror): Constify.
8483         * parser-defs.h (op_name_standard): Constify.
8484         (op_print::string): Constify.
8485         (exp_descriptor::op_name): Constify.
8486         * printcmd.c (print_address_symbolic): Constify.
8487         * psymtab.c (print_partial_symbols): Constify.
8488         * python/py-breakpoint.c (stop_func): Constify.
8489         (bppy_get_expression): Constify.
8490         * python/py-cmd.c (cmdpy_completer::name): Constify.
8491         (cmdpy_function): Constify.
8492         * python/py-event.c (evpy_add_attribute)
8493         (gdbpy_initialize_event_generic): Constify.
8494         * python/py-event.h (evpy_add_attribute)
8495         (gdbpy_initialize_event_generic): Constify.
8496         * python/py-evts.c (add_new_registry): Constify.
8497         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8498         * python/py-framefilter.c (get_py_iter_from_func): Constify.
8499         * python/py-inferior.c (get_buffer): Add cast.
8500         * python/py-param.c (parm_constant::name): Constify.
8501         * python/py-unwind.c (fprint_frame_id): Constify.
8502         * python/python.c (gdbpy_parameter_value): Constify.
8503         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8504         * remote.c (memory_packet_config::name): Constify.
8505         (show_packet_config_cmd, remote_write_bytes)
8506         (remote_buffer_add_string):
8507         * reverse.c (exec_reverse_once): Constify.
8508         * rs6000-tdep.c (variant::name, variant::description): Constify.
8509         * rust-exp.y (rustyyerror): Constify.
8510         * rust-lang.c (rust_op_name): Constify.
8511         * rust-lang.h (rustyyerror): Constify.
8512         * serial.h (serial_ops::name): Constify.
8513         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8514         (sh_sh3e_register_name, sh_sh2e_register_name)
8515         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8516         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8517         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8518         (sh_sh4al_dsp_register_name): Constify.
8519         * sh64-tdep.c (sh64_register_name): Constify.
8520         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8521         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8522         * stabsread.c (patch_block_stabs, read_type_number)
8523         (ref_map::stabs, ref_add, process_reference)
8524         (symbol_reference_defined, define_symbol, define_symbol)
8525         (error_type, read_type, read_member_functions, read_cpp_abbrev)
8526         (read_one_struct_field, read_struct_fields, read_baseclasses)
8527         (read_tilde_fields, read_struct_type, read_array_type)
8528         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8529         (read_huge_number, read_range_type, read_args, common_block_start)
8530         (find_name_end): Constify.
8531         * stabsread.h (common_block_start, define_symbol)
8532         (process_one_symbol, symbol_reference_defined, ref_add):
8533         * symfile.c (get_section_index, add_symbol_file_command):
8534         * symfile.h (get_section_index): Constify.
8535         * target-descriptions.c (tdesc_type::name): Constify.
8536         (tdesc_free_type): Add cast.
8537         * target.c (find_default_run_target):
8538         (add_deprecated_target_alias, find_default_run_target)
8539         (target_announce_detach): Constify.
8540         (do_option): Constify.
8541         * target.h (add_deprecated_target_alias): Constify.
8542         * thread.c (print_thread_info_1): Constify.
8543         * top.c (deprecated_readline_begin_hook, command_line_input):
8544         Constify.
8545         (init_main): Add casts.
8546         * top.h (handle_line_of_input): Constify.
8547         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8548         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8549         (tfind_command): Rename to ...
8550         (tfind_command_1): ... this and constify.
8551         (tfind_command): New function.
8552         (tfind_end_command, tfind_start_command): Adjust.
8553         (encode_source_string): Constify.
8554         * tracepoint.h (encode_source_string): Constify.
8555         * tui/tui-data.c (tui_partial_win_by_name): Constify.
8556         * tui/tui-data.h (tui_partial_win_by_name): Constify.
8557         * tui/tui-source.c (tui_set_source_content_nil): Constify.
8558         * tui/tui-source.h (tui_set_source_content_nil): Constify.
8559         * tui/tui-win.c (parse_scrolling_args): Constify.
8560         * tui/tui-windata.c (tui_erase_data_content): Constify.
8561         * tui/tui-windata.h (tui_erase_data_content): Constify.
8562         * tui/tui-winsource.c (tui_erase_source_content): Constify.
8563         * tui/tui.c (tui_enable): Add cast.
8564         * utils.c (defaulted_query): Constify.
8565         (init_page_info): Add cast.
8566         (puts_debug, subset_compare): Constify.
8567         * utils.h (subset_compare): Constify.
8568         * varobj.c (varobj_format_string): Constify.
8569         * varobj.h (varobj_format_string): Constify.
8570         * vax-tdep.c (vax_register_name): Constify.
8571         * windows-nat.c (windows_detach): Constify.
8572         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8573         * xml-support.c (gdb_xml_end_element): Constify.
8574         * xml-tdesc.c (tdesc_start_reg): Constify.
8575         * xstormy16-tdep.c (xstormy16_register_name): Constify.
8576         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8577         * xtensa-tdep.h (xtensa_register_t::name): Constify.
8578
8579 2017-04-05  Pedro Alves  <palves@redhat.com>
8580
8581         * proc-api.c (struct trans): Constify.
8582         (procfs_note): Constify.
8583         * proc-events.c (struct trans, syscall_table):
8584         * proc-flags.c (struct trans): Constify.
8585         * proc-utils.h (procfs_note): Constify.
8586         * proc-why.c (struct trans): Constify.
8587         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8588         (procfs_detach): Constify.
8589         * sol-thread.c (struct string_map): Constify.
8590         (td_err_string, td_state_string): Constify.
8591
8592 2017-04-05  Pedro Alves  <palves@redhat.com>
8593
8594         * proc-api.c (procfs_filename): Don't initialize
8595         procfs_filename.
8596         (prepare_to_trace): Assume procfs_filename is non-NULL.
8597         (_initialize_proc_api): Give procfs_filename a default value here.
8598
8599 2017-04-05  Pedro Alves  <palves@redhat.com>
8600
8601         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8602         'cond_string' parameter.
8603         (extract_exception_regexp): Constify 'string' parameter.
8604         (catch_exception_command_1): Constify.
8605         * breakpoint.c (init_catchpoint)
8606         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8607         parameter.
8608         (ep_parse_optional_if_clause, catch_fork_command_1)
8609         (catch_exec_command_1): Constify.
8610         * breakpoint.h (init_catchpoint): Constify 'cond_string'
8611         parameter.
8612         (ep_parse_optional_if_clause): Constify.
8613         * cli/cli-utils.c (remove_trailing_whitespace)
8614         (check_for_argument): Constify.
8615         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8616         non-const overload.
8617         (check_for_argument): Likewise.
8618
8619 2017-04-05  Pedro Alves  <palves@redhat.com>
8620
8621         * event-top.c (command_line_handler): Add cast to execute_command
8622         call.
8623         * record-btrace.c (cmd_record_btrace_bts_start)
8624         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8625         (cmd_record_btrace_start): Add cast to execute_command call.
8626         * record-full.c (record_full_goto_insn):
8627         * record.c (record_start, record_stop): Add cast to
8628         execute_command_to_string calls.
8629         (cmd_record_start): Add cast to execute_command calls.
8630
8631 2017-04-05  Pedro Alves  <palves@redhat.com>
8632
8633         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8634         static inline function.
8635         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8636         array and use gdb_PyArg_ParseTupleAndKeywords.
8637         * python/py-cmd.c (cmdpy_init): Likewise.
8638         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8639         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8640         (infpy_search_memory): Likewise.
8641         * python/py-objfile.c (objfpy_add_separate_debug_file)
8642         (gdbpy_lookup_objfile): Likewise.
8643         * python/py-symbol.c (gdbpy_lookup_symbol)
8644         (gdbpy_lookup_global_symbol): Likewise.
8645         * python/py-type.c (gdbpy_lookup_type): Likewise.
8646         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8647         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8648         Likewise.
8649
8650 2017-04-05  Pedro Alves  <palves@redhat.com>
8651
8652         * python/python-internal.h (gdb_PyGetSetDef): New type.
8653         * python/py-block.c (block_object_getset)
8654         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8655         * python/py-event.c (event_object_getset)
8656         (finish_breakpoint_object_getset): Likewise.
8657         * python/py-inferior.c (inferior_object_getset): Likewise.
8658         * python/py-infthread.c (thread_object_getset): Likewise.
8659         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8660         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8661         * python/py-objfile.c (objfile_getset): Likewise.
8662         * python/py-progspace.c (pspace_getset): Likewise.
8663         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8664         Likewise.
8665         * python/py-record.c (recpy_record_getset): Likewise.
8666         * python/py-symbol.c (symbol_object_getset): Likewise.
8667         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8668         Likewise.
8669         * python/py-type.c (type_object_getset, field_object_getset):
8670         Likewise.
8671         * python/py-value.c (value_object_getset): Likewise.
8672
8673 2017-04-05  Pedro Alves  <palves@redhat.com>
8674
8675         * python/python-internal.h (gdb_PyObject_CallMethod)
8676         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8677         New functions.
8678         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8679         (PySys_GetObject, PySys_SetPath): New macros.
8680
8681 2017-04-05  Pedro Alves  <palves@redhat.com>
8682
8683         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8684         info_osdata_command.
8685         * osdata.c (info_osdata_command): Rename to ...
8686         (info_osdata): ... this.  Constify 'type' parameter, and remove
8687         the 'from_tty' parameter.  Accept NULL TYPE.
8688         (info_osdata_command): New function.
8689         * osdata.h (info_osdata_command): Remove declaration.
8690         (info_osdata): New declaration.
8691
8692 2017-04-05  Pedro Alves  <palves@redhat.com>
8693
8694         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8695         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8696         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8697         parameter.
8698         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8699         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8700         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8701         parameter.
8702         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8703         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8704         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8705         (mi_cmd_file_list_exec_source_files)
8706         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8707         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8708         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8709         parameter.
8710         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8711         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8712         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8713         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8714         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8715         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8716         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8717         'command' parameter.
8718         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8719         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8720         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8721         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8722         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8723         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8724         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8725         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8726         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8727         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8728         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8729         parameter.
8730         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8731         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8732         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8733         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8734         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8735         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8736         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8737         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8738         (mi_cmd_data_list_changed_registers)
8739         (mi_cmd_data_write_register_values)
8740         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8741         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8742         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8743         (mi_cmd_list_features, mi_cmd_list_target_features)
8744         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8745         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8746         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8747         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8748         (mi_cmd_trace_frame_collected): Constify 'command'
8749         parameter.
8750         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8751         'command' parameter.
8752
8753 2017-04-05  Pedro Alves  <palves@redhat.com>
8754
8755         * ada-lang.c (ada_completer_word_break_characters): Now a const
8756         array.
8757         (ada_get_gdb_completer_word_break_characters): Constify.
8758         * completer.c (gdb_completer_command_word_break_characters)
8759         (gdb_completer_file_name_break_characters)
8760         (gdb_completer_quote_characters): Now const arrays.
8761         (get_gdb_completer_quote_characters): Constify.
8762         (set_rl_completer_word_break_characters): New function.
8763         (set_gdb_completion_word_break_characters)
8764         (complete_line_internal): Use it.
8765         * completer.h (get_gdb_completer_quote_characters): Constify.
8766         (set_rl_completer_word_break_characters): Declare.
8767         * f-lang.c (f_word_break_characters): Constify.
8768         * language.c (default_word_break_characters): Constify.
8769         * language.h (language_defn::la_word_break_characters): Constify.
8770         (default_word_break_characters): Constify.
8771         * top.c (init_main): Use set_rl_completer_word_break_characters.
8772
8773 2017-04-05  Pedro Alves  <palves@redhat.com>
8774
8775         * aix-thread.c (aix_thread_pid_to_str)
8776         (aix_thread_extra_thread_info): Constify.
8777         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8778         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8779         (bsd_uthread_pid_to_str): Constify.
8780         * corelow.c (core_pid_to_str): Constify.
8781         * darwin-nat.c (darwin_pid_to_str): Constify.
8782         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8783         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8784         Constify.
8785         * gnu-nat.c (gnu_pid_to_str): Constify.
8786         * go32-nat.c (go32_pid_to_str): Constify.
8787         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8788         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8789         * inferior.c (inferior_pid_to_str): Constify.
8790         * linux-nat.c (linux_nat_pid_to_str): Constify.
8791         * linux-tdep.c (linux_core_pid_to_str): Constify.
8792         * linux-thread-db.c (thread_db_pid_to_str)
8793         (thread_db_extra_thread_info): Constify.
8794         * nto-tdep.c (nto_extra_thread_info): Constify.
8795         * nto-tdep.h (nto_extra_thread_info): Constify.
8796         * obsd-nat.c (obsd_pid_to_str): Constify.
8797         * procfs.c (procfs_pid_to_str): Constify.
8798         * ravenscar-thread.c (ravenscar_extra_thread_info)
8799         (ravenscar_pid_to_str): Constify.
8800         * remote-sim.c (gdbsim_pid_to_str): Constify.
8801         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8802         Constify.
8803         * sol-thread.c (solaris_pid_to_str): Constify.
8804         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8805         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8806         * target.c (default_pid_to_str, target_pid_to_str)
8807         (normal_pid_to_str, default_pid_to_str): Constify.
8808         * target.h (target_ops::to_pid_to_str)
8809         (target_ops::to_extra_thread_info): Constify.
8810         (target_pid_to_str, normal_pid_to_str): Constify.
8811         * windows-nat.c (windows_pid_to_str): Constify.
8812         * gdbarch.sh (core_pid_to_str): Constify.
8813         * target-delegates.c: Regenerate.
8814         * gdbarch.h, gdbarch.c: Regenerate.
8815
8816 2017-04-05  Pedro Alves  <palves@redhat.com>
8817
8818         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8819         the memory of the temporary warning_pre_print override.
8820         * utils.c (warning_pre_print): Constify.
8821         * utils.h (warning_pre_print): Constify.
8822
8823 2017-04-05  Pedro Alves  <palves@redhat.com>
8824
8825         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8826         (shell_command): New function.
8827         (make_command): Use std::string.
8828         (init_cli_cmds): Register shell_command instead of shell_escape.
8829
8830 2017-04-05  Pedro Alves  <palves@redhat.com>
8831
8832         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8833         * tracepoint.c (default_collect): Don't initialize.
8834
8835 2017-04-05  Pedro Alves  <palves@redhat.com>
8836
8837         * macroexp.c (macro_buffer::shared): Now a bool.
8838         (init_buffer): Update.
8839         (init_shared_buffer): Constify 'addr' parameter.
8840         (substitute_args, expand, macro_expand, macro_expand_next): Remove
8841         casts.
8842
8843 2017-04-05  Pedro Alves  <palves@redhat.com>
8844
8845         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8846         * disasm.c (set_disassembler_options): Constify local.
8847         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8848
8849 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
8850
8851         PR gdb/21352
8852         * tracefile.c (tsave_command): Fix argument parsing for '-r'
8853         option.
8854
8855 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8856
8857         * frame.c (frame_unwind_register_unsigned): Call
8858         frame_unwind_register_value.
8859
8860 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8861
8862         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8863         Use gdb_test_multiple, and don't match anchor.
8864
8865 2017-04-05  Pedro Alves  <palves@redhat.com>
8866
8867         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8868         (Write After Approval): Remove Simon Marchi.
8869
8870 2017-04-05  Pedro Alves  <palves@redhat.com>
8871
8872         * common/gdb_optional.h (optional::optional): Make constexpr and
8873         initialize m_dummy.
8874
8875 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8876
8877         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8878         (amd64fbsd_jmp_buf_reg_offset): Remove.
8879         (amd64fbsd_supply_uthread): Remove function.
8880         (amd64fbsd_collect_uthread): Remove function.
8881         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8882         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8883         (x86_64-*-freebsd*): Remove bsd-uthread.o.
8884         (fbsd-nat.c): Update comment.
8885         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8886         (i386fbsd_jmp_buf_reg_offset): Remove.
8887         (i386fbsd_supply_uthread): Remove function.
8888         (i386fbsd_collect_uthread): Remove function.
8889         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8890
8891 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8892
8893         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8894         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8895         * NEWS: Mention that support for FreeBSD/alpha was removed.
8896         * alpha-fbsd-tdep.c: Delete file.
8897         * config/alpha/fbsd.mh: Delete file.
8898         * configure.host: Delete alpha*-*-freebsd* and
8899         alpha*-*-kfreebsd*-gnu.
8900         * configure.tgt: Delete alpha*-*-freebsd* and
8901         alpha*-*-kfreebsd*-gnu.
8902
8903 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8904
8905         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8906         amd64bsd_store_inferior_registers): Use ptid from regcache.
8907
8908 2017-04-04  Pedro Alves  <palves@redhat.com>
8909
8910         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
8911         data fields, make them private and add "m_" prefixes.
8912         (lnp_state_machine::lnp_state_machine): New ctor.
8913         (record_line, check_line_address, handle_set_discriminator)
8914         (handle_set_address, handle_advance_pc, handle_special_opcode)
8915         (handle_advance_line, handle_set_file, handle_negate_stmt)
8916         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8917         (end_sequence, advance_line): New methods.
8918         (m_gdbarch, m_record_lines_p): New fields.
8919         (lnp_reader_state): Delete.
8920         (dwarf_record_line): Rename to ...
8921         (lnp_state_machine::record_line): ... adjust.
8922         (init_lnp_state_machine): Delete.
8923         (lnp_state_machine::lnp_state_machine): New.
8924         (check_line_address): Rename to ...
8925         (lnp_state_machine::check_line_address): This.
8926         (dwarf_decode_lines_1): Remove reference to "reader_state".
8927         Adjust lnp_state_machine having a non-default ctor.  Use bool.
8928         State machine internal state manipulation moved to
8929         lnp_state_machine methods.
8930
8931 2017-04-04  Pedro Alves  <palves@redhat.com>
8932
8933         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8934         unittests/offset-type-selftests.c.
8935         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8936         * common/offset-type.h: New file.
8937         * common/preprocessor.h: New file.
8938         * common/traits.h: New file.
8939         * common/valid-expr.h: New file.
8940         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
8941         sect_offset and cu_offset strong typedefs throughout.
8942         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8943         typedefs throughout.
8944         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
8945         sect_offset and cu_offset strong typedefs throughout.
8946         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8947         typedefs throughout.
8948         * gdbtypes.h: Include "common/offset-type.h".
8949         (cu_offset): Now an offset type (strong typedef) instead of a
8950         struct.
8951         (sect_offset): Likewise.
8952         (union call_site_parameter_u): Rename "param_offset" field to
8953         "param_cu_off".
8954         * unittests/offset-type-selftests.c: New file.
8955
8956 2017-04-04  Pedro Alves  <palves@redhat.com>
8957
8958         * common/underlying.h: New file.
8959         * dwarf2read.c: Include "common/gdb_optional.h" and
8960         "common/underlying.h".
8961         (dir_index, file_name_index): New types.
8962         (file_entry): Use them.
8963         (file_entry::include): Use to_underlying.
8964         (line_header::add_file_name): Use dir_index.
8965         (read_formatted_entries): Use gdb::optional.  Read form before
8966         writting to file_entry.
8967         (dwarf_decode_line_header): Use dir_index.
8968         (lnp_state_machine::current_file): Use to_underlying.
8969         (lnp_state_machine::file): Change type to file_name_index.
8970         (dwarf_record_line): Use to_underlying.
8971         (init_lnp_state_machine): Use file_name_index.
8972         (dwarf_decode_lines_1): Use dir_index and file_name_index.
8973
8974 2017-04-04  Pedro Alves  <palves@redhat.com>
8975
8976         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8977         operator bool, has_value and get methods.
8978
8979 2017-04-04  Pedro Alves  <palves@redhat.com>
8980
8981         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8982         fields.
8983         (line_header): Initialize all data fields.  Change type of
8984         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8985         Change type of include_dirs to std::vector<const char *>.  Remove
8986         num_include_dirs, include_dirs_size.  Change type of file_names to
8987         std::vector<file_entry>.  Remove num_file_names, file_names_size.
8988         (line_header::line_header): New.
8989         (line_header::add_include_dir, line_header::add_file_name): New
8990         methods.
8991         (line_header::include_dir_at): Remove NULL check.
8992         (line_header::file_name_at): Add const overload.
8993         (line_header_up): New unique_ptr typedef.
8994         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
8995         std::vector.  Remove free_line_header call.
8996         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
8997         free_line_header call.
8998         (free_cu_line_header): Delete.
8999         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9000         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9001         Adjust to use std::vector.
9002         (free_line_header): Delete.
9003         (free_line_header_voidp): Use delete.
9004         (add_include_dir): Replace with ...
9005         (line_header::add_include_dir): ... this method.  Use std::vector.
9006         (add_file_name): Replace with ...
9007         (line_header::add_file_name): ... this method.  Use std::vector.
9008         (add_include_dir_stub): Delete.
9009         (read_formatted_entries): Remove memset.
9010         (dwarf_decode_line_header): Return a line_header_up instead of a
9011         raw pointer.  Remove cleanup handling.  Pass lambdas to
9012         read_formatted_entries.  Adjust to use line_header methods.
9013         (dwarf_decode_lines_1): Adjust to use line_header methods.
9014         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9015         use std::vector.
9016
9017 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9018
9019         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9020         instead of struct ptid.
9021
9022 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9023
9024         * frame.c (get_frame_register_bytes): Unwind using value.
9025         (put_frame_register_bytes): Likewise.
9026
9027 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9028
9029         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9030         aggregate-like.
9031
9032 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9033
9034         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9035
9036 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9037
9038         * gdbthread.h (struct thread_info): Declare constructor and
9039         destructor.  Add some in-class member initializers.
9040         * thread.c (free_thread): Remove.
9041         (init_thread_list): Call delete instead of free_thread.
9042         (new_thread): Call thread_info constructor.
9043         (thread_info::thread_info): New function.
9044         (thread_info::~thread_info): New function.
9045         (delete_thread_1): Call delete instead of free_thread.
9046         (make_cleanup_restore_current_thread): Move tp and frame to
9047         inner block.
9048
9049 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9050
9051         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9052         (arc_skip_prologue): Likewise.
9053         (arc_make_frame_cache): Likewise.
9054         (arc_pv_get_operand): New function.
9055         (arc_is_in_prologue): Likewise.
9056         (arc_analyze_prologue): Likewise.
9057         (arc_print_frame_cache): Likewise.
9058         (MAX_PROLOGUE_LENGTH): New constant.
9059
9060 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9061
9062         * configure.tgt: Add arc-insn.o.
9063         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9064         (dump_arc_instruction_command): New function.
9065         (arc_fprintf_disasm): Likewise.
9066         (arc_disassemble_info): Likewise.
9067         (arc_insn_get_operand_value): Likewise.
9068         (arc_insn_get_operand_value_signed): Likewise.
9069         (arc_insn_get_memory_base_reg): Likewise.
9070         (arc_insn_get_memory_offset): Likewise.
9071         (arc_insn_get_branch_target): Likewise.
9072         (arc_insn_dump): Likewise.
9073         (arc_insn_get_linear_next_pc): Likewise.
9074         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9075         (arc_disassemble_info): Likewise.
9076         (arc_insn_get_branch_target): Likewise.
9077         (arc_insn_get_linear_next_pc): Likewise.
9078         * NEWS: Mention new "maint print arc arc-instruction".
9079
9080 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9081
9082         * arc-tdep (maintenance_print_arc_list): New variable.
9083         (maintenance_print_arc_command): New function.
9084
9085 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9086
9087         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9088         Add "limm" and "reserved".
9089         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9090         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9091         * arc-tdep.h (arc_regnum): Likewise.
9092
9093 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9094
9095         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9096         for THREADPTR register.
9097         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9098         register.
9099         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9100         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9101         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9102
9103 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9104
9105         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9106         registers above gdbarch_num_regs (gdbarch) as privileged in
9107         call0 ABI.
9108
9109 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9110
9111         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9112         for a single specified register or for all registers in
9113         a0_base..a0_base + C0_NREGS range.
9114         (supply_gregset_reg): Call regcache_raw_supply for a single
9115         specified register or for all registers in a0_base..a0_base +
9116         C0_NREGS range.
9117
9118 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9119
9120         * arch/xtensa.h (C0_NREGS): Add definition.
9121         * xtensa-tdep.c (C0_NREGS): Remove definition.
9122
9123 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9124
9125         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9126         Drop xtensa_default_isa initialization.
9127         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9128
9129 2017-03-27  Pedro Alves  <palves@redhat.com>
9130
9131         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9132         (file_entry::include_dir): New method.
9133         (line_header::include_dir_at, line_header::file_name_at): New
9134         methods.
9135         (setup_type_unit_groups, setup_type_unit_groups)
9136         (psymtab_include_file_name): Simplify using the new methods.
9137         (lnp_state_machine) <the_line_header>: New field.
9138         <file>: Add comment.
9139         (lnp_state_machine::current_file): New method.
9140         (dwarf_record_line): Simplify using the new methods.
9141         (init_lnp_state_machine): Initialize the "the_line_header" field.
9142         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9143         Simplify using the new methods.
9144
9145 2017-03-27  Pedro Alves  <palves@redhat.com>
9146
9147         * cp-name-parser.y (make_empty): Delete.
9148         (demangler_special, nested_name, ptr_operator, array_indicator)
9149         (direct_declarator, declarator_1): Use fill_comp instead of
9150         make_empty.
9151
9152 2017-03-27  Pedro Alves  <palves@redhat.com>
9153
9154         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9155         to ATTRIBUTE_PRINTF.
9156         * solib-target.c (library_list_start_list): Print "string" not
9157         "version".
9158         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9159         gdb_xml_error call.
9160
9161 2017-03-27  Pedro Alves  <palves@redhat.com>
9162
9163         * dwarf2read.c (struct file_and_directory): New.
9164         (dwarf2_get_dwz_file): Adjust to use std::string.
9165         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9166         (find_file_and_directory): Adjust to return a file_and_directory
9167         object.
9168         (read_file_scope): Adjust to use file_and_directory.  Remove
9169         make_cleanup/do_cleanups calls.
9170         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9171         make_cleanup/do_cleanups calls.
9172         * python/python.c (do_start_initialization): Adjust to ldirname
9173         returning a std::string.
9174         * utils.c (ldirname): Now returns a std::string.
9175         * utils.h (ldirname): Change return type to std::string.
9176         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9177         returning a std::string.
9178         * xml-tdesc.c (file_read_description_xml): Likewise.
9179
9180 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9181
9182         * regcache.c (regcache_debug_print_register): New function.
9183         * regcache.h (regcache_debug_print_register): New declaration.
9184         * target.c (debug_print_register): Remove.
9185         (target_fetch_registers): Call regcache_debug_print_register.
9186         (target_store_registers): Likewise.
9187
9188 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9189
9190         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9191         reference beyond the 'lh->include_dirs' array before accessing to
9192         it.
9193         (psymtab_include_file_name): Likewise.
9194         (dwarf_decode_lines_1): Likewise.
9195         (dwarf_decode_lines): Likewise.
9196         (file_file_name): Likewise.
9197
9198 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9199
9200         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9201         inferior_ptid.
9202         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9203         ps_lsetfpregs): Likewise.
9204         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9205         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9206         ps_lsetfpregs): Likewise.
9207         * target.c (target_fetch_registers, target_store_registers):
9208         Remove asserts.
9209
9210 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9211
9212         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9213
9214 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9215
9216         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9217         (_initialize_aarch64_tdep): Register it.
9218         (aarch64_record_load_store): Handle PRFM instruction.
9219         (aarch64_process_record_test): New function.
9220
9221 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9222
9223         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9224         indentation.
9225
9226 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9227
9228         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9229
9230 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9231
9232         python/python.c (do_start_initialization): Fix memory leak.
9233
9234 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9235
9236         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9237         using get_ptrace_pid.
9238         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9239         inferior_ptid.
9240         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9241         inferior_ptid instead of pid.
9242
9243 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9244
9245         * aarch64-tdep.c: Wrap locally used classes in anonymous
9246         namespace.
9247         * arm-tdep.c: Likewise.
9248         * linespec.c: Likewise.
9249         * ui-out.c: Likewise.
9250
9251 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9252
9253         PR gdb/19637
9254         * python/lib/gdb/printer/bound_registers.py: Import sys.
9255
9256 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9257
9258         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9259         windows_thread_info parameter and use it instead of
9260         current_thread.
9261         (windows_fetch_inferior_registers): Don't set current_thread,
9262         pass the thread to do_windows_fetch_inferior_registers.  Use
9263         ptid from regcache instead of inferior_ptid.
9264         (do_windows_store_inferior_registers): Add windows_thread_info
9265         parameter and use it instead of current_thread.
9266         (windows_store_inferior_registers): Don't set current_thread,
9267         pass the thread to do_windows_store_inferior_registers.  Use
9268         ptid from regcache instead of inferior_ptid.
9269
9270 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9271
9272         * ser-mingw.c (ser_windows_raw): Remove reference to
9273         struct serial::current_timeout.
9274
9275 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9276
9277         PR tdep/20928
9278         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9279         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9280         (sparc64_fsr_type): Fix %fsr decoding.
9281
9282 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9283
9284         * python/py-record-btrace.c (btpy_insn_data): Change return type
9285         for Python 2.
9286
9287 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9288
9289         * spu-linux-nat.c (spu_fetch_inferior_registers,
9290         spu_store_inferior_registers): Use ptid from regcache, set and
9291         restore inferior_ptid.
9292         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9293         Likewise.
9294
9295 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9296
9297         * i386-linux-nat.c (fetch_register, store_register,
9298         i386_linux_fetch_inferior_registers,
9299         i386_linux_store_inferior_registers): Use ptid from regcache.
9300         * ia64-linux-nat.c (ia64_linux_fetch_register,
9301         ia64_linux_store_register): Likewise.
9302         * inf-ptrace.c (inf_ptrace_fetch_register,
9303         inf_ptrace_store_register): Likewise.
9304         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9305         m32r_linux_store_inferior_registers): Likewise.
9306         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9307         m68kbsd_store_inferior_registers): Likewise.
9308         * m68k-linux-nat.c (fetch_register, store_register,
9309         m68k_linux_fetch_inferior_registers,
9310         m68k_linux_store_inferior_registers): Likewise.
9311         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9312         m88kbsd_store_inferior_registers): Likewise.
9313         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9314         mips_fbsd_store_inferior_registers): Likewise.
9315         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9316         mips64_linux_regsets_store_registers): Likewise.
9317         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9318         mipsnbsd_store_inferior_registers): Likewise.
9319         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9320         mips64obsd_store_inferior_registers): Likewise.
9321         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9322         Likewise.
9323         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9324         ppcfbsd_store_inferior_registers): Likewise.
9325         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9326         ppc_linux_store_inferior_registers): Likewise.
9327         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9328         ppcnbsd_store_inferior_registers): Likewise.
9329         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9330         ppcobsd_store_registers): Likewise.
9331         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9332         Likewise.
9333         * ravenscar-thread.c (ravenscar_fetch_registers,
9334         ravenscar_store_registers, ravenscar_prepare_to_store):
9335         Likewise.
9336         * record-btrace.c (record_btrace_fetch_registers,
9337         record_btrace_store_registers, record_btrace_prepare_to_store):
9338         Likewise.
9339         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9340         Lookup inferior using ptid from regcache, instead of
9341         current_inferior.
9342         * remote.c (remote_fetch_registers, remote_store_registers): Use
9343         ptid from regcache.
9344         * rs6000-nat.c (fetch_register, store_register): Likewise.
9345         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9346         s390_linux_store_inferior_registers): Likewise.
9347         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9348         shnbsd_store_inferior_registers): Likewise.
9349         * sol-thread.c (sol_thread_fetch_registers,
9350         sol_thread_store_registers): Likewise.
9351         * sparc-nat.c (sparc_fetch_inferior_registers,
9352         sparc_store_inferior_registers): Likewise.
9353         * tilegx-linux-nat.c (fetch_inferior_registers,
9354         store_inferior_registers): Likewise.
9355         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9356         vaxbsd_store_inferior_registers): Likewise.
9357         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9358         store_xtregs): Likewise.
9359
9360 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9361
9362         PR gdb/14441
9363         * NEWS: Mention support for rvalue references in GDB and python.
9364         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9365         supports both lvalue and rvalue references.
9366
9367 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9368
9369         PR gdb/14441
9370         * gdbtypes.c (rank_one_type): Implement overloading
9371         resolution rules regarding rvalue references.
9372
9373 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9374
9375         PR gdb/14441
9376         * aarch64-tdep.c (aarch64_type_align)
9377         (aarch64_extract_return_value, aarch64_store_return_value): Change
9378         lvalue reference type checks to general reference type checks.
9379         * amd64-tdep.c (amd64_classify): Likewise.
9380         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9381         Likewise.
9382         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9383         (arm_store_return_value): Likewise.
9384         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9385         * c-typeprint.c (c_print_type): Likewise.
9386         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9387         (cplus_number_of_children, cplus_describe_child): Likewise.
9388         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9389         * completer.c (expression_completer): Likewise.
9390         * cp-support.c (make_symbol_overload_list_adl_namespace):
9391         Likewise.
9392         * darwin-nat-info.c (info_mach_region_command): Likewise.
9393         * dwarf2loc.c (entry_data_value_coerce_ref)
9394         (value_of_dwarf_reg_entry): Likewise.
9395         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9396         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9397         Likewise.
9398         * findvar.c (extract_typed_address, store_typed_address):
9399         Likewise.
9400         * gdbtypes.c (rank_one_type): Likewise.
9401         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9402         * infcall.c (value_arg_coerce): Likewise.
9403         * language.c (pointer_type): Likewise.
9404         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9405         Likewise.
9406         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9407         * mn10300-tdep.c (mn10300_type_align): Likewise.
9408         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9409         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9410         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9411         Likewise.
9412         * printcmd.c (print_formatted, x_command): Likewise.
9413         * python/py-type.c (typy_get_composite, typy_template_argument):
9414         Likewise.
9415         * python/py-value.c (valpy_referenced_value)
9416         (valpy_get_dynamic_type, value_has_field): Likewise.
9417         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9418         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9419         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9420         * spu-tdep.c (spu_scalar_value_p): Likewise.
9421         * symtab.c (lookup_symbol_aux): Likewise.
9422         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9423         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9424         Likewise.
9425         * valops.c (value_cast_pointers, value_cast)
9426         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9427         (value_struct_elt, value_struct_elt_bitpos)
9428         (value_find_oload_method_list, find_overload_match)
9429         (value_rtti_indirect_type): Likewise.
9430         * valprint.c (val_print_scalar_type_p, generic_val_print):
9431         Likewise.
9432         * value.c (value_actual_type, value_as_address, unpack_long)
9433         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9434         (coerce_ref): Likewise.
9435         * varobj.c (varobj_get_value_type): Likewise.
9436
9437 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9438
9439         PR gdb/14441
9440         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9441         table of constants.
9442         * python/lib/gdb/command/explore.py: Support exploring values
9443         of rvalue reference types.
9444         * python/lib/gdb/types.py: Implement get_basic_type() for
9445         rvalue reference types.
9446         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9447         constant.
9448         * python/py-value.c (valpy_getitem): Add an rvalue reference
9449         check.
9450         (valpy_reference_value): Add new parameter "refcode".
9451         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9452         New wrappers for valpy_reference_value().
9453         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9454         (gdbpy_invoke_xmethod): Likewise.
9455
9456 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9457
9458         PR gdb/14441
9459         * dwarf2read.c (process_die, read_type_die_1): Handle the
9460         DW_TAG_rvalue_reference_type DIE.
9461         (read_tag_reference_type): Add new parameter "refcode".
9462
9463 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9464
9465         PR gdb/14441
9466         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9467         (c_type_print_modifier, c_type_print_varspec_suffix)
9468         (c_type_print_base): Support printing rvalue reference types.
9469         * c-valprint.c (c_val_print, c_value_print): Support printing
9470         rvalue reference values.
9471
9472 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9473
9474         PR gdb/14441
9475         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9476         typename.
9477         * cp-support.c (replace_typedefs): Handle
9478         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9479         * python/py-type.c (typy_lookup_type): Likewise.
9480
9481 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9482
9483         PR gdb/14441
9484         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9485         * parse.c (insert_type): Change assert statement.
9486         (follow_types): Handle rvalue reference types.
9487         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9488         constant.
9489
9490 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9491
9492         PR gdb/14441
9493         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9494         value_ref() interface.
9495         * c-valprint.c (c_value_print): Likewise.
9496         * infcall.c (value_arg_coerce): Likewise.
9497         * python/py-value.c (valpy_reference_value): Likewise.
9498         * valops.c (value_cast, value_reinterpret_cast)
9499         (value_dynamic_cast, typecmp): Likewise.
9500         (value_ref): Parameterize by kind of return value reference type.
9501         * value.h (value_ref): Add new parameter "refcode".
9502
9503 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9504
9505         PR gdb/14441
9506         * dwarf2read.c (read_tag_reference_type): Use
9507         lookup_lvalue_reference_type() instead of lookup_reference_type().
9508         * eval.c (evaluate_subexp_standard): Likewise.
9509         * f-exp.y: Likewise.
9510         * gdbtypes.c (make_reference_type, lookup_reference_type):
9511         Generalize with rvalue reference types.
9512         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9513         convenience wrappers for lookup_reference_type().
9514         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9515         reference kind parameter.
9516         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9517         wrappers for lookup_reference_type().
9518         * guile/scm-type.c (gdbscm_type_reference): Use
9519         lookup_lvalue_reference_type() instead of lookup_reference_type().
9520         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9521         * parse.c (follow_types): Likewise.
9522         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9523         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9524         Likewise.
9525         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9526         (gdbpy_invoke_xmethod): Likewise.
9527         * stabsread.c: Provide extra argument to make_reference_type()
9528         call.
9529         * valops.c (value_ref, value_rtti_indirect_type): Use
9530         lookup_lvalue_reference_type() instead of lookup_reference_type().
9531
9532 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9533
9534         PR gdb/14441
9535         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9536         (TYPE_IS_REFERENCE): New macro.
9537         (struct type): Add rvalue_reference_type field.
9538         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9539
9540 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9541
9542         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9543         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9544         New function definition.
9545         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9546         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9547         New function declaration.
9548         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9549         * mi/mi-interp.h: New file.
9550         * solib.c (info_sharedlibrary_command): Replace for loop with
9551         ALL_SO_LIBS macro
9552         * solib.h (update_solib_list): New function declaration.
9553         (so_list_head): Move macro.
9554         * solist.h (ALL_SO_LIBS): New macro.
9555
9556 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9557
9558         * infcmd.c (post_create_inferior): Remove unused argument in
9559         call to solib_add.
9560         * remote.c (remote_start_remote): Likewise.
9561         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9562         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9563         (enable_break): Likewise.
9564         * solib.c (update_solib_list): Remove unused target argument
9565         and its documentation.
9566         (solib_add): Remove unused target argument.  Remove unused
9567         argument in call to update_solib_list.
9568         (info_sharedlibrary_command): Remove unused argument in call
9569         to update_solib_list.
9570         (sharedlibrary_command): Remove unused argument in call to
9571         solib_add.
9572         (handle_solib_event): Likewise.
9573         (reload_shared_libraries): Likewise.
9574         * solib.h (solib_add): Remove unused target argument.
9575
9576 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9577
9578         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9579         (s390_displaced_step_fixup): Cover relative branches with the
9580         default fixup handling.  This fixes lack of support for some
9581         relative branch instructions.
9582
9583 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9584
9585         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9586         ptid from regcache.
9587
9588 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9589
9590         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9591         i386_darwin_store_inferior_registers): Use ptid from regcache.
9592
9593 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9594
9595         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9596         i386bsd_store_inferior_registers): Use ptid from regcache.
9597
9598 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9599
9600         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9601         hppaobsd_store_registers): Use ptid from regcache.
9602
9603 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9604
9605         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9606         hppanbsd_store_registers): Use ptid from regcache.
9607
9608 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9609
9610         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9611         from regcache.  Use get_ptrace_pid.
9612
9613 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9614
9615         * corelow.c (get_core_register_section): Use ptid from regcache,
9616         update doc.
9617
9618 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9619
9620         * bsd-uthread.c (bsd_uthread_fetch_registers,
9621         bsd_uthread_store_registers): Use ptid from regcache, set and
9622         restore inferior_ptid.
9623
9624 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9625
9626         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9627         fetch_fp_regs, store_register, store_regs, store_fp_register,
9628         store_fp_regs): Use ptid from regcache.
9629
9630 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9631
9632         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9633         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9634         store_vfp_regs): Use ptid from regcache.
9635
9636 2017-03-17  Pedro Alves  <palves@redhat.com>
9637
9638         PR remote/21188
9639         * ser-base.c (ser_base_wait_for): Add comment.
9640         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9641         version.
9642         * ser-unix.c (hardwire_raw): Remove reference to
9643         scb->current_timeout.
9644         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9645         (hardwire_ops): Install ser_base_readchar instead of
9646         hardwire_readchar.
9647         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9648         Remove fields.
9649
9650 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9651
9652         PR gdb/19637
9653         * python/lib/gdb/printer/bound_registers.py: Add support for
9654         Python 3.
9655
9656 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9657
9658         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9659         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9660         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9661         byte_offset to subobj_byte_offset.  Fix the handling of
9662         DWARF_VALUE_STACK on big-endian targets when coming via an
9663         implicit pointer.
9664         (dwarf2_evaluate_loc_desc): Adjust call to
9665         dwarf2_evaluate_loc_desc_full.
9666         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9667         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9668
9669 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9670
9671         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9672         and REVSH instructions.
9673
9674 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9675
9676         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9677         (arm_record_test): Declare.
9678         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9679         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9680         align with the manual.
9681         (thumb_record_misc): Adjust the code order to align with the
9682         manual.
9683         (thumb2_record_decode_insn_handler): Fix instruction matching.
9684         (instruction_reader_thumb): New class.
9685         (arm_record_test): New function.
9686
9687 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9688
9689         * arm-tdep.c (abstract_memory_reader): New class.
9690         (instruction_reader): New class.
9691         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9692         (decode_insn): Likewise.
9693
9694 2017-03-16  Doug Evans  <dje@google.com>
9695
9696         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9697         member.  Change type of TYPE member to SCM.  All uses updated.
9698         (lsscm_make_lazy_string_smob): Add assert.
9699         (lsscm_make_lazy_string): Flag bad length values.
9700         (lsscm_elt_type): New function.
9701         (gdbscm_lazy_string_to_value): Rewrite to use
9702         lsscm_safe_lazy_string_to_value.
9703         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9704         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9705         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9706         in incoming type.
9707         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9708         * guile/scm-type.c (tyscm_scm_to_type): New function.
9709
9710 2017-03-15  Doug Evans  <dje@google.com>
9711
9712         PR python/17728, python/18439, python/18779
9713         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9714         member.  Change type of TYPE member to PyObject *.  All uses updated.
9715         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9716         (gdbpy_create_lazy_string_object): Flag bad length values.
9717         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9718         Handle typedefs in incoming type.
9719         (stpy_lazy_string_elt_type): New function.
9720         (gdbpy_extract_lazy_string): Call it.
9721         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9722         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9723         typedefs in incoming type.
9724
9725 2017-03-16  Doug Evans  <dje@google.com>
9726
9727         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9728         * guile/scm-type.c (tyscm_scm_to_type): New function.
9729
9730 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9731
9732         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9733         "ULONGEST" for "skip".
9734
9735 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9736
9737         PR gdb/21220
9738         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9739         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9740         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9741         over ptrace peek/poke until end of buffer or error.
9742
9743 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9744
9745         * parse.c (length_of_subexp): Make static.
9746         * parser-defs.h (length_of_subexp): Remove.
9747
9748 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9749
9750         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9751         as well.
9752
9753 2017-03-14  Pedro Alves  <palves@redhat.com>
9754
9755         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9756         (main): Use std::unique_ptr.  Remove calls to
9757         cp_demangled_name_parse_free.
9758
9759 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9760
9761         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9762         alphabsd_store_inferior_registers): Use regcache->ptid instead
9763         of inferior_ptid.
9764
9765 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9766
9767         * aix-thread.c (aix_thread_fetch_registers,
9768         aix_thread_store_registers): Use regcache->ptid instead of
9769         inferior_ptid.
9770
9771 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9772
9773         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9774         store_gregs_to_thread, fetch_fpregs_from_thread,
9775         store_fpregs_to_thread): Use regcache->ptid instead of
9776         inferior_ptid.
9777
9778 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9779
9780         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9781         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9782         instead of inferior_ptid.
9783
9784 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9785
9786         * target.c (target_fetch_registers, target_store_registers): Add
9787         assert.
9788
9789 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9790
9791         * regcache.h (regcache_get_ptid): New function.
9792         * regcache.c (regcache_get_ptid): New function.
9793
9794 2017-03-13  Mark Wielaard  <mark@klomp.org>
9795
9796         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9797
9798 2017-03-10  Keith Seitz  <keiths@redhat.com>
9799
9800         PR c++/8218
9801         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9802
9803 2017-03-08  Pedro Alves  <palves@redhat.com>
9804
9805         PR gdb/18360
9806         * infrun.c (start_step_over, do_target_resume, resume)
9807         (restart_threads): Assert we're not resuming a thread that is
9808         meant to be stopped.
9809         (infrun_thread_stop_requested_callback): Delete.
9810         (infrun_thread_stop_requested): If the thread is internally
9811         stopped, queue a pending stop event and clear the thread's
9812         inline-frame state.
9813         (handle_stop_requested): New function.
9814         (handle_syscall_event, handle_inferior_event_1): Use
9815         handle_stop_requested.
9816         (handle_stop_requested): New function.
9817         (handle_signal_stop): Set the thread's stop_signal here instead of
9818         at caller.
9819         (finish_step_over): Clear step over info unconditionally.
9820         (handle_signal_stop): If the user had interrupted the event
9821         thread, consider the stop a random signal.
9822         (handle_signal_stop) <signal arrived while stepping over
9823         breakpoint>: Don't restart threads here.
9824         (stop_waiting): Don't clear step-over info here.
9825
9826 2017-03-08  Pedro Alves  <palves@redhat.com>
9827
9828         PR 21206
9829         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9830         goes to argument 2, not 1.
9831
9832 2017-03-08  Pedro Alves  <palves@redhat.com>
9833
9834         PR cli/21218
9835         * top.c (gdb_readline_wrapper): Avoid passing NULL to
9836         display_gdb_prompt.
9837         (command_line_input): Add comment.
9838
9839 2017-03-08  Pedro Alves  <palves@redhat.com>
9840
9841         PR tui/21216
9842         * tui/tui-file.c (tui_file::write): New.
9843         * tui/tui-file.h (tui_file): Override "write".
9844         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9845         factored out from ...
9846         (tui_puts): ... here.
9847         (tui_putc): Use them.
9848         (tui_write): New function.
9849         * tui/tui-io.h (tui_write): Declare.
9850
9851 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9852
9853         * Makefile.in (SFILES): Replace "environ.c" with
9854         "common/environ.c".
9855         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9856         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
9857         to...
9858         * common/environ.c: ... here.
9859         * environ.h: Moved to...
9860         * common/environ.h: ... here.
9861
9862 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9863
9864         * gdbarch.sh (pstring_ptr): New static function.
9865         (gdbarch_disassembler_options): Use it.
9866         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9867         not valid_disassembler_option->name.
9868         * gdbarch.c: Regenerate.
9869
9870 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9871
9872         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9873
9874 2017-03-07  Pedro Alves  <palves@redhat.com>
9875
9876         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9877
9878 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9879
9880         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9881         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9882         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9883         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9884
9885 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
9886
9887         * xtensa-linux-nat.c (fetch_gregs): Remove const.
9888
9889 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
9890
9891         * remote.c (remote_add_target_side_commands): Use range-based
9892         for loop.
9893
9894 2017-03-03  Yao Qi  <yao.qi@linaro.org>
9895
9896         PR gdb/21165
9897         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9898         value is lazy.
9899         * valprint.c (common_val_print): Likewise.
9900
9901 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
9902
9903         * NEWS: Mention new set/show disassembler-options commands.
9904         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9905         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9906         (prospective_options): New static variable.
9907         (gdb_disassembler::gdb_disassembler): Initialize
9908         m_di.disassembler_options.
9909         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9910         (get_disassembler_options): New function.
9911         (set_disassembler_options): Likewise.
9912         (set_disassembler_options_sfunc): Likewise.
9913         (show_disassembler_options_sfunc): Likewise.
9914         (disassembler_options_completer): Likewise.
9915         (_initialize_disasm): Likewise.
9916         * disasm.h (get_disassembler_options): New prototype.
9917         (set_disassembler_options): Likewise.
9918         * gdbarch.sh (gdbarch_disassembler_options): New variable.
9919         (gdbarch_verify_disassembler_options): Likewise.
9920         * gdbarch.c: Regenerate.
9921         * gdbarch.h: Likewise.
9922         * arm-tdep.c (num_disassembly_options): Delete.
9923         (set_disassembly_style): Likewise.
9924         (arm_disassembler_options): New static variable.
9925         (set_disassembly_style_sfunc): Convert short style name into long
9926         option name.  Call set_disassembler_options.
9927         (show_disassembly_style_sfunc): New function.
9928         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9929         set_gdbarch_verify_disassembler_options.
9930         (_initialize_arm_tdep): Delete regnames variable and update callers.
9931         (arm_disassembler_options): Initialize.
9932         (disasm_options): New variable.
9933         (num_disassembly_options): Rename from this...
9934         (num_disassembly_styles): ...to this.  Compute by scanning through
9935         disasm_options.
9936         (valid_disassembly_styles): Initialize using disasm_options.
9937         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9938         set_arm_regname_option.
9939         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9940         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9941         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9942         set_gdbarch_verify_disassembler_options.
9943         * s390-tdep.c (s390_disassembler_options): New static variable.
9944         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9945         set_gdbarch_verify_disassembler_options.
9946
9947 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9948
9949         * remote.c (remote_add_target_side_condition): Remove "struct"
9950         keyword from range-based for loop.
9951
9952 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9953
9954         * remote.c (remote_add_target_side_condition): Use range-based
9955         for loop.  Update comment.
9956
9957 2017-02-27  Yao Qi  <yao.qi@linaro.org>
9958
9959         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9960
9961 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
9962
9963         * regcache.c (regcache_raw_update): New function.
9964         (regcache_raw_read): Move code to regcache_raw_update.
9965         * regcache.h (regcache_raw_update): New declaration.
9966         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9967
9968 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
9969
9970         * dwarf2read.c (create_debug_type_hash_table): Initialize
9971         header.signature and header.type_offset_in_tu.
9972
9973 2017-02-24  Pedro Alves  <palves@redhat.com>
9974
9975         * symtab.c (make_file_symbol_completion_list_1): Use
9976         add_symtab_completions.
9977
9978 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9979
9980         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9981
9982 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9983
9984         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9985         I386_MAX_REGISTER_SIZE.
9986         (i386_pseudo_register_write): Likewise.
9987         (i386_process_record): Likewise.
9988         * i387-tdep.c (i387_supply_xsave): Likewise.
9989         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9990         (store_register): Likewise.
9991
9992 2017-02-23  Pedro Alves  <palves@redhat.com>
9993
9994         * ada-lang.c: Include "common/function-view.h".
9995         (ada_iterate_over_symbols): Adjust to use function_view as
9996         callback type.
9997         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9998         (ada_make_symbol_completion_list): Use a lambda.
9999         (ada_exc_search_name_matches): Delete.
10000         (name_matches_regex): New.
10001         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10002         * compile/compile-c-support.c: Include "common/function-view.h".
10003         (print_one_macro): Change prototype to accept a ui_file pointer.
10004         (write_macro_definitions): Use a lambda.
10005         * dwarf2read.c: Include "common/function-view.h".
10006         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10007         (dw2_expand_symtabs_matching): Adjust to use function_view as
10008         callback type.
10009         * language.h: Include "common/function-view.h".
10010         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10011         function_view as callback type.
10012         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10013         * linespec.c: Include "common/function-view.h".
10014         (collect_info::add_symbol): New method.
10015         (struct symbol_and_data_callback, iterate_inline_only, struct
10016         symbol_matcher_data, iterate_name_matcher): Delete.
10017         (iterate_over_all_matching_symtabs): Adjust to use function_view
10018         as callback type and lambdas.
10019         (iterate_over_file_blocks): Adjust to use function_view as
10020         callback type.
10021         (decode_compound_collector): Now a class with private fields.
10022         (decode_compound_collector::release_symbols): New method.
10023         (collect_one_symbol): Rename to...
10024         (decode_compound_collector::operator()): ... this and adjust.
10025         (lookup_prefix_sym): decode_compound_collector construction bits
10026         move to decode_compound_collector ctor.  Pass the
10027         decode_compound_collector object directly as callback.  Remove
10028         cleanups and use decode_compound_collector::release_symbols
10029         instead.
10030         (symtab_collector): Now a class with private fields.
10031         (symtab_collector::release_symtabs): New method.
10032         (add_symtabs_to_list): Rename to...
10033         (symtab_collector::operator()): ... this and adjust.
10034         (collect_symtabs_from_filename): symtab_collector construction
10035         bits move to symtab_collector ctor.  Pass the symtab_collector
10036         object directly as callback.  Remove cleanups and use
10037         symtab_collector::release_symtabs instead.
10038         (collect_symbols): Delete.
10039         (add_matching_symbols_to_info): Use lambdas.
10040         * macrocmd.c (print_macro_callback): Delete.
10041         (info_macro_command): Use a lambda.
10042         (info_macros_command): Pass print_macro_definition as callable
10043         directly.
10044         (print_one_macro): Remove 'ignore' parameter.
10045         (macro_list_command): Adjust.
10046         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10047         (macro_for_each_data::user_data): Delete field.
10048         (foreach_macro): Adjust to call the function_view.
10049         (macro_for_each): Adjust to use function_view as callback type.
10050         (foreach_macro_in_scope): Adjust to call the function_view.
10051         (macro_for_each_in_scope): Adjust to use function_view as callback
10052         type.
10053         * macrotab.h: Include "common/function-view.h".
10054         (macro_callback_fn): Declare a prototype instead of a pointer.
10055         Remove "user_data" parameter.
10056         (macro_for_each, macro_for_each_in_scope): Adjust to use
10057         function_view as callback type.
10058         * psymtab.c (partial_map_expand_apply)
10059         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10060         Adjust to use function_view as callback type and to return bool.
10061         (psym_expand_symtabs_matching): Adjust to use function_view as
10062         callback types.
10063         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10064         to use function_view as callback type and to return bool.
10065         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10066         callback types.
10067         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10068         as callback types.
10069         * symfile.h: Include "common/function-view.h".
10070         (expand_symtabs_file_matcher_ftype)
10071         (expand_symtabs_symbol_matcher_ftype)
10072         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10073         return bool.
10074         (quick_symbol_functions::map_symtabs_matching_filename)
10075         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10076         function_view as callback type and return bool.
10077         (expand_symtabs_matching): Adjust to use function_view as callback
10078         type.
10079         (maintenance_expand_name_matcher)
10080         (maintenance_expand_file_matcher): Delete.
10081         (maintenance_expand_symtabs): Use lambdas.
10082         * symtab.c (iterate_over_some_symtabs): Adjust to use
10083         function_view as callback types and return bool.
10084         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10085         of a cleanup.
10086         (lookup_symtab_callback): Delete.
10087         (lookup_symtab): Use a lambda.
10088         (iterate_over_symbols): Adjust to use function_view as callback
10089         type.
10090         (struct search_symbols_data, search_symbols_file_matches)
10091         (search_symbols_name_matches): Delete.
10092         (search_symbols): Use a pair of lambdas.
10093         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10094         (symtab_expansion_callback): Delete.
10095         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10096         * symtab.h: Include "common/function-view.h".
10097         (iterate_over_some_symtabs): Adjust to use function_view as
10098         callback type and return bool.
10099         (iterate_over_symtabs): Adjust to use function_view as callback
10100         type.
10101         (symbol_found_callback_ftype): Remove 'data' parameter and return
10102         bool.
10103         (iterate_over_symbols): Adjust to use function_view as callback
10104         type.
10105
10106 2017-02-23  Pedro Alves  <palves@redhat.com>
10107
10108         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10109         (%.o) <unittests/%.c>: New pattern.
10110         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10111         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10112         * common/function-view.h: New file.
10113         * unittests/function-view-selftests.c: New file.
10114         * configure: Regenerate.
10115
10116 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10117
10118         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10119         inferior_ptid.
10120         * go32-nat.c (go32_thread_alive): Likewise.
10121
10122 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10123
10124         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10125         delete.
10126
10127 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10128
10129         * varobj.c (varobj_clear_saved_item): Use delete instead of
10130         xfree.
10131         (update_dynamic_varobj_children): Likewise.
10132
10133 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10134
10135         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10136
10137 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10138
10139         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10140         m_enum_value to 0 in default constructor.
10141
10142 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10143
10144         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10145         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10146         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10147         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10148         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10149         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10150         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10151         IS_STORE_CONDITIONAL_INSN.
10152
10153 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10154
10155         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10156
10157 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10158
10159         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10160
10161 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10162
10163         * dwarf2read.c (skip_one_die, read_attribute_value)
10164         (dwarf2_const_value_attr, dump_die_shallow)
10165         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10166         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10167
10168 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10169
10170         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10171         (dwarf_parse_macro_header): Accept DWARF version 5.
10172         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10173
10174 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10175
10176         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10177         DW_AT_GNU_*.
10178         * common/common-exceptions.h (enum errors): Likewise.
10179         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10180         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10181         (dwarf_expr_context::execute_stack_op): Likewise.
10182         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10183         Likewise.
10184         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10185         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10186         (show_entry_values_debug, call_site_to_target_addr)
10187         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10188         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10189         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10190         (value_of_dwarf_block_entry, indirect_pieced_value)
10191         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10192         (disassemble_dwarf_expression): Likewise.
10193         * dwarf2read.c (process_die, inherit_abstract_dies)
10194         (read_call_site_scope): Likewise.
10195         * gdbtypes.h (struct func_type, struct call_site_parameter)
10196         (struct call_site): Likewise.
10197         * stack.c (read_frame_arg): Likewise.
10198         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10199
10200 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10201
10202         * defs.h (read_unsigned_leb128): New declaration.
10203         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10204         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10205         (dwarf2_find_location_expression): Call also
10206         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10207         * dwarf2loc.h (dwarf2_version): New declaration.
10208         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10209         rnglists.
10210         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10211         .debug_rnglists.
10212         (struct dwop_section_names): Add loclists_dwo.
10213         (dwop_section_names): Add .debug_loclists.dwo.
10214         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10215         (struct dwarf2_per_cu_data): Add dwarf_version.
10216         (struct dwo_sections): Add loclists.
10217         (struct attr_abbrev): Add implicit_const.
10218         (read_indirect_line_string): New declaration.
10219         (read_unsigned_leb128): Delete declaration.
10220         (rcuh_kind): New definition.
10221         (read_and_check_comp_unit_head): Change parameter
10222         is_debug_types_section to section_kind.
10223         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10224         (read_comp_unit_head): Change parameter abfd to section, add parameter
10225         section_kind.  Handle DWARF-5.
10226         (error_check_comp_unit_head): Accept also DWARF version 5.
10227         (read_and_check_comp_unit_head): Change parameter
10228         is_debug_types_section to section_kind.
10229         (read_and_check_type_unit_head): Delete function.
10230         (read_abbrev_offset): Handle DWARF-5.
10231         (create_debug_type_hash_table): Add parameter section_kind.  Process
10232         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10233         comp_unit_head.
10234         (create_debug_types_hash_table): Update create_debug_type_hash_table
10235         caller.
10236         (create_all_type_units): Call create_debug_type_hash_table.
10237         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10238         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10239         caller.
10240         (skip_one_die): Handle DW_FORM_implicit_const.
10241         (dwarf2_rnglists_process): New function.
10242         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10243         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10244         (read_attribute_value): Handle DW_FORM_implicit_const,
10245         DW_FORM_line_strp.
10246         (read_attribute): Handle DW_FORM_implicit_const.
10247         (read_indirect_string_at_offset_from): New function from
10248         read_indirect_string_at_offset.
10249         (read_indirect_string_at_offset): Call
10250         read_indirect_string_at_offset_from.
10251         (read_indirect_line_string_at_offset): New function.
10252         (read_indirect_string): New function comment.
10253         (read_indirect_line_string): New function.
10254         (read_unsigned_leb128): Make it global.
10255         (dwarf2_string_attr): Handle DWARF-5.
10256         (add_include_dir_stub, read_formatted_entries): New functions.
10257         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10258         Handle DWARF-5.
10259         (per_cu_header_read_in): Update read_comp_unit_head caller.
10260         (dwarf2_version): New function.
10261         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10262         rnglists.
10263         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10264         fields.
10265
10266 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10267
10268         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10269
10270 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10271
10272         * dwarf2read.c (dwarf2_ranges_process): New function from
10273         dwarf2_ranges_read.
10274         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10275         dwarf2_ranges_process.
10276
10277 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10278
10279         * dwarf2read.c (create_debug_type_hash_table): New function from
10280         create_debug_types_hash_table.
10281         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10282         (create_all_type_units, open_and_init_dwo_file): Update
10283         create_debug_types_hash_table callers.
10284
10285 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10286
10287         PR gdb/16188
10288         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10289         refer to 'ap', not 'args'.
10290
10291 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10292             Pedro Alves  <palves@redhat.com>
10293
10294         PR gdb/16188
10295         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10296         calls succeeded.
10297         * fork-child.c (trace_start_error): New function.
10298         (trace_start_error_with_name): Likewise.
10299         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10300         * inf-ptrace.c (inf_ptrace_me): Likewise.
10301         * inferior.h (trace_start_error): New prototype.
10302         (trace_start_error_with_name): Likewise.
10303
10304 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10305
10306         PR gdb/21164
10307         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10308         NULL before using it.
10309         * symmisc.c (maintenance_print_symbols): Likewise.
10310         (maintenance_print_msymbols): Likewise.
10311
10312 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10313
10314         * NEWS: Add record Python bindings entry.
10315
10316 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10317
10318         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10319         py-record-full.o.
10320         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10321         * python/py-record-btrace.c, python/py-record-btrace.h,
10322         python/py-record-full.c, python/py-record-full.h: New file.
10323         * python/py-record.c: Add include for py-record-btrace.h and
10324         py-record-full.h.
10325         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10326         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10327         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10328         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10329         New definition.
10330         (gdbpy_initialize_btrace): New export.
10331         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10332
10333 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10334
10335         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10336         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10337         * python/py-record.c: New file.
10338         * python/python-internal.h (gdbpy_start_recording,
10339         gdbpy_current_recording, gdpy_stop_recording,
10340         gdbpy_initialize_record): New export.
10341         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10342         (python_GdbMethods): Add gdbpy_start_recording,
10343         gdbpy_current_recording and gdbpy_stop_recording.
10344
10345 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10346
10347         * record-btrace.c (record_btrace_record_method): New function.
10348         (init_record_btrace_ops): Initialize to_record_method.
10349         * record-full.c (record_full_record_method): New function.
10350         (init_record_full_ops, init_record_full_core_ops): Add
10351         record_full_record_method.
10352         * record.h (enum record_method): New enum.
10353         * target-debug.h (target_debug_print_enum_record_method: New define.
10354         * target-delegates.c: Regenerate.
10355         * target.c (target_record_method): New function.
10356         * target.h: Include record.h.
10357         (struct target_ops) <to_record_method>: New field.
10358         (target_record_method): New export.
10359
10360 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10361
10362         * record.h (record_start, record_stop): New export.
10363         * record.c (record_start, record_stop): New function.
10364
10365 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10366
10367         * btrace.c (btrace_fetch): Copy function call segments pointer
10368         into a vector.
10369         (btrace_clear): Clear the vector.
10370         (btrace_find_insn_by_number): Use binary search to find the correct
10371         function call segment.
10372         * btrace.h (brace_fun_p): New typedef.
10373         (struct btrace_thread_info) <functions>: New field.
10374
10375 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10376
10377         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10378         * btrace.c (btrace_decode_error): ... here.  New function.
10379         * btrace.h (btrace_decode_error): New export.
10380
10381 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10382
10383         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10384         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10385         btrace_find_insn_by_number): Remove special case for gaps.
10386         * btrace.h (btrace_insn_get_error): New export.
10387         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10388         * record-btrace.c (btrace_insn_history): Print number for gaps.
10389         (record_btrace_info, record_btrace_goto): Handle gaps.
10390
10391 2017-02-14  Tom Tromey  <tom@tromey.com>
10392
10393         PR python/13598:
10394         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10395         event.
10396         * python/py-evts.c (gdbpy_initialize_py_events): Add
10397         before_prompt registry.
10398         * python/py-events.h (events_object) <before_prompt>: New field.
10399
10400 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10401
10402         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10403
10404 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10405
10406         * symfile (_initialize_symfile): Add usage text to the load command's
10407         help text.
10408
10409 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10410
10411         * utils.c (defaulted_query): Don't query on secondary UIs.
10412
10413 2017-02-10  Tom Tromey  <tom@tromey.com>
10414
10415         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10416
10417 2017-02-10  Tom Tromey  <tom@tromey.com>
10418
10419         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10420         "cleanup" local.
10421         * python/py-type.c (typy_legacy_template_argument): Remove
10422         unnecessary "cleanup" local.
10423
10424 2017-02-10  Tom Tromey  <tom@tromey.com>
10425
10426         * python/python.c (do_start_initialization): New function, from
10427         _initialize_python.
10428         (_initialize_python): Call do_start_initialization.
10429         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10430         goto.
10431
10432 2017-02-10  Tom Tromey  <tom@tromey.com>
10433
10434         * python/py-prettyprint.c (pretty_print_one_value): Use
10435         gdbpy_ref.
10436
10437 2017-02-10  Tom Tromey  <tom@tromey.com>
10438
10439         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10440         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10441         gdbpy_ref.
10442         * python/py-type.c (field_new): Use gdbpy_ref.
10443         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10444         gdbpy_ref.
10445         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10446         (py_free_pspace): Likewise.
10447         (pspace_to_pspace_object): Likewise.
10448         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10449         (py_free_objfile): Likewise.
10450         (objfile_to_objfile_object): Likewise.
10451         * python/py-inferior.c (delete_thread_object): Use
10452         gdbpy_ref.
10453         (infpy_read_memory): Likewise.
10454         (py_free_inferior): Likewise.
10455         * python/py-evtregistry.c (create_eventregistry_object): Use
10456         gdbpy_ref.
10457         * python/py-event.c (create_event_object): Use gdbpy_ref.
10458
10459 2017-02-10  Tom Tromey  <tom@tromey.com>
10460
10461         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10462         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10463         used.
10464         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10465         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10466         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10467         python/py-framefilter.c, python/py-function.c,
10468         python/py-inferior.c, python/py-infevents.c,
10469         python/py-linetable.c, python/py-newobjfileevent.c,
10470         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10471         python/py-signalevent.c, python/py-stopevent.c,
10472         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10473         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10474         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10475         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10476
10477 2017-02-10  Tom Tromey  <tom@tromey.com>
10478
10479         * ui-out.h (ui_out_emit_type): New class.
10480         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10481         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10482         and ui_out_emit_tuple.
10483         (enumerate_locals): Likewise.
10484         (py_mi_print_variables, py_print_locals, py_print_args): Use
10485         ui_out_emit_list.
10486         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10487         ui_out_emit_list.
10488         * common/gdb_optional.h: New file.
10489
10490 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10491
10492         * MAINTAINERS (Write After Approval): Update my e-mail address.
10493
10494 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10495
10496         PR gdb/21122
10497         * breakpoint.c (_initialize_breakpoint): Update the help description
10498         of the 'commands' command to indicate that it takes a list argument.
10499
10500 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
10501
10502         * interps.c (current_interp_set_logging): Remove "return".
10503
10504 2017-02-09  Gary Benson  <gbenson@redhat.com>
10505
10506         * symtab.c (add_symtab_completions): Prevent NULL pointer
10507         dereference.
10508
10509 2017-02-08  Pedro Alves  <palves@redhat.com>
10510
10511         * interps.c (interp::interp): Remove reference to quiet_p.
10512         (interp_set): Make static.  Remove dead "Switching to" output
10513         code.
10514         (interp_quiet_p, interp_set_quiet): Delete.
10515         (interpreter_exec_cmd): Don't set the interpreter quiet.
10516         * interps.h (interp_quiet_p): Make static.
10517         (class interp) <quiet_p>: Remove field
10518
10519 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10520
10521         * cli/cli-decode.c (find_command_name_length): Make it extern.
10522         * cli/cli-decode.h (find_command_name_length): Declare.
10523         * cli/cli-script.c (command_name_equals, line_first_arg):
10524         New functions.
10525         (process_next_line): Use cli-decode to parse command names.
10526         (build_command_line): Make args a constant pointer.
10527
10528 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10529
10530         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10531         Remove case-insensitive search.
10532
10533 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
10534
10535         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10536         at the end of the line.  Avoids an ARI warning.
10537
10538 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
10539
10540         * NEWS: Mention support for record/replay of Intel 64 rdrand and
10541         rdseed instructions.
10542         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10543
10544 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
10545
10546         PR tdep/20936
10547         Provide and use sparc32 and sparc64 target description XML files.
10548         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10549         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10550         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10551         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10552         * features/sparc/sparc32-solaris.xml: New file.
10553         * features/sparc/sparc64-solaris.xml: New file.
10554         * features/sparc/sparc32-solaris.c: Generated.
10555         * features/sparc/sparc64-solaris.c: Generated.
10556         * sparc-tdep.h: Account for differences in target descriptions.
10557         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10558         (sparc32_register_type): Use target provided registers.
10559         (validate_tdesc_registers): New function.
10560         (sparc32_gdbarch_init): Use tdesc_has_registers.
10561         Set pseudoregister functions.
10562         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10563         (sparc64_register_type): Use target provided registers.
10564         (sparc64_init_abi): Set pseudoregister functions.
10565
10566 2017-02-03  Tom Tromey  <tom@tromey.com>
10567
10568         PR rust/21097:
10569         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10570         with a single member.
10571
10572 2017-02-03  Pedro Alves  <palves@redhat.com>
10573
10574         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10575         (cli_interp_base::~cli_interp_base): New.
10576         (cli_interp): New struct.
10577         (as_cli_interp): Cast the interp itself to cli_interp.
10578         (cli_interpreter_pre_command_loop): Rename to ...
10579         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
10580         parameter.
10581         (cli_interpreter_init): Rename to ...
10582         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
10583         boolean.  Make extern.
10584         (cli_interpreter_resume): Rename to ...
10585         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
10586         extern.
10587         (cli_interpreter_suspend): Rename to ...
10588         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
10589         extern.
10590         (cli_interpreter_exec): Rename to ...
10591         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
10592         extern.
10593         (cli_interpreter_supports_command_editing): Rename to ...
10594         (cli_interp_base::supports_command_editing): ... this.  Remove
10595         'interp' parameter.  Make extern.
10596         (cli_ui_out): Rename to ...
10597         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
10598         Make extern.
10599         (cli_set_logging): Rename to ...
10600         (cli_interp_base::set_logging): ... this.  Remove 'interp'
10601         parameter.  Make extern.
10602         (cli_interp_procs): Delete.
10603         (cli_interp_factory): Adjust to use "new".
10604         * cli/cli-interp.h: Include "interps.h".
10605         (struct cli_interp_base): New struct.
10606         * interps.c (struct interp): Delete.  Fields moved to interps.h.
10607         (interp_new): Delete.
10608         (interp::interp, interp::~interp): New.
10609         (interp_set): Use bool, and return void.  Assume the interpreter
10610         has suspend, init and resume methods, and that the all return
10611         void.
10612         (set_top_level_interpreter): interp_set returns void.
10613         (interp_ui_out): Adapt.
10614         (current_interp_set_logging): Adapt.
10615         (interp_data): Delete.
10616         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10617         (interp_exec): Adapt.
10618         (top_level_interpreter_data): Delete.
10619         * interps.h (interp_init_ftype, interp_resume_ftype)
10620         (interp_suspend_ftype, interp_exec_ftype)
10621         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10622         (class interp): New.
10623         (interp_new): Delete.
10624         (interp_set): Now returns void.  Use bool.
10625         (interp_data, top_level_interpreter_data): Delete.
10626         * mi/mi-common.h: Include interps.h.
10627         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10628         init, resume, suspect, exec, interp_ui_out, set_logging and
10629         pre_command_loop methods.
10630         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10631         (mi_interpreter_init): Rename to ...
10632         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10633         bool, return void and make extern.  Adjust.
10634         (mi_interpreter_resume): ... Rename to ...
10635         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10636         return void and make extern.  Adjust.
10637         (mi_interpreter_suspend): ... Rename to ...
10638         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10639         return void and make extern.  Adjust.
10640         (mi_interpreter_exec): ... Rename to ...
10641         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10642         extern.  Adjust.
10643         (mi_interpreter_pre_command_loop): ... Rename to ...
10644         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10645         parameter and make extern.
10646         (mi_on_normal_stop_1): Adjust.
10647         (mi_ui_out): Rename to ...
10648         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10649         parameter and make extern.  Adjust.
10650         (mi_set_logging): Rename to ...
10651         (mi_interp::set_logging): ... this.  Remove the 'interp'
10652         parameter and make extern.  Adjust.
10653         (mi_interp_procs): Delete.
10654         (mi_interp_factory): Adjust to use 'new'.
10655         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10656         (mi_print_exception, mi_execute_command, mi_load_progress):
10657         Adjust.
10658         * tui/tui-interp.c (tui_interp): New class.
10659         (as_tui_interp): Return a tui_interp pointer.
10660         (tui_on_normal_stop, tui_on_signal_received)
10661         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10662         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10663         to use interp::interp_ui_out.
10664         (tui_init): Rename to ...
10665         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10666         bool, return void and make extern.  Adjust.
10667         (tui_resume): Rename to ...
10668         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10669         return void and make extern.  Adjust.
10670         (tui_suspend): Rename to ...
10671         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10672         return void and make extern.  Adjust.
10673         (tui_ui_out): Rename to ...
10674         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10675         parameter, and make extern.  Adjust.
10676         (tui_exec): Rename to ...
10677         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10678         make extern.
10679         (tui_interp_procs): Delete.
10680         (tui_interp_factory): Use "new".
10681
10682 2017-02-02  Tom Tromey  <tom@tromey.com>
10683
10684         * rust-exp.y (ends_raw_string, space_then_number)
10685         (rust_identifier_start_p): Return bool.
10686         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10687         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10688         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10689         (rust_chartype_p): Return bool.
10690         (val_print_struct, rust_print_struct_def, rust_print_type):
10691         Update.
10692         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10693         Return bool.
10694
10695 2017-02-02  Tom Tromey  <tom@tromey.com>
10696
10697         * rust-lang.c: Reindent.
10698
10699 2017-02-02  Tom Tromey  <tom@tromey.com>
10700
10701         * rust-lang.h (rust_crate_for_block): Update.
10702         * rust-lang.c (rust_crate_for_block): Return std::string.
10703         (rust_get_disr_info): Use std:;string, not
10704         gdb::unique_xmalloc_ptr.
10705         * rust-exp.y (crate_name): Update.
10706
10707 2017-02-02  Pedro Alves  <palves@redhat.com>
10708
10709         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10710         field out of gdb_disassembler_test and make it static.
10711
10712 2017-02-02  Pedro Alves  <palves@redhat.com>
10713
10714         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10715         mi1_interp and mi_interp fields.
10716
10717 2017-02-02  Pedro Alves  <palves@redhat.com>
10718
10719         * cli/cli-interp.c (struct saved_output_files, saved_output):
10720         Moved from cli/cli-logging.c.
10721         (cli_set_logging): New function.
10722         (cli_interp_procs): Install cli_set_logging.
10723         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10724         Declare.
10725         * cli/cli-logging.c (struct saved_output_files, saved_output):
10726         Moved to cli/cli-interp.c.
10727         (pop_output_files): Don't save outputs here.
10728         (make_logging_output): New function.
10729         (handle_redirections): Don't build tee nor save previous outputs
10730         here.
10731         * interps.c (current_interp_set_logging): Change prototype.
10732         Assume there's always a set_logging_proc method installed.
10733         * interps.h (interp_set_logging_ftype): Change prototype.
10734         (current_interp_set_logging): Change prototype and adjust comment.
10735         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10736         use make_logging_output.
10737         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10738 2017-02-02  Pedro Alves  <palves@redhat.com>
10739
10740         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10741         from ...
10742         (set_logging_overwrite): ... here.
10743         (logging_no_redirect_file): Delete.
10744         (set_logging_redirect): Don't handle redirection on the fly.
10745         Instead warn that "logging off" / "logging on" is necessary.
10746         (pop_output_files): Delete references to logging_no_redirect_file.
10747         (show_logging_command): Always speak in terms of what will happen
10748         once logging is reenabled.
10749
10750 2017-02-02  Pedro Alves  <palves@redhat.com>
10751
10752         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10753
10754 2017-02-02  Pedro Alves  <palves@redhat.com>
10755
10756         * disasm.c (gdb_pretty_print_insn): Rename to ...
10757         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10758         Remove gdbarch parameter.  Adapt to clear the object's buffers
10759         instead of allocating new buffers, and to print using the object's
10760         gdb_disassembler instead of calling gdb_print_insn.
10761         (dump_insns): Use gdb_pretty_print_disassembler.
10762         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10763         (gdb_pretty_print_disassembler): New class.
10764         * record-btrace.c (btrace_insn_history): Use
10765         gdb_pretty_print_disassembler.
10766
10767 2017-02-02  Pedro Alves  <palves@redhat.com>
10768
10769         * ada-lang.c (type_as_string): Use string_file.
10770         * ada-valprint.c (ada_print_floating): Use string_file.
10771         * ada-varobj.c (ada_varobj_scalar_image)
10772         (ada_varobj_get_value_image): Use string_file.
10773         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10774         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10775         * breakpoint.c (update_inserted_breakpoint_locations)
10776         (insert_breakpoint_locations, reattach_breakpoints)
10777         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10778         (print_it_watchpoint): Use string_file.
10779         (save_breakpoints): Use stdio_file.
10780         * c-exp.y (oper): Use string_file.
10781         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10782         tee_file.
10783         (pop_output_files): Use delete.
10784         (handle_redirections): Use stdio_file and tee_file.
10785         * cli/cli-setshow.c (do_show_command): Use string_file.
10786         * compile/compile-c-support.c (c_compute_program): Use
10787         string_file.
10788         * compile/compile-c-symbols.c (generate_vla_size): Take a
10789         'string_file &' instead of a 'ui_file *'.
10790         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10791         of a 'ui_file *'.  Use string_file.
10792         (generate_c_for_variable_locations): Take a 'string_file &'
10793         instead of a 'ui_file *'.
10794         * compile/compile-internal.h (generate_c_for_for_one_variable):
10795         Take a 'string_file &' instead of a 'ui_file *'.
10796         * compile/compile-loc2c.c (push, pushf, unary, binary)
10797         (print_label, pushf_register_address, pushf_register)
10798         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10799         'ui_file *'.  Adjust.
10800         * compile/compile.c (compile_to_object): Use string_file.
10801         * compile/compile.h (compile_dwarf_expr_to_c)
10802         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10803         'ui_file *'.
10804         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10805         (replace_typedefs_qualified_name): Use string_file and
10806         obstack_copy0.
10807         * disasm.c (gdb_pretty_print_insn): Use string_file.
10808         (gdb_disassembly): Adjust reference the null_stream global.
10809         (do_ui_file_delete): Delete.
10810         (gdb_insn_length): Use null_stream.
10811         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10812         * dwarf2loc.c (dwarf2_compile_property_to_c)
10813         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10814         'string_file &' instead of a 'ui_file *'.
10815         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10816         * dwarf2read.c (do_ui_file_peek_last): Delete.
10817         (dwarf2_compute_name): Use string_file.
10818         * event-top.c (gdb_setup_readline): Use stdio_file.
10819         * gdbarch.sh (verify_gdbarch): Use string_file.
10820         * gdbtypes.c (safe_parse_type): Use null_stream.
10821         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10822         string_file.
10823         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10824         'string_file *' instead of a 'ui_file *'.
10825         (gdbscm_arch_disassemble): Use string_file.
10826         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10827         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10828         inherits from ui_file.
10829         (ioscm_file_port_delete, ioscm_file_port_rewind)
10830         (ioscm_file_port_put): Delete.
10831         (ioscm_file_port_write): Rename to ...
10832         (ioscm_file_port::write): ... this.  Remove file_port_magic
10833         checks.
10834         (ioscm_file_port_new): Delete.
10835         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10836         ui_file_up.
10837         * guile/scm-type.c (tyscm_type_name): Use string_file.
10838         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10839         Use string_file.
10840         * infcmd.c (print_return_value_1): Use string_file.
10841         * infrun.c (print_target_wait_results): Use string_file.
10842         * language.c (add_language): Use string_file.
10843         * location.c (explicit_to_string_internal): Use string_file.
10844         * main.c (captured_main_1): Use null_file.
10845         * maint.c (maintenance_print_architecture): Use stdio_file.
10846         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10847         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10848         event_channel>: Change type to mi_console_file pointer.
10849         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10850         (mi_console_file_delete): Delete.
10851         (struct mi_console_file): Delete.
10852         (mi_console_file_magic): Delete.
10853         (mi_console_file_new): Delete.
10854         (mi_console_file::mi_console_file): New.
10855         (mi_console_file_delete): Delete.
10856         (mi_console_file_fputs): Delete.
10857         (mi_console_file::write): New.
10858         (mi_console_raw_packet): Delete.
10859         (mi_console_file::flush): New.
10860         (mi_console_file_flush): Delete.
10861         (mi_console_set_raw): Rename to ...
10862         (mi_console_file::set_raw): ... this.
10863         * mi/mi-console.h (class mi_console_file): New class.
10864         (mi_console_file_new, mi_console_set_raw): Delete.
10865         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10866         (mi_set_logging): Use delete and tee_file.  Adjust.
10867         * mi/mi-main.c (output_register): Use string_file.
10868         (mi_cmd_data_evaluate_expression): Use string_file.
10869         (mi_cmd_data_read_memory): Use string_file.
10870         (mi_cmd_execute, print_variable_or_computed): Use string_file.
10871         * mi/mi-out.c (mi_ui_out::main_stream): New.
10872         (mi_ui_out::rewind): Use main_stream and
10873         string_file.
10874         (mi_ui_out::put): Use main_stream and string_file.
10875         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10876         Allocate a 'string_file' instead.
10877         (mi_out_new): Don't allocate a mem_fileopen stream here.
10878         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10879         (mi_ui_out::main_stream): Declare method.
10880         * printcmd.c (eval_command): Use string_file.
10881         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10882         * python/py-arch.c (archpy_disassemble): Use string_file.
10883         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10884         * python/py-frame.c (frapy_str): Use string_file.
10885         * python/py-framefilter.c (py_print_type, py_print_single_arg):
10886         Use string_file.
10887         * python/py-type.c (typy_str): Use string_file.
10888         * python/py-unwind.c (unwind_infopy_str): Use string_file.
10889         * python/py-value.c (valpy_str): Use string_file.
10890         * record-btrace.c (btrace_insn_history): Use string_file.
10891         * regcache.c (regcache_print): Use stdio_file.
10892         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10893         * remote.c (escape_buffer): Use string_file.
10894         * rust-lang.c (rust_get_disr_info): Use string_file.
10895         * serial.c (serial_open_ops_1): Use stdio_file.
10896         (do_serial_close): Use delete.
10897         * stack.c (print_frame_arg): Use string_file.
10898         (print_frame_args): Remove local mem_fileopen stream, not used.
10899         (print_frame): Use string_file.
10900         * symmisc.c (maintenance_print_symbols): Use stdio_file.
10901         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10902         Take a 'string_file *' instead of a 'ui_file *'.
10903         * top.c (new_ui): Use stdio_file and stderr_file.
10904         (free_ui): Use delete.
10905         (execute_command_to_string): Use string_file.
10906         (quit_confirm): Use string_file.
10907         * tracepoint.c (collection_list::append_exp): Use string_file.
10908         * tui/tui-disasm.c (tui_disassemble): Use string_file.
10909         * tui/tui-file.c: Don't include "ui-file.h".
10910         (enum streamtype, struct tui_stream): Delete.
10911         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10912         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10913         (tui_file::tui_file): New method.
10914         (tui_file_fputs): Delete.
10915         (tui_file_get_strbuf): Delete.
10916         (tui_file::puts): New method.
10917         (tui_file_adjust_strbuf): Delete.
10918         (tui_file_flush): Delete.
10919         (tui_file::flush): New method.
10920         * tui/tui-file.h: Tweak intro comment.
10921         Include ui-file.h.
10922         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10923         (tui_file_adjust_strbuf): Delete declarations.
10924         (class tui_file): New class.
10925         * tui/tui-io.c (tui_initialize_io): Use tui_file.
10926         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10927         (tui_register_format): Use string_stream.
10928         * tui/tui-stack.c (tui_make_status_line): Use string_file.
10929         (tui_get_function_from_frame): Use string_file.
10930         * typeprint.c (type_to_string): Use string_file.
10931         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10932         (null_stream): New global.
10933         (ui_file_delete): Delete.
10934         (ui_file::ui_file): New.
10935         (null_file_isatty): Delete.
10936         (ui_file::~ui_file): New.
10937         (null_file_rewind): Delete.
10938         (ui_file::printf): New.
10939         (null_file_put): Delete.
10940         (null_file_flush): Delete.
10941         (ui_file::putstr): New.
10942         (null_file_write): Delete.
10943         (ui_file::putstrn): New.
10944         (null_file_read): Delete.
10945         (ui_file::putc): New.
10946         (null_file_fputs): Delete.
10947         (null_file_write_async_safe): Delete.
10948         (ui_file::vprintf): New.
10949         (null_file_delete): Delete.
10950         (null_file::write): New.
10951         (null_file_fseek): Delete.
10952         (null_file::puts): New.
10953         (ui_file_data): Delete.
10954         (null_file::write_async_safe): New.
10955         (gdb_flush, ui_file_isatty): Adjust.
10956         (ui_file_put, ui_file_rewind): Delete.
10957         (ui_file_write): Adjust.
10958         (ui_file_write_for_put): Delete.
10959         (ui_file_write_async_safe, ui_file_read): Adjust.
10960         (ui_file_fseek): Delete.
10961         (fputs_unfiltered): Adjust.
10962         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10963         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10964         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10965         (set_ui_file_data): Delete.
10966         (string_file::~string_file, string_file::write)
10967         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10968         (do_ui_file_as_string, ui_file_as_string): Delete.
10969         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10970         (struct mem_file): Delete.
10971         (mem_file_new): Delete.
10972         (stdio_file::stdio_file): New.
10973         (mem_file_delete): Delete.
10974         (stdio_file::stdio_file): New.
10975         (mem_fileopen): Delete.
10976         (stdio_file::~stdio_file): New.
10977         (mem_file_rewind): Delete.
10978         (stdio_file::set_stream): New.
10979         (mem_file_put): Delete.
10980         (stdio_file::open): New.
10981         (mem_file_write): Delete.
10982         (stdio_file_magic, struct stdio_file): Delete.
10983         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10984         (stdio_file::flush): New.
10985         (stdio_file_read): Rename to ...
10986         (stdio_file::read): ... this.  Adjust.
10987         (stdio_file_write): Rename to ...
10988         (stdio_file::write): ... this.  Adjust.
10989         (stdio_file_write_async_safe): Rename to ...
10990         (stdio_file::write_async_safe) ... this.  Adjust.
10991         (stdio_file_fputs): Rename to ...
10992         (stdio_file::puts) ... this.  Adjust.
10993         (stdio_file_isatty): Delete.
10994         (stdio_file_fseek): Delete.
10995         (stdio_file::isatty): New.
10996         (stderr_file_write): Rename to ...
10997         (stderr_file::write) ... this.  Adjust.
10998         (stderr_file_fputs): Rename to ...
10999         (stderr_file::puts) ... this.  Adjust.
11000         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11001         (stderr_file::stderr_file): New.
11002         (tee_file_magic): Delete.
11003         (struct tee_file): Delete.
11004         (tee_file::tee_file): New.
11005         (tee_file_new): Delete.
11006         (tee_file::~tee_file): New.
11007         (tee_file_delete): Delete.
11008         (tee_file_flush): Rename to ...
11009         (tee_file::flush): ... this.  Adjust.
11010         (tee_file_write): Rename to ...
11011         (tee_file::write): ... this.  Adjust.
11012         (tee_file::write_async_safe): New.
11013         (tee_file_fputs): Rename to ...
11014         (tee_file::puts): ... this.  Adjust.
11015         (tee_file_isatty): Rename to ...
11016         (tee_file::isatty): ... this.  Adjust.
11017         * ui-file.h (struct obstack, struct ui_file): Don't
11018         forward-declare.
11019         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11020         (ui_file_write_ftype)
11021         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11022         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11023         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11024         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11025         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11026         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11027         (set_ui_file_fseek): Delete.
11028         (ui_file_data, ui_file_delete, ui_file_rewind)
11029         (struct ui_file): New.
11030         (ui_file_up): New.
11031         (class null_file): New.
11032         (null_stream): Declare.
11033         (ui_file_write_for_put, ui_file_put): Delete.
11034         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11035         Delete.
11036         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11037         (gdb_fopen, tee_file_new): Delete.
11038         (struct string_file): New.
11039         (struct stdio_file): New.
11040         (stdio_file_up): New.
11041         (struct stderr_file): New.
11042         (class tee_file): New.
11043         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11044         of a 'ui_file *'.  Adjust.
11045         * ui-out.h (class ui_out) <field_stream>: Likewise.
11046         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11047         (null_stream): Delete.
11048         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11049         Adjust.
11050         * utils.h (struct ui_file): Delete forward declaration..
11051         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11052         (error_stream): Take a 'string_file &' instead of a
11053         'ui_file *'.
11054         * varobj.c (varobj_value_get_print_value): Use string_file.
11055         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11056         * gdbarch.c: Regenerate.
11057
11058 2017-02-02  Pedro Alves  <palves@redhat.com>
11059
11060         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11061         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11062         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11063         Adjust to call gdb_print_insn instead of
11064         gdb_disassembler::print_insn.
11065         (dump_insns, do_mixed_source_and_assembly_deprecated)
11066         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11067         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11068         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11069         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11070         declaration.
11071         (gdb_pretty_print_insn): Re-add declaration.
11072         * record-btrace.c (btrace_insn_history): Don't allocate a
11073         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11074
11075 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11076
11077         * disasm.h (gdb_disassembly): Remove file_string parameter.
11078         * disasm.c (gdb_disassembly): Likewise.
11079         * cli/cli-cmds.c (print_disassembly): Adapt.
11080         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11081         * stack.c (do_gdb_disassembly): Likewise.
11082
11083 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11084
11085         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11086         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11087         targets.  And if the implicit value is longer than needed, extract
11088         the first bytes instead of the "least significant" ones.
11089
11090 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11091
11092         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11093         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11094         (btrace_fetch): Assert can_access_registers_ptid.
11095         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11096         validate_registers_access.
11097
11098 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11099
11100         * gdbthread.h (can_access_registers_ptid): New.
11101         * thread.c (can_access_registers_ptid): New.
11102
11103 2017-02-01  Pedro Alves  <palves@redhat.com>
11104
11105         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11106
11107 2017-01-31  Pedro Alves  <palves@redhat.com>
11108
11109         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11110         Fix typos.
11111
11112 2017-01-31  Pedro Alves  <palves@redhat.com>
11113
11114         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11115         not used.
11116
11117 2017-01-31  Pedro Alves  <palves@redhat.com>
11118
11119         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11120
11121 2017-01-31  Pedro Alves  <palves@redhat.com>
11122
11123         * common/scoped_restore.h
11124         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11125         change the value's parameter type to T2.
11126         (make_scoped_restore): Likewise.
11127
11128 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11129             Richard Henderson  <rth@redhat.com>
11130
11131         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11132         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11133         GS_BASE for older kernels.
11134         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11135         GS_BASE for older kernels.
11136         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11137         and GS_BASE to the offset table.
11138         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11139         system register group.
11140         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11141         for older kernels.
11142         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11143         amd64 ABI.
11144         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11145         AMD64_GSBASE_REGNUM.
11146         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11147         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11148         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11149         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11150         i386/64bit-segments.xml in those rules.
11151         * features/i386/64bit-segments.xml: New file.
11152         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11153         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11154         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11155         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11156         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11157         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11158         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11159         * features/i386/amd64-avx-linux.c: Regenerated.
11160         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11161         * features/i386/amd64-avx-mpx.c: Regenerated.
11162         * features/i386/amd64-avx512-linux.c: Regenerated.
11163         * features/i386/amd64-linux.c: Regenerated.
11164         * features/i386/amd64-mpx-linux.c: Regenerated.
11165         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11166         * features/i386/i386-avx-mpx.c: Regenerated.
11167         * features/i386/x32-avx-linux.c: Regenerated.
11168         * features/i386/x32-avx512-linux.c: Regenerated.
11169         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11170         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11171         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11172         * regformats/i386/amd64-linux.dat: Regenerated.
11173         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11174         * regformats/i386/x32-avx-linux.dat: Regenerated.
11175         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11176         * regformats/i386/x32-linux.dat: Regenerated.
11177
11178 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11179
11180         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11181         Set to AMD64_NUM_REGS.
11182
11183 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11184
11185         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11186         that checks validity of a register number.
11187
11188 2017-01-27  Kees Cook  <keescook@google.com>
11189
11190         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11191         fetch_fpregs if target has fpa registers.
11192         (arm_linux_store_inferior_registers): Call store_fpregs if target
11193         has fpa registers.
11194
11195 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11196
11197         * cris-tdep.c (cris_gdbarch_init): Remove check for
11198         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11199
11200 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11201
11202         * corelow.c (get_core_register_section): Check for regset
11203         existence before checking for REGSET_VARIABLE_SIZE.
11204
11205 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11206             Pedro Alves  <palves@redhat.com>
11207
11208         PR gdb/20939
11209         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11210         call memory_error, save memaddr instead.
11211         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11212         negative, cal memory_error.
11213         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11214
11215 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11216
11217         * disasm-selftests.c (memory_error_test): New function.
11218         (_initialize_disasm_selftests): Register memory_error_test.
11219
11220 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11221
11222         * Makefile.in (SFILES): Add disasm-selftests.c and
11223         selftest-arch.c.
11224         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11225         * disasm-selftests.c: New file.
11226         * selftest-arch.c: New file.
11227         * selftest-arch.h: New file.
11228
11229 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11230
11231         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11232         to bfd_arch_mep.  Don't return 0 if section is not
11233         found.  Call print_insn_mep.
11234
11235 2017-01-26  Pedro Alves  <palves@redhat.com>
11236             Yao Qi  <yao.qi@linaro.org>
11237
11238         * arm-tdep.c: Include "disasm.h".
11239         (gdb_print_insn_arm): Update code to get gdbarch.
11240         * disasm.c (dis_asm_read_memory): Change it to
11241         gdb_disassembler::dis_asm_read_memory.
11242         (dis_asm_memory_error): Likewise.
11243         (dis_asm_print_address): Likewise.
11244         (gdb_pretty_print_insn): Change it to
11245         gdb_disassembler::pretty_print_insn.
11246         (dump_insns): Add one argument gdb_disassemlber.  All
11247         callers updated.
11248         (do_mixed_source_and_assembly_deprecated): Likewise.
11249         (do_mixed_source_and_assembly): Likewise.
11250         (do_assembly_only): Likewise.
11251         (gdb_disassembler::gdb_disassembler): New.
11252         (gdb_disassembler::print_insn): New.
11253         * disasm.h (class gdb_disassembler): New.
11254         (gdb_pretty_print_insn): Remove declaration.
11255         (gdb_disassemble_info): Likewise.
11256         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11257         (gdbscm_disasm_read_memory_worker): Update.
11258         (gdbscm_disasm_read_memory): Update.
11259         (gdbscm_disasm_memory_error): Remove.
11260         (gdbscm_disasm_print_address): Remove.
11261         (gdbscm_disassembler::gdbscm_disassembler): New.
11262         (gdbscm_print_insn_from_port): Update.
11263         * mips-tdep.c: Include disasm.h.
11264         (gdb_print_insn_mips): Update code to get gdbarch.
11265         * record-btrace.c (btrace_insn_history): Update.
11266         * spu-tdep.c: Include disasm.h.
11267         (struct spu_dis_asm_data): Remove.
11268         (struct spu_dis_asm_info): New.
11269         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11270         SPU id.
11271         (gdb_print_insn_spu): Cast disassemble_info to
11272         spu_dis_asm_info.
11273
11274 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11275
11276         * disasm.c (do_ui_file_delete): Delete.
11277         (gdb_insn_length): Move code creating stream to ...
11278         * utils.c (null_stream): ... here.  New function.
11279         * utils.h (null_stream): Declare.
11280
11281 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11282
11283         * python/py-inferior.c (find_thread_object): Return directly
11284         from the loop.  Remove "found" variable.
11285
11286 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11287
11288         GDB 7.12.1 released.
11289
11290 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11291
11292         * python/py-function.c (fnpy_call): Reorder declarations to have
11293         the gdbpy_enter object declared first.
11294         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11295
11296 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11297
11298         PR python/21068
11299         * python/python-internal.h (PyMem_RawMalloc): Define for
11300         Python < 3.4.
11301         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11302         PyMem_RawMalloc instead of PyMem_Malloc.
11303
11304 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11305             Luis Machado  <lgustavo@codesourcery.com>
11306
11307         * NEWS (New commands): Mention flash-erase.
11308         (New MI commands): Mention target-flash-erase.
11309         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11310         command.
11311         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11312         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11313         * target.c (flash_erase_command): New function.
11314         (initialize_targets): Add new flash-erase command.
11315         * target.h (flash_erase_command): New declaration.
11316
11317 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11318
11319         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11320         HAVE_SYS_PROCFS_H is defined.
11321
11322 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11323
11324         * remote.c (struct cached_reg): Change data into a pointer.
11325         * (stop_reply_dtr): Free data pointers before deleting vector.
11326         (process_stop_reply): Likewise.
11327         (remote_parse_stop_reply): Allocate space for data
11328
11329 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11330
11331         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11332         MAX_REGISTER_SIZE.
11333         (amd64_pseudo_register_read_value): Likewise.
11334         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11335         (store_register_using_P): Likewise.
11336         * regcache.c (regcache_xfer_part): Likewise.
11337
11338 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11339
11340         Split real and pseudo registers.
11341         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11342         (sparc32_pseudo_regnum): New enum.
11343         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11344         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11345         (SPARC32_CP0_REGISTERS): New macro.
11346         (sparc32_pseudo_register_name): New function.
11347         (sparc32_register_name): Use sparc32_pseudo_register_name.
11348         (sparc32_pseudo_register_type): New function.
11349         (sparc32_register_type): Use sparc32_pseudo_register_type.
11350         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11351         pseudo register numbers.
11352         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11353         (SPARC64_CP0_REGISTERS): New macro.
11354         (sparc64_pseudo_register_name): New function.
11355         (sparc64_register_name): Use sparc64_pseudo_register_name.
11356         (sparc64_pseudo_register_type): New function.
11357         (sparc64_register_type): Use sparc64_pseudo_register_type.
11358         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11359         pseudo register numbers.
11360         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11361         sparc64_store_arguments): Handle pseudo register numbers.
11362
11363 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11364
11365         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11366         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11367         output.
11368         (getpkt_or_notif_sane_1): Likewise.
11369
11370 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11371
11372         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11373         of CC.  Pass "-x c++-header" instead of "-x c".
11374
11375 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11376
11377         * remote.c (remote_can_async_p): Update comment.
11378
11379 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11380
11381         * linux-nat.c (linux_nat_can_async_p): Update comment.
11382
11383 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11384
11385         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11386
11387 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11388
11389         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11390
11391 2017-01-10  Tom Tromey  <tom@tromey.com>
11392
11393         * python/py-type.c (typy_legacy_template_argument): Update.
11394         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11395         ~demangle_parse_info): Declare new members.
11396         (cp_demangled_name_to_comp): Return unique_ptr.
11397         (cp_demangled_name_parse_free)
11398         (make_cleanup_cp_demangled_name_parse_free)
11399         (cp_new_demangle_parse_info): Remove.
11400         * cp-support.c (do_demangled_name_parse_free_cleanup)
11401         (make_cleanup_cp_demangled_name_parse_free): Remove.
11402         (inspect_type, cp_canonicalize_string_full)
11403         (cp_canonicalize_string): Update.
11404         (mangled_name_to_comp): Change return type.
11405         (cp_class_name_from_physname, method_name_from_physname)
11406         (cp_func_name, cp_remove_params): Update.
11407         * cp-name-parser.y (demangle_parse_info): New constructor, from
11408         cp_new_demangle_parse_info.
11409         (~demangle_parse_info): New destructor, from
11410         cp_demangled_name_parse_free.
11411         (cp_merge_demangle_parse_infos): Update.
11412         (cp_demangled_name_to_comp): Change return type.
11413
11414 2017-01-10  Tom Tromey  <tom@tromey.com>
11415
11416         * top.c (prevent_dont_repeat): Change return type.
11417         * python/python.c (execute_gdb_command): Use std::string.
11418         Update.
11419         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11420         * command.h (prevent_dont_repeat): Change return type.
11421         * breakpoint.c (bpstat_do_actions_1): Update.
11422
11423 2017-01-10  Tom Tromey  <tom@tromey.com>
11424
11425         * value.h (scoped_value_mark::~scoped_value_mark): Call
11426         free_to_mark.
11427         (scoped_value_mark::free_to_mark): New method.
11428         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11429         scoped_value_mark.
11430
11431 2017-01-10  Tom Tromey  <tom@tromey.com>
11432
11433         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11434         (valpy_reference_value, valpy_const_value, valpy_get_address)
11435         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11436         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11437         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11438         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11439         scoped_value_mark.
11440         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11441         * value.h (scoped_value_mark): New class.
11442
11443 2017-01-10  Tom Tromey  <tom@tromey.com>
11444
11445         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11446         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11447         * psymtab.c (discard_psymtabs_upto): Remove.
11448         (make_cleanup_discard_psymtabs): Remove.
11449         (struct psymtab_state): Remove.
11450
11451 2017-01-10  Tom Tromey  <tom@tromey.com>
11452
11453         * record-full.c (record_full_save_cleanups): Remove.
11454         (record_full_save): Use gdb::unlinker.
11455         * gcore.c (do_bfd_delete_cleanup): Remove.
11456         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11457         cleanups.
11458         * dwarf2read.c (unlink_if_set): Remove.
11459         (write_psymtabs_to_index): Use gdb::unlinker.
11460         * common/gdb_unlinker.h: New file.
11461
11462 2017-01-10  Tom Tromey  <tom@tromey.com>
11463
11464         * windows-tdep.c (windows_xfer_shared_library): Update.
11465         * windows-nat.c (windows_make_so): Update.
11466         * utils.h (make_cleanup_bfd_unref): Remove.
11467         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11468         * symfile.h (symfile_bfd_open)
11469         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11470         * symfile.c (read_symbols, symbol_file_add)
11471         (separate_debug_file_exists): Update.
11472         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11473         (generic_load, reread_symbols): Update.
11474         * symfile-mem.c (symbol_file_add_from_memory): Update.
11475         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11476         (spu_symbol_file_add_from_memory): Update.
11477         * solist.h (struct target_so_ops) <bfd_open>: Return
11478         gdb_bfd_ref_ptr.
11479         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11480         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11481         gdb_bfd_ref_ptr.
11482         (solib_map_sections, reload_shared_libraries_1): Update.
11483         * solib-svr4.c (enable_break): Update.
11484         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11485         * solib-frv.c (enable_break2): Update.
11486         * solib-dsbt.c (enable_break): Update.
11487         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11488         gdb_bfd_ref_ptr.
11489         (darwin_solib_get_all_image_info_addr_at_init): Update.
11490         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11491         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11492         * record-full.c (record_full_save): Update.
11493         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11494         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11495         * minidebug.c (find_separate_debug_file_in_section): Return
11496         gdb_bfd_ref_ptr.
11497         * machoread.c (macho_add_oso_symfile): Change abfd to
11498         gdb_bfd_ref_ptr.
11499         (macho_symfile_read_all_oso): Update.
11500         (macho_check_dsym): Return gdb_bfd_ref_ptr.
11501         (macho_symfile_read): Update.
11502         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11503         (jit_bfd_try_read_symtab): Update.
11504         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11505         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11506         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11507         gdb_bfd_ref_ptr.
11508         (gdb_bfd_ref_policy): New struct.
11509         (gdb_bfd_ref_ptr): New typedef.
11510         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11511         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11512         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11513         gdb_bfd_ref_ptr.
11514         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11515         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11516         (gcore_command): Update.
11517         * exec.c (exec_file_attach): Update.
11518         * elfread.c (elf_symfile_read): Update.
11519         * dwarf2read.c (dwarf2_get_dwz_file): Update.
11520         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11521         (open_and_init_dwo_file): Update.
11522         (open_dwp_file): Return gdb_bfd_ref_ptr.
11523         (open_and_init_dwp_file): Update.
11524         * corelow.c (core_open): Update.
11525         * compile/compile-object-load.c (compile_object_load): Update.
11526         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11527         * coffread.c (coff_symfile_read): Update.
11528         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11529         gdb_bfd_ref_ptr.  Rename.
11530         (dump_bfd_file, restore_command): Update.
11531         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11532         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11533         (find_separate_debug_file_by_buildid): Update.
11534
11535 2017-01-10  Tom Tromey  <tom@tromey.com>
11536
11537         * common/gdb_ref_ptr.h: New file.
11538         * python/py-ref.h (struct gdbpy_ref_policy): New.
11539         (gdbpy_ref): Now a typedef.
11540
11541 2017-01-10  Tom Tromey  <tom@tromey.com>
11542
11543         * utils.h (make_cleanup_htab_delete): Don't declare.
11544         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11545         Remove.
11546         * linespec.c (decode_compound_collector): Add constructor,
11547         destructor.
11548         (lookup_prefix_sym): Remove cleanup.
11549         (symtab_collector): Add constructor, destructor.
11550         (collect_symtabs_from_filename): Remove cleanup.
11551         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11552         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11553         Use htab_up.
11554         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11555         * dwarf2read.c (dw2_expand_symtabs_matching)
11556         (dw2_map_symbol_filenames, dwarf_decode_macros)
11557         (write_psymtabs_to_index): Use htab_up.
11558         * dwarf2loc.c (func_verify_no_selftailcall)
11559         (call_site_find_chain_1, func_verify_no_selftailcall)
11560         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11561         std::vector, gdb::unique_xmalloc_ptr.
11562         (call_sitep): Remove typedef.
11563         (dwarf2_locexpr_baton_eval): Remove unused variable.
11564
11565 2017-01-10  Tom Tromey  <tom@tromey.com>
11566
11567         * python/python-internal.h (make_cleanup_py_decref)
11568         (make_cleanup_py_xdecref): Don't declare.
11569         * python/py-utils.c (py_decref, make_cleanup_py_decref)
11570         (py_xdecref, make_cleanup_py_xdecref): Remove.
11571
11572 2017-01-10  Tom Tromey  <tom@tromey.com>
11573
11574         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11575         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11576
11577 2017-01-10  Tom Tromey  <tom@tromey.com>
11578
11579         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11580
11581 2017-01-10  Tom Tromey  <tom@tromey.com>
11582
11583         * python/py-utils.c (unicode_to_encoded_string)
11584         (python_string_to_target_string)
11585         (python_string_to_target_python_string)
11586         (python_string_to_host_string, gdbpy_obj_to_string)
11587         (get_addr_from_python): Use gdbpy_ref.
11588
11589 2017-01-10  Tom Tromey  <tom@tromey.com>
11590
11591         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11592         gdbpy_ref.
11593
11594 2017-01-10  Tom Tromey  <tom@tromey.com>
11595
11596         * python/python.c (eval_python_command, gdbpy_decode_line)
11597         (gdbpy_run_events, gdbpy_start_type_printers)
11598         (gdbpy_apply_type_printers): Use gdbpy_ref.
11599
11600 2017-01-10  Tom Tromey  <tom@tromey.com>
11601
11602         * python/py-param.c (get_doc_string, compute_enum_values): Use
11603         gdbpy_ref.
11604
11605 2017-01-10  Tom Tromey  <tom@tromey.com>
11606
11607         * python/py-inferior.c (find_thread_object, build_inferior_list):
11608         Use gdbpy_ref.
11609
11610 2017-01-10  Tom Tromey  <tom@tromey.com>
11611
11612         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11613
11614 2017-01-10  Tom Tromey  <tom@tromey.com>
11615
11616         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11617         gdbpy_ref.
11618
11619 2017-01-10  Tom Tromey  <tom@tromey.com>
11620
11621         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11622         extra incref.
11623         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11624         Use gdbpy_ref.
11625
11626 2017-01-10  Tom Tromey  <tom@tromey.com>
11627
11628         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11629         gdbpy_ref.
11630
11631 2017-01-10  Tom Tromey  <tom@tromey.com>
11632
11633         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11634         decref results of PyArg_ParseTupleAndKeywords.
11635
11636 2017-01-10  Tom Tromey  <tom@tromey.com>
11637
11638         * python/python.c (python_run_simple_file): Use
11639         unique_xmalloc_ptr, gdbpy_ref.
11640
11641 2017-01-10  Tom Tromey  <tom@tromey.com>
11642
11643         * python/py-prettyprint.c (print_stack_unless_memory_error)
11644         (print_string_repr, print_children): Use gdbpy_ref.
11645         (dummy_python_frame): New class.
11646         (dummy_python_frame::dummy_python_frame): Rename from
11647         push_dummy_python_frame.
11648         (py_restore_tstate): Remove.
11649
11650 2017-01-10  Tom Tromey  <tom@tromey.com>
11651
11652         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11653
11654 2017-01-10  Tom Tromey  <tom@tromey.com>
11655
11656         * python/python.c (ensure_python_env, restore_python_env):
11657         Remove.
11658         * python/python-internal.h (ensure_python_env): Don't declare.
11659         * varobj.h (varobj_ensure_python_env): Don't declare.
11660         * varobj.c (varobj_ensure_python_env): Remove.
11661
11662 2017-01-10  Tom Tromey  <tom@tromey.com>
11663
11664         * varobj.c (varobj_value_get_print_value): Use
11665         gdbpy_enter_varobj.
11666
11667 2017-01-10  Tom Tromey  <tom@tromey.com>
11668
11669         * python/py-prettyprint.c (print_string_repr, print_children):
11670         Update.
11671         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11672         of "encoding".
11673         * varobj.c (varobj_value_get_print_value): Update.
11674         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11675
11676 2017-01-10  Tom Tromey  <tom@tromey.com>
11677
11678         * varobj.c (varobj_get_display_hint)
11679         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11680         (varobj_set_visualizer, free_variable): Use
11681         gdbpy_enter_varobj.
11682
11683 2017-01-10  Tom Tromey  <tom@tromey.com>
11684
11685         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11686         (do_finish_initialization): New function.  Use gdbpy_ref.
11687         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11688         do_finish_initialization.
11689
11690 2017-01-10  Tom Tromey  <tom@tromey.com>
11691
11692         * python/py-param.c (get_set_value, get_show_value): Use
11693         gdbpy_enter, gdbpy_ref.
11694
11695 2017-01-10  Tom Tromey  <tom@tromey.com>
11696
11697         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11698
11699 2017-01-10  Tom Tromey  <tom@tromey.com>
11700
11701         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11702
11703 2017-01-10  Tom Tromey  <tom@tromey.com>
11704
11705         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11706         Use gdbpy_enter_varobj.
11707
11708 2017-01-10  Tom Tromey  <tom@tromey.com>
11709
11710         * varobj.c (gdbpy_enter_varobj): New constructor.
11711         * python/python-internal.h (gdbpy_enter_varobj): New class.
11712         * python/py-varobj.c (py_varobj_get_iterator): Use
11713         gdbpy_enter_varobj.
11714
11715 2017-01-10  Tom Tromey  <tom@tromey.com>
11716
11717         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11718         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11719         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11720         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11721         unique_xmalloc_ptr.
11722         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11723
11724 2017-01-10  Tom Tromey  <tom@tromey.com>
11725
11726         * python/py-xmethods.c (invoke_match_method): Use
11727         gdbpy_ref.
11728
11729 2017-01-10  Tom Tromey  <tom@tromey.com>
11730
11731         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11732         gdbpy_enter, gdbpy_ref.
11733
11734 2017-01-10  Tom Tromey  <tom@tromey.com>
11735
11736         * python/python.c (python_interactive_command): Use gdbpy_enter.
11737
11738 2017-01-10  Tom Tromey  <tom@tromey.com>
11739
11740         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11741         gdbpy_ref.
11742
11743 2017-01-10  Tom Tromey  <tom@tromey.com>
11744
11745         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11746         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11747
11748 2017-01-10  Tom Tromey  <tom@tromey.com>
11749
11750         * utils.h (htab_deleter): New struct.
11751         (htab_up): New typedef.
11752         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11753         gdbpy_enter, gdbpy_ref, htab_up.
11754
11755 2017-01-10  Tom Tromey  <tom@tromey.com>
11756
11757         * python/py-unwind.c (pending_frame_invalidate): Remove.
11758         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11759
11760 2017-01-10  Tom Tromey  <tom@tromey.com>
11761
11762         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11763         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11764
11765 2017-01-10  Tom Tromey  <tom@tromey.com>
11766
11767         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11768
11769 2017-01-10  Tom Tromey  <tom@tromey.com>
11770
11771         * python/python.c (gdbpy_eval_from_control_command)
11772         (gdbpy_source_script, gdbpy_run_events)
11773         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11774         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11775         gdbpy_enter.
11776
11777 2017-01-10  Tom Tromey  <tom@tromey.com>
11778
11779         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11780
11781 2017-01-10  Tom Tromey  <tom@tromey.com>
11782
11783         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11784
11785 2017-01-10  Tom Tromey  <tom@tromey.com>
11786
11787         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11788         (python_on_inferior_call_pre, python_on_inferior_call_post)
11789         (python_on_memory_change, python_on_register_change)
11790         (python_inferior_exit, python_new_objfile, add_thread_object)
11791         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11792
11793 2017-01-10  Tom Tromey  <tom@tromey.com>
11794
11795         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11796         (bpfinishpy_handle_exit): Use gdbpy_enter.
11797
11798 2017-01-10  Tom Tromey  <tom@tromey.com>
11799
11800         * python/py-cmd.c (cmdpy_destroyer)
11801         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11802         gdbpy_enter.
11803
11804 2017-01-10  Tom Tromey  <tom@tromey.com>
11805
11806         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11807         gdbpy_enter.
11808         (gdbpy_breakpoint_has_cond): Likewise.
11809
11810 2017-01-10  Tom Tromey  <tom@tromey.com>
11811
11812         * python/python.c (gdbpy_enter): New constructor.
11813         (~gdbpy_enter): New destructor.
11814         (restore_python_env, ensure_python_env): Rewrite.
11815         * python/python-internal.h (gdbpy_enter): New class.
11816
11817 2017-01-10  Tom Tromey  <tom@tromey.com>
11818
11819         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11820
11821 2017-01-10  Tom Tromey  <tom@tromey.com>
11822
11823         * python/py-value.c (value_has_field, get_field_flag)
11824         (get_field_type, valpy_getitem, convert_value_from_python): Use
11825         gdbpy_ref.
11826
11827 2017-01-10  Tom Tromey  <tom@tromey.com>
11828
11829         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11830         gdbpy_ref.
11831
11832 2017-01-10  Tom Tromey  <tom@tromey.com>
11833
11834         * python/py-prettyprint.c (search_pp_list)
11835         (find_pretty_printer_from_objfiles)
11836         (find_pretty_printer_from_progspace)
11837         (find_pretty_printer_from_gdb, find_pretty_printer)
11838         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11839         gdbpy_ref.
11840
11841 2017-01-10  Tom Tromey  <tom@tromey.com>
11842
11843         * python/py-param.c (call_doc_function): Use gdbpy_ref.
11844
11845 2017-01-10  Tom Tromey  <tom@tromey.com>
11846
11847         * python/py-linetable.c (build_line_table_tuple_from_pcs)
11848         (ltpy_get_all_source_lines): Use gdbpy_ref.
11849
11850 2017-01-10  Tom Tromey  <tom@tromey.com>
11851
11852         * python/py-framefilter.c (extract_sym, extract_value)
11853         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11854         gdbpy_ref.
11855
11856 2017-01-10  Tom Tromey  <tom@tromey.com>
11857
11858         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11859
11860 2017-01-10  Tom Tromey  <tom@tromey.com>
11861
11862         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11863
11864 2017-01-10  Tom Tromey  <tom@tromey.com>
11865
11866         * python/py-function.c (convert_values_to_python, fnpy_init): Use
11867         gdbpy_ref.
11868
11869 2017-01-10  Tom Tromey  <tom@tromey.com>
11870
11871         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11872
11873 2017-01-10  Tom Tromey  <tom@tromey.com>
11874
11875         * python/py-type.c (convert_field, make_fielditem, typy_fields)
11876         (typy_range): Use gdbpy_ref.
11877
11878 2017-01-10  Tom Tromey  <tom@tromey.com>
11879
11880         * python/py-threadevent.c (create_thread_event_object): Use
11881         gdbpy_ref.
11882         * python/py-stopevent.c (create_stop_event_object): Simplify.
11883         (emit_stop_event): Use gdbpy_ref.
11884         * python/py-signalevent.c (create_signal_event_object): Use
11885         gdbpy_ref.
11886         * python/py-newobjfileevent.c (create_new_objfile_event_object)
11887         (emit_new_objfile_event, create_clear_objfiles_event_object)
11888         (emit_clear_objfiles_event): Use gdbpy_ref.
11889         * python/py-infevents.c (create_inferior_call_event_object)
11890         (create_register_changed_event_object)
11891         (create_memory_changed_event_object, emit_inferior_call_event)
11892         (emit_memory_changed_event, emit_register_changed_event): Use
11893         gdbpy_ref.
11894         * python/py-exitedevent.c (create_exited_event_object)
11895         (emit_exited_event): Use gdbpy_ref.
11896         * python/py-event.h (evpy_emit_event): Remove
11897         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11898         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11899         * python/py-continueevent.c (emit_continue_event): Use
11900         gdbpy_ref.
11901         * python/py-breakpoint.c (gdbpy_breakpoint_created)
11902         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11903         gdbpy_ref.
11904         * python/py-bpevent.c (create_breakpoint_event_object): Use
11905         gdbpy_ref.
11906
11907 2017-01-10  Tom Tromey  <tom@tromey.com>
11908
11909         * python/py-ref.h: New file.
11910
11911 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11912
11913         * cli-out.c (cli_ui_out::do_redirect): Change return type to
11914         void.
11915         * cli-out.h (cli_ui_out::do_redirect): Likewise.
11916         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11917         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11918         * ui-out.c (ui_out::redirect): Likewise.
11919         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11920         * cli/cli-logging.c (set_logging_redirect): Update call site of
11921         ui_out::redirect.
11922         (handle_redirections): Likewise.
11923         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11924         * top.c (execute_command_to_string): Likewise.
11925         * utils.c (do_ui_out_redirect_pop): Likewise.
11926
11927 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11928
11929         * stack.c (_initialize_stack): Update "frame" command help message.
11930
11931 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
11932
11933         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11934
11935 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11936
11937         * x86-linux-nat.h: Include gdb_proc_service.h.
11938
11939 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11940
11941         * ser-base.h: Include serial.h.
11942
11943 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11944
11945         * ppc-linux-tdep.h: Include ppc-tdep.h.
11946
11947 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11948
11949         * nat/amd64-linux-siginfo.h: Include signal.h.
11950
11951 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11952
11953         * nat/aarch64-linux-hw-point.h: Include break-common.h.
11954
11955 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11956
11957         * mi/mi-parse.h: Include mi-cmds.h.
11958
11959 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11960
11961         * inf-loop.c: Don't include "target.h".
11962         * inf-loop.h: Include it here.
11963
11964 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11965
11966         * dfp.h: Include "dboulest.h" and "expression.h".
11967
11968 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11969
11970         * ax-gdb.h: Include "ax.h".
11971
11972 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11973
11974         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11975         with nat/gdb_ptrace.h.
11976
11977 2017-01-05  Yao Qi  <yao.qi@linaro.org>
11978
11979         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11980         new line.
11981         (mips64_fbsd_sigframe_init): Likewise.
11982
11983 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11984
11985         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11986         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11987
11988 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11989
11990         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11991         * NEWS: Mention new FreeBSD/mips native configuration.
11992         * config/mips/fbsd.mh: New file.
11993         * configure.host: Add mips*-*-freebsd*.
11994         * mips-fbsd-nat.c: New file.
11995
11996 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11997
11998         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11999         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12000         * NEWS: Mention new FreeBSD/mips target.
12001         * configure.tgt: Add mips*-*-freebsd*.
12002         * mips-fbsd-tdep.c: New file.
12003         * mips-fbsd-tdep.h: New file.
12004
12005 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12006
12007         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12008         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12009
12010 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12011
12012         Update copyright year range in all GDB files.
12013
12014 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12015
12016         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12017
12018 For older changes see ChangeLog-2016.
12019 \f
12020 Local Variables:
12021 mode: change-log
12022 left-margin: 8
12023 fill-column: 74
12024 version-control: never
12025 coding: utf-8
12026 End: