Remove cleanups from linux-tdep.c
[external/binutils.git] / gdb / ChangeLog
1 2017-11-04  Tom Tromey  <tom@tromey.com>
2
3         * linux-tdep.c (linux_core_info_proc_mappings): Use
4         gdb::def_vector.
5         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
6         "size" argument.
7         (linux_corefile_thread): Update.
8         (linux_make_corefile_notes): Remove unused variable.
9
10 2017-11-04  Tom Tromey  <tom@tromey.com>
11
12         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
13         gdb::byte_vector.
14
15 2017-11-04  Tom Tromey  <tom@tromey.com>
16
17         * objfiles.c (do_free_objfile_cleanup): Remove.
18         * compile/compile-object-load.c (compile_object_load): Update.
19         * objfiles.h (make_cleanup_free_objfile): Remove.
20
21 2017-11-04  Tom Tromey  <tom@tromey.com>
22
23         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
24         (adi_read_versions): Change "tags" to "gdb_byte *".
25         (adi_print_versions): Likewise.
26
27 2017-11-04  Tom Tromey  <tom@tromey.com>
28
29         * breakpoint.c
30         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
31         from start_rbreak_breakpoints.
32         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
33         * breakpoint.h (class scoped_rbreak_breakpoints): New.
34         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
35         * symtab.c (do_end_rbreak_breakpoints): Remove.
36         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
37
38 2017-11-04  Tom Tromey  <tom@tromey.com>
39
40         * cp-namespace.c (reset_directive_searched): Remove.
41         (cp_lookup_symbol_via_imports): Use scoped_restore.
42         * cp-support.c (reset_directive_searched): Remove.
43         (make_symbol_overload_list_using): Use scoped_restore.
44         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
45         (reset_directive_searched): Remove.
46
47 2017-11-04  Tom Tromey  <tom@tromey.com>
48
49         * symfile.c (find_separate_debug_file_by_debuglink): Use
50         unique_xmalloc_ptr.
51
52 2017-11-04  Tom Tromey  <tom@tromey.com>
53
54         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
55         type of "info".
56         (compute_stack_depth): Likewise.
57         (do_compile_dwarf_expr_to_c): Use std::vector.
58
59 2017-11-04  Tom Tromey  <tom@tromey.com>
60
61         * compile/compile-object-load.c (link_callbacks_einfo): Use
62         std::string.
63
64 2017-11-04  Tom Tromey  <tom@tromey.com>
65
66         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
67         Use scoped_free_pendings.
68         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
69         scoped_free_pendings.
70         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
71         (xcoff_initial_scan): Likewise.
72         * buildsym.c (reset_symtab_globals): Update comment.
73         (scoped_free_pendings): Rename from really_free_pendings.
74         (prepare_for_building): Update comment.
75         (buildsym_init): Likewise.
76         * buildsym.h (class scoped_free_pendings): New class.
77         (really_free_pendings): Don't declare.
78
79 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
80
81         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
82         output when converting a zero value to a special byteorder format.
83
84 2017-11-02  Yao Qi  <yao.qi@linaro.org>
85
86         * frame.c (do_frame_register_read): Remove aspace.
87         * jit.c (jit_frame_sniffer): Likwise.
88         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
89         * regcache.c (regcache::regcache): Pass nullptr.
90         (regcache_print): Caller updated.
91         * regcache.h (regcache::regcache): Remove one constructor
92         parameter aspace.
93
94 2017-11-02  Yao Qi  <yao.qi@linaro.org>
95
96         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
97
98 2017-11-02  Yao Qi  <yao.qi@linaro.org>
99
100         * breakpoint.c (insert_single_step_breakpoints): Update.
101         * frame.c (struct frame_info) <aspace>: Add const.
102         (frame_save_as_regcache): Add const.
103         (get_frame_address_space): Return const address_space *.
104         * frame.h (get_frame_address_space): Update declaration.
105         * infrun.c (struct step_over_info) <aspace>: Add const.
106         (set_step_over_info): Make aspace const.
107         (displaced_step_prepare_throw): Change variable const.
108         (resume): Likewise.
109         (proceed): Likewise.
110         (adjust_pc_after_break): Likewise.
111         (save_waitstatus): Likewise.
112         (handle_signal_stop): Likewise.
113         (keep_going_pass_signal): Likewise.
114         * jit.c (jit_frame_sniffer): Add const.
115         * mips-tdep.c (mips_single_step_through_delay): Likewise.
116         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
117         * record-full.c (record_full_wait_1): Likewise.
118         * regcache.c (regcache::regcache): Change parameter to const.
119         * regcache.h (regcache::regcache): Likewise.
120         (regcache::aspace): Return const address_space *.
121         (regcache) <m_aspace>: Add const.
122
123 2017-11-02  Yao Qi  <yao.qi@linaro.org>
124
125         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
126         * frame.c (create_sentinel_frame): Likewise.
127         * infrun.c (displaced_step_prepare_throw): Likewise.
128         (resume): Likewise.
129         (thread_still_needs_step_over_bp): Likewise.
130         (proceed): Likewise.
131         (do_target_wait): Likewise.
132         (adjust_pc_after_break): Likewise.
133         (handle_syscall_event): Likewise.
134         (save_waitstatus): Likewise.
135         (handle_inferior_event_1): Likewise.
136         (handle_signal_stop): Likewise.
137         (keep_going_pass_signal): Likewise.
138         * linux-nat.c (status_callback): Likewise.
139         (save_stop_reason): Likewise.
140         (resume_stopped_resumed_lwps): Likewise.
141         * record-full.c (record_full_exec_insn): Likewise.
142         (record_full_wait_1): Likewise.
143         * regcache.c (get_regcache_aspace): Remove.
144         * regcache.h (get_regcache_aspace): Remove.
145
146 2017-11-02  Yao Qi  <yao.qi@linaro.org>
147
148         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
149         (init_regcache_descr): Use gdbarch_num_regs.
150         (regcache::regcache): Likewise.
151         (regcache::get_register_status): Likewise.
152         (regcache::assert_raw_regnum): Likewise.
153         (regcache::cooked_read): Likewise.
154         (regcache::cooked_read_value): Likewise.
155         (regcache::cooked_write): Likewise.
156         (regcache::dump): Likewise.
157         (regcache::num_raw_registers): New method.
158         * regcache.h (class regcache) <num_raw_registers>: New.
159
160 2017-11-02  Yao Qi  <yao.qi@linaro.org>
161
162         * regcache.c (regcache::assert_regnum): New method.
163         (regcache::invalidate): Call assert_regnum.
164         (regcache::raw_update): Likewise.
165         (regcache::raw_write): Likewise.
166         (regcache::raw_read_part): Likewise.
167         (regcache::raw_write_part): Likewise.
168         (regcache::raw_supply): Likewise.
169         (regcache::raw_supply_integer): Likewise.
170         (regcache::raw_supply_zeroed): Likewise.
171         (regcache::raw_collect): Likewise.
172         (regcache::raw_collect_integer): Likewise.
173         * regcache.h (regcache::assert_regnum): Declare.
174
175 2017-11-02  Yao Qi  <yao.qi@linaro.org>
176
177         * regcache.c (regcache::dump): Remove code.
178
179 2017-11-02  Yao Qi  <yao.qi@linaro.org>
180
181         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
182         Remove.
183         <sizeof_cooked_register_status>: Remove.
184         (init_regcache_descr): Update.
185         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
186         (regcache::save): Likewise.
187         (regcache::dump): Likewise.
188
189 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
190
191         * ft32-tdep.c (ft32_fetch_instruction): New function.
192         (ft32_analyze_prologue): Use ft32_fetch_instruction().
193
194 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
195
196         * cli/cli-script.c (execute_control_command): Rename to ...
197         (execute_control_command_1): ... this.
198         (execute_control_command): New function.
199
200 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
201
202         * tracepoint.c (tfind_command): Remove const_cast.
203
204 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
205
206         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
207
208 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
209
210         * common/common-utils.h (in_inclusive_range): New function.
211         * arm-tdep.c (arm_record_extension_space): Use
212         in_inclusive_range.
213         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
214         * cris-tdep.c (cris_spec_reg_applicable): Use
215         in_inclusive_range.
216
217 2017-10-30  Pedro Alves  <palves@redhat.com>
218             Simon Marchi <simon.marchi@ericsson.com>
219
220         * remote.c (remote_set_syscall_catchpoint): Build a std::string
221         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
222
223 2017-10-30  Pedro Alves  <palves@redhat.com>
224
225         * common/common-utils.c (string_appendf, string_vappendf): New
226         functions.
227         * common/common-utils.h (string_appendf, string_vappendf): New
228         declarations.
229         * unittests/common-utils-selftests.c (string_appendf_func)
230         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
231         (string_vappendf_tests): New functions.
232         (_initialize_common_utils_selftests): Register "string_appendf" and
233         "string_vappendf tests".
234
235 2017-10-30  Pedro Alves  <palves@redhat.com>
236
237         * unittests/common-utils-selftests.c (format_func): New typedef.
238         (string_printf_tests, string_vprintf_tests): Tests factored out
239         and merged to ...
240         (test_format_func): ... this new function.
241         (string_printf_tests, string_vprintf_tests): Reimplement on top of
242         test_format_func.
243
244 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
245
246         * darwin-nat.c: Remove include of gdb.h.
247
248 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
249
250         * xtensa-xtregs.c: Fix formatting issues.
251
252 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
253
254         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
255
256 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
257
258         PR python/21213
259         * python/py-infthread.c (thpy_get_inferior): Increment reference
260         of inferior before returning it.
261
262 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
263
264         * unittests/common-utils-selftests.c (format): Add
265         ATTRIBUTE_PRINTF.
266
267 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
268
269         * xml-syscall.c (struct syscall_desc): Add constructor.
270         <name>: Change type to std::string.
271         (syscall_desc_up): New typedef.
272         (syscall_desc_p): Remove typeder.
273         (DEF_VEC_P(syscall_desc_p)): Remove.
274         (struct syscall_group_desc): Add constructor.
275         <name>: Change type to std::string.
276         <syscalls>: Change type to std::vector.
277         (syscall_group_desc_up): New typedef.
278         (syscall_group_desc_p): Remove typedef.
279         (DEF_VEC_P(syscall_group_desc_p)): Remove.
280         (struct syscalls_info) <syscalls>: Change type to std::vector of
281         unique_ptr.
282         <groups>: Likewise.
283         <my_gdb_datadir>: Change type to std::string.
284         (syscalls_info_up): New typedef.
285         (allocate_syscalls_info): Remove.
286         (syscalls_info_free_syscalls_desc): Remove.
287         (syscalls_info_free_syscall_group_desc): Remove.
288         (free_syscalls_info): Remove.
289         (make_cleanup_free_syscalls_info): Remove.
290         (syscall_group_create_syscall_group_desc): Adjust.
291         (syscall_group_add_syscall): Adjust.
292         (syscall_create_syscall_desc): Adjust.
293         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
294         (init_syscalls_info): Adjust.
295         (syscall_group_get_group_by_name): Adjust.
296         (xml_get_syscall_number): Adjust.
297         (xml_get_syscall_name): Adjust.
298         (xml_list_of_syscalls): Adjust.
299         (xml_list_syscalls_by_group): Adjust.
300         (xml_list_of_groups): Adjust.
301
302 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
303
304         * probe.h: Don't include gdb_vecs.h.
305         (DEF_VEC_P (probe_p)): Remove.
306         (find_probes_in_objfile): Return an std::vector.
307         * probe.c (find_probes_in_objfile): Likewise.
308         * breakpoint.c (breakpoint_objfile_data)
309         <longjmp_probes>: Change type to std::vector.
310         <exception_probes>: Likewise.
311         (free_breakpoint_probes): Don't manually free vectors.
312         (create_longjmp_master_breakpoint): Adjust.
313         (create_exception_master_breakpoint): Adjust.
314         * solib-svr4.c (svr4_create_probe_breakpoints): Change
315         parameter type, adjust.
316         (svr4_create_solib_event_breakpoints): Adjust.
317
318 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
319
320         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
321         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
322         with new.
323         (free_breakpoint_probes): Rename to ...
324         (free_breakpoint_objfile_data): ... this, and call delete on
325         bp_objfile_data..
326
327 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
328
329         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
330         (loaded_script_ptr): Remove typedef.
331         (DEF_VEC_P (loaded_script_ptr)): Remove.
332         (struct collect_matching_scripts_data): Add constructor.
333         <scripts_p>: Change type to (pointer to) std::vector.
334         (collect_matching_scripts_data): Adjust.
335         (sort_scripts_by_name): Make suitable for std::sort.
336         (print_scripts): Don't sort vector, adjust to std::vector.
337         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
338
339 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
340
341         * symfile.c (filename_language): Make struct, not typedef.  Add
342         constructor.
343         <ext>: Change type to std::string.
344         (DEF_VEC_O (filename_language)): Remove.
345         (filename_language_table): Change type to std::vector.
346         (add_filename_language): Adjust.
347         (set_ext_lang_command): Adjust.
348         (info_ext_lang_command): Adjust.
349         (deduce_language_from_filename): Adjust.
350         (class scoped_restore_filename_language_table): Remove.
351         (test_filename_language): Use scoped_restore.
352         (test_set_ext_lang_command): Use scoped_restore, adjust to
353         std::vector change.
354
355 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
356
357         * symfile.c: Include selftest.h.
358         (class scoped_restore_filename_language_table): New.
359         (test_filename_language): New test.
360         (test_set_ext_lang_command): New test.
361         (_initialize_symfile): Register tests.
362
363 2017-10-27  Keith Seitz  <keiths@redhat.com>
364
365         * breakpoint.c (print_breakpoint_location): Use the symbol saved
366         in the bp_location, falling back to find_pc_sect_function when
367         needed.
368         (add_location_to_breakpoint): Save sal->symbol.
369         * breakpoint.h (struct bp_location) <symbol>: New field.
370         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
371         * symtab.h (struct symtab_and_line) <symbol>: New field.
372
373 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
374
375         PR gdb/13669
376         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
377         to rewind obstack.
378
379 2017-10-26  Pedro Alves  <palves@redhat.com>
380
381         * remote.c (remote_async_terminal_ours_p): Delete.
382         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
383         Remove references to 'remote_async_terminal_ours_p'.
384
385 2017-10-26  Yao Qi  <yao.qi@linaro.org>
386
387         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
388
389 2017-10-26  Yao Qi  <yao.qi@linaro.org>
390
391         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
392         aspace const.
393         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
394         Likewise.
395         * breakpoint.c (bpstat_check_location): Remove cast.
396         (breakpoint_hit_catch_fork): Make aspce const.
397         (breakpoint_hit_catch_solib): Likewise.
398         (breakpoint_hit_catch_exec): Likewise.
399         (breakpoint_hit_ranged_breakpoint): Likewise.
400         (breakpoint_hit_watchpoint): Likewise.
401         (base_breakpoint_breakpoint_hit): Likewise.
402         (bkpt_breakpoint_hit): Likewise.
403         (dprintf_breakpoint_hit): Likewise.
404         (tracepoint_breakpoint_hit): Likewise.
405         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
406
407 2017-10-26  Yao Qi  <yao.qi@linaro.org>
408
409         * breakpoint.c (breakpoint_location_address_match): Change
410         "struct address_space *" to "const address_space".
411         (breakpoint_location_address_range_overlap): Likewise.
412         (breakpoint_here_p): Likewise.
413         (breakpoint_in_range_p): Likewise.
414         (moribund_breakpoint_here_p): Likewise.
415         (bp_location_inserted_here_p): Likewise.
416         (software_breakpoint_inserted_here_p): Likewise.
417         (hardware_breakpoint_inserted_here_p): Likewise.
418         (hardware_watchpoint_inserted_in_range): Likewise.
419         (bpstat_check_location): Likewise.
420         (bpstat_stop_status): Likewise.
421         (breakpoint_address_match): Likewise.
422         (breakpoint_address_match_range): Likewise.
423         (breakpoint_location_address_match): Likewise.
424         (breakpoint_location_address_range_overlap): Likewise.
425         (insert_single_step_breakpoint): Likewise.
426         (breakpoint_has_location_inserted_here): Likewise.
427         (single_step_breakpoint_inserted_here_p): Likewise.
428         (pc_at_non_inline_function): Likewise.
429         * breakpoint.h (bpstat_stop_status): Update declaration.
430         (breakpoint_here_p): Likewise.
431         (breakpoint_in_range_p): Likewise.
432         (moribund_breakpoint_here_p): Likewise.
433         (breakpoint_inserted_here_p): Likewise.
434         (software_breakpoint_inserted_here_p): Likewise.
435         (hardware_breakpoint_inserted_here_p): Likewise.
436         (breakpoint_has_location_inserted_here): Likewise.
437         (single_step_breakpoint_inserted_here_p): Likewise.
438         (hardware_watchpoint_inserted_in_range): Likewise.
439         (breakpoint_address_match): Likewise.
440         (insert_single_step_breakpoint): Likewise.
441         (pc_at_non_inline_function): Likewise.
442         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
443         * record.c (record_check_stopped_by_breakpoint): Likewise.
444         * record.h (record_check_stopped_by_breakpoint): Likewise.
445         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
446
447 2017-10-25  Yao Qi  <yao.qi@linaro.org>
448
449         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
450         regcache->arch () instead get_regcache_arch.
451         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
452         Likewise.
453         (aarch64_fbsd_store_inferior_registers): Likewise.
454         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
455         (store_gregs_to_thread): Likewise.
456         (fetch_fpregs_from_thread): Likewise.
457         (store_fpregs_to_thread): Likewise.
458         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
459         (aarch64_store_return_value): Likewise.
460         (aarch64_software_single_step): Likewise.
461         * aix-thread.c (aix_thread_wait): Likewise.
462         (supply_reg32): Likewise.
463         (supply_sprs64): Likewise.
464         (supply_sprs32): Likewise.
465         (fill_gprs64): Likewise.
466         (fill_gprs32): Likewise.
467         (fill_sprs64): Likewise.
468         (fill_sprs32): Likewise.
469         (store_regs_user_thread): Likewise.
470         (store_regs_kernel_thread): Likewise.
471         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
472         (alphabsd_store_inferior_registers): Likewise.
473         * alpha-tdep.c (alpha_extract_return_value): Likewise.
474         (alpha_store_return_value): Likewise.
475         (alpha_deal_with_atomic_sequence): Likewise.
476         (alpha_next_pc): Likewise.
477         (alpha_software_single_step): Likewise.
478         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
479         (amd64bsd_store_inferior_registers): Likewise.
480         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
481         Likewise.
482         (amd64_linux_store_inferior_registers): Likewise.
483         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
484         (amd64_collect_native_gregset): Likewise.
485         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
486         (amd64obsd_collect_uthread): Likewise.
487         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
488         (amd64_collect_fpregset): Likewise.
489         (amd64_supply_fxsave): Likewise.
490         (amd64_supply_xsave): Likewise.
491         (amd64_collect_fxsave): Likewise.
492         (amd64_collect_xsave): Likewise.
493         * arc-tdep.c (arc_write_pc): Likewise.
494         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
495         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
496         (arm_fbsd_store_inferior_registers): Likewise.
497         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
498         (store_vfp_regs): Likewise.
499         (arm_linux_fetch_inferior_registers): Likewise.
500         (arm_linux_store_inferior_registers): Likewise.
501         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
502         (arm_linux_sigreturn_next_pc): Likewise.
503         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
504         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
505         (fetch_register): Likewise.
506         (store_register): Likewise.
507         * arm-tdep.c (arm_is_thumb): Likewise.
508         (displaced_in_arm_mode): Likewise.
509         (bx_write_pc): Likewise.
510         (arm_get_next_pcs_addr_bits_remove): Likewise.
511         (arm_software_single_step): Likewise.
512         (arm_extract_return_value): Likewise.
513         (arm_store_return_value): Likewise.
514         (arm_write_pc): Likewise.
515         * bfin-tdep.c (bfin_extract_return_value): Likewise.
516         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
517         (bsd_uthread_store_registers): Likewise.
518         * core-regset.c (fetch_core_registers): Likewise.
519         * corelow.c (get_core_registers): Likewise.
520         * cris-tdep.c (cris_store_return_value): Likewise.
521         (cris_extract_return_value): Likewise.
522         (find_step_target): Likewise.
523         (find_step_target): Likewise.
524         (cris_software_single_step): Likewise.
525         * ctf.c (ctf_fetch_registers): Likewise.
526         * darwin-nat.c (cancel_breakpoint): Likewise.
527         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
528         * frv-tdep.c (frv_extract_return_value): Likewise.
529         * ft32-tdep.c (ft32_store_return_value): Likewise.
530         (ft32_extract_return_value): Likewise.
531         * go32-nat.c (fetch_register): Likewise.
532         (go32_fetch_registers): Likewise.
533         (go32_store_registers): Likewise.
534         (store_register): Likewise.
535         * h8300-tdep.c (h8300_extract_return_value): Likewise.
536         (h8300_store_return_value): Likewise.
537         * hppa-linux-nat.c (fetch_register): Likewise.
538         (store_register): Likewise.
539         (hppa_linux_fetch_inferior_registers): Likewise.
540         (hppa_linux_store_inferior_registers): Likewise.
541         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
542         (i386_darwin_store_inferior_registers): Likewise.
543         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
544         (gnu_store_registers): Likewise.
545         * i386-linux-nat.c (fetch_register): Likewise.
546         (store_register): Likewise.
547         (supply_gregset): Likewise.
548         (fill_gregset): Likewise.
549         (i386_linux_fetch_inferior_registers): Likewise.
550         (i386_linux_store_inferior_registers): Likewise.
551         (i386_linux_resume): Likewise.
552         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
553         Likewise.
554         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
555         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
556         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
557         (i386obsd_collect_uthread): Likewise.
558         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
559         (i386_supply_gregset): Likewise.
560         (i386_collect_gregset): Likewise.
561         (i386_supply_fpregset): Likewise.
562         (i386_collect_fpregset): Likewise.
563         (i386_mpx_bd_base): Likewise.
564         * i386-v4-nat.c (supply_fpregset): Likewise.
565         (fill_fpregset): Likewise.
566         * i387-tdep.c (i387_supply_fsave): Likewise.
567         (i387_collect_fsave): Likewise.
568         (i387_supply_fxsave): Likewise.
569         (i387_collect_fxsave): Likewise.
570         (i387_supply_xsave): Likewise.
571         (i387_collect_xsave): Likewise.
572         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
573         (ia64_linux_store_registers): Likewise.
574         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
575         (ia64_extract_return_value): Likewise.
576         (ia64_store_return_value): Likewise.
577         (find_func_descr): Likewise.
578         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
579         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
580         (inf_ptrace_store_registers): Likewise.
581         * infrun.c (use_displaced_stepping): Likewise.
582         (displaced_step_prepare_throw): Likewise.
583         (resume): Likewise.
584         (proceed): Likewise.
585         (do_target_wait): Likewise.
586         (adjust_pc_after_break): Likewise.
587         (handle_inferior_event_1): Likewise.
588         (handle_signal_stop): Likewise.
589         (save_infcall_suspend_state): Likewise.
590         (restore_infcall_suspend_state): Likewise.
591         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
592         * jit.c (jit_frame_prev_register): Likewise.
593         * linux-nat.c (save_stop_reason): Likewise.
594         (linux_nat_wait_1): Likewise.
595         (resume_stopped_resumed_lwps): Likewise.
596         * linux-record.c (record_linux_sockaddr): Likewise.
597         (record_linux_msghdr): Likewise.
598         (record_linux_system_call): Likewise.
599         * linux-tdep.c (linux_collect_thread_registers): Likewise.
600         * lm32-tdep.c (lm32_extract_return_value): Likewise.
601         (lm32_store_return_value): Likewise.
602         * m32c-tdep.c (m32c_read_flg): Likewise.
603         (m32c_pseudo_register_read): Likewise.
604         (m32c_pseudo_register_write): Likewise.
605         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
606         (m32r_linux_collect_gregset): Likewise.
607         * m32r-tdep.c (m32r_store_return_value): Likewise.
608         (m32r_extract_return_value): Likewise.
609         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
610         (m68kbsd_collect_fpregset): Likewise.
611         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
612         * m68k-linux-nat.c (fetch_register): Likewise.
613         (old_fetch_inferior_registers): Likewise.
614         (old_store_inferior_registers): Likewise.
615         (store_regs): Likewise.
616         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
617         (m68k_svr4_store_return_value): Likewise.
618         * m88k-tdep.c (m88k_store_arguments): Likewise.
619         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
620         (mi_cmd_data_write_register_values): Likewise.
621         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
622         (mips_fbsd_store_inferior_registers): Likewise.
623         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
624         (mips_fbsd_supply_gregs): Likewise.
625         (mips_fbsd_collect_fpregs): Likewise.
626         (mips_fbsd_collect_gregs): Likewise.
627         (mips_fbsd_supply_fpregset): Likewise.
628         (mips_fbsd_collect_fpregset): Likewise.
629         (mips_fbsd_supply_gregset): Likewise.
630         (mips_fbsd_collect_gregset): Likewise.
631         * mips-linux-nat.c (supply_gregset): Likewise.
632         (fill_gregset): Likewise.
633         (supply_fpregset): Likewise.
634         (fill_fpregset): Likewise.
635         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
636         (mips_fill_gregset): Likewise.
637         (mips_supply_fpregset): Likewise.
638         (mips_fill_fpregset): Likewise.
639         (mips64_supply_gregset): Likewise.
640         (micromips_linux_sigframe_validate): Likewise.
641         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
642         (mipsnbsd_fetch_inferior_registers): Likewise.
643         (mipsnbsd_store_inferior_registers): Likewise.
644         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
645         (mipsnbsd_supply_gregset): Likewise.
646         (mipsnbsd_iterate_over_regset_sections): Likewise.
647         (mipsnbsd_supply_reg): Likewise.
648         (mipsnbsd_supply_fpreg): Likewise.
649         * mips-tdep.c (mips_in_frame_stub): Likewise.
650         (mips_dummy_id): Likewise.
651         (is_octeon_bbit_op): Likewise.
652         (micromips_bc1_pc): Likewise.
653         (extended_mips16_next_pc): Likewise.
654         (mips16_next_pc): Likewise.
655         (deal_with_atomic_sequence): Likewise.
656         * moxie-tdep.c (moxie_process_readu): Likewise.
657         * nios2-tdep.c (nios2_get_next_pc): Likewise.
658         * nto-procfs.c (procfs_store_registers): Likewise.
659         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
660         (ppcfbsd_store_inferior_registers): Likewise.
661         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
662         (fetch_altivec_register): Likewise.
663         (get_spe_registers): Likewise.
664         (fetch_spe_register): Likewise.
665         (fetch_altivec_registers): Likewise.
666         (fetch_all_gp_regs): Likewise.
667         (fetch_all_fp_regs): Likewise.
668         (store_vsx_register): Likewise.
669         (store_altivec_register): Likewise.
670         (set_spe_registers): Likewise.
671         (store_spe_register): Likewise.
672         (store_altivec_registers): Likewise.
673         (store_all_gp_regs): Likewise.
674         (store_all_fp_regs): Likewise.
675         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
676         (ppc_linux_collect_gregset): Likewise.
677         (ppc_canonicalize_syscall): Likewise.
678         (ppc_linux_record_signal): Likewise.
679         (ppu2spu_prev_register): Likewise.
680         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
681         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
682         (ppcobsd_store_registers): Likewise.
683         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
684         Likewise.
685         (ppc_ravenscar_generic_store_registers): Likewise.
686         * procfs.c (procfs_fetch_registers): Likewise.
687         (procfs_store_registers): Likewise.
688         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
689         (ravenscar_store_registers): Likewise.
690         (ravenscar_prepare_to_store): Likewise.
691         * record-btrace.c (record_btrace_fetch_registers): Likewise.
692         * record-full.c (record_full_wait_1): Likewise.
693         (record_full_registers_change): Likewise.
694         (record_full_store_registers): Likewise.
695         (record_full_core_fetch_registers): Likewise.
696         (record_full_save): Likewise.
697         (record_full_goto_insn): Likewise.
698         * regcache.c (regcache_register_size): Likewise.
699         (get_regcache_arch): Remove.
700         (regcache_read_pc): Likewise.
701         * regcache.h (get_regcache_arch): Remove.
702         * remote-sim.c (gdbsim_fetch_register): Likewise.
703         (gdbsim_store_register): Likewise.
704         * remote.c (fetch_register_using_p): Likewise.
705         (send_g_packet): Likewise.
706         (remote_prepare_to_store): Likewise.
707         (store_registers_using_G): Likewise.
708         * reverse.c (save_bookmark_command): Likewise.
709         (goto_bookmark_command): Likewise.
710         * rs6000-aix-tdep.c (branch_dest): Likewise.
711         * rs6000-nat.c (rs6000_ptrace64): Likewise.
712         (fetch_register): Likewise.
713         * rs6000-tdep.c (ppc_supply_reg): Likewise.
714         (ppc_collect_reg): Likewise.
715         (ppc_collect_gregset): Likewise.
716         (ppc_collect_fpregset): Likewise.
717         (ppc_collect_vsxregset): Likewise.
718         (ppc_collect_vrregset): Likewise.
719         (ppc_displaced_step_hw_singlestep): Likewise.
720         (rs6000_pseudo_register_read): Likewise.
721         (rs6000_pseudo_register_write): Likewise.
722         * s390-linux-nat.c (supply_gregset): Likewise.
723         (fill_gregset): Likewise.
724         (s390_linux_fetch_inferior_registers): Likewise.
725         * s390-linux-tdep.c (s390_write_pc): Likewise.
726         (s390_software_single_step): Likewise.
727         (s390_all_but_pc_registers_record): Likewise.
728         (s390_linux_syscall_record): Likewise.
729         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
730         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
731         (shnbsd_store_inferior_registers): Likewise.
732         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
733         (sh_extract_return_value_fpu): Likewise.
734         (sh_store_return_value_nofpu): Likewise.
735         (sh_corefile_supply_regset): Likewise.
736         (sh_corefile_collect_regset): Likewise.
737         * sh64-tdep.c (sh64_extract_return_value): Likewise.
738         (sh64_store_return_value): Likewise.
739         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
740         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
741         (sparc_store_inferior_registers): Likewise.
742         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
743         (sparc_ravenscar_prepare_to_store): Likewise.
744         * sparc-tdep.c (sparc32_store_arguments): Likewise.
745         (sparc_analyze_control_transfer): Likewise.
746         (sparc_step_trap): Likewise.
747         (sparc_software_single_step): Likewise.
748         (sparc32_gdbarch_init): Likewise.
749         (sparc_supply_rwindow): Likewise.
750         (sparc_collect_rwindow): Likewise.
751         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
752         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
753         (sparc64nbsd_collect_gregset): Likewise.
754         (sparc64nbsd_supply_fpregset): Likewise.
755         (sparc64nbsd_collect_fpregset): Likewise.
756         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
757         (sparc64_supply_gregset): Likewise.
758         (sparc64_collect_gregset): Likewise.
759         (sparc64_supply_fpregset): Likewise.
760         (sparc64_collect_fpregset): Likewise.
761         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
762         * spu-tdep.c (spu_unwind_sp): Likewise.
763         (spu2ppu_prev_register): Likewise.
764         (spu_memory_remove_breakpoint): Likewise.
765         * stack.c (return_command): Likewise.
766         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
767         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
768         * tracefile.c (trace_save_ctf): Likewise.
769         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
770         (do_windows_store_inferior_registers): Likewise.
771         (windows_resume): Likewise.
772         * xtensa-linux-nat.c (fill_gregset): Likewise.
773         (supply_gregset_reg): Likewise.
774         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
775         (xtensa_register_read_masked): Likewise.
776         (xtensa_supply_gregset): Likewise.
777         (xtensa_extract_return_value): Likewise.
778         (xtensa_store_return_value): Likewise.
779
780 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
781
782         * doublest.c (floatformat_from_string): New function.
783         * doublest.h (floatformat_from_string): Add prototype.
784
785         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
786         (OP_FLOAT): ... this.
787         * expression.h: Do not include "doublest.h".
788         (union exp_element): Replace doubleconst and decfloatconst by
789         new element floatconst.
790         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
791         (ada_evaluate_subexp): Likewise.
792         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
793         OP_DOUBLE and OP_DECFLOAT.
794         * expprint.c (print_subexp_standard): Likewise.
795         (dump_subexp_body_standard): Likewise.
796         * breakpoint.c (watchpoint_exp_is_const): Likewise.
797
798         * parse.c: Include "dfp.h".
799         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
800         (write_exp_elt_floatcst): New function.
801         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
802         and OP_DECFLOAT.
803         (operator_check_standard): Likewise.
804         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
805         Return target format buffer instead of host DOUBLEST.
806         Use floatformat_from_string and decimal_from_string to parse
807         either binary or decimal floating-point types.
808         (parse_c_float): Remove.
809         * parser-defs.h: Do not include "doublest.h".
810         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
811         (write_exp_elt_floatcst): Add prototype.
812         (parse_float): Update prototype.
813         (parse_c_float): Remove.
814
815         * c-exp.y: Do not include "dfp.h".
816         (typed_val_float): Use byte buffer instead of DOUBLEST.
817         (typed_val_decfloat): Remove.
818         (DECFLOAT): Remove.
819         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
820         (parse_number): Update to new parse_float interface.
821         Parse suffixes and determine type before calling parse_float.
822         Handle decimal and binary FP types the same way.
823
824         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
825         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
826         (parse_number): Update to new parse_float interface.
827         Parse suffixes and determine type before calling parse_float.
828
829         * f-exp.y: Replace dval by typed_val_float.
830         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
831         (parse_number): Use parse_float instead of atof.
832
833         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
834         (parse_go_float): Remove.
835         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
836         (parse_number): Call parse_float instead of parse_go_float.
837         Parse suffixes and determine type before calling parse_float.
838
839         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
840         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
841         (parse_number): Update to new parse_float interface.
842         Parse suffixes and determine type before calling parse_float.
843
844         * m2-exp.y: Replace dval by byte buffer val.
845         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
846         (parse_number): Call parse_float instead of atof.
847
848         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
849         (lex_number): Call parse_float instead of strtod.
850         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
851         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
852         Use write_exp_elt_floatcst.
853         (unit_testing): Remove static variable.
854         (rust_type): Do not check unit_testing.
855         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
856
857         * ada-exp.y (type_float, type_double): Remove.
858         (typed_val_float): Use byte buffer instead of DOUBLEST.
859         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
860         * ada-lex.l (processReal): Use parse_float instead of sscanf.
861
862 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
863
864         * aarch64-tdep.h (enum aarch64_regnum): Remove.
865         * arch/aarch64.h: New file.
866
867 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
868
869         * dfp.h (decimal_from_string): Use const reference for argument.
870         * dfp.c (decimal_from_string): Likewise.
871
872 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
873
874         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
875         * sh64-tdep.c (sh64_do_fp_register): Likewise.
876         * mips-tdep.c (mips_print_fp_register): Likewise.
877
878 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
879
880         * common/format.h (enum argclass): Replace decfloat_arg by
881         dec32float_arg, dec64float_arg, and dec128float_arg.
882         * common/format.c (parse_format_string): Update to return
883         new decimal float argument classes.
884
885         * printcmd.c (printf_decfloat): Rename to ...
886         (printf_floating): ... this.  Add argclass argument, and use it
887         instead of parsing the format string again.  Add support for
888         binary floating-point values, using floatformat_to_string.
889         Convert value to the target format if it doesn't already match.
890         (ui_printf): Call printf_floating instead of printf_decfloat,
891         also for double_arg / long_double_arg.  Pass argclass.
892
893         * dfp.c (decimal_to_string): Add format string argument.
894         * dfp.h (decimal_to_string): Likewise.
895
896         * doublest.c (floatformat_to_string): Add format string argument.
897         * doublest.h (floatformat_to_string): Likewise.
898
899 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
900
901         * doublest.c (floatformat_precision): New routine.
902         (floatformat_to_string): Likewise.
903         * doublest.c (floatformat_to_string): Add prototype.
904
905         * printcmd.c (print_scalar_formatted): Only call print_floating
906         on floating-point types.
907         * valprint.c: Do not include "floatformat.h".
908         (generic_val_print_decfloat): Remove.
909         (generic_val_print): Call generic_val_print_float for both
910         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
911         (print_floating): Use floatformat_to_string.  Handle decimal float.
912         (print_decimal_floating): Remove, merge into floatformat_to_string.
913         * value.h (print_decimal_floating): Remove.
914
915         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
916
917 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
918
919         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
920
921 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
922
923         * memattr.h: Don't include vec.h.
924         (struct mem_attrib): Initialize fields.
925         <unknown>: New static method.
926         (struct mem_region): Add constructors, operator<, initialize
927         fields.
928         * memattr.c: Include algorithm.
929         (default_mem_attrib, unknown_mem_attrib): Remove.
930         (user_mem_region_list): New global.
931         (target_mem_region_list, mem_region_list): Change type to
932         std::vector<mem_region>.
933         (mem_use_target): Now a function.
934         (target_mem_regions_valid): Change type to bool.
935         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
936         (require_user_regions): Adjust.
937         (require_target_regions): Adjust.
938         (create_mem_region): Adjust.
939         (lookup_mem_region): Adjust.
940         (invalidate_target_mem_regions): Adjust.
941         (mem_clear): Rename to...
942         (user_mem_clear): ... this, and adjust.
943         (mem_command): Adjust.
944         (info_mem_command): Adjust.
945         (mem_enable, enable_mem_command, mem_disable,
946         disable_mem_command): Adjust.
947         (mem_delete): Adjust.
948         (delete_mem_command): Adjust.
949         * memory-map.h (parse_memory_map): Return an std::vector.
950         * memory-map.c (parse_memory_map): Likewise.
951         (struct memory_map_parsing_data): Add constructor.
952         <memory_map>: Point to std::vector.
953         (memory_map_start_memory): Adjust.
954         (memory_map_end_memory): Adjust.
955         (memory_map_end_property): Adjust.
956         (clear_result): Remove.
957         * remote.c (remote_memory_map): Return an std::vector.
958         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
959         Remove.
960         (target_debug_print_mem_region_vector): New.
961         * target-delegates.c: Regenerate.
962         * target.h (mem_region_vector): New typedef.
963         (to_memory_map): Return mem_region_vector.
964         (target_memory_map): Return an std::vector.
965         * target.c (target_memory_map): Return an std::vector.
966         (flash_erase_command): Adjust.
967
968 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
969
970         * memory-map.c (struct memory_map_parsing_data) <property_name>:
971         Change type to std::string.
972         (memory_map_start_property): Adjust.
973         (memory_map_end_property): Adjust.
974
975 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
976
977         * infrun.h: Include common/byte-vector.h.
978         (struct displaced_step_closure): New struct.
979         (struct buf_displaced_step_closure): New struct.
980         * infrun.c (displaced_step_closure::~displaced_step_closure):
981         Provide default implementation.
982         (displaced_step_clear): Deallocate step closure with delete.
983         * aarch64-tdep.c (displaced_step_closure): Rename to ...
984         (aarch64_displaced_step_closure): ... this, extend
985         displaced_step_closure.
986         (aarch64_displaced_step_data) <dsc>: Change type to
987         aarch64_displaced_step_closure.
988         (aarch64_displaced_step_copy_insn): Adjust to type change, use
989         unique_ptr.
990         (aarch64_displaced_step_fixup): Add cast for displaced step
991         closure.
992         * amd64-tdep.c (displaced_step_closure): Rename to ...
993         (amd64_displaced_step_closure): ... this, extend
994         displaced_step_closure.
995         <insn_buf>: Change type to std::vector<gdb_byte>.
996         <max_len>: Remove.
997         (fixup_riprel): Change type of DSC parameter, adjust to type
998         change of insn_buf.
999         (fixup_displaced_copy): Change type of DSC parameter.
1000         (amd64_displaced_step_copy_insn): Instantiate
1001         amd64_displaced_step_closure.
1002         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1003         to type change of insn_buf.
1004         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1005         parameter DSC.
1006         (arm_linux_copy_svc): Likewise.
1007         (cleanup_kernel_helper_return): Likewise.
1008         (arm_catch_kernel_helper_return): Likewise.
1009         (arm_linux_displaced_step_copy_insn): Instantiate
1010         arm_displaced_step_closure.
1011         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1012         (displaced_read_reg): Change type of parameter DSC.
1013         (branch_write_pc): Likewise.
1014         (load_write_pc): Likewise.
1015         (alu_write_pc): Likewise.
1016         (displaced_write_reg): Likewise.
1017         (arm_copy_unmodified): Likewise.
1018         (thumb_copy_unmodified_32bit): Likewise.
1019         (thumb_copy_unmodified_16bit): Likewise.
1020         (cleanup_preload): Likewise.
1021         (install_preload): Likewise.
1022         (arm_copy_preload): Likewise.
1023         (thumb2_copy_preload): Likewise.
1024         (install_preload_reg): Likewise.
1025         (arm_copy_preload_reg): Likewise.
1026         (cleanup_copro_load_store): Likewise.
1027         (install_copro_load_store): Likewise.
1028         (arm_copy_copro_load_store) Likewise.
1029         (thumb2_copy_copro_load_store): Likewise.
1030         (cleanup_branch): Likewise.
1031         (install_b_bl_blx): Likewise.
1032         (arm_copy_b_bl_blx): Likewise.
1033         (thumb2_copy_b_bl_blx): Likewise.
1034         (thumb_copy_b): Likewise.
1035         (install_bx_blx_reg): Likewise.
1036         (arm_copy_bx_blx_reg): Likewise.
1037         (thumb_copy_bx_blx_reg): Likewise.
1038         (cleanup_alu_imm): Likewise.
1039         (arm_copy_alu_imm): Likewise.
1040         (thumb2_copy_alu_imm): Likewise.
1041         (cleanup_alu_reg): Likewise.
1042         (install_alu_reg): Likewise.
1043         (arm_copy_alu_reg): Likewise.
1044         (thumb_copy_alu_reg): Likewise.
1045         (cleanup_alu_shifted_reg): Likewise.
1046         (install_alu_shifted_reg): Likewise.
1047         (arm_copy_alu_shifted_reg): Likewise.
1048         (cleanup_load): Likewise.
1049         (cleanup_store): Likewise.
1050         (arm_copy_extra_ld_st): Likewise.
1051         (install_load_store): Likewise.
1052         (thumb2_copy_load_literal): Likewise.
1053         (thumb2_copy_load_reg_imm): Likewise.
1054         (arm_copy_ldr_str_ldrb_strb): Likewise.
1055         (cleanup_block_load_all): Likewise.
1056         (cleanup_block_store_pc): Likewise.
1057         (cleanup_block_load_pc): Likewise.
1058         (arm_copy_block_xfer): Likewise.
1059         (thumb2_copy_block_xfer): Likewise.
1060         (cleanup_svc): Likewise.
1061         (install_svc): Likewise.
1062         (arm_copy_svc): Likewise.
1063         (thumb_copy_svc): Likewise.
1064         (arm_copy_undef): Likewise.
1065         (thumb_32bit_copy_undef): Likewise.
1066         (arm_copy_unpred): Likewise.
1067         (arm_decode_misc_memhint_neon): Likewise.
1068         (arm_decode_unconditional): Likewise.
1069         (arm_decode_miscellaneous): Likewise.
1070         (arm_decode_dp_misc): Likewise.
1071         (arm_decode_ld_st_word_ubyte): Likewise.
1072         (arm_decode_media): Likewise.
1073         (arm_decode_b_bl_ldmstm): Likewise.
1074         (arm_decode_ext_reg_ld_st): Likewise.
1075         (thumb2_decode_dp_shift_reg): Likewise.
1076         (thumb2_decode_ext_reg_ld_st): Likewise.
1077         (arm_decode_svc_copro): Likewise.
1078         (thumb2_decode_svc_copro): Likewise.
1079         (install_pc_relative): Likewise.
1080         (thumb_copy_pc_relative_16bit): Likewise.
1081         (thumb_decode_pc_relative_16bit): Likewise.
1082         (thumb_copy_pc_relative_32bit): Likewise.
1083         (thumb_copy_16bit_ldr_literal): Likewise.
1084         (thumb_copy_cbnz_cbz): Likewise.
1085         (thumb2_copy_table_branch): Likewise.
1086         (cleanup_pop_pc_16bit_all): Likewise.
1087         (thumb_copy_pop_pc_16bit): Likewise.
1088         (thumb_process_displaced_16bit_insn): Likewise.
1089         (decode_thumb_32bit_ld_mem_hints): Likewise.
1090         (thumb_process_displaced_32bit_insn): Likewise.
1091         (thumb_process_displaced_insn): Likewise.
1092         (arm_process_displaced_insn): Likewise.
1093         (arm_displaced_init_closure): Likewise.
1094         (arm_displaced_step_fixup): Add cast for closure.
1095         * arm-tdep.h: Include infrun.h.
1096         (displaced_step_closure): Rename to ...
1097         (arm_displaced_step_closure): ... this, extend
1098         displaced_step_closure.
1099         <u::svc::copy_svc_os>: Change type of parameter DSC.
1100         <cleanup>: Likewise.
1101         (arm_process_displaced_insn): Likewise.
1102         (arm_displaced_init_closure): Likewise.
1103         (displaced_read_reg): Likewise.
1104         (displaced_write_reg): Likewise.
1105         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1106         Adjust.
1107         * i386-tdep.h: Include infrun.h.
1108         (i386_displaced_step_closure): New typedef.
1109         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1110         i386_displaced_step_closure.
1111         (i386_displaced_step_fixup): Adjust.
1112         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1113         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1114         and unique_ptr.
1115         (ppc_displaced_step_fixup): Adjust.
1116         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1117         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1118         and unique_ptr.
1119         (s390_displaced_step_fixup): Adjust.
1120
1121 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1122
1123         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1124         Remove declarations.
1125
1126 2017-10-20  Tom Tromey  <tom@tromey.com>
1127
1128         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1129         std::vector.
1130         (gdb_bfd_record_inclusion): Update.
1131         (bfdp): Remove typedef.
1132
1133 2017-10-20  Tom Tromey  <tom@tromey.com>
1134
1135         * gdb_bfd.c (gdb_bfd_ref): Use new.
1136         (struct gdb_bfd_data): Add constructor, destructor, and member
1137         initializers.
1138         (gdb_bfd_unref): Use delete.
1139
1140 2017-10-20  Tom Tromey  <tom@tromey.com>
1141
1142         * exec.c (exec_file_attach): Use new_bfd_ref.
1143         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1144         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1145         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1146         new_bfd_ref.
1147         * gdb_bfd.h (new_bfd_ref): New function.
1148
1149 2017-10-20  Pedro Alves  <palves@redhat.com>
1150
1151         * main.c (captured_command_loop): Add attribute noinline.
1152
1153 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1154
1155         * interps.c (struct interp_factory): Add constructor.
1156         (interp_factory_p): Remove typedef.
1157         (DEF_VEC_P(interp_factory_p)): Remove.
1158         (interpreter_factories): Change type to std::vector.
1159         (interp_factory_register): Adjust.
1160         (interp_lookup): Adjust.
1161         (interpreter_completer): Adjust.
1162
1163 2017-10-19  Tom Tromey  <tom@tromey.com>
1164
1165         * break-catch-syscall.c (catch_syscall_completer): Use
1166         std::string, gdb::unique_xmalloc_ptr.
1167
1168 2017-10-19  Tom Tromey  <tom@tromey.com>
1169
1170         * infcall.c (call_function_by_hand_dummy): Use std::string.
1171
1172 2017-10-19  Tom Tromey  <tom@tromey.com>
1173
1174         * mi/mi-main.c (mi_cmd_execute): Update.
1175         * top.h (prepare_execute_command): Return scoped_value_mark.
1176         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1177         Add move constructor.
1178         * top.c (prepare_execute_command): Return scoped_value_mark.
1179         (execute_command): Update.
1180
1181 2017-10-19  Pedro Alves  <palves@redhat.com>
1182
1183         * xml-support.c (xml_fetch_content_from_file): Check fread's
1184         return.
1185
1186 2017-10-19  Pedro Alves  <palves@redhat.com>
1187
1188         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1189         async.
1190         (handle_error_fd): New function.
1191         (ser_base_async): Add/delete an event loop file handler for
1192         error_fd.
1193
1194 2017-10-19  Pedro Alves  <palves@redhat.com>
1195
1196         * xml-support.c (xml_fetch_content_from_file): Don't read in
1197         chunks.  Instead use fseek to determine the file's size, and read
1198         it in one go.
1199
1200 2017-11-18  Keith Seitz  <keiths@redhat.com>
1201
1202         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1203         types.
1204         Add whitespace to front of type name.
1205
1206 2017-10-18  Keith Seitz  <keiths@redhat.com>
1207
1208         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1209         DW_AT_accessibility.
1210
1211 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1212
1213         * features/tic6x-c62x-linux.c: Remove.
1214
1215 2017-10-17  Tom Tromey  <tom@tromey.com>
1216
1217         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1218         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1219         (do_mixed_source_and_assembly): Likewise.
1220
1221 2017-10-17  Tom Tromey  <tom@tromey.com>
1222
1223         * regcache.c (regcache::xfer_part): Remove assertion.
1224
1225 2017-10-17  Pedro Alves  <palves@redhat.com>
1226
1227         * xml-support.c (xml_fetch_content_from_file): Call
1228         unique_ptr::release() instead unique_ptr::get() when passing
1229         through xrealloc.
1230
1231 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1232
1233         * regcache.c (regcache::xfer_part): Remove parameters read and
1234         write, add parameter is_raw.  All callers are updated.
1235
1236 2017-10-16  Keith Seitz  <keiths@redhat.com>
1237
1238         * c-typeprint.c (enum access_specifier): Moved here from
1239         c_type_print_base.
1240         (output_access_specifier): New function.
1241         (c_type_print_base): Consider typedefs when assessing
1242         whether access labels are needed.
1243         Use output_access_specifier as needed.
1244         Output access specifier for typedefs, if needed.
1245         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1246         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1247         fields.
1248         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1249         accessor macros.
1250
1251 2017-10-16  Tom Tromey  <tom@tromey.com>
1252
1253         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1254         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1255         * target.c (target_fileio_read_stralloc): Update.
1256         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1257         * target.h (target_fileio_read_stralloc): Return
1258         unique_xmalloc_ptr.
1259
1260 2017-10-16  Tom Tromey  <tom@tromey.com>
1261
1262         * xml-syscall.c (xml_init_syscalls_info): Update.
1263         * xml-support.c (xinclude_start_include): Update.
1264         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1265         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1266         (xml_fetch_content_from_file): Likewise.
1267         * osdata.c (get_osdata): Update.
1268         * target.h (target_read_stralloc, target_get_osdata): Return
1269         unique_xmalloc_ptr.
1270         * solib-aix.c (solib_aix_get_library_list): Update.
1271         * solib-target.c (solib_target_current_sos): Update.
1272         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1273         * xml-tdesc.c (fetch_available_features_from_target): Update.
1274         (target_fetch_description_xml): Update.
1275         (file_read_description_xml): Update.
1276         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1277         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1278         (remote_pid_to_exec_file): Update.
1279         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1280         (target_get_osdata): Likewise.
1281
1282 2017-10-16  Tom Tromey  <tom@tromey.com>
1283
1284         * remote.c (remote_register_number_and_offset): Use std::vector.
1285         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1286         (putpkt_binary): Use gdb::def_vector.
1287         (compare_sections_command): Use gdb::byte_vector.
1288
1289 2017-10-16  Tom Tromey  <tom@tromey.com>
1290
1291         * ppc-linux-nat.c (hwdebug_insert_point): Use
1292         gdb::unique_xmalloc_ptr, XDUP.
1293
1294 2017-10-16  Tom Tromey  <tom@tromey.com>
1295
1296         * probe.c (parse_probes): Use std::string.
1297         (info_probes_for_ops, enable_probes_command)
1298         (disable_probes_command): Remove cleanups.
1299
1300 2017-10-16  Tom Tromey  <tom@tromey.com>
1301
1302         * buildsym.c (block_compar): Remove.
1303         (end_symtab_get_static_block): Use std::vector.
1304
1305 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1306
1307         * memrange.h (struct mem_range): Define operator< and operator==.
1308         (mem_range_s): Remove.
1309         (DEF_VEC_O (mem_range_s)): Remove.
1310         (normalize_mem_ranges): Change parameter type to std::vector.
1311         * memrange.c (compare_mem_ranges): Remove.
1312         (normalize_mem_ranges): Change parameter type to std::vector,
1313         adjust to vector change.
1314         * exec.c (section_table_available_memory): Return vector, remove
1315         parameter.
1316         (section_table_read_available_memory): Adjust to std::vector
1317         change.
1318         * remote.c (remote_read_bytes): Adjust to std::vector
1319         change.
1320         * tracepoint.h (traceframe_available_memory): Change parameter
1321         type to std::vector.
1322         * tracepoint.c (traceframe_available_memory): Change parameter
1323         type to std::vector, adjust.
1324         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1325         std::vector change.
1326         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1327         unittests/memrange-selftests.c.
1328         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1329         * gdb/unittests/memrange-selftests.c: New file.
1330
1331 2017-10-16  Pedro Alves  <palves@redhat.com>
1332
1333         * elfread.c (probe_key_free): Rename range-for variable.
1334         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1335         (find_probe_by_pc, collect_probes): Rename range-for variable.
1336
1337 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1338
1339         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1340         * features/tic6x-c62x.c: Remove.
1341         * features/tic6x-c64x-linux.c: Remove.
1342         * features/tic6x-c64x.c: Remove.
1343         * features/tic6x-c64xp-linux.c: Remove.
1344         * features/tic6x-c64xp.c: Remove.
1345         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1346         initialize_tdesc_tic6x_*_linux functions.
1347         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1348         initialize_tdesc_tic6x_* functions.
1349
1350 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1351
1352         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1353         tic6x-c62x.
1354         * regformats/tic6x-c62x.dat: Remove.
1355         * regformats/tic6x-c64x.dat: Remove.
1356         * regformats/tic6x-c64xp.dat: Remove.
1357
1358 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1359
1360         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1361         (the !HAVE_LIBEXPAT version).
1362
1363 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1364
1365         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1366         const.
1367
1368 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1369
1370         * target.h: Include tracepoint.h.
1371         (enum trace_find_type): Move to tracepoint.h.
1372         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1373         * tracepoint.h: Don't include target.h
1374         (enum trace_find_type): Move from target.h.
1375         (parse_traceframe_info): Return a unique ptr.
1376         * tracepoint.c (current_traceframe_info): Change type to unique
1377         ptr.
1378         (free_traceframe_info): Remove.
1379         (clear_traceframe_info): Don't manually free
1380         current_traceframe_info.
1381         (free_result): Remove.
1382         (parse_traceframe_info): Return a unique ptr.
1383         (get_traceframe_info): Adjust to unique ptr.
1384         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1385         * remote.c (remote_traceframe_info): Return a unique ptr.
1386         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1387         ptr.
1388         * target-debug.h (target_debug_print_traceframe_info_up): New
1389         macro.
1390         * target-delegates.c: Regenerate.
1391
1392 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1393
1394         * memrange.h (struct mem_range): Add constructors.
1395         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1396         std::vector<mem_range>.
1397         * tracepoint.c (free_traceframe_info): Don't manually free
1398         vector.
1399         (traceframe_info_start_memory): Adjust to vector change.
1400         (traceframe_available_memory): Likewise.
1401         * tracefile-tfile.c (build_traceframe_info): Likewise.
1402         * ctf.c (ctf_traceframe_info): Likewise.
1403
1404 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1405
1406         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1407         std::vector<int>.
1408         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1409         (traceframe_info_start_tvar): Adjust to vector change.
1410         (parse_traceframe_info): Allocate with new.
1411         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1412         vector change.
1413         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1414         change.
1415         tfile_traceframe_info): Allocate with new.
1416         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1417         change.
1418
1419 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1420
1421         * tracepoint.c (traceframe_info): Rename to...
1422         (current_traceframe_info): ...this.
1423         (clear_traceframe_info): Adjust.
1424         (get_traceframe_info): Adjust.
1425
1426 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1427
1428         * nat/linux-osdata.c: Include algorithm.
1429         (compare_processes): Remove.
1430         (struct pid_pgid_entry): New struct.
1431         (linux_xfer_osdata_processgroups): Use std::vector instead of
1432         XNEWVEC.
1433
1434 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1435
1436         * objfiles.h: Don't include symfile.h.
1437         (struct partial_symbol): Remove forward-declaration.
1438         (struct objfile) <global_psymbols, static_psymbols>: Change type
1439         to std::vector<partial_symbol *>.
1440         * objfiles.c (objfile::objfile): Don't memset those fields.
1441         (objfile::~objfile): Don't free those fields.
1442         * psympriv.h (struct psymbol_allocation_list): Remove
1443         forward-declaration.
1444         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1445         to std::vector.
1446         (start_psymtab_common): Change parameters to std::vector.
1447         * psymtab.c: Include algorithm.
1448         (require_partial_symbols): Call shrink_to_fit.
1449         (find_pc_sect_psymbol): Adjust to vector change.
1450         (match_partial_symbol): Likewise.
1451         (lookup_partial_symbol): Likewise.
1452         (psym_relocate): Likewise.
1453         (dump_psymtab): Likewise.
1454         (recursively_search_psymtabs): Likewise.
1455         (compare_psymbols): Remove.
1456         (sort_pst_symbols): Adjust to vector change.
1457         (start_psymtab_common): Likewise.
1458         (end_psymtab_common): Likewise.
1459         (psymbol_bcache_full): De-constify return value.
1460         (add_psymbol_to_bcache): Likewise.
1461         (extend_psymbol_list): Remove.
1462         (append_psymbol_to_list): Adjust to vector change.
1463         (add_psymbol_to_list): Likewise.
1464         (init_psymbol_list): Likewise.
1465         (maintenance_info_psymtabs): Likewise.
1466         (maintenance_check_psymtabs): Likewise.
1467         * symfile.h (struct psymbol_allocation_list): Remove.
1468         * symfile.c (reread_symbols): Adjust to vector change.
1469         * dbxread.c (start_psymtab): Change type of parameters.
1470         (dbx_symfile_read): Adjust to vector change.
1471         (read_dbx_symtab): Likewise.
1472         (start_psymtab): Change type of parameters.
1473         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1474         (create_partial_symtab): Likewise.
1475         (add_partial_symbol): Likewise.
1476         (write_one_signatured_type): Likewise.
1477         (recursively_write_psymbols): Likewise.
1478         * mdebugread.c (parse_partial_symbols): Likewise.
1479         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1480         (scan_xcoff_symtab): Adjust to vector change.
1481         (xcoff_initial_scan): Likewise.
1482
1483 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1484
1485         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1486
1487 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1488
1489         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1490         Remove s390x-*-expedite, add s390x-expedite.
1491
1492 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1493
1494         * features/s390-gs-linux64.c: Regenerated.
1495         * features/s390x-gs-linux64.c: Regenerated.
1496
1497 2017-10-13  Tom Tromey  <tom@tromey.com>
1498
1499         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1500         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1501         delete.
1502         * symfile.c (symbol_file_add_with_addrs): Use new.
1503         (symbol_file_add_separate): Update comment.
1504         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1505         * jit.c (jit_object_close_impl): Use new.
1506         (jit_unregister_code): Use delete.
1507         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1508         (~objfile): Rename from free_objfile.
1509         (free_objfile_separate_debug, do_free_objfile_cleanup)
1510         (free_all_objfiles, objfile_purge_solibs): Use delete.
1511         * objfiles.h (struct objfile): Add constructor and destructor.
1512         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1513         (allocate_objfile, free_objfile): Don't declare.
1514         (struct objstats): Add initializers.
1515
1516 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1517
1518         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1519         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1520         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1521         * gdbarch.h: Regenerate.
1522         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1523         Adjust comment.
1524         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1525         (i386_displaced_step_fixup): Adjust comment.
1526         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1527
1528 2017-10-12  Tom Tromey  <tom@tromey.com>
1529
1530         * prologue-value.h (pv_area::store_would_trash): Return bool.
1531         (pv_area::find_reg): Likewise.
1532         * prologue-value.c (pv_area::store_would_trash): Return bool.
1533         (pv_area::find_reg): Likewise.
1534
1535 2017-10-12  Tom Tromey  <tom@tromey.com>
1536
1537         * s390-linux-tdep.c (s390_store, s390_load)
1538         (s390_check_for_saved, s390_analyze_prologue): Update.
1539         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1540         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1541         * prologue-value.h (class pv_area): Move from prologue-value.c.
1542         Change names of members.  Add constructor, destructor, member
1543         functions.
1544         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1545         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1546         (pv_area_fetch, pv_area_scan): Don't declare.
1547         * prologue-value.c (struct pv_area::area_entry): Now member of
1548         pv_area.
1549         (struct pv_area): Move to prologue-value.h.
1550         (pv_area::pv_area): Rename from make_pv_area.
1551         (pv_area::~pv_area): Rename from free_pv_area.
1552         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1553         (clear_entries, find_entry, overlaps, store_would_trash, store)
1554         (fetch, find_reg, scan): Now member of pv_area.
1555         Remove "area" argument.  Update.
1556         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1557         Update.
1558         * mn10300-tdep.c (push_reg, check_for_saved)
1559         (mn10300_analyze_prologue): Update.
1560         * mep-tdep.c (is_arg_spill, check_for_saved)
1561         (mep_analyze_prologue): Update.
1562         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1563         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1564         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1565         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1566         Update.
1567         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1568         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1569
1570 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1571
1572         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1573         * linux-nat.c (linux_nat_delete_thread): New variable.
1574         (lwp_free): Invoke linux_nat_delete_thread if set.
1575         (linux_nat_set_delete_thread): New function.
1576         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1577         thread delete callback.
1578         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1579         (_initialize_arm_linux_nat): Assign thread delete callback.
1580         * s390-linux-nat.c (s390_delete_thread): New function.
1581         (_initialize_s390_nat): Assign thread delete callback.
1582         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1583         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1584         function.
1585         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1586         declaration.
1587         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1588         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1589
1590 2017-10-09  Tom Tromey  <tom@tromey.com>
1591
1592         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1593         std::string.
1594         * tui/tui-layout.c (enum tui_status): Use std::string.
1595
1596 2017-10-11  Tom Tromey  <tom@tromey.com>
1597
1598         * gdbthread.h (thread_command): Constify.
1599         * inferior.h (detach_command): Constify.
1600         * top.h (set_history, show_history): Constify.
1601         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1602         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1603         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1604         * printcmd.c (set_command): Constify.
1605         (non_const_set_command): New function.
1606         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1607         * breakpoint.c (enable_command, disable_command, delete_command)
1608         (catch_command, tcatch_command, set_breakpoint_cmd)
1609         (show_breakpoint_cmd): Constify.
1610         * macrocmd.c (macro_command): Constify.
1611         * infcmd.c (unset_command, kill_command, detach_command)
1612         (info_proc_cmd): Constify.
1613         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1614         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1615         (info_auto_load_cmd): Constify.
1616         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1617         (unset_tdesc_cmd): Constify.
1618         * ada-lang.c (set_ada_command, show_ada_command)
1619         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1620         * guile/guile.c (set_guile_command, show_guile_command)
1621         (info_guile_command): Constify.
1622         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1623         Constify.
1624         * skip.c (skip_command): Constify.
1625         * compile/compile.c (_initialize_compile): Constify.
1626         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1627         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1628         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1629         (maint_btrace_pt_show_cmd): Constify.
1630         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1631         Constify.
1632         * python/python.c (user_show_python, user_set_python): Constify.
1633         * mips-tdep.c (set_mips_command, show_mips_command)
1634         (set_mipsfpu_command): Constify.
1635         * record-btrace.c (cmd_record_btrace_start)
1636         (cmd_set_record_btrace, cmd_show_record_btrace)
1637         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1638         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1639         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1640         Constify.
1641         * symfile.c (overlay_command): Constify.
1642         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1643         * cli/cli-logging.c (set_logging_command, show_logging_command):
1644         Constify.
1645         * cli/cli-dump.c (dump_command, append_command)
1646         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1647         (tekhex_dump_command, binary_dump_command)
1648         (binary_append_command): Constify.
1649         * cli/cli-decode.c (struct cmd_list_element): Change type of
1650         "fun".
1651         * cli/cli-cmds.c (info_command, show_command, set_debug)
1652         (show_debug): Constify.
1653         (show_command): Add non-const overload.
1654         * top.c (set_history, show_history): Constify.
1655         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1656         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1657         * target.c (target_command): Constify.
1658         * sparc64-tdep.c (info_adi_command): Constify.
1659         * record-full.c (cmd_record_full_start): Constify.
1660         (set_record_full_command): Constify.  Fix typo.
1661         (show_record_full_command): Constify.
1662         * thread.c (thread_command, thread_apply_command): Constify.
1663         * memattr.c (dummy_cmd): Constify.
1664         * value.c (function_command): Constify.
1665         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1666         * probe.c (info_probes_command): Constify.
1667         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1668         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1669         (show_thread_cmd, set_thread_default_cmd)
1670         (show_thread_default_cmd): Constify.
1671         (check_empty): Constify.
1672         * tracepoint.c (tfind_command): Constify.
1673         * cp-support.c (maint_cplus_command): Constify.
1674         * windows-tdep.c (info_w32_command): Constify.
1675         * record.c (cmd_record_start, set_record_command)
1676         (show_record_command, info_record_command, cmd_record_goto):
1677         Constify.
1678         * ravenscar-thread.c (set_ravenscar_command)
1679         (show_ravenscar_command): Constify.
1680         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1681         Constify.
1682         (add_internal_problem_command): Remove casts.
1683         * arc-tdep.c (maintenance_print_arc_command): Constify.
1684         * valprint.c (set_print, show_print, set_print_raw)
1685         (show_print_raw): Constify.
1686         * maint.c (maintenance_command, maintenance_info_command)
1687         (maintenance_print_command, maintenance_set_cmd)
1688         (maintenance_show_cmd, set_per_command_cmd)
1689         (show_per_command_cmd, maintenance_check_command): Constify.
1690         * language.c (set_check, show_check): Constify.
1691         * typeprint.c (show_print_type, set_print_type): Constify.
1692         * go32-nat.c (go32_info_dos_command): Constify.
1693
1694 2017-10-11  Tom Tromey  <tom@tromey.com>
1695
1696         * breakpoint.c (prepare_re_set_context): Remove.
1697         (breakpoint_re_set_one): Update.  Don't use cleanups.
1698         (breakpoint_re_set): Use scoped_restore, std::string, and
1699         scoped_restore_current_language.
1700
1701 2017-10-11  Tom Tromey  <tom@tromey.com>
1702
1703         * breakpoint.c (commands_command_1): Use std::string.
1704         (cleanup_executing_breakpoints): Remove.
1705         (bpstat_do_actions_1): Use scoped_restore.
1706         (bpstat_check_watchpoint): Use std::string.
1707         (decode_static_tracepoint_spec): Likewise.
1708         (break_range_command): Likewise.
1709         (watch_command_1): Likewise.
1710         (compare_breakpoints): Change argument types.
1711         (clear_command): Use std::vector.
1712         (cleanup_executing_breakpoints): Remove.
1713         (update_global_location_list): Use unique_xmalloc_ptr.
1714         (strace_command): Remove unused declaration.
1715
1716 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1717
1718         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1719         * NEWS: Mention new FreeBSD/arm native configuration.
1720         * configure.host: Add arm*-*-freebsd*.
1721         * configure.nat: Likewise.
1722         * arm-fbsd-nat.c: New file.
1723
1724 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1725
1726         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1727         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1728         * NEWS: Mention new FreeBSD/arm target.
1729         * configure.tgt: Add arm*-*-freebsd*.
1730         * arm-fbsd-tdep.c: New file.
1731         * arm-fbsd-tdep.h: New file.
1732
1733 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1734
1735         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1736         `gdbarch_elfcore_write_linux_prpsinfo'.
1737         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1738         method.
1739         (elf_internal_linux_prpsinfo): Remove declaration.
1740         * gdbarch.h: Regenerate.
1741         * gdbarch.c: Regenerate.
1742
1743 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1744
1745         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1746         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1747
1748 2017-10-11  Pedro Alves  <palves@redhat.com>
1749
1750         * breakpoint.c (reattach_breakpoints): Delete.
1751         * breakpoint.h (reattach_breakpoints): Delete.
1752
1753 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1754
1755         * symfile.c (registered_sym_fns): Make struct, not typedef.
1756         (DEF_VEC_O (registered_sym_fns)): Remove.
1757         (symtab_fns): Change type to std::vector.
1758         (add_symtab_fns): Adjust.
1759         (find_sym_fns): Adjust.
1760
1761 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1762
1763         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1764         * arc-tdep.h (arc_arch_is_em): New function.
1765         (arc_arch_is_hs): Likewise.
1766
1767 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1768
1769         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1770         parentheses in the declaration.
1771         (macro_lookup_inclusion): Likewise.
1772         (macro_lookup_definition): Likewise.
1773         * p-lang.h (pascal_builtin_types): Likewise.
1774         * tui/tui-data.c (tui_win_list): Likewise.
1775         * tui/tui-data.h (tui_win_list): Likewise.
1776         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1777
1778 2017-10-11  Mark Rages  <markrages@gmail.com>
1779
1780         * target-memory.c (block_boundaries): Fix for block address not
1781         aligned on block size.
1782
1783 2017-10-10  Pedro Alves <palves@redhat.com>
1784             Tom Tromey  <tom@tromey.com>
1785
1786         * breakpoint.c (struct captured_breakpoint_query_args)
1787         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1788         (print_breakpoint): New.
1789         * breakpoint.h (print_breakpoint): Declare.
1790         * common/common-exceptions.h (enum return_reason): Remove
1791         references to catch_exceptions.
1792         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1793         Delete.
1794         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1795         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1796         * gdb.h: Delete.
1797         * gdbthread.h (thread_select): Declare.
1798         * mi/mi-cmd-break.c: Don't include gdb.h.
1799         (breakpoint_notify): Use print_breakpoint.
1800         * mi/mi-cmd-catch.c: Don't include gdb.h.
1801         * mi/mi-interp.c: Don't include gdb.h.
1802         (mi_print_breakpoint_for_event): New.
1803         (mi_breakpoint_created, mi_breakpoint_modified): Use
1804         mi_print_breakpoint_for_event.
1805         * mi/mi-main.c: Don't include gdb.h.
1806         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1807         thread_select instead of gdb_thread_select.
1808         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1809         of using gdb_list_thread_ids.
1810         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1811         FILEIO_ENOSYS here.
1812         (remote_fileio_request): Use TRY/CATCH instead of
1813         catch_exceptions.
1814         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1815         (symbol_file_add_from_memory_wrapper): Delete.
1816         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1817         * thread.c: Don't include gdb.h.
1818         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1819         (thread_alive): Use thread_select.
1820         (do_captured_thread_select): Delete, parts salvaged as ...
1821         (thread_select): ... this new function.
1822         (gdb_thread_select): Delete.
1823
1824 2017-10-10  Pedro Alves  <palves@redhat.com>
1825             Tom Tromey  <tom@tromey.com>
1826
1827         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1828         and reverse logic.
1829         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1830         No longer macros.  Instead ...
1831         (enum wp_check_result): They're now values of this new
1832         enumeration.
1833         (watchpoint_check): Change return type to wp_check_result and
1834         parameter type to bpstat.
1835         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1836         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1837         catch_errors.  Reverse logic of watchpoint_check call.
1838         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1839         pointer as parameter.
1840         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1841         * common/common-exceptions.c (throw_exception_sjlj): Update
1842         comments to avoid mentioning catch_errors.
1843         * exceptions.c (catch_errors): Delete.
1844         * exceptions.h: Update comments to avoid mentioning catch_errors.
1845         (catch_errors_ftype, catch_errors): Delete.
1846         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1847         (hook_stop_stub): Delete.
1848         (restore_selected_frame): Change return type to void, and
1849         parameter type to const frame_id &.
1850         (restore_infcall_control_state): Use TRY/CATCH instead of
1851         catch_errors.
1852         * main.c (captured_command_loop): Return void and remove
1853         parameter.  Remove references to catch_errors.
1854         (captured_main): Use TRY/CATCH instead of catch_errors.
1855         * objc-lang.c (objc_submethod_helper_data)
1856         (find_objc_msgcall_submethod_helper): Delete.
1857         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1858         catch_errors.
1859         * record-full.c (record_full_message): Return void.
1860         (record_full_message_args, record_full_message_wrapper): Delete.
1861         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1862         instead of catch_errors.
1863         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1864         parameter type to int.
1865         * solib-darwin.c (open_symbol_file_object): Ditto.
1866         * solib-dsbt.c (open_symbol_file_object): Ditto.
1867         * solib-frv.c (open_symbol_file_object): Ditto.
1868         * solib-svr4.c (open_symbol_file_object): Ditto.
1869         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1870         * solib.c (update_solib_list): Use TRY/CATCH instead of
1871         catch_errors.
1872         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1873         Change type.
1874         * symmisc.c (struct print_symbol_args): Remove.
1875         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1876         (print_symbol): Change type.
1877         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1878         and remove parameters.
1879         (catch_errors): New.
1880         (get_windows_debug_event): Adjust.
1881
1882 2017-10-09  Tom Tromey  <tom@tromey.com>
1883
1884         * mi/mi-main.c (free_splay_tree): Remove.
1885         (list_available_thread_groups): Use splay_tree_up.
1886         * common/gdb_splay_tree.h: New file.
1887
1888 2017-10-09  Tom Tromey  <tom@tromey.com>
1889
1890         * mi/mi-main.c (do_nothing): Remove.
1891         (list_available_thread_groups): Update.
1892
1893 2017-10-09  Pedro Alves  <palves@redhat.com>
1894
1895         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1896         reading registers when switching context.
1897
1898 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1899
1900         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1901         (fbsd_convert_siginfo): Likewise.
1902         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1903
1904 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1905
1906         * configure.ac (try_guile_versions): Remove guile-2.2.
1907         * configure: Regenerate.
1908
1909 2017-10-09  Tom Tromey  <tom@tromey.com>
1910
1911         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1912         (COMPILE.pre): Use $(CXX).
1913
1914 2017-10-09  Pedro Alves  <palves@redhat.com>
1915
1916         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1917         Use bool.
1918         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1919         * cp-support.h (cp_remove_params): Now returns a
1920         gdb::unique_xmalloc_ptr.
1921         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1922         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1923         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1924         returning a gdb::unique_xmalloc_ptr.
1925         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1926         * stack.c (find_frame_funname): Adjust to cp_remove_params
1927         returning a gdb::unique_xmalloc_ptr.
1928
1929 2017-10-08  Tom Tromey  <tom@tromey.com>
1930
1931         * dwarf2read.c (dwarf2_get_dwz_file): Use
1932         gdb::unique_xmalloc_ptr.
1933         (find_slot_in_mapped_hash): Likewise.
1934         (dwarf2_physname): Likewise.
1935         (create_dwo_unit_in_dwp_v1): Use std::string.
1936         (create_dwo_unit_in_dwp_v2): Likewise.
1937         (lookup_dwo_cutu): Likewise.
1938         (inherit_abstract_dies): Use std::vector.
1939         (read_array_type): Likewise.
1940         (dwarf_decode_macros): Remove unused declaration.
1941         (unsigned_int_compar): Remove.
1942         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1943         (psymtabs_addrmap_cleanup): Remove.
1944
1945 2017-10-08  Tom Tromey  <tom@tromey.com>
1946
1947         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1948         * frame.h (frame_cleanup_after_sniffer): Declare.
1949         (frame_prepare_for_sniffer): Return void.
1950         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1951         type of argument.
1952         (frame_prepare_for_sniffer): Return void.
1953
1954 2017-10-08  Tom Tromey  <tom@tromey.com>
1955
1956         * utils.h (make_cleanup_value_free): Remove.
1957         * utils.c (do_value_free, struct cleanup): Remove.
1958         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1959         Use gdb_value_up.
1960         * value.h (struct value_deleter): New.
1961         (gdb_value_up): New typedef.
1962
1963 2017-10-08  Tom Tromey  <tom@tromey.com>
1964
1965         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1966         (make_cleanup_free_search_symbols): Remove.
1967         (search_symbols): Return std::vector.
1968         (symbol_search::compare_search_syms): Now member of
1969         symbol_search.  Change arguments.
1970         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1971         (symtab_symbol_info, rbreak_command): Update.
1972         * symtab.h (struct symbol_search) <next>: Remove.
1973         Add constructors.
1974         (symbol_search::operator<): New function.
1975         (symbol_search::operator==): New function.
1976         (search_symbols): Remove std::vector.
1977         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1978         (symbol_search::compare_search_syms): Declare.
1979
1980 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1981
1982         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1983         arch/aarch64-insn.o.
1984         Remove one rule.
1985         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1986
1987 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1988
1989         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1990         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1991         arch/arm-linux.o respectively.
1992         * configure.tgt: Likewise.
1993
1994 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1995
1996         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1997         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1998
1999 2017-10-06  Pedro Alves  <palves@redhat.com>
2000
2001         * windows-nat.c: Include <algorithm>.
2002
2003 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2004
2005         * configure.tgt (i386_tobjs): New variable.
2006         (amd64_tobjs): New variable.
2007         Set $cpu_obs and $os_obs.
2008
2009 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2010
2011         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2012         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2013         (clean): Remove object files and dependency files.
2014         (distclean): Remove the directory.
2015         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2016         * configure: Re-generated.
2017         * configure.tgt: Replace amd64.o with arch/amd64.o.
2018
2019 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2020
2021         PR build/22188
2022         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2023         and SETEND.
2024
2025 2017-10-05  Pedro Alves  <palves@redhat.com>
2026
2027         * linux-nat.c (linux_child_follow_fork): When following the parent
2028         and detaching the child, consult the parent thread's architecture
2029         instead of the child's.
2030
2031 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2032
2033         * ax.h: Do not include "doublest.h".
2034         (union agent_val): Remove.
2035
2036 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2037
2038         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2039         (decimal_to_string): Return std::string object.
2040         (decimal_from_string): Accept std::string object.  Return bool.
2041         (decimal_from_integral, decimal_from_doublest): Remove.
2042         (decimal_from_longest): Add prototype.
2043         (decimal_from_ulongest): Likewise.
2044         (decimal_to_longest): Likewise.
2045         (decimal_from_doublest): Likewise.
2046         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2047         (MAX_DECIMAL_STRING): Move here.
2048         (decimal_to_string): Return std::string object.
2049         (decimal_from_string): Accept std::string object.  Return bool.
2050         (decimal_from_integral): Remove, replace by ...
2051         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2052         (decimal_to_longest): New function.
2053         (decimal_from_floating): Remove, replace by ...
2054         (decimal_from_doublest): ... this new function.
2055         (decimal_to_doublest): Update to new decimal_to_string interface.
2056
2057         * value.c (unpack_long): Use decimal_to_longest.
2058         * valops.c (value_cast): Use decimal_from_doublest instead of
2059         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2060         decimal_from_integral.
2061         * valarith.c (value_args_as_decimal): Likewise.
2062         * valprint.c (print_decimal_floating): Update to new
2063         decimal_to_string interface.
2064         * printcmd.c (printf_decfloat): Likewise.
2065         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2066
2067 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2068
2069         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2070         * gdbtypes.c: Include "floatformat.h".
2071         * value.c: Likewise.
2072         * m68k-tdep.c: Likewise.
2073
2074         * findvar.c: Do not include "floatformat.h".
2075         * amd64-darwin-tdep.c: Likewise.
2076         * arm-linux-tdep.c: Likewise.
2077         * i386-darwin-tdep.c: Likewise.
2078         * i387-tdep.c: Likewise.
2079         * m68k-linux-tdep.c: Likewise.
2080         * mep-tdep.c: Likewise.
2081         * mips-tdep.c: Likewise.
2082         * nios2-tdep.c: Likewise.
2083         * s390-linux-tdep.c: Likewise.
2084         * sparc-obsd-tdep.c: Likewise.
2085         * sparc-tdep.c: Likewise.
2086         * sparc64-tdep.c: Likewise.
2087         * spu-tdep.c: Likewise.
2088         * tic6x-tdep.c: Likewise.
2089         * tilegx-tdep.c: Likewise.
2090         * vax-tdep.c: Likewise.
2091         * xstormy16-tdep.c: Likewise.
2092         * xtensa-tdep.c: Likewise.
2093
2094         * top.c: Do not include "doublest.h".
2095         * aarch64-tdep.c: Likewise.
2096         * alpha-tdep.c: Likewise.
2097         * arm-linux-tdep.c: Likewise.
2098         * m68k-linux-tdep.c: Likewise.
2099         * tilegx-tdep.c: Likewise.
2100         * xstormy16-tdep.c: Likewise.
2101
2102 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2103
2104         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2105         (mipsn32_fbsd_sigframe): Define.
2106         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2107         for FreeBSD/mipsn32.
2108
2109 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2110
2111         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2112         AT_HWCAP.
2113
2114 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2115
2116         * MAINTAINERS (Misc): Update my email address.
2117
2118 2017-10-04  Pedro Alves  <palves@redhat.com>
2119
2120         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2121         it instead of target_gdbarch.
2122         (get_remote_state, get_remote_packet_size): Adjust
2123         get_remote_arch_state calls, passing down target_gdbarch
2124         explicitly.
2125         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2126         'gdbarch' and use it instead of target_gdbarch.
2127         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2128         passing down target_gdbarch explicitly.
2129         (struct stop_reply) <arch>: New field.
2130         (remote_parse_stop_reply): Use the stopped thread's architecture,
2131         not the current inferior's.  Save the architecture in the
2132         stop_reply.
2133         (process_stop_reply): Use the stop reply's architecture.
2134         (process_g_packet, remote_fetch_registers)
2135         (remote_prepare_to_store, store_registers_using_G)
2136         (remote_store_registers): Adjust get_remote_arch_state calls,
2137         using the regcache's architecture.
2138         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2139         passing down target_gdbarch explicitly.
2140         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2141         beneath instead of calling target_gdbarch.
2142         * target.c (default_thread_architecture): Use the specified
2143         inferior's architecture, instead of the current inferior's
2144         architecture (via target_gdbarch).
2145
2146 2017-10-04  Pedro Alves  <palves@redhat.com>
2147
2148         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2149         case.
2150         (regcache_print): Handle !target_has_registers here instead.
2151
2152 2017-10-04  Pedro Alves  <palves@redhat.com>
2153
2154         * frame.c (create_test_frame): Delete.
2155         * frame.h (create_test_frame): Delete.
2156         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2157         (class regcache_test): Delete.
2158         (test_target_has_registers, test_target_has_stack)
2159         (test_target_has_memory, test_target_prepare_to_store)
2160         (test_target_store_registers): New functions.
2161         (test_target_ops): New class.
2162         (register_to_value_test): Error out if there's already a
2163         process_stratum (or higher) target pushed.  Create a fuller mock
2164         environment, with mock target_ops, inferior, address space, thread
2165         and inferior_ptid.
2166         * progspace.c (struct address_space): Move to ...
2167         * progspace.h (struct address_space): ... here.
2168         * regcache.h (regcache::~regcache, regcache::raw_write)
2169         [GDB_SELF_TEST]: No longer virtual.
2170
2171 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2172
2173         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2174
2175 2017-10-04  Pedro Alves  <palves@redhat.com>
2176
2177         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2178         out of 'between TRY and CATCH'.
2179
2180 2017-10-04  Pedro Alves  <palves@redhat.com>
2181
2182         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2183         * common/common-exceptions.h (TRY): Open an outermost scope.
2184         Expand intro comment.
2185         (CATCH): Reindent.
2186         (END_CATCH): Close the outermost scope.
2187         * completer.c (complete_line_internal): Add missing END_CATCH.
2188
2189 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2190
2191         * NEWS (Changes since GDB 8.0): Add entry about new
2192         'set-cwd-on-gdbserver' feature.
2193         (New remote packets): Add entry for QSetWorkingDir.
2194         * common/common-inferior.h (set_inferior_cwd): New prototype.
2195         * infcmd.c (set_inferior_cwd): Remove "static".
2196         (show_cwd_command): Expand text to include remote debugging.
2197         * remote.c: Add PACKET_QSetWorkingDir.
2198         (remote_protocol_features) <QSetWorkingDir>: New entry for
2199         PACKET_QSetWorkingDir.
2200         (extended_remote_set_inferior_cwd): New function.
2201         (extended_remote_create_inferior): Call
2202         "extended_remote_set_inferior_cwd".
2203         (_initialize_remote): Call "add_packet_config_cmd" for
2204         QSetWorkingDir.
2205
2206 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2207
2208         * NEWS (New commands): Mention "set/show cwd".
2209         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2210         "cd" command's help text.
2211         * common/common-inferior.h (get_inferior_cwd): New prototype.
2212         * infcmd.c (inferior_cwd_scratch): New global variable.
2213         (set_inferior_cwd): New function.
2214         (get_inferior_cwd): Likewise.
2215         (set_cwd_command): Likewise.
2216         (show_cwd_command): Likewise.
2217         (_initialize_infcmd): Add "set/show cwd" commands.
2218         * inferior.h (class inferior) <cwd>: New field.
2219         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2220         (fork_inferior): Change inferior's cwd before its execution.
2221         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2222         to CreateProcess.
2223
2224 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2225
2226         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2227         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2228         (COMMON_OBS): Add gdb_tilde_expand.o.
2229         * common/gdb_tilde_expand.c: New file.
2230         * common/gdb_tilde_expand.h: Likewise.
2231
2232 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2233
2234         * gdbarch.sh (objfile): Remove duplicate declaration.
2235         * gdbarch.h: Regenerate.
2236
2237 2017-10-03  Tom Tromey  <tom@tromey.com>
2238
2239         * utils.c (internal_vproblem): Use string_vprintf.
2240
2241 2017-10-03  Tom Tromey  <tom@tromey.com>
2242
2243         * printcmd.c (info_symbol_command): Use std::string.
2244
2245 2017-10-03  Tom Tromey  <tom@tromey.com>
2246
2247         * top.c (gdb_safe_append_history): Use std::string.
2248
2249 2017-10-03  Tom Tromey  <tom@tromey.com>
2250
2251         * event-top.c (stdin_event_handler): Update.
2252         * main.c (captured_main_1): Update.
2253         * top.h (make_delete_ui_cleanup): Remove.
2254         (struct ui): Add constructor and destructor.
2255         (new_ui, delete_ui): Remove.
2256         * top.c (make_delete_ui_cleanup): Remove.
2257         (new_ui_command): Use std::unique_ptr.
2258         (delete_ui_cleanup): Remove.
2259         (ui::ui): Rename from new_ui.  Update.
2260         (free_ui): Remove.
2261         (ui::~ui): Rename from delete_ui.  Update.
2262
2263 2017-10-03  Tom Tromey  <tom@tromey.com>
2264
2265         * symfile.c (load_progress): Use gdb::byte_vector.
2266
2267 2017-10-03  Tom Tromey  <tom@tromey.com>
2268
2269         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2270         declaration.
2271         * printcmd.c (x_command): Remove unused declaration.
2272         * symfile.c (symbol_file_command): Remove unused declaration.
2273
2274 2017-10-03  Tom Tromey  <tom@tromey.com>
2275
2276         * utils.c (internal_vproblem): Use std::string.
2277         (defaulted_query): Likewise.
2278
2279 2017-10-03  Tom Tromey  <tom@tromey.com>
2280
2281         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2282         * top.c (execute_command_to_string): Update.
2283         * utils.c (make_cleanup_restore_page_info): Remove.
2284         (do_restore_page_info_cleanup): Remove.
2285         (set_batch_flag_and_restore_page_info):
2286         New.
2287         (make_cleanup_restore_page_info): Remove.
2288         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2289         (~set_batch_flag_and_restore_page_info): New
2290         (make_cleanup_restore_uinteger): Remove.
2291         (make_cleanup_restore_integer): Remove.
2292         (struct restore_integer_closure): Remove.
2293         (restore_integer): Remove.
2294         * utils.h (struct set_batch_flag_and_restore_page_info): New
2295         class.
2296         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2297         (make_cleanup_restore_page_info): Remove.
2298         (make_cleanup_restore_uinteger) Remove.
2299         (make_cleanup_restore_integer) Remove.
2300
2301 2017-10-03  Tom Tromey  <tom@tromey.com>
2302
2303         * record-full.h (record_full_gdb_operation_disable_set): Return
2304         scoped_restore_tmpl<int>.
2305         * infrun.c (adjust_pc_after_break): Update.
2306         (handle_signal_stop): Update.
2307         * record-full.c (record_full_gdb_operation_disable_set): Return
2308         scoped_restore_tmpl<int>.
2309         (record_full_wait_1, record_full_insert_breakpoint)
2310         (record_full_remove_breakpoint, record_full_save)
2311         (record_full_goto_insn): Update.
2312
2313 2017-10-02  Tom Tromey  <tom@tromey.com>
2314
2315         PR rust/22236:
2316         * rust-lang.c (rust_val_print_str): New function.
2317         (val_print_struct): Call it.
2318         (rust_subscript): Preserve name of slice type.
2319
2320 2017-10-02  Tom Tromey  <tom@tromey.com>
2321
2322         * rust-lang.c (rust_subscript): Handle slices in
2323         EVAL_AVOID_SIDE_EFFECTS case.
2324
2325 2017-10-02  Tom Tromey  <tom@tromey.com>
2326
2327         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2328
2329 2017-10-02  Tom Tromey  <tom@tromey.com>
2330
2331         * rust-lang.h (rust_slice_type): Add "extern".
2332
2333 2017-10-02  Tom Tromey  <tom@tromey.com>
2334             Pedro Alves  <palves@redhat.com>
2335
2336         * ada-lang.h (ada_exc_info::operator<): Make const.
2337         (ada_exc_info::operator==): Make const.
2338         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2339         Make const.
2340
2341 2017-09-29  Tom Tromey  <tom@tromey.com>
2342
2343         * target.c (read_whatever_is_readable): Change type of "result".
2344         Update.
2345         (free_memory_read_result_vector): Remove.
2346         (read_memory_robust): Change return type.  Update.
2347         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2348         bin2hex, std::string.
2349         * target.h (memory_read_result_s): Remove typedef.
2350         (free_memory_read_result_vector): Remove.
2351         (read_memory_robust): Return std::vector.
2352
2353 2017-09-29  Tom Tromey  <tom@tromey.com>
2354
2355         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2356
2357 2017-09-29  Tom Tromey  <tom@tromey.com>
2358
2359         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2360         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2361         operator< and operator==.
2362         (ada_exceptions_list): Return a std::vector.
2363         * ada-lang.c (ada_exc_info::operator<): Rename from
2364         compare_ada_exception_info.
2365         (ada_exc_info::operator==): New.
2366         (sort_remove_dups_ada_exceptions_list): Change type of
2367         "exceptions".
2368         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2369         (ada_add_global_exceptions): Likewise.
2370         (ada_exceptions_list_1): Return a std::vector.
2371         (ada_exceptions_list): Likewise.
2372
2373 2017-09-29  Tom Tromey  <tom@tromey.com>
2374
2375         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2376         'std::set *'.
2377         (print_one_inferior): Update.
2378         (free_vector_of_ints): Remove.
2379         (list_available_thread_groups): Change "ids" to std::set.
2380         (mi_cmd_list_thread_groups): Update.
2381         (struct collect_cores_data) <core>: Now a std::set.
2382         (collect_cores): Update.
2383         (unique): Remove.
2384         (print_one_inferior): Update.
2385
2386 2017-09-29  Tom Tromey  <tom@tromey.com>
2387
2388         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2389         (mi_execute_async_cli_command): Likewise.
2390         (mi_cmd_trace_frame_collected): Use field_fmt.
2391
2392 2017-09-29  Tom Tromey  <tom@tromey.com>
2393
2394         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2395         gdb::byte_vector.
2396
2397 2017-09-29  Tom Tromey  <tom@tromey.com>
2398
2399         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2400
2401 2017-09-29  Tom Tromey  <tom@tromey.com>
2402
2403         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2404
2405 2017-09-29  Tom Tromey  <tom@tromey.com>
2406
2407         * varobj.h (varobj_gen_name): Return std::string.
2408         * varobj.c (varobj_gen_name): Return std::string.
2409         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2410         (mi_cmd_var_delete): Don't copy "name".
2411
2412 2017-09-29  Tom Tromey  <tom@tromey.com>
2413
2414         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2415         (mi_cmd_break_insert_1): Update.
2416
2417 2017-09-29  Tom Tromey  <tom@tromey.com>
2418
2419         * target.h (make_scoped_defer_target_commit_resume): Update.
2420         * target.c (make_scoped_defer_target_commit_resume): Rename from
2421         make_cleanup_defer_target_commit_resume.  Return a
2422         scoped_restore.
2423         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2424
2425 2017-09-29  Tom Tromey  <tom@tromey.com>
2426
2427         * main.c (captured_main_1): Remove unused declaration.
2428         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2429
2430 2017-09-29  Tom Tromey  <tom@tromey.com>
2431
2432         * symtab.c (search_symbols): Remove unused outer cleanup.
2433         (make_source_files_completion_list): Remove unused declaration.
2434
2435 2017-09-29  Tom Tromey  <tom@tromey.com>
2436
2437         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2438
2439 2017-09-29  Tom Tromey  <tom@tromey.com>
2440
2441         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2442         gdb::byte_vector.
2443
2444 2017-09-29  Tom Tromey  <tom@tromey.com>
2445
2446         * complaints.c (vcomplaint): Use std::string.
2447
2448 2017-09-29  Tom Tromey  <tom@tromey.com>
2449
2450         * tracepoint.c (trace_variable_command): Use std::string.
2451         (encode_actions_1): Remove unused declarations.
2452         (create_tsv_from_upload): Use std::string.
2453
2454 2017-09-29  Tom Tromey  <tom@tromey.com>
2455
2456         * cp-support.c (gdb_demangle): Use std::string.
2457
2458 2017-09-29  Tom Tromey  <tom@tromey.com>
2459
2460         * stack.c (parse_frame_specification): Use std::string
2461         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2462
2463 2017-09-29  Tom Tromey  <tom@tromey.com>
2464
2465         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2466
2467 2017-09-29  Tom Tromey  <tom@tromey.com>
2468
2469         * utils.c (vfprintf_maybe_filtered): Use std::string.
2470         (vfprintf_unfiltered): Likewise.
2471
2472 2017-09-29  Tom Tromey  <tom@tromey.com>
2473
2474         * event-top.c (top_level_prompt): Return std::string.
2475         (display_gdb_prompt): Update.
2476
2477 2017-09-29  Tom Tromey  <tom@tromey.com>
2478
2479         * unittests/common-utils-selftests.c (format): New function.
2480         (string_vprintf_tests): New function.
2481         (_initialize_common_utils_selftests): Register new tests.
2482         * common/common-utils.c (string_vprintf): New function.
2483         * common/common-utils.h (string_vprintf): Declare.
2484
2485 2017-09-29  Pedro Alves  <palves@redhat.com>
2486
2487         * common/rsp-low.c (unpack_varlen_hex): Constify.
2488         * common/rsp-low.h (unpack_varlen_hex): Constify.
2489         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2490         Constify.
2491         * remote.c (remote_set_permissions, read_ptid)
2492         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2493         (remote_static_tracepoint_marker_at)
2494         (remote_static_tracepoint_markers_by_strid)
2495         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2496         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2497         (parse_tracepoint_definition, parse_tsv_definition)
2498         (parse_static_tracepoint_marker_definition): Constify.
2499         * tracepoint.h (parse_static_tracepoint_marker_definition)
2500         (parse_trace_status, parse_tracepoint_status)
2501         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2502
2503 2017-09-29  Pedro Alves  <palves@redhat.com>
2504
2505         * remote.c (target_buf, target_buf_size): Delete.
2506         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2507         Use the connection's packet buffer instead.
2508         All callers adjusted.
2509         (_initialize_remote): Remove references to target_buf and
2510         target_buf_size.
2511
2512 2017-09-28  Pedro Alves  <palves@redhat.com>
2513
2514         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2515         unittests/common-utils-selftests.c.
2516         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2517         (COMMON_OBS): Remove utils-selftests.o.
2518         * utils-selftests.c: Move to ...
2519         * unittests/common-utils-selftests.c: ... here and rename self
2520         test to "string_printf".
2521
2522 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2523
2524         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2525         having NULL cus or tus.
2526
2527 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2528
2529         * arm-tdep.c: (convert_from_extended): Remove.
2530         (convert_to_extended): Likewise.
2531         (arm_extract_return_value): Use convert_typed_floating.
2532         (arm_store_return_value): Likewise.
2533
2534         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2535         * sh-tdep.c: Do not include "floatformat.h".
2536         (sh_littlebyte_bigword_type): New function.
2537         (sh_register_convert_to_virtual): Use convert_typed_floating.
2538         (sh_register_convert_to_raw): Likewise.
2539         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2540         (sh64_littlebyte_bigword_type): New function.
2541         (sh64_extract_return_value): Use convert_typed_floating.
2542         (sh64_register_convert_to_virtual): Likewise.
2543         (sh64_register_convert_to_raw): Likewise.
2544
2545 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2546
2547         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2548         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2549
2550         * gdbtypes.h (union type_specific): Make field floatformat hold
2551         just a single struct floatformat, not an array.
2552         (floatformat_from_type): Move here.
2553         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2554         changed TYPE_FLOATFORMAT definition.
2555         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2556         (recursive_dump_type): Likewise.
2557         (init_float_type): Install correct floatformat for byte order.
2558         (arch_float_type): Likewise.
2559
2560 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2561
2562         * gdbtypes.c (init_type): Change incoming argument from
2563         length-in-bytes to length-in-bits.  Assert length is a
2564         multiple of TARGET_CHAR_BITS.
2565         (arch_type, arch_flags_type): Likewise.
2566         (init_integer_type): Update call to init_type.
2567         (init_character_type): Likewise.
2568         (init_boolean_type): Likewise.
2569         (init_float_type): Likewise.
2570         (init_decfloat_type): Likewise.
2571         (init_complex_type): Likewise.
2572         (init_pointer_type): Likewise.
2573         (objfile_type): Likewise.
2574         (arch_integer_type): Update call to arch_type.
2575         (arch_character_type): Likewise.
2576         (arch_boolean_type): Likewise.
2577         (arch_float_type): Likewise.
2578         (arch_decfloat_type): Likewise.
2579         (arch_complex_type): Likewise.
2580         (arch_pointer_type): Likewise.
2581         (gdbtypes_post_init): Likewise.
2582
2583         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2584         (read_base_type): Likewise.
2585         * mdebugread.c (basic_type): Likewise.
2586         * stabsread.c (dbx_init_float_type): Likewise.
2587         (rs6000_builtin_type): Likewise.
2588         (read_range_type): Likewise.  Also, fix call to init_integer_type
2589         with erroneous length argument.
2590
2591         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2592         * d-lang.c (build_d_types): Likewise.
2593         * f-lang.c (build_fortran_types): Likewise.
2594         * go-lang.c (build_go_types): Likewise.
2595         * opencl-lang.c (build_opencl_types): Likewise.
2596         * jit.c (finalize_symtab): Likewise.
2597         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2598         (build_std_type_info_type): Likewise.
2599         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2600         update call to arch_flags_type.
2601
2602         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2603         arch_type.
2604         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2605         * windows-tdep.c (windows_get_tlb_type): Likewise.
2606
2607         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2608         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2609         * m32c-tdep.c (make_types): Likewise.
2610         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2611         (rl78_psw_type): Update call to arch_flags_type.
2612         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2613         * rx-tdep.c (rx_psw_type): Likewise.
2614         (rx_fpsw_type): Likewise.
2615         * sparc-tdep.c (sparc_psr_type): Likewise.
2616         (sparc_fsr_type): Likewise.
2617         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2618         (sparc64_ccr_type): Likewise.
2619         (sparc64_fsr_type): Likewise.
2620         (sparc64_fprs_type): Likewise.
2621
2622 2017-09-27  Tom Tromey  <tom@tromey.com>
2623
2624         * findcmd.c (find_command): Constify.
2625
2626 2017-09-27  Tom Tromey  <tom@tromey.com>
2627
2628         * ada-tasks.c (task_command_1, task_command): Constify.
2629
2630 2017-09-27  Tom Tromey  <tom@tromey.com>
2631
2632         * symtab.c (maintenance_print_symbol_cache)
2633         (maintenance_flush_symbol_cache)
2634         (maintenance_print_symbol_cache_statistics): Constify.
2635
2636 2017-09-27  Tom Tromey  <tom@tromey.com>
2637
2638         * inferior.c (detach_inferior_command, kill_inferior_command)
2639         (inferior_command): Constify.
2640
2641 2017-09-27  Tom Tromey  <tom@tromey.com>
2642
2643         * regcache.c (regcache_print, maintenance_print_registers)
2644         (maintenance_print_raw_registers)
2645         (maintenance_print_cooked_registers)
2646         (maintenance_print_register_groups)
2647         (maintenance_print_remote_registers): Constify.
2648
2649 2017-09-27  Tom Tromey  <tom@tromey.com>
2650
2651         * printcmd.c (map_display_numbers, undisplay_command)
2652         (enable_disable_display_command, enable_display_command)
2653         (disable_display_command): Constify.
2654
2655 2017-09-27  Tom Tromey  <tom@tromey.com>
2656
2657         * breakpoint.h (delete_command): Don't declare.
2658         * breakpoint.c (delete_command, enable_once_command)
2659         (enable_count_command, enable_delete_command, breakpoint_1)
2660         (maintenance_info_breakpoints, stopin_command, stopat_command)
2661         (delete_command, delete_trace_command, save_breakpoints)
2662         (save_breakpoints_command, save_tracepoints_command): Constify.
2663
2664 2017-09-27  Tom Tromey  <tom@tromey.com>
2665
2666         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2667         (skip_ws, extract_identifier, macro_define_command)
2668         (macro_undef_command, macro_list_command): Constify.
2669
2670 2017-09-27  Tom Tromey  <tom@tromey.com>
2671
2672         * infcmd.c (environment_info, set_environment_command)
2673         (unset_environment_command, path_info, info_proc_cmd_1)
2674         (info_proc_cmd_mappings, info_proc_cmd_stat)
2675         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2676         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2677
2678 2017-09-27  Tom Tromey  <tom@tromey.com>
2679
2680         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2681         Constify.
2682
2683 2017-09-27  Tom Tromey  <tom@tromey.com>
2684
2685         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2686
2687 2017-09-27  Tom Tromey  <tom@tromey.com>
2688
2689         * demangle.c (demangle_command): Constify.
2690
2691 2017-09-27  Tom Tromey  <tom@tromey.com>
2692
2693         * progspace.c (maintenance_info_program_spaces_command):
2694         Constify.
2695
2696 2017-09-27  Tom Tromey  <tom@tromey.com>
2697
2698         * compile/compile.c (check_raw_argument, compile_file_command)
2699         (compile_code_command, compile_print_command): Constify.
2700
2701 2017-09-27  Tom Tromey  <tom@tromey.com>
2702
2703         * reggroups.c (maintenance_print_reggroups): Constify.
2704
2705 2017-09-27  Tom Tromey  <tom@tromey.com>
2706
2707         * dwarf2read.c (save_gdb_index_command): Constify.
2708
2709 2017-09-27  Tom Tromey  <tom@tromey.com>
2710
2711         * stap-probe.c (info_probes_stap_command): Constify.
2712
2713 2017-09-27  Tom Tromey  <tom@tromey.com>
2714
2715         * fork-child.c (unset_exec_wrapper_command): Constify.
2716
2717 2017-09-27  Tom Tromey  <tom@tromey.com>
2718
2719         * btrace.c (get_uint, get_context_size, no_chunk)
2720         (maint_btrace_packet_history_cmd)
2721         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2722         (maint_info_btrace_cmd): Constify.
2723
2724 2017-09-27  Tom Tromey  <tom@tromey.com>
2725
2726         * reverse.c (delete_bookmark_command): Constify.
2727
2728 2017-09-27  Tom Tromey  <tom@tromey.com>
2729
2730         * remote.c (set_memory_packet_size)
2731         (set_memory_write_packet_size, show_memory_write_packet_size)
2732         (set_memory_read_packet_size, show_memory_read_packet_size)
2733         (compare_sections_command, packet_command, remote_put_command)
2734         (remote_get_command, remote_delete_command): Constify.
2735
2736 2017-09-27  Tom Tromey  <tom@tromey.com>
2737
2738         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2739         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2740         (set_mipsfpu_auto_command): Constify.
2741
2742 2017-09-27  Tom Tromey  <tom@tromey.com>
2743
2744         * cli/cli-cmds.h (cd_command): Constify.
2745         * cli/cli-cmds.c (cd_command): Constify.
2746
2747 2017-09-27  Tom Tromey  <tom@tromey.com>
2748
2749         * thread.c (thread_name_command, thread_find_command): Constify.
2750
2751 2017-09-27  Tom Tromey  <tom@tromey.com>
2752
2753         * probe.c (enable_probes_command, disable_probes_command):
2754         Constify.
2755
2756 2017-09-27  Tom Tromey  <tom@tromey.com>
2757
2758         * symfile.c (symbol_file_command): Constify.
2759         * gdbcore.h (deprecated_file_changed_hook): Constify.
2760         * exec.c (deprecated_file_changed_hook, exec_file_command)
2761         (file_command): Constify.
2762         * defs.h (symbol_file_command): Constify.
2763
2764 2017-09-27  Tom Tromey  <tom@tromey.com>
2765
2766         * remote-fileio.c (set_system_call_allowed)
2767         (show_system_call_allowed): Constify.
2768
2769 2017-09-27  Tom Tromey  <tom@tromey.com>
2770
2771         * tracepoint.c (delete_trace_variable_command)
2772         (tfind_end_command, tfind_start_command, tfind_pc_command)
2773         (tfind_tracepoint_command, tfind_line_command)
2774         (tfind_range_command, tfind_outside_command): Constify.
2775
2776 2017-09-27  Tom Tromey  <tom@tromey.com>
2777
2778         * ax-gdb.c (maint_agent_printf_command, agent_command)
2779         (agent_eval_command): Constify.
2780
2781 2017-09-27  Tom Tromey  <tom@tromey.com>
2782
2783         * tracepoint.c (info_scope_command): Constify.
2784         * python/python.c (gdbpy_decode_line): Constify.
2785         * python/py-breakpoint.c (bppy_init): Constify.
2786         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2787         * location.h: (new_linespec_location)
2788         (string_to_event_location_basic, string_to_event_location):
2789         Constify.
2790         * location.c (new_linespec_location)
2791         (string_to_event_location_basic, string_to_event_location):
2792         Constify.
2793         * linespec.h (decode_line_with_current_source)
2794         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2795         * linespec.c (linespec_lex_to_end)
2796         (decode_line_with_current_source)
2797         (decode_line_with_last_displayed): Constify.
2798         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2799         Constify.
2800         * cli/cli-cmds.c (edit_command, list_command): Constify.
2801         * breakpoint.h (until_break_command, watch_command_wrapper)
2802         (awatch_command_wrapper, rwatch_command_wrapper)
2803         (init_ada_exception_breakpoint): Constify.
2804         * breakpoint.c (break_command_1, dprintf_command)
2805         (break_range_command, watch_command_wrapper)
2806         (rwatch_command_wrapper, awatch_command_wrapper)
2807         (until_break_command, init_ada_exception_breakpoint)
2808         (strace_marker_create_sals_from_location, trace_command)
2809         (ftrace_command, strace_command, struct tracepoint): Constify.
2810         * ax-gdb.c (agent_command_1): Constify.
2811         * ada-lang.c (ada_exception_sal): Constify.
2812
2813 2017-09-27  Tom Tromey  <tom@tromey.com>
2814
2815         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2816         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2817         (get_context_size, no_chunk, get_insn_history_modifiers)
2818         (cmd_record_insn_history, get_call_history_modifiers)
2819         (cmd_record_call_history): Constify.
2820
2821 2017-09-27  Tom Tromey  <tom@tromey.com>
2822
2823         * source.c (show_substitute_path_command)
2824         (unset_substitute_path_command, set_substitute_path_command):
2825         Constify.
2826
2827 2017-09-27  Tom Tromey  <tom@tromey.com>
2828
2829         * typeprint.c (maintenance_print_type): Constify.
2830         * maint.c (maintenance_dump_me, maintenance_demangle)
2831         (maintenance_time_display, maintenance_info_sections)
2832         (maintenance_print_statistics, maintenance_deprecate)
2833         (maintenance_undeprecate): Constify.
2834         (maintenance_do_deprecate): Constify.  Use std::string.
2835         (maintenance_selftest): Constify.
2836         * gdbtypes.h (maintenance_print_type): Constify.
2837
2838 2017-09-27  Tom Tromey  <tom@tromey.com>
2839
2840         * hppa-tdep.c (unwind_command): Constify.
2841
2842 2017-09-27  Tom Tromey  <tom@tromey.com>
2843
2844         * target-descriptions.c (unset_tdesc_filename_cmd)
2845         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2846         Constify.
2847
2848 2017-09-27  Tom Tromey  <tom@tromey.com>
2849
2850         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2851
2852 2017-09-27  Tom Tromey  <tom@tromey.com>
2853
2854         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2855
2856 2017-09-27  Tom Tromey  <tom@tromey.com>
2857
2858         * tui/tui-regs.c (tui_reg_command): Constify.
2859
2860 2017-09-27  Tom Tromey  <tom@tromey.com>
2861
2862         * skip.c (skip_file_command, skip_function_command)
2863         (skip_enable_command, skip_disable_command, skip_delete_command):
2864         Constify.
2865
2866 2017-09-27  Tom Tromey  <tom@tromey.com>
2867
2868         * record-btrace.c (cmd_record_btrace_bts_start)
2869         (cmd_record_btrace_pt_start): Constify.
2870
2871 2017-09-27  Tom Tromey  <tom@tromey.com>
2872
2873         * symmisc.c (maintenance_print_symbols)
2874         (maintenance_print_msymbols, maintenance_print_objfiles)
2875         (maintenance_info_symtabs, maintenance_check_symtabs)
2876         (maintenance_expand_symtabs, maintenance_info_line_tables):
2877         Constify.
2878
2879 2017-09-27  Tom Tromey  <tom@tromey.com>
2880
2881         * top.c (new_ui_command): Constify.
2882
2883 2017-09-27  Tom Tromey  <tom@tromey.com>
2884
2885         * symfile.c (add_symbol_file_command)
2886         (remove_symbol_file_command, list_overlays_command)
2887         (map_overlay_command, unmap_overlay_command)
2888         (overlay_auto_command, overlay_manual_command)
2889         (overlay_off_command, overlay_load_command): Constify.
2890
2891 2017-09-27  Tom Tromey  <tom@tromey.com>
2892
2893         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2894         (info_spu_mailbox_command, info_spu_dma_command)
2895         (info_spu_proxydma_command): Constify.
2896
2897 2017-09-27  Tom Tromey  <tom@tromey.com>
2898
2899         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2900
2901 2017-09-27  Tom Tromey  <tom@tromey.com>
2902
2903         * cli/cli-script.c (user_defined_command): Constify.
2904
2905 2017-09-27  Tom Tromey  <tom@tromey.com>
2906
2907         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2908         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2909         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2910         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2911         (dump_binary_value, append_binary_memory, append_binary_value):
2912         Constify.
2913         (struct dump_context) <func>: Constify.
2914         (add_dump_command): Update.
2915
2916 2017-09-27  Tom Tromey  <tom@tromey.com>
2917
2918         * cli/cli-cmds.c (show_version, show_configuration)
2919         (source_command, show_user): Constify.
2920
2921 2017-09-27  Tom Tromey  <tom@tromey.com>
2922
2923         * target.c (maintenance_print_target_stack): Constify.
2924
2925 2017-09-27  Tom Tromey  <tom@tromey.com>
2926
2927         * interps.c (interpreter_exec_cmd): Constify.
2928
2929 2017-09-27  Tom Tromey  <tom@tromey.com>
2930
2931         * record-full.c (cmd_record_full_restore): Constify.
2932
2933 2017-09-27  Tom Tromey  <tom@tromey.com>
2934
2935         * memattr.c (enable_mem_command, disable_mem_command)
2936         (delete_mem_command): Constify.
2937
2938 2017-09-27  Tom Tromey  <tom@tromey.com>
2939
2940         * value.c (show_convenience): Constify.
2941
2942 2017-09-27  Tom Tromey  <tom@tromey.com>
2943
2944         * gdbcore.h (core_file_command): Update.
2945         * corefile.c (core_file_command): Constify.
2946
2947 2017-09-27  Tom Tromey  <tom@tromey.com>
2948
2949         * user-regs.c (maintenance_print_user_registers): Constify.
2950
2951 2017-09-27  Tom Tromey  <tom@tromey.com>
2952
2953         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2954
2955 2017-09-27  Tom Tromey  <tom@tromey.com>
2956
2957         * cp-support.c (first_component_command): Constify.
2958
2959 2017-09-27  Tom Tromey  <tom@tromey.com>
2960
2961         * psymtab.c (maintenance_print_psymbols)
2962         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2963         Constify.
2964
2965 2017-09-27  Tom Tromey  <tom@tromey.com>
2966
2967         * windows-tdep.c (display_tib): Constify.
2968
2969 2017-09-27  Tom Tromey  <tom@tromey.com>
2970
2971         * linux-fork.c (delete_checkpoint_command)
2972         (detach_checkpoint_command): Constify.
2973
2974 2017-09-27  Tom Tromey  <tom@tromey.com>
2975
2976         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2977
2978 2017-09-27  Tom Tromey  <tom@tromey.com>
2979
2980         * arc-tdep.c (dump_arc_instruction_command): Constify.
2981
2982 2017-09-27  Tom Tromey  <tom@tromey.com>
2983
2984         * valprint.c (set_radix, show_radix): Constify.
2985
2986 2017-09-27  Tom Tromey  <tom@tromey.com>
2987
2988         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2989
2990 2017-09-27  Tom Tromey  <tom@tromey.com>
2991
2992         * command.h (not_just_help_class_command): Update.
2993         * cli/cli-decode.h (not_just_help_class_command): Update.
2994         * cli/cli-decode.c (not_just_help_class_command): Constify.
2995
2996 2017-09-27  Tom Tromey  <tom@tromey.com>
2997
2998         * gdb_bfd.c (maintenance_info_bfds): Constify.
2999
3000 2017-09-27  Tom Tromey  <tom@tromey.com>
3001
3002         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3003         overloads.
3004         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3005         (do_const_cfunc): New function.
3006         (cmd_cfunc_eq): New overload.
3007         (cli_user_command_p): Check do_const_cfunc.
3008         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3009         const_cfunc.
3010         * command.h (add_cmd): Add const overload and no-function
3011         overload.
3012         (set_cmd_cfunc): Add const overload.
3013         (cmd_const_cfunc_ftype): Declare.
3014         (cmd_cfunc_eq): Add const overload.
3015         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3016         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3017         overload.
3018
3019 2017-09-27  Tom Tromey  <tom@tromey.com>
3020
3021         * macroexp.c (get_next_token_for_substitution): New function.
3022         (substitute_args): Call it.  Check for __VA_OPT__.
3023
3024 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3025             Pedro Alves <palves@redhat.com>
3026
3027         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3028         producer_is_icc_lt_14.
3029         (producer_is_icc_lt_14): New function.
3030         (check_producer): Add code for checking version of ICC.
3031         (producer_is_icc): Move to producer.c.
3032         (read_structure_type): Restrict ICC workaround to ICC<14.
3033         * producer.c: Include selftest.h.
3034         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3035         New functions.
3036         * producer.h (producer_is_icc): New declaration.
3037
3038 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3039
3040         * Makefile.in (SFILES): Add producer.c.
3041         (COMMON_OBS): Add producer.o
3042         * amd64-tdep.c (producer.h): Add new include.
3043         * dwarf2read.c (producer.h): Add new include.
3044         * producer.c: New file.
3045         * producer.h: New file.
3046         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3047         producer.c.
3048         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3049         producer.h.
3050
3051 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3052
3053         * configure.ac: Search ncursesw before ncurses.
3054         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3055         * gdb_curses.h: Include <ncursesw/ncurses.h>
3056         * config.in, configure: Regenerate.
3057
3058 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3059
3060         PR gdb/22185
3061         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3062         obsolete.
3063         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3064         Remove i386sol2 support.
3065         * configure.nat <i386sol2>: Remove.
3066         <sol2-64>: Fold into ...
3067         <sol2>: ... this.
3068         Move common settings to default section.
3069         Add sol-thread.o.
3070         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3071         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3072         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3073         <i[34567]86-*-solaris*>: Remove.
3074         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3075
3076         * configure.ac: Remove wctype in libw check.
3077         (_MSE_INT_H): Don't define on Solaris 7-9.
3078         <solaris*>: Remove libthread_db.so.1 check.
3079         * configure: Regenerate.
3080         * config.in: Regenerate.
3081
3082         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3083         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3084         (gdb_ps_size_t): Remove.
3085         Use base types in users.
3086         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3087
3088         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3089
3090 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3091
3092         PR build/22206
3093         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3094         (adi_is_addr_mapped): Likewise.
3095         (PSR_ICC): Don't redefine.
3096         (PSR_IMPL): Likewise.
3097
3098 2017-09-25  Tom Tromey  <tom@tromey.com>
3099
3100         * regcache.c (regcache::dump): Use string_printf.
3101
3102 2017-09-25  Tom Tromey  <tom@tromey.com>
3103
3104         * regcache.c (class regcache_invalidator): New.
3105         (struct register_to_invalidate): Remove.
3106         (make_cleanup_regcache_invalidate): Remove.
3107         (regcache::raw_write): Use regcache_invalidator.
3108
3109 2017-09-25  Tom Tromey  <tom@tromey.com>
3110
3111         * spu-tdep.c (spu2ppu_sniffer): Update.
3112         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3113         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3114         Remove.
3115         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3116         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3117         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3118         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3119         (frame_pop): Update.
3120
3121 2017-09-25  Tom Tromey  <tom@tromey.com>
3122
3123         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3124         * regcache.h (regcache_xfree): Don't declare.
3125         * regcache.c (regcache_xfree): Remove.
3126         (do_regcache_xfree): Use delete.
3127         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3128         * linux-fork.c (free_fork): Use delete.
3129         (fork_save_infrun_state): Likewise.
3130         * jit.c (jit_dealloc_cache): Use delete.
3131         * infrun.c (discard_infcall_suspend_state): Use delete.
3132
3133 2017-09-25  Tom Tromey  <tom@tromey.com>
3134
3135         * regcache.h (regcache_xmalloc): Don't declare.
3136         (regcache_raw_set_cached_value): Update comment.
3137         * regcache.c (regcache_xmalloc): Remove.
3138         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3139         * jit.c (jit_frame_sniffer): Use new.
3140         * frame.c (frame_save_as_regcache): Use new.
3141
3142 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3143
3144         * NEWS: Advertise support for guarded-storage registers on IBM z.
3145
3146 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3147
3148         * s390-linux-nat.c (have_regset_gs): New static variable.
3149         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3150         control block and guarded-storage broadcast control regsets.
3151         (s390_read_description): Detect whether the target has
3152         guarded-storage support, return appropriate tdesc.
3153         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3154         (features/s390x-gs-linux64.c): Likewise.
3155         (struct gdbarch_tdep) <have_gs>: New field.
3156         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3157         (s390_gsbc_regset): New variables.
3158         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3159         and s390_gsbc_regset, if applicable.
3160         (s390_core_read_description): Check whether core file was from a
3161         target with guarded-storage support; include appropriate regsets.
3162         (s390_gdbarch_init): Add registers for guarded-storage support.
3163         (_initialize_s390_tdep): Initialize new target descriptions that
3164         include registers for guarded-storage support.
3165         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3166         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3167         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3168         (S390_NUM_REGS): Adjust macro definition.
3169         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3170         (tdesc_s390x_gs_linux64): New declarations.
3171
3172 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3173
3174         * features/s390-gs-linux64.xml: New file.
3175         * features/s390-gs.xml: New file.
3176         * features/s390-gsbc.xml: New file.
3177         * features/s390x-gs-linux64.xml: New file.
3178         * features/Makefile (WHICH): Add s390-gs-linux64 and
3179         s390x-gs-linux64.
3180         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3181         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3182         * features/s390-gs-linux64.c: New generated file.
3183         * features/s390x-gs-linux64.c: New file.
3184         * regformats/s390-gs-linux64.dat: New file.
3185         * regformats/s390x-gs-linux64.dat: New file.
3186
3187 2017-09-23  Tom Tromey  <tom@tromey.com>
3188
3189         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3190
3191 2017-09-22  Tom Tromey  <tom@tromey.com>
3192
3193         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3194         type to scoped_restore_tmpl.
3195         <scoped_input_handler>: Initialize m_quit_handler directly.
3196
3197 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3198
3199         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3200         (cd_command): Likewise.  Free "current_directory" before
3201         assigning to it.
3202         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3203         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3204         * top.c (gdb_dirbuf): Remove global declaration.
3205         * top.h (gdb_dirbuf): Likewise.
3206
3207 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3208
3209         * gnulib/aclocal.m4: Regenerate.
3210         * gnulib/config.in: Regenerate.
3211         * gnulib/configure: Regenerate.
3212         * gnulib/import/Makefile.am: Regenerate.
3213         * gnulib/import/Makefile.in: Regenerate.
3214         * gnulib/import/assure.h: New file.
3215         * gnulib/import/at-func.c: Likewise
3216         * gnulib/import/chdir-long.c: New file.
3217         * gnulib/import/chdir-long.h: New file.
3218         * gnulib/import/cloexec.c: New file.
3219         * gnulib/import/cloexec.h: New file.
3220         * gnulib/import/close.c: New file.
3221         * gnulib/import/closedir.c: New file.
3222         * gnulib/import/dirent-private.h: New file.
3223         * gnulib/import/dup-safer.c: New file.
3224         * gnulib/import/dup.c: New file.
3225         * gnulib/import/dup2.c: New file.
3226         * gnulib/import/error.c: New file.
3227         * gnulib/import/error.h: New file.
3228         * gnulib/import/exitfail.c: New file.
3229         * gnulib/import/exitfail.h: New file.
3230         * gnulib/import/fchdir.c: New file.
3231         * gnulib/import/fcntl.c: New file.
3232         * gnulib/import/fcntl.in.h: New file.
3233         * gnulib/import/fd-hook.c: New file.
3234         * gnulib/import/fd-hook.h: New file.
3235         * gnulib/import/fd-safer.c: New file.
3236         * gnulib/import/fdopendir.c: New file.
3237         * gnulib/import/filename.h: New file.
3238         * gnulib/import/filenamecat-lgpl.c: New file.
3239         * gnulib/import/filenamecat.h: New file.
3240         * gnulib/import/fstat.c: New file.
3241         * gnulib/import/fstatat.c: New file.
3242         * gnulib/import/getcwd-lgpl.c: New file.
3243         * gnulib/import/getcwd.c: New file.
3244         * gnulib/import/getdtablesize.c: New file.
3245         * gnulib/import/getlogin_r.c: New file.
3246         * gnulib/import/getprogname.c: New file.
3247         * gnulib/import/getprogname.h: New file.
3248         * gnulib/import/gettext.h: New file.
3249         * gnulib/import/glob-libc.h: New file.
3250         * gnulib/import/glob.c: New file.
3251         * gnulib/import/glob.in.h: New file.
3252         * gnulib/import/intprops.h: New file.
3253         * gnulib/import/m4/chdir-long.m4: New file.
3254         * gnulib/import/m4/close.m4: New file.
3255         * gnulib/import/m4/closedir.m4: New file.
3256         * gnulib/import/m4/d-ino.m4: New file.
3257         * gnulib/import/m4/d-type.m4: New file.
3258         * gnulib/import/m4/dup.m4: New file.
3259         * gnulib/import/m4/dup2.m4: New file.
3260         * gnulib/import/m4/error.m4: New file.
3261         * gnulib/import/m4/fchdir.m4: New file.
3262         * gnulib/import/m4/fcntl.m4: New file.
3263         * gnulib/import/m4/fcntl_h.m4: New file.
3264         * gnulib/import/m4/fdopendir.m4: New file.
3265         * gnulib/import/m4/filenamecat.m4: New file.
3266         * gnulib/import/m4/fstat.m4: New file.
3267         * gnulib/import/m4/fstatat.m4: New file.
3268         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3269         * gnulib/import/m4/getcwd-path-max.m4: New file.
3270         * gnulib/import/m4/getcwd.m4: New file.
3271         * gnulib/import/m4/getdtablesize.m4: New file.
3272         * gnulib/import/m4/getlogin_r.m4: New file.
3273         * gnulib/import/m4/getprogname.m4: New file.
3274         * gnulib/import/m4/glob.m4: New file.
3275         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3276         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3277         * gnulib/import/m4/mempcpy.m4: New file.
3278         * gnulib/import/m4/memrchr.m4: New file.
3279         * gnulib/import/m4/mode_t.m4: New file.
3280         * gnulib/import/m4/msvc-inval.m4: New file.
3281         * gnulib/import/m4/msvc-nothrow.m4: New file.
3282         * gnulib/import/m4/open.m4: New file.
3283         * gnulib/import/m4/openat.m4: New file.
3284         * gnulib/import/m4/opendir.m4: New file.
3285         * gnulib/import/m4/readdir.m4: New file.
3286         * gnulib/import/m4/realloc.m4: New file.
3287         * gnulib/import/m4/rewinddir.m4: New file.
3288         * gnulib/import/m4/save-cwd.m4: New file.
3289         * gnulib/import/m4/strdup.m4: New file.
3290         * gnulib/import/m4/strerror.m4: New file.
3291         * gnulib/import/m4/unistd-safer.m4: New file.
3292         * gnulib/import/mempcpy.c: New file.
3293         * gnulib/import/memrchr.c: New file.
3294         * gnulib/import/msvc-inval.c: New file.
3295         * gnulib/import/msvc-inval.h: New file.
3296         * gnulib/import/msvc-nothrow.c: New file.
3297         * gnulib/import/msvc-nothrow.h: New file.
3298         * gnulib/import/open.c: New file.
3299         * gnulib/import/openat-die.c: New file.
3300         * gnulib/import/openat-priv.h: New file.
3301         * gnulib/import/openat-proc.c: New file.
3302         * gnulib/import/openat.c: New file.
3303         * gnulib/import/openat.h: New file.
3304         * gnulib/import/opendir.c: New file.
3305         * gnulib/import/pipe-safer.c: New file.
3306         * gnulib/import/readdir.c: New file.
3307         * gnulib/import/realloc.c: New file.
3308         * gnulib/import/rewinddir.c: New file.
3309         * gnulib/import/save-cwd.c: New file.
3310         * gnulib/import/save-cwd.h: New file.
3311         * gnulib/import/strdup.c: New file.
3312         * gnulib/import/strerror-override.c: New file.
3313         * gnulib/import/strerror-override.h: New file.
3314         * gnulib/import/strerror.c: New file.
3315         * gnulib/import/unistd--.h: New file.
3316         * gnulib/import/unistd-safer.h: New file.
3317         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3318         "getcwd" and "glob".
3319         * ser-tcp.c: Undefine "close" before redefining it.
3320
3321 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3322
3323         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3324         get rid of res_val.
3325
3326 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3327
3328         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3329         <sol2,sparc>: Likewise.
3330         <sol2-64,i386>: Likewise.
3331
3332         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3333         -Wdeprecated-declarations on *-*-solaris*.
3334         * configure: Regenerate.
3335
3336         * procfs.c: Include "nat/inferior.h".
3337         (procfs_info_proc): Fix typo.
3338
3339 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3340
3341         * remote.c (vector): Include.
3342         (struct private_thread_info): Add field, thread_handle.
3343         (free_private_thread_info): Deallocate storage associated with
3344         thread handle.
3345         (get_private_info_thread): Initialize `thread_handle' field.
3346         (struct thread_item): Add field, thread_handle.
3347         (clear_threads_listing_context): Deallocate storage associated
3348         with thread handle.
3349         (start_thread): Add support for "handle" attribute.
3350         (thread_attributes): Add "handle".
3351         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3352         field.
3353         (remote_update_thread_list): Update thread_handle.
3354         (remote_thread_handle_to_thread_info): New function.
3355         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3356
3357 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3358
3359         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3360         function.
3361         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3362         * python/python-internal.h (thread_object_type): Declare.
3363
3364 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3365
3366         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3367         (target_thread_handle_to_thread_info): Declare.
3368         * target.c (target_thread_handle_to_thread_info): New function.
3369         * target-delegates.c: Regenerate.
3370         * gdbthread.h (find_thread_by_handle): Declare.
3371         * thread.c (find_thread_by_handle): New function.
3372         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3373         function.
3374         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3375
3376 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3377
3378         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3379
3380 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3381
3382         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3383
3384 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3385
3386         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3387         to gdb_target_obs.
3388
3389 2017-09-20  Tom Tromey  <tom@tromey.com>
3390
3391         * breakpoint.c (struct counted_command_line): Remove.
3392         (breakpoint_commands): Update.
3393         (alloc_counted_command_line, incref_counted_command_line)
3394         (decref_counted_command_line, do_cleanup_counted_command_line)
3395         (make_cleanup_decref_counted_command_line): Remove.
3396         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3397         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3398         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3399         (save_breakpoints): Update.
3400         * breakpoint.h (counted_command_line): Now a typedef to
3401         shared_ptr.
3402         (struct breakpoint) <commands>: Now a counted_command_line.
3403         (struct bpstats) <command>: Likewise.
3404
3405 2017-09-20  Tom Tromey  <tom@tromey.com>
3406
3407         * breakpoint.c (struct commands_info, do_map_commands_command):
3408         Remove.
3409         (commands_command_1): Update.
3410         (iterate_over_related_breakpoints): Take a function_view.
3411         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3412         (delete_command): Update.
3413         (map_breakpoint_numbers): Take a function_view.
3414         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3415         (disable_command): Update.
3416         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3417         (enable_command): Update.
3418         (struct disp_data, do_enable_breakpoint_disp)
3419         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3420         (do_map_enable_delete_breakpoint): Remove.
3421         (enable_once_command, enable_count_command, enable_delete_command)
3422         (delete_trace_variable_command): Update.
3423
3424 2017-09-20  Tom Tromey  <tom@tromey.com>
3425
3426         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3427         (bpstat_clear): Use delete.
3428         (bpstats): New constructors.
3429         (bpstat_copy, bpstat_stop_status): Use new.
3430         (dprintf_after_condition_true): Update.
3431         * breakpoint.h (bpstats::bpstats): Add constructors.
3432         (bpstats::~bpstats): Add destructor.
3433
3434 2017-09-20  Pedro Alves  <palves@redhat.com>
3435
3436         * eval.c (make_params): Delete, refactored as ...
3437         (class fake_method): ... this new type's ctor.
3438         (fake_method::~fake_method): New.
3439         (evaluate_subexp_standard): Use 'fake_method'.
3440
3441 2017-09-20  Tom Tromey  <tom@tromey.com>
3442
3443         * windows-nat.c (get_windows_debug_event, windows_wait)
3444         (do_initial_windows_stuff, windows_attach): Update.
3445         * utils.c (vwarning, internal_vproblem): Update.
3446         (ui_unregister_input_event_handler_cleanup)
3447         (prepare_to_handle_input): Remove.
3448         (class scoped_input_handler): New.
3449         (defaulted_query, prompt_for_continue): Update.
3450         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3451         Update.
3452         * top.c (undo_terminal_modifications_before_exit): Update.
3453         * target/target.h (target_terminal_init, target_terminal_inferior)
3454         (target_terminal_ours): Don't declare.
3455         (class target_terminal): New.
3456         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3457         (target_terminal_ours_for_output)
3458         (make_cleanup_restore_target_terminal): Don't declare.
3459         (target_terminal_info): Remove.
3460         * target.c (enum terminal_state, terminal_state): Remove.
3461         (target_terminal::terminal_state): Define.
3462         (target_terminal::init): Rename from target_terminal_init.
3463         (target_terminal::inferior): Rename from
3464         target_terminal_inferior.
3465         (target_terminal::ours): Rename from target_terminal_ours.
3466         (target_terminal::ours_for_output): Rename from
3467         target_terminal_ours_for_output.
3468         (target_terminal::info): New method.
3469         (cleanup_restore_target_terminal)
3470         (make_cleanup_restore_target_terminal): Remove.
3471         * solib.c (handle_solib_event): Update.
3472         * remote.c (remote_serial_quit_handler): Update.
3473         (remote_terminal_inferior, remote_wait_as): Update.
3474         * record-full.c (record_full_wait_1): Update.
3475         * nto-procfs.c (procfs_create_inferior): Update.
3476         * nat/fork-inferior.c (startup_inferior): Update.
3477         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3478         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3479         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3480         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3481         (mi_breakpoint_created, mi_breakpoint_deleted)
3482         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3483         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3484         (mi_user_selected_context_changed, report_initial_inferior):
3485         Update.
3486         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3487         (linux_nat_terminal_inferior): Update.
3488         * infrun.c (follow_fork_inferior)
3489         (handle_vfork_child_exec_or_exit, do_target_resume)
3490         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3491         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3492         Update.
3493         * inflow.c (child_terminal_init, info_terminal_command): Update.
3494         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3495         (attach_command): Update.
3496         * infcall.c (call_thread_fsm_should_stop): Update.
3497         * gnu-nat.c (gnu_attach): Update.
3498         * extension.c (struct active_ext_lang_state)
3499         (restore_active_ext_lang): Update.
3500         * exceptions.c (print_flush): Update.
3501         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3502         (struct quit_handler_cleanup_data, restore_quit_handler)
3503         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3504         Remove.
3505         * cp-support.c (gdb_demangle): Update.
3506         * breakpoint.c (update_inserted_breakpoint_locations)
3507         (insert_breakpoint_locations, handle_jit_event)
3508         (disable_breakpoints_in_unloaded_shlib): Update.
3509         * annotate.c (annotate_breakpoints_invalid)
3510         (annotate_frames_invalid): Update.
3511
3512 2017-09-20  Tom Tromey  <tom@tromey.com>
3513
3514         * main.c (catch_command_errors): Rename from
3515         catch_command_errors_const.
3516         (captured_main_1): Update.
3517
3518 2017-09-20  Pedro Alves  <palves@redhat.com>
3519
3520         * cli/cli-cmds.c (list_command): Use print_sal_location.
3521         (print_sal_location): New function.
3522         (ambiguous_line_spec): Use print_sal_location.
3523         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3524         * symtab.c (find_function_start_sal): Likewise.
3525         * symtab.h (symtab_and_line::symbol): New field.
3526
3527 2017-09-20  Pedro Alves  <palves@redhat.com>
3528
3529         * linespec.c (minsym_found): Handle non-text minsyms.
3530         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3531
3532 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3533
3534         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3535         backslash.
3536
3537 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3538
3539         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3540         vmovups instead vmovaps.
3541         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3542
3543 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3544
3545         * NEWS (Changes since GDB 8.0): Add starti.
3546         * infcmd.c (enum run_break): New.
3547         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3548         case.
3549         (run_command): Use enum run_how.
3550         (start_command): Likewise.
3551         (starti_command): New function.
3552         (RUN_ARGS_HELP): New macro.
3553         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3554         commands.  Add starti command.
3555
3556 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3557
3558         * Makefile.in (monitor.o): Remove the rule.
3559
3560 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3561
3562         * annotate.h (struct annotate_arg_emitter): Use
3563         DISABLE_COPY_AND_ASSIGN.
3564         * common/refcounted-object.h (refcounted_object): Likewise.
3565         * completer.h (struct completion_result): Likewise.
3566         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3567         * filename-seen-cache.h (filename_seen_cache): Likewise.
3568         * gdbcore.h (thread_section_name): Likewise.
3569         * gdb_regex.h (compiled_regex): Likewise.
3570         * gdbthread.h (scoped_restore_current_thread): Likewise.
3571         * inferior.h (scoped_restore_current_inferior): Likewise.
3572         * jit.c (jit_reader): Likewise.
3573         * linespec.h (struct linespec_result): Likewise.
3574         * mi/mi-parse.h (struct mi_parse): Likewise.
3575         * nat/fork-inferior.c (execv_argv): Likewise.
3576         * progspace.h (scoped_restore_current_program_space): Likewise.
3577         * python/python-internal.h (class gdbpy_enter): Likewise.
3578         * regcache.h (regcache): Likewise.
3579         * target-descriptions.c (struct tdesc_reg): Likewise.
3580         (struct tdesc_type): Likewise.
3581         (struct tdesc_feature): Likewise.
3582         * ui-out.h (ui_out_emit_type): Likewise.
3583
3584 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3585
3586         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3587         label abort_expression.
3588
3589 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3590
3591         * common/buffer.c (buffer_xml_printf): Adjust.
3592         * common/xml-utils.c (xml_escape_text): Change return type to
3593         std::string, update code accordingly.
3594         * common/xml-utils.h (xml_escape_text): Change return type to
3595         std::string.
3596         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3597         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3598         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3599         Adjust.
3600
3601 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3602
3603         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3604         (SUBDIR_UNITTESTS_OBS): Add new object file.
3605         * unittests/xml-utils-selftests.c: New file.
3606
3607 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3608
3609         * common/selftest.h (selftest): New struct/interface.
3610         (register_test): Add name parameter, add new overload.
3611         (run_tests): Add filter parameter.
3612         (for_each_selftest_ftype): New typedef.
3613         (for_each_selftest): New declaration.
3614         * common/selftest.c (tests): Change type to
3615         map<string, unique_ptr<selftest>>.
3616         (simple_selftest): New struct.
3617         (register_test): New function.
3618         (register_test): Add name parameter and use it.
3619         (run_tests): Add filter parameter and use it.  Add prints.
3620         Adjust to vector -> map change.
3621         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3622         registering selftests.
3623         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3624         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3625         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3626         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3627         * findvar.c (_initialize_findvar): Likewise.
3628         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3629         * maint.c (maintenance_selftest): Update call to run_tests.
3630         (maintenance_info_selftests): New function.
3631         (_initialize_maint_cmds): Register "maintenance info selftests"
3632         command.  Update "maintenance selftest" doc.
3633         * regcache.c (_initialize_regcache): Add names when registering
3634         selftests.
3635         * rust-exp.y (_initialize_rust_exp): Likewise.
3636         * selftest-arch.c (gdbarch_selftest): New struct.
3637         (gdbarch_tests): Remove.
3638         (register_test_foreach_arch): Add name parameter.  Call
3639         register_test.
3640         (tests_with_arch): Remove, move most content to
3641         gdbarch_selftest::operator().
3642         (_initialize_selftests_foreach_arch): Remove.
3643         * selftest-arch.h (register_test_foreach_arch): Add name
3644         parameter.
3645         (run_tests_with_arch): New declaration.
3646         * utils-selftests.c (_initialize_utils_selftests): Add names
3647         when registering selftests.
3648         * utils.c (_initialize_utils): Likewise.
3649         * unittests/array-view-selftests.c
3650         (_initialize_array_view_selftests): Likewise.
3651         * unittests/environ-selftests.c (_initialize_environ_selftests):
3652         Likewise.
3653         * unittests/function-view-selftests.c
3654         (_initialize_function_view_selftests): Likewise.
3655         * unittests/offset-type-selftests.c
3656         (_initialize_offset_type_selftests): Likewise.
3657         * unittests/optional-selftests.c
3658         (_initialize_optional_selftests): Likewise.
3659         * unittests/scoped_restore-selftests.c
3660         (_initialize_scoped_restore_selftests): Likewise.
3661         * NEWS: Document "maintenance selftest" and "maint info
3662         selftests".
3663
3664 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3665
3666         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3667         scoped_restore.
3668
3669 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3670
3671         * mi/mi-main.c (mi_load_progress): Make uiout variable
3672         a unique_ptr.
3673
3674 2017-09-15  Pedro Alves  <palves@redhat.com>
3675
3676         * compile/compile-c-types.c (convert_enum, convert_int)
3677         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3678
3679 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3680
3681         * dwarf2read.c (copy_string): Remove.
3682         (parse_macro_definition): Replace copy_string with savestring.
3683
3684 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3685
3686         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3687         gdb_target_obs.
3688         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3689         Likewise.
3690         (i[34567]86-*-linux*): Likewise.
3691
3692 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3693
3694         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3695         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3696         <stack>: Change type to std::vector.
3697         <stack_len, stack_allocated>: Remove.
3698         <grow_stack>: Remove.
3699         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3700         (dwarf_expr_context::~dwarf_expr_context): Remove.
3701         (dwarf_expr_context::grow_stack): Remove.
3702         (dwarf_expr_context::push): Adjust.
3703         (dwarf_expr_context::pop): Adjust.
3704         (dwarf_expr_context::fetch): Adjust.
3705         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3706         (dwarf_expr_context::stack_empty_p): Adjust.
3707         (dwarf_expr_context::execute_stack_op): Adjust.
3708
3709 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3710
3711         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3712         return type to bool.
3713         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3714
3715 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3716
3717         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3718         Change type to bool.
3719         (dwarf_stack_value) <in_stack_memory>: Likewise.
3720         (dwarf_expr_context) <push_address>: Change parameter type to
3721         bool.
3722         <fetch_in_stack_memory>: Change return type to bool.
3723         <push>: Change parameter type to bool.
3724         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3725         to bool.
3726         (dwarf_expr_context::push_address): Likewise.
3727         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3728         to bool.
3729         (dwarf_expr_context::execute_stack_op): Adjust.
3730         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3731
3732 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3733
3734         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3735         (struct dwarf_expr_context) <n_pieces>: Remove.
3736         <pieces>: Change type to std::vector.
3737         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3738         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3739         pieces.
3740         (dwarf_expr_context::add_piece): Adjust.
3741         * dwarf2loc.c (struct piece_closure): Initialize fields.
3742         <n_pieces>: Remove.
3743         <pieces>: Change type to std::vector.
3744         (allocate_piece_closure): Adjust, change parameter to
3745         std::vector rvalue and std::move it to piece_closure.
3746         (rw_pieced_value): Adjust.
3747         (check_pieced_synthetic_pointer): Adjust.
3748         (indirect_synthetic_pointer): Adjust.
3749         (coerce_pieced_ref): Adjust.
3750         (free_pieced_value_closure):  Adjust.  Use delete to free
3751         piece_closure.
3752         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3753         to allocate_piece_closure.
3754         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3755
3756 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3757
3758         * probe.h (probe_ops_cp): Remove typedef.
3759         (DEF_VEC_P (probe_ops_cp)): Remove.
3760         (all_probe_ops): Change type to std::vector.
3761         * probe.c (info_probes_for_ops): Adjust to vector change.
3762         (probe_linespec_to_ops): Likewise.
3763         (all_probe_ops): Change type to std::vector.
3764         (_initialize_probe): Adjust to vector change.
3765         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3766         * elfread.c (elf_get_probes): Likewise.
3767         * stap-probe.c (_initialize_stap_probe): Likewise.
3768
3769 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3770
3771         * probe.h (struct bound_probe): Define constructors.
3772         * probe.c (bound_probe_s): Remove typedef.
3773         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3774         (collect_probes): Change return type to std::vector, remove
3775         cleanup.
3776         (compare_probes): Return bool, change parameter type.  Change
3777         semantic to "less than".
3778         (gen_ui_out_table_header_info): Change parameter to std::vector
3779         and update.
3780         (exists_probe_with_pops): Likewise.
3781         (info_probes_for_ops): Update to std::vector change.
3782         (enable_probes_command): Likewise.
3783         (disable_probes_command): Likewise.
3784
3785 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3786
3787         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3788         vec to std::vector.
3789         * probe.c (parse_probes_in_pspace): Update.
3790         (find_probes_in_objfile): Update.
3791         (find_probe_by_pc): Update.
3792         (collect_probes): Update.
3793         (probe_any_get_probes): Update.
3794         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3795         return type to reference to std::vector.
3796         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3797         std::vector and update.
3798         (dtrace_process_dof): Likewise.
3799         (dtrace_get_probes): Likewise.
3800         * elfread.c (elf_get_probes): Change return type to std::vector,
3801         store an std::vector in bfd_data.
3802         (probe_key_free): Update to std::vector.
3803         * stap-probe.c (handle_stap_probe): Change parameter to
3804         std::vector and update.
3805         (stap_get_probes): Likewise.
3806         * symfile-debug.c (debug_sym_get_probes): Change return type to
3807         std::vector and update.
3808
3809 2017-09-11  Tom Tromey  <tom@tromey.com>
3810
3811         * breakpoint.c (program_breakpoint_here_p): Update.
3812         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3813         from make_show_memory_breakpoints_cleanup.  Return a
3814         scoped_restore_tmpl<int>.
3815         (restore_show_memory_breakpoints): Remove.
3816         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3817         * mem-break.c (memory_validate_breakpoint): Update.
3818         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3819         (ia64_memory_remove_breakpoint): Update.
3820         (ia64_breakpoint_from_pc): Update.
3821         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3822         from make_show_memory_breakpoints_cleanup.
3823
3824 2017-09-11  Tom Tromey  <tom@tromey.com>
3825
3826         * d-namespace.c (d_lookup_symbol): Use std::string.
3827         (find_symbol_in_baseclass): Likewise.
3828
3829 2017-09-11  Tom Tromey  <tom@tromey.com>
3830
3831         * ctf.c (ctf_start): Use std::string.
3832
3833 2017-09-11  Tom Tromey  <tom@tromey.com>
3834
3835         * ada-lang.c (is_known_support_routine): Update.
3836         (ada_unhandled_exception_name_addr_from_raise): Update.
3837         * guile/scm-frame.c (gdbscm_frame_name): Update.
3838         * python/py-frame.c (frapy_name): Update.
3839         (frapy_function): Update.
3840         * stack.h (find_frame_funname): Update.
3841         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3842         (print_frame): Update.
3843
3844 2017-09-11  Tom Tromey  <tom@tromey.com>
3845
3846         * findcmd.c (put_bits): Take a gdb::byte_vector.
3847         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3848         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3849         cleanups.
3850         (find_command): Update.
3851
3852 2017-09-11  Tom Tromey  <tom@tromey.com>
3853
3854         * cli/cli-script.c (class scoped_restore_hook_in): New.
3855         (clear_hook_in_cleanup): Remove.
3856         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3857         scoped_restore_hook_in.
3858
3859 2017-09-11  Tom Tromey  <tom@tromey.com>
3860
3861         * cli/cli-script.c (restore_interp): Remove.
3862         (read_command_lines): Use scoped_restore_interp.
3863         * interps.c (scoped_restore_interp::set_temp): Rename from
3864         interp_set_temp.
3865         * interps.h (class scoped_restore_interp): New.
3866         (interp_set_temp): Remove.
3867
3868 2017-09-11  Tom Tromey  <tom@tromey.com>
3869
3870         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3871         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3872         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3873         scoped_restore.
3874         (mi_cmd_break_insert_1): Update.
3875         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3876         scoped_restore.
3877
3878 2017-09-11  Tom Tromey  <tom@tromey.com>
3879
3880         * demangle.c (demangle_command): Update.
3881         * breakpoint.c (disable_command): Update.
3882         (enable_command): Update.
3883         (find_location_by_number): Make "number" const.  Use
3884         get_number_trailer.
3885         * cli/cli-utils.c (extract_arg): Return std::string.
3886         * probe.c (parse_probe_linespec): Update.  Change types.
3887         (collect_probes): Take string arguments.
3888         (parse_probe_linespec): Likewise.
3889         (info_probes_for_ops): Update.
3890         (enable_probes_command): Update.
3891         (disable_probes_command): Update.
3892         * break-catch-sig.c (catch_signal_split_args): Update.
3893         * mi/mi-parse.c (mi_parse): Update.
3894
3895 2017-09-11  Tom Tromey  <tom@tromey.com>
3896
3897         * language.h (language_enum): Make argument const.
3898         * language.c (language_enum): Make argument const.
3899
3900 2017-09-11  Tom Tromey  <tom@tromey.com>
3901
3902         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3903         as function.
3904         (skip_to_space): Rename from skip_to_space_const.
3905         * common/common-utils.c (skip_to_space): New function.
3906         (skip_to_space): Rename from skip_to_space_const.
3907         * cli/cli-utils.h (get_number): Rename from get_number_const.
3908         (extract_arg): Rename from extract_arg_const.
3909         * cli/cli-utils.c (get_number): Rename from get_number_const.
3910         (extract_arg): Rename from extract_arg_const.
3911         (number_or_range_parser::get_number): Use ::get_number.
3912         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3913         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3914         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3915         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3916         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3917         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3918         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3919         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3920
3921 2017-09-11  Tom Tromey  <tom@tromey.com>
3922
3923         * python/python.c (do_start_initialization): Use
3924         py-event-types.def to initialize types.
3925         Define all object type structures.
3926         * python/python-internal.h: Don't declare event initialization
3927         functions.
3928         * python/py-threadevent.c (thread_event_object_type): Don't
3929         define.
3930         * python/py-stopevent.c (stop_event_object_type): Don't define.
3931         * python/py-signalevent.c (signal_event_object_type): Don't
3932         declare or define.
3933         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3934         (clear_objfiles_event_object_type): Don't declare or define.
3935         * python/py-infevents.c (inferior_call_pre_event_object_type)
3936         (inferior_call_post_event_object_type)
3937         (register_changed_event_object_type)
3938         (memory_changed_event_object_type): Don't declare or define.
3939         * python/py-inferior.c (new_thread_event_object_type)
3940         (new_inferior_event_object_type)
3941         (inferior_deleted_event_object_type): Don't declare or define.
3942         * python/py-exitedevent.c (exited_event_object_type): Don't
3943         declare or define.
3944         * python/py-evts.c (gdbpy_initialize_py_events): Use
3945         py-all-events.def.
3946         * python/py-events.h (thread_event_object_type): Don't declare.
3947         (events_object): Use py-all-events.def.
3948         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3949         py-event-types.def.
3950         * python/py-event-types.def: New file.
3951         * python/py-continueevent.c (create_continue_event_object): Don't
3952         declare or define.
3953         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3954         declare or define.
3955         * python/py-all-events.def: New file.
3956
3957 2017-09-11  Tom Tromey  <tom@tromey.com>
3958
3959         * python/py-threadevent.c (create_thread_event_object): Return
3960         gdbpy_ref.
3961         * python/py-stopevent.h (create_stop_event_object)
3962         (create_breakpoint_event_object, create_signal_event_object):
3963         Update.
3964         * python/py-stopevent.c (create_stop_event_object): Return
3965         gdbpy_ref.
3966         (emit_stop_event): Update.
3967         * python/py-signalevent.c (create_signal_event_object): Return
3968         gdbpy_ref.
3969         * python/py-infevents.c (create_inferior_call_event_object):
3970         Update.
3971         * python/py-event.h (create_event_object)
3972         (create_thread_event_object): Update.
3973         * python/py-event.c (create_event_object): Return gdbpy_ref.
3974         * python/py-continueevent.c: Return gdbpy_ref.
3975         * python/py-bpevent.c (create_breakpoint_event_object): Return
3976         gdbpy_ref.
3977
3978 2017-09-11  Tom Tromey  <tom@tromey.com>
3979
3980         PR python/15622:
3981         * NEWS: Add entry.
3982         * python/python.c (do_start_initialization): Initialize new event
3983         types.
3984         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3985         (gdbpy_initialize_inferior_deleted_event)
3986         (gdbpy_initialize_new_thread_event): Declare.
3987         * python/py-threadevent.c (create_thread_event_object): Add option
3988         "thread" parameter.
3989         * python/py-inferior.c (new_thread_event_object_type)
3990         (new_inferior_event_object_type)
3991         (inferior_deleted_event_object_type): Declare.
3992         (python_new_inferior, python_inferior_deleted): New functions.
3993         (add_thread_object): Emit new_thread event.
3994         (gdbpy_initialize_inferior): Attach new functions to corresponding
3995         observers.
3996         (new_thread, new_inferior, inferior_deleted): Define new event
3997         types.
3998         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3999         registries.
4000         * python/py-events.h (events_object) <new_inferior,
4001         inferior_deleted, new_thread>: New fields.
4002         * python/py-event.h (create_thread_event_breakpoint): Add optional
4003         "thread" parameter.
4004
4005 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4006
4007         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4008         check current_ui instead.
4009         (internal_vproblem): Likewise.
4010
4011 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * thread.c (print_thread_info_1): Remove unnecessary calls to
4014         uiout->is_mi_like_p.
4015
4016 2017-09-09  Tom Tromey  <tom@tromey.com>
4017
4018         * namespace.h (add_using_directive): Update.
4019         * namespace.c (add_using_directive): Change type of excludes to
4020         std::vector.
4021         * dwarf2read.c (read_import_statement): Use std::vector.
4022         (read_namespace): Update.
4023         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4024
4025 2017-09-09  Tom Tromey  <tom@tromey.com>
4026
4027         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4028
4029 2017-09-09  Tom Tromey  <tom@tromey.com>
4030
4031         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4032
4033 2017-09-09  Tom Tromey  <tom@tromey.com>
4034
4035         * stack.c (func_command): Use gdb::def_vector.
4036
4037 2017-09-09  Tom Tromey  <tom@tromey.com>
4038
4039         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4040         ui_out_emit_list, ui_out_emit_tuple.
4041         (mi_cmd_var_update): Likewise.
4042
4043 2017-09-09  Tom Tromey  <tom@tromey.com>
4044
4045         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4046         ui_out_redirect_pop.
4047         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4048         ui_out_redirect_pop.
4049         * utils.c (do_ui_out_redirect_pop)
4050         (make_cleanup_ui_out_redirect_pop): Remove.
4051         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4052         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4053         * ui-out.h (ui_out_redirect_pop): New class.
4054
4055 2017-09-09  Tom Tromey  <tom@tromey.com>
4056
4057         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4058         (list_available_thread_groups, mi_cmd_list_thread_groups)
4059         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4060         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4061         Likewise.
4062
4063 2017-09-09  Tom Tromey  <tom@tromey.com>
4064
4065         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4066         ui_out_emit_tuple.
4067
4068 2017-09-09  Tom Tromey  <tom@tromey.com>
4069
4070         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4071         * stack.c (print_frame): Use ui_out_emit_tuple.
4072         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4073         (info_spu_mailbox_command, info_spu_dma_command)
4074         (info_spu_proxydma_command): Likewise.
4075         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4076         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4077         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4078         ui_out_emit_tuple.
4079         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4080
4081 2017-09-09  Tom Tromey  <tom@tromey.com>
4082
4083         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4084         (class ui_out_emit_table): Update comment.
4085         * ui-out.c (do_cleanup_table_end)
4086         (make_cleanup_ui_out_table_begin_end): Remove.
4087         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4088         (info_spu_dma_cmdlist): Likewise.
4089         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4090         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4091         ui_out_emit_table.
4092
4093 2017-09-09  Tom Tromey  <tom@tromey.com>
4094
4095         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4096         ui_out_emit_list, gdb::optional.
4097
4098 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4099
4100         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4101         prototype.
4102         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4103         prototype.
4104         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4105         prototype.
4106         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4107         * ada-exp.y: Remove _initialize_ada_exp prototype.
4108         * ada-lang.c: Remove _initialize_ada_language prototype.
4109         * ada-tasks.c: Remove _initialize_tasks prototype.
4110         * addrmap.c: Remove _initialize_addrmap prototype.
4111         * agent.c: Remove _initialize_agent prototype.
4112         * aix-thread.c: Remove _initialize_aix_thread prototype.
4113         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4114         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4115         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4116         prototype.
4117         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4118         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4119         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4120         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4121         prototype.
4122         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4123         prototype.
4124         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4125         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4126         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4127         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4128         prototype.
4129         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4130         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4131         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4132         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4133         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4134         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4135         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4136         prototype.
4137         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4138         prototype.
4139         * annotate.c: Remove _initialize_annotate prototype.
4140         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4141         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4142         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4143         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4144         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4145         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4146         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4147         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4148         prototype.
4149         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4150         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4151         * auto-load.c: Remove _initialize_auto_load prototype.
4152         * auxv.c: Remove _initialize_auxv prototype.
4153         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4154         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4155         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4156         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4157         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4158         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4159         prototype.
4160         * break-catch-throw.c: Remove _initialize_break_catch_throw
4161         prototype.
4162         * breakpoint.c: Remove _initialize_breakpoint prototype.
4163         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4164         * btrace.c: Remove _initialize_btrace prototype.
4165         * charset.c: Remove _initialize_charset prototype.
4166         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4167         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4168         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4169         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4170         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4171         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4172         * coffread.c: Remove _initialize_coffread prototype.
4173         * compile/compile.c: Remove _initialize_compile prototype.
4174         * complaints.c: Remove _initialize_complaints prototype.
4175         * completer.c: Remove _initialize_completer prototype.
4176         * copying.awk: Remove _initialize_copying prototype.
4177         * copying.c: Regenerate.
4178         * core-regset.c: Remove _initialize_core_regset prototype.
4179         * corefile.c: Remove _initialize_core prototype.
4180         * corelow.c: Remove _initialize_corelow prototype.
4181         * cp-abi.c: Remove _initialize_cp_abi prototype.
4182         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4183         * cp-support.c: Remove _initialize_cp_support prototype.
4184         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4185         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4186         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4187         * ctf.c: Remove _initialize_ctf prototype.
4188         * d-lang.c: Remove _initialize_d_language prototype.
4189         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4190         prototype.
4191         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4192         * dbxread.c: Remove _initialize_dbxread prototype.
4193         * dcache.c: Remove _initialize_dcache prototype.
4194         * demangle.c: Remove _initialize_demangler prototype.
4195         * disasm-selftests.c: Remove _initialize_disasm_selftests
4196         prototype.
4197         * disasm.c: Remove _initialize_disasm prototype.
4198         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4199         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4200         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4201         prototype.
4202         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4203         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4204         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4205         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4206         * elfread.c: Remove _initialize_elfread prototype.
4207         * exec.c: Remove _initialize_exec prototype.
4208         * extension.c: Remove _initialize_extension prototype.
4209         * f-lang.c: Remove _initialize_f_language prototype.
4210         * f-valprint.c: Remove _initialize_f_valprint prototype.
4211         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4212         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4213         * filesystem.c: Remove _initialize_filesystem prototype.
4214         * findcmd.c: Remove _initialize_mem_search prototype.
4215         * fork-child.c: Remove _initialize_fork_child prototype.
4216         * frame-base.c: Remove _initialize_frame_base prototype.
4217         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4218         * frame.c: Remove _initialize_frame prototype.
4219         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4220         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4221         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4222         * gcore.c: Remove _initialize_gcore prototype.
4223         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4224         * gdbarch.c: Regenerate.
4225         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4226         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4227         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4228         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4229         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4230         * go-lang.c: Remove _initialize_go_language prototype.
4231         * go32-nat.c: Remove _initialize_go32_nat prototype.
4232         * guile/guile.c: Remove _initialize_guile prototype.
4233         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4234         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4235         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4236         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4237         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4238         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4239         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4240         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4241         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4242         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4243         prototype.
4244         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4245         prototype.
4246         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4247         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4248         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4249         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4250         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4251         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4252         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4253         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4254         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4255         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4256         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4257         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4258         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4259         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4260         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4261         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4262         prototype.
4263         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4264         prototype.
4265         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4266         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4267         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4268         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4269         * infcall.c: Remove _initialize_infcall prototype.
4270         * infcmd.c: Remove _initialize_infcmd prototype.
4271         * inferior.c: Remove _initialize_inferiors prototype.
4272         * inflow.c: Remove _initialize_inflow prototype.
4273         * infrun.c: Remove _initialize_infrun prototype.
4274         * interps.c: Remove _initialize_interpreter prototype.
4275         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4276         * jit.c: Remove _initialize_jit prototype.
4277         * language.c: Remove _initialize_language prototype.
4278         * linux-fork.c: Remove _initialize_linux_fork prototype.
4279         * linux-nat.c: Remove _initialize_linux_nat prototype.
4280         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4281         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4282         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4283         * m2-lang.c: Remove _initialize_m2_language prototype.
4284         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4285         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4286         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4287         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4288         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4289         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4290         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4291         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4292         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4293         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4294         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4295         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4296         * machoread.c: Remove _initialize_machoread prototype.
4297         * macrocmd.c: Remove _initialize_macrocmd prototype.
4298         * macroscope.c: Remove _initialize_macroscope prototype.
4299         * maint.c: Remove _initialize_maint_cmds prototype.
4300         * mdebugread.c: Remove _initialize_mdebugread prototype.
4301         * memattr.c: Remove _initialize_mem prototype.
4302         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4303         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4304         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4305         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4306         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4307         * microblaze-linux-tdep.c: Remove
4308         _initialize_microblaze_linux_tdep prototype.
4309         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4310         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4311         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4312         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4313         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4314         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4315         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4316         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4317         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4318         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4319         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4320         prototype.
4321         * mipsread.c: Remove _initialize_mipsread prototype.
4322         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4323         prototype.
4324         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4325         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4326         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4327         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4328         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4329         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4330         prototype.
4331         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4332         * nto-procfs.c: Remove _initialize_procfs prototype.
4333         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4334         * objc-lang.c: Remove _initialize_objc_language prototype.
4335         * objfiles.c: Remove _initialize_objfiles prototype.
4336         * observer.c: Remove observer_test_first_notification_function,
4337         observer_test_second_notification_function,
4338         observer_test_third_notification_function, and
4339         _initialize_observer prototypes.
4340         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4341         * osabi.c: Remove _initialize_gdb_osabi prototype.
4342         * osdata.c: Remove _initialize_osdata prototype.
4343         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4344         * parse.c: Remove _initialize_parse prototype.
4345         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4346         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4347         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4348         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4349         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4350         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4351         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4352         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4353         * printcmd.c: Remove _initialize_printcmd prototype.
4354         * probe.c: Remove _initialize_probe prototype.
4355         * proc-api.c: Remove _initialize_proc_api prototype.
4356         * proc-events.c: Remove _initialize_proc_events prototype.
4357         * proc-service.c: Remove _initialize_proc_service prototype.
4358         * procfs.c: Remove _initialize_procfs prototype.
4359         * psymtab.c: Remove _initialize_psymtab prototype.
4360         * python/python.c: Remove _initialize_python prototype.
4361         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4362         * record-btrace.c: Remove _initialize_record_btrace prototype.
4363         * record-full.c: Remove _initialize_record_full prototype.
4364         * record.c: Remove _initialize_record prototype.
4365         * regcache.c: Remove _initialize_regcache prototype.
4366         * reggroups.c: Remove _initialize_reggroup prototype.
4367         * remote-notif.c: Remove _initialize_notif prototype.
4368         * remote-sim.c: Remove _initialize_remote_sim prototype.
4369         * remote.c: Remove _initialize_remote prototype.
4370         * reverse.c: Remove _initialize_reverse prototype.
4371         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4372         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4373         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4374         prototype.
4375         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4376         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4377         * rust-exp.y: Remove _initialize_rust_exp prototype.
4378         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4379         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4380         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4381         * score-tdep.c: Remove _initialize_score_tdep prototype.
4382         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4383         prototype.
4384         * ser-go32.c: Remove _initialize_ser_dos prototype.
4385         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4386         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4387         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4388         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4389         * serial.c: Remove _initialize_serial prototype.
4390         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4391         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4392         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4393         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4394         * skip.c: Remove _initialize_step_skip prototype.
4395         * sol-thread.c: Remove _initialize_sol_thread prototype.
4396         * solib-aix.c: Remove _initialize_solib_aix prototype.
4397         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4398         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4399         * solib-frv.c: Remove _initialize_frv_solib prototype.
4400         * solib-spu.c: Remove _initialize_spu_solib prototype.
4401         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4402         * solib-target.c: Remove _initialize_solib_target prototype.
4403         * solib.c: Remove _initialize_solib prototype.
4404         * source.c: Remove _initialize_source prototype.
4405         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4406         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4407         prototype.
4408         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4409         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4410         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4411         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4412         prototype.
4413         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4414         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4415         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4416         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4417         prototype.
4418         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4419         prototype.
4420         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4421         prototype.
4422         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4423         prototype.
4424         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4425         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4426         prototype.
4427         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4428         prototype.
4429         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4430         prototype.
4431         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4432         prototype.
4433         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4434         prototype.
4435         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4436         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4437         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4438         * stabsread.c: Remove _initialize_stabsread prototype.
4439         * stack.c: Remove _initialize_stack prototype.
4440         * stap-probe.c: Remove _initialize_stap_probe prototype.
4441         * std-regs.c: Remove _initialize_frame_reg prototype.
4442         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4443         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4444         * symfile.c: Remove _initialize_symfile prototype.
4445         * symmisc.c: Remove _initialize_symmisc prototype.
4446         * symtab.c: Remove _initialize_symtab prototype.
4447         * target-dcache.c: Remove _initialize_target_dcache prototype.
4448         * target-descriptions.c: Remove _initialize_target_descriptions
4449         prototype.
4450         * thread.c: Remove _initialize_thread prototype.
4451         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4452         prototype.
4453         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4454         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4455         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4456         prototype.
4457         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4458         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4459         * tracefile.c: Remove _initialize_tracefile prototype.
4460         * tracepoint.c: Remove _initialize_tracepoint prototype.
4461         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4462         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4463         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4464         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4465         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4466         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4467         * tui/tui.c: Remove _initialize_tui prototype.
4468         * typeprint.c: Remove _initialize_typeprint prototype.
4469         * user-regs.c: Remove _initialize_user_regs prototype.
4470         * utils.c: Remove _initialize_utils prototype.
4471         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4472         * valarith.c: Remove _initialize_valarith prototype.
4473         * valops.c: Remove _initialize_valops prototype.
4474         * valprint.c: Remove _initialize_valprint prototype.
4475         * value.c: Remove _initialize_values prototype.
4476         * varobj.c: Remove _initialize_varobj prototype.
4477         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4478         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4479         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4480         * windows-nat.c: Remove _initialize_windows_nat,
4481         _initialize_check_for_gdb_ini, and _initialize_loadable
4482         prototypes.
4483         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4484         * xcoffread.c: Remove _initialize_xcoffread prototype.
4485         * xml-support.c: Remove _initialize_xml_support prototype.
4486         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4487         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4488         prototype.
4489         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4490         prototype.
4491         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4492
4493 2017-09-08  Keith Seitz  <keiths@redhat.com>
4494
4495         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4496         field.
4497
4498 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4499
4500         * f-valprint.c (f_val_print): Remove check for one byte
4501         sized integers. Remove printing of character type.
4502
4503 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4504             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4505             Bernhard Heckel  <bernhard.heckel@intel.com>
4506
4507         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4508         to maintain proper indentation when printing pointers/refs.
4509
4510 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4511
4512         GDB 8.0.1 released.
4513
4514 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4515
4516         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4517
4518 2017-09-05  Tom Tromey  <tom@tromey.com>
4519
4520         * parse.c (funcall_chain): Now a std::vector.
4521         (start_arglist, end_arglist): Simplify.
4522         (free_funcalls): Remove.
4523         (parse_exp_in_context_1): Remove cleanup.
4524
4525 2017-09-05  Tom Tromey  <tom@tromey.com>
4526
4527         * go-exp.y (go_parse): Don't create a cleanup.
4528
4529 2017-09-05  Tom Tromey  <tom@tromey.com>
4530
4531         * d-exp.y (PrimaryExpression): Use std::string.
4532         (d_parse): Don't create a cleanup.
4533
4534 2017-09-05  Tom Tromey  <tom@tromey.com>
4535
4536         * utils.c (do_clear_parser_state): Remove.
4537         (make_cleanup_clear_parser_state): Remove.
4538         * p-exp.y (pascal_parse): Use scoped_restore.
4539         * m2-exp.y (m2_parse): Use scoped_restore.
4540         * f-exp.y (f_parse): Use scoped_restore.
4541         * d-exp.y (d_parse): Use scoped_restore.
4542         * c-exp.y (c_parse): Use scoped_restore.
4543         * ada-exp.y (ada_parse): Use scoped_restore.
4544         * utils.h (make_cleanup_clear_parser_state): Remove.
4545
4546 2017-09-06  Keith Seitz  <keiths@redhat.com>
4547
4548         * dwarf2read.c (dw2_linkage_name_attr): New function.
4549         (dw2_linkage_name): New function.
4550         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4551         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4552         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4553
4554 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4555
4556         * config/djgpp/djconfig.sh: Correct shell portability issue.
4557
4558 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4559
4560         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4561
4562 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4563
4564         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4565         * NEWS: Mention new FreeBSD/mips native configuration.
4566         * configure.host: Add aarch64*-*-freebsd*.
4567         * configure.nat: Likewise.
4568         * aarch64-fbsd-nat.c: New file.
4569
4570 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4571
4572         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4573         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4574         * NEWS: Mention new FreeBSD/aarch64 target.
4575         * configure.tgt: Add aarch64*-*-freebsd*.
4576         * aarch64-fbsd-tdep.c: New file.
4577         * aarch64-fbsd-tdep.h: New file.
4578
4579 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4580
4581         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4582
4583 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4584
4585         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4586         of TLS symbols.
4587
4588 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4589
4590         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4591         call.
4592
4593 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4594
4595         * infrun.c (follow_exec): Call add_thread after
4596         target_find_description.
4597
4598 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4599
4600         * infrun.c (handle_inferior_event_1): When exec'ing, read
4601         stop_pc after follow_exec.
4602
4603 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4604
4605         * remote.c (process_g_packet): Update error message.
4606
4607 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4608
4609         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4610         targets.
4611
4612 2017-09-05  Pedro Alves  <palves@redhat.com>
4613
4614         * eval.c (eval_call, evaluate_funcall): New functions, factored
4615         out from ...
4616         (evaluate_subexp_standard): ... this.
4617
4618 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4619
4620         * amd64-tdep.c (amd64_target_description): Create target
4621         descriptions.
4622         (_initialize_amd64_tdep): Don't call functions
4623         initialize_tdesc_amd64_*.  Add self tests.
4624         * arch/amd64.c (amd64_create_target_description): Add parameter
4625         is_linux.  Call set_tdesc_osabi if is_linux is true.
4626         * arch/amd64.h (amd64_create_target_description): Update the
4627         declaration.
4628         * arch/i386.c (i386_create_target_description): Add parameter
4629         is_linux.  Call set_tdesc_osabi if is_linux is true.
4630         * arch/i386.h (i386_create_target_description): Update
4631         declaration.
4632         * configure.tgt: Add i386.o to gdb_target_obs.
4633         * features/Makefile (XMLTOC): Remove i386/*.xml.
4634         * features/i386/amd64-avx-avx512.c: Remove.
4635         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4636         * features/i386/amd64-avx-mpx.c: Remove.
4637         * features/i386/amd64-avx.c: Remove.
4638         * features/i386/amd64-mpx.c: Remove.
4639         * features/i386/amd64.c: Remove.
4640         * features/i386/i386-avx-avx512.c: Remove.
4641         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4642         * features/i386/i386-avx-mpx.c: Remove.
4643         * features/i386/i386-avx.c: Remove.
4644         * features/i386/i386-mmx.c: Remove.
4645         * features/i386/i386-mpx.c: Remove.
4646         * features/i386/i386.c: Remove.
4647         * i386-tdep.c: Don't include features/i386/i386*.c., include
4648         target-descriptions.h and arch/i386.h.
4649         (i386_target_description): Create target descriptions.
4650         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4651         functions.  Do self tests.
4652
4653 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4654
4655         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4656         * features/i386/amd64-avx-avx512-linux.c: Removed.
4657         * features/i386/amd64-avx-linux.c: Removed.
4658         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4659         * features/i386/amd64-avx-mpx-linux.c: Removed.
4660         * features/i386/amd64-linux.c: Removed.
4661         * features/i386/amd64-mpx-linux.c: Removed.
4662         * features/i386/x32-avx-avx512-linux.c: Removed.
4663         * features/i386/x32-avx-linux.c: Removed.
4664         * features/i386/x32-linux.c: Removed.
4665
4666 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4667
4668         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4669         features/i386/*.c.
4670         (amd64_linux_read_description): Call
4671         amd64_create_target_description.
4672         * arch/amd64.c: New file.
4673         * arch/amd64.h: New file.
4674         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4675         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4676
4677 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4678
4679         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4680         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4681         (amd64_linux_read_description): Create target descriptions.
4682         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4683         functions.  Add unit tests.
4684         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4685         x32-core.xml.
4686         * features/i386/64bit-avx.c: Generated.
4687         * features/i386/64bit-avx512.c: Generated.
4688         * features/i386/64bit-core.c: Generated.
4689         * features/i386/64bit-linux.c: Generated.
4690         * features/i386/64bit-mpx.c: Generated.
4691         * features/i386/64bit-pkeys.c: Generated.
4692         * features/i386/64bit-segments.c: Generated.
4693         * features/i386/64bit-sse.c: Generated.
4694         * features/i386/x32-core.c: Generated.
4695         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4696         c files for amd64-linux and x32-linux.
4697
4698 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4699
4700         * amd64-linux-tdep.c (amd64_linux_read_description): New
4701         function.
4702         (amd64_linux_core_read_description): Call
4703         amd64_linux_read_description.
4704         (amd64_linux_init_abi): Likewise.
4705         (amd64_x32_linux_init_abi): Likewise.
4706         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4707         * x86-linux-nat.c (x86_linux_read_description): Call
4708         amd64_linux_read_description.
4709
4710 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4711
4712         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4713         comments.
4714
4715 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4716
4717         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4718         * features/i386/i386-avx-avx512-linux.c: Remove.
4719         * features/i386/i386-avx-linux.c: Remove.
4720         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4721         * features/i386/i386-avx-mpx-linux.c: Remove.
4722         * features/i386/i386-linux.c: Remove.
4723         * features/i386/i386-mmx-linux.c: Remove.
4724         * features/i386/i386-mpx-linux.c: Remove.
4725
4726 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4727
4728         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4729         (SFILES): Add arch/i386.c.
4730         (HFILES_NO_SRCDIR): Add arch/i386.h.
4731         * arch/i386.c: New file.
4732         * arch/i386.h: New file.
4733         * arch/tdesc.h (allocate_target_description): Declare.
4734         (set_tdesc_architecture): Declare.
4735         (set_tdesc_osabi): Declare.
4736         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4737         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4738         include arch/i386.h.
4739         (i386_linux_read_description): Remove code and call
4740         i386_create_target_description.
4741         (set_tdesc_architecture): New function.
4742         (set_tdesc_osabi): New function.
4743         * target-descriptions.h (allocate_target_description): Remove.
4744
4745 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4746
4747         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4748         * target-descriptions.c (tdesc_create_feature): Likewise, and
4749         adjust code.
4750         * features/i386/32bit-avx.c: Re-generated.
4751         * features/i386/32bit-avx512.c: Re-generated.
4752         * features/i386/32bit-core.c: Re-generated.
4753         * features/i386/32bit-linux.c: Re-generated.
4754         * features/i386/32bit-mpx.c: Re-generated.
4755         * features/i386/32bit-pkeys.c: Re-generated.
4756         * features/i386/32bit-sse.c: Re-generated.
4757
4758 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4759
4760         * regformats/regdef.h (struct reg): Override operator == and !=.
4761
4762 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4763
4764         * arch/tdesc.h: New file.
4765         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4766         * target-descriptions.c: Update comments.
4767         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4768         declarations.
4769         * features/i386/32bit-avx.c: Re-generated.
4770         * features/i386/32bit-avx512.c: Re-generated.
4771         * features/i386/32bit-core.c: Re-generated.
4772         * features/i386/32bit-linux.c: Re-generated.
4773         * features/i386/32bit-mpx.c: Re-generated.
4774         * features/i386/32bit-pkeys.c: Re-generated.
4775         * features/i386/32bit-sse.c: Re-generated.
4776
4777 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4778
4779         * regformats/regdat.sh: Update generated code.
4780
4781 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4782
4783         * regformats/regdat.sh: Adjust code order.
4784
4785 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4786
4787         * expprint.c (dump_subexp_body_standard): Use constant format
4788         string in fprintf_filtered call.
4789
4790 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4791
4792         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4793         NetBSD/i386.
4794         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4795
4796 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4797
4798         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4799
4800 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4801
4802         * bsd-kvm.o: Define _KMEMUSER.
4803         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4804         * configure: Regenerate.
4805
4806 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4807
4808         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4809         * i386-fbsd-nat.c: Likewise.
4810
4811 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4812
4813         * unittests/array-view-selftests.c: Add include of <array>.
4814
4815 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4816
4817         * spu-tdep.c (flush_ea_cache): Add missing argument to
4818         call_function_by_hand.
4819
4820 2017-09-04  Pedro Alves  <palves@redhat.com>
4821
4822         * NEWS (Safer support for debugging with no debug info): New.
4823
4824 2017-09-04  Pedro Alves  <palves@redhat.com>
4825
4826         * c-exp.y (function_method, function_method_void): Add current
4827         instance flags to TYPE_INSTANCE.
4828         * dwarf2read.c (check_modifier): New.
4829         (compute_delayed_physnames): Assert that only C++ adds delayed
4830         physnames.  Mark fn_fields as const/volatile depending on
4831         physname.
4832         * eval.c (make_params): New type_instance_flags parameter.  Use
4833         it as the new type's instance flags.
4834         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4835         flags element and pass it to make_params.
4836         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4837         instance flags element.
4838         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4839         * gdbtypes.h: Include "enum-flags.h".
4840         (type_instance_flags): New enum-flags type.
4841         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4842         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4843         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4844         (follow_type_instance_flags): New function.
4845         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4846         * parser-defs.h (follow_type_instance_flags): Declare.
4847         * valops.c (value_struct_elt_for_reference): const/volatile must
4848         match too.
4849
4850 2017-09-04  Pedro Alves  <palves@redhat.com>
4851
4852         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4853         function/method scopes; lookup the nested name as a function local
4854         static variable.
4855
4856 2017-09-04  Pedro Alves  <palves@redhat.com>
4857
4858         (%type <voidval>): Add function_method.
4859         * c-exp.y (exp): New production for calls with no arguments.
4860         (function_method, function_method_void_or_typelist): New
4861         productions.
4862         (exp): New production for "method()::static_var".
4863         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4864         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4865         Handle OP_FUNC_STATIC_VAR.
4866         * parse.c (operator_length_standard):
4867         Handle OP_FUNC_STATIC_VAR.
4868
4869 2017-09-04  Pedro Alves  <palves@redhat.com>
4870
4871         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4872         handling.
4873         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4874         Ditto.
4875         * parse.c (operator_length_standard, operator_check_standard):
4876         Ditto.
4877         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4878
4879 2017-09-04  Pedro Alves  <palves@redhat.com>
4880
4881         * ax-gdb.c: Include "typeprint.h".
4882         (gen_expr_for_cast): New function.
4883         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4884         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4885         type is unknown.
4886         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4887         nodebug_data_symbol.
4888         * eval.c: Include "typeprint.h".
4889         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4890         Error out if symbol has unknown type.
4891         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4892         evaluate_subexp_for_cast.
4893         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4894         OP_VAR_MSYM_VALUE.
4895         (evaluate_subexp_for_cast): New function.
4896         * gdbtypes.c (init_nodebug_var_type): New function.
4897         (objfile_type): Use it to initialize types of variables with no
4898         debug info.
4899         * typeprint.c (error_unknown_type): New.
4900         * typeprint.h (error_unknown_type): New declaration.
4901         * compile/compile-c-types.c (convert_type_basic): Handle
4902         TYPE_CODE_ERROR; warn and fallback to int for variables with
4903         unknown type.
4904
4905 2017-09-04  Pedro Alves  <palves@redhat.com>
4906
4907         * eval.c (evaluate_var_value): New function, factored out from ...
4908         (evaluate_subexp_standard): ... here.
4909
4910 2017-09-04  Pedro Alves  <palves@redhat.com>
4911
4912         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4913         Remove useless assignments to 'op'.
4914
4915 2017-09-04  Pedro Alves  <palves@redhat.com>
4916
4917         * eval.c (eval_skip_value): New function.
4918         (evaluate_subexp_standard): Use it.
4919
4920 2017-09-04  Pedro Alves  <palves@redhat.com>
4921
4922         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4923         function name from symbol/minsym and pass it to
4924         error_call_unknown_return_type.
4925
4926 2017-09-04  Pedro Alves  <palves@redhat.com>
4927
4928         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4929         * ax-gdb.c (gen_msym_var_ref): New function.
4930         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4931         * eval.c (evaluate_var_msym_value): New function.
4932         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4933         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4934         to call_function_by_hand.
4935         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4936         Handle OP_VAR_MSYM_VALUE.
4937         (union exp_element) <msymbol>: New field.
4938         * minsyms.h (struct type): Forward declare.
4939         (find_minsym_type_and_address): Declare.
4940         * parse.c (write_exp_elt_msym): New function.
4941         (write_exp_msymbol): Delete, refactored as ...
4942         (find_minsym_type_and_address): ... this new function.
4943         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4944         (operator_length_standard, operator_check_standard): Handle
4945         OP_VAR_MSYM_VALUE.
4946         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4947
4948 2017-09-04  Pedro Alves  <palves@redhat.com>
4949
4950         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4951         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4952         unknown.
4953         * ada-typeprint.c (print_func_type): Handle functions with unknown
4954         return type.
4955         * c-typeprint.c (c_type_print_base): Handle functions and methods
4956         with unknown return type.
4957         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4958         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4959         * compile/compile-c-types.c: Include "objfiles.h".
4960         (convert_func): For functions with unknown return type, warn and
4961         default to int.
4962         * compile/compile-object-run.c (compile_object_run): Adjust call
4963         to call_function_by_hand_dummy.
4964         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4965         call_function_by_hand.
4966         * eval.c (evaluate_subexp_standard): Adjust calls to
4967         call_function_by_hand.  Handle functions and methods with unknown
4968         return type.  Pass expect_type to call_function_by_hand.
4969         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4970         return type.
4971         * gcore.c (call_target_sbrk): Adjust call to
4972         call_function_by_hand.
4973         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4974         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4975         an integer address type instead of nodebug.
4976         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4977         call_function_by_hand.
4978         * infcall.c (error_call_unknown_return_type): New function.
4979         (call_function_by_hand): New "default_return_type" parameter.
4980         Pass it down.
4981         (call_function_by_hand_dummy): New "default_return_type"
4982         parameter.  Use it instead of defaulting to int.  If there's no
4983         default and the return type is unknown, throw an error.  If
4984         there's a default return type, and the called function has no
4985         debug info, then assume the function is prototyped.
4986         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4987         New "default_return_type" parameter.
4988         (error_call_unknown_return_type): New declaration.
4989         * linux-fork.c (call_lseek): Cast return type of lseek.
4990         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4991         call_function_by_hand.
4992         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4993         calls to call_function_by_hand.
4994         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4995         return type.
4996         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4997         (value_nsstring, print_object_command): Adjust calls to
4998         call_function_by_hand.
4999         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5000         functions with unknown return type.
5001         (pascal_type_print_func_varspec_suffix): New function.
5002         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5003         TYPE_CODE_METHOD>: Use it.
5004         * python/py-value.c (valpy_call): Adjust call to
5005         call_function_by_hand.
5006         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5007         call_function_by_hand.
5008         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5009         call_function_by_hand.
5010         * valops.c (value_allocate_space_in_inferior): Adjust call to
5011         call_function_by_hand.
5012         * typeprint.c (type_print_unknown_return_type): New function.
5013         * typeprint.h (type_print_unknown_return_type): New declaration.
5014
5015 2017-09-04  Pedro Alves  <palves@redhat.com>
5016
5017         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5018         types with more than one parameter as prototyped.
5019
5020 2017-09-04  Pedro Alves  <palves@redhat.com>
5021
5022         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5023         (disassemble_command): Use gdb_disassembly_flags instead of bare
5024         int.
5025         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5026         (dump_insns, do_mixed_source_and_assembly_deprecated)
5027         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5028         Use gdb_disassembly_flags instead of bare int.
5029         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5030         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5031         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5032         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5033         (enum gdb_disassembly_flag): ... values of this new enumeration.
5034         (gdb_disassembly_flags): Define.
5035         (gdb_disassembly)
5036         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5037         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5038         gdb_disassembly_flags instead of bare int.
5039         * record-btrace.c (btrace_insn_history)
5040         (record_btrace_insn_history, record_btrace_insn_history_range)
5041         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5042         instead of bare int.
5043         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5044         Use gdb_disassembly_flags instead of bare int.
5045         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5046         Define.
5047         * target-delegates.c: Regenerate.
5048         * target.c (target_insn_history, target_insn_history_from)
5049         (target_insn_history_range): Use gdb_disassembly_flags instead of
5050         bare int.
5051         * target.h: Include "disasm.h".
5052         (struct target_ops) <to_insn_history, to_insn_history_from,
5053         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5054         int.
5055         (target_insn_history, target_insn_history_from)
5056         (target_insn_history_range): Use gdb_disassembly_flags instead of
5057         bare int.
5058
5059 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5060
5061         * cli/cli-script.c (build_command_line): For if/while commands,
5062         check whether args is empty.
5063
5064 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5065
5066         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5067         (enum command_control_type): Likewise.
5068         (struct command_line): Likewise.
5069         (free_command_lines): Likewise.
5070         (struct command_lines_deleter): Likewise.
5071         (command_line_up): Likewise.
5072         (read_command_lines): Likewise.
5073         (read_command_lines_1): Likewise.
5074         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5075         (enum command_control_type): Likewise.
5076         (struct command_line): Likewise.
5077         (free_command_lines): Likewise.
5078         (struct command_lines_deleter): Likewise.
5079         (command_line_up): Likewise.
5080         (read_command_lines): Likewise.
5081         (read_command_lines_1): Likewise.
5082         * breakpoint.h: Include cli/cli-script.h.
5083         * extension-priv.h: Likewise.
5084         * gdbcmd.h: Likewise.
5085
5086 2017-09-04  Pedro Alves  <palves@redhat.com>
5087
5088         * ada-lang.c (is_known_support_routine): Move sal declaration to
5089         where it is initialized.
5090         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5091         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5092         (clear_command, update_static_tracepoint): Remove init_sal
5093         references.  Move declarations closer to initializations.
5094         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5095         initializations.
5096         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5097         references.  Move sal declarations closer to initializations.
5098         * frame.c (find_frame_sal): Return a symtab_and_line via function
5099         return instead of output parameter.  Remove init_sal references.
5100         * frame.h (find_frame_sal): Return a symtab_and_line via function
5101         return instead of output parameter.
5102         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5103         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5104         instead of memset.
5105         (gdbscm_find_pc_line): Remove init_sal reference.
5106         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5107         references.  Move declarations closer to initializations.
5108         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5109         initializations.
5110         (finish_backward): Remove init_sal references.  Move declarations
5111         closer to initializations.
5112         * infrun.c (process_event_stop_test, handle_step_into_function)
5113         (insert_hp_step_resume_breakpoint_at_frame)
5114         (insert_step_resume_breakpoint_at_caller): Likewise.
5115         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5116         (symbol_to_sal): Likewise.
5117         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5118         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5119         to its initialization.
5120         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5121         init_sal references.  Move declarations closer to initializations.
5122         * source.c (get_current_source_symtab_and_line): Remove brace
5123         initialization.
5124         (set_current_source_symtab_and_line): Now takes the sal by const
5125         reference.  Remove brace initialization.
5126         (line_info): Remove init_sal reference.
5127         * source.h (set_current_source_symtab_and_line): Now takes a
5128         symtab_and_line via const reference.
5129         * stack.c (set_current_sal_from_frame): Adjust.
5130         (print_frame_info): Adjust.
5131         (get_last_displayed_sal): Return the sal via function return
5132         instead of via output parameter.  Simplify.
5133         (frame_info): Adjust.
5134         * stack.h (get_last_displayed_sal): Return the sal via function
5135         return instead of via output parameter.
5136         * symtab.c (init_sal): Delete.
5137         (find_pc_sect_line): Remove init_sal references.  Move
5138         declarations closer to initializations.
5139         (find_function_start_sal): Remove init_sal references.  Move
5140         declarations closer to initializations.
5141         * symtab.h (struct symtab_and_line): In-class initialize all
5142         fields.
5143         * tracepoint.c (set_traceframe_context)
5144         (print_one_static_tracepoint_marker): Remove init_sal references.
5145         Move declarations closer to initializations.
5146         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5147         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5148         declarations closer to initializations.
5149         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5150         init_sal references.  Adjust.
5151
5152 2017-09-04  Pedro Alves  <palves@redhat.com>
5153
5154         * ax-gdb.c (agent_command_1): Use range-for.
5155         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5156         * breakpoint.c: Include "common/array-view.h".
5157         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5158         parameter from struct symtabs_and_lines to
5159         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5160         (breakpoint_sals_to_pc): Change sals parameter from struct
5161         symtabs_and_lines to std::vector reference.
5162         (check_fast_tracepoint_sals): Change sals parameter from struct
5163         symtabs_and_lines to std::array_view.  Use range-for.
5164         (decode_static_tracepoint_spec): Return a std::vector instead of
5165         symtabs_and_lines.  Update.
5166         (create_breakpoint): Update.
5167         (break_range_command, until_break_command, clear_command): Update.
5168         (base_breakpoint_decode_location, bkpt_decode_location)
5169         (bkpt_probe_create_sals_from_location)
5170         (bkpt_probe_decode_location, tracepoint_decode_location)
5171         (tracepoint_probe_decode_location)
5172         (strace_marker_create_sals_from_location): Return a std::vector
5173         instead of symtabs_and_lines.
5174         (strace_marker_create_breakpoints_sal): Update.
5175         (strace_marker_decode_location): Return a std::vector instead of
5176         symtabs_and_lines.  Update.
5177         (update_breakpoint_locations): Change struct symtabs_and_lines
5178         parameters to gdb::array_view.  Adjust.
5179         (location_to_sals): Return a std::vector instead of
5180         symtabs_and_lines.  Update.
5181         (breakpoint_re_set_default): Use std::vector instead of struct
5182         symtabs_and_lines.
5183         (decode_location_default): Return a std::vector instead of
5184         symtabs_and_lines.  Update.
5185         * breakpoint.h: Include "common/array-view.h".
5186         (struct breakpoint_ops) <decode_location>: Now returns a
5187         std::vector instead of returning a symtabs_and_lines via output
5188         parameter.
5189         (update_breakpoint_locations): Change sals parameters to use
5190         gdb::array_view.
5191         * cli/cli-cmds.c (edit_command, list_command): Update to use
5192         std::vector and gdb::array_view.
5193         (ambiguous_line_spec): Adjust to use gdb::array_view and
5194         range-for.
5195         (compare_symtabs): Rename to ...
5196         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5197         const reference and adjust.
5198         (filter_sals): Rewrite using std::vector and standard algorithms.
5199         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5200         (jump_command): Update to use std::vector.
5201         * linespec.c (struct linespec_state) <canonical_names>: Update
5202         comment.
5203         (add_sal_to_sals_basic): Delete.
5204         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5205         (decode_line_2, create_sals_line_offset)
5206         (convert_address_location_to_sals, convert_linespec_to_sals)
5207         (convert_explicit_location_to_sals, parse_linespec)
5208         (event_location_to_sals, decode_line_full, decode_line_1)
5209         (decode_line_with_current_source)
5210         (decode_line_with_last_displayed, decode_objc)
5211         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5212         (linespec_result::~linespec_result): Adjust to use std::vector
5213         instead of symtabs_and_lines.
5214         * linespec.h (linespec_sals::sals): Now a std::vector.
5215         (struct linespec_result): Use std::vector, bool, and in-class
5216         initialization.
5217         (decode_line_1, decode_line_with_current_source)
5218         (decode_line_with_last_displayed): Return std::vector.
5219         * macrocmd.c (info_macros_command): Use std::vector.
5220         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5221         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5222         std::vector.
5223         * probe.h (parse_probes): Return a std::vector.
5224         * python/python.c (gdbpy_decode_line): Use std::vector and
5225         gdb::array_view.
5226         * source.c (select_source_symtab, line_info): Use std::vector.
5227         * stack.c (func_command): Use std::vector.
5228         * symtab.h (struct symtabs_and_lines): Delete.
5229         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5230
5231 2017-09-04  Pedro Alves  <palves@redhat.com>
5232
5233         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5234         unittests/array-view-selftests.c.
5235         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5236         * common/array-view.h: New file.
5237         * unittests/array-view-selftests.c: New file.
5238
5239 2017-09-04  Pedro Alves  <palves@redhat.com>
5240
5241         * cli/cli-cmds.c (edit_command): Pass message to
5242         ambiguous_line_spec.
5243         (list_command): Pass message to ambiguous_line_spec.  Say
5244         "first"/"last" instead of "start" and "end" to be consistent with
5245         the manual.
5246         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5247         them to print formatted message.
5248
5249 2017-09-04  Pedro Alves  <palves@redhat.com>
5250
5251         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5252         ftrace_update_insns by reference instead of pointer.
5253
5254 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5255
5256         * i386-go32-tdep.c: Include x86-xstate.h.
5257         (i386_go32_init_abi): Call i386_target_description.
5258         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5259         if xcr0 is X86_XSTATE_X87_MASK.
5260         * i386-tdep.h (tdesc_i386): Remove the declaration.
5261         (tdesc_i386_mmx): Likewise.
5262
5263 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5264
5265         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5266         X86_XSTATE_SSE_MASK instead of 0.
5267
5268 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5269
5270         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5271         i386_target_description.
5272         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5273         i386_target_description.
5274         * i386-tdep.c (i386_gdbarch_init): Likewise.
5275
5276 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5277
5278         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5279         (x86_darwin_init_abi_64): Call amd64_target_description.
5280         * amd64-dicos-tdep.c: Likewise.
5281         * amd64-fbsd-nat.c: Likewise.
5282         * amd64-fbsd-tdep.c: Likewise.
5283         * amd64-nbsd-tdep.c: Likewise.
5284         * amd64-obsd-tdep.c: Likewise.
5285         * amd64-sol2-tdep.c: Likewise.
5286         * amd64-windows-tdep.c: Likewise.
5287         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5288
5289 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5290
5291         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5292         (btrace_function) <insn>: Change type to use std::vector.
5293         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5294         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5295         ftrace_update_insns, ftrace_compute_global_level_offset,
5296         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5297         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5298         change to std::vector.
5299         (ftrace_update_insns): Adjust to change to std::vector, change
5300         type of INSN parameter.
5301         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5302         * record-btrace.c (btrace_call_history_insn_range,
5303         btrace_compute_src_line_range,
5304         record_btrace_frame_prev_register): Adjust to change to
5305         std::vector.
5306         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5307         to change to std::vector.
5308
5309 2017-09-03  Tom Tromey  <tom@tromey.com>
5310
5311         * corefile.c (reopen_exec_file): Use std::string.
5312
5313 2017-09-03  Tom Tromey  <tom@tromey.com>
5314
5315         * compile/compile.c (compile_register_name_mangled): Return
5316         std::string.
5317         * compile/compile-loc2c.c (pushf_register_address): Update.
5318         (pushf_register): Update.
5319         * compile/compile-c-types.c (convert_array): Update.
5320         * compile/compile-c-symbols.c (generate_vla_size): Update.
5321         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5322         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5323         (convert_one_symbol): Update.
5324         (generate_c_for_for_one_variable): Update.
5325         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5326         std::string.
5327         (generate_register_struct): Update.
5328         * compile/compile-internal.h (c_get_range_decl_name): Return a
5329         std::string.
5330         (compile_register_name_mangled): Return std::string.
5331
5332 2017-09-03  Tom Tromey  <tom@tromey.com>
5333
5334         * utils.c (perror_string): Return a std::string.
5335         (throw_perror_with_name, perror_warning_with_name): Update.
5336
5337 2017-09-03  Tom Tromey  <tom@tromey.com>
5338
5339         * demangle.c (demangle_command): Use std::string,
5340         unique_xmalloc_ptr.
5341
5342 2017-09-03  Tom Tromey  <tom@tromey.com>
5343
5344         * cli/cli-setshow.c (do_set_command): Use std::string.
5345
5346 2017-09-03  Tom Tromey  <tom@tromey.com>
5347
5348         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5349
5350 2017-09-03  Tom Tromey  <tom@tromey.com>
5351
5352         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5353
5354 2017-09-03  Tom Tromey  <tom@tromey.com>
5355
5356         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5357         gdb::unique_xmalloc_ptr.
5358
5359 2017-09-03  Tom Tromey  <tom@tromey.com>
5360
5361         * thread.c (print_thread_info_1): Use string_printf.
5362         (thread_apply_command, thread_apply_all_command): Use
5363         std::string.
5364
5365 2017-09-03  Tom Tromey  <tom@tromey.com>
5366
5367         * valprint.c (val_print_string): Update.
5368         * gdbcore.h (memory_error_message): Return std::string.
5369         * corefile.c (memory_error_message): Return std::string.
5370         (memory_error): Update.
5371         * breakpoint.c (insert_bp_location): Update.
5372
5373 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5374
5375         * target/waitstatus.h (target_waitstatus_to_string): Change
5376         return type to std::string.
5377         * target/waitstatus.c (target_waitstatus_to_string): Return
5378         std::string.
5379         * target.h (target_waitstatus_to_string): Remove declaration.
5380         * infrun.c (resume, clear_proceed_status_thread,
5381         print_target_wait_results, do_target_wait, save_waitstatus,
5382         stop_all_threads): Adjust.
5383         * record-btrace.c (record_btrace_wait): Adjust.
5384         * target-debug.h
5385         (target_debug_print_struct_target_waitstatus_p): Adjust.
5386
5387 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5388
5389         PR gdb/22046
5390         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5391         detection.
5392
5393 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5394
5395         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5396         for setting/unsetting environment variables on the remote target.
5397         (New remote packets): Add entries for QEnvironmentHexEncoded,
5398         QEnvironmentUnset and QEnvironmentReset.
5399         * common/environ.c (gdb_environ::operator=): Extend method to
5400         handle m_user_set_env_list and m_user_unset_env_list.
5401         (gdb_environ::clear): Likewise.
5402         (match_var_in_string): Change type of first parameter from 'char
5403         *' to 'const char *'.
5404         (gdb_environ::set): Extend method to handle
5405         m_user_set_env_list and m_user_unset_env_list.
5406         (gdb_environ::unset): Likewise.
5407         (gdb_environ::clear_user_set_env): New method.
5408         (gdb_environ::user_set_envp): Likewise.
5409         (gdb_environ::user_unset_envp): Likewise.
5410         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5411         m_user_unset_env_list on move constructor/assignment.
5412         (unset): Add new default parameter 'update_unset_list = true'.
5413         (clear_user_set_env): New method.
5414         (user_set_envp): Likewise.
5415         (user_unset_envp): Likewise.
5416         (m_user_set_env_list): New std::set.
5417         (m_user_unset_env_list): Likewise.
5418         * common/rsp-low.c (hex2str): New function.
5419         (bin2hex): New overload for bin2hex function.
5420         * common/rsp-low.c (hex2str): New prototype.
5421         (str2hex): New overload prototype.
5422         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5423         QEnvironmentUnset and QEnvironmentReset.
5424         (remote_protocol_features): Add QEnvironmentHexEncoded,
5425         QEnvironmentUnset and QEnvironmentReset packets.
5426         (send_environment_packet): New function.
5427         (extended_remote_environment_support): Likewise.
5428         (extended_remote_create_inferior): Call
5429         extended_remote_environment_support.
5430         (_initialize_remote): Add QEnvironmentHexEncoded,
5431         QEnvironmentUnset and QEnvironmentReset packet configs.
5432         * unittests/environ-selftests.c (gdb_selftest_env_var):
5433         New variable.
5434         (test_vector_initialization): New function.
5435         (test_init_from_host_environ): Likewise.
5436         (test_reinit_from_host_environ): Likewise.
5437         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5438         Likewise.
5439         (test_unset_set_empty_vector): Likewise.
5440         (test_vector_clear): Likewise.
5441         (test_std_move): Likewise.
5442         (test_move_constructor):
5443         (test_self_move): Likewise.
5444         (test_set_unset_reset): Likewise.
5445         (run_tests): Rewrite in terms of the functions above.
5446
5447 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5448
5449         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5450         (adi_available): Use a temp variable of type CORE_ADDR as argument
5451         3 when calling target_auxv_search.
5452         (adi_normalize_address): Use masks and xor operators to calculate
5453         normalized address.
5454         (adi_read_versions, adi_write_versions, adi_print_versions)
5455         (do_examine, do_assign): Use paddress.
5456
5457 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5458
5459         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5460         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5461         out of loop and add supply of FIR.
5462         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5463         add collect of FIR.
5464
5465 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5466
5467         PR gdb/21827
5468         * cli/cli-script.c (define_command): Don't convert command name
5469         to lower case.
5470
5471 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5472
5473         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5474         Update all callers accordingly. Remove all code blocks handling
5475         the case where DISPP is not NULL.
5476
5477 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5478
5479         PR symtab/22003
5480         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5481         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5482         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5483
5484 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5485
5486         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5487         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5488         (read_comp_units_from_section): New parameter abbrev_section, use
5489         read_and_check_comp_unit_head, allocate signatured_type if needed.
5490         (create_all_comp_units): Update read_comp_units_from_section caller.
5491
5492 2017-08-23  Pedro Alves  <palves@redhat.com>
5493
5494         PR remote/21852
5495         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5496         to null_ptid and switch to thread without reading the registers
5497         after adding the inferior.
5498
5499 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5500
5501         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5502         compile-gcc.
5503         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5504         (compile_to_object): Implement compile_gcc.
5505         (_initialize_compile): Install "set compile-gcc".  Initialize
5506         compile_gcc.
5507
5508 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5509
5510         * compile/compile.c (compile_to_object): Conditionally call
5511         set_verbose.  Conditionally call compile or compile_v0.
5512
5513 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5514
5515         * sparc64-tdep.h: (adi_normalize_address): New export.
5516         * sparc-nat.h: (open_adi_tag_fd): New export.
5517         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5518         * sparc64-linux-tdep.c:
5519         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5520         (sparc64_linux_handle_segmentation_fault): New function.
5521         (sparc64_linux_init_abi): Register
5522         sparc64_linux_handle_segmentation_fault
5523         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5524         (sparc64_addr_bits_remove): New function.
5525         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5526         (MAX_PROC_NAME_SIZE): New macro.
5527         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5528         (sparc64adilist): New variable.
5529         (adi_proc_list): New variable.
5530         (find_adi_info): New function.
5531         (add_adi_info): New function.
5532         (get_adi_info_proc): New function.
5533         (get_adi_info): New function.
5534         (info_adi_command): New function.
5535         (read_maps_entry): New function.
5536         (adi_available): New function.
5537         (adi_normalize_address): New function.
5538         (adi_align_address): New function.
5539         (adi_convert_byte_count): New function.
5540         (adi_tag_fd): New function.
5541         (adi_is_addr_mapped): New function.
5542         (adi_read_versions): New function.
5543         (adi_write_versions): New function.
5544         (adi_print_versions): New function.
5545         (do_examine): New function.
5546         (do_assign): New function.
5547         (adi_examine_command): New function.
5548         (adi_assign_command): New function.
5549         (_initialize_sparc64_adi_tdep): New function.
5550
5551 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5552
5553         * breakpoint.c (breakpoints_info): Rename to ...
5554         (info_breakpoints_command): ... this.
5555         (watchpoints_info): Rename to ...
5556         (info_watchpoints_command): ... this.
5557         (tracepoints_info): Rename to ...
5558         (info_tracepoints_command): ... this.
5559         (_initialize_breakpoint): Adjust.
5560         * dcache.c (dcache_info): Rename to ...
5561         (info_display_command): ... this.
5562         (_initialize_dcache): Adjust.
5563         * frame.h (args_info): Rename to ...
5564         (info_args_command): ... this.
5565         (locals_info): Rename to ...
5566         (info_locals_command): ... this.
5567         * infcmd.c (nofp_registers_info): Rename to ...
5568         (info_registers_command): ... this.
5569         (float_info): Rename to ...
5570         (info_float_command): ... this.
5571         (program_info): Rename to ...
5572         (info_program_command): ... this.
5573         (all_registers_info): Rename to ...
5574         (info_all_registers_command): ... this.
5575         (vector_info): Rename to ...
5576         (info_vector_command): ... this.
5577         (float_info): Rename to ...
5578         (info_float_command): ... this.
5579         (_initialize_infcmd): Adjust.
5580         * inferior.h (term_info): Rename to ...
5581         (info_terminal_command): ... this.
5582         * inflow.c (term_info): Rename to ...
5583         (info_terminal_command): ... this.
5584         (_initialize_inflow): Adjust.
5585         * infrun.c (signals_info): Rename to ...
5586         (info_signals_command): ... this.
5587         (_initialize_infrun): Adjust.
5588         * objc-lang.c (classes_info): Rename to ...
5589         (info_classes_command): ... this.
5590         (selectors_info): Rename to ...
5591         (info_selectors_command): ... this.
5592         (_initialize_objc_language): Adjust.
5593         * printcmd.c (sym_info): Rename to ...
5594         (info_symbol_command): ... this.
5595         (address_info): Rename to ...
5596         (info_address_command): ... this.
5597         (display_info): Rename to ...
5598         (info_display_command): ... this.
5599         (_initialize_printcmd): Adjust.
5600         * reverse.c (bookmarks_info): Rename to ...
5601         (info_breakpoints_command): ... this.
5602         (_initialize_reverse): Adjust.
5603         * ser-go32.c (dos_info): Rename to ...
5604         (info_serial_command): ... this.
5605         (_initialize_ser_dos): Adjust.
5606         * skip.c (skip_info): Rename to ...
5607         (info_skip_command): ... this.
5608         (_initialize_step_skip): Adjust.
5609         * source.c (line_info): Rename to ...
5610         (info_line_command): ... this.
5611         (source_info): Rename to ...
5612         (info_source_command)
5613         * stack.c (frame_info): Rename to ...
5614         (info_frame_command): ... this.
5615         (locals_info): Rename to ...
5616         (info_locals_command): ... this.
5617         (args_info): Rename to ...
5618         (info_args_command): ... this.
5619         (_initialize_stack): Adjust.
5620         * symtab.c (sources_info): Rename to ...
5621         (info_sources_command): ... this.
5622         (variables_info): Rename to ...
5623         (info_variables_command): ... this.
5624         (functions_info): Rename to ...
5625         (info_functions_command): ... this.
5626         (types_info): Rename to ...
5627         (info_types_command): ... this.
5628         (_initialize_symtab): Adjust.
5629         * target.c (target_info): Rename to ...
5630         (info_target_command): ... this.
5631         (initialize_targets): Adjust.
5632         * tracepoint.c (tvariables_info): Rename to ...
5633         (info_tvariables_command): ... this.
5634         (scope_info): Rename to ...
5635         (info_scope_command): ... this.
5636         (trace_dump_actions): Adjust.
5637         (_initialize_tracepoint): Adjust.
5638
5639 2017-08-22  Tom Tromey  <tom@tromey.com>
5640
5641         * breakpoint.h (install_breakpoint): Update.
5642         * breakpoint.c (add_solib_catchpoint): Update.
5643         (install_breakpoint): Change argument to a std::unique_ptr.
5644         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5645         (create_breakpoint_sal, create_breakpoint): Update.
5646         (watch_command_1, catch_exec_command_1)
5647         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5648         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5649         Return the breakpoint.
5650         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5651         (new_single_step_breakpoint): Update.
5652         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5653         std::unique_ptr.
5654         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5655         std::unique_ptr.
5656         * break-catch-sig.c (create_signal_catchpoint): Use
5657         std::unique_ptr.
5658         * ada-lang.c (create_ada_exception_catchpoint): Use
5659         std::unique_ptr.
5660
5661 2017-08-22  Tom Tromey  <tom@tromey.com>
5662
5663         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5664
5665 2017-08-22  Tom Tromey  <tom@tromey.com>
5666
5667         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5668         (lookup_partial_symbol): Update.
5669
5670 2017-08-22  Tom Tromey  <tom@tromey.com>
5671
5672         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5673         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5674         (find_and_open_source, symtab_to_fullname): Update.
5675         * psymtab.c (psymtab_to_fullname): Update.
5676
5677 2017-08-22  Tom Tromey  <tom@tromey.com>
5678
5679         * exec.c (exec_file_attach): Update.
5680         * linux-thread-db.c (try_thread_db_load): Update.
5681         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5682         * utils.c (gdb_realpath): Change return type.
5683         (gdb_realpath_keepfile): Update.
5684         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5685         (_initialize_utils): Register the new self test.
5686         * source.c (openp): Update.
5687         (find_and_open_source): Update.
5688         * nto-tdep.c (nto_find_and_open_solib): Update.
5689         * main.c (set_gdb_data_directory): Update.
5690         (captured_main_1): Update.
5691         * dwarf2read.c (dwarf2_get_dwz_file): Update
5692         (dw2_map_symbol_filenames): Update.
5693         * auto-load.c (auto_load_safe_path_vec_update): Update.
5694         (filename_is_in_auto_load_safe_path_vec): Change type of
5695         "filename_realp".
5696         (auto_load_objfile_script): Update.
5697         (file_is_auto_load_safe): Update.  Use std::string.
5698         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5699
5700 2017-08-22  Tom Tromey  <tom@tromey.com>
5701
5702         * utils.c (gdb_realpath_keepfile): Return a
5703         gdb::unique_xmalloc_ptr.
5704         * exec.c (exec_file_attach): Update.
5705         * utils.h (gdb_realpath_keepfile): Return a
5706         gdb::unique_xmalloc_ptr.
5707
5708 2017-08-22  Tom Tromey  <tom@tromey.com>
5709
5710         * compile/compile.c (compile_file_command): Use
5711         gdb::unique_xmalloc_ptr, std::string.
5712         * utils.c (gdb_abspath): Change return type.
5713         * source.c (openp): Update.
5714         * objfiles.c (allocate_objfile): Update.
5715         * main.c (set_gdb_data_directory): Update.
5716         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5717
5718 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5719
5720         * cli-cmds.c (list_commands): List actual code around more than
5721         one location.
5722
5723 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5724
5725         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5726
5727 2017-08-21  Pedro Alves  <palves@redhat.com>
5728
5729         PR gdb/19487
5730         * c-exp.y (variable production): Handle function aliases.
5731         * minsyms.c (msymbol_is_text): New function.
5732         * minsyms.h (msymbol_is_text): Declare.
5733         * symtab.c (find_function_alias_target): New function.
5734         * symtab.h (find_function_alias_target): Declare.
5735
5736 2017-08-21  Pedro Alves  <palves@redhat.com>
5737
5738         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5739         typedefs.
5740         * typeprint.c (whatis_exp): If handling "whatis", and expression
5741         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5742         typedefs here.
5743         * valops.c (value_cast): Save "to" type before resolving
5744         stubs/typedefs.  Use that type as resulting value's type.
5745
5746 2017-08-18  Tom Tromey  <tom@tromey.com>
5747             Pedro Alves  <palves@redhat.com>
5748
5749         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5750         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5751         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5752         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5753         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5754         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5755         (linux_get_siginfo_data): Add "thread" argument.  Use
5756         scoped_restore.
5757         * linux-nat.c (linux_child_follow_fork)
5758         (check_stopped_by_watchpoint): Use scoped_restore.
5759         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5760         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5761         (restore_inferior_ptid, save_inferior_ptid): Remove.
5762         * btrace.c (btrace_fetch): Use scoped_restore.
5763         * bsd-uthread.c (bsd_uthread_fetch_registers)
5764         (bsd_uthread_store_registers): Use scoped_restore.
5765         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5766         scoped_restore.
5767         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5768         (aix_thread_xfer_partial): Use scoped_restore.
5769         * inferior.h (save_inferior_ptid): Remove.
5770
5771 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5772
5773         PR tdep/21818
5774         * arm-tdep.c (gdb_print_insn_arm): Mark
5775         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5776
5777 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5778
5779         * NEWS: Mention GDBserver's new option "--selftest".
5780         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5781         * selftest.c: Move it to common/selftest.c.
5782         * selftest.h: Move it to common/selftest.h.
5783         * selftest-arch.c (reset): New function.
5784         (tests_with_arch): Call reset.
5785
5786 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5787
5788         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5789         instead of exception_fprintf and printf_filtered.
5790
5791 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5792
5793         * selftest.c (register_self_test): Rename it to
5794         selftests::register_test.
5795         (run_self_tests): selftest::run_tests.
5796         * selftest.h: Update declarations.
5797         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5798         selftests::register_test_foreach_arch.
5799         * selftest-arch.h: Update declaration.
5800         * aarch64-tdep.c: Update.
5801         * arm-tdep.c: Likewise.
5802         * disasm-selftests.c: Likewise.
5803         * dwarf2loc.c: Likewise.
5804         * dwarf2-frame.c: Likewise.
5805         * findvar.c: Likewise.
5806         * gdbarch-selftests.c: Likewise.
5807         * maint.c (maintenance_selftest): Likewise.
5808         * regcache.c: Likewise.
5809         * rust-exp.y: Likewise.
5810         * selftest-arch.c: Likewise.
5811         * unittests/environ-selftests.c: Likewise.
5812         * unittests/function-view-selftests.c: Likewise.
5813         * unittests/offset-type-selftests.c: Likewise.
5814         * unittests/optional-selftests.c: Likewise.
5815         * unittests/scoped_restore-selftests.c: Likewise.
5816         * utils-selftests.c: Likewise.
5817
5818 2017-08-17  Pedro Alves  <palves@redhat.com>
5819
5820         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5821         local.
5822
5823 2017-08-17  Pedro Alves  <palves@redhat.com>
5824
5825         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5826         field.
5827         (reset_die_in_process): Delete, replaced by ...
5828         (process_die_scope): ... this new class.  Make it responsible for
5829         freeing cu->line_header too.
5830         (process_die): Use process_die_scope.
5831         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5832         cu->line_header_die_owner.  Don't release the line header if it's
5833         owned by the CU.
5834         (setup_type_unit_groups): Make the CU/DIE own the line header.
5835         Don't release the line header here.
5836
5837 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5838
5839         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5840
5841 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5842
5843         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5844         Single-Key mode
5845
5846 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5847
5848         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5849         mode command list.
5850
5851 2017-08-15  Stafford Horne  <shorne@gmail.com>
5852
5853         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5854
5855 2017-08-15  Stafford Horne  <shorne@gmail.com>
5856
5857         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5858
5859 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5860
5861         PR gdb/21954
5862         * infcmd.c (unset_environment_command): Use the 'clear' method on
5863         the environment instead of resetting it.
5864
5865 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5866
5867         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5868         platforms.
5869
5870 2017-08-14  Tom Tromey  <tom@tromey.com>
5871
5872         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5873         (print_binary_chars): Likewise.
5874         (BITS_IN_BYTES): Remove.
5875
5876 2017-08-14  Tom Tromey  <tom@tromey.com>
5877
5878         PR gdb/21675
5879         * valprint.c (LOW_ZERO): Change value to 034.
5880         (print_octal_chars): Add static_asserts for octal constants.
5881         * printcmd.c (print_scalar_formatted): Add 'd' case.
5882
5883 2017-08-11  Tom Tromey  <tom@tromey.com>
5884
5885         * symfile.c (add_symbol_file_command): Use std::vector.
5886
5887 2017-08-14  Tom Tromey  <tom@tromey.com>
5888
5889         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5890         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5891         std::move.
5892         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5893
5894 2017-08-11  Pedro Alves  <palves@redhat.com>
5895
5896         * infrun.c (process_event_stop_test): Adjust
5897         function_name_is_marked_for_skip call.
5898         * skip.c: Include <list>.
5899         (skiplist_entry): Make it a class with private fields, and
5900         getters/setters.
5901         (skiplist_entry_chain): Delete.
5902         (skiplist_entries): New.
5903         (skiplist_entry_count): Delete.
5904         (highest_skiplist_entry_num): New.
5905         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5906         (add_skiplist_entry): Delete.
5907         (skiplist_entry::skiplist_entry): New.
5908         (skiplist_entry::add_entry): New.
5909         (skip_file_command, skip_function): Adjust.
5910         (compile_skip_regexp): Delete.
5911         (skip_command): Don't compile regexp here.  Adjust to use
5912         skiplist_entry::add_entry.
5913         (skip_info): Adjust to use range-for and getters.
5914         (skip_enable_command, skip_disable_command): Adjust to use
5915         range-for and setters.
5916         (skip_delete_command): Adjust to use std::list.
5917         (add_skiplist_entry): Delete.
5918         (skip_file_p): Delete, refactored as ...
5919         (skiplist_entry::do_skip_file_p): ... this new method.
5920         (skip_gfile_p): Delete, refactored as ...
5921         (skiplist_entry::do_gskip_file_p): ... this new method.
5922         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5923         (skiplist_entry::skip_function_p): ... this new method.
5924         (function_name_is_marked_for_skip): Now returns bool, and takes
5925         the function sal by const reference.  Adjust to use range-for and
5926         skiplist_entry methods.
5927         (_initialize_step_skip): Remove references to
5928         skiplist_entry_chain, skiplist_entry_count.
5929         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5930         takes the function sal by const reference.
5931
5932 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5933
5934         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5935         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5936         (dwarf2_frame_cache):
5937         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5938         RETURN_MASK_ALL and set *this_case to NULL.
5939         * frame-unwind.h: Update comments.
5940
5941 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5942
5943         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5944         (dwarf2_frame_state_copy_regs): Remove.
5945         (dwarf2_frame_state_free_regs): Remove.
5946         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5947         (dwarf2_restore_rule): Call method .alloc_regs instead of
5948         dwarf2_frame_state_alloc_regs.
5949         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5950         constructor.  Call std::move.
5951         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5952         (dwarf2_frame_cache): Likewise.
5953
5954         [GDB_SELF_TEST]: Include selftest.h and
5955         selftest-arch.h.
5956         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5957         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5958         execute_cfa_program_test.
5959
5960         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5961         copy ctor, assignment operator, move assignment.
5962         <alloc_regs>: New method.
5963         <swap>: New method.
5964         (struct dwarf2_frame_state): Delete dtor.
5965         (dwarf2_frame_state_alloc_regs): Remove declaration.
5966         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5967         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5968
5969 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5970
5971         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5972         (dwarf2_frame_state::dwarf2_frame_state): New.
5973         (dwarf2_frame_state::~dwarf2_frame_state): New.
5974         (dwarf2_fetch_cfa_info): Update.
5975         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5976         rather than a pointer.  Update code.
5977         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5978         dtor.
5979         <data_align, code_align, retaddr_column>: Change them to const.
5980         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5981         to bool.
5982
5983 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5984
5985         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5986         <loc.exp>: New field.
5987         * dwarf2-frame.c (execute_cfa_program): Update.
5988         (dwarf2_frame_prev_register): Update.
5989
5990 2017-08-10  Pedro Alves  <palves@redhat.com>
5991
5992         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5993
5994 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5995
5996         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5997         (fbsd_pending_children): Use std::list.
5998         (fbsd_remember_child): Likewise.
5999         (fbsd_is_child_pending): Likewise.
6000         (fbsd_pending_vfork_done): Use std::forward_list.
6001         (fbsd_add_vfork_done): Likewise.
6002         (fbsd_is_vfork_done_pending): Likewise.
6003         (fbsd_next_vfork_done): Likewise.
6004
6005 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6006
6007         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6008         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6009         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6010         for `mapfilename'.
6011         (fbsd_xfer_partial): Use gdb::byte_vector.
6012         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6013
6014 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6015
6016         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6017         "filestuff.h".
6018         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6019
6020 2017-08-09  Tom Tromey  <tom@tromey.com>
6021
6022         * skip.c (skiplist_entry): New constructor.
6023         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6024         (skiplist_entry::file_is_glob): Now bool.
6025         (skiplist_entry::file, skiplist_entry::function): Now
6026         std::string.
6027         (make_skip_entry): Return a unique_ptr.  Use new.
6028         (free_skiplist_entry, free_skiplist_entry_cleanup)
6029         (make_free_skiplist_entry_cleanup): Remove.
6030         (skip_command, skip_disable_command, add_skiplist_entry)
6031         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6032         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6033         (function_name_is_marked_for_skip): Update.
6034         (skip_delete_command): Update.  Use delete.
6035
6036 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6037
6038         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6039         (aarch64_linux_core_read_description): New function.
6040         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6041
6042 2017-08-09  Pedro Alves  <palves@redhat.com>
6043
6044         * cp-name-parser.y (cp_comp_to_string): Return a
6045         gdb::unique_xmalloc_ptr<char>.
6046         * cp-support.c (replace_typedefs_qualified_name)
6047         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6048         (cp_canonicalize_string_full): Use op= instead of explicit
6049         convertion.
6050         (cp_class_name_from_physname, method_name_from_physname)
6051         (cp_func_name, cp_remove_params): Adjust to use
6052         gdb::unique_xmalloc_ptr<char>.
6053         * cp-support.h (cp_comp_to_string): Return a
6054         gdb::unique_xmalloc_ptr<char>.
6055         * python/py-type.c (typy_lookup_type): Adjust to use
6056         gdb::unique_xmalloc_ptr<char>.
6057
6058 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6059
6060         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6061
6062 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6063             Yao Qi  <yao.qi@linaro.org>
6064
6065         * cp-support.c (cp_canonicalize_string_full): Use
6066         gdb::unique_xmalloc_ptr<char>.
6067         (cp_canonicalize_string): Likewise.
6068
6069 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6070
6071         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6072         * regformats/i386/amd64-avx-avx512.dat: Remove.
6073         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6074         * regformats/i386/amd64-avx-mpx.dat:Remove.
6075         * regformats/i386/amd64-avx.dat: Remove.
6076         * regformats/i386/amd64-mpx.dat: Remove.
6077         * regformats/i386/i386-avx-avx512.dat: Remove.
6078         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6079         * regformats/i386/i386-avx-mpx.dat: Remove.
6080         * regformats/i386/i386-mmx.dat: Remove.
6081         * regformats/i386/i386-mpx.dat: Remove.
6082
6083 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6084
6085         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6086         * amd64-tdep.c: Don't include features/i386/x32*.c.
6087         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6088         functions.
6089         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6090         and i386/x32-avx-avx512.
6091         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6092         and i386/x32.xml.
6093         * features/i386/x32-avx-avx512.c: Removed.
6094         * features/i386/x32-avx-avx512.xml: Removed.
6095         * features/i386/x32-avx.c: Removed.
6096         * features/i386/x32-avx.xml: Removed.
6097         * features/i386/x32.c: Removed.
6098         * features/i386/x32.xml: Removed.
6099         * regformats/i386/x32-avx-avx512.dat: Removed.
6100         * regformats/i386/x32-avx.dat: Removed.
6101         * regformats/i386/x32.dat: Removed.
6102
6103 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6104
6105         PR breakpoints/21886
6106         * mem-break.c (default_memory_insert_breakpoint): Use
6107         `->placed_address' rather than `->reqstd_address' for the
6108         breakpoint location.
6109
6110 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6111
6112         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6113         assertions.
6114
6115 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6116
6117         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6118         a union of `tdep_info', `tdesc_data' and `id'.
6119         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6120         rather than `info.tdep_info'.
6121         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6122         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6123         * i386-tdep.c (i386_gdbarch_init): Likewise.
6124         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6125         * mips-tdep.c (mips_gdbarch_init): Likewise.
6126         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6127         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6128         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6129         `info.tdep_info'.
6130         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6131         `info.tdep_info'.
6132         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6133         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6134         `info.tdep_info'.
6135         * spu-tdep.c (spu_gdbarch_init): Likewise.
6136         * gdbarch.h: Regenerate.
6137
6138 2017-08-07  Leszek Swirski  <leszeks@google.com>
6139
6140         PR symtab/20899
6141         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6142
6143 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6144
6145         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6146         (gdbsim_open): Rename gdb_argv args object to argv.
6147
6148 2017-08-05  Tom Tromey  <tom@tromey.com>
6149
6150         * compile/compile-object-load.c (compile_object_load): Use
6151         gdb::unique_xmalloc_ptr.
6152         * cli/cli-dump.c (scan_filename): Rename from
6153         scan_filename_with_cleanup.  Change return type.
6154         (scan_expression): Rename from scan_expression_with_cleanup.
6155         Change return type.
6156         (dump_memory_to_file, dump_value_to_file, restore_command):
6157         Use gdb::unique_xmalloc_ptr.  Update.
6158         * cli/cli-cmds.c (find_and_open_script): Use
6159         gdb::unique_xmalloc_ptr.
6160         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6161         * symmisc.c (maintenance_print_symbols)
6162         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6163         * symfile.c (symfile_bfd_open, generic_load)
6164         (add_symbol_file_command, remove_symbol_file_command): Use
6165         gdb::unique_xmalloc_ptr.
6166         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6167         * psymtab.c (maintenance_print_psymbols): Use
6168         gdb::unique_xmalloc_ptr.
6169         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6170         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6171         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6172         (reload_shared_libraries_1): Likewise.
6173
6174 2017-08-05  Tom Tromey  <tom@tromey.com>
6175
6176         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6177         (rust_op_vector, rust_set_vector): New typedefs.
6178         (current_parser): New global.
6179         (work_obstack): Change to pointer type.  Update all users.
6180         (rust_ast, pstate): Remove globals.
6181         (struct rust_parser): New.
6182         (%union) <params, field_inits>: Change type.
6183         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6184         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6185         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6186         (convert_params_to_types, convert_params_to_expression): Change
6187         type of "params".
6188         (ast_string): Change type of "fields".
6189         (rust_parse): Make a rust_parser.  Remove cleanups.
6190         (rust_lex_tests): Make and install an auto_obstack.
6191
6192 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6193
6194         * configure.srv (ipa_x32_linux_regobj): New.
6195         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6196         instead of X86_TDESC_AVX512.
6197         (initialize_low_tracepoint): Call
6198         init_registers_x32_avx_avx512_linux.
6199
6200 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6201
6202         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6203
6204 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6205
6206         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6207
6208 2017-08-03  Tom Tromey  <tom@tromey.com>
6209
6210         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6211         Remove.
6212         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6213
6214 2017-08-03  Tom Tromey  <tom@tromey.com>
6215
6216         * python/py-param.c (compute_enum_values): Use gdb_argv.
6217
6218 2017-08-03  Tom Tromey  <tom@tromey.com>
6219
6220         * utils.h (struct gdb_argv_deleter): New.
6221         (gdb_argv): New class.
6222         * utils.c (gdb_argv::reset): New method.
6223         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6224         * tracefile.c (tsave_command): Use gdb_argv.
6225         * top.c (new_ui_command): Use gdb_argv.
6226         * symmisc.c (maintenance_print_symbols)
6227         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6228         * symfile.c (symbol_file_command, generic_load)
6229         (remove_symbol_file_command): Use gdb_argv.
6230         * stack.c (backtrace_command): Use gdb_argv.
6231         * source.c (add_path, show_substitute_path_command)
6232         (unset_substitute_path_command, set_substitute_path_command):
6233         Use gdb_argv.
6234         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6235         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6236         * remote.c (extended_remote_run, remote_put_command)
6237         (remote_get_command, remote_delete_command): Use gdb_argv.
6238         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6239         (gdbsim_open): Use gdb_argv.
6240         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6241         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6242         * procfs.c (procfs_info_proc): Use gdb_argv.
6243         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6244         * infrun.c (handle_command): Use gdb_argv.
6245         * inferior.c (add_inferior_command, clone_inferior_command):
6246         Use gdb_argv.
6247         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6248         * exec.c (exec_file_command): Use gdb_argv.
6249         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6250         * compile/compile.c (build_argc_argv): Use gdb_argv.
6251
6252 2017-08-03  Tom Tromey  <tom@tromey.com>
6253
6254         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6255
6256 2017-08-03  Tom Tromey  <tom@tromey.com>
6257
6258         * python/python.c (compute_python_string): Return std::string.
6259         (gdbpy_eval_from_control_command): Update.
6260         (do_start_initialization): Use std::string.
6261         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6262         xstrprintf.
6263         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6264         xstrprintf.
6265
6266 2017-08-03  Tom Tromey  <tom@tromey.com>
6267
6268         * top.h (do_restore_instream_cleanup): Remove.
6269         * top.c (do_restore_instream_cleanup): Remove.
6270         (read_command_file): Use scoped_restore.
6271         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6272
6273 2017-08-03  Tom Tromey  <tom@tromey.com>
6274
6275         * cli/cli-script.c (execute_user_command)
6276         (execute_control_command): Use scoped_restore.
6277
6278 2017-08-03  Tom Tromey  <tom@tromey.com>
6279
6280         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6281         (execute_user_command): Remove user_call_depth; use
6282         user_args_stack's size instead.
6283
6284 2017-08-03  Tom Tromey  <tom@tromey.com>
6285
6286         * top.h (in_user_command): Remove.
6287         * top.c (in_user_command): Remove.
6288         * cli/cli-script.c (do_restore_user_call_depth)
6289         (execute_user_command): Update.
6290
6291 2017-08-03  Tom Tromey  <tom@tromey.com>
6292
6293         * valops.c (search_struct_method): Use gdb::byte_vector.
6294         * valarith.c (value_concat): Use std::vector.
6295         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6296         (simple_search_memory): Likewise.
6297         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6298         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6299         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6300         * elfread.c (elf_rel_plt_read): Use std::string.
6301         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6302         * cli/cli-dump.c (restore_section_callback): Use
6303         gdb::byte_vector.
6304
6305 2017-08-03  Tom Tromey  <tom@tromey.com>
6306
6307         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6308
6309 2017-08-03  Tom Tromey  <tom@tromey.com>
6310
6311         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6312         (tui_register_format): Use scoped_restore.
6313
6314 2017-08-03  Tom Tromey  <tom@tromey.com>
6315
6316         * reverse.c (exec_direction_default): Remove.
6317         (exec_reverse_once): Use scoped_restore.
6318         * remote.c (restore_remote_timeout): Remove.
6319         (remote_flash_erase, remote_flash_write, remote_flash_done)
6320         (readchar, remote_serial_write): Use scoped_restore.
6321         * cli/cli-script.c (struct source_cleanup_lines_args)
6322         (source_cleanup_lines): Remove.
6323         (script_from_file): Use scoped_restore.
6324         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6325         (source_command): Use scoped_restore.
6326
6327 2017-08-03  Tom Tromey  <tom@tromey.com>
6328
6329         * utils.h (make_cleanup_free_so): Remove.
6330         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6331         * solist.h (struct so_deleter): New.
6332         (so_list_up): New typedef.
6333         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6334
6335 2017-08-03  Tom Tromey  <tom@tromey.com>
6336
6337         * utils.h (make_cleanup_restore_current_language): Remove.
6338         * utils.c (do_restore_current_language)
6339         (make_cleanup_restore_current_language): Remove.
6340         * parse.c (parse_exp_in_context_1)
6341         (parse_expression_with_language): Use
6342         scoped_restore_current_language.
6343         * mi/mi-main.c (mi_cmd_execute): Use
6344         scoped_restore_current_language.
6345         * language.h (scoped_restore_current_language): New class.
6346
6347 2017-08-03  Tom Tromey  <tom@tromey.com>
6348
6349         * compile/compile.c (cleanup_unlink_file): Remove.
6350         (compile_to_object): Use gdb::unlinker.
6351         (eval_compile_command): Likewise.
6352
6353 2017-08-03  Tom Tromey  <tom@tromey.com>
6354
6355         * utils.h (make_cleanup_fclose): Remove.
6356         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6357
6358 2017-08-03  Tom Tromey  <tom@tromey.com>
6359
6360         * top.c (open_terminal_stream): Return gdb_file_up.
6361         (new_ui_command): Update.
6362
6363 2017-08-03  Tom Tromey  <tom@tromey.com>
6364
6365         * source.c (print_source_lines_base, forward_search_command)
6366         (reverse_search_command): Use gdb_file_up.
6367
6368 2017-08-03  Tom Tromey  <tom@tromey.com>
6369
6370         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6371
6372 2017-08-03  Tom Tromey  <tom@tromey.com>
6373
6374         * cli/cli-cmds.c (find_and_open_script): Change return type.
6375         Remove "streamp" and "full_path" parameters.
6376         (source_script_with_search): Update.
6377         * auto-load.c (source_script_file): Update.
6378         * cli/cli-cmds.h (find_and_open_script): Change type.
6379         (open_script): New struct.
6380
6381 2017-08-03  Tom Tromey  <tom@tromey.com>
6382
6383         * xml-support.c (xml_fetch_content_from_file): Update.
6384         * ui-file.c (stdio_file::open): Update.
6385         * tracefile-tfile.c (tfile_start): Update.
6386         * remote.c (remote_file_put, remote_file_get): Update.
6387         * nat/linux-procfs.c (linux_proc_get_int)
6388         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6389         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6390         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6391         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6392         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6393         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6394         * linux-nat.c (linux_proc_pending_signals): Update.
6395         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6396         (file_closer): Remove.
6397         * compile/compile.c (compile_to_object): Update.
6398         * common/filestuff.h (struct gdb_file_deleter): New.
6399         (gdb_file_up): New typedef.
6400         (gdb_fopen_cloexec): Change return type.
6401         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6402         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6403         (dump_binary_file, restore_binary_file): Update.
6404         * auto-load.c (auto_load_objfile_script_1): Update.
6405
6406 2017-08-03  Tom Tromey  <tom@tromey.com>
6407
6408         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6409         (info_static_tracepoint_markers_command): Likewise.
6410         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6411         * skip.c (skip_info): Use ui_out_emit_table.
6412         * progspace.c (print_program_space): Use ui_out_emit_table.
6413         * osdata.c (info_osdata): Use ui_out_emit_table.
6414         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6415         ui_out_emit_table.
6416         * linux-thread-db.c (info_auto_load_libthread_db): Use
6417         ui_out_emit_table.
6418         * inferior.c (print_inferior): Use ui_out_emit_table.
6419         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6420         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6421         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6422         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6423         * ui-out.h (class ui_out_emit_table): New.
6424
6425 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6426
6427         * mips-tdep.c (mips_fpu_type_str): New function.
6428         (mips_dump_tdep): Call it.
6429
6430 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6431
6432         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6433         `->mips_fpu_type'.
6434
6435 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6436
6437         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6438
6439 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6440
6441         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6442
6443 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6444
6445         * cli/cli-cmds.c (maintenancechecklist): New variable.
6446         * gdbcmd.h (maintenancechecklist): Declare it.
6447         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6448         Call i386_linux_read_description with different masks.
6449         * maint.c (maintenance_check_command): New function.
6450         (_initialize_maint_cmds): Call add_prefix_cmd.
6451         * target-descriptions.c (tdesc_reg): override operator != and ==.
6452         (tdesc_type): Likewise.
6453         (tdesc_feature): Likewise.
6454         (target_desc): Likewise.
6455         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6456         (maintenance_check_xml_descriptions): New function.
6457         (_initialize_target_descriptions) Add command "xml-descriptions".
6458         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6459
6460 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6461
6462         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6463         Include features/i386/32bit-*.c.
6464         (i386_linux_read_description): Generate target description if it
6465         doesn't exist.
6466         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6467         functions.
6468         * features/i386/32bit-linux.c: Re-generated.
6469         * features/i386/32bit-sse.c: Likewise.
6470         * target-descriptions.c (print_c_feature::visit): Print code to
6471         set register number if needed.
6472         (print_c_feature) <m_next_regnum>: New field.
6473
6474 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6475
6476         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6477         (FEATURE_XMLFILES): New.
6478         (FEATURE_CFILES): New.
6479         New rules.
6480         (clean-cfiles): Remove generated c files.
6481         * features/i386/32bit-avx.c: Generated.
6482         * features/i386/32bit-avx512.c: Generated.
6483         * features/i386/32bit-core.c: Generated.
6484         * features/i386/32bit-linux.c: Generated.
6485         * features/i386/32bit-mpx.c: Generated.
6486         * features/i386/32bit-pkeys.c: Generated.
6487         * features/i386/32bit-sse.c: Generated.
6488         * target-descriptions.c: Include algorithm.
6489         (tdesc_element_visitor): Add method visit_end.
6490         (print_c_tdesc): Implement visit_end.
6491         (print_c_tdesc:: m_filename_after_features): Move it to
6492         protected.
6493         (print_c_feature): New class.
6494         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6495         name starts with "i386/32bit-".
6496
6497 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6498
6499         * target-descriptions.c (tdesc_element_visitor): New class.
6500         (tdesc_element): New class.
6501         (tdesc_reg): Inherit from tdesc_element.
6502         (tdesc_reg::accept): New function.
6503         (tdesc_type): Inherit from tdesc_element.
6504         (tdesc_type::accept): New function.
6505         (tdesc_feature): Inherit from tdesc_element.
6506         (tdesc_feature::accept): New function.
6507         (target_desc): Inherit from tdesc_element.
6508         (target_desc::target_desc): New.
6509         (target_desc::~target_desc): New.
6510         (target_desc::accept): New.
6511         (allocate_target_description): Use new.
6512         (free_target_description): Use delete.
6513         (print_c_tdesc): New class.
6514         (maint_print_c_tdesc_cmd): Adjust.
6515
6516         * features/aarch64.c: Re-generated.
6517         * features/arc-arcompact.c: Re-generated.
6518         * features/arc-v2.c: Re-generated.
6519         * features/arm/arm-with-iwmmxt.c: Re-generated.
6520         * features/arm/arm-with-m.c: Re-generated.
6521         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6522         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6523         * features/arm/arm-with-neon.c: Re-generated.
6524         * features/arm/arm-with-vfpv2.c: Re-generated.
6525         * features/arm/arm-with-vfpv3.c: Re-generated.
6526         * features/i386/amd64-avx-avx512.c: Re-generated.
6527         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6528         * features/i386/amd64-avx.c: Re-generated.
6529         * features/i386/amd64-avx-linux.c: Re-generated.
6530         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6531         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6532         * features/i386/amd64-avx-mpx.c: Re-generated.
6533         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6534         * features/i386/amd64.c: Re-generated.
6535         * features/i386/amd64-linux.c: Re-generated.
6536         * features/i386/amd64-mpx.c: Re-generated.
6537         * features/i386/amd64-mpx-linux.c: Re-generated.
6538         * features/i386/i386-avx-avx512.c: Re-generated.
6539         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6540         * features/i386/i386-avx.c: Re-generated.
6541         * features/i386/i386-avx-linux.c: Re-generated.
6542         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6543         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6544         * features/i386/i386-avx-mpx.c: Re-generated.
6545         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6546         * features/i386/i386.c: Re-generated.
6547         * features/i386/i386-linux.c: Re-generated.
6548         * features/i386/i386-mmx.c: Re-generated.
6549         * features/i386/i386-mmx-linux.c: Re-generated.
6550         * features/i386/i386-mpx.c: Re-generated.
6551         * features/i386/i386-mpx-linux.c: Re-generated.
6552         * features/i386/x32-avx-avx512.c: Re-generated.
6553         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6554         * features/i386/x32-avx.c: Re-generated.
6555         * features/i386/x32-avx-linux.c: Re-generated.
6556         * features/i386/x32.c: Re-generated.
6557         * features/i386/x32-linux.c: Re-generated.
6558         * features/microblaze.c: Re-generated.
6559         * features/microblaze-with-stack-protect.c: Re-generated.
6560         * features/mips64-dsp-linux.c: Re-generated.
6561         * features/mips64-linux.c: Re-generated.
6562         * features/mips-dsp-linux.c: Re-generated.
6563         * features/mips-linux.c: Re-generated.
6564         * features/nds32.c: Re-generated.
6565         * features/nios2.c: Re-generated.
6566         * features/nios2-linux.c: Re-generated.
6567         * features/rs6000/powerpc-32.c: Re-generated.
6568         * features/rs6000/powerpc-32l.c: Re-generated.
6569         * features/rs6000/powerpc-403.c: Re-generated.
6570         * features/rs6000/powerpc-403gc.c : Re-generated.
6571         * features/rs6000/powerpc-405.c: Re-generated.
6572         * features/rs6000/powerpc-505.c: Re-generated.
6573         * features/rs6000/powerpc-601.c: Re-generated.
6574         * features/rs6000/powerpc-602.c: Re-generated.
6575         * features/rs6000/powerpc-603.c: Re-generated.
6576         * features/rs6000/powerpc-604.c: Re-generated.
6577         * features/rs6000/powerpc-64.c: Re-generated.
6578         * features/rs6000/powerpc-64l.c: Re-generated.
6579         * features/rs6000/powerpc-7400.c: Re-generated.
6580         * features/rs6000/powerpc-750.c: Re-generated.
6581         * features/rs6000/powerpc-860.c: Re-generated.
6582         * features/rs6000/powerpc-altivec32.c: Re-generated.
6583         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6584         * features/rs6000/powerpc-altivec64.c: Re-generated.
6585         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6586         * features/rs6000/powerpc-cell32l.c: Re-generated.
6587         * features/rs6000/powerpc-cell64l.c: Re-generated.
6588         * features/rs6000/powerpc-e500.c: Re-generated.
6589         * features/rs6000/powerpc-e500l.c: Re-generated.
6590         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6591         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6592         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6593         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6594         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6595         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6596         * features/rs6000/powerpc-vsx32.c: Re-generated.
6597         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6598         * features/rs6000/powerpc-vsx64.c: Re-generated.
6599         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6600         * features/rs6000/rs6000.c: Re-generated.
6601         * features/s390-linux32.c: Re-generated.
6602         * features/s390-linux32v1.c: Re-generated.
6603         * features/s390-linux32v2.c: Re-generated.
6604         * features/s390-linux64.c: Re-generated.
6605         * features/s390-linux64v1.c: Re-generated.
6606         * features/s390-linux64v2.c: Re-generated.
6607         * features/s390-te-linux64.c: Re-generated.
6608         * features/s390-tevx-linux64.c: Re-generated.
6609         * features/s390-vx-linux64.c: Re-generated.
6610         * features/s390x-linux64.c: Re-generated.
6611         * features/s390x-linux64v1.c: Re-generated.
6612         * features/s390x-linux64v2.c: Re-generated.
6613         * features/s390x-te-linux64.c: Re-generated.
6614         * features/s390x-tevx-linux64.c: Re-generated.
6615         * features/s390x-vx-linux64.c: Re-generated.
6616         * features/sparc/sparc32-solaris.c: Re-generated.
6617         * features/sparc/sparc64-solaris.c: Re-generated.
6618         * features/tic6x-c62x.c: Re-generated.
6619         * features/tic6x-c62x-linux.c: Re-generated.
6620         * features/tic6x-c64x.c: Re-generated.
6621         * features/tic6x-c64x-linux.c: Re-generated.
6622         * features/tic6x-c64xp.c: Re-generated.
6623         * features/tic6x-c64xp-linux.c: Re-generated.
6624
6625 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6626
6627         * i386-linux-tdep.c (i386_linux_read_description): New function.
6628         (i386_linux_core_read_description): Call
6629         i386_linux_read_description.
6630         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6631         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6632         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6633         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6634         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6635         * x86-linux-nat.c (x86_linux_read_description): Call
6636         i386_linux_read_description.
6637
6638 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6639
6640         * NEWS: Mention it.
6641         * features/Makefile (%.c: %.xml): Pass the xml file name to
6642         command "maint print c-tdesc".
6643         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6644         name from 'arg'.
6645
6646 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6647
6648         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6649         in-class initialization.
6650         (tdesc_create_feature): Call new instead of XCNEW.
6651         (free_target_description): Ue delete.
6652
6653 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6654
6655         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6656
6657 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6658
6659         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6660         constant.
6661         (amd64_x32_init_abi): Likewise.
6662         * amd64-tdep.h (amd64_init_abi): Update declaration.
6663         (amd64_x32_init_abi): Likewise.
6664
6665 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6666
6667         PR tdep/21717
6668         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6669         condition for FPSCR.
6670         (arm_linux_store_inferior_registers): Likewise.
6671
6672 2017-07-22  Tom Tromey  <tom@tromey.com>
6673
6674         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6675         <syscalls_counts>: Now a std::vector.
6676         (get_catch_syscall_inferior_data): Use "new".
6677         (catch_syscall_inferior_data_cleanup): Use "delete".
6678         (insert_catch_syscall, remove_catch_syscall)
6679         (clear_syscall_counts): Update.
6680
6681 2017-07-22  Tom Tromey  <tom@tromey.com>
6682
6683         * break-catch-syscall.c (syscall_catchpoint)
6684         <syscalls_to_be_caught>: Now a std::vector<int>
6685         (~syscall_catchpoint): Remove.
6686         (insert_catch_syscall, remove_catch_syscall)
6687         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6688         (print_mention_catch_syscall, print_recreate_catch_syscall):
6689         Update.
6690         (create_syscall_event_catchpoint): Change type of "filter"
6691         parameter.
6692         (catch_syscall_split_args): Return a std::vector.
6693         (catch_syscall_command_1, catching_syscall_number_1): Update.
6694
6695 2017-07-22  Tom Tromey  <tom@tromey.com>
6696
6697         * break-catch-throw.c (struct exception_catchpoint)
6698         <exception_rx>: Now a std::string.
6699         (~exception_catchpoint): Remove.
6700         (print_one_detail_exception_catchpoint): Update.
6701         (handle_gnu_v3_exceptions): Change type of except_rx.
6702         (extract_exception_regexp): Return a std::string.
6703         (catch_exception_command_1): Update.
6704
6705 2017-07-22  Tom Tromey  <tom@tromey.com>
6706
6707         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6708         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6709         std::vector.
6710         <catch_all>: Now a bool.
6711         (~signal_catchpoint): Remove.
6712         (signal_catchpoint_insert_location)
6713         (signal_catchpoint_remove_location)
6714         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6715         (signal_catchpoint_print_mention)
6716         (signal_catchpoint_print_recreate)
6717         (signal_catchpoint_explains_signal): Update.
6718         (create_signal_catchpoint): Change type of "filter" and
6719         "catch_all".
6720         (catch_signal_split_args): Return a std::vector.  Change type of
6721         "catch_all".
6722         (catch_signal_command): Update.
6723
6724 2017-07-20  Pedro Alves  <palves@redhat.com>
6725
6726         * ada-lang.c (ada_language_defn): Make extern.
6727         (_initialize_ada_language): Remove add_language call.
6728         * c-lang.c (c_language_defn, cplus_language_defn)
6729         (asm_language_defn, minimal_language_defn): Make extern.
6730         (_initialize_c_language): Delete.
6731         * completer.c (compare_cstrings): Delete, moved to utils.h.
6732         * d-lang.c (d_language_defn): Make extern.
6733         (_initialize_d_language): Remove add_language calls.
6734         * defs.h (enum language): Add comment.
6735         * f-lang.c (f_language_defn): Make extern.
6736         (_initialize_f_language): Remove add_language call.
6737         * go-lang.c (go_language_defn): Make extern.
6738         (_initialize_go_language): Remove add_language call.
6739         * language.c: Include <algorithm>.
6740         (languages): Redefine as const array.
6741         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6742         (set_language_command): Handle "local".  Use for-range loop.
6743         (set_language): Remove loop.
6744         (language_enum): Rewrite.
6745         (language_def, language_str): Remove loops.
6746         (add_language): Delete.
6747         (add_set_language_command): New, based on add_languages.
6748         (skip_language_trampoline): Adjust.
6749         (local_language_defn): Delete.
6750         (language_gdbarch_post_init): Adjust.
6751         (_initialize_language): Remove add_language calls.  Call
6752         add_set_language_command.
6753         * language.h (add_language): Delete.
6754         (auto_language_defn)
6755         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6756         (asm_language_defn, c_language_defn, cplus_language_defn)
6757         (d_language_defn, f_language_defn, go_language_defn)
6758         (m2_language_defn, objc_language_defn, opencl_language_defn)
6759         (pascal_language_defn, rust_language_defn): Declare.
6760         * m2-lang.c (m2_language_defn): Make extern.
6761         (_initialize_m2_language): Remove add_language call.
6762         * objc-lang.c (objc_language_defn): Make extern.
6763         (_initialize_objc_language): Remove add_language call.
6764         * opencl-lang.c (opencl_language_defn): Make extern.
6765         (_initialize_opencl_language): Remove add_language call.
6766         * p-lang.c (pascal_language_defn): Make extern.
6767         (_initialize_pascal_language): Delete.
6768         * rust-lang.c (rust_language_defn): Make extern.
6769         (_initialize_rust_language): Delete.
6770         * utils.h (compare_cstrings): New static inline function.
6771
6772 2017-07-20  Pedro Alves  <palves@redhat.com>
6773
6774         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6775         (get_var_value): Constify parameters.
6776         (get_int_var_value): Change prototype.
6777         (to_fixed_range_type): Adjust.
6778         * ada-lang.h (get_int_var_value): Change prototype.
6779
6780 2017-07-20  Pedro Alves  <palves@redhat.com>
6781
6782         * dwarf2read.c (dw2_lookup_symbol): Use
6783         SYMBOL_MATCHES_SEARCH_NAME.
6784         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6785
6786 2017-07-20  Pedro Alves  <palves@redhat.com>
6787
6788         * block.c (block_iter_name_step, block_iter_name_first)
6789         (block_iter_name_next): Delete.
6790         (block_lookup_symbol_primary): Adjust to use
6791         dict_iter_match_first/dict_iter_match_next.
6792         * block.h (block_iter_name_first, block_iter_name_next): Delete
6793         declarations.
6794         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6795         dict_iter_match_first/dict_iter_match_next.
6796
6797 2017-07-20  Pedro Alves  <palves@redhat.com>
6798
6799         * cp-support.c (cp_find_first_component_aux): Add missing case for
6800         end of string.
6801
6802 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6803
6804         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6805         of dwo_cu's dwo_file.
6806
6807 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6808
6809         * remote.c (store_registers_using_G): Remove one line comment.
6810
6811 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6812
6813         * regcache.c (regcache_cpy): Simplify it.
6814         (regcache::cpy_no_passthrough): Remove it.
6815         * regcache.h (cpy_no_passthrough): Remove it.
6816         (regcache_dup, regcache_cpy): Update comments.
6817
6818 2017-07-18  Pedro Alves  <palves@redhat.com>
6819
6820         * remote-sim.c (sim_command_completer): Adjust to work with a
6821         completion_tracker instead of a VEC.
6822
6823 2017-07-17  Pedro Alves  <palves@redhat.com>
6824
6825         * completer.c (complete_source_filenames): New function.
6826         (complete_address_and_linespec_locations): New function.
6827         (location_completer): Use complete_address_and_linespec_locations.
6828         (completion_tracker::build_completion_result): Honor the tracker's
6829         request to suppress append.
6830         * completer.h (completion_tracker::suppress_append_ws)
6831         (completion_tracker::set_suppress_append_ws): New methods.
6832         (completion_tracker::m_suppress_append_ws): New field.
6833         (complete_source_filenames): New declaration.
6834         * linespec.c (linespec_complete_what): New.
6835         (struct ls_parser) <complete_what, completion_word,
6836         completion_quote_char, completion_quote_end, completion_tracker>:
6837         New fields.
6838         (string_find_incomplete_keyword_at_end): New.
6839         (linespec_lexer_lex_string): Record quote char.  If in completion
6840         mode, don't throw.
6841         (linespec_lexer_consume_token): Advance the completion word point.
6842         (linespec_lexer_peek_token): Save/restore completion info.
6843         (save_stream_and_consume_token): New.
6844         (set_completion_after_number): New.
6845         (linespec_parse_basic): Set what to complete next depending on
6846         token.  Handle function and label completions specially.
6847         (parse_linespec): Disable objc shortcut in completion mode.  Set
6848         what to complete next depending on token type.  Skip keyword if in
6849         completion mode.
6850         (complete_linespec_component, linespec_complete): New.
6851         * linespec.h (linespec_complete): Declare.
6852
6853 2017-07-17  Pedro Alves  <palves@redhat.com>
6854
6855         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6856         Handle 'operator<' / 'operator<<'.
6857
6858 2017-07-17  Pedro Alves  <palves@redhat.com>
6859
6860         * completer.c (collect_explicit_location_matches): Handle
6861         MATCH_LABEL.
6862         (convert_explicit_location_to_linespec): New, factored out from
6863         ...
6864         (convert_explicit_location_to_sals): ... this.
6865         (complete_label): New.
6866         (linespec_complete_label, find_label_symbols_in_block): New.
6867         (find_label_symbols): Add completion_mode parameter and adjust to
6868         call find_label_symbols_in_block.
6869         * linespec.h (linespec_complete_label): Declare.
6870
6871 2017-07-17  Pedro Alves  <palves@redhat.com>
6872
6873         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6874         complete_symbol_mode parameter.
6875         * cli/cli-cmds.c (complete_command): Get the completion result out
6876         of the handle_brkchars tracker if used a custom word point.
6877         * completer.c: Include "linespec.h".
6878         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6879         (advance_to_expression_complete_word_point): New.
6880         (completion_tracker::completes_to_completion_word): New.
6881         (complete_files_symbols): Pass down
6882         complete_symbol_mode::EXPRESSION.
6883         (explicit_options, probe_options): New.
6884         (collect_explicit_location_matches): Complete on the
6885         explictit_loc->foo instead of word.  Use
6886         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6887         keyword and options completions.
6888         (backup_text_ptr): Delete.
6889         (skip_keyword): New.
6890         (complete_explicit_location): Remove 'word' parameter.  Add
6891         language, quoted_arg_start and quoted_arg_end parameters.
6892         Rewrite, parsing left to right.
6893         (location_completer): Rewrite.
6894         (location_completer_handle_brkchars): New function.
6895         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6896         (enum complete_line_internal_reason): Adjust comments.
6897         (completion_tracker::discard_completions): New.
6898         (completer_handle_brkchars_func_for_completer): Handle
6899         location_completer.
6900         (gdb_custom_word_point_brkchars)
6901         (gdb_org_rl_basic_quote_characters): New.
6902         (gdb_completion_word_break_characters_throw)
6903         (completion_find_completion_word): Handle trackers that use a
6904         custom word point.
6905         (completion_tracker::advance_custom_word_point_by): New.
6906         (completion_tracker::build_completion_result): Don't rely on
6907         readline appending the quote char.
6908         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6909         use a custom word point.
6910         (gdb_rl_attempted_completion_function): Restore
6911         rl_basic_quote_characters.
6912         * completer.h (class completion_tracker): Extend intro comment.
6913         (completion_tracker::set_quote_char)
6914         (completion_tracker::quote_char)
6915         (completion_tracker::set_use_custom_word_point)
6916         (completion_tracker::use_custom_word_point)
6917         (completion_tracker::custom_word_point)
6918         (completion_tracker::set_custom_word_point)
6919         (completion_tracker::advance_custom_word_point_by)
6920         (completion_tracker::completes_to_completion_word)
6921         (completion_tracker::discard_completions): New methods.
6922         (completion_tracker::m_quote_char)
6923         (completion_tracker::m_use_custom_word_point)
6924         (completion_tracker::m_custom_word_point): New fields.
6925         (advance_to_expression_complete_word_point): Declare.
6926         * f-lang.c (f_collect_symbol_completion_matches): Add
6927         complete_symbol_mode parameter.
6928         * language.h (struct language_defn)
6929         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6930         parameter.
6931         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6932         (linespec_complete_function): New function.
6933         (linespec_lexer_lex_keyword): Adjust.
6934         * linespec.h (linespec_keywords, linespec_complete_function): New
6935         declarations.
6936         * location.c (find_end_quote): New function.
6937         (explicit_location_lex_one): Add explicit_completion_info
6938         parameter.  Save quoting info.  Don't throw if being called for
6939         completion.  Don't handle Ada operators here.
6940         (is_cp_operator, skip_op_false_positives, first_of)
6941         (explicit_location_lex_one_function): New function.
6942         (string_to_explicit_location): Replace 'dont_throw' parameter with
6943         an explicit_completion_info pointer parameter.  Handle it.  Don't
6944         use explicit_location_lex_one to lex function names.  Use
6945         explicit_location_lex_one_function instead.
6946         * location.h (struct explicit_completion_info): New.
6947         (string_to_explicit_location): Replace 'dont_throw' parameter with
6948         an explicit_completion_info pointer parameter.
6949         * symtab.c (default_collect_symbol_completion_matches_break_on):
6950         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6951         (default_collect_symbol_completion_matches)
6952         (collect_symbol_completion_matches): Add complete_symbol_mode
6953         parameter.
6954         (collect_symbol_completion_matches_type): Pass down
6955         complete_symbol_mode::EXPRESSION.
6956         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6957         parameter.  Handle LINESPEC mode.
6958         * symtab.h (complete_symbol_mode): New.
6959         (default_collect_symbol_completion_matches_break_on)
6960         (default_collect_symbol_completion_matches)
6961         (collect_symbol_completion_matches)
6962         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6963         parameter.
6964
6965 2017-07-17  Pedro Alves  <palves@redhat.com>
6966
6967         * utils.c (enum class strncmp_iw_mode): New.
6968         (strcmp_iw): Rename to ...
6969         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6970         parameters.  Handle them.
6971         (strncmp_iw): New.
6972         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6973         * utils.h (strncmp_iw): Declare.
6974         (strcmp_iw): Move describing comments here.
6975
6976 2017-07-17  Pedro Alves  <palves@redhat.com>
6977
6978         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6979         CP_OPERATOR_STR.
6980         * c-typeprint.c (is_type_conversion_operator): Use
6981         CP_OPERATOR_STR.
6982         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6983         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6984         CP_OPERATOR_LEN.
6985         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6986         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6987         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6988         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6989         CP_OPERATOR_STR.
6990         * location.c: Include "cp-support.h".
6991         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6992         CP_OPERATOR_STR.
6993         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6994         CP_OPERATOR_LEN.
6995
6996 2017-07-17  Pedro Alves  <palves@redhat.com>
6997
6998         * cli/cli-cmds.c (complete_command): Use a completion tracker
6999         along with completion_find_completion_word for handle_brkchars
7000         phase.
7001         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7002         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7003         (struct gdb_rl_completion_word_info): New.
7004         (gdb_rl_find_completion_word): New.
7005         (completion_find_completion_word): New.
7006         * completer.h (completion_find_completion_word): Declare.
7007
7008 2017-07-17  Pedro Alves  <palves@redhat.com>
7009
7010         * ada-lang.c (symbol_completion_match): Adjust comments.
7011         (symbol_completion_add): Replace vector parameter with
7012         completion_tracker parameter.  Use it.
7013         (ada_make_symbol_completion_list): Rename to...
7014         (ada_collect_symbol_completion_matches): ... this.  Add
7015         completion_tracker parameter and use it.
7016         (ada_language_defn): Adjust.
7017         * break-catch-syscall.c (catch_syscall_completer): Adjust
7018         prototype and work with completion_tracker instead of VEC.
7019         * breakpoint.c (condition_completer): Adjust prototype and work
7020         with completion_tracker instead of VEC.
7021         * c-lang.c (c_language_defn, cplus_language_defn)
7022         (asm_language_defn, minimal_language_defn): Adjust to renames.
7023         * cli/cli-cmds.c (complete_command): Rework using
7024         completion_tracker.  Catch exceptions when completing.
7025         * cli/cli-decode.c (integer_unlimited_completer)
7026         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7027         with completion_tracker instead of VEC.
7028         * command.h (struct completion_tracker): Forward declare.
7029         (completer_ftype, completer_handle_brkchars_ftype): Change
7030         types.
7031         (complete_on_cmdlist, complete_on_enum): Adjust.
7032         * completer.c: Include <algorithm>.
7033         (struct gdb_completer_state): New.
7034         (current_completion): New global.
7035         (readline_line_completion_function): Delete.
7036         (noop_completer, filename_completer)
7037         (filename_completer_handle_brkchars, complete_files_symbols)
7038         (linespec_location_completer): Adjust to work with a
7039         completion_tracker instead of a VEC.
7040         (string_or_empty): New.
7041         (collect_explicit_location_matches): Adjust to work with a
7042         completion_tracker instead of a VEC.
7043         (explicit_location_completer): Rename to ...
7044         (complete_explicit_location): ... this and adjust to work with a
7045         completion_tracker instead of a VEC.
7046         (location_completer): Adjust to work with a completion_tracker
7047         instead of a VEC.
7048         (add_struct_fields): Adjust to work with a completion_list instead
7049         of VEC.
7050         (expression_completer): Rename to ...
7051         (complete_expression): ... this and adjust to work with a
7052         completion_tracker instead of a VEC.  Use complete_files_symbols.
7053         (expression_completer): Reimplement on top of complete_expression.
7054         (symbol_completer): Adjust to work with a completion_tracker
7055         instead of a VEC.
7056         (enum complete_line_internal_reason): Add describing comments.
7057         (complete_line_internal_normal_command): Adjust to work with a
7058         completion_tracker instead of a VEC.
7059         (complete_line_internal): Rename to ...
7060         (complete_line_internal_1): ... this and adjust to work with a
7061         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7062         handle_brkchars phase.
7063         (new_completion_tracker): Delete.
7064         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7065         complete_line_internal_1.
7066         (free_completion_tracker): Delete.
7067         (INITIAL_COMPLETION_HTAB_SIZE): New.
7068         (completion_tracker::completion_tracker)
7069         (completion_tracker::~completion_tracker): New.
7070         (maybe_add_completion): Delete.
7071         (completion_tracker::maybe_add_completion)
7072         (completion_tracker::add_completion)
7073         (completion_tracker::add_completions): New.
7074         (throw_max_completions_reached_error): Delete.
7075         (complete_line): Adjust to work with a completion_tracker instead
7076         of a VEC.  Don't create a completion_tracker_t or check for max
7077         completions here.
7078         (command_completer, command_completer_handle_brkchars)
7079         (signal_completer, reg_or_group_completer_1)
7080         (reg_or_group_completer, default_completer_handle_brkchars):
7081         Adjust to work with a completion_tracker.
7082         (gdb_completion_word_break_characters_throw): New.
7083         (gdb_completion_word_break_characters): Reimplement.
7084         (line_completion_function): Delete.
7085         (completion_tracker::recompute_lowest_common_denominator)
7086         (expand_preserving_ws)
7087         (completion_tracker::build_completion_result)
7088         (completion_result::completion_result)
7089         (completion_result::completion_result)
7090         (completion_result::~completion_result)
7091         (completion_result::completion_result)
7092         (completion_result::release_match_list, compare_cstrings)
7093         (completion_result::sort_match_list)
7094         (completion_result::reset_match_list)
7095         (gdb_rl_attempted_completion_function_throw)
7096         (gdb_rl_attempted_completion_function): New.
7097         * completer.h (completion_list, struct completion_result)
7098         (class completion_tracker): New.
7099         (complete_line): Add completion_tracker parameter.
7100         (readline_line_completion_function): Delete.
7101         (gdb_rl_attempted_completion_function): New.
7102         (noop_completer, filename_completer, expression_completer)
7103         (location_completer, symbol_completer, command_completer)
7104         (signal_completer, reg_or_group_completer): Update prototypes.
7105         (completion_tracker_t, new_completion_tracker)
7106         (make_cleanup_free_completion_tracker): Delete.
7107         (enum maybe_add_completion_enum): Delete.
7108         (maybe_add_completion): Delete.
7109         (throw_max_completions_reached_error): Delete.
7110         * corefile.c (complete_set_gnutarget): Adjust to work with a
7111         completion_tracker instead of a VEC.
7112         * cp-abi.c (cp_abi_completer): Adjust to work with a
7113         completion_tracker instead of a VEC.
7114         * d-lang.c (d_language_defn): Adjust.
7115         * disasm.c (disassembler_options_completer): Adjust to work with a
7116         completion_tracker instead of a VEC.
7117         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7118         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7119         with a completion_tracker instead of a VEC.
7120         (f_language_defn): Adjust.
7121         * go-lang.c (go_language_defn): Adjust.
7122         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7123         Adjust to work with a completion_tracker instead of a VEC.
7124         * infrun.c (handle_completer): Likewise.
7125         * interps.c (interpreter_completer): Likewise.
7126         * interps.h (interpreter_completer): Likewise.
7127         * language.c (unknown_language_defn, auto_language_defn)
7128         (local_language_defn): Adjust.
7129         * language.h (language_defn::la_make_symbol_completion_list):
7130         Rename to ...
7131         (language_defn::la_collect_symbol_completion_matches): ... this
7132         and adjust to work with a completion_tracker instead of a VEC.
7133         * m2-lang.c (m2_language_defn): Adjust.
7134         * objc-lang.c (objc_language_defn): Adjust.
7135         * opencl-lang.c (opencl_language_defn): Adjust.
7136         * p-lang.c (pascal_language_defn): Adjust.
7137         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7138         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7139         with a completion_tracker.
7140         * rust-lang.c (rust_language_defn): Adjust.
7141         * symtab.c (free_completion_list, do_free_completion_list)
7142         (return_val, completion_tracker): Delete.
7143         (completion_list_add_name, completion_list_add_symbol)
7144         (completion_list_add_msymbol, completion_list_objc_symbol)
7145         (completion_list_add_fields, add_symtab_completions): Add
7146         completion_tracker parameter and use it.
7147         (default_make_symbol_completion_list_break_on_1): Rename to...
7148         (default_collect_symbol_completion_matches_break_on): ... this.
7149         Add completion_tracker parameter and use it instead of allocating
7150         a completion tracker here.
7151         (default_make_symbol_completion_list_break_on): Delete old
7152         implementation.
7153         (default_make_symbol_completion_list): Delete.
7154         (default_collect_symbol_completion_matches): New.
7155         (make_symbol_completion_list): Delete.
7156         (collect_symbol_completion_matches): New.
7157         (make_symbol_completion_type): Rename to ...
7158         (collect_symbol_completion_matches_type): ... this.  Add
7159         completion_tracker parameter and use it instead of VEC.
7160         (make_file_symbol_completion_list_1): Rename to...
7161         (collect_file_symbol_completion_matches): ... this.  Add
7162         completion_tracker parameter and use it instead of VEC.
7163         (make_file_symbol_completion_list): Delete.
7164         (add_filename_to_list): Use completion_list instead of a VEC.
7165         (add_partial_filename_data::list): Now a completion_list.
7166         (make_source_files_completion_list): Work with a completion_list
7167         instead of a VEC.
7168         * symtab.h: Include "completer.h".
7169         (default_make_symbol_completion_list_break_on)
7170         (default_make_symbol_completion_list, make_symbol_completion_list)
7171         (make_symbol_completion_type, make_file_symbol_completion_list)
7172         (make_source_files_completion_list): Delete.
7173         (default_collect_symbol_completion_matches_break_on)
7174         (default_collect_symbol_completion_matches)
7175         (collect_symbol_completion_matches)
7176         (collect_symbol_completion_matches_type)
7177         (collect_file_symbol_completion_matches)
7178         (make_source_files_completion_list): New.
7179         * top.c (init_main): Don't install a rl_completion_entry_function
7180         hook.  Install a rl_attempted_completion_function hook instead.
7181         * tui/tui-layout.c (layout_completer): Adjust to work with a
7182         completion_tracker.
7183         * tui/tui-regs.c (tui_reggroup_completer):
7184         * tui/tui-win.c (window_name_completer, focus_completer)
7185         (winheight_completer): Adjust to work with a completion_tracker.
7186         * value.c: Include "completer.h".
7187         (complete_internalvar): Adjust to work with a completion_tracker.
7188         * value.h (complete_internalvar): Likewise.
7189
7190 2017-07-17  Pedro Alves  <palves@redhat.com>
7191
7192         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7193         renames.
7194         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7195         comments to completer_ftype's declaration.
7196         <completer_handle_brkchars>: Change type to
7197         completer_handle_brkchars_ftype.
7198         * command.h (completer_ftype): Add describing comment and give
7199         names to parameters.
7200         (completer_ftype_void): Rename to ...
7201         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7202         (set_cmd_completer_handle_brkchars): Adjust.
7203         * completer.c (filename_completer_handle_brkchars): New function.
7204         (complete_line_internal_normal_command): New function, factored
7205         out from ...
7206         (complete_line_internal): ... here.
7207         (command_completer_handle_brkchars)
7208         (default_completer_handle_brkchars)
7209         (completer_handle_brkchars_func_for_completer): New functions.
7210         * completer.h (set_gdb_completion_word_break_characters): Delete
7211         declaration.
7212         (completer_handle_brkchars_func_for_completer): New declaration.
7213         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7214         completer_handle_brkchars_func_for_completer.
7215
7216 2017-07-17  Pedro Alves  <palves@redhat.com>
7217
7218         * completer.c (symbol_completer): New function, based on
7219         make_symbol_completion_list_fn.
7220         * completer.h (symbol_completer): New declaration.
7221         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7222         * python/py-cmd.c (completers): Adjust.
7223         * symtab.c (make_symbol_completion_list_fn): Delete.
7224         * symtab.h (make_symbol_completion_list_fn): Delete.
7225         * cli/cli-decode.c (add_cmd): Adjust.
7226
7227 2017-07-17  Pedro Alves  <palves@redhat.com>
7228
7229         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7230         * dwarf2read.c: Include "filename-seen-cache.h".
7231         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7232         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7233         * filename-seen-cache.c: New file.
7234         * filename-seen-cache.h: New file.
7235         * symtab.c: Include "filename-seen-cache.h".
7236         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7237         (create_filename_seen_cache, clear_filename_seen_cache)
7238         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7239         to filename-seen-cache.h/filename-seen-cache.c.
7240         (output_source_filename, sources_info)
7241         (maybe_add_partial_symtab_filename)
7242         (make_source_files_completion_list): Adjust to use
7243         filename_seen_cache.
7244
7245 2017-07-17  Pedro Alves  <palves@redhat.com>
7246
7247         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7248         fields.
7249         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7250         dwarf2_debug_sections*)): New.
7251         (dwarf2_per_objfile::dwarf2_per_objfile(const
7252         dwarf2_per_objfile&)): Declare as deleted.
7253         (dwarf2_per_objfile::operator=): Declare as deleted.
7254         (dwarf2_per_objfile::dwarf2_per_objfile)
7255         (dwarf2_per_objfile::~dwarf2_per_objfile)
7256         (dwarf2_per_objfile::free_cached_comp_units): New.
7257         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7258         ctor.  Call dwarf2_per_objfile's ctor manually.
7259         (dwarf2_locate_sections): Deleted/refactored as ...
7260         (dwarf2_per_objfile::locate_sections): ... this new method.
7261         (free_cached_comp_units): Defer to
7262         dwarf2_per_objfile::free_cached_comp_units.
7263         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7264
7265 2017-07-14  Tom Tromey  <tom@tromey.com>
7266
7267         PR rust/21764:
7268         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7269         parameter.
7270         <UNOP_SIZEOF>: Split into separate case.
7271         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7272
7273 2017-07-14  Tom Tromey  <tom@tromey.com>
7274
7275         PR rust/21763:
7276         * symtab.c (symbol_matches_domain): Add language_rust to special
7277         case.
7278         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7279         treat LOC_TYPEDEF symbols as variables.
7280
7281 2017-07-14  Pedro Alves  <palves@redhat.com>
7282
7283         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7284         symtabs matching all symtabs with SRCFILE as file name instead of
7285         only considering the first hit, with lookup_symtab.
7286
7287 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7288
7289         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7290         operator_name parameters.
7291         (gen_expr): Update function call.
7292
7293 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7294
7295         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7296         parameter.
7297         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7298         Likewise.
7299         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7300         parameter, use agent_expr::gdbarch instead, update function
7301         calls.
7302         (locexpr_tracepoint_var_ref): Likewise.
7303         (loclist_tracepoint_var_ref): Likewise.
7304         * ax-gdb.c (gen_trace_static_fields): Likewise.
7305         (gen_traced_pop): Likewise.
7306         (gen_frame_args_address): Likewise.
7307         (gen_frame_locals_address): Likewise.
7308         (gen_var_ref): Likewise.
7309         (gen_struct_ref_recursive): Likewise.
7310         (gen_static_field): Likewise.
7311         (gen_maybe_namespace_elt): Likewise.
7312         (gen_expr): Likewise.
7313         (gen_trace_for_var): Likewise.
7314         (gen_trace_for_expr): Likewise.
7315         (gen_trace_for_return_address): Likewise.
7316
7317 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7318
7319         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7320         parameter.
7321         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7322
7323 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7324
7325         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7326         from ax, update calls.
7327         (gen_usual_arithmetic): Likewise.
7328         (gen_integral_promotions): Likewise.
7329         (gen_bitfield_ref): Likewise.
7330         (gen_primitive_field): Likewise.
7331         (gen_struct_ref_recursive): Likewise.
7332         (gen_struct_ref): Likewise.
7333         (gen_maybe_namespace_elt): Likewise.
7334         (gen_struct_elt_for_reference): Likewise.
7335         (gen_namespace_elt): Likewise.
7336         (gen_aggregate_elt_ref): Likewise.
7337         (gen_expr): Get gdbarch from ax, update calls.
7338         (gen_expr_binop_rest): Likewise.
7339
7340 2017-07-13  Pedro Alves  <palves@redhat.com>
7341
7342         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7343         as default tdesc.
7344         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7345         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7346         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7347         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7348         tdep.
7349         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7350         Get final tdesc from the tdep.
7351         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7352         default tdesc.
7353         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7354         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7355         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7356         Use it as default tdesc.
7357         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7358         down to amd_init_abi.  No longer handle fallback tdesc here.
7359         * amd64-tdep.h (tdesc_x32): Declare.
7360         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7361         parameter.
7362         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7363         as default tdesc.
7364
7365 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7366
7367         * s390-linux-tdep.c (s390_process_record): Add support for
7368         instructions new in arch12.
7369
7370 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7371
7372         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7373         PT_GETFSBASE and PT_GETGSBASE.
7374         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7375         PT_SETGSBASE.
7376
7377 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7378
7379         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7380         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7381         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7382         those rules.
7383         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7384         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7385         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7386         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7387         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7388         * features/i386/amd64.xml: Add 64bit-segments.xml.
7389         * features/i386/amd64-avx-avx512.c: Regenerated.
7390         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7391         * features/i386/amd64-avx-mpx.c: Regenerated.
7392         * features/i386/amd64-avx.c: Regenerated.
7393         * features/i386/amd64-mpx.c: Regenerated.
7394         * features/i386/amd64.c: Regenerated.
7395         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7396         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7397         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7398         * regformats/i386/amd64-avx.dat: Regenerated.
7399         * regformats/i386/amd64-mpx.dat: Regenerated.
7400         * regformats/i386/amd64.dat: Regenerated.
7401
7402 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7403
7404         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7405         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7406
7407 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7408
7409         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7410         unsetenv.
7411         * gnulib/aclocal.m4: Regenerate.
7412         * gnulib/config.in: Regenerate.
7413         * gnulib/configure: Regenerate.
7414         * gnulib/import/Makefile.am: Regenerate.
7415         * gnulib/import/Makefile.in: Regenerate.
7416         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7417         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7418         * gnulib/import/m4/environ.m4: New file.
7419         * gnulib/import/m4/setenv.m4: New file.
7420         * gnulib/import/setenv.c: New file.
7421         * gnulib/import/unsetenv.c: New file.
7422
7423 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7424
7425         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7426         address when op is DW_OP_addr.
7427
7428 2017-07-09  Tom Tromey  <tom@tromey.com>
7429
7430         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7431         check and apply to outer type.
7432
7433 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7434
7435         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7436         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7437         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7438         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7439
7440 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7441
7442         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7443
7444 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7445
7446         * corelow.c (get_core_siginfo): Remove.
7447         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7448         instead of get_core_siginfo.
7449         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7450         * gdbarch.h: Re-generate.
7451         * gdbarch.c: Re-generate.
7452         * linux-tdep.c (linux_core_xfer_siginfo): New.
7453         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7454
7455 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7456
7457         * corelow.c (thread_section_name): Move to ...
7458         * gdbcore.h (thread_section_name): ... here.
7459
7460 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7461
7462         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7463         (struct siginfo32): New.
7464         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7465         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7466         via ptrace(PT_LWPINFO).
7467
7468 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7469
7470         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7471         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7472         (fbsd_get_siginfo_type): New.
7473         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7474         (_initialize_fbsd_tdep): New.
7475
7476 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7477
7478         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7479         a singular dwo_unit*) to support multiple CUs in the same way that
7480         multiple TUs are supported.
7481         (create_cus_hash_table): Replace create_dwo_cu with a function for
7482         parsing multiple CUs from a DWO file.
7483         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7484         create_dwo_cu.
7485         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7486         htab_find, rather than comparing the signature to a singleton CU in
7487         the dwo_file.
7488
7489 2017-07-06  Pedro Alves  <palves@redhat.com>
7490
7491         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7492
7493 2017-07-04  Pedro Alves  <palves@redhat.com>
7494
7495         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7496         * gdbtypes.h (TYPE_STATIC): Delete.
7497         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7498         is_synchronized, is_native>: Delete.
7499         <dummy>: Bump.
7500         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7501         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7502         (TYPE_FN_FIELD_ABSTRACT): Delete.
7503
7504 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7505
7506         * buffer.h (buffer_finish): Fix spelling mistakes.
7507
7508 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7509
7510         * .dir-locals.el: Automatically switch to C-style comments in
7511         versions of Emacs that support the feature.
7512
7513 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7514             Pedro Alves  <palves@redhat.com>
7515
7516         PR cli/21688
7517         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7518         (process_next_line): New variable 'inline_cmd'.
7519         Adjust 'if' clauses for "python", "compile" and "guile" to use
7520         'command_name_equals' and check for '!inline_cmd'.
7521
7522 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7523
7524         PR cli/21688
7525         * cli/cli-script.c (command_name_equals_not_inline): New function.
7526         (process_next_line): Adjust 'if' clauses for "python", "compile"
7527         and "guile" to use command_name_equals_not_inline.
7528
7529 2017-06-29  Pedro Alves  <palves@redhat.com>
7530
7531         * completer.c (expression_completer): Call
7532         linespec_location_completer instead of location_completer.
7533
7534 2017-06-29  Pedro Alves  <palves@redhat.com>
7535
7536         * completer.c (expression_completer): Remove code that recomputes
7537         'text' from 'word'.
7538
7539 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7540
7541         * regformats/regdat.sh: Generate code with
7542         "ifndef IN_PROCESS_AGENT".
7543
7544 2017-06-28  Pedro Alves  <palves@redhat.com>
7545
7546         * command.h: Include "common/scoped_restore.h".
7547
7548 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7549
7550         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7551         instead of obstack_grow.
7552
7553 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7554
7555         PR gdb/21337
7556         * symfile.c (reread_symbols): Call objfiles_changed just before
7557         read_symbols.
7558
7559 2017-06-27  Pedro Alves  <palves@redhat.com>
7560
7561         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7562         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7563         (completion_list_add_symbol, completion_list_add_msymbol):
7564         ... these new functions.
7565         (add_symtab_completions)
7566         (default_make_symbol_completion_list_break_on_1): Adjust.
7567
7568 2017-06-27  Pedro Alves  <palves@redhat.com>
7569
7570         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7571         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7572         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7573         dtor.
7574         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7575         'storage_obstack' field an auto_obstack.  In-class initialize all
7576         non-bitfield fields.  Make minsyms_read bool.
7577         * symfile.c (read_symbols): Adjust.
7578
7579 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7580
7581         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7582         (gdbsim_store_register): Likewise.
7583
7584 2017-06-27  Pedro Alves  <palves@redhat.com>
7585
7586         * c-exp.y (name_obstack): Now an auto_obstack.
7587         (yylex): Use auto_obstack::clear.
7588         (c_parse): Use auto_obstack::clear instead of reinitializing and
7589         freeing the obstack.
7590         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7591         * d-exp.y (name_obstack): Now an auto_obstack.
7592         (yylex): Use auto_obstack::clear.
7593         (d_parse): Use auto_obstack::clear instead of reinitializing and
7594         freeing the obstack.
7595         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7596         auto_obstack.
7597         * dwarf2read.c (create_addrmap_from_index)
7598         (dwarf2_build_psymtabs_hard)
7599         (update_enumeration_type_from_children): Likewise.
7600         * gdb_obstack.h (auto_obstack): New type.
7601         * go-exp.y (name_obstack): Now an auto_obstack.
7602         (build_packaged_name): Use auto_obstack::clear.
7603         (go_parse): Use auto_obstack::clear instead of reinitializing and
7604         freeing the obstack.
7605         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7606         auto_obstack.
7607         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7608         * rust-exp.y (work_obstack): Now an auto_obstack.
7609         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7610         reinitializing and freeing the obstack.
7611         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7612         (host_char_to_target): Use auto_obstack.
7613         * utils.h (make_cleanup_obstack_free): Delete declaration.
7614         * valprint.c (generic_emit_char, generic_printstr): Use
7615         auto_obstack.
7616
7617 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7618
7619         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7620         thread.
7621         (darwin_init_thread_list): Don't update dummy thread.
7622         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7623
7624 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7625
7626         * record-full.c (netorder16): Remove.
7627
7628 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7629
7630         * common/diagnostics.h: Define macros for GCC.
7631         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7632         * common/vec.h: Include diagnostics.h.
7633         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7634         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7635         warning.
7636
7637 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7638
7639         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7640         New macro.
7641         * ada-lex.l: Ignore deprecated register warnings.
7642
7643 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7644
7645         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7646         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7647
7648 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7649
7650         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7651         its own line.
7652
7653 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7654
7655         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7656
7657 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7658
7659         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7660         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7661         (xtensa_register_read_masked): Likewise.
7662
7663 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7664
7665         * common/environ.c (gdb_environ::unset): Update comment.
7666
7667 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7668
7669         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7670         registers.
7671
7672 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7673
7674         * record-full.c (record_full_exec_insn): Use byte_vector.
7675
7676 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7677
7678         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7679         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7680
7681 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7682
7683         * remote.c (cached_reg): Move from here...
7684         * regcache.h (cached_reg): ...to here.
7685         * python/py-unwind.c (struct reg_info): Remove.
7686         (cached_frame_info): Use cached_reg_t.
7687         (pyuw_prev_register): Likewise.
7688         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7689         (pyuw_dealloc_cache): Free all registers.
7690
7691 2017-06-22  Pedro Alves  <palves@redhat.com>
7692             Simon Marchi  <simon.marchi@ericsson.com>
7693
7694         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7695         warning.
7696         * common/diagnostics.h: New file.
7697
7698 2017-06-22  Pedro Alves  <palves@redhat.com>
7699
7700         * common/agent.h: Add include guards.
7701
7702 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7703
7704         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7705         talk about addressable units instead of bytes.
7706
7707 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7708
7709         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7710         of '::const_iterator'.
7711
7712 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7713
7714         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7715         'unittests/environ-selftests.c'.
7716         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7717         * charset.c (find_charset_names): Declare object 'iconv_env'.
7718         Update code to use 'iconv_env' object.  Remove call to
7719         'free_environ'.
7720         * common/environ.c: Include <utility>.
7721         (make_environ): Delete function.
7722         (free_environ): Delete function.
7723         (gdb_environ::clear): New function.
7724         (gdb_environ::operator=): New function.
7725         (gdb_environ::get): Likewise.
7726         (environ_vector): Delete function.
7727         (set_in_environ): Delete function.
7728         (gdb_environ::set): New function.
7729         (unset_in_environ): Delete function.
7730         (gdb_environ::unset): New function.
7731         (gdb_environ::envp): Likewise.
7732         * common/environ.h: Include <vector>.
7733         (struct gdb_environ): Delete; transform into...
7734         (class gdb_environ): ... this class.
7735         (free_environ): Delete prototype.
7736         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7737         environ_vector): Likewise.
7738         * infcmd.c (run_command_1): Update code to call
7739         'envp' from 'gdb_environ' class.
7740         (environment_info): Update code to call methods from 'gdb_environ'
7741         class.
7742         (unset_environment_command): Likewise.
7743         (path_info): Likewise.
7744         (path_command): Likewise.
7745         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7746         (inferior::inferior): Initialize 'environment' using the host's
7747         information.
7748         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7749         Include "environ.h".
7750         (class inferior) <environment>: Change type from 'struct
7751         gdb_environ' to 'gdb_environ'.
7752         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7753         methods from 'gdb_environ' class.
7754         * solib.c (solib_find_1): Likewise
7755         * unittests/environ-selftests.c: New file.
7756
7757 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7758
7759         * features/i386/i386-linux.xml: Exchange the order of including
7760         32bit-linux.xml and 32bit-sse.xml.
7761         * features/i386/i386-linux.c: Regenerated.
7762
7763 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7764
7765         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7766         Delete copy ctor and assignment operator.
7767         (tdesc_type): Likewise.
7768         (tdesc_feature): Likewise.
7769         (tdesc_free_reg): Remove.
7770         (tdesc_create_reg): Use new.
7771         (tdesc_free_type): Remove.
7772         (tdesc_create_vector): Use new.
7773         (tdesc_create_union): Likewise.
7774         (tdesc_create_flags): Likewise.
7775         (tdesc_create_enum): Likewise.
7776         (tdesc_free_feature): Delete.
7777         (free_target_description): Use delete.
7778
7779 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7780
7781         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7782         registers.
7783
7784 2017-06-19  Pedro Alves  <palves@redhat.com>
7785
7786         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7787         after gdb::unlinker.
7788
7789 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7790
7791         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7792         gdb_environ to access an environment variable.
7793
7794 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7795
7796         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7797         gdb_byte*.
7798
7799 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7800
7801         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7802
7803 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7804
7805         * configure: Re-generate.
7806         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7807
7808 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7809
7810         * configure: Re-generate.
7811         * warning.m4: Pass -Werror to compiler when checking for
7812         supported warning flags.
7813
7814 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7815
7816         * Makefile.in (COMPILE.pre): Add "-x c++".
7817
7818 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7819             Pedro Alves  <palves@redhat.com>
7820             Yao Qi  <yao.qi@linaro.org>
7821
7822         * defs.h (RequireLongest): New.
7823         (extract_integer): Declare function template.
7824         (extract_signed_integer): Remove the declaration, but define it
7825         static inline.
7826         (extract_unsigned_integer): Likewise.
7827         (store_integer): Declare function template.
7828         (store_signed_integer): Remove the declaration, but define it
7829         static inline.
7830         (store_unsigned_integer): Likewise.
7831         * findvar.c (extract_integer): New function template.
7832         (extract_signed_integer): Remove.
7833         (extract_unsigned_integer): Remove.
7834         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7835         instantiations.
7836         (store_integer): New function template.
7837         (store_signed_integer): Remove.
7838         (store_unsigned_integer): Remove.
7839         (store_integer): Explicit instantiations.
7840         * regcache.c (regcache_raw_read_signed): Update.
7841         (regcache::raw_read): New function.
7842         (regcache::raw_read_signed): Remove.
7843         (regcache::raw_read_unsigned): Remove.
7844         (regcache_raw_read_unsigned): Update.
7845         (regcache_raw_write_unsigned): Update.
7846         (regcache::raw_write_signed): Remove.
7847         (regcache::raw_write): New function.
7848         (regcache_cooked_read_signed): Update.
7849         (regcache::raw_write_unsigned): Remove.
7850         (regcache::cooked_read_signed): Remove.
7851         (regcache_cooked_read_unsigned): Update.
7852         (regcache::cooked_read_unsigned): Remove.
7853         (regcache_cooked_write_signed): Update.
7854         (regcache_cooked_write_unsigned): Update.
7855         * regcache.h (regcache) <raw_read_signed>: Remove.
7856         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7857         <raw_read, raw_write>: New.
7858         <cooked_read_signed, cooked_write_signed>: Remove.
7859         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7860         <cooked_read, cooked_write>: New.
7861         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7862         (sh64_pseudo_register_write): Update.
7863
7864 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7865
7866         * arc-tdep.c (arc_disassembler_options): New variable.
7867         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7868         of default_print_insn.
7869         (arc_delayed_print_insn): Set info->section when needed,
7870         use default_print_insn to retrieve a disassembler.
7871
7872 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7873
7874         PR gdb/21574
7875         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7876         to mention $SHELL and startup-with-shell.
7877
7878 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7879
7880         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7881
7882 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7883
7884         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7885         default_print_insn instead of print_insn_aarch64.
7886         * arm-tdep.c (gdb_print_insn_arm): Call
7887         default_print_insn instead of print_insn_big_arm
7888         and print_insn_little_arm.
7889         * i386-tdep.c (i386_print_insn): Call default_print_insn
7890         instead of print_insn_i386.
7891         * ia64-tdep.c (ia64_print_insn): Call
7892         default_print_insn instead of print_insn_ia64.
7893         * mips-tdep.c (gdb_print_insn_mips): Call
7894         default_print_insn instead of print_insn_big_mips
7895         and print_insn_little_mips.
7896         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7897         instead of print_insn_spu.
7898
7899 2017-06-14  Pedro Alves  <palves@redhat.com>
7900
7901         * ada-lang.c: Include "common/byte-vector.h".
7902         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7903         * charset.c (wchar_iterator::iterate): Resize the vector instead
7904         of reserving it.
7905         * common/byte-vector.h: Include "common/def-vector.h".
7906         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7907         * cli/cli-dump.c: Include "common/byte-vector.h".
7908         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7909         * common/byte-vector.h: New file.
7910         * common/def-vector.h: New file.
7911         * common/default-init-alloc.h: New file.
7912         * dwarf2loc.c: Include "common/byte-vector.h".
7913         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7914         instead of reserving it.
7915         * dwarf2read.c: Include "common/byte-vector.h".
7916         (data_buf::m_vec): Now a gdb::byte_vector.
7917         * gdb_regex.c: Include "common/def-vector.h".
7918         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7919         * mi/mi-main.c: Include "common/byte-vector.h".
7920         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7921         * printcmd.c: Include "common/byte-vector.h".
7922         (print_scalar_formatted): Use gdb::byte_vector.
7923         * valprint.c: Include "common/byte-vector.h".
7924         (maybe_negate_by_bytes, print_decimal_chars): Use
7925         gdb::byte_vector.
7926
7927 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7928
7929         * darwin-nat.c: Include "nat/fork-inferior.h".
7930
7931 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7932
7933         * configure.nat: Factor out Darwin bits that are not
7934         architecture-specific.  Add fork-inferior.o.
7935
7936 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7937
7938         * configure.nat: Factor out AIX bits that are not
7939         architecture-specific.  Add fork-inferior.o.
7940
7941 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7942
7943         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7944         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7945         wrappers that just call rw_pieced_value.
7946
7947 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7948
7949         * dwarf2loc.c (write_pieced_value): When writing the data for a
7950         memory piece, use write_memory_with_notification instead of
7951         write_memory.
7952
7953 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7954
7955         * valops.c (read_value_memory): Change embedded_offset to
7956         represent a bit offset instead of a byte offset.
7957         * value.h (read_value_memory): Adjust comment.
7958
7959 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7960
7961         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7962         dest_offset_bits and source_offset_bits.
7963         (write_pieced_value): Likewise.
7964
7965 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7966
7967         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7968         given by DW_OP_bit_piece.
7969         (write_pieced_value): Likewise.
7970
7971 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7972
7973         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7974         some other preparations to the places where sufficient information
7975         is available.
7976         (write_pieced_value): Likewise.
7977
7978 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7979
7980         * dwarf2loc.c (bits_to_bytes): New function.
7981         (read_pieced_value): Fix offset calculations for register pieces
7982         on big-endian targets.
7983         (write_pieced_value): Likewise.
7984
7985 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7986
7987         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7988         (write_pieced_value): Likewise.
7989
7990 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7991
7992         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7993         transfer the source value's least significant bits, instead of its
7994         lowest-addressed ones.  Rename type_len to max_offset.
7995         (read_pieced_value): Mirror above changes to write_pieced_value as
7996         applicable.
7997
7998 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7999
8000         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8001         truncate full bytes from dest_offset_bits before using it as an
8002         offset into the buffer.
8003
8004 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8005
8006         * dwarf2loc.c (write_pieced_value): Include transfer size in
8007         byte-wise check.
8008
8009 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8010
8011         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8012         calculation of this_size.
8013
8014 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8015
8016         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8017         when targeting a bit-field.
8018         (write_pieced_value): Likewise.
8019
8020 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8021
8022         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8023         (allocate_piece_closure): Drop addr_size parameter.
8024         (dwarf2_evaluate_loc_desc_full): Adjust call to
8025         allocate_piece_closure.
8026
8027 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8028
8029         PR gdb/21226
8030         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8031         the LSB end, independent of endianness.
8032
8033 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8034
8035         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8036         size capping.
8037
8038 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8039
8040         * mips-linux-nat.c: Move include features/mips*-linux.c to
8041         mips-linux-tdep.c.
8042         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8043         to mips-linux-tdep.c.
8044         * mips-linux-tdep.c: Include features/mips*-linux.c
8045         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8046         functions.
8047         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8048         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8049         (tdesc_mips64_dsp_linux): Declare.
8050
8051 2017-06-12  Tom Tromey  <tom@tromey.com>
8052
8053         * valprint.h (val_print_type_code_int): Remove.
8054         * valprint.c (generic_val_print_int): Always call
8055         val_print_scalar_formatted.
8056         (val_print_type_code_int): Remove.
8057         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8058         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8059         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8060         * ada-valprint.c (ada_val_print_num): Use
8061         val_print_scalar_formatted.
8062
8063 2017-06-12  Tom Tromey  <tom@tromey.com>
8064
8065         * printcmd.c (print_scalar_formatted): Unify the two switches.
8066         Don't convert scalars to LONGEST.
8067
8068 2017-06-12  Tom Tromey  <tom@tromey.com>
8069
8070         PR exp/16225:
8071         * valprint.h (print_decimal_chars): Update.
8072         * valprint.c (maybe_negate_by_bytes): New function.
8073         (print_decimal_chars): Add "is_signed" argument.
8074         * printcmd.c (print_scalar_formatted): Update.
8075
8076 2017-06-12  Tom Tromey  <tom@tromey.com>
8077
8078         PR exp/16225:
8079         * valprint.h (print_binary_chars, print_hex_chars): Update.
8080         * valprint.c (val_print_type_code_int): Update.
8081         (print_binary_chars): Add "zero_pad" argument.
8082         (emit_octal_digit): New function.
8083         (print_octal_chars): Don't zero-pad.
8084         (print_decimal_chars): Likewise.
8085         (print_hex_chars): Add "zero_pad" argument.
8086         * sh64-tdep.c (sh64_do_fp_register): Update.
8087         * regcache.c (regcache::dump): Update.
8088         * printcmd.c (print_scalar_formatted): Update.
8089         * infcmd.c (default_print_one_register_info): Update.
8090
8091 2017-06-12  Pedro Alves  <palves@redhat.com>
8092             Alan Hayward  <alan.hayward@arm.com>
8093
8094         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8095         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8096         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8097         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8098         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8099
8100 2017-06-12  Pedro Alves  <palves@redhat.com>
8101
8102         * dwarf2read.c (mapped_symtab::data): Now a vector of
8103         symtab_index_entry instead of vector of
8104         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8105         whether an element's name is NULL instead of checking whether the
8106         element itself is NULL.
8107         (find_slot): Change return type.  Adjust.
8108         (hash_expand, , add_index_entry, uniquify_cu_indices)
8109         (write_hash_table): Adjust.
8110
8111 2017-06-12  Pedro Alves  <palves@redhat.com>
8112
8113         * dwarf2read.c (recursively_count_psymbols): New function.
8114         (write_psymtabs_to_index): Call it to compute number of psyms and
8115         pass estimate size of psyms_seen to unordered_set's ctor.
8116
8117 2017-06-12  Pedro Alves  <palves@redhat.com>
8118
8119         * dwarf2read.c (write_hash_table): Check if key already exists
8120         before emplacing.
8121
8122 2017-06-12  Pedro Alves  <palves@redhat.com>
8123
8124         * dwarf2read.c (data_buf::append_space): Rename to...
8125         (data_buf::grow): ... this, and make private.  Adjust all callers.
8126         (data_buf::append_uint): New method.
8127         (add_address_entry, write_one_signatured_type)
8128         (write_psymtabs_to_index): Use it.
8129
8130 2017-06-12  Pedro Alves  <palves@redhat.com>
8131
8132         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8133         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8134         (data_buf::file_write): Call ::fwrite directly.
8135
8136 2017-06-12  Pedro Alves  <palves@redhat.com>
8137
8138         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8139         std::vector::erase.
8140
8141 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8142
8143         Code cleanup: C++ify .gdb_index producer.
8144         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8145         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8146         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8147         (create_strtab, add_string): Remove.
8148         (file_write, data_buf): New.
8149         (struct symtab_index_entry): Use std::vector for cu_indices.
8150         (struct mapped_symtab): Use std::vector for data.
8151         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8152         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8153         Remove.
8154         (find_slot): Change return type.  Update it to the new data structures.
8155         (hash_expand, add_index_entry): Update it to the new data structures.
8156         (offset_type_compare): Remove.
8157         (uniquify_cu_indices): Update it to the new data structures.
8158         (c_str_view, c_str_view_hasher, vector_hasher): New.
8159         (add_indices_to_cpool): Remove.
8160         (write_hash_table): Update it to the new data structures.
8161         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8162         (eq_psymtab_cu_index): Remove.
8163         (psym_index_map): New typedef.
8164         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8165         reference and std::unordered_map for cu_index_htab.
8166         (add_address_entry, add_address_entry_worker, write_address_map)
8167         (write_psymbols): Update it to the new data structures.
8168         (write_obstack): Remove.
8169         (struct signatured_type_index_data): Change types_list to a data_buf
8170         reference and psyms_seen to a std::unordered_set reference.
8171         (write_one_signatured_type, recursively_write_psymbols)
8172         (write_psymtabs_to_index): Update it to the new data structures.
8173
8174 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8175
8176         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8177         separate-debug-file commands.
8178         * symfile.h (separate_debug_file_debug): New global.
8179         * symfile.c (separate_debug_file_debug): New global.
8180         (separate_debug_file_exists, find_separate_debug_file): Add
8181         debug output.
8182         (_initialize_symfile): Add "set debug separate-debug-file"
8183         command.
8184         * build-id.c (build_id_to_debug_bfd,
8185         find_separate_debug_file_by_buildid): Add debug output.
8186
8187 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8188
8189         * gdbarch.sh (displaced_step_free_closure): Remove.
8190         * gdbarch.h, gdbarch.c: Re-generate.
8191         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8192         displaced_step_free_closure.
8193         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8194         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8195         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8196         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8197         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8198         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8199         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8200         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8201         * infrun.c (displaced_step_clear): Call xfree instead of
8202         gdbarch_displaced_step_free_closure.
8203
8204 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8205
8206         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8207         NULL".
8208
8209 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8210
8211         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8212         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8213         (mn10300_push_dummy_call): Likewise.
8214
8215 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8216
8217         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8218
8219 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8220
8221         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8222
8223 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8224
8225         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8226         able to start inferiors using a shell.
8227         (New remote packets): Announce new packet "QStartupWithShell".
8228         * remote.c: Add PACKET_QStartupWithShell.
8229         (extended_remote_create_inferior): Handle new
8230         PACKET_QStartupWithShell.
8231         (remote_protocol_features) <QStartupWithShell>: New entry for
8232         PACKET_QStartupWithShell.
8233         (_initialize_remote): Call "add_packet_config_cmd" for
8234         QStartupShell.
8235
8236 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8237             Pedro Alves  <palves@redhat.com>
8238
8239         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8240         and "nat/fork-inferior.h".
8241         * common/common-inferior.h: New file, with contents from
8242         "gdb/inferior.h".
8243         * commom/common-utils.c: Include "common-utils.h".
8244         (stringify_argv): New function.
8245         * common/common-utils.h (stringify_argv): New prototype.
8246         * configure.nat: Add "fork-inferior.o" as a dependency for
8247         "*linux*", "fbsd*" and "nbsd*" hosts.
8248         * corefile.c (get_exec_file): Update comment.
8249         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8250         instead of "startup_inferior".
8251         (darwin_create_inferior): Call "add_thread_silent" after
8252         "fork_inferior".
8253         * fork-child.c: Cleanup unnecessary includes.
8254         (SHELL_FILE): Move to "common/common-fork-child.c".
8255         (environ): Likewise.
8256         (exec_wrapper): Initialize.
8257         (get_exec_wrapper): New function.
8258         (breakup_args): Move to "common/common-fork-child.c"; rename to
8259         "breakup_args_for_exec".
8260         (escape_bang_in_quoted_argument): Move to
8261         "common/common-fork-child.c".
8262         (saved_ui): New variable.
8263         (prefork_hook): New function.
8264         (postfork_hook): Likewise.
8265         (postfork_child_hook): Likewise.
8266         (gdb_startup_inferior): Likewise.
8267         (fork_inferior): Move to "common/common-fork-child.c".  Update
8268         function to support gdbserver.
8269         (startup_inferior): Likewise.
8270         * gdbcore.h (get_exec_file): Remove declaration.
8271         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8272         instead of "startup_inferior".  Call "add_thread_silent" after
8273         "fork_inferior".
8274         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8275         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8276         instead of "startup_inferior".  Call "add_thread_silent" after
8277         "fork_inferior".
8278         * inferior.h: Include "common-inferior.h".
8279         (trace_start_error): Move to "common/common-utils.h".
8280         (trace_start_error_with_name): Likewise.
8281         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8282         (startup_inferior): Likewise.
8283         (gdb_startup_inferior): New prototype.
8284         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8285         * nat/fork-inferior.h: New file.
8286         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8287         instead of "startup_inferior".  Call "add_thread_silent" after
8288         "fork_inferior".
8289         * target.h (target_terminal_init): Move prototype to
8290         "target/target.h".
8291         (target_terminal_inferior): Likewise.
8292         (target_terminal_ours): Likewise.
8293         * target/target.h (target_terminal_init): New prototype, moved
8294         from "target.h".
8295         (target_terminal_inferior): Likewise.
8296         (target_terminal_ours): Likewise.
8297         * utils.c (gdb_flush_out_err): New function.
8298
8299 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8300
8301         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8302         * common/common-gdbthread.h: New file, with parts from
8303         "gdb/gdbthread.h".
8304         * gdbthread.h: Include "common-gdbthread.h".
8305         (switch_to_thread): Moved to "common/common-gdbthread.h".
8306
8307 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8308
8309         * Makefile.in (SFILES): Add "common/job-control.c".
8310         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8311         (COMMON_OBS): Add "job-control.o".
8312         * common/job-control.c: New file, with contents from
8313         "gdb/inflow.c".
8314         * common/job-control.h: New file, with contents from "terminal.h".
8315         * fork-child.c: Include "job-control.h".
8316         * inflow.c: Include "job-control.h".
8317         (gdb_setpgid): Move to "common/common-inflow.c".
8318         (_initialize_inflow): Move setting of "job_control" to
8319         "handle_job_control".
8320         * terminal.h (job_control): Moved to "common/common-terminal.h".
8321         (gdb_setpgid): Likewise.
8322         * top.c: Include "job_control.h".
8323         * utils.c: Likewise.
8324         (job_control): Moved to "job-control.c".
8325
8326 2017-06-07  Pedro Alves  <palves@redhat.com>
8327
8328         * Makefile.in (SFILES): Add gdb_regex.c.
8329         (COMMON_OBS): Add gdb_regex.o.
8330         * ada-lang.c (ada_add_standard_exceptions)
8331         (ada_add_exceptions_from_frame, name_matches_regex)
8332         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8333         parameter type to compiled_regex.  Adjust.
8334         (ada_exceptions_list): Use compiled_regex.
8335         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8336         std::unique_ptr<compiled_regex>.
8337         (exception_catchpoint::~exception_catchpoint): Remove regfree
8338         call.
8339         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8340         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8341         * breakpoint.c (solib_catchpoint::compiled): Now a
8342         std::unique_ptr<compiled_regex>.
8343         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8344         (check_status_catch_solib): Adjust to use compiled_regex.
8345         (add_solib_catchpoint): Adjust to use compiled_regex.
8346         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8347         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8348         compiled_regex reference.  Adjust to use it.
8349         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8350         declaration.  Include "gdb_regex.h".
8351         (apropos_cmd): Change regex parameter to compiled_regex reference.
8352         * gdb_regex.c: New file.
8353         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8354         declarations.
8355         (class compiled_regex): New.
8356         * linux-tdep.c: Include "common/gdb_optional.h".
8357         (struct mapping_regexes): New, factored out from
8358         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8359         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8360         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8361         * probe.c: Include "common/gdb_optional.h".
8362         (collect_probes): Use compiled_regex and gdb::optional and remove
8363         cleanups.
8364         * skip.c: Include "common/gdb_optional.h".
8365         (skiplist_entry::compiled_function_regexp): Now a
8366         gdb::optional<compiled_regex>.
8367         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8368         (free_skiplist_entry): Remove regfree call.
8369         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8370         compiled_regex and gdb::optional.
8371         * symtab.c: Include "common/gdb_optional.h".
8372         (search_symbols): Use compiled_regex and gdb::optional.
8373         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8374         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8375         to gdb_regex.c.
8376
8377 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8378
8379         * regcache.c (regcache::save): Avoid buffer use.
8380         (regcache::dump): Likewise.
8381
8382 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8383
8384         * sh-tdep.c (sh_pseudo_register_read): Remove
8385         MAX_REGISTER_SIZE.
8386         (sh_pseudo_register_write): Likewise.
8387         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8388         (sh64_pseudo_register_write): Likewise
8389
8390 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8391
8392         * aarch64-tdep.c (aarch64_store_return_value): Use
8393         V_REGISTER_SIZE.
8394         (aarch64_pseudo_read_value): Likewise.
8395         (aarch64_pseudo_write): Likewise.
8396
8397 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8398
8399         * regformats/regdef.h (set_register_cache): Remove the
8400         declaration.
8401
8402 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8403
8404         * frame.c (frame_unwind_register_signed): Use
8405         frame_unwind_register_value.
8406
8407 2017-06-06  Pedro Alves  <palves@redhat.com>
8408
8409         PR breakpoints/21553
8410         * breakpoint.c (create_breakpoints_sal_default)
8411         (init_breakpoint_sal, create_breakpoint_sal): Use
8412         gdb::unique_xmalloc_ptr for string parameters.
8413         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8414         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8415         (base_breakpoint_create_breakpoints_sal)
8416         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8417         (strace_marker_create_breakpoints_sal)
8418         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8419         string parameters.
8420         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8421         gdb::unique_xmalloc_ptr for string parameters.
8422         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8423         parameters.
8424
8425 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8426
8427         * alpha-tdep.c (alpha_register_to_value): Use
8428         get_frame_register_value.
8429         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8430
8431 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8432
8433         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8434         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8435         (ia64_value_to_register): Likewise.
8436         (ia64_extract_return_value): Likewise.
8437         (ia64_store_return_value): Likewise.
8438         (ia64_push_dummy_call): Likewise.
8439
8440 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8441
8442         GDB 8.0 released.
8443
8444 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8445
8446         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8447
8448 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8449
8450         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8451         parameter.
8452         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8453
8454 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8455
8456         * event-loop.c (poll_timers): Unallocate timer using delete
8457         instead of xfree.
8458
8459 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8460
8461         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8462         (struct breakpoint) <~breakpoint>: New.
8463         (struct watchpoint): Inherit from breakpoint.
8464         <~watchpoint>: New.
8465         <base>: Remove.
8466         (struct tracepoint): Inherit from breakpoint.
8467         <base>: Remove.
8468         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8469         (struct longjmp_breakpoint): Inherit from breakpoint.
8470         <~longjmp_breakpoint>: New.
8471         <base>: Remove.
8472         (new_breakpoint_from_type): Remove casts.
8473         (watchpoint_in_thread_scope): Remove reference to base field.
8474         (watchpoint_del_at_next_stop): Likewise.
8475         (update_watchpoint): Likewise.
8476         (watchpoint_check): Likewise.
8477         (bpstat_check_watchpoint): Likewise.
8478         (set_longjmp_breakpoint): Likewise.
8479         (struct fork_catchpoint): Inherit from breakpoint.
8480         <base>: Remove.
8481         (struct solib_catchpoint): Inherit from breakpoint.
8482         <~solib_catchpoint>: New.
8483         <base>: Remove.
8484         (dtor_catch_solib): Change to ...
8485         (solib_catchpoint::~solib_catchpoint): ... this.
8486         (breakpoint_hit_catch_solib): Remove reference to base field.
8487         (add_solib_catchpoint): Likewise.
8488         (create_fork_vfork_event_catchpoint): Likewise.
8489         (struct exec_catchpoint): Inherit from breakpoint.
8490         <~exec_catchpoint>: New.
8491         <base>: Remove.
8492         (dtor_catch_exec): Change to ...
8493         (exec_catchpoint::~exec_catchpoint): ... this.
8494         (dtor_watchpoint): Change to ...
8495         (watchpoint::~watchpoint): ... this.
8496         (watch_command_1): Remove reference to base field.
8497         (catch_exec_command_1): Likewise.
8498         (base_breakpoint_dtor): Change to ...
8499         (breakpoint::~breakpoint): ... this.
8500         (base_breakpoint_ops): Remove dtor field value.
8501         (longjmp_bkpt_dtor): Change to ...
8502         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8503         (strace_marker_create_breakpoints_sal): Remove reference to base
8504         field.
8505         (delete_breakpoint): Don't manually call breakpoint destructor.
8506         (create_tracepoint_from_upload): Remove reference to base field.
8507         (trace_pass_set_count): Likewise.
8508         (initialize_breakpoint_ops): Don't initialize
8509         momentary_breakpoint_ops, don't set dtors.
8510         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8511         <~ada_catchpoint>: New.
8512         <base>: Remove.
8513         (create_excep_cond_exprs): Remove reference to base field.
8514         (dtor_exception): Change to ...
8515         (ada_catchpoint::~ada_catchpoint): ... this.
8516         (dtor_catch_exception): Remove.
8517         (dtor_catch_exception_unhandled): Remove.
8518         (dtor_catch_assert): Remove.
8519         (create_ada_exception_catchpoint): Remove reference to base
8520         field.
8521         (initialize_ada_catchpoint_ops): Don't set dtors.
8522         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8523         breakpoint.
8524         <~signal_catchpoint>: New.
8525         <base>: Remove.
8526         (signal_catchpoint_dtor): Change to ...
8527         (signal_catchpoint::~signal_catchpoint): ... this.
8528         (create_signal_catchpoint): Remove reference to base field.
8529         (initialize_signal_catchpoint_ops): Don't set dtor.
8530         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8531         from breakpoint.
8532         <~syscall_catchpoint>: New.
8533         <base>: Remove.
8534         (dtor_catch_syscall): Change to ...
8535         (syscall_catchpoint::~syscall_catchpoint): ... this.
8536         (create_syscall_event_catchpoint): Remove reference to base
8537         field.
8538         (initialize_syscall_catchpoint_ops): Don't set dtor.
8539         * break-catch-throw.c (struct exception_catchpoint): Inherit
8540         from breakpoint.
8541         <~exception_catchpoint>: New.
8542         <base>: Remove.
8543         (dtor_exception_catchpoint): Change to ...
8544         (exception_catchpoint::~exception_catchpoint): ... this.
8545         (handle_gnu_v3_exceptions): Remove reference to base field.
8546         (initialize_throw_catchpoint_ops): Don't set dtor.
8547         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8548         field.
8549         * remote.c (remote_get_tracepoint_status): Likewise.
8550         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8551         * tracefile.c (tracefile_fetch_registers): Likewise.
8552         * tracepoint.c (actions_command): Likewise.
8553         (validate_actionline): Likewise.
8554         (tfind_1): Likewise.
8555         (get_traceframe_location): Likewise.
8556         (find_matching_tracepoint_location): Likewise.
8557         (parse_tracepoint_status): Likewise.
8558         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8559
8560 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8561
8562         * breakpoint.c (struct longjmp_breakpoint): New struct.
8563         (is_tracepoint_type): Change return type to bool.
8564         (is_longjmp_type): New function.
8565         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8566         (set_raw_breakpoint_without_location): Use
8567         new_breakpoint_from_type.
8568         (set_raw_breakpoint): Likewise.
8569
8570 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8571
8572         * breakpoint.c (new_breakpoint_from_type): New function.
8573         (create_breakpoint_sal): Use new_breakpoint_from_type and
8574         unique_ptr.
8575         (create_breakpoint): Likewise.
8576
8577 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8578
8579         * memattr.c (mem_info_command): Rename to ...
8580         (info_mem_command): ... this.
8581         (mem_enable_command): Rename to ...
8582         (enable_mem_command): ... this.
8583         (mem_disable_command): Rename to ...
8584         (disable_mem_command): ... this.
8585         (mem_delete_command): Rename to ...
8586         (delete_mem_command): ... this.
8587         (_initialize_mem): Adjust function names.
8588
8589 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8590
8591         * btrace.c (handle_pt_insn_events): New.
8592         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8593         STATUS.  Split into this and ...
8594         (handle_pt_insn_event_flags): ... this.
8595
8596 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8597
8598         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8599         and struct pt_insn.resynced.
8600         * configure: Regenerated.
8601         * config.in: Regenerated.
8602
8603 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8604
8605         * btrace.c (ftrace_find_call_by_number): New function.
8606         (ftrace_new_function): Store objects, not pointers.
8607         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8608         ftrace_new_gap, ftrace_update_function,
8609         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8610         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8611         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8612         btrace_ends_with_single_insn, btrace_call_get): Account for
8613         btrace_thread_info::functions now storing objects.
8614         * btrace.h (struct btrace_thread_info): Add constructor.
8615         (struct btrace_thread_info) <functions>: Make std::vector.
8616         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8617         Initialize with default values.
8618         * record-btrace.c (record_btrace_frame_sniffer): Account for
8619         btrace_thread_info::functions now storing objects.
8620
8621 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8622
8623         * btrace.c: Remove typedef bfun_s.
8624         (ftrace_new_gap): Directly add gaps to the list of gaps.
8625         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8626         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8627         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8628         instead of gdb VEC.
8629
8630 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8631
8632         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8633         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8634         with btrace_thread_info::next_segment and
8635         btrace_thread_info::prev_segment.
8636         * btrace.h: Remove struct btrace_func_link.
8637         (struct btrace_function): Replace pair of function segment pointers
8638         with pair of indices.
8639         * python/py-record-btrace.c (btpy_call_prev_sibling,
8640         btpy_call_next_sibling): Replace references to
8641         btrace_thread_info::segment with btrace_thread_info::next_segment and
8642         btrace_thread_info::prev_segment.
8643         * record-btrace.c (record_btrace_frame_this_id): Use
8644         btrace_find_call_by_number.
8645
8646 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8647
8648         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8649         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8650         btrace_insn_next, btrace_insn_prev): Remove references to
8651         btrace_thread_info::flow.
8652         * btrace.h (struct btrace_function): Remove FLOW.
8653
8654 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8655
8656         * btrace.c (ftrace_find_call_by_number): New function.
8657         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8658         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8659         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8660         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8661         index.
8662         * btrace.h (struct btrace_function): Turn UP into an index.
8663         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8664         as an index.
8665         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8666         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8667         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8668
8669 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8670
8671         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8672         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8673         ftrace_update_function, ftrace_compute_global_level_offset,
8674         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8675         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8676         btrace_insn_end, btrace_is_empty): Remove references to
8677         btrace_thread_info::begin and btrace_thread_info::end.
8678         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8679         (struct btrace_thread_info) <functions>: Adjust comment.
8680         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8681         btrace_thread_info::begin.
8682
8683 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8684
8685         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8686         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8687         ftrace_update_function): Remove arguments that implicitly were always
8688         BTINFO->END.
8689         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8690         Don't pass BTINFO->END.
8691
8692 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8693
8694         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8695         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8696         btrace_find_insn_by_number): Replace function segment pointer with
8697         index.
8698         (btrace_insn_cmp): Simplify.
8699         * btrace.h: (struct btrace_insn_iterator) Rename index to
8700         insn_index.  Replace function segment pointer with index into function
8701         segment vector.
8702         * record-btrace.c (record_btrace_call_history): Replace function
8703         segment pointer use with index.
8704         (record_btrace_frame_sniffer): Retrieve function call segment through
8705         vector.
8706         (record_btrace_set_replay): Remove defunc't safety check.
8707
8708 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8709
8710         * btrace.c (btrace_ends_with_single_insn): New function.
8711         (btrace_call_get, btrace_call_number, btrace_call_begin,
8712         btrace_call_end, btrace_call_next, btrace_call_prev,
8713         btrace_find_call_by_number): Use index into call segment vector
8714         instead of pointer.
8715         (btrace_call_cmp): Simplify.
8716         * btrace.h (struct btrace_call_iterator): Replace function call segment
8717         pointer with index into vector.
8718         * record-btrace.c (record_btrace_call_history): Use index instead of
8719         pointer.
8720
8721 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8722
8723         * btrace.c (btrace_insn_begin, btrace_insn_end,
8724         btrace_find_insn_by_number): Add btinfo to iterator.
8725         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8726
8727 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8728
8729         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8730         and save pointers directly.
8731         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8732         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8733         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8734         changed signature of functions.
8735         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8736         (btrace_fetch): Remove code that adds btrace_function pointers to
8737         vector of btrace_functions.
8738         (btrace_clear): Simplify freeing vector of btrace_functions.
8739
8740 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8741
8742         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8743         Replace VEC_* with std::vector functions.
8744         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8745         (struct btrace_thread_info)<functions>: Change type to std::vector.
8746
8747 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8748
8749         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8750         "Removed targets and native configurations" up.  Merge duplicate
8751         "New commands" sub-sections.  Add "New options" sub-sections.
8752
8753 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8754
8755         * defs.h (copy_integer_to_size): New declaration.
8756         * findvar.c (copy_integer_to_size): New function.
8757         (do_cint_test): New selftest function.
8758         (copy_integer_to_size_test): Likewise.
8759         (_initialize_findvar): Likewise.
8760         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8761         (mips_fbsd_collect_reg): Use raw_collect_integer.
8762         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8763         (mips64_fill_gregset): Use raw_collect_integer
8764         (mips64_fill_fpregset): Use raw_supply_integer.
8765         * regcache.c (regcache::raw_supply_integer): New function.
8766         (regcache::raw_collect_integer): Likewise.
8767         * regcache.h: (regcache::raw_supply_integer): New declaration.
8768         (regcache::raw_collect_integer): Likewise.
8769
8770 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8771
8772         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8773         (COMMON_OBS): Add gdbarch-selftests.o.
8774         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8775         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8776         * gdbarch-selftests.c: New file.
8777         * regcache.h (regcache) <~regcache>: Mark it virtual if
8778         GDB_SELF_TEST.
8779         <raw_write>: Likewise.
8780
8781 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8782
8783         * regcache.c (current_regcache): Change it to
8784         regcache::current_regcache.
8785         (regcache_observer_target_changed): Update.
8786         (regcache_thread_ptid_changed): Make it a regcache static
8787         method.
8788         (regcache_thread_ptid_changed): Update.
8789         (class regcache_access): New.
8790         (current_regcache_test): Update.
8791         (_initialize_regcache): Update.
8792         * regcache.h: Include forward_list.
8793         (regcache): Declare regcache_thread_ptid_changed and declare
8794         registers_changed_ptid as friend.
8795
8796 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8797
8798         * i387-tdep.c (i387_register_to_value): Use register_size
8799         instead of TYPE_LENGTH.
8800         * m68k-tdep.c (m68k_register_to_value): Likewise.
8801
8802 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8803
8804         * i387-tdep.c (i387_convert_register_p): Return false if type
8805         code isn't TYPE_CODE_FLT.
8806
8807 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8808
8809         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8810         length is 4.
8811         (alpha_register_to_value): Remove type length check.
8812         (alpha_value_to_register): Likewise.
8813
8814 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8815
8816         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8817         TYPE_CODE_FLT.
8818
8819 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8820
8821         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8822         TYPE_CODE_FLT or not.
8823
8824 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8825
8826         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8827         * avr-tdep.c (avr_gdbarch_init): Likewise.
8828         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8829         * cris-tdep.c (cris_gdbarch_init): Likewise.
8830         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8831         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8832         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8833         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8834         * mep-tdep.c (mep_gdbarch_init): Likewise.
8835         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8836         * mips-tdep.c (mips_gdbarch_init): Likewise.
8837         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8838         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8839         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8840         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8841         * v850-tdep.c (v850_gdbarch_init): Likewise.
8842
8843 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8844
8845         * selftest-arch.c (tests_with_arch): Call registers_changed
8846         and reinit_frame_cache.
8847         * selftest.c (run_self_tests): Likewise.
8848
8849 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8850
8851         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8852         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8853
8854 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8855
8856         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8857         set_gdbarch_print_insn.
8858
8859 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8860
8861         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8862         set_gdbarch_print_insn.
8863
8864 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8865
8866         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8867         set_gdbarch_print_insn.
8868         * arc-tdep.c (arc_gdbarch_init): Likewise.
8869         * arch-utils.c: include dis-asm.h.
8870         (default_print_insn): New function.
8871         * arch-utils.h (default_print_insn): Declare.
8872         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8873         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8874         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8875         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8876         * frv-tdep.c (frv_gdbarch_init): Likewise.
8877         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8878         * gdbarch.sh (print_insn): Use default_print_insn.
8879         * gdbarch.c: Regenerated.
8880         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8881         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8882         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8883         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8884         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8885         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8886         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8887         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8888         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8889         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8890         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8891         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8892         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8893         * mt-tdep.c (mt_gdbarch_init): Likewise.
8894         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8895         * nios2-tdep.c (nios2_print_insn): Remove.
8896         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8897         * rx-tdep.c (rx_gdbarch_init): Likewise.
8898         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8899         * score-tdep.c (score_print_insn): Remove.
8900         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8901         * sh-tdep.c (sh_gdbarch_init): Likewise.
8902         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8903         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8904         * tic6x-tdep.c (tic6x_print_insn): Remove.
8905         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8906         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8907         * v850-tdep.c (v850_gdbarch_init): Likewise.
8908         * vax-tdep.c (vax_gdbarch_init): Likewise.
8909         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8910         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8911
8912 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8913
8914         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8915         (MIPS_FP0_REGNUM): Remove.
8916         (MIPS_FSR_REGNUM): Remove.
8917         (mips_fbsd_supply_fpregs): Use mips_regnum.
8918         (mips_fbsd_supply_gregs): Likewise.
8919         (mips_fbsd_collect_fpregs): Likewise.
8920         (mips_fbsd_collect_gregs): Likewise.
8921
8922 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8923
8924         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8925         (getpfpregs_supplies): New function.
8926         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8927         getfpregs_supplies.
8928         (mips_fbsd_store_inferior_registers): Likewise.
8929
8930 2017-05-22  Pedro Alves <palves@redhat.com>
8931
8932         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8933         maintainer.
8934
8935 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8936
8937         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8938         (store_register): Likewise.
8939         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8940         (get_decimal_float_return_value): Likewise.
8941         (do_ppc_sysv_return_value): Likewise.
8942         (ppc64_sysv_abi_push_integer): Likewise.
8943         (ppc64_sysv_abi_push_freg): Likewise.
8944         (ppc64_sysv_abi_return_value_base): Likewise.
8945         (ppc64_sysv_abi_return_value): Likewise.
8946         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8947         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8948         * rs6000-nat.c: Likewise.
8949         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8950         (rs6000_value_to_register): Likewise.
8951         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8952
8953 2017-05-21  Tom Tromey  <tom@tromey.com>
8954
8955         PR rust/21466:
8956         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8957         arrays as "[T]", not "[T; ]".
8958
8959 2017-05-19  Tom Tromey  <tom@tromey.com>
8960
8961         PR rust/21484:
8962         * rust-lang.c (exp_descriptor_rust): New function.
8963         (rust_language_defn): Use it.
8964         * p-lang.c (pascal_language_defn): Update.
8965         * opencl-lang.c (opencl_language_defn): Update.
8966         * objc-lang.c (objc_language_defn): Update.
8967         * m2-lang.c (m2_language_defn): Update.
8968         * language.h (struct language_defn)
8969         <la_watch_location_expression>: New member.
8970         * language.c (unknown_language_defn, auto_language_defn)
8971         (local_language_defn): Update.
8972         * go-lang.c (go_language_defn): Update.
8973         * f-lang.c (f_language_defn): Update.
8974         * d-lang.c (d_language_defn): Update.
8975         * c-lang.h (c_watch_location_expression): Declare.
8976         * c-lang.c (c_watch_location_expression): New function.
8977         (c_language_defn, cplus_language_defn, asm_language_defn)
8978         (minimal_language_defn): Use it.
8979         * breakpoint.c (watch_command_1): Call
8980         la_watch_location_expression.
8981         * ada-lang.c (ada_language_defn): Update.
8982
8983 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8984
8985         PR tui/21482
8986         * gdb_curses.h (NOMACROS): Define.
8987         (NCURSES_NOMACROS): Define.
8988
8989 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8990
8991         PR tui/21482
8992         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8993         arg to char *.
8994         * tui/tui-wingeneral.c (box_win): Likewise.
8995         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8996         (tui_show_source_line): Likewise.
8997         (tui_show_exec_info_content): Likewise.
8998
8999 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9000
9001         * sparc-tdep.c (sparc_structure_return_p)
9002         (sparc_arg_on_registers_p): New functions.
9003         (sparc32_store_arguments): Use them.
9004         * sparc64-tdep.c (sparc64_16_byte_align_p)
9005         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9006         Handle TYPE_CODE_ARRAY.
9007
9008 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9009
9010         * cli/cli-decode.c (add_alias_cmd): New function.
9011         * command.h (add_alias_cmd): Declare.
9012         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9013         instead call add_alias_cmd.
9014
9015 2017-05-17  Pedro Alves  <palves@redhat.com>
9016
9017         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9018         (nat_makefile_frag): ... this.  All references updated.
9019         * configure.ac: Likewise.
9020         * configure.nat: Likewise.  Enhance comments.
9021         * configure: Regenerate.
9022
9023 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9024
9025         * procfs.c (procfs_create_inferior): Change prototype to match
9026         definition.
9027
9028 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9029
9030         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9031         C++ compiler warning.
9032
9033 2017-05-12  Tom Tromey  <tom@tromey.com>
9034
9035         PR rust/21483:
9036         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9037         recurse, just call value_struct_elt directly.
9038
9039 2017-05-12  Tom Tromey  <tom@tromey.com>
9040
9041         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9042         OP_RUST_ARRAY>: Fix.
9043
9044 2017-05-12  Tom Tromey  <tom@tromey.com>
9045
9046         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9047
9048 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9049
9050         * regcache.c: Include <forward_list>.
9051         (struct regcache_list): Remove.
9052         (current_regcache): Update.
9053         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9054         (regcache_thread_ptid_changed): Likewise.
9055         (registers_changed_ptid): Likewise.
9056         (current_regcache_size): Likewise.
9057
9058 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9059
9060         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9061         (current_regcache_size): New function.
9062         (current_regcache_test): New function.
9063         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9064
9065 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9066
9067         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9068         (print_gp_register_row): Use get_frame_register_value.
9069
9070 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9071
9072         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9073         (mips_supply_fpregset): Likewise.
9074         (mips64_supply_gregset): Likewise.
9075
9076 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9077
9078         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9079         regcache->raw_supply_zeroed.
9080
9081 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9082
9083         * configure.nat: Rearrange 'case' statements to match
9084         host before cpu.
9085
9086 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9087
9088         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9089         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9090         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9091         "@nat_extra_makefile_frag@".
9092         (Makefile): Remove dependency on "@frags@".
9093         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9094         (data-directory/Makefile): Likewise.
9095         * config/aarch64/linux.mh: Deleted; moved contents to
9096         "gdb/configure.nat".
9097         * config/alpha/alpha-linux.mh: Likewise.
9098         * config/alpha/nbsd.mh: Likewise.
9099         * config/arm/linux.mh: Likewise.
9100         * config/arm/nbsdelf.mh: Likewise.
9101         * config/i386/cygwin.mh: Likewise.
9102         * config/i386/cygwin64.mh: Likewise.
9103         * config/i386/darwin.mh: Likewise.
9104         * config/i386/fbsd.mh: Likewise.
9105         * config/i386/fbsd64.mh: Likewise.
9106         * config/i386/go32.mh: Likewise.
9107         * config/i386/i386gnu.mh: Likewise.
9108         * config/i386/i386sol2.mh: Likewise.
9109         * config/i386/linux.mh: Likewise.
9110         * config/i386/linux64.mh: Likewise.
9111         * config/i386/mingw.mh: Likewise.
9112         * config/i386/mingw64.mh: Likewise.
9113         * config/i386/nbsd64.mh: Likewise.
9114         * config/i386/nbsdelf.mh: Likewise.
9115         * config/i386/nto.mh: Likewise.
9116         * config/i386/obsd.mh: Likewise.
9117         * config/i386/obsd64.mh: Likewise.
9118         * config/i386/sol2-64.mh: Likewise.
9119         * config/ia64/linux.mh: Likewise.
9120         * config/m32r/linux.mh: Likewise.
9121         * config/m68k/linux.mh: Likewise.
9122         * config/m68k/nbsdelf.mh: Likewise.
9123         * config/m68k/obsd.mh: Likewise.
9124         * config/m88k/obsd.mh: Likewise.
9125         * config/mips/fbsd.mh: Likewise.
9126         * config/mips/linux.mh: Likewise.
9127         * config/mips/nbsd.mh: Likewise.
9128         * config/mips/obsd64.mh: Likewise.
9129         * config/pa/linux.mh: Likewise.
9130         * config/pa/nbsd.mh: Likewise.
9131         * config/pa/obsd.mh: Likewise.
9132         * config/powerpc/aix.mh: Likewise.
9133         * config/powerpc/fbsd.mh: Likewise.
9134         * config/powerpc/linux.mh: Likewise.
9135         * config/powerpc/nbsd.mh: Likewise.
9136         * config/powerpc/obsd.mh: Likewise.
9137         * config/powerpc/ppc64-linux.mh: Likewise.
9138         * config/powerpc/spu-linux.mh: Likewise.
9139         * config/s390/linux.mh: Likewise.
9140         * config/sh/nbsd.mh: Likewise.
9141         * config/sparc/fbsd.mh: Likewise.
9142         * config/sparc/linux.mh: Likewise.
9143         * config/sparc/linux64.mh: Likewise.
9144         * config/sparc/nbsd64.mh: Likewise.
9145         * config/sparc/nbsdelf.mh: Likewise.
9146         * config/sparc/obsd64.mh: Likewise.
9147         * config/sparc/sol2.mh: Likewise.
9148         * config/tilegx/linux.mh: Likewise.
9149         * config/vax/nbsdelf.mh: Likewise.
9150         * config/vax/obsd.mh: Likewise.
9151         * config/xtensa/linux.mh: Likewise.
9152         * config/i386/i386gnu.mn: New file, with excerpts from
9153         "config/i386/i386gnu.mh".
9154         * configure: Regenerate.
9155         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9156         *.mh files under "gdb/config".
9157         * configure.nat: New file, with contents from the
9158         "gdb/config/*/*.mh" files.
9159
9160 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9161
9162         * btrace.c (btrace_clear): Free insn vector.
9163
9164 2017-05-05  Pedro Alves  <palves@redhat.com>
9165
9166         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9167         * configure: Regenerate.
9168
9169 2017-05-04  Pedro Alves  <palves@redhat.com>
9170
9171         * Makefile.in (SFILES): Add progspace-and-thread.c.
9172         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9173         (COMMON_OBS): Add progspace-and-thread.o.
9174         * breakpoint.c: Include "progspace-and-thread.h".
9175         (update_inserted_breakpoint_locations)
9176         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9177         Use scoped_restore_current_pspace_and_thread.
9178         (create_std_terminate_master_breakpoint): Use
9179         scoped_restore_current_program_space.
9180         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9181         (print_breakpoint_location): Use
9182         scoped_restore_current_program_space.
9183         (bp_loc_is_permanent): Use
9184         scoped_restore_current_pspace_and_thread.
9185         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9186         (download_tracepoint_locations): Use
9187         scoped_restore_current_pspace_and_thread.
9188         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9189         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9190         (enum step_over_calls_kind): Moved from inferior.h.
9191         (class scoped_restore_current_thread): New class.
9192         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9193         declaration.
9194         (scoped_restore_current_thread): New class.
9195         * infcmd.c: Include "common/gdb_optional.h".
9196         (continue_1, proceed_after_attach): Use
9197         scoped_restore_current_thread.
9198         (notice_new_inferior): Use scoped_restore_current_thread.
9199         * inferior.c: Include "progspace-and-thread.h".
9200         (restore_inferior, save_current_inferior): Delete.
9201         (add_inferior_command, clone_inferior_command): Use
9202         scoped_restore_current_pspace_and_thread.
9203         * inferior.h (scoped_restore_current_inferior): New class.
9204         * infrun.c: Include "progspace-and-thread.h" and
9205         "common/gdb_optional.h".
9206         (follow_fork_inferior): Use
9207         scoped_restore_current_pspace_and_thread.
9208         (scoped_restore_exited_inferior): New class.
9209         (handle_vfork_child_exec_or_exit): Use
9210         scoped_restore_exited_inferior,
9211         scoped_restore_current_pspace_and_thread,
9212         scoped_restore_current_thread and scoped_restore.
9213         (fetch_inferior_event): Use scoped_restore_current_thread.
9214         * linespec.c (decode_line_full, decode_line_1): Use
9215         scoped_restore_current_program_space.
9216         * mi/mi-main.c: Include "progspace-and-thread.h".
9217         (exec_continue): Use scoped_restore_current_thread.
9218         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9219         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9220         * proc-service.c (ps_pglobal_lookup): Use
9221         scoped_restore_current_program_space.
9222         * progspace-and-thread.c: New file.
9223         * progspace-and-thread.h: New file.
9224         * progspace.c (release_program_space, clone_program_space): Use
9225         scoped_restore_current_program_space.
9226         (restore_program_space, save_current_program_space)
9227         (save_current_space_and_thread): Delete.
9228         (switch_to_program_space_and_thread): Moved to
9229         progspace-and-thread.c.
9230         * progspace.h (save_current_program_space)
9231         (save_current_space_and_thread): Delete declarations.
9232         (scoped_restore_current_program_space): New class.
9233         * remote.c (remote_btrace_maybe_reopen): Use
9234         scoped_restore_current_thread.
9235         * symtab.c: Include "progspace-and-thread.h".
9236         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9237         * thread.c (print_thread_info_1): Use
9238         scoped_restore_current_thread.
9239         (struct current_thread_cleanup): Delete.
9240         (do_restore_current_thread_cleanup)
9241         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9242         (scoped_restore_current_thread::~scoped_restore_current_thread):
9243         ... this new dtor.
9244         (make_cleanup_restore_current_thread): Rename/convert to ...
9245         (scoped_restore_current_thread::scoped_restore_current_thread):
9246         ... this new ctor.
9247         (thread_apply_all_command): Use scoped_restore_current_thread.
9248         (thread_apply_command): Use scoped_restore_current_thread.
9249         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9250         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9251
9252 2017-05-04  Pedro Alves  <palves@redhat.com>
9253
9254         * thread.c (make_cleanup_restore_current_thread): Move
9255         find_thread_ptid call before the is_stopped call.  Assert that the
9256         thread is found.  Replace is_stopped call by checking the thread's
9257         state directly.  Remove unnecessary NULL-thread check.
9258
9259 2017-05-04  Pedro Alves  <palves@redhat.com>
9260
9261         * corelow.c (thread_section_name): New class.
9262         (get_core_register_section, get_core_siginfo): Use it.
9263
9264 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9267         (get_core_register_section): Remove xfree of NULL pointer.
9268
9269 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9270
9271         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9272         * regcache.c (regcache::raw_supply_zeroed): New function.
9273         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9274
9275 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9276
9277         * gdbarch.sh: Remove commented out definition of
9278         TARGET_CHAR_BIT.
9279         * gdbarch.h: Re-generate.
9280
9281 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9282
9283         * configure: Regenerate.
9284
9285 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9286
9287         * solib-target.c (solib_target_relocate_section_addresses):
9288         Remove num_section_bases, num_bases, segment_bases variables.
9289
9290 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9291
9292         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9293
9294 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9295
9296         * solib-target.c: Include <vector>
9297         (struct lm_info_target) <~lm_info_target>: Remove.
9298         <segment_bases, section_bases>: Change type to
9299         std::vector<CORE_ADDR>.
9300         (library_list_start_segment, library_list_start_section,
9301         library_list_end_library,
9302         solib_target_relocate_section_addresses): Adjust.
9303
9304 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9305
9306         * gdbarch.sh (software_single_step): Change return type to
9307         std::vector<CORE_ADDR>.
9308         * gdbarch.c, gdbarch.h: Re-generate.
9309         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9310         Adjust.
9311         (arm_deal_with_atomic_sequence_raw): Adjust.
9312         (thumb_get_next_pcs_raw): Adjust.
9313         (arm_get_next_pcs_raw): Adjust.
9314         (arm_get_next_pcs): Adjust.
9315         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9316         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9317         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9318         (alpha_software_single_step): Adjust.
9319         * alpha-tdep.h (alpha_software_single_step): Adjust.
9320         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9321         * arm-tdep.c (arm_software_single_step): Adjust.
9322         (arm_breakpoint_kind_from_current_state): Adjust.
9323         * arm-tdep.h (arm_software_single_step): Adjust.
9324         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9325         * cris-tdep.c (cris_software_single_step): Adjust.
9326         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9327         (micromips_deal_with_atomic_sequence): Adjust.
9328         (deal_with_atomic_sequence): Adjust.
9329         (mips_software_single_step): Adjust.
9330         * mips-tdep.h (mips_software_single_step): Adjust.
9331         * moxie-tdep.c (moxie_software_single_step): Adjust.
9332         * nios2-tdep.c (nios2_software_single_step): Adjust.
9333         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9334         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9335         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9336         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9337         * sparc-tdep.c (sparc_software_single_step): Adjust.
9338         * spu-tdep.c (spu_software_single_step): Adjust.
9339         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9340
9341 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9342
9343         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9344         * gdbarch.h: Re-generate.
9345
9346 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9347
9348         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9349         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9350         * python/py-instruction.c, python/py-instruction.h: New file.
9351         * python/py-record.c: Add py-instruction.h include.
9352         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9353         gdb.RecordInstruction.
9354         * python/python-internal.h: Add gdbpy_initialize_instruction
9355         declaration.
9356         * python/python.c (do_start_initialization): Add
9357         gdbpy_initialize_instruction.
9358
9359 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9360
9361         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9362         Remove.
9363         (btrace_func_from_recpy_func): New function.
9364         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9365         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9366         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9367         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9368         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9369         Also, use new helper functions.
9370         (btpy_list_item): Use new helper functions.
9371         (recpy_bt_function_call_history): Use new type name.
9372         (btpy_call_getset): Remove.
9373         (gdbpy_initialize_btrace): Remove code to initialize
9374         gdb.BtraceFunctionCall.
9375         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9376         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9377         recpy_bt_func_prev, recpy_bt_func_next): New export.
9378         * python/py-record.c (recpy_func_type): New static object.
9379         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9380         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9381         recpy_func_next): New function.
9382         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9383         (recpy_func_getset): New static object.
9384         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9385         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9386
9387 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9388
9389         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9390         (btpy_object, btpy_insn_type, btpy_new): Remove.
9391         (btpy_list_object): Use gdb.RecordInstruction type instead of
9392         gdb.BtraceInstruction type.
9393         (btrace_insn_from_recpy_insn): New function.
9394         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9395         btpy_new.
9396         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9397         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9398         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9399         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9400         instead of btpy_object.
9401         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9402         btpy_insn_data, btpy_insn_decode): Rename to ...
9403         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9404         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9405         recpy_bt_insn_decode): This.  Also, use new helper functions.
9406         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9407         recpy_insn_type.
9408         (btpy_insn_getset): Remove.
9409         (gdbpy_initialize_btrace): Remove code to initialize
9410         gdb.BtraceInstruction.  Use recpy_element_object.
9411         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9412         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9413         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9414         * python/py-record.c (recpy_insn_type): New static object.
9415         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9416         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9417         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9418         New function.
9419         (recpy_insn_getset): New static object.
9420         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9421         * python/py-record.h (recpy_element_object): New typedef.
9422         (recpy_insn_type, recpy_insn_new): New export.
9423
9424 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9425
9426         * py-record-btrace.c (btpy_insn_new): Removed.
9427         (btpy_insn_or_gap_new): New function.
9428         (btpy_insn_error): Removed.
9429         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9430         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9431         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9432         btpy_insn_or_gap_new instead of btpy_insn_new.
9433         (btpy_insn_getset): Remove btpy_insn_error.
9434         * py-record.c (recpy_gap_type): New static object.
9435         (recpy_gap_object): New typedef.
9436         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9437         recpy_gap_reason_string): New function.
9438         (recpy_gap_getset): New static object.
9439         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9440         * py-record.h (recpy_gap_new): New export.
9441
9442 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9443
9444         * python/py-record.c (recpy_ptid): Remove.
9445         (recpy_record_getset): Remove recpy_ptid.
9446
9447 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9448
9449         * btrace.c (btrace_fetch): Set inferior_ptid.
9450         * python/py-record-btrace.c: Add "py-record.h" include.
9451         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9452         recpy_bt_end, recpy_bt_instruction_history,
9453         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9454         in gdb.Record object instead of current ptid.
9455         * python/py-record.c: Include new "py-record.h" file.
9456         (recpy_record_object): Moved to py-record.h.
9457         * python/py-record.h: New file.
9458
9459 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9460
9461         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9462         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9463         indentation.
9464
9465 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9466
9467         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9468         the past maintainers section.
9469
9470 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9471
9472         * infcmd.c (get_return_value): Use regcache ctor, and remove
9473         cleanup.
9474
9475 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9476             Pedro Alves  <palves@redhat.com>
9477
9478         * regcache.c (regcache::regcache): New tag dispatch ctor.
9479         (do_cooked_read): Moved above.
9480         (regcache_dup): Use the tag dispatch ctor..
9481         * regcache.h (regcache): Declare ctor, delete copy ctor and
9482         assignment operator, remove friend regcache_dup.
9483
9484 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9485
9486         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9487         call method save instead of regcache_cpy.
9488         * regcache.h (struct regcache): Make regcache_dup a friend.
9489
9490 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9491
9492         * regcache.c (struct regcache): Move to regcache.h
9493         (regcache::arch): New method.
9494         (regcache_get_ptid): Update.
9495         (get_regcache_arch): Call arch method.
9496         (get_regcache_aspace): Call method aspace.
9497         (register_buffer): Change it to method.
9498         (regcache_save): Change it to regcache::save.
9499         (regcache_restore): Likewise.
9500         (regcache_cpy_no_passthrough): Remove the declaration.
9501         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9502         (regcache_cpy_no_passthrough): Change it to method
9503         cpy_no_passthrough.
9504         (regcache_register_status): Change it to method
9505         get_register_status.
9506         (regcache_invalidate): Change it to method invalidate.
9507         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9508         (regcache_raw_update): Change it to method raw_update.
9509         (regcache_raw_read): Likewise.
9510         (regcache_raw_read_signed): Likewise.
9511         (regcache_raw_read_unsigned): Likewise.
9512         (regcache_raw_write_signed): Likewise.
9513         (regcache_raw_write_unsigned): Likewise.
9514         (regcache_cooked_read): Likewise.
9515         (regcache_cooked_read_value): Likewise.
9516         (regcache_cooked_read_signed): Likewise.
9517         (regcache_cooked_read_unsigned): Likewise.
9518         (regcache_cooked_write_signed): Likewise.
9519         (regcache_cooked_write_unsigned): Likewise.
9520         (regcache_raw_set_cached_value): Likewise.
9521         (regcache_raw_write): Likewise.
9522         (regcache_cooked_write): Likewise.
9523         (regcache_xfer_part): Likewise.
9524         (regcache_raw_read_part): Likewise.
9525         (regcache_raw_write_part): Likewise.
9526         (regcache_cooked_read_part): Likewise.
9527         (regcache_cooked_write_part): Likewise.
9528         (regcache_raw_supply): Likewise.
9529         (regcache_raw_collect): Likewise.
9530         (regcache_transfer_regset): Likewise.
9531         (regcache_supply_regset): Likewise.
9532         (regcache_collect_regset): Likewise.
9533         (regcache_debug_print_register): Likewise.
9534         (enum regcache_dump_what): Move it to regcache.h.
9535         (regcache_dump): Change it to method dump.
9536         * regcache.h (enum regcache_dump_what): New.
9537         (class regcache): New.
9538         * target.c (target_fetch_registers): Call method
9539         debug_print_register.
9540         (target_store_registers): Likewise.
9541
9542 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9543
9544         * windows-nat.c (struct lm_info_windows): Initialize field.
9545         (windows_make_so): Allocate lm_info_windows with new.
9546         (windows_free_so): Free lm_info_windows with delete.
9547
9548 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9549
9550         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9551         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9552         cleanup.
9553         (darwin_free_so): Free lm_info_darwin with delete.
9554
9555 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9556
9557         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9558         <l_addr_p>: Change type to bool.
9559         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9560         (svr4_free_so): Free lm_info_svr4 with delete.
9561         (svr4_copy_library_list): Replace memcpy with call to copy
9562         constructor.
9563         (library_list_start_library, svr4_default_sos): Allocate
9564         lm_info_svr4 with new.
9565
9566 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9567
9568         * solib-target.c (struct lm_info_target): Add destructor,
9569         initialize fields.
9570         <name>: Change type to std::string.
9571         (library_list_start_library): Allocate lm_info_target with new.
9572         (solib_target_free_library_list): Free lm_info_target with
9573         delete.
9574         (solib_target_current_sos): Adapt to std::string.
9575         (solib_target_free_so): Free lm_info_target with delete.
9576
9577 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9578
9579         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9580         fields.
9581         (frv_current_sos): Allocate lm_info_frv with new.
9582         (frv_relocate_main_executable): Free lm_info_frv with delete,
9583         allocate with new.
9584         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9585
9586 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9587
9588         * solib-frv.c (struct lm_info_frv): Fix indentation.
9589
9590 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9591
9592         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9593         map field.
9594         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9595         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9596         and allocate with new.
9597         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9598
9599 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9600
9601         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9602         <filename, member_name>: Change type to std::string.
9603         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9604         (library_list_start_library): Allocate lm_info_aix with new.
9605         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9606         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9607         with copy constructor.
9608
9609 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9610
9611         * solist.h (struct lm_info): Remove.
9612         (struct lm_info_base): New class.
9613         (struct so_list) <lm_info>: Change type to lm_info_base *.
9614         * nto-tdep.c (struct lm_info): Remove.
9615         (lm_addr): Adjust.
9616         * solib-aix.c (struct lm_info): Rename to ...
9617         (struct lm_info_aix): ... this.  Extend lm_info_base.
9618         (lm_info_p): Rename to ...
9619         (lm_info_aix_p): ... this, and adjust.
9620         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9621         solib_aix_parse_libraries, library_list_start_library,
9622         solib_aix_free_library_list, solib_aix_parse_libraries,
9623         solib_aix_get_library_list,
9624         solib_aix_relocate_section_addresses, solib_aix_free_so,
9625         solib_aix_get_section_offsets,
9626         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9627         Adjust.
9628         (struct solib_aix_inferior_data) <library_list>: Adjust.
9629         * solib-darwin.c (struct lm_info): Rename to ...
9630         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9631         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9632         * solib-dsbt.c (struct lm_info): Rename to ...
9633         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9634         (struct dsbt_info) <main_executable_lm_info): Adjust.
9635         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9636         dsbt_relocate_section_addresses): Adjust.
9637         * solib-frv.c (struct lm_info): Rename to ...
9638         (struct lm_info_frv): ... this.  Extend lm_info_base.
9639         (main_executable_lm_info): Adjust.
9640         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9641         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9642         find_canonical_descriptor_in_load_object,
9643         frv_fdpic_find_canonical_descriptor): Adjust.
9644         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9645         to lm_info_svr4.
9646         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9647         svr4_clear_so, svr4_copy_library_list,
9648         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9649         svr4_current_sos, svr4_fetch_objfile_link_map,
9650         solist_update_incremental): Adjust.
9651         * solib-svr4.h (struct lm_info_svr4): Move here from
9652         solib-svr4.c.
9653         * solib-target.c (struct lm_info): Rename to ...
9654         (struct lm_info_target): ... this.  Extend lm_info_base.
9655         (lm_info_p): Rename to ...
9656         (lm_info_target_p): ... this.
9657         (solib_target_parse_libraries, library_list_start_segment,
9658         library_list_start_section, library_list_start_library,
9659         library_list_end_library, solib_target_free_library_list,
9660         solib_target_current_sos, solib_target_free_so,
9661         solib_target_relocate_section_addresses): Adjust.
9662         * windows-nat.c (struct lm_info): Rename to ...
9663         (struct lm_info_windows): ... this.  Extend lm_info_base.
9664         (windows_make_so, handle_load_dll, handle_unload_dll,
9665         windows_xfer_shared_libraries): Adjust.
9666
9667 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9668
9669         * solib-darwin.c (struct darwin_so_list): Remove.
9670         (darwin_current_sos): Allocate an so_list object instead of a
9671         darwin_so_list, separately allocate an lm_info object.
9672         (darwin_free_so): Free lm_info.
9673
9674 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9675
9676         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9677         with fprintf_filtered.
9678
9679 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9680
9681         * regcache.c (regcache::regcache): New function.
9682         (regcache::~regcache): New function.
9683         (regcache_xmalloc_1): Remove.
9684         (regcache_xmalloc): Call new regcache.
9685         (regcache_xfree): Call delete regcache.
9686         (get_thread_arch_aspace_regcache): Call new regcache.
9687
9688 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9689
9690         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9691         lwp instead of ptid_get_lwp.
9692
9693 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9694
9695         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9696         lwp_info instead of getting from inferior_ptid.
9697
9698 2017-04-27  Keith Seitz  <keiths@redhat.com>
9699
9700         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9701         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9702         (CV_CONVERSION_BADNESS): Define.
9703         (rank_one_type): Remove overly restrictive rvalue reference
9704         rank checks.
9705         Add cv-qualifier checks and subranks for type equality.
9706         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9707         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9708         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9709
9710 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9711
9712         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9713         count when creating the object.
9714
9715 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9716             Ulrich Weigand  <uweigand@de.ibm.com>
9717
9718         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9719         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9720         is used in AIX.
9721         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9722         (process_xcoff_symbol): Likewise.
9723         (scan_xcoff_symtab): Likewise.
9724
9725 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9726
9727         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9728         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9729         (ia64_access_reg): Use get_frame_register_unsigned.
9730         (ia64_access_rse_reg): Likewise.
9731         (ia64_libunwind_frame_prev_register): Likewise.
9732
9733 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9734
9735         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9736         * gdbarch.c: Regenerated.
9737         * gdbarch.h: Regenerated.
9738         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9739         visibility external.
9740         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9741         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9742         (enum cfa_how_kind): Move to ...
9743         (struct dwarf2_frame_state_reg_info): Likewise.
9744         (struct dwarf2_frame_state): Likewise.
9745         * dwarf2-frame.h: ... here.
9746         (dwarf2_frame_state_alloc_regs): New declaration.
9747         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9748         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9749
9750 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9751
9752         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9753         regcache_raw_read_unsigned.
9754         (xtensa_pseudo_register_write): Likewise.
9755
9756 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9757
9758         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9759         (nds32_pseudo_register_write): Likewise.
9760
9761 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9762
9763         * regcache.c (struct regcache) <readonly_p>: Change its type
9764         to bool.
9765         (regcache_xmalloc_1): Update parameter type and callers update.
9766
9767 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9768
9769         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9770         set_gdbarch_wchar_bit.
9771         * arm-tdep.c (arm_gdbarch_init): Likewise.
9772
9773 2017-04-25  Pedro Alves  <palves@redhat.com>
9774
9775         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9776         (BothAreRelocatable, memcopy, memmove): Don't define.
9777         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9778         macros.
9779
9780 2017-04-25  Pedro Alves  <palves@redhat.com>
9781
9782         * common/common-defs.h: Include "common/poison.h".
9783         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9784         and adjust.
9785         * common/poison.h: New file.
9786         * common/traits.h: Include <type_traits>.
9787         (Not, Or, Requires): New, moved from common/function-view.h.
9788
9789 2017-04-25  Pedro Alves  <palves@redhat.com>
9790
9791         * breakpoint.h (struct breakpoint): In-class initialize all
9792         fields.  Make boolean fields "bool".
9793         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9794         memset call and initializations no longer necessary.
9795
9796 2017-04-25  Pedro Alves  <palves@redhat.com>
9797
9798         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9799         reference.
9800         (pt_btrace_insn): New function.
9801         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9802
9803 2017-04-25  Pedro Alves  <palves@redhat.com>
9804
9805         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9806         "base" field and inherit from "bp_location" instead.  Add
9807         non-default ctor.
9808         (allocate_location_exception): Use new non-default ctor.
9809         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9810         (init_bp_location): Convert to ...
9811         (bp_location::bp_location): ... this new ctor, and remove memset
9812         call.
9813         (base_breakpoint_allocate_location): Use the new non-default ctor.
9814         * breakpoint.h (bp_location): Now a class.  Declare default and
9815         non-default ctors.  In-class initialize all members.
9816         (init_bp_location): Remove declaration.
9817
9818 2017-04-25  Pedro Alves  <palves@redhat.com>
9819
9820         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9821         assignment operator.
9822
9823 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9824
9825         * doublest.c (convert_doublest_to_floatformat): Call
9826         floatformat_totalsize_bytes.
9827
9828 2017-04-22  Tom Tromey  <tom@tromey.com>
9829
9830         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9831         ui_out_emit_list.
9832         * stack.c (print_frame): Use ui_out_emit_list.
9833         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9834         ui_out_emit_list.
9835         * mi/mi-main.c (print_one_inferior)
9836         (mi_cmd_data_list_register_names)
9837         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9838         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9839         ui_out_emit_list.
9840         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9841         (mi_output_solib_attribs): Use ui_out_emit_list,
9842         ui_out_emit_tuple.
9843         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9844         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9845         (mi_cmd_stack_list_args, list_args_or_locals): Use
9846         ui_out_emit_list.
9847         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9848         * breakpoint.c (print_solib_event, output_thread_groups): Use
9849         ui_out_emit_list.
9850
9851 2017-04-22  Tom Tromey  <tom@tromey.com>
9852
9853         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9854         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9855         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9856
9857 2017-04-22  Tom Tromey  <tom@tromey.com>
9858
9859         * tracepoint.c (tvariables_info_1)
9860         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9861
9862 2017-04-22  Tom Tromey  <tom@tromey.com>
9863
9864         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9865         annotate_arg_emitter.
9866         * breakpoint.c (print_mention_watchpoint)
9867         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9868         * annotate.h (struct annotate_arg_emitter): New.
9869
9870 2017-04-22  Tom Tromey  <tom@tromey.com>
9871
9872         * record-btrace.c (record_btrace_insn_history)
9873         (record_btrace_insn_history_range, record_btrace_call_history)
9874         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9875         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9876         ui_out_emit_tuple.
9877         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9878         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9879         * skip.c (skip_info): Use ui_out_emit_tuple.
9880         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9881         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9882         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9883         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9884         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9885         ui_out_emit_tuple.
9886         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9887         (output_register, mi_cmd_data_read_memory)
9888         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9889         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9890         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9891         Use ui_out_emit_tuple.
9892         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9893         ui_out_emit_tuple.
9894         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9895         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9896         * linux-thread-db.c (info_auto_load_libthread_db): Use
9897         ui_out_emit_tuple.
9898         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9899         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9900         * disasm.c (do_mixed_source_and_assembly_deprecated)
9901         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9902         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9903         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9904         * breakpoint.c (print_one_breakpoint_location)
9905         (print_one_breakpoint): Use ui_out_emit_tuple.
9906         * auto-load.c (print_script, info_auto_load_cmd): Use
9907         ui_out_emit_tuple.
9908         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9909
9910 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9911
9912         * thread.c (print_thread_info_1): Remove dead code.
9913
9914 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9915
9916         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9917         GDB_SELF_TEST.
9918         * arm-tdep.c (selftests::arm_record_test): Likewise.
9919
9920 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9921
9922         * regcache.c (regcache_restore): Remove argument 2.  Replace
9923         argument 3 with regcache.  Get register status from
9924         src->register_status and get register contents from
9925         register_buffer (src, regnum).
9926         (regcache_cpy): Update.
9927
9928 2017-04-19  Pedro Alves  <palves@redhat.com>
9929
9930         * gdbthread.h (thread): Add missing closing parenthesis in
9931         comment.
9932
9933 2017-04-19  Pedro Alves  <palves@redhat.com>
9934
9935         * common/refcounted-object.h: New file.
9936         * gdbthread.h: Include "common/refcounted-object.h".
9937         (thread_info): Inherit from refcounted_object and add comments.
9938         (thread_info::incref, thread_info::decref)
9939         (thread_info::m_refcount): Delete.
9940         (thread_info::deletable): Use the refcounted_object::refcount()
9941         method.
9942         * inferior.c (current_inferior_): Add comment.
9943         (set_current_inferior): Increment/decrement refcounts.
9944         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9945         not-deletable instead of comparing with the current inferior.
9946         (initialize_inferiors): Increment the initial inferior's refcount.
9947         * inferior.h (struct inferior): Forward declare.
9948         Include "common/refcounted-object.h".
9949         (current_inferior, set_current_inferior): Move declaration to
9950         before struct inferior's definition, and fix comment.
9951         (inferior): Inherit from refcounted_object.  Add comments.
9952         * thread.c (switch_to_thread_no_regs): Reference the thread's
9953         inferior pointer directly instead of doing a ptid lookup.
9954         (switch_to_no_thread): New function.
9955         (switch_to_thread(thread_info *)): New function, factored out
9956         from ...
9957         (switch_to_thread(ptid_t)): ... this.
9958         (restore_current_thread): Delete.
9959         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9960         fields, and add 'inf' field.
9961         (do_restore_current_thread_cleanup): Check whether old->inf is
9962         alive instead of looking up an inferior by ptid.  Use
9963         switch_to_thread and switch_to_no_thread.
9964         (restore_current_thread_cleanup_dtor): Use old->inf directly
9965         instead of lookup up an inferior by id.  Decref the inferior.
9966         Don't restore 'removable'.
9967         (make_cleanup_restore_current_thread): Same the inferior pointer
9968         in old, instead of the inferior number.  Incref the inferior.
9969         Don't save/clear 'removable'.
9970
9971 2017-04-19  Pedro Alves  <palves@redhat.com>
9972
9973         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9974         unittests/scoped_restore-selftests.c.
9975         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9976         * common/scoped_restore.h (scoped_restore_base): Make "class".
9977         (scoped_restore_base::release): New public method.
9978         (scoped_restore_base::scoped_restore_base): New protected ctor.
9979         (scoped_restore_base::m_saved_var): New protected field.
9980         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9981         scoped_restore_base base class instead of m_saved_var directly.
9982         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9983         (scoped_restore_tmpl::scoped_restore_tmpl(const
9984         scoped_restore_tmpl<T>&)): Likewise.
9985         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9986         method.
9987         (scoped_restore_tmpl::saved_var): New method.
9988         (scoped_restore_tmpl::m_saved_var): Delete.
9989         * inferior.h (inferior::detaching): Now a bool.
9990         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9991         cleanup.
9992         * unittests/scoped_restore-selftests.c: New file.
9993
9994 2017-04-19  Pedro Alves  <palves@redhat.com>
9995
9996         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9997         Re-sort in alphabetic order.
9998
9999 2017-04-18  Pedro Alves  <palves@redhat.com>
10000
10001         * xml-support.c (obstack_xml_printf): Delete.
10002         * xml-support.h (obstack_xml_printf): Delete.
10003
10004 2017-04-18  Pedro Alves  <palves@redhat.com>
10005
10006         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10007         vdebug, verror, body_text, start_element, end_element, name,
10008         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10009         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10010         is_xinclude>: Make private and add m_ prefix.
10011         (gdb_xml_parser::body_text): New method, based on ...
10012         (gdb_xml_body_text): ... this.  Adjust.
10013         (gdb_xml_parser::vdebug): New method, based on ...
10014         (gdb_xml_debug): ... this.  Adjust.
10015         (gdb_xml_parser::verror): New method, based on ...
10016         (gdb_xml_error): ... this.  Adjust.
10017         (gdb_xml_parser::start_element): New method, based on ...
10018         (gdb_xml_start_element): ... this.  Adjust.
10019         (gdb_xml_start_element_wrapper): Defer to
10020         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10021         (gdb_xml_parser::end_element): New method, based on ...
10022         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10023         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10024         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10025         (gdb_xml_parser::use_dtd): New method, based on ...
10026         (gdb_xml_use_dtd): ... this.  Adjust.
10027         (gdb_xml_parser::parse): New method, based on ...
10028         (gdb_xml_parse): ... this.  Adjust.
10029         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10030         (xinclude_start_include): Adjust to call the parser's name method.
10031         (xml_xinclude_default, xml_xinclude_start_doctype)
10032         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10033         method.
10034         (xml_process_xincludes): Adjust to call parser methods.
10035         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10036         declarations.
10037
10038 2017-04-18  Pedro Alves  <palves@redhat.com>
10039
10040         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10041         gdb::optional<std::string>.
10042         * xml-support.c: Include <string>.
10043         (scope_level::scope_level(scope_level &&))
10044         (scope_level::~scope_level): Delete.
10045         (scope_level::body): Now a std::string.
10046         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10047         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10048         parameter.
10049         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10050         (xinclude_parsing_data::output): Now a std::string reference.
10051         (xinclude_start_include): Adjust.
10052         (xml_xinclude_default): Adjust.
10053         (xml_process_xincludes): Add 'output' parameter, and return bool.
10054         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10055         and return bool.
10056         * xml-tdesc.c: Include <unordered_map> and <string>.
10057         (tdesc_xml_cache): Delete.
10058         (tdesc_xml_cache_s): Delete.
10059         (xml_cache): Now an std::unordered_map.
10060         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10061         (target_fetch_description_xml): Change return type to
10062         gdb::optional<std::string>, and adjust.
10063         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10064         (target_fetch_description_xml): Change return type to
10065         gdb::optional<std::string>.
10066
10067 2017-04-18  Pedro Alves  <palves@redhat.com>
10068
10069         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10070         unittests/optional-selftests.c.
10071         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10072         * unittests/optional-selftests.c: New file.
10073         * unittests/optional/assignment/1.cc: New file.
10074         * unittests/optional/assignment/2.cc: New file.
10075         * unittests/optional/assignment/3.cc: New file.
10076         * unittests/optional/assignment/4.cc: New file.
10077         * unittests/optional/assignment/5.cc: New file.
10078         * unittests/optional/assignment/6.cc: New file.
10079         * unittests/optional/assignment/7.cc: New file.
10080         * unittests/optional/cons/copy.cc: New file.
10081         * unittests/optional/cons/default.cc: New file.
10082         * unittests/optional/cons/move.cc: New file.
10083         * unittests/optional/cons/value.cc: New file.
10084         * unittests/optional/in_place.cc: New file.
10085         * unittests/optional/observers/1.cc: New file.
10086         * unittests/optional/observers/2.cc: New file.
10087
10088 2017-04-18  Pedro Alves  <palves@redhat.com>
10089
10090         * common/gdb_optional.h: Include common/traits.h.
10091         (in_place_t): New type.
10092         (in_place): New constexpr variable.
10093         (optional::optional): Remove member initialization of
10094         m_instantiated.
10095         (optional::optional(in_place_t...)): New constructor.
10096         (optional::~optional): Use reset.
10097         (optional::optional(const optional&)): New.
10098         (optional::optional(const optional&&)): New.
10099         (optional::optional(T &)): New.
10100         (optional::optional(T &&)): New.
10101         (operator::operator=(const optional &)): New.
10102         (operator::operator=(optional &&)): New.
10103         (operator::operator= (const T &))
10104         (operator::operator= (T &&))
10105         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10106         (operator::reset): New.
10107         (operator::m_instantiated):: Add in-class initializer.
10108         * common/traits.h: Include <type_traits>.
10109         (struct And): New types.
10110
10111 2017-04-18  Pedro Alves  <palves@redhat.com>
10112
10113         * xml-support.c: Include <vector>.
10114         (scope_level::scope_level(const gdb_xml_element *))
10115         (scope_level::scope_level(scope_level&&)): New.
10116         (scope_level::~scope_level): New.
10117         (scope_level_s): Delete.
10118         (gdb_xml_parser::scopes): Now a std::vector.
10119         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10120         Use std::vector.
10121         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10122         scope cleanup code.
10123         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10124         of the scopes member.  Use std::vector::emplace_back.
10125
10126 2017-04-18  Pedro Alves  <palves@redhat.com>
10127
10128         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10129         a bool.
10130         (gdb_xml_end_element): Change type of first parameter.
10131         (gdb_xml_cleanup): Rename to ...
10132         (gdb_xml_parser::~gdb_xml_parser): ... this.
10133         (gdb_xml_create_parser_and_cleanup): Delete with ...
10134         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10135         to this new ctor.
10136         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10137         using gdb_xml_create_parser_and_cleanup.
10138         (xinclude_parsing_data): Add ctor/dtor.
10139         (xml_xinclude_cleanup): Delete.
10140         (xml_process_xincludes): Create a local xinclude_parsing_data
10141         instead of heap-allocating one.  Create a local gdb_xml_parser
10142         instead of heap-allocating one with
10143         gdb_xml_create_parser_and_cleanup.
10144
10145 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10146
10147         PR threads/20743
10148         * fbsd-nat.c (resume_one_thread_cb): Remove.
10149         (resume_all_threads_cb): Remove.
10150         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10151         iterate_over_threads.
10152
10153 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10154
10155         * NEWS: Create a new section for the next release branch.
10156         Rename the section of the current branch, now that it has
10157         been cut.
10158
10159 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10160
10161         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10162         * version.in: Bump version to 8.0.50.DATE-git.
10163
10164 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10165
10166         PR gdb/21385
10167         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10168         independently of the host, and fix build breakage on Cygwin.
10169
10170 2017-04-13  Pedro Alves  <palves@redhat.com>
10171
10172         * inferior.c (free_inferior): Convert to ...
10173         (inferior::~inferior): ... this dtor.
10174         (inferior::inferior): New ctor, factored out from ...
10175         (add_inferior_silent): ... here.  Allocate the inferior with a new
10176         expression.
10177         (delete_inferior): Call delete instead of free_inferior.
10178         * inferior.h (gdb_environ, continuation): Forward declare.
10179         (inferior): Now a class.  Add in-class initialization to all
10180         members.  Make boolean fields bool, except 'detaching'.
10181         (inferior::inferior): New explicit ctor.
10182         (inferior::~inferior): New.
10183
10184 2017-04-13  Pedro Alves  <palves@redhat.com>
10185
10186         * inferior.c (init_inferior_list): Delete.
10187         * inferior.h (init_inferior_list): Delete.
10188
10189 2017-04-13  Pedro Alves  <palves@redhat.com>
10190
10191         PR threads/13217
10192         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10193         (top level): Call it twice, with different thread sets.
10194
10195 2017-04-13  Pedro Alves  <palves@redhat.com>
10196
10197         * thread.c: Include <algorithm>.
10198         (thread_array_cleanup): Delete.
10199         (scoped_inc_dec_ref): New class.
10200         (live_threads_count): New function.
10201         (set_thread_refcount): Delete.
10202         (tp_array_compar_ascending): Now a bool.
10203         (tp_array_compar): Convert to a std::sort comparison function.
10204         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10205         and live_threads_count.
10206
10207 2017-04-13  Pedro Alves  <palves@redhat.com>
10208
10209         * infrun.c (follow_fork_inferior): Also switch the current
10210         inferior.
10211
10212 2017-04-13  Pedro Alves  <palves@redhat.com>
10213
10214         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10215         before calling create_internal_breakpoint.
10216
10217 2017-04-13  Pedro Alves  <palves@redhat.com>
10218
10219         * fork-child.c (execv_argv): New class.
10220         (breakup_args): Refactored as ...
10221         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10222         Copy arguments to storage and replace separators with NULL
10223         terminators in place.
10224         (escape_bang_in_quoted_argument): Adjust to return bool.
10225         (execv_argv::execv_argv): New ctor.
10226         (execv_argv::init_for_shell): New method, factored out from
10227         fork_inferior.  Don't strdup strings into the vector.
10228         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10229         Remove free_vector_argv call.
10230
10231 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10232
10233         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10234         tdep->rx_psw_type.
10235
10236 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10237
10238         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10239         * rx-tdep.c (rx_gdbarch_init): Likewise.
10240
10241 2017-04-13  Pedro Alves  <palves@redhat.com>
10242
10243         * breakpoint.h (struct breakpoint): Reindent.
10244
10245 2017-04-13  Pedro Alves  <palves@redhat.com>
10246
10247         * breakpoint.c (bp_location): Rename to ...
10248         (bp_locations): ... this.  All references updated.
10249         (bp_location_count): Rename to ...
10250         (bp_locations_count): ... this.  All references updated.
10251         (bp_location_placed_address_before_address_max): Rename to ...
10252         (bp_locations_placed_address_before_address_max): ... this.  All
10253         references updated.
10254         (bp_location_shadow_len_after_address_max): Rename to ...
10255         (bp_locations_shadow_len_after_address_max): ... this.  All
10256         references updated.
10257         (bp_location_compare_addrs): Rename to ...
10258         (bp_locations_compare_addrs): ... this.  All references updated.
10259         (bp_location_compare):Rename to ...
10260         (bp_locations_compare): ... this.  All references updated.
10261         (bp_location_target_extensions_update): Rename to ...
10262         (bp_locations_target_extensions_update): ... this.  All references
10263         updated.
10264
10265 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10266
10267         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10268         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10269         'sgtty.h'.
10270         * common/gdb_termios.h: New file, with parts of "terminal.h".
10271         * inflow.c: Include "gdb_termios.h".
10272         * ser-unix.c: Include "gdb_termios.h".
10273         * terminal.h: Move terminal-related defines to
10274         "common/gdb_termios.h".
10275
10276 2017-04-12  Tom Tromey  <tom@tromey.com>
10277
10278         * probe.c (parse_probes): Update.
10279         * location.h (delete_event_location): Don't declare.
10280         (event_location_deleter::operator()): Update.
10281         * location.c (event_location_deleter::operator()): Rename from
10282         delete_event_location.
10283         * linespec.h (linespec_result) <location>: Change type to
10284         event_location_up.
10285         * linespec.c (canonicalize_linespec, event_location_to_sals)
10286         (decode_objc): Update.
10287         (linespec_result): Don't call delete_event_location.
10288         * breakpoint.c (create_breakpoints_sal)
10289         (bkpt_probe_create_sals_from_location)
10290         (strace_marker_create_sals_from_location): Update.
10291
10292 2017-04-12  Tom Tromey  <tom@tromey.com>
10293
10294         * linespec.h (struct linespec_result): Add constructor and
10295         destructor.
10296         (init_linespec_result, destroy_linespec_result)
10297         (make_cleanup_destroy_linespec_result): Don't declare.
10298         * linespec.c (init_linespec_result): Remove.
10299         (linespec_result::~linespec_result): Rename from
10300         destroy_linespec_result.  Update.
10301         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10302         Remove.
10303         * breakpoint.c (create_breakpoint, break_range_command)
10304         (decode_location_default): Update.
10305         * ax-gdb.c (agent_command_1): Update.
10306
10307 2017-04-12  Tom Tromey  <tom@tromey.com>
10308
10309         * remote.c (remote_download_tracepoint): Update.
10310         * python/py-breakpoint.c (bppy_get_location): Update.
10311         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10312         (gdbscm_breakpoint_location): Update.
10313         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10314         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10315         Change type to event_location_up.
10316         * breakpoint.c (create_overlay_event_breakpoint)
10317         (create_longjmp_master_breakpoint)
10318         (create_std_terminate_master_breakpoint)
10319         (create_exception_master_breakpoint)
10320         (breakpoint_event_location_empty_p, print_breakpoint_location)
10321         (print_one_breakpoint_location, create_thread_event_breakpoint)
10322         (init_breakpoint_sal, create_breakpoint)
10323         (print_recreate_ranged_breakpoint, break_range_command)
10324         (init_ada_exception_breakpoint, say_where): Update.
10325         (base_breakpoint_dtor): Don't call delete_event_location.
10326         (bkpt_print_recreate, tracepoint_print_recreate)
10327         (dprintf_print_recreate, update_static_tracepoint)
10328         (breakpoint_re_set_default): Update.
10329
10330 2017-04-12  Tom Tromey  <tom@tromey.com>
10331
10332         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10333         type of "to_do".  Update.
10334         (compute_stack_depth): Use std::vector.
10335
10336 2017-04-12  Tom Tromey  <tom@tromey.com>
10337
10338         * printcmd.c (find_instruction_backward): Use std::vector.
10339
10340 2017-04-12  Tom Tromey  <tom@tromey.com>
10341
10342         * symfile.c (objfilep): Remove typedef.
10343         (reread_symbols): Use a std::vector.
10344
10345 2017-04-12  Tom Tromey  <tom@tromey.com>
10346
10347         * mi/mi-main.c (exec_direction_forward): Remove.
10348         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10349         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10350         scoped_restore.
10351         * guile/guile.c (guile_repl_command, guile_command)
10352         (gdbscm_execute_gdb_command): Use scoped_restore.
10353         * go-exp.y (go_parse): Use scoped_restore.
10354         * d-exp.y (d_parse): Use scoped_restore.
10355         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10356         * c-exp.y (c_parse): Use scoped_restore.
10357
10358 2017-04-12  Tom Tromey  <tom@tromey.com>
10359
10360         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10361         (mi_parse): Update return type.
10362         (mi_parse_free): Remove.
10363         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10364         (mi_parse::~mi_parse): Rename from mi_parse_free.
10365         (mi_parse_cleanup): Remove.
10366         (mi_parse): Return a unique_ptr.  Use new.
10367         * mi/mi-main.c (mi_execute_command): Update.
10368
10369 2017-04-12  Tom Tromey  <tom@tromey.com>
10370
10371         * location.c (explicit_location_lex_one): Return a
10372         unique_xmalloc_ptr.
10373         (string_to_explicit_location): Update.  Remove cleanups.
10374
10375 2017-04-12  Tom Tromey  <tom@tromey.com>
10376
10377         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10378         (compare_value_and_voffset): Change type.  Update.
10379         (compute_vtable_size): Change type of "offset_vec".
10380         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10381         (gnuv3_get_typeid): Remove extraneous declaration.
10382
10383 2017-04-12  Tom Tromey  <tom@tromey.com>
10384
10385         * charset.h (wchar_iterator): Fix comment.
10386
10387 2017-04-12  Tom Tromey  <tom@tromey.com>
10388
10389         * charset.c (iconv_wrapper): New class.
10390         (cleanup_iconv): Remove.
10391         (convert_between_encodings): Use it.
10392
10393 2017-04-12  Tom Tromey  <tom@tromey.com>
10394
10395         * symfile.h (increment_reading_symtab): Update type.
10396         * symfile.c (decrement_reading_symtab): Remove.
10397         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10398         * psymtab.c (psymtab_to_symtab): Update.
10399         * dwarf2read.c (dw2_instantiate_symtab): Update.
10400
10401 2017-04-12  Tom Tromey  <tom@tromey.com>
10402
10403         * jit.c (struct jit_reader): Declare separately.  Add constructor
10404         and destructor.  Change type of "handle".
10405         (loaded_jit_reader): Define separately.
10406         (jit_reader_load): Update.  New "new".
10407         (jit_reader_unload_command): Use "delete".
10408         * gdb-dlfcn.h (struct dlclose_deleter): New.
10409         (gdb_dlhandle_up): New typedef.
10410         (gdb_dlopen, gdb_dlsym): Update types.
10411         (gdb_dlclose): Remove.
10412         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10413         (gdb_dlsym): Change type of "handle".
10414         (make_cleanup_dlclose): Remove.
10415         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10416         * compile/compile-c-support.c (load_libcc): Update.
10417
10418 2017-04-12  Tom Tromey  <tom@tromey.com>
10419
10420         * symtab.h (find_pcs_for_symtab_line): Change return type.
10421         * symtab.c (find_pcs_for_symtab_line): Change return type.
10422         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10423         type of "vec".  Update.
10424         (ltpy_get_pcs_for_line): Update.
10425         * linespec.c (decode_digits_ordinary): Update.
10426
10427 2017-04-12  Tom Tromey  <tom@tromey.com>
10428
10429         * tracepoint.c (actions_command): Update.
10430         * python/python.c (python_command, python_interactive_command):
10431         Update.
10432         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10433         * guile/guile.c (guile_command): Update.
10434         * defs.h (read_command_lines, read_command_lines_1): Return
10435         command_line_up.
10436         (command_lines_deleter): New struct.
10437         (command_line_up): New typedef.
10438         * compile/compile.c (compile_code_command)
10439         (compile_print_command): Update.
10440         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10441         command_line_up.
10442         (make_cleanup_free_command_lines): Remove.
10443         * cli/cli-script.c (get_command_line, read_command_lines_1)
10444         (copy_command_lines): Return command_line_up.
10445         (while_command, if_command, read_command_lines, define_command)
10446         (document_command): Update.
10447         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10448         Remove.
10449         * breakpoint.h (breakpoint_set_commands): Change type of
10450         "commands".
10451         * breakpoint.c (breakpoint_set_commands): Change type of
10452         "commands".  Update.
10453         (do_map_commands_command, update_dprintf_command_list)
10454         (create_tracepoint_from_upload): Update.
10455
10456 2017-04-12  Tom Tromey  <tom@tromey.com>
10457
10458         * tracepoint.c (scope_info): Update.
10459         * spu-tdep.c (spu_catch_start): Update.
10460         * python/python.c (gdbpy_decode_line): Update.
10461         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10462         * python/py-breakpoint.c (bppy_init): Update.
10463         * probe.c (parse_probes): Update.
10464         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10465         * location.h (event_location_deleter): New struct.
10466         (event_location_up): New typedef.
10467         (new_linespec_location, new_address_location, new_probe_location)
10468         (new_explicit_location, copy_event_location)
10469         (string_to_event_location, string_to_event_location_basic)
10470         (string_to_explicit_location): Update return type.
10471         (make_cleanup_delete_event_location): Remove.
10472         * location.c (new_linespec_location, new_address_location)
10473         (new_probe_location, new_explicit_location, copy_event_location):
10474         Return event_location_up.
10475         (delete_event_location_cleanup)
10476         (make_cleanup_delete_event_location): Remove.
10477         (string_to_explicit_location, string_to_event_location_basic)
10478         (string_to_event_location): Return event_location_up.
10479         * linespec.c (canonicalize_linespec, event_location_to_sals)
10480         (decode_line_with_current_source)
10481         (decode_line_with_last_displayed, decode_objc): Update.
10482         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10483         * completer.c (location_completer): Update.
10484         * cli/cli-cmds.c (edit_command, list_command): Update.
10485         * breakpoint.c (create_overlay_event_breakpoint)
10486         (create_longjmp_master_breakpoint)
10487         (create_std_terminate_master_breakpoint)
10488         (create_exception_master_breakpoint)
10489         (create_thread_event_breakpoint): Update.
10490         (init_breakpoint_sal): Update.  Remove some dead code.
10491         (create_breakpoint_sal): Change type of "location".  Update.
10492         (create_breakpoints_sal, create_breakpoint, break_command_1)
10493         (dprintf_command, break_range_command, until_break_command)
10494         (init_ada_exception_breakpoint)
10495         (strace_marker_create_sals_from_location)
10496         (update_static_tracepoint, trace_command, ftrace_command)
10497         (strace_command, create_tracepoint_from_upload): Update.
10498         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10499         * ax-gdb.c (agent_command_1): Update.
10500
10501 2017-04-12  Pedro Alves  <palves@redhat.com>
10502
10503         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10504         * configure.tgt: Handle i[34567]86-*-go32* and
10505         i[34567]86-*-msdosdjgpp*.
10506         * i386-tdep.c (i386_svr4_reg_to_regnum):
10507         Make extern.
10508         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10509         i386-go32-tdep.c.
10510         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10511         * i386-go32-tdep.c: New file.
10512         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10513         declarations.
10514
10515 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10516
10517         * aix-thread.c (pd_status2str): Change return type to const char *.
10518
10519 2017-04-12  Pedro Alves  <palves@redhat.com>
10520
10521         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10522         calls to set_gdbarch_gnu_triplet_regexp.
10523
10524 2017-04-12  Pedro Alves  <palves@redhat.com>
10525
10526         PR gdb/21323
10527         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10528         New enum value.
10529         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10530         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10531         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10532         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10533         * gdbarch.h, gdbarch.c: Regenerate.
10534         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10535         gdbarch_wchar_bit and gdbarch_wchar_signed.
10536         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10537         * arm-tdep.c (arm_gdbarch_init): Likewise.
10538         * avr-tdep.c (avr_gdbarch_init): Likewise.
10539         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10540         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10541         * i386-tdep.c (i386_go32_init_abi): Likewise.
10542         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10543         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10544         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10545         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10546         * sh-tdep.c (sh_gdbarch_init): Likewise.
10547         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10548         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10549         * windows-tdep.c (windows_init_abi): Likewise.
10550         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10551
10552 2017-04-12  Pedro Alves  <palves@redhat.com>
10553
10554         PR c++/21323
10555         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10556         cplus_primitive_type_char32_t>: New enum values.
10557         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10558         and cplus_primitive_type_char32_t.
10559         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10560         32, use the archtecture's built-in type for char16_t and char32_t,
10561         respectively.  Otherwise, fallback to init_integer_type as before,
10562         but make the type unsigned, and issue a complaint.
10563         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10564
10565 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10566
10567         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10568         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10569
10570 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10571
10572         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10573         'const char *'.
10574
10575 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10576
10577         * common/common-utils.c (free_vector_argv): New function.
10578         * common/common-utils.h: Include <vector>.
10579         (free_vector_argv): New prototype.
10580         * darwin-nat.c (darwin_create_inferior): Rewrite function
10581         prototype in order to constify "exec_file" and accept a
10582         "std::string" for "allargs".
10583         * fork-child.c: Include <vector>.
10584         (breakup_args): Rewrite function, using C++.
10585         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10586         and accept "std::string" for "allargs".  Update the code to
10587         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10588         and "execvp".
10589         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10590         order to constify "exec_file" and accept a "std::string" for
10591         "allargs".
10592         * go32-nat.c (go32_create_inferior): Likewise.
10593         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10594         * infcmd.c (run_command_1): Constify "exec_file".  Use
10595         "std::string" for inferior arguments.
10596         * inferior.h (fork_inferior): Update prototype.
10597         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10598         prototype in order to constify "exec_file" and accept a
10599         "std::string" for "allargs".
10600         * nto-procfs.c (procfs_create_inferior): Likewise.
10601         * procfs.c (procfs_create_inferior): Likewise.
10602         * remote-sim.c (gdbsim_create_inferior): Likewise.
10603         * remote.c (extended_remote_run): Update code to accept
10604         "std::string" as argument.
10605         (extended_remote_create_inferior): Rewrite function prototype in
10606         order to constify "exec_file" and accept a "std::string" for
10607         "allargs".
10608         * rs6000-nat.c (super_create_inferior): Likewise.
10609         (rs6000_create_inferior): Likewise.
10610         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10611         * windows-nat.c (windows_create_inferior): Likewise.
10612
10613 2017-04-11  Pedro Alves  <palves@redhat.com>
10614
10615         * thread.c: Fix whitespace throughout.
10616
10617 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10618
10619         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10620
10621 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10622
10623         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10624
10625 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10626
10627         PR gdb/21364
10628         * osdata.c (info_osdata): Check if 'type' is an empty string
10629         instead of NULL.
10630
10631 2017-04-10  Pedro Alves  <palves@redhat.com>
10632
10633         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10634         (ptid_to_global_thread_id, in_thread_list)
10635         (do_captured_list_thread_ids, set_resumed, set_running)
10636         (set_executing, set_stop_requested, finish_thread_state)
10637         (validate_registers_access, can_access_registers_ptid)
10638         (print_thread_info_1, switch_to_thread)
10639         (do_restore_current_thread_cleanup)
10640         (make_cleanup_restore_current_thread, thread_command)
10641         (thread_name_command): Use operator== instead of ptid_equal.
10642
10643 2017-04-10  Pedro Alves  <palves@redhat.com>
10644
10645         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10646         (current_thread_cleanup_chain): Delete.
10647         (restore_current_thread_cleanup_dtor)
10648         (make_cleanup_restore_current_thread): Remove references to
10649         current_thread_cleanup_chain.
10650
10651 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10652
10653         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10654         REG_UNKNOWN.
10655
10656 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10657
10658         PR gdb/19942
10659         * gdbthread.h (thread_info::deletable): New method.
10660         (thread_info::incref): New method.
10661         (thread_info::decref): New method.
10662         (thread_info::refcount): Move it to private.
10663         * infrun.c (save_stop_context): Call inc_refcount.
10664         (release_stop_context_cleanup): Likewise.
10665         * thread.c (set_thread_exited): New function.
10666         (init_thread_list): Delete "tp" only it is deletable, otherwise
10667         call set_thread_exited.
10668         (delete_thread_1): Call set_thread_exited.
10669         (current_thread_cleanup) <inferior_pid>: Remove.
10670         <thread>: New field.
10671         (restore_current_thread_ptid_changed): Removed.
10672         (do_restore_current_thread_cleanup): Adjust.
10673         (restore_current_thread_cleanup_dtor): Don't call
10674         find_thread_ptid.
10675         (set_thread_refcount): Use dec_refcount.
10676         (make_cleanup_restore_current_thread): Adjust.
10677         (thread_apply_all_command): Call inc_refcount.
10678         (_initialize_thread): Don't call
10679         observer_attach_thread_ptid_changed.
10680
10681 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10682
10683         * thread.c (delete_thread_1): Hoist code on marking thread as
10684         exited.
10685
10686 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10687
10688         * windows-nat.c (windows_detach): Initialize ptid with
10689         minus_one_ptid.
10690
10691 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10692
10693         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10694
10695 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10696
10697         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10698         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10699         (bfin_pseudo_register_write): Likewise
10700
10701 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10702
10703         * common/ptid.h (struct ptid): Change to...
10704         (class ptid_t): ... this.
10705         <ptid_t>: New constructors.
10706         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10707         matches>: New methods.
10708         <make_null, make_minus_one>: New static methods.
10709         <pid>: Rename to...
10710         <m_pid>: ...this.
10711         <lwp>: Rename to...
10712         <m_lwp>: ...this.
10713         <tid>: Rename to...
10714         <m_tid>: ...this.
10715         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10716         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10717         as references, move comment to class ptid_t.
10718         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10719         ptid_t static methods.
10720         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10721         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10722         Take ptid arguments as references, implement using ptid_t methods.
10723         * unittests/ptid-selftests.c: New file.
10724         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10725         unittests/ptid-selftests.c.
10726         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10727
10728 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10729
10730         * python/python.c (python_run_simple_file): Cast mode literal to
10731         non-const char pointer as expected by PyFile_FromString.
10732
10733 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10734
10735         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10736         minus_one_ptid and null_ptid.
10737
10738 2017-04-05  Pedro Alves  <palves@redhat.com>
10739
10740         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10741         * configure: Regenerate.
10742
10743 2017-04-05  Pedro Alves  <palves@redhat.com>
10744
10745         * ada-exp.y (yyerror): Constify.
10746         * ada-lang.c (bound_name, get_selections)
10747         (ada_variant_discrim_type)
10748         (ada_variant_discrim_name, ada_value_struct_elt)
10749         (ada_lookup_struct_elt_type, is_unchecked_variant)
10750         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10751         (catch_ada_exception_command_split)
10752         (catch_ada_assert_command_split, catch_assert_command)
10753         (ada_op_name): Constify.
10754         * ada-lang.h (ada_yyerror, get_selections)
10755         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10756         * arc-tdep.c (arc_print_frame_cache): Constify.
10757         * arm-tdep.c (arm_skip_stub): Constify.
10758         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10759         (gen_aggregate_elt_ref): Constify.
10760         * bcache.c (print_bcache_statistics): Constify.
10761         * bcache.h (print_bcache_statistics): Constify.
10762         * break-catch-throw.c (catch_exception_command_1):
10763         * breakpoint.c (struct ep_type_description::description):
10764         Constify.
10765         (add_solib_catchpoint): Constify.
10766         (catch_fork_command_1): Add cast.
10767         (add_catch_command): Constify.
10768         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10769         Constify.
10770         * bsd-uthread.c (bsd_uthread_state): Constify.
10771         * buildsym.c (patch_subfile_names): Constify.
10772         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10773         Constify.
10774         * c-exp.y (yyerror): Constify.
10775         (token::oper): Constify.
10776         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10777         * c-varobj.c (cplus_describe_child): Constify.
10778         * charset.c (find_charset_names): Add cast.
10779         (find_charset_names): Constify array and add const_cast.
10780         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10781         (edit_command): Constify.
10782         * cli/cli-decode.c (lookup_cmd): Constify.
10783         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10784         Constify.
10785         (struct dump_context): Constify.
10786         (add_dump_command, restore_command): Constify.
10787         * cli/cli-script.c (get_command_line): Constify.
10788         * cli/cli-script.h (get_command_line): Constify.
10789         * cli/cli-utils.c (check_for_argument): Constify.
10790         * cli/cli-utils.h (check_for_argument): Constify.
10791         * coff-pe-read.c (struct read_pe_section_data): Constify.
10792         * command.h (lookup_cmd): Constify.
10793         * common/print-utils.c (decimal2str): Constify.
10794         * completer.c (gdb_print_filename): Constify.
10795         * corefile.c (set_gnutarget): Constify.
10796         * cp-name-parser.y (yyerror): Constify.
10797         * cp-valprint.c (cp_print_class_member): Constify.
10798         * cris-tdep.c (cris_register_name, crisv32_register_name):
10799         Constify.
10800         * d-exp.y (yyerror): Constify.
10801         (struct token::oper): Constify.
10802         * d-lang.h (d_yyerror): Constify.
10803         * dbxread.c (struct header_file_location::name): Constify.
10804         (add_old_header_file, add_new_header_file, last_function_name)
10805         (dbx_next_symbol_text, add_bincl_to_list)
10806         (find_corresponding_bincl_psymtab, set_namestring)
10807         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10808         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10809         * defs.h (command_line_input, print_address_symbolic)
10810         (deprecated_readline_begin_hook): Constify.
10811         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10812         Constify.
10813         * event-top.c (handle_line_of_input): Constify and add cast.
10814         * exceptions.c (catch_errors): Constify.
10815         * exceptions.h (catch_errors): Constify.
10816         * expprint.c (print_subexp_standard, op_string, op_name)
10817         (op_name_standard, dump_raw_expression, dump_raw_expression):
10818         * expression.h (op_name, op_string, dump_raw_expression):
10819         Constify.
10820         * f-exp.y (yyerror): Constify.
10821         (struct token::oper): Constify.
10822         (struct f77_boolean_val::name): Constify.
10823         * f-lang.c (f_word_break_characters): Constify.
10824         * f-lang.h (f_yyerror): Constify.
10825         * fork-child.c (fork_inferior): Add cast.
10826         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10827         (new_variant): Constify.
10828         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10829         * gdbarch.c: Regenerate.
10830         * gdbcore.h (set_gnutarget): Constify.
10831         * go-exp.y (yyerror): Constify.
10832         (token::oper): Constify.
10833         * go-lang.h (go_yyerror): Constify.
10834         * go32-nat.c (go32_sysinfo): Constify.
10835         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10836         * guile/scm-cmd.c (cmdscm_function): Constify.
10837         * guile/scm-param.c (pascm_param_value): Constify.
10838         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10839         (h8300sx_register_name): Constify.
10840         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10841         Constify.
10842         * ia64-tdep.c (ia64_register_names): Constify.
10843         * infcmd.c (construct_inferior_arguments): Constify.
10844         (path_command, attach_post_wait): Constify.
10845         * language.c (show_range_command, show_case_command)
10846         (unk_lang_error): Constify.
10847         * language.h (language_defn::la_error)
10848         (language_defn::la_name_of_this): Constify.
10849         * linespec.c (decode_line_2): Constify.
10850         * linux-thread-db.c (thread_db_err_str): Constify.
10851         * lm32-tdep.c (lm32_register_name): Constify.
10852         * m2-exp.y (yyerror): Constify.
10853         * m2-lang.h (m2_yyerror): Constify.
10854         * m32r-tdep.c (m32r_register_names): Constify and make static.
10855         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10856         * m88k-tdep.c (m88k_register_name): Constify.
10857         * macroexp.c (appendmem): Constify.
10858         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10859         (upgrade_type, parse_external, parse_partial_symbols)
10860         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10861         (new_symbol): Constify.
10862         * memattr.c (mem_info_command): Constify.
10863         * mep-tdep.c (register_name_from_keyword): Constify.
10864         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10865         Constify.
10866         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10867         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10868         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10869         cast.
10870         (mi_execute_async_cli_command): Constify.
10871         * mips-tdep.c (mips_register_name): Constify.
10872         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10873         (am33_register_name, am33_2_register_name)
10874         * moxie-tdep.c (moxie_register_names): Constify.
10875         * nat/linux-osdata.c (osdata_type): Constify fields.
10876         * nto-tdep.c (nto_parse_redirection): Constify.
10877         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10878         (lookup_child_selector): Constify.
10879         (objc_methcall::name): Constify.
10880         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10881         (lookup_struct_typedef): Constify.
10882         * objfiles.c (pc_in_section): Constify.
10883         * objfiles.h (pc_in_section): Constify.
10884         * p-exp.y (struct token::oper): Constify.
10885         (yyerror): Constify.
10886         * p-lang.h (pascal_yyerror): Constify.
10887         * parser-defs.h (op_name_standard): Constify.
10888         (op_print::string): Constify.
10889         (exp_descriptor::op_name): Constify.
10890         * printcmd.c (print_address_symbolic): Constify.
10891         * psymtab.c (print_partial_symbols): Constify.
10892         * python/py-breakpoint.c (stop_func): Constify.
10893         (bppy_get_expression): Constify.
10894         * python/py-cmd.c (cmdpy_completer::name): Constify.
10895         (cmdpy_function): Constify.
10896         * python/py-event.c (evpy_add_attribute)
10897         (gdbpy_initialize_event_generic): Constify.
10898         * python/py-event.h (evpy_add_attribute)
10899         (gdbpy_initialize_event_generic): Constify.
10900         * python/py-evts.c (add_new_registry): Constify.
10901         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10902         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10903         * python/py-inferior.c (get_buffer): Add cast.
10904         * python/py-param.c (parm_constant::name): Constify.
10905         * python/py-unwind.c (fprint_frame_id): Constify.
10906         * python/python.c (gdbpy_parameter_value): Constify.
10907         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10908         * remote.c (memory_packet_config::name): Constify.
10909         (show_packet_config_cmd, remote_write_bytes)
10910         (remote_buffer_add_string):
10911         * reverse.c (exec_reverse_once): Constify.
10912         * rs6000-tdep.c (variant::name, variant::description): Constify.
10913         * rust-exp.y (rustyyerror): Constify.
10914         * rust-lang.c (rust_op_name): Constify.
10915         * rust-lang.h (rustyyerror): Constify.
10916         * serial.h (serial_ops::name): Constify.
10917         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10918         (sh_sh3e_register_name, sh_sh2e_register_name)
10919         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10920         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10921         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10922         (sh_sh4al_dsp_register_name): Constify.
10923         * sh64-tdep.c (sh64_register_name): Constify.
10924         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10925         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10926         * stabsread.c (patch_block_stabs, read_type_number)
10927         (ref_map::stabs, ref_add, process_reference)
10928         (symbol_reference_defined, define_symbol, define_symbol)
10929         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10930         (read_one_struct_field, read_struct_fields, read_baseclasses)
10931         (read_tilde_fields, read_struct_type, read_array_type)
10932         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10933         (read_huge_number, read_range_type, read_args, common_block_start)
10934         (find_name_end): Constify.
10935         * stabsread.h (common_block_start, define_symbol)
10936         (process_one_symbol, symbol_reference_defined, ref_add):
10937         * symfile.c (get_section_index, add_symbol_file_command):
10938         * symfile.h (get_section_index): Constify.
10939         * target-descriptions.c (tdesc_type::name): Constify.
10940         (tdesc_free_type): Add cast.
10941         * target.c (find_default_run_target):
10942         (add_deprecated_target_alias, find_default_run_target)
10943         (target_announce_detach): Constify.
10944         (do_option): Constify.
10945         * target.h (add_deprecated_target_alias): Constify.
10946         * thread.c (print_thread_info_1): Constify.
10947         * top.c (deprecated_readline_begin_hook, command_line_input):
10948         Constify.
10949         (init_main): Add casts.
10950         * top.h (handle_line_of_input): Constify.
10951         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10952         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10953         (tfind_command): Rename to ...
10954         (tfind_command_1): ... this and constify.
10955         (tfind_command): New function.
10956         (tfind_end_command, tfind_start_command): Adjust.
10957         (encode_source_string): Constify.
10958         * tracepoint.h (encode_source_string): Constify.
10959         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10960         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10961         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10962         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10963         * tui/tui-win.c (parse_scrolling_args): Constify.
10964         * tui/tui-windata.c (tui_erase_data_content): Constify.
10965         * tui/tui-windata.h (tui_erase_data_content): Constify.
10966         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10967         * tui/tui.c (tui_enable): Add cast.
10968         * utils.c (defaulted_query): Constify.
10969         (init_page_info): Add cast.
10970         (puts_debug, subset_compare): Constify.
10971         * utils.h (subset_compare): Constify.
10972         * varobj.c (varobj_format_string): Constify.
10973         * varobj.h (varobj_format_string): Constify.
10974         * vax-tdep.c (vax_register_name): Constify.
10975         * windows-nat.c (windows_detach): Constify.
10976         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10977         * xml-support.c (gdb_xml_end_element): Constify.
10978         * xml-tdesc.c (tdesc_start_reg): Constify.
10979         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10980         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10981         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10982
10983 2017-04-05  Pedro Alves  <palves@redhat.com>
10984
10985         * proc-api.c (struct trans): Constify.
10986         (procfs_note): Constify.
10987         * proc-events.c (struct trans, syscall_table):
10988         * proc-flags.c (struct trans): Constify.
10989         * proc-utils.h (procfs_note): Constify.
10990         * proc-why.c (struct trans): Constify.
10991         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10992         (procfs_detach): Constify.
10993         * sol-thread.c (struct string_map): Constify.
10994         (td_err_string, td_state_string): Constify.
10995
10996 2017-04-05  Pedro Alves  <palves@redhat.com>
10997
10998         * proc-api.c (procfs_filename): Don't initialize
10999         procfs_filename.
11000         (prepare_to_trace): Assume procfs_filename is non-NULL.
11001         (_initialize_proc_api): Give procfs_filename a default value here.
11002
11003 2017-04-05  Pedro Alves  <palves@redhat.com>
11004
11005         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11006         'cond_string' parameter.
11007         (extract_exception_regexp): Constify 'string' parameter.
11008         (catch_exception_command_1): Constify.
11009         * breakpoint.c (init_catchpoint)
11010         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11011         parameter.
11012         (ep_parse_optional_if_clause, catch_fork_command_1)
11013         (catch_exec_command_1): Constify.
11014         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11015         parameter.
11016         (ep_parse_optional_if_clause): Constify.
11017         * cli/cli-utils.c (remove_trailing_whitespace)
11018         (check_for_argument): Constify.
11019         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11020         non-const overload.
11021         (check_for_argument): Likewise.
11022
11023 2017-04-05  Pedro Alves  <palves@redhat.com>
11024
11025         * event-top.c (command_line_handler): Add cast to execute_command
11026         call.
11027         * record-btrace.c (cmd_record_btrace_bts_start)
11028         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11029         (cmd_record_btrace_start): Add cast to execute_command call.
11030         * record-full.c (record_full_goto_insn):
11031         * record.c (record_start, record_stop): Add cast to
11032         execute_command_to_string calls.
11033         (cmd_record_start): Add cast to execute_command calls.
11034
11035 2017-04-05  Pedro Alves  <palves@redhat.com>
11036
11037         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11038         static inline function.
11039         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11040         array and use gdb_PyArg_ParseTupleAndKeywords.
11041         * python/py-cmd.c (cmdpy_init): Likewise.
11042         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11043         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11044         (infpy_search_memory): Likewise.
11045         * python/py-objfile.c (objfpy_add_separate_debug_file)
11046         (gdbpy_lookup_objfile): Likewise.
11047         * python/py-symbol.c (gdbpy_lookup_symbol)
11048         (gdbpy_lookup_global_symbol): Likewise.
11049         * python/py-type.c (gdbpy_lookup_type): Likewise.
11050         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11051         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11052         Likewise.
11053
11054 2017-04-05  Pedro Alves  <palves@redhat.com>
11055
11056         * python/python-internal.h (gdb_PyGetSetDef): New type.
11057         * python/py-block.c (block_object_getset)
11058         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11059         * python/py-event.c (event_object_getset)
11060         (finish_breakpoint_object_getset): Likewise.
11061         * python/py-inferior.c (inferior_object_getset): Likewise.
11062         * python/py-infthread.c (thread_object_getset): Likewise.
11063         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11064         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11065         * python/py-objfile.c (objfile_getset): Likewise.
11066         * python/py-progspace.c (pspace_getset): Likewise.
11067         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11068         Likewise.
11069         * python/py-record.c (recpy_record_getset): Likewise.
11070         * python/py-symbol.c (symbol_object_getset): Likewise.
11071         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11072         Likewise.
11073         * python/py-type.c (type_object_getset, field_object_getset):
11074         Likewise.
11075         * python/py-value.c (value_object_getset): Likewise.
11076
11077 2017-04-05  Pedro Alves  <palves@redhat.com>
11078
11079         * python/python-internal.h (gdb_PyObject_CallMethod)
11080         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11081         New functions.
11082         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11083         (PySys_GetObject, PySys_SetPath): New macros.
11084
11085 2017-04-05  Pedro Alves  <palves@redhat.com>
11086
11087         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11088         info_osdata_command.
11089         * osdata.c (info_osdata_command): Rename to ...
11090         (info_osdata): ... this.  Constify 'type' parameter, and remove
11091         the 'from_tty' parameter.  Accept NULL TYPE.
11092         (info_osdata_command): New function.
11093         * osdata.h (info_osdata_command): Remove declaration.
11094         (info_osdata): New declaration.
11095
11096 2017-04-05  Pedro Alves  <palves@redhat.com>
11097
11098         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11099         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11100         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11101         parameter.
11102         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11103         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11104         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11105         parameter.
11106         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11107         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11108         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11109         (mi_cmd_file_list_exec_source_files)
11110         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11111         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11112         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11113         parameter.
11114         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11115         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11116         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11117         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11118         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11119         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11120         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11121         'command' parameter.
11122         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11123         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11124         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11125         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11126         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11127         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11128         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11129         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11130         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11131         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11132         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11133         parameter.
11134         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11135         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11136         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11137         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11138         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11139         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11140         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11141         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11142         (mi_cmd_data_list_changed_registers)
11143         (mi_cmd_data_write_register_values)
11144         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11145         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11146         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11147         (mi_cmd_list_features, mi_cmd_list_target_features)
11148         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11149         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11150         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11151         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11152         (mi_cmd_trace_frame_collected): Constify 'command'
11153         parameter.
11154         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11155         'command' parameter.
11156
11157 2017-04-05  Pedro Alves  <palves@redhat.com>
11158
11159         * ada-lang.c (ada_completer_word_break_characters): Now a const
11160         array.
11161         (ada_get_gdb_completer_word_break_characters): Constify.
11162         * completer.c (gdb_completer_command_word_break_characters)
11163         (gdb_completer_file_name_break_characters)
11164         (gdb_completer_quote_characters): Now const arrays.
11165         (get_gdb_completer_quote_characters): Constify.
11166         (set_rl_completer_word_break_characters): New function.
11167         (set_gdb_completion_word_break_characters)
11168         (complete_line_internal): Use it.
11169         * completer.h (get_gdb_completer_quote_characters): Constify.
11170         (set_rl_completer_word_break_characters): Declare.
11171         * f-lang.c (f_word_break_characters): Constify.
11172         * language.c (default_word_break_characters): Constify.
11173         * language.h (language_defn::la_word_break_characters): Constify.
11174         (default_word_break_characters): Constify.
11175         * top.c (init_main): Use set_rl_completer_word_break_characters.
11176
11177 2017-04-05  Pedro Alves  <palves@redhat.com>
11178
11179         * aix-thread.c (aix_thread_pid_to_str)
11180         (aix_thread_extra_thread_info): Constify.
11181         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11182         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11183         (bsd_uthread_pid_to_str): Constify.
11184         * corelow.c (core_pid_to_str): Constify.
11185         * darwin-nat.c (darwin_pid_to_str): Constify.
11186         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11187         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11188         Constify.
11189         * gnu-nat.c (gnu_pid_to_str): Constify.
11190         * go32-nat.c (go32_pid_to_str): Constify.
11191         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11192         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11193         * inferior.c (inferior_pid_to_str): Constify.
11194         * linux-nat.c (linux_nat_pid_to_str): Constify.
11195         * linux-tdep.c (linux_core_pid_to_str): Constify.
11196         * linux-thread-db.c (thread_db_pid_to_str)
11197         (thread_db_extra_thread_info): Constify.
11198         * nto-tdep.c (nto_extra_thread_info): Constify.
11199         * nto-tdep.h (nto_extra_thread_info): Constify.
11200         * obsd-nat.c (obsd_pid_to_str): Constify.
11201         * procfs.c (procfs_pid_to_str): Constify.
11202         * ravenscar-thread.c (ravenscar_extra_thread_info)
11203         (ravenscar_pid_to_str): Constify.
11204         * remote-sim.c (gdbsim_pid_to_str): Constify.
11205         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11206         Constify.
11207         * sol-thread.c (solaris_pid_to_str): Constify.
11208         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11209         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11210         * target.c (default_pid_to_str, target_pid_to_str)
11211         (normal_pid_to_str, default_pid_to_str): Constify.
11212         * target.h (target_ops::to_pid_to_str)
11213         (target_ops::to_extra_thread_info): Constify.
11214         (target_pid_to_str, normal_pid_to_str): Constify.
11215         * windows-nat.c (windows_pid_to_str): Constify.
11216         * gdbarch.sh (core_pid_to_str): Constify.
11217         * target-delegates.c: Regenerate.
11218         * gdbarch.h, gdbarch.c: Regenerate.
11219
11220 2017-04-05  Pedro Alves  <palves@redhat.com>
11221
11222         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11223         the memory of the temporary warning_pre_print override.
11224         * utils.c (warning_pre_print): Constify.
11225         * utils.h (warning_pre_print): Constify.
11226
11227 2017-04-05  Pedro Alves  <palves@redhat.com>
11228
11229         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11230         (shell_command): New function.
11231         (make_command): Use std::string.
11232         (init_cli_cmds): Register shell_command instead of shell_escape.
11233
11234 2017-04-05  Pedro Alves  <palves@redhat.com>
11235
11236         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11237         * tracepoint.c (default_collect): Don't initialize.
11238
11239 2017-04-05  Pedro Alves  <palves@redhat.com>
11240
11241         * macroexp.c (macro_buffer::shared): Now a bool.
11242         (init_buffer): Update.
11243         (init_shared_buffer): Constify 'addr' parameter.
11244         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11245         casts.
11246
11247 2017-04-05  Pedro Alves  <palves@redhat.com>
11248
11249         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11250         * disasm.c (set_disassembler_options): Constify local.
11251         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11252
11253 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11254
11255         PR gdb/21352
11256         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11257         option.
11258
11259 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11260
11261         * frame.c (frame_unwind_register_unsigned): Call
11262         frame_unwind_register_value.
11263
11264 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11265
11266         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11267         Use gdb_test_multiple, and don't match anchor.
11268
11269 2017-04-05  Pedro Alves  <palves@redhat.com>
11270
11271         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11272         (Write After Approval): Remove Simon Marchi.
11273
11274 2017-04-05  Pedro Alves  <palves@redhat.com>
11275
11276         * common/gdb_optional.h (optional::optional): Make constexpr and
11277         initialize m_dummy.
11278
11279 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11280
11281         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11282         (amd64fbsd_jmp_buf_reg_offset): Remove.
11283         (amd64fbsd_supply_uthread): Remove function.
11284         (amd64fbsd_collect_uthread): Remove function.
11285         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11286         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11287         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11288         (fbsd-nat.c): Update comment.
11289         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11290         (i386fbsd_jmp_buf_reg_offset): Remove.
11291         (i386fbsd_supply_uthread): Remove function.
11292         (i386fbsd_collect_uthread): Remove function.
11293         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11294
11295 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11296
11297         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11298         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11299         * NEWS: Mention that support for FreeBSD/alpha was removed.
11300         * alpha-fbsd-tdep.c: Delete file.
11301         * config/alpha/fbsd.mh: Delete file.
11302         * configure.host: Delete alpha*-*-freebsd* and
11303         alpha*-*-kfreebsd*-gnu.
11304         * configure.tgt: Delete alpha*-*-freebsd* and
11305         alpha*-*-kfreebsd*-gnu.
11306
11307 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11308
11309         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11310         amd64bsd_store_inferior_registers): Use ptid from regcache.
11311
11312 2017-04-04  Pedro Alves  <palves@redhat.com>
11313
11314         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11315         data fields, make them private and add "m_" prefixes.
11316         (lnp_state_machine::lnp_state_machine): New ctor.
11317         (record_line, check_line_address, handle_set_discriminator)
11318         (handle_set_address, handle_advance_pc, handle_special_opcode)
11319         (handle_advance_line, handle_set_file, handle_negate_stmt)
11320         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11321         (end_sequence, advance_line): New methods.
11322         (m_gdbarch, m_record_lines_p): New fields.
11323         (lnp_reader_state): Delete.
11324         (dwarf_record_line): Rename to ...
11325         (lnp_state_machine::record_line): ... adjust.
11326         (init_lnp_state_machine): Delete.
11327         (lnp_state_machine::lnp_state_machine): New.
11328         (check_line_address): Rename to ...
11329         (lnp_state_machine::check_line_address): This.
11330         (dwarf_decode_lines_1): Remove reference to "reader_state".
11331         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11332         State machine internal state manipulation moved to
11333         lnp_state_machine methods.
11334
11335 2017-04-04  Pedro Alves  <palves@redhat.com>
11336
11337         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11338         unittests/offset-type-selftests.c.
11339         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11340         * common/offset-type.h: New file.
11341         * common/preprocessor.h: New file.
11342         * common/traits.h: New file.
11343         * common/valid-expr.h: New file.
11344         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11345         sect_offset and cu_offset strong typedefs throughout.
11346         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11347         typedefs throughout.
11348         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11349         sect_offset and cu_offset strong typedefs throughout.
11350         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11351         typedefs throughout.
11352         * gdbtypes.h: Include "common/offset-type.h".
11353         (cu_offset): Now an offset type (strong typedef) instead of a
11354         struct.
11355         (sect_offset): Likewise.
11356         (union call_site_parameter_u): Rename "param_offset" field to
11357         "param_cu_off".
11358         * unittests/offset-type-selftests.c: New file.
11359
11360 2017-04-04  Pedro Alves  <palves@redhat.com>
11361
11362         * common/underlying.h: New file.
11363         * dwarf2read.c: Include "common/gdb_optional.h" and
11364         "common/underlying.h".
11365         (dir_index, file_name_index): New types.
11366         (file_entry): Use them.
11367         (file_entry::include): Use to_underlying.
11368         (line_header::add_file_name): Use dir_index.
11369         (read_formatted_entries): Use gdb::optional.  Read form before
11370         writting to file_entry.
11371         (dwarf_decode_line_header): Use dir_index.
11372         (lnp_state_machine::current_file): Use to_underlying.
11373         (lnp_state_machine::file): Change type to file_name_index.
11374         (dwarf_record_line): Use to_underlying.
11375         (init_lnp_state_machine): Use file_name_index.
11376         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11377
11378 2017-04-04  Pedro Alves  <palves@redhat.com>
11379
11380         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11381         operator bool, has_value and get methods.
11382
11383 2017-04-04  Pedro Alves  <palves@redhat.com>
11384
11385         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11386         fields.
11387         (line_header): Initialize all data fields.  Change type of
11388         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11389         Change type of include_dirs to std::vector<const char *>.  Remove
11390         num_include_dirs, include_dirs_size.  Change type of file_names to
11391         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11392         (line_header::line_header): New.
11393         (line_header::add_include_dir, line_header::add_file_name): New
11394         methods.
11395         (line_header::include_dir_at): Remove NULL check.
11396         (line_header::file_name_at): Add const overload.
11397         (line_header_up): New unique_ptr typedef.
11398         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11399         std::vector.  Remove free_line_header call.
11400         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11401         free_line_header call.
11402         (free_cu_line_header): Delete.
11403         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11404         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11405         Adjust to use std::vector.
11406         (free_line_header): Delete.
11407         (free_line_header_voidp): Use delete.
11408         (add_include_dir): Replace with ...
11409         (line_header::add_include_dir): ... this method.  Use std::vector.
11410         (add_file_name): Replace with ...
11411         (line_header::add_file_name): ... this method.  Use std::vector.
11412         (add_include_dir_stub): Delete.
11413         (read_formatted_entries): Remove memset.
11414         (dwarf_decode_line_header): Return a line_header_up instead of a
11415         raw pointer.  Remove cleanup handling.  Pass lambdas to
11416         read_formatted_entries.  Adjust to use line_header methods.
11417         (dwarf_decode_lines_1): Adjust to use line_header methods.
11418         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11419         use std::vector.
11420
11421 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11422
11423         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11424         instead of struct ptid.
11425
11426 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11427
11428         * frame.c (get_frame_register_bytes): Unwind using value.
11429         (put_frame_register_bytes): Likewise.
11430
11431 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11432
11433         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11434         aggregate-like.
11435
11436 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11437
11438         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11439
11440 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11441
11442         * gdbthread.h (struct thread_info): Declare constructor and
11443         destructor.  Add some in-class member initializers.
11444         * thread.c (free_thread): Remove.
11445         (init_thread_list): Call delete instead of free_thread.
11446         (new_thread): Call thread_info constructor.
11447         (thread_info::thread_info): New function.
11448         (thread_info::~thread_info): New function.
11449         (delete_thread_1): Call delete instead of free_thread.
11450         (make_cleanup_restore_current_thread): Move tp and frame to
11451         inner block.
11452
11453 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11454
11455         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11456         (arc_skip_prologue): Likewise.
11457         (arc_make_frame_cache): Likewise.
11458         (arc_pv_get_operand): New function.
11459         (arc_is_in_prologue): Likewise.
11460         (arc_analyze_prologue): Likewise.
11461         (arc_print_frame_cache): Likewise.
11462         (MAX_PROLOGUE_LENGTH): New constant.
11463
11464 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11465
11466         * configure.tgt: Add arc-insn.o.
11467         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11468         (dump_arc_instruction_command): New function.
11469         (arc_fprintf_disasm): Likewise.
11470         (arc_disassemble_info): Likewise.
11471         (arc_insn_get_operand_value): Likewise.
11472         (arc_insn_get_operand_value_signed): Likewise.
11473         (arc_insn_get_memory_base_reg): Likewise.
11474         (arc_insn_get_memory_offset): Likewise.
11475         (arc_insn_get_branch_target): Likewise.
11476         (arc_insn_dump): Likewise.
11477         (arc_insn_get_linear_next_pc): Likewise.
11478         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11479         (arc_disassemble_info): Likewise.
11480         (arc_insn_get_branch_target): Likewise.
11481         (arc_insn_get_linear_next_pc): Likewise.
11482         * NEWS: Mention new "maint print arc arc-instruction".
11483
11484 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11485
11486         * arc-tdep (maintenance_print_arc_list): New variable.
11487         (maintenance_print_arc_command): New function.
11488
11489 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11490
11491         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11492         Add "limm" and "reserved".
11493         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11494         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11495         * arc-tdep.h (arc_regnum): Likewise.
11496
11497 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11498
11499         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11500         for THREADPTR register.
11501         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11502         register.
11503         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11504         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11505         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11506
11507 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11508
11509         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11510         registers above gdbarch_num_regs (gdbarch) as privileged in
11511         call0 ABI.
11512
11513 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11514
11515         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11516         for a single specified register or for all registers in
11517         a0_base..a0_base + C0_NREGS range.
11518         (supply_gregset_reg): Call regcache_raw_supply for a single
11519         specified register or for all registers in a0_base..a0_base +
11520         C0_NREGS range.
11521
11522 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11523
11524         * arch/xtensa.h (C0_NREGS): Add definition.
11525         * xtensa-tdep.c (C0_NREGS): Remove definition.
11526
11527 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11528
11529         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11530         Drop xtensa_default_isa initialization.
11531         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11532
11533 2017-03-27  Pedro Alves  <palves@redhat.com>
11534
11535         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11536         (file_entry::include_dir): New method.
11537         (line_header::include_dir_at, line_header::file_name_at): New
11538         methods.
11539         (setup_type_unit_groups, setup_type_unit_groups)
11540         (psymtab_include_file_name): Simplify using the new methods.
11541         (lnp_state_machine) <the_line_header>: New field.
11542         <file>: Add comment.
11543         (lnp_state_machine::current_file): New method.
11544         (dwarf_record_line): Simplify using the new methods.
11545         (init_lnp_state_machine): Initialize the "the_line_header" field.
11546         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11547         Simplify using the new methods.
11548
11549 2017-03-27  Pedro Alves  <palves@redhat.com>
11550
11551         * cp-name-parser.y (make_empty): Delete.
11552         (demangler_special, nested_name, ptr_operator, array_indicator)
11553         (direct_declarator, declarator_1): Use fill_comp instead of
11554         make_empty.
11555
11556 2017-03-27  Pedro Alves  <palves@redhat.com>
11557
11558         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11559         to ATTRIBUTE_PRINTF.
11560         * solib-target.c (library_list_start_list): Print "string" not
11561         "version".
11562         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11563         gdb_xml_error call.
11564
11565 2017-03-27  Pedro Alves  <palves@redhat.com>
11566
11567         * dwarf2read.c (struct file_and_directory): New.
11568         (dwarf2_get_dwz_file): Adjust to use std::string.
11569         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11570         (find_file_and_directory): Adjust to return a file_and_directory
11571         object.
11572         (read_file_scope): Adjust to use file_and_directory.  Remove
11573         make_cleanup/do_cleanups calls.
11574         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11575         make_cleanup/do_cleanups calls.
11576         * python/python.c (do_start_initialization): Adjust to ldirname
11577         returning a std::string.
11578         * utils.c (ldirname): Now returns a std::string.
11579         * utils.h (ldirname): Change return type to std::string.
11580         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11581         returning a std::string.
11582         * xml-tdesc.c (file_read_description_xml): Likewise.
11583
11584 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11585
11586         * regcache.c (regcache_debug_print_register): New function.
11587         * regcache.h (regcache_debug_print_register): New declaration.
11588         * target.c (debug_print_register): Remove.
11589         (target_fetch_registers): Call regcache_debug_print_register.
11590         (target_store_registers): Likewise.
11591
11592 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11593
11594         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11595         reference beyond the 'lh->include_dirs' array before accessing to
11596         it.
11597         (psymtab_include_file_name): Likewise.
11598         (dwarf_decode_lines_1): Likewise.
11599         (dwarf_decode_lines): Likewise.
11600         (file_file_name): Likewise.
11601
11602 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11603
11604         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11605         inferior_ptid.
11606         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11607         ps_lsetfpregs): Likewise.
11608         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11609         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11610         ps_lsetfpregs): Likewise.
11611         * target.c (target_fetch_registers, target_store_registers):
11612         Remove asserts.
11613
11614 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11615
11616         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11617
11618 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11619
11620         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11621         (_initialize_aarch64_tdep): Register it.
11622         (aarch64_record_load_store): Handle PRFM instruction.
11623         (aarch64_process_record_test): New function.
11624
11625 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11626
11627         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11628         indentation.
11629
11630 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11631
11632         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11633
11634 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11635
11636         python/python.c (do_start_initialization): Fix memory leak.
11637
11638 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11639
11640         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11641         using get_ptrace_pid.
11642         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11643         inferior_ptid.
11644         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11645         inferior_ptid instead of pid.
11646
11647 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11648
11649         * aarch64-tdep.c: Wrap locally used classes in anonymous
11650         namespace.
11651         * arm-tdep.c: Likewise.
11652         * linespec.c: Likewise.
11653         * ui-out.c: Likewise.
11654
11655 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11656
11657         PR gdb/19637
11658         * python/lib/gdb/printer/bound_registers.py: Import sys.
11659
11660 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11661
11662         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11663         windows_thread_info parameter and use it instead of
11664         current_thread.
11665         (windows_fetch_inferior_registers): Don't set current_thread,
11666         pass the thread to do_windows_fetch_inferior_registers.  Use
11667         ptid from regcache instead of inferior_ptid.
11668         (do_windows_store_inferior_registers): Add windows_thread_info
11669         parameter and use it instead of current_thread.
11670         (windows_store_inferior_registers): Don't set current_thread,
11671         pass the thread to do_windows_store_inferior_registers.  Use
11672         ptid from regcache instead of inferior_ptid.
11673
11674 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11675
11676         * ser-mingw.c (ser_windows_raw): Remove reference to
11677         struct serial::current_timeout.
11678
11679 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11680
11681         PR tdep/20928
11682         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11683         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11684         (sparc64_fsr_type): Fix %fsr decoding.
11685
11686 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11687
11688         * python/py-record-btrace.c (btpy_insn_data): Change return type
11689         for Python 2.
11690
11691 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11692
11693         * spu-linux-nat.c (spu_fetch_inferior_registers,
11694         spu_store_inferior_registers): Use ptid from regcache, set and
11695         restore inferior_ptid.
11696         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11697         Likewise.
11698
11699 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11700
11701         * i386-linux-nat.c (fetch_register, store_register,
11702         i386_linux_fetch_inferior_registers,
11703         i386_linux_store_inferior_registers): Use ptid from regcache.
11704         * ia64-linux-nat.c (ia64_linux_fetch_register,
11705         ia64_linux_store_register): Likewise.
11706         * inf-ptrace.c (inf_ptrace_fetch_register,
11707         inf_ptrace_store_register): Likewise.
11708         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11709         m32r_linux_store_inferior_registers): Likewise.
11710         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11711         m68kbsd_store_inferior_registers): Likewise.
11712         * m68k-linux-nat.c (fetch_register, store_register,
11713         m68k_linux_fetch_inferior_registers,
11714         m68k_linux_store_inferior_registers): Likewise.
11715         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11716         m88kbsd_store_inferior_registers): Likewise.
11717         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11718         mips_fbsd_store_inferior_registers): Likewise.
11719         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11720         mips64_linux_regsets_store_registers): Likewise.
11721         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11722         mipsnbsd_store_inferior_registers): Likewise.
11723         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11724         mips64obsd_store_inferior_registers): Likewise.
11725         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11726         Likewise.
11727         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11728         ppcfbsd_store_inferior_registers): Likewise.
11729         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11730         ppc_linux_store_inferior_registers): Likewise.
11731         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11732         ppcnbsd_store_inferior_registers): Likewise.
11733         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11734         ppcobsd_store_registers): Likewise.
11735         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11736         Likewise.
11737         * ravenscar-thread.c (ravenscar_fetch_registers,
11738         ravenscar_store_registers, ravenscar_prepare_to_store):
11739         Likewise.
11740         * record-btrace.c (record_btrace_fetch_registers,
11741         record_btrace_store_registers, record_btrace_prepare_to_store):
11742         Likewise.
11743         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11744         Lookup inferior using ptid from regcache, instead of
11745         current_inferior.
11746         * remote.c (remote_fetch_registers, remote_store_registers): Use
11747         ptid from regcache.
11748         * rs6000-nat.c (fetch_register, store_register): Likewise.
11749         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11750         s390_linux_store_inferior_registers): Likewise.
11751         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11752         shnbsd_store_inferior_registers): Likewise.
11753         * sol-thread.c (sol_thread_fetch_registers,
11754         sol_thread_store_registers): Likewise.
11755         * sparc-nat.c (sparc_fetch_inferior_registers,
11756         sparc_store_inferior_registers): Likewise.
11757         * tilegx-linux-nat.c (fetch_inferior_registers,
11758         store_inferior_registers): Likewise.
11759         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11760         vaxbsd_store_inferior_registers): Likewise.
11761         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11762         store_xtregs): Likewise.
11763
11764 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11765
11766         PR gdb/14441
11767         * NEWS: Mention support for rvalue references in GDB and python.
11768         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11769         supports both lvalue and rvalue references.
11770
11771 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11772
11773         PR gdb/14441
11774         * gdbtypes.c (rank_one_type): Implement overloading
11775         resolution rules regarding rvalue references.
11776
11777 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11778
11779         PR gdb/14441
11780         * aarch64-tdep.c (aarch64_type_align)
11781         (aarch64_extract_return_value, aarch64_store_return_value): Change
11782         lvalue reference type checks to general reference type checks.
11783         * amd64-tdep.c (amd64_classify): Likewise.
11784         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11785         Likewise.
11786         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11787         (arm_store_return_value): Likewise.
11788         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11789         * c-typeprint.c (c_print_type): Likewise.
11790         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11791         (cplus_number_of_children, cplus_describe_child): Likewise.
11792         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11793         * completer.c (expression_completer): Likewise.
11794         * cp-support.c (make_symbol_overload_list_adl_namespace):
11795         Likewise.
11796         * darwin-nat-info.c (info_mach_region_command): Likewise.
11797         * dwarf2loc.c (entry_data_value_coerce_ref)
11798         (value_of_dwarf_reg_entry): Likewise.
11799         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11800         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11801         Likewise.
11802         * findvar.c (extract_typed_address, store_typed_address):
11803         Likewise.
11804         * gdbtypes.c (rank_one_type): Likewise.
11805         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11806         * infcall.c (value_arg_coerce): Likewise.
11807         * language.c (pointer_type): Likewise.
11808         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11809         Likewise.
11810         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11811         * mn10300-tdep.c (mn10300_type_align): Likewise.
11812         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11813         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11814         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11815         Likewise.
11816         * printcmd.c (print_formatted, x_command): Likewise.
11817         * python/py-type.c (typy_get_composite, typy_template_argument):
11818         Likewise.
11819         * python/py-value.c (valpy_referenced_value)
11820         (valpy_get_dynamic_type, value_has_field): Likewise.
11821         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11822         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11823         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11824         * spu-tdep.c (spu_scalar_value_p): Likewise.
11825         * symtab.c (lookup_symbol_aux): Likewise.
11826         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11827         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11828         Likewise.
11829         * valops.c (value_cast_pointers, value_cast)
11830         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11831         (value_struct_elt, value_struct_elt_bitpos)
11832         (value_find_oload_method_list, find_overload_match)
11833         (value_rtti_indirect_type): Likewise.
11834         * valprint.c (val_print_scalar_type_p, generic_val_print):
11835         Likewise.
11836         * value.c (value_actual_type, value_as_address, unpack_long)
11837         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11838         (coerce_ref): Likewise.
11839         * varobj.c (varobj_get_value_type): Likewise.
11840
11841 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11842
11843         PR gdb/14441
11844         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11845         table of constants.
11846         * python/lib/gdb/command/explore.py: Support exploring values
11847         of rvalue reference types.
11848         * python/lib/gdb/types.py: Implement get_basic_type() for
11849         rvalue reference types.
11850         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11851         constant.
11852         * python/py-value.c (valpy_getitem): Add an rvalue reference
11853         check.
11854         (valpy_reference_value): Add new parameter "refcode".
11855         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11856         New wrappers for valpy_reference_value().
11857         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11858         (gdbpy_invoke_xmethod): Likewise.
11859
11860 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11861
11862         PR gdb/14441
11863         * dwarf2read.c (process_die, read_type_die_1): Handle the
11864         DW_TAG_rvalue_reference_type DIE.
11865         (read_tag_reference_type): Add new parameter "refcode".
11866
11867 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11868
11869         PR gdb/14441
11870         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11871         (c_type_print_modifier, c_type_print_varspec_suffix)
11872         (c_type_print_base): Support printing rvalue reference types.
11873         * c-valprint.c (c_val_print, c_value_print): Support printing
11874         rvalue reference values.
11875
11876 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11877
11878         PR gdb/14441
11879         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11880         typename.
11881         * cp-support.c (replace_typedefs): Handle
11882         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11883         * python/py-type.c (typy_lookup_type): Likewise.
11884
11885 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11886
11887         PR gdb/14441
11888         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11889         * parse.c (insert_type): Change assert statement.
11890         (follow_types): Handle rvalue reference types.
11891         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11892         constant.
11893
11894 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11895
11896         PR gdb/14441
11897         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11898         value_ref() interface.
11899         * c-valprint.c (c_value_print): Likewise.
11900         * infcall.c (value_arg_coerce): Likewise.
11901         * python/py-value.c (valpy_reference_value): Likewise.
11902         * valops.c (value_cast, value_reinterpret_cast)
11903         (value_dynamic_cast, typecmp): Likewise.
11904         (value_ref): Parameterize by kind of return value reference type.
11905         * value.h (value_ref): Add new parameter "refcode".
11906
11907 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11908
11909         PR gdb/14441
11910         * dwarf2read.c (read_tag_reference_type): Use
11911         lookup_lvalue_reference_type() instead of lookup_reference_type().
11912         * eval.c (evaluate_subexp_standard): Likewise.
11913         * f-exp.y: Likewise.
11914         * gdbtypes.c (make_reference_type, lookup_reference_type):
11915         Generalize with rvalue reference types.
11916         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11917         convenience wrappers for lookup_reference_type().
11918         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11919         reference kind parameter.
11920         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11921         wrappers for lookup_reference_type().
11922         * guile/scm-type.c (gdbscm_type_reference): Use
11923         lookup_lvalue_reference_type() instead of lookup_reference_type().
11924         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11925         * parse.c (follow_types): Likewise.
11926         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11927         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11928         Likewise.
11929         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11930         (gdbpy_invoke_xmethod): Likewise.
11931         * stabsread.c: Provide extra argument to make_reference_type()
11932         call.
11933         * valops.c (value_ref, value_rtti_indirect_type): Use
11934         lookup_lvalue_reference_type() instead of lookup_reference_type().
11935
11936 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11937
11938         PR gdb/14441
11939         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11940         (TYPE_IS_REFERENCE): New macro.
11941         (struct type): Add rvalue_reference_type field.
11942         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11943
11944 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11945
11946         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11947         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11948         New function definition.
11949         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11950         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11951         New function declaration.
11952         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11953         * mi/mi-interp.h: New file.
11954         * solib.c (info_sharedlibrary_command): Replace for loop with
11955         ALL_SO_LIBS macro
11956         * solib.h (update_solib_list): New function declaration.
11957         (so_list_head): Move macro.
11958         * solist.h (ALL_SO_LIBS): New macro.
11959
11960 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11961
11962         * infcmd.c (post_create_inferior): Remove unused argument in
11963         call to solib_add.
11964         * remote.c (remote_start_remote): Likewise.
11965         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11966         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11967         (enable_break): Likewise.
11968         * solib.c (update_solib_list): Remove unused target argument
11969         and its documentation.
11970         (solib_add): Remove unused target argument.  Remove unused
11971         argument in call to update_solib_list.
11972         (info_sharedlibrary_command): Remove unused argument in call
11973         to update_solib_list.
11974         (sharedlibrary_command): Remove unused argument in call to
11975         solib_add.
11976         (handle_solib_event): Likewise.
11977         (reload_shared_libraries): Likewise.
11978         * solib.h (solib_add): Remove unused target argument.
11979
11980 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11981
11982         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11983         (s390_displaced_step_fixup): Cover relative branches with the
11984         default fixup handling.  This fixes lack of support for some
11985         relative branch instructions.
11986
11987 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11988
11989         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11990         ptid from regcache.
11991
11992 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11993
11994         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11995         i386_darwin_store_inferior_registers): Use ptid from regcache.
11996
11997 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11998
11999         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12000         i386bsd_store_inferior_registers): Use ptid from regcache.
12001
12002 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12003
12004         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12005         hppaobsd_store_registers): Use ptid from regcache.
12006
12007 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12008
12009         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12010         hppanbsd_store_registers): Use ptid from regcache.
12011
12012 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12013
12014         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12015         from regcache.  Use get_ptrace_pid.
12016
12017 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12018
12019         * corelow.c (get_core_register_section): Use ptid from regcache,
12020         update doc.
12021
12022 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12023
12024         * bsd-uthread.c (bsd_uthread_fetch_registers,
12025         bsd_uthread_store_registers): Use ptid from regcache, set and
12026         restore inferior_ptid.
12027
12028 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12029
12030         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12031         fetch_fp_regs, store_register, store_regs, store_fp_register,
12032         store_fp_regs): Use ptid from regcache.
12033
12034 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12035
12036         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12037         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12038         store_vfp_regs): Use ptid from regcache.
12039
12040 2017-03-17  Pedro Alves  <palves@redhat.com>
12041
12042         PR remote/21188
12043         * ser-base.c (ser_base_wait_for): Add comment.
12044         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12045         version.
12046         * ser-unix.c (hardwire_raw): Remove reference to
12047         scb->current_timeout.
12048         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12049         (hardwire_ops): Install ser_base_readchar instead of
12050         hardwire_readchar.
12051         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12052         Remove fields.
12053
12054 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12055
12056         PR gdb/19637
12057         * python/lib/gdb/printer/bound_registers.py: Add support for
12058         Python 3.
12059
12060 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12061
12062         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12063         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12064         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12065         byte_offset to subobj_byte_offset.  Fix the handling of
12066         DWARF_VALUE_STACK on big-endian targets when coming via an
12067         implicit pointer.
12068         (dwarf2_evaluate_loc_desc): Adjust call to
12069         dwarf2_evaluate_loc_desc_full.
12070         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12071         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12072
12073 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12074
12075         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12076         and REVSH instructions.
12077
12078 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12079
12080         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12081         (arm_record_test): Declare.
12082         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12083         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12084         align with the manual.
12085         (thumb_record_misc): Adjust the code order to align with the
12086         manual.
12087         (thumb2_record_decode_insn_handler): Fix instruction matching.
12088         (instruction_reader_thumb): New class.
12089         (arm_record_test): New function.
12090
12091 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12092
12093         * arm-tdep.c (abstract_memory_reader): New class.
12094         (instruction_reader): New class.
12095         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12096         (decode_insn): Likewise.
12097
12098 2017-03-16  Doug Evans  <dje@google.com>
12099
12100         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12101         member.  Change type of TYPE member to SCM.  All uses updated.
12102         (lsscm_make_lazy_string_smob): Add assert.
12103         (lsscm_make_lazy_string): Flag bad length values.
12104         (lsscm_elt_type): New function.
12105         (gdbscm_lazy_string_to_value): Rewrite to use
12106         lsscm_safe_lazy_string_to_value.
12107         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12108         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12109         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12110         in incoming type.
12111         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12112         * guile/scm-type.c (tyscm_scm_to_type): New function.
12113
12114 2017-03-15  Doug Evans  <dje@google.com>
12115
12116         PR python/17728, python/18439, python/18779
12117         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12118         member.  Change type of TYPE member to PyObject *.  All uses updated.
12119         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12120         (gdbpy_create_lazy_string_object): Flag bad length values.
12121         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12122         Handle typedefs in incoming type.
12123         (stpy_lazy_string_elt_type): New function.
12124         (gdbpy_extract_lazy_string): Call it.
12125         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12126         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12127         typedefs in incoming type.
12128
12129 2017-03-16  Doug Evans  <dje@google.com>
12130
12131         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12132         * guile/scm-type.c (tyscm_scm_to_type): New function.
12133
12134 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12135
12136         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12137         "ULONGEST" for "skip".
12138
12139 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12140
12141         PR gdb/21220
12142         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12143         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12144         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12145         over ptrace peek/poke until end of buffer or error.
12146
12147 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12148
12149         * parse.c (length_of_subexp): Make static.
12150         * parser-defs.h (length_of_subexp): Remove.
12151
12152 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12153
12154         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12155         as well.
12156
12157 2017-03-14  Pedro Alves  <palves@redhat.com>
12158
12159         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12160         (main): Use std::unique_ptr.  Remove calls to
12161         cp_demangled_name_parse_free.
12162
12163 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12164
12165         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12166         alphabsd_store_inferior_registers): Use regcache->ptid instead
12167         of inferior_ptid.
12168
12169 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12170
12171         * aix-thread.c (aix_thread_fetch_registers,
12172         aix_thread_store_registers): Use regcache->ptid instead of
12173         inferior_ptid.
12174
12175 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12176
12177         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12178         store_gregs_to_thread, fetch_fpregs_from_thread,
12179         store_fpregs_to_thread): Use regcache->ptid instead of
12180         inferior_ptid.
12181
12182 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12183
12184         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12185         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12186         instead of inferior_ptid.
12187
12188 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12189
12190         * target.c (target_fetch_registers, target_store_registers): Add
12191         assert.
12192
12193 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12194
12195         * regcache.h (regcache_get_ptid): New function.
12196         * regcache.c (regcache_get_ptid): New function.
12197
12198 2017-03-13  Mark Wielaard  <mark@klomp.org>
12199
12200         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12201
12202 2017-03-10  Keith Seitz  <keiths@redhat.com>
12203
12204         PR c++/8218
12205         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12206
12207 2017-03-08  Pedro Alves  <palves@redhat.com>
12208
12209         PR gdb/18360
12210         * infrun.c (start_step_over, do_target_resume, resume)
12211         (restart_threads): Assert we're not resuming a thread that is
12212         meant to be stopped.
12213         (infrun_thread_stop_requested_callback): Delete.
12214         (infrun_thread_stop_requested): If the thread is internally
12215         stopped, queue a pending stop event and clear the thread's
12216         inline-frame state.
12217         (handle_stop_requested): New function.
12218         (handle_syscall_event, handle_inferior_event_1): Use
12219         handle_stop_requested.
12220         (handle_stop_requested): New function.
12221         (handle_signal_stop): Set the thread's stop_signal here instead of
12222         at caller.
12223         (finish_step_over): Clear step over info unconditionally.
12224         (handle_signal_stop): If the user had interrupted the event
12225         thread, consider the stop a random signal.
12226         (handle_signal_stop) <signal arrived while stepping over
12227         breakpoint>: Don't restart threads here.
12228         (stop_waiting): Don't clear step-over info here.
12229
12230 2017-03-08  Pedro Alves  <palves@redhat.com>
12231
12232         PR 21206
12233         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12234         goes to argument 2, not 1.
12235
12236 2017-03-08  Pedro Alves  <palves@redhat.com>
12237
12238         PR cli/21218
12239         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12240         display_gdb_prompt.
12241         (command_line_input): Add comment.
12242
12243 2017-03-08  Pedro Alves  <palves@redhat.com>
12244
12245         PR tui/21216
12246         * tui/tui-file.c (tui_file::write): New.
12247         * tui/tui-file.h (tui_file): Override "write".
12248         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12249         factored out from ...
12250         (tui_puts): ... here.
12251         (tui_putc): Use them.
12252         (tui_write): New function.
12253         * tui/tui-io.h (tui_write): Declare.
12254
12255 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12256
12257         * Makefile.in (SFILES): Replace "environ.c" with
12258         "common/environ.c".
12259         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12260         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12261         to...
12262         * common/environ.c: ... here.
12263         * environ.h: Moved to...
12264         * common/environ.h: ... here.
12265
12266 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12267
12268         * gdbarch.sh (pstring_ptr): New static function.
12269         (gdbarch_disassembler_options): Use it.
12270         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12271         not valid_disassembler_option->name.
12272         * gdbarch.c: Regenerate.
12273
12274 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12275
12276         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12277
12278 2017-03-07  Pedro Alves  <palves@redhat.com>
12279
12280         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12281
12282 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12283
12284         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12285         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12286         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12287         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12288
12289 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12290
12291         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12292
12293 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12294
12295         * remote.c (remote_add_target_side_commands): Use range-based
12296         for loop.
12297
12298 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12299
12300         PR gdb/21165
12301         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12302         value is lazy.
12303         * valprint.c (common_val_print): Likewise.
12304
12305 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12306
12307         * NEWS: Mention new set/show disassembler-options commands.
12308         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12309         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12310         (prospective_options): New static variable.
12311         (gdb_disassembler::gdb_disassembler): Initialize
12312         m_di.disassembler_options.
12313         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12314         (get_disassembler_options): New function.
12315         (set_disassembler_options): Likewise.
12316         (set_disassembler_options_sfunc): Likewise.
12317         (show_disassembler_options_sfunc): Likewise.
12318         (disassembler_options_completer): Likewise.
12319         (_initialize_disasm): Likewise.
12320         * disasm.h (get_disassembler_options): New prototype.
12321         (set_disassembler_options): Likewise.
12322         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12323         (gdbarch_verify_disassembler_options): Likewise.
12324         * gdbarch.c: Regenerate.
12325         * gdbarch.h: Likewise.
12326         * arm-tdep.c (num_disassembly_options): Delete.
12327         (set_disassembly_style): Likewise.
12328         (arm_disassembler_options): New static variable.
12329         (set_disassembly_style_sfunc): Convert short style name into long
12330         option name.  Call set_disassembler_options.
12331         (show_disassembly_style_sfunc): New function.
12332         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12333         set_gdbarch_verify_disassembler_options.
12334         (_initialize_arm_tdep): Delete regnames variable and update callers.
12335         (arm_disassembler_options): Initialize.
12336         (disasm_options): New variable.
12337         (num_disassembly_options): Rename from this...
12338         (num_disassembly_styles): ...to this.  Compute by scanning through
12339         disasm_options.
12340         (valid_disassembly_styles): Initialize using disasm_options.
12341         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12342         set_arm_regname_option.
12343         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12344         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12345         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12346         set_gdbarch_verify_disassembler_options.
12347         * s390-tdep.c (s390_disassembler_options): New static variable.
12348         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12349         set_gdbarch_verify_disassembler_options.
12350
12351 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12352
12353         * remote.c (remote_add_target_side_condition): Remove "struct"
12354         keyword from range-based for loop.
12355
12356 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12357
12358         * remote.c (remote_add_target_side_condition): Use range-based
12359         for loop.  Update comment.
12360
12361 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12362
12363         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12364
12365 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12366
12367         * regcache.c (regcache_raw_update): New function.
12368         (regcache_raw_read): Move code to regcache_raw_update.
12369         * regcache.h (regcache_raw_update): New declaration.
12370         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12371
12372 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12373
12374         * dwarf2read.c (create_debug_type_hash_table): Initialize
12375         header.signature and header.type_offset_in_tu.
12376
12377 2017-02-24  Pedro Alves  <palves@redhat.com>
12378
12379         * symtab.c (make_file_symbol_completion_list_1): Use
12380         add_symtab_completions.
12381
12382 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12383
12384         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12385
12386 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12387
12388         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12389         I386_MAX_REGISTER_SIZE.
12390         (i386_pseudo_register_write): Likewise.
12391         (i386_process_record): Likewise.
12392         * i387-tdep.c (i387_supply_xsave): Likewise.
12393         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12394         (store_register): Likewise.
12395
12396 2017-02-23  Pedro Alves  <palves@redhat.com>
12397
12398         * ada-lang.c: Include "common/function-view.h".
12399         (ada_iterate_over_symbols): Adjust to use function_view as
12400         callback type.
12401         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12402         (ada_make_symbol_completion_list): Use a lambda.
12403         (ada_exc_search_name_matches): Delete.
12404         (name_matches_regex): New.
12405         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12406         * compile/compile-c-support.c: Include "common/function-view.h".
12407         (print_one_macro): Change prototype to accept a ui_file pointer.
12408         (write_macro_definitions): Use a lambda.
12409         * dwarf2read.c: Include "common/function-view.h".
12410         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12411         (dw2_expand_symtabs_matching): Adjust to use function_view as
12412         callback type.
12413         * language.h: Include "common/function-view.h".
12414         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12415         function_view as callback type.
12416         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12417         * linespec.c: Include "common/function-view.h".
12418         (collect_info::add_symbol): New method.
12419         (struct symbol_and_data_callback, iterate_inline_only, struct
12420         symbol_matcher_data, iterate_name_matcher): Delete.
12421         (iterate_over_all_matching_symtabs): Adjust to use function_view
12422         as callback type and lambdas.
12423         (iterate_over_file_blocks): Adjust to use function_view as
12424         callback type.
12425         (decode_compound_collector): Now a class with private fields.
12426         (decode_compound_collector::release_symbols): New method.
12427         (collect_one_symbol): Rename to...
12428         (decode_compound_collector::operator()): ... this and adjust.
12429         (lookup_prefix_sym): decode_compound_collector construction bits
12430         move to decode_compound_collector ctor.  Pass the
12431         decode_compound_collector object directly as callback.  Remove
12432         cleanups and use decode_compound_collector::release_symbols
12433         instead.
12434         (symtab_collector): Now a class with private fields.
12435         (symtab_collector::release_symtabs): New method.
12436         (add_symtabs_to_list): Rename to...
12437         (symtab_collector::operator()): ... this and adjust.
12438         (collect_symtabs_from_filename): symtab_collector construction
12439         bits move to symtab_collector ctor.  Pass the symtab_collector
12440         object directly as callback.  Remove cleanups and use
12441         symtab_collector::release_symtabs instead.
12442         (collect_symbols): Delete.
12443         (add_matching_symbols_to_info): Use lambdas.
12444         * macrocmd.c (print_macro_callback): Delete.
12445         (info_macro_command): Use a lambda.
12446         (info_macros_command): Pass print_macro_definition as callable
12447         directly.
12448         (print_one_macro): Remove 'ignore' parameter.
12449         (macro_list_command): Adjust.
12450         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12451         (macro_for_each_data::user_data): Delete field.
12452         (foreach_macro): Adjust to call the function_view.
12453         (macro_for_each): Adjust to use function_view as callback type.
12454         (foreach_macro_in_scope): Adjust to call the function_view.
12455         (macro_for_each_in_scope): Adjust to use function_view as callback
12456         type.
12457         * macrotab.h: Include "common/function-view.h".
12458         (macro_callback_fn): Declare a prototype instead of a pointer.
12459         Remove "user_data" parameter.
12460         (macro_for_each, macro_for_each_in_scope): Adjust to use
12461         function_view as callback type.
12462         * psymtab.c (partial_map_expand_apply)
12463         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12464         Adjust to use function_view as callback type and to return bool.
12465         (psym_expand_symtabs_matching): Adjust to use function_view as
12466         callback types.
12467         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12468         to use function_view as callback type and to return bool.
12469         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12470         callback types.
12471         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12472         as callback types.
12473         * symfile.h: Include "common/function-view.h".
12474         (expand_symtabs_file_matcher_ftype)
12475         (expand_symtabs_symbol_matcher_ftype)
12476         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12477         return bool.
12478         (quick_symbol_functions::map_symtabs_matching_filename)
12479         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12480         function_view as callback type and return bool.
12481         (expand_symtabs_matching): Adjust to use function_view as callback
12482         type.
12483         (maintenance_expand_name_matcher)
12484         (maintenance_expand_file_matcher): Delete.
12485         (maintenance_expand_symtabs): Use lambdas.
12486         * symtab.c (iterate_over_some_symtabs): Adjust to use
12487         function_view as callback types and return bool.
12488         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12489         of a cleanup.
12490         (lookup_symtab_callback): Delete.
12491         (lookup_symtab): Use a lambda.
12492         (iterate_over_symbols): Adjust to use function_view as callback
12493         type.
12494         (struct search_symbols_data, search_symbols_file_matches)
12495         (search_symbols_name_matches): Delete.
12496         (search_symbols): Use a pair of lambdas.
12497         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12498         (symtab_expansion_callback): Delete.
12499         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12500         * symtab.h: Include "common/function-view.h".
12501         (iterate_over_some_symtabs): Adjust to use function_view as
12502         callback type and return bool.
12503         (iterate_over_symtabs): Adjust to use function_view as callback
12504         type.
12505         (symbol_found_callback_ftype): Remove 'data' parameter and return
12506         bool.
12507         (iterate_over_symbols): Adjust to use function_view as callback
12508         type.
12509
12510 2017-02-23  Pedro Alves  <palves@redhat.com>
12511
12512         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12513         (%.o) <unittests/%.c>: New pattern.
12514         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12515         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12516         * common/function-view.h: New file.
12517         * unittests/function-view-selftests.c: New file.
12518         * configure: Regenerate.
12519
12520 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12521
12522         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12523         inferior_ptid.
12524         * go32-nat.c (go32_thread_alive): Likewise.
12525
12526 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12527
12528         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12529         delete.
12530
12531 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12532
12533         * varobj.c (varobj_clear_saved_item): Use delete instead of
12534         xfree.
12535         (update_dynamic_varobj_children): Likewise.
12536
12537 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12538
12539         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12540
12541 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12542
12543         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12544         m_enum_value to 0 in default constructor.
12545
12546 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12547
12548         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12549         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12550         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12551         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12552         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12553         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12554         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12555         IS_STORE_CONDITIONAL_INSN.
12556
12557 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12558
12559         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12560
12561 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12562
12563         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12564
12565 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12566
12567         * dwarf2read.c (skip_one_die, read_attribute_value)
12568         (dwarf2_const_value_attr, dump_die_shallow)
12569         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12570         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12571
12572 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12573
12574         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12575         (dwarf_parse_macro_header): Accept DWARF version 5.
12576         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12577
12578 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12579
12580         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12581         DW_AT_GNU_*.
12582         * common/common-exceptions.h (enum errors): Likewise.
12583         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12584         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12585         (dwarf_expr_context::execute_stack_op): Likewise.
12586         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12587         Likewise.
12588         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12589         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12590         (show_entry_values_debug, call_site_to_target_addr)
12591         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12592         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12593         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12594         (value_of_dwarf_block_entry, indirect_pieced_value)
12595         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12596         (disassemble_dwarf_expression): Likewise.
12597         * dwarf2read.c (process_die, inherit_abstract_dies)
12598         (read_call_site_scope): Likewise.
12599         * gdbtypes.h (struct func_type, struct call_site_parameter)
12600         (struct call_site): Likewise.
12601         * stack.c (read_frame_arg): Likewise.
12602         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12603
12604 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12605
12606         * defs.h (read_unsigned_leb128): New declaration.
12607         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12608         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12609         (dwarf2_find_location_expression): Call also
12610         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12611         * dwarf2loc.h (dwarf2_version): New declaration.
12612         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12613         rnglists.
12614         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12615         .debug_rnglists.
12616         (struct dwop_section_names): Add loclists_dwo.
12617         (dwop_section_names): Add .debug_loclists.dwo.
12618         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12619         (struct dwarf2_per_cu_data): Add dwarf_version.
12620         (struct dwo_sections): Add loclists.
12621         (struct attr_abbrev): Add implicit_const.
12622         (read_indirect_line_string): New declaration.
12623         (read_unsigned_leb128): Delete declaration.
12624         (rcuh_kind): New definition.
12625         (read_and_check_comp_unit_head): Change parameter
12626         is_debug_types_section to section_kind.
12627         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12628         (read_comp_unit_head): Change parameter abfd to section, add parameter
12629         section_kind.  Handle DWARF-5.
12630         (error_check_comp_unit_head): Accept also DWARF version 5.
12631         (read_and_check_comp_unit_head): Change parameter
12632         is_debug_types_section to section_kind.
12633         (read_and_check_type_unit_head): Delete function.
12634         (read_abbrev_offset): Handle DWARF-5.
12635         (create_debug_type_hash_table): Add parameter section_kind.  Process
12636         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12637         comp_unit_head.
12638         (create_debug_types_hash_table): Update create_debug_type_hash_table
12639         caller.
12640         (create_all_type_units): Call create_debug_type_hash_table.
12641         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12642         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12643         caller.
12644         (skip_one_die): Handle DW_FORM_implicit_const.
12645         (dwarf2_rnglists_process): New function.
12646         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12647         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12648         (read_attribute_value): Handle DW_FORM_implicit_const,
12649         DW_FORM_line_strp.
12650         (read_attribute): Handle DW_FORM_implicit_const.
12651         (read_indirect_string_at_offset_from): New function from
12652         read_indirect_string_at_offset.
12653         (read_indirect_string_at_offset): Call
12654         read_indirect_string_at_offset_from.
12655         (read_indirect_line_string_at_offset): New function.
12656         (read_indirect_string): New function comment.
12657         (read_indirect_line_string): New function.
12658         (read_unsigned_leb128): Make it global.
12659         (dwarf2_string_attr): Handle DWARF-5.
12660         (add_include_dir_stub, read_formatted_entries): New functions.
12661         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12662         Handle DWARF-5.
12663         (per_cu_header_read_in): Update read_comp_unit_head caller.
12664         (dwarf2_version): New function.
12665         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12666         rnglists.
12667         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12668         fields.
12669
12670 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12671
12672         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12673
12674 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12675
12676         * dwarf2read.c (dwarf2_ranges_process): New function from
12677         dwarf2_ranges_read.
12678         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12679         dwarf2_ranges_process.
12680
12681 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12682
12683         * dwarf2read.c (create_debug_type_hash_table): New function from
12684         create_debug_types_hash_table.
12685         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12686         (create_all_type_units, open_and_init_dwo_file): Update
12687         create_debug_types_hash_table callers.
12688
12689 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12690
12691         PR gdb/16188
12692         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12693         refer to 'ap', not 'args'.
12694
12695 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12696             Pedro Alves  <palves@redhat.com>
12697
12698         PR gdb/16188
12699         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12700         calls succeeded.
12701         * fork-child.c (trace_start_error): New function.
12702         (trace_start_error_with_name): Likewise.
12703         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12704         * inf-ptrace.c (inf_ptrace_me): Likewise.
12705         * inferior.h (trace_start_error): New prototype.
12706         (trace_start_error_with_name): Likewise.
12707
12708 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12709
12710         PR gdb/21164
12711         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12712         NULL before using it.
12713         * symmisc.c (maintenance_print_symbols): Likewise.
12714         (maintenance_print_msymbols): Likewise.
12715
12716 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12717
12718         * NEWS: Add record Python bindings entry.
12719
12720 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12721
12722         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12723         py-record-full.o.
12724         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12725         * python/py-record-btrace.c, python/py-record-btrace.h,
12726         python/py-record-full.c, python/py-record-full.h: New file.
12727         * python/py-record.c: Add include for py-record-btrace.h and
12728         py-record-full.h.
12729         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12730         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12731         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12732         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12733         New definition.
12734         (gdbpy_initialize_btrace): New export.
12735         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12736
12737 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12738
12739         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12740         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12741         * python/py-record.c: New file.
12742         * python/python-internal.h (gdbpy_start_recording,
12743         gdbpy_current_recording, gdpy_stop_recording,
12744         gdbpy_initialize_record): New export.
12745         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12746         (python_GdbMethods): Add gdbpy_start_recording,
12747         gdbpy_current_recording and gdbpy_stop_recording.
12748
12749 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12750
12751         * record-btrace.c (record_btrace_record_method): New function.
12752         (init_record_btrace_ops): Initialize to_record_method.
12753         * record-full.c (record_full_record_method): New function.
12754         (init_record_full_ops, init_record_full_core_ops): Add
12755         record_full_record_method.
12756         * record.h (enum record_method): New enum.
12757         * target-debug.h (target_debug_print_enum_record_method: New define.
12758         * target-delegates.c: Regenerate.
12759         * target.c (target_record_method): New function.
12760         * target.h: Include record.h.
12761         (struct target_ops) <to_record_method>: New field.
12762         (target_record_method): New export.
12763
12764 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12765
12766         * record.h (record_start, record_stop): New export.
12767         * record.c (record_start, record_stop): New function.
12768
12769 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12770
12771         * btrace.c (btrace_fetch): Copy function call segments pointer
12772         into a vector.
12773         (btrace_clear): Clear the vector.
12774         (btrace_find_insn_by_number): Use binary search to find the correct
12775         function call segment.
12776         * btrace.h (brace_fun_p): New typedef.
12777         (struct btrace_thread_info) <functions>: New field.
12778
12779 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12780
12781         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12782         * btrace.c (btrace_decode_error): ... here.  New function.
12783         * btrace.h (btrace_decode_error): New export.
12784
12785 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12786
12787         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12788         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12789         btrace_find_insn_by_number): Remove special case for gaps.
12790         * btrace.h (btrace_insn_get_error): New export.
12791         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12792         * record-btrace.c (btrace_insn_history): Print number for gaps.
12793         (record_btrace_info, record_btrace_goto): Handle gaps.
12794
12795 2017-02-14  Tom Tromey  <tom@tromey.com>
12796
12797         PR python/13598:
12798         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12799         event.
12800         * python/py-evts.c (gdbpy_initialize_py_events): Add
12801         before_prompt registry.
12802         * python/py-events.h (events_object) <before_prompt>: New field.
12803
12804 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12805
12806         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12807
12808 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12809
12810         * symfile (_initialize_symfile): Add usage text to the load command's
12811         help text.
12812
12813 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12814
12815         * utils.c (defaulted_query): Don't query on secondary UIs.
12816
12817 2017-02-10  Tom Tromey  <tom@tromey.com>
12818
12819         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12820
12821 2017-02-10  Tom Tromey  <tom@tromey.com>
12822
12823         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12824         "cleanup" local.
12825         * python/py-type.c (typy_legacy_template_argument): Remove
12826         unnecessary "cleanup" local.
12827
12828 2017-02-10  Tom Tromey  <tom@tromey.com>
12829
12830         * python/python.c (do_start_initialization): New function, from
12831         _initialize_python.
12832         (_initialize_python): Call do_start_initialization.
12833         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12834         goto.
12835
12836 2017-02-10  Tom Tromey  <tom@tromey.com>
12837
12838         * python/py-prettyprint.c (pretty_print_one_value): Use
12839         gdbpy_ref.
12840
12841 2017-02-10  Tom Tromey  <tom@tromey.com>
12842
12843         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12844         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12845         gdbpy_ref.
12846         * python/py-type.c (field_new): Use gdbpy_ref.
12847         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12848         gdbpy_ref.
12849         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12850         (py_free_pspace): Likewise.
12851         (pspace_to_pspace_object): Likewise.
12852         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12853         (py_free_objfile): Likewise.
12854         (objfile_to_objfile_object): Likewise.
12855         * python/py-inferior.c (delete_thread_object): Use
12856         gdbpy_ref.
12857         (infpy_read_memory): Likewise.
12858         (py_free_inferior): Likewise.
12859         * python/py-evtregistry.c (create_eventregistry_object): Use
12860         gdbpy_ref.
12861         * python/py-event.c (create_event_object): Use gdbpy_ref.
12862
12863 2017-02-10  Tom Tromey  <tom@tromey.com>
12864
12865         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12866         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12867         used.
12868         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12869         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12870         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12871         python/py-framefilter.c, python/py-function.c,
12872         python/py-inferior.c, python/py-infevents.c,
12873         python/py-linetable.c, python/py-newobjfileevent.c,
12874         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12875         python/py-signalevent.c, python/py-stopevent.c,
12876         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12877         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12878         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12879         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12880
12881 2017-02-10  Tom Tromey  <tom@tromey.com>
12882
12883         * ui-out.h (ui_out_emit_type): New class.
12884         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12885         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12886         and ui_out_emit_tuple.
12887         (enumerate_locals): Likewise.
12888         (py_mi_print_variables, py_print_locals, py_print_args): Use
12889         ui_out_emit_list.
12890         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12891         ui_out_emit_list.
12892         * common/gdb_optional.h: New file.
12893
12894 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12895
12896         * MAINTAINERS (Write After Approval): Update my e-mail address.
12897
12898 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12899
12900         PR gdb/21122
12901         * breakpoint.c (_initialize_breakpoint): Update the help description
12902         of the 'commands' command to indicate that it takes a list argument.
12903
12904 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12905
12906         * interps.c (current_interp_set_logging): Remove "return".
12907
12908 2017-02-09  Gary Benson  <gbenson@redhat.com>
12909
12910         * symtab.c (add_symtab_completions): Prevent NULL pointer
12911         dereference.
12912
12913 2017-02-08  Pedro Alves  <palves@redhat.com>
12914
12915         * interps.c (interp::interp): Remove reference to quiet_p.
12916         (interp_set): Make static.  Remove dead "Switching to" output
12917         code.
12918         (interp_quiet_p, interp_set_quiet): Delete.
12919         (interpreter_exec_cmd): Don't set the interpreter quiet.
12920         * interps.h (interp_quiet_p): Make static.
12921         (class interp) <quiet_p>: Remove field
12922
12923 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12924
12925         * cli/cli-decode.c (find_command_name_length): Make it extern.
12926         * cli/cli-decode.h (find_command_name_length): Declare.
12927         * cli/cli-script.c (command_name_equals, line_first_arg):
12928         New functions.
12929         (process_next_line): Use cli-decode to parse command names.
12930         (build_command_line): Make args a constant pointer.
12931
12932 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12933
12934         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12935         Remove case-insensitive search.
12936
12937 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12938
12939         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12940         at the end of the line.  Avoids an ARI warning.
12941
12942 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12943
12944         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12945         rdseed instructions.
12946         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12947
12948 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12949
12950         PR tdep/20936
12951         Provide and use sparc32 and sparc64 target description XML files.
12952         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12953         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12954         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12955         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12956         * features/sparc/sparc32-solaris.xml: New file.
12957         * features/sparc/sparc64-solaris.xml: New file.
12958         * features/sparc/sparc32-solaris.c: Generated.
12959         * features/sparc/sparc64-solaris.c: Generated.
12960         * sparc-tdep.h: Account for differences in target descriptions.
12961         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12962         (sparc32_register_type): Use target provided registers.
12963         (validate_tdesc_registers): New function.
12964         (sparc32_gdbarch_init): Use tdesc_has_registers.
12965         Set pseudoregister functions.
12966         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12967         (sparc64_register_type): Use target provided registers.
12968         (sparc64_init_abi): Set pseudoregister functions.
12969
12970 2017-02-03  Tom Tromey  <tom@tromey.com>
12971
12972         PR rust/21097:
12973         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12974         with a single member.
12975
12976 2017-02-03  Pedro Alves  <palves@redhat.com>
12977
12978         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12979         (cli_interp_base::~cli_interp_base): New.
12980         (cli_interp): New struct.
12981         (as_cli_interp): Cast the interp itself to cli_interp.
12982         (cli_interpreter_pre_command_loop): Rename to ...
12983         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12984         parameter.
12985         (cli_interpreter_init): Rename to ...
12986         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12987         boolean.  Make extern.
12988         (cli_interpreter_resume): Rename to ...
12989         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12990         extern.
12991         (cli_interpreter_suspend): Rename to ...
12992         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12993         extern.
12994         (cli_interpreter_exec): Rename to ...
12995         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12996         extern.
12997         (cli_interpreter_supports_command_editing): Rename to ...
12998         (cli_interp_base::supports_command_editing): ... this.  Remove
12999         'interp' parameter.  Make extern.
13000         (cli_ui_out): Rename to ...
13001         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13002         Make extern.
13003         (cli_set_logging): Rename to ...
13004         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13005         parameter.  Make extern.
13006         (cli_interp_procs): Delete.
13007         (cli_interp_factory): Adjust to use "new".
13008         * cli/cli-interp.h: Include "interps.h".
13009         (struct cli_interp_base): New struct.
13010         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13011         (interp_new): Delete.
13012         (interp::interp, interp::~interp): New.
13013         (interp_set): Use bool, and return void.  Assume the interpreter
13014         has suspend, init and resume methods, and that the all return
13015         void.
13016         (set_top_level_interpreter): interp_set returns void.
13017         (interp_ui_out): Adapt.
13018         (current_interp_set_logging): Adapt.
13019         (interp_data): Delete.
13020         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13021         (interp_exec): Adapt.
13022         (top_level_interpreter_data): Delete.
13023         * interps.h (interp_init_ftype, interp_resume_ftype)
13024         (interp_suspend_ftype, interp_exec_ftype)
13025         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13026         (class interp): New.
13027         (interp_new): Delete.
13028         (interp_set): Now returns void.  Use bool.
13029         (interp_data, top_level_interpreter_data): Delete.
13030         * mi/mi-common.h: Include interps.h.
13031         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13032         init, resume, suspect, exec, interp_ui_out, set_logging and
13033         pre_command_loop methods.
13034         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13035         (mi_interpreter_init): Rename to ...
13036         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13037         bool, return void and make extern.  Adjust.
13038         (mi_interpreter_resume): ... Rename to ...
13039         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13040         return void and make extern.  Adjust.
13041         (mi_interpreter_suspend): ... Rename to ...
13042         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13043         return void and make extern.  Adjust.
13044         (mi_interpreter_exec): ... Rename to ...
13045         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13046         extern.  Adjust.
13047         (mi_interpreter_pre_command_loop): ... Rename to ...
13048         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13049         parameter and make extern.
13050         (mi_on_normal_stop_1): Adjust.
13051         (mi_ui_out): Rename to ...
13052         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13053         parameter and make extern.  Adjust.
13054         (mi_set_logging): Rename to ...
13055         (mi_interp::set_logging): ... this.  Remove the 'interp'
13056         parameter and make extern.  Adjust.
13057         (mi_interp_procs): Delete.
13058         (mi_interp_factory): Adjust to use 'new'.
13059         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13060         (mi_print_exception, mi_execute_command, mi_load_progress):
13061         Adjust.
13062         * tui/tui-interp.c (tui_interp): New class.
13063         (as_tui_interp): Return a tui_interp pointer.
13064         (tui_on_normal_stop, tui_on_signal_received)
13065         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13066         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13067         to use interp::interp_ui_out.
13068         (tui_init): Rename to ...
13069         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13070         bool, return void and make extern.  Adjust.
13071         (tui_resume): Rename to ...
13072         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13073         return void and make extern.  Adjust.
13074         (tui_suspend): Rename to ...
13075         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13076         return void and make extern.  Adjust.
13077         (tui_ui_out): Rename to ...
13078         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13079         parameter, and make extern.  Adjust.
13080         (tui_exec): Rename to ...
13081         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13082         make extern.
13083         (tui_interp_procs): Delete.
13084         (tui_interp_factory): Use "new".
13085
13086 2017-02-02  Tom Tromey  <tom@tromey.com>
13087
13088         * rust-exp.y (ends_raw_string, space_then_number)
13089         (rust_identifier_start_p): Return bool.
13090         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13091         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13092         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13093         (rust_chartype_p): Return bool.
13094         (val_print_struct, rust_print_struct_def, rust_print_type):
13095         Update.
13096         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13097         Return bool.
13098
13099 2017-02-02  Tom Tromey  <tom@tromey.com>
13100
13101         * rust-lang.c: Reindent.
13102
13103 2017-02-02  Tom Tromey  <tom@tromey.com>
13104
13105         * rust-lang.h (rust_crate_for_block): Update.
13106         * rust-lang.c (rust_crate_for_block): Return std::string.
13107         (rust_get_disr_info): Use std:;string, not
13108         gdb::unique_xmalloc_ptr.
13109         * rust-exp.y (crate_name): Update.
13110
13111 2017-02-02  Pedro Alves  <palves@redhat.com>
13112
13113         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13114         field out of gdb_disassembler_test and make it static.
13115
13116 2017-02-02  Pedro Alves  <palves@redhat.com>
13117
13118         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13119         mi1_interp and mi_interp fields.
13120
13121 2017-02-02  Pedro Alves  <palves@redhat.com>
13122
13123         * cli/cli-interp.c (struct saved_output_files, saved_output):
13124         Moved from cli/cli-logging.c.
13125         (cli_set_logging): New function.
13126         (cli_interp_procs): Install cli_set_logging.
13127         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13128         Declare.
13129         * cli/cli-logging.c (struct saved_output_files, saved_output):
13130         Moved to cli/cli-interp.c.
13131         (pop_output_files): Don't save outputs here.
13132         (make_logging_output): New function.
13133         (handle_redirections): Don't build tee nor save previous outputs
13134         here.
13135         * interps.c (current_interp_set_logging): Change prototype.
13136         Assume there's always a set_logging_proc method installed.
13137         * interps.h (interp_set_logging_ftype): Change prototype.
13138         (current_interp_set_logging): Change prototype and adjust comment.
13139         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13140         use make_logging_output.
13141         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13142 2017-02-02  Pedro Alves  <palves@redhat.com>
13143
13144         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13145         from ...
13146         (set_logging_overwrite): ... here.
13147         (logging_no_redirect_file): Delete.
13148         (set_logging_redirect): Don't handle redirection on the fly.
13149         Instead warn that "logging off" / "logging on" is necessary.
13150         (pop_output_files): Delete references to logging_no_redirect_file.
13151         (show_logging_command): Always speak in terms of what will happen
13152         once logging is reenabled.
13153
13154 2017-02-02  Pedro Alves  <palves@redhat.com>
13155
13156         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13157
13158 2017-02-02  Pedro Alves  <palves@redhat.com>
13159
13160         * disasm.c (gdb_pretty_print_insn): Rename to ...
13161         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13162         Remove gdbarch parameter.  Adapt to clear the object's buffers
13163         instead of allocating new buffers, and to print using the object's
13164         gdb_disassembler instead of calling gdb_print_insn.
13165         (dump_insns): Use gdb_pretty_print_disassembler.
13166         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13167         (gdb_pretty_print_disassembler): New class.
13168         * record-btrace.c (btrace_insn_history): Use
13169         gdb_pretty_print_disassembler.
13170
13171 2017-02-02  Pedro Alves  <palves@redhat.com>
13172
13173         * ada-lang.c (type_as_string): Use string_file.
13174         * ada-valprint.c (ada_print_floating): Use string_file.
13175         * ada-varobj.c (ada_varobj_scalar_image)
13176         (ada_varobj_get_value_image): Use string_file.
13177         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13178         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13179         * breakpoint.c (update_inserted_breakpoint_locations)
13180         (insert_breakpoint_locations, reattach_breakpoints)
13181         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13182         (print_it_watchpoint): Use string_file.
13183         (save_breakpoints): Use stdio_file.
13184         * c-exp.y (oper): Use string_file.
13185         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13186         tee_file.
13187         (pop_output_files): Use delete.
13188         (handle_redirections): Use stdio_file and tee_file.
13189         * cli/cli-setshow.c (do_show_command): Use string_file.
13190         * compile/compile-c-support.c (c_compute_program): Use
13191         string_file.
13192         * compile/compile-c-symbols.c (generate_vla_size): Take a
13193         'string_file &' instead of a 'ui_file *'.
13194         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13195         of a 'ui_file *'.  Use string_file.
13196         (generate_c_for_variable_locations): Take a 'string_file &'
13197         instead of a 'ui_file *'.
13198         * compile/compile-internal.h (generate_c_for_for_one_variable):
13199         Take a 'string_file &' instead of a 'ui_file *'.
13200         * compile/compile-loc2c.c (push, pushf, unary, binary)
13201         (print_label, pushf_register_address, pushf_register)
13202         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13203         'ui_file *'.  Adjust.
13204         * compile/compile.c (compile_to_object): Use string_file.
13205         * compile/compile.h (compile_dwarf_expr_to_c)
13206         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13207         'ui_file *'.
13208         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13209         (replace_typedefs_qualified_name): Use string_file and
13210         obstack_copy0.
13211         * disasm.c (gdb_pretty_print_insn): Use string_file.
13212         (gdb_disassembly): Adjust reference the null_stream global.
13213         (do_ui_file_delete): Delete.
13214         (gdb_insn_length): Use null_stream.
13215         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13216         * dwarf2loc.c (dwarf2_compile_property_to_c)
13217         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13218         'string_file &' instead of a 'ui_file *'.
13219         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13220         * dwarf2read.c (do_ui_file_peek_last): Delete.
13221         (dwarf2_compute_name): Use string_file.
13222         * event-top.c (gdb_setup_readline): Use stdio_file.
13223         * gdbarch.sh (verify_gdbarch): Use string_file.
13224         * gdbtypes.c (safe_parse_type): Use null_stream.
13225         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13226         string_file.
13227         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13228         'string_file *' instead of a 'ui_file *'.
13229         (gdbscm_arch_disassemble): Use string_file.
13230         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13231         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13232         inherits from ui_file.
13233         (ioscm_file_port_delete, ioscm_file_port_rewind)
13234         (ioscm_file_port_put): Delete.
13235         (ioscm_file_port_write): Rename to ...
13236         (ioscm_file_port::write): ... this.  Remove file_port_magic
13237         checks.
13238         (ioscm_file_port_new): Delete.
13239         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13240         ui_file_up.
13241         * guile/scm-type.c (tyscm_type_name): Use string_file.
13242         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13243         Use string_file.
13244         * infcmd.c (print_return_value_1): Use string_file.
13245         * infrun.c (print_target_wait_results): Use string_file.
13246         * language.c (add_language): Use string_file.
13247         * location.c (explicit_to_string_internal): Use string_file.
13248         * main.c (captured_main_1): Use null_file.
13249         * maint.c (maintenance_print_architecture): Use stdio_file.
13250         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13251         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13252         event_channel>: Change type to mi_console_file pointer.
13253         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13254         (mi_console_file_delete): Delete.
13255         (struct mi_console_file): Delete.
13256         (mi_console_file_magic): Delete.
13257         (mi_console_file_new): Delete.
13258         (mi_console_file::mi_console_file): New.
13259         (mi_console_file_delete): Delete.
13260         (mi_console_file_fputs): Delete.
13261         (mi_console_file::write): New.
13262         (mi_console_raw_packet): Delete.
13263         (mi_console_file::flush): New.
13264         (mi_console_file_flush): Delete.
13265         (mi_console_set_raw): Rename to ...
13266         (mi_console_file::set_raw): ... this.
13267         * mi/mi-console.h (class mi_console_file): New class.
13268         (mi_console_file_new, mi_console_set_raw): Delete.
13269         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13270         (mi_set_logging): Use delete and tee_file.  Adjust.
13271         * mi/mi-main.c (output_register): Use string_file.
13272         (mi_cmd_data_evaluate_expression): Use string_file.
13273         (mi_cmd_data_read_memory): Use string_file.
13274         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13275         * mi/mi-out.c (mi_ui_out::main_stream): New.
13276         (mi_ui_out::rewind): Use main_stream and
13277         string_file.
13278         (mi_ui_out::put): Use main_stream and string_file.
13279         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13280         Allocate a 'string_file' instead.
13281         (mi_out_new): Don't allocate a mem_fileopen stream here.
13282         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13283         (mi_ui_out::main_stream): Declare method.
13284         * printcmd.c (eval_command): Use string_file.
13285         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13286         * python/py-arch.c (archpy_disassemble): Use string_file.
13287         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13288         * python/py-frame.c (frapy_str): Use string_file.
13289         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13290         Use string_file.
13291         * python/py-type.c (typy_str): Use string_file.
13292         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13293         * python/py-value.c (valpy_str): Use string_file.
13294         * record-btrace.c (btrace_insn_history): Use string_file.
13295         * regcache.c (regcache_print): Use stdio_file.
13296         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13297         * remote.c (escape_buffer): Use string_file.
13298         * rust-lang.c (rust_get_disr_info): Use string_file.
13299         * serial.c (serial_open_ops_1): Use stdio_file.
13300         (do_serial_close): Use delete.
13301         * stack.c (print_frame_arg): Use string_file.
13302         (print_frame_args): Remove local mem_fileopen stream, not used.
13303         (print_frame): Use string_file.
13304         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13305         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13306         Take a 'string_file *' instead of a 'ui_file *'.
13307         * top.c (new_ui): Use stdio_file and stderr_file.
13308         (free_ui): Use delete.
13309         (execute_command_to_string): Use string_file.
13310         (quit_confirm): Use string_file.
13311         * tracepoint.c (collection_list::append_exp): Use string_file.
13312         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13313         * tui/tui-file.c: Don't include "ui-file.h".
13314         (enum streamtype, struct tui_stream): Delete.
13315         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13316         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13317         (tui_file::tui_file): New method.
13318         (tui_file_fputs): Delete.
13319         (tui_file_get_strbuf): Delete.
13320         (tui_file::puts): New method.
13321         (tui_file_adjust_strbuf): Delete.
13322         (tui_file_flush): Delete.
13323         (tui_file::flush): New method.
13324         * tui/tui-file.h: Tweak intro comment.
13325         Include ui-file.h.
13326         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13327         (tui_file_adjust_strbuf): Delete declarations.
13328         (class tui_file): New class.
13329         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13330         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13331         (tui_register_format): Use string_stream.
13332         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13333         (tui_get_function_from_frame): Use string_file.
13334         * typeprint.c (type_to_string): Use string_file.
13335         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13336         (null_stream): New global.
13337         (ui_file_delete): Delete.
13338         (ui_file::ui_file): New.
13339         (null_file_isatty): Delete.
13340         (ui_file::~ui_file): New.
13341         (null_file_rewind): Delete.
13342         (ui_file::printf): New.
13343         (null_file_put): Delete.
13344         (null_file_flush): Delete.
13345         (ui_file::putstr): New.
13346         (null_file_write): Delete.
13347         (ui_file::putstrn): New.
13348         (null_file_read): Delete.
13349         (ui_file::putc): New.
13350         (null_file_fputs): Delete.
13351         (null_file_write_async_safe): Delete.
13352         (ui_file::vprintf): New.
13353         (null_file_delete): Delete.
13354         (null_file::write): New.
13355         (null_file_fseek): Delete.
13356         (null_file::puts): New.
13357         (ui_file_data): Delete.
13358         (null_file::write_async_safe): New.
13359         (gdb_flush, ui_file_isatty): Adjust.
13360         (ui_file_put, ui_file_rewind): Delete.
13361         (ui_file_write): Adjust.
13362         (ui_file_write_for_put): Delete.
13363         (ui_file_write_async_safe, ui_file_read): Adjust.
13364         (ui_file_fseek): Delete.
13365         (fputs_unfiltered): Adjust.
13366         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13367         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13368         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13369         (set_ui_file_data): Delete.
13370         (string_file::~string_file, string_file::write)
13371         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13372         (do_ui_file_as_string, ui_file_as_string): Delete.
13373         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13374         (struct mem_file): Delete.
13375         (mem_file_new): Delete.
13376         (stdio_file::stdio_file): New.
13377         (mem_file_delete): Delete.
13378         (stdio_file::stdio_file): New.
13379         (mem_fileopen): Delete.
13380         (stdio_file::~stdio_file): New.
13381         (mem_file_rewind): Delete.
13382         (stdio_file::set_stream): New.
13383         (mem_file_put): Delete.
13384         (stdio_file::open): New.
13385         (mem_file_write): Delete.
13386         (stdio_file_magic, struct stdio_file): Delete.
13387         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13388         (stdio_file::flush): New.
13389         (stdio_file_read): Rename to ...
13390         (stdio_file::read): ... this.  Adjust.
13391         (stdio_file_write): Rename to ...
13392         (stdio_file::write): ... this.  Adjust.
13393         (stdio_file_write_async_safe): Rename to ...
13394         (stdio_file::write_async_safe) ... this.  Adjust.
13395         (stdio_file_fputs): Rename to ...
13396         (stdio_file::puts) ... this.  Adjust.
13397         (stdio_file_isatty): Delete.
13398         (stdio_file_fseek): Delete.
13399         (stdio_file::isatty): New.
13400         (stderr_file_write): Rename to ...
13401         (stderr_file::write) ... this.  Adjust.
13402         (stderr_file_fputs): Rename to ...
13403         (stderr_file::puts) ... this.  Adjust.
13404         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13405         (stderr_file::stderr_file): New.
13406         (tee_file_magic): Delete.
13407         (struct tee_file): Delete.
13408         (tee_file::tee_file): New.
13409         (tee_file_new): Delete.
13410         (tee_file::~tee_file): New.
13411         (tee_file_delete): Delete.
13412         (tee_file_flush): Rename to ...
13413         (tee_file::flush): ... this.  Adjust.
13414         (tee_file_write): Rename to ...
13415         (tee_file::write): ... this.  Adjust.
13416         (tee_file::write_async_safe): New.
13417         (tee_file_fputs): Rename to ...
13418         (tee_file::puts): ... this.  Adjust.
13419         (tee_file_isatty): Rename to ...
13420         (tee_file::isatty): ... this.  Adjust.
13421         * ui-file.h (struct obstack, struct ui_file): Don't
13422         forward-declare.
13423         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13424         (ui_file_write_ftype)
13425         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13426         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13427         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13428         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13429         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13430         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13431         (set_ui_file_fseek): Delete.
13432         (ui_file_data, ui_file_delete, ui_file_rewind)
13433         (struct ui_file): New.
13434         (ui_file_up): New.
13435         (class null_file): New.
13436         (null_stream): Declare.
13437         (ui_file_write_for_put, ui_file_put): Delete.
13438         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13439         Delete.
13440         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13441         (gdb_fopen, tee_file_new): Delete.
13442         (struct string_file): New.
13443         (struct stdio_file): New.
13444         (stdio_file_up): New.
13445         (struct stderr_file): New.
13446         (class tee_file): New.
13447         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13448         of a 'ui_file *'.  Adjust.
13449         * ui-out.h (class ui_out) <field_stream>: Likewise.
13450         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13451         (null_stream): Delete.
13452         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13453         Adjust.
13454         * utils.h (struct ui_file): Delete forward declaration..
13455         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13456         (error_stream): Take a 'string_file &' instead of a
13457         'ui_file *'.
13458         * varobj.c (varobj_value_get_print_value): Use string_file.
13459         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13460         * gdbarch.c: Regenerate.
13461
13462 2017-02-02  Pedro Alves  <palves@redhat.com>
13463
13464         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13465         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13466         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13467         Adjust to call gdb_print_insn instead of
13468         gdb_disassembler::print_insn.
13469         (dump_insns, do_mixed_source_and_assembly_deprecated)
13470         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13471         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13472         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13473         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13474         declaration.
13475         (gdb_pretty_print_insn): Re-add declaration.
13476         * record-btrace.c (btrace_insn_history): Don't allocate a
13477         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13478
13479 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13480
13481         * disasm.h (gdb_disassembly): Remove file_string parameter.
13482         * disasm.c (gdb_disassembly): Likewise.
13483         * cli/cli-cmds.c (print_disassembly): Adapt.
13484         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13485         * stack.c (do_gdb_disassembly): Likewise.
13486
13487 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13488
13489         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13490         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13491         targets.  And if the implicit value is longer than needed, extract
13492         the first bytes instead of the "least significant" ones.
13493
13494 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13495
13496         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13497         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13498         (btrace_fetch): Assert can_access_registers_ptid.
13499         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13500         validate_registers_access.
13501
13502 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13503
13504         * gdbthread.h (can_access_registers_ptid): New.
13505         * thread.c (can_access_registers_ptid): New.
13506
13507 2017-02-01  Pedro Alves  <palves@redhat.com>
13508
13509         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13510
13511 2017-01-31  Pedro Alves  <palves@redhat.com>
13512
13513         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13514         Fix typos.
13515
13516 2017-01-31  Pedro Alves  <palves@redhat.com>
13517
13518         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13519         not used.
13520
13521 2017-01-31  Pedro Alves  <palves@redhat.com>
13522
13523         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13524
13525 2017-01-31  Pedro Alves  <palves@redhat.com>
13526
13527         * common/scoped_restore.h
13528         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13529         change the value's parameter type to T2.
13530         (make_scoped_restore): Likewise.
13531
13532 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13533             Richard Henderson  <rth@redhat.com>
13534
13535         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13536         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13537         GS_BASE for older kernels.
13538         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13539         GS_BASE for older kernels.
13540         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13541         and GS_BASE to the offset table.
13542         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13543         system register group.
13544         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13545         for older kernels.
13546         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13547         amd64 ABI.
13548         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13549         AMD64_GSBASE_REGNUM.
13550         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13551         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13552         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13553         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13554         i386/64bit-segments.xml in those rules.
13555         * features/i386/64bit-segments.xml: New file.
13556         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13557         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13558         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13559         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13560         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13561         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13562         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13563         * features/i386/amd64-avx-linux.c: Regenerated.
13564         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13565         * features/i386/amd64-avx-mpx.c: Regenerated.
13566         * features/i386/amd64-avx512-linux.c: Regenerated.
13567         * features/i386/amd64-linux.c: Regenerated.
13568         * features/i386/amd64-mpx-linux.c: Regenerated.
13569         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13570         * features/i386/i386-avx-mpx.c: Regenerated.
13571         * features/i386/x32-avx-linux.c: Regenerated.
13572         * features/i386/x32-avx512-linux.c: Regenerated.
13573         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13574         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13575         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13576         * regformats/i386/amd64-linux.dat: Regenerated.
13577         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13578         * regformats/i386/x32-avx-linux.dat: Regenerated.
13579         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13580         * regformats/i386/x32-linux.dat: Regenerated.
13581
13582 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13583
13584         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13585         Set to AMD64_NUM_REGS.
13586
13587 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13588
13589         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13590         that checks validity of a register number.
13591
13592 2017-01-27  Kees Cook  <keescook@google.com>
13593
13594         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13595         fetch_fpregs if target has fpa registers.
13596         (arm_linux_store_inferior_registers): Call store_fpregs if target
13597         has fpa registers.
13598
13599 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13600
13601         * cris-tdep.c (cris_gdbarch_init): Remove check for
13602         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13603
13604 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13605
13606         * corelow.c (get_core_register_section): Check for regset
13607         existence before checking for REGSET_VARIABLE_SIZE.
13608
13609 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13610             Pedro Alves  <palves@redhat.com>
13611
13612         PR gdb/20939
13613         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13614         call memory_error, save memaddr instead.
13615         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13616         negative, cal memory_error.
13617         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13618
13619 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13620
13621         * disasm-selftests.c (memory_error_test): New function.
13622         (_initialize_disasm_selftests): Register memory_error_test.
13623
13624 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13625
13626         * Makefile.in (SFILES): Add disasm-selftests.c and
13627         selftest-arch.c.
13628         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13629         * disasm-selftests.c: New file.
13630         * selftest-arch.c: New file.
13631         * selftest-arch.h: New file.
13632
13633 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13634
13635         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13636         to bfd_arch_mep.  Don't return 0 if section is not
13637         found.  Call print_insn_mep.
13638
13639 2017-01-26  Pedro Alves  <palves@redhat.com>
13640             Yao Qi  <yao.qi@linaro.org>
13641
13642         * arm-tdep.c: Include "disasm.h".
13643         (gdb_print_insn_arm): Update code to get gdbarch.
13644         * disasm.c (dis_asm_read_memory): Change it to
13645         gdb_disassembler::dis_asm_read_memory.
13646         (dis_asm_memory_error): Likewise.
13647         (dis_asm_print_address): Likewise.
13648         (gdb_pretty_print_insn): Change it to
13649         gdb_disassembler::pretty_print_insn.
13650         (dump_insns): Add one argument gdb_disassemlber.  All
13651         callers updated.
13652         (do_mixed_source_and_assembly_deprecated): Likewise.
13653         (do_mixed_source_and_assembly): Likewise.
13654         (do_assembly_only): Likewise.
13655         (gdb_disassembler::gdb_disassembler): New.
13656         (gdb_disassembler::print_insn): New.
13657         * disasm.h (class gdb_disassembler): New.
13658         (gdb_pretty_print_insn): Remove declaration.
13659         (gdb_disassemble_info): Likewise.
13660         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13661         (gdbscm_disasm_read_memory_worker): Update.
13662         (gdbscm_disasm_read_memory): Update.
13663         (gdbscm_disasm_memory_error): Remove.
13664         (gdbscm_disasm_print_address): Remove.
13665         (gdbscm_disassembler::gdbscm_disassembler): New.
13666         (gdbscm_print_insn_from_port): Update.
13667         * mips-tdep.c: Include disasm.h.
13668         (gdb_print_insn_mips): Update code to get gdbarch.
13669         * record-btrace.c (btrace_insn_history): Update.
13670         * spu-tdep.c: Include disasm.h.
13671         (struct spu_dis_asm_data): Remove.
13672         (struct spu_dis_asm_info): New.
13673         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13674         SPU id.
13675         (gdb_print_insn_spu): Cast disassemble_info to
13676         spu_dis_asm_info.
13677
13678 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13679
13680         * disasm.c (do_ui_file_delete): Delete.
13681         (gdb_insn_length): Move code creating stream to ...
13682         * utils.c (null_stream): ... here.  New function.
13683         * utils.h (null_stream): Declare.
13684
13685 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13686
13687         * python/py-inferior.c (find_thread_object): Return directly
13688         from the loop.  Remove "found" variable.
13689
13690 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13691
13692         GDB 7.12.1 released.
13693
13694 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13695
13696         * python/py-function.c (fnpy_call): Reorder declarations to have
13697         the gdbpy_enter object declared first.
13698         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13699
13700 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13701
13702         PR python/21068
13703         * python/python-internal.h (PyMem_RawMalloc): Define for
13704         Python < 3.4.
13705         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13706         PyMem_RawMalloc instead of PyMem_Malloc.
13707
13708 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13709             Luis Machado  <lgustavo@codesourcery.com>
13710
13711         * NEWS (New commands): Mention flash-erase.
13712         (New MI commands): Mention target-flash-erase.
13713         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13714         command.
13715         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13716         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13717         * target.c (flash_erase_command): New function.
13718         (initialize_targets): Add new flash-erase command.
13719         * target.h (flash_erase_command): New declaration.
13720
13721 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13722
13723         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13724         HAVE_SYS_PROCFS_H is defined.
13725
13726 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13727
13728         * remote.c (struct cached_reg): Change data into a pointer.
13729         * (stop_reply_dtr): Free data pointers before deleting vector.
13730         (process_stop_reply): Likewise.
13731         (remote_parse_stop_reply): Allocate space for data
13732
13733 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13734
13735         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13736         MAX_REGISTER_SIZE.
13737         (amd64_pseudo_register_read_value): Likewise.
13738         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13739         (store_register_using_P): Likewise.
13740         * regcache.c (regcache_xfer_part): Likewise.
13741
13742 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13743
13744         Split real and pseudo registers.
13745         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13746         (sparc32_pseudo_regnum): New enum.
13747         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13748         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13749         (SPARC32_CP0_REGISTERS): New macro.
13750         (sparc32_pseudo_register_name): New function.
13751         (sparc32_register_name): Use sparc32_pseudo_register_name.
13752         (sparc32_pseudo_register_type): New function.
13753         (sparc32_register_type): Use sparc32_pseudo_register_type.
13754         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13755         pseudo register numbers.
13756         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13757         (SPARC64_CP0_REGISTERS): New macro.
13758         (sparc64_pseudo_register_name): New function.
13759         (sparc64_register_name): Use sparc64_pseudo_register_name.
13760         (sparc64_pseudo_register_type): New function.
13761         (sparc64_register_type): Use sparc64_pseudo_register_type.
13762         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13763         pseudo register numbers.
13764         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13765         sparc64_store_arguments): Handle pseudo register numbers.
13766
13767 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13768
13769         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13770         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13771         output.
13772         (getpkt_or_notif_sane_1): Likewise.
13773
13774 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13775
13776         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13777         of CC.  Pass "-x c++-header" instead of "-x c".
13778
13779 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13780
13781         * remote.c (remote_can_async_p): Update comment.
13782
13783 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13784
13785         * linux-nat.c (linux_nat_can_async_p): Update comment.
13786
13787 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13788
13789         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13790
13791 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13792
13793         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13794
13795 2017-01-10  Tom Tromey  <tom@tromey.com>
13796
13797         * python/py-type.c (typy_legacy_template_argument): Update.
13798         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13799         ~demangle_parse_info): Declare new members.
13800         (cp_demangled_name_to_comp): Return unique_ptr.
13801         (cp_demangled_name_parse_free)
13802         (make_cleanup_cp_demangled_name_parse_free)
13803         (cp_new_demangle_parse_info): Remove.
13804         * cp-support.c (do_demangled_name_parse_free_cleanup)
13805         (make_cleanup_cp_demangled_name_parse_free): Remove.
13806         (inspect_type, cp_canonicalize_string_full)
13807         (cp_canonicalize_string): Update.
13808         (mangled_name_to_comp): Change return type.
13809         (cp_class_name_from_physname, method_name_from_physname)
13810         (cp_func_name, cp_remove_params): Update.
13811         * cp-name-parser.y (demangle_parse_info): New constructor, from
13812         cp_new_demangle_parse_info.
13813         (~demangle_parse_info): New destructor, from
13814         cp_demangled_name_parse_free.
13815         (cp_merge_demangle_parse_infos): Update.
13816         (cp_demangled_name_to_comp): Change return type.
13817
13818 2017-01-10  Tom Tromey  <tom@tromey.com>
13819
13820         * top.c (prevent_dont_repeat): Change return type.
13821         * python/python.c (execute_gdb_command): Use std::string.
13822         Update.
13823         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13824         * command.h (prevent_dont_repeat): Change return type.
13825         * breakpoint.c (bpstat_do_actions_1): Update.
13826
13827 2017-01-10  Tom Tromey  <tom@tromey.com>
13828
13829         * value.h (scoped_value_mark::~scoped_value_mark): Call
13830         free_to_mark.
13831         (scoped_value_mark::free_to_mark): New method.
13832         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13833         scoped_value_mark.
13834
13835 2017-01-10  Tom Tromey  <tom@tromey.com>
13836
13837         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13838         (valpy_reference_value, valpy_const_value, valpy_get_address)
13839         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13840         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13841         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13842         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13843         scoped_value_mark.
13844         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13845         * value.h (scoped_value_mark): New class.
13846
13847 2017-01-10  Tom Tromey  <tom@tromey.com>
13848
13849         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13850         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13851         * psymtab.c (discard_psymtabs_upto): Remove.
13852         (make_cleanup_discard_psymtabs): Remove.
13853         (struct psymtab_state): Remove.
13854
13855 2017-01-10  Tom Tromey  <tom@tromey.com>
13856
13857         * record-full.c (record_full_save_cleanups): Remove.
13858         (record_full_save): Use gdb::unlinker.
13859         * gcore.c (do_bfd_delete_cleanup): Remove.
13860         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13861         cleanups.
13862         * dwarf2read.c (unlink_if_set): Remove.
13863         (write_psymtabs_to_index): Use gdb::unlinker.
13864         * common/gdb_unlinker.h: New file.
13865
13866 2017-01-10  Tom Tromey  <tom@tromey.com>
13867
13868         * windows-tdep.c (windows_xfer_shared_library): Update.
13869         * windows-nat.c (windows_make_so): Update.
13870         * utils.h (make_cleanup_bfd_unref): Remove.
13871         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13872         * symfile.h (symfile_bfd_open)
13873         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13874         * symfile.c (read_symbols, symbol_file_add)
13875         (separate_debug_file_exists): Update.
13876         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13877         (generic_load, reread_symbols): Update.
13878         * symfile-mem.c (symbol_file_add_from_memory): Update.
13879         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13880         (spu_symbol_file_add_from_memory): Update.
13881         * solist.h (struct target_so_ops) <bfd_open>: Return
13882         gdb_bfd_ref_ptr.
13883         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13884         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13885         gdb_bfd_ref_ptr.
13886         (solib_map_sections, reload_shared_libraries_1): Update.
13887         * solib-svr4.c (enable_break): Update.
13888         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13889         * solib-frv.c (enable_break2): Update.
13890         * solib-dsbt.c (enable_break): Update.
13891         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13892         gdb_bfd_ref_ptr.
13893         (darwin_solib_get_all_image_info_addr_at_init): Update.
13894         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13895         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13896         * record-full.c (record_full_save): Update.
13897         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13898         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13899         * minidebug.c (find_separate_debug_file_in_section): Return
13900         gdb_bfd_ref_ptr.
13901         * machoread.c (macho_add_oso_symfile): Change abfd to
13902         gdb_bfd_ref_ptr.
13903         (macho_symfile_read_all_oso): Update.
13904         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13905         (macho_symfile_read): Update.
13906         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13907         (jit_bfd_try_read_symtab): Update.
13908         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13909         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13910         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13911         gdb_bfd_ref_ptr.
13912         (gdb_bfd_ref_policy): New struct.
13913         (gdb_bfd_ref_ptr): New typedef.
13914         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13915         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13916         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13917         gdb_bfd_ref_ptr.
13918         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13919         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13920         (gcore_command): Update.
13921         * exec.c (exec_file_attach): Update.
13922         * elfread.c (elf_symfile_read): Update.
13923         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13924         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13925         (open_and_init_dwo_file): Update.
13926         (open_dwp_file): Return gdb_bfd_ref_ptr.
13927         (open_and_init_dwp_file): Update.
13928         * corelow.c (core_open): Update.
13929         * compile/compile-object-load.c (compile_object_load): Update.
13930         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13931         * coffread.c (coff_symfile_read): Update.
13932         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13933         gdb_bfd_ref_ptr.  Rename.
13934         (dump_bfd_file, restore_command): Update.
13935         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13936         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13937         (find_separate_debug_file_by_buildid): Update.
13938
13939 2017-01-10  Tom Tromey  <tom@tromey.com>
13940
13941         * common/gdb_ref_ptr.h: New file.
13942         * python/py-ref.h (struct gdbpy_ref_policy): New.
13943         (gdbpy_ref): Now a typedef.
13944
13945 2017-01-10  Tom Tromey  <tom@tromey.com>
13946
13947         * utils.h (make_cleanup_htab_delete): Don't declare.
13948         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13949         Remove.
13950         * linespec.c (decode_compound_collector): Add constructor,
13951         destructor.
13952         (lookup_prefix_sym): Remove cleanup.
13953         (symtab_collector): Add constructor, destructor.
13954         (collect_symtabs_from_filename): Remove cleanup.
13955         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13956         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13957         Use htab_up.
13958         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13959         * dwarf2read.c (dw2_expand_symtabs_matching)
13960         (dw2_map_symbol_filenames, dwarf_decode_macros)
13961         (write_psymtabs_to_index): Use htab_up.
13962         * dwarf2loc.c (func_verify_no_selftailcall)
13963         (call_site_find_chain_1, func_verify_no_selftailcall)
13964         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13965         std::vector, gdb::unique_xmalloc_ptr.
13966         (call_sitep): Remove typedef.
13967         (dwarf2_locexpr_baton_eval): Remove unused variable.
13968
13969 2017-01-10  Tom Tromey  <tom@tromey.com>
13970
13971         * python/python-internal.h (make_cleanup_py_decref)
13972         (make_cleanup_py_xdecref): Don't declare.
13973         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13974         (py_xdecref, make_cleanup_py_xdecref): Remove.
13975
13976 2017-01-10  Tom Tromey  <tom@tromey.com>
13977
13978         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13979         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13980
13981 2017-01-10  Tom Tromey  <tom@tromey.com>
13982
13983         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13984
13985 2017-01-10  Tom Tromey  <tom@tromey.com>
13986
13987         * python/py-utils.c (unicode_to_encoded_string)
13988         (python_string_to_target_string)
13989         (python_string_to_target_python_string)
13990         (python_string_to_host_string, gdbpy_obj_to_string)
13991         (get_addr_from_python): Use gdbpy_ref.
13992
13993 2017-01-10  Tom Tromey  <tom@tromey.com>
13994
13995         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13996         gdbpy_ref.
13997
13998 2017-01-10  Tom Tromey  <tom@tromey.com>
13999
14000         * python/python.c (eval_python_command, gdbpy_decode_line)
14001         (gdbpy_run_events, gdbpy_start_type_printers)
14002         (gdbpy_apply_type_printers): Use gdbpy_ref.
14003
14004 2017-01-10  Tom Tromey  <tom@tromey.com>
14005
14006         * python/py-param.c (get_doc_string, compute_enum_values): Use
14007         gdbpy_ref.
14008
14009 2017-01-10  Tom Tromey  <tom@tromey.com>
14010
14011         * python/py-inferior.c (find_thread_object, build_inferior_list):
14012         Use gdbpy_ref.
14013
14014 2017-01-10  Tom Tromey  <tom@tromey.com>
14015
14016         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14017
14018 2017-01-10  Tom Tromey  <tom@tromey.com>
14019
14020         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14021         gdbpy_ref.
14022
14023 2017-01-10  Tom Tromey  <tom@tromey.com>
14024
14025         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14026         extra incref.
14027         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14028         Use gdbpy_ref.
14029
14030 2017-01-10  Tom Tromey  <tom@tromey.com>
14031
14032         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14033         gdbpy_ref.
14034
14035 2017-01-10  Tom Tromey  <tom@tromey.com>
14036
14037         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14038         decref results of PyArg_ParseTupleAndKeywords.
14039
14040 2017-01-10  Tom Tromey  <tom@tromey.com>
14041
14042         * python/python.c (python_run_simple_file): Use
14043         unique_xmalloc_ptr, gdbpy_ref.
14044
14045 2017-01-10  Tom Tromey  <tom@tromey.com>
14046
14047         * python/py-prettyprint.c (print_stack_unless_memory_error)
14048         (print_string_repr, print_children): Use gdbpy_ref.
14049         (dummy_python_frame): New class.
14050         (dummy_python_frame::dummy_python_frame): Rename from
14051         push_dummy_python_frame.
14052         (py_restore_tstate): Remove.
14053
14054 2017-01-10  Tom Tromey  <tom@tromey.com>
14055
14056         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14057
14058 2017-01-10  Tom Tromey  <tom@tromey.com>
14059
14060         * python/python.c (ensure_python_env, restore_python_env):
14061         Remove.
14062         * python/python-internal.h (ensure_python_env): Don't declare.
14063         * varobj.h (varobj_ensure_python_env): Don't declare.
14064         * varobj.c (varobj_ensure_python_env): Remove.
14065
14066 2017-01-10  Tom Tromey  <tom@tromey.com>
14067
14068         * varobj.c (varobj_value_get_print_value): Use
14069         gdbpy_enter_varobj.
14070
14071 2017-01-10  Tom Tromey  <tom@tromey.com>
14072
14073         * python/py-prettyprint.c (print_string_repr, print_children):
14074         Update.
14075         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14076         of "encoding".
14077         * varobj.c (varobj_value_get_print_value): Update.
14078         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14079
14080 2017-01-10  Tom Tromey  <tom@tromey.com>
14081
14082         * varobj.c (varobj_get_display_hint)
14083         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14084         (varobj_set_visualizer, free_variable): Use
14085         gdbpy_enter_varobj.
14086
14087 2017-01-10  Tom Tromey  <tom@tromey.com>
14088
14089         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14090         (do_finish_initialization): New function.  Use gdbpy_ref.
14091         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14092         do_finish_initialization.
14093
14094 2017-01-10  Tom Tromey  <tom@tromey.com>
14095
14096         * python/py-param.c (get_set_value, get_show_value): Use
14097         gdbpy_enter, gdbpy_ref.
14098
14099 2017-01-10  Tom Tromey  <tom@tromey.com>
14100
14101         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14102
14103 2017-01-10  Tom Tromey  <tom@tromey.com>
14104
14105         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14106
14107 2017-01-10  Tom Tromey  <tom@tromey.com>
14108
14109         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14110         Use gdbpy_enter_varobj.
14111
14112 2017-01-10  Tom Tromey  <tom@tromey.com>
14113
14114         * varobj.c (gdbpy_enter_varobj): New constructor.
14115         * python/python-internal.h (gdbpy_enter_varobj): New class.
14116         * python/py-varobj.c (py_varobj_get_iterator): Use
14117         gdbpy_enter_varobj.
14118
14119 2017-01-10  Tom Tromey  <tom@tromey.com>
14120
14121         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14122         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14123         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14124         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14125         unique_xmalloc_ptr.
14126         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14127
14128 2017-01-10  Tom Tromey  <tom@tromey.com>
14129
14130         * python/py-xmethods.c (invoke_match_method): Use
14131         gdbpy_ref.
14132
14133 2017-01-10  Tom Tromey  <tom@tromey.com>
14134
14135         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14136         gdbpy_enter, gdbpy_ref.
14137
14138 2017-01-10  Tom Tromey  <tom@tromey.com>
14139
14140         * python/python.c (python_interactive_command): Use gdbpy_enter.
14141
14142 2017-01-10  Tom Tromey  <tom@tromey.com>
14143
14144         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14145         gdbpy_ref.
14146
14147 2017-01-10  Tom Tromey  <tom@tromey.com>
14148
14149         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14150         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14151
14152 2017-01-10  Tom Tromey  <tom@tromey.com>
14153
14154         * utils.h (htab_deleter): New struct.
14155         (htab_up): New typedef.
14156         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14157         gdbpy_enter, gdbpy_ref, htab_up.
14158
14159 2017-01-10  Tom Tromey  <tom@tromey.com>
14160
14161         * python/py-unwind.c (pending_frame_invalidate): Remove.
14162         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14163
14164 2017-01-10  Tom Tromey  <tom@tromey.com>
14165
14166         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14167         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14168
14169 2017-01-10  Tom Tromey  <tom@tromey.com>
14170
14171         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14172
14173 2017-01-10  Tom Tromey  <tom@tromey.com>
14174
14175         * python/python.c (gdbpy_eval_from_control_command)
14176         (gdbpy_source_script, gdbpy_run_events)
14177         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14178         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14179         gdbpy_enter.
14180
14181 2017-01-10  Tom Tromey  <tom@tromey.com>
14182
14183         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14184
14185 2017-01-10  Tom Tromey  <tom@tromey.com>
14186
14187         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14188
14189 2017-01-10  Tom Tromey  <tom@tromey.com>
14190
14191         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14192         (python_on_inferior_call_pre, python_on_inferior_call_post)
14193         (python_on_memory_change, python_on_register_change)
14194         (python_inferior_exit, python_new_objfile, add_thread_object)
14195         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14196
14197 2017-01-10  Tom Tromey  <tom@tromey.com>
14198
14199         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14200         (bpfinishpy_handle_exit): Use gdbpy_enter.
14201
14202 2017-01-10  Tom Tromey  <tom@tromey.com>
14203
14204         * python/py-cmd.c (cmdpy_destroyer)
14205         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14206         gdbpy_enter.
14207
14208 2017-01-10  Tom Tromey  <tom@tromey.com>
14209
14210         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14211         gdbpy_enter.
14212         (gdbpy_breakpoint_has_cond): Likewise.
14213
14214 2017-01-10  Tom Tromey  <tom@tromey.com>
14215
14216         * python/python.c (gdbpy_enter): New constructor.
14217         (~gdbpy_enter): New destructor.
14218         (restore_python_env, ensure_python_env): Rewrite.
14219         * python/python-internal.h (gdbpy_enter): New class.
14220
14221 2017-01-10  Tom Tromey  <tom@tromey.com>
14222
14223         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14224
14225 2017-01-10  Tom Tromey  <tom@tromey.com>
14226
14227         * python/py-value.c (value_has_field, get_field_flag)
14228         (get_field_type, valpy_getitem, convert_value_from_python): Use
14229         gdbpy_ref.
14230
14231 2017-01-10  Tom Tromey  <tom@tromey.com>
14232
14233         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14234         gdbpy_ref.
14235
14236 2017-01-10  Tom Tromey  <tom@tromey.com>
14237
14238         * python/py-prettyprint.c (search_pp_list)
14239         (find_pretty_printer_from_objfiles)
14240         (find_pretty_printer_from_progspace)
14241         (find_pretty_printer_from_gdb, find_pretty_printer)
14242         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14243         gdbpy_ref.
14244
14245 2017-01-10  Tom Tromey  <tom@tromey.com>
14246
14247         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14248
14249 2017-01-10  Tom Tromey  <tom@tromey.com>
14250
14251         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14252         (ltpy_get_all_source_lines): Use gdbpy_ref.
14253
14254 2017-01-10  Tom Tromey  <tom@tromey.com>
14255
14256         * python/py-framefilter.c (extract_sym, extract_value)
14257         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14258         gdbpy_ref.
14259
14260 2017-01-10  Tom Tromey  <tom@tromey.com>
14261
14262         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14263
14264 2017-01-10  Tom Tromey  <tom@tromey.com>
14265
14266         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14267
14268 2017-01-10  Tom Tromey  <tom@tromey.com>
14269
14270         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14271         gdbpy_ref.
14272
14273 2017-01-10  Tom Tromey  <tom@tromey.com>
14274
14275         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14276
14277 2017-01-10  Tom Tromey  <tom@tromey.com>
14278
14279         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14280         (typy_range): Use gdbpy_ref.
14281
14282 2017-01-10  Tom Tromey  <tom@tromey.com>
14283
14284         * python/py-threadevent.c (create_thread_event_object): Use
14285         gdbpy_ref.
14286         * python/py-stopevent.c (create_stop_event_object): Simplify.
14287         (emit_stop_event): Use gdbpy_ref.
14288         * python/py-signalevent.c (create_signal_event_object): Use
14289         gdbpy_ref.
14290         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14291         (emit_new_objfile_event, create_clear_objfiles_event_object)
14292         (emit_clear_objfiles_event): Use gdbpy_ref.
14293         * python/py-infevents.c (create_inferior_call_event_object)
14294         (create_register_changed_event_object)
14295         (create_memory_changed_event_object, emit_inferior_call_event)
14296         (emit_memory_changed_event, emit_register_changed_event): Use
14297         gdbpy_ref.
14298         * python/py-exitedevent.c (create_exited_event_object)
14299         (emit_exited_event): Use gdbpy_ref.
14300         * python/py-event.h (evpy_emit_event): Remove
14301         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14302         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14303         * python/py-continueevent.c (emit_continue_event): Use
14304         gdbpy_ref.
14305         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14306         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14307         gdbpy_ref.
14308         * python/py-bpevent.c (create_breakpoint_event_object): Use
14309         gdbpy_ref.
14310
14311 2017-01-10  Tom Tromey  <tom@tromey.com>
14312
14313         * python/py-ref.h: New file.
14314
14315 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14316
14317         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14318         void.
14319         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14320         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14321         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14322         * ui-out.c (ui_out::redirect): Likewise.
14323         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14324         * cli/cli-logging.c (set_logging_redirect): Update call site of
14325         ui_out::redirect.
14326         (handle_redirections): Likewise.
14327         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14328         * top.c (execute_command_to_string): Likewise.
14329         * utils.c (do_ui_out_redirect_pop): Likewise.
14330
14331 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14332
14333         * stack.c (_initialize_stack): Update "frame" command help message.
14334
14335 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14336
14337         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14338
14339 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14340
14341         * x86-linux-nat.h: Include gdb_proc_service.h.
14342
14343 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14344
14345         * ser-base.h: Include serial.h.
14346
14347 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14348
14349         * ppc-linux-tdep.h: Include ppc-tdep.h.
14350
14351 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14352
14353         * nat/amd64-linux-siginfo.h: Include signal.h.
14354
14355 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14356
14357         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14358
14359 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14360
14361         * mi/mi-parse.h: Include mi-cmds.h.
14362
14363 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14364
14365         * inf-loop.c: Don't include "target.h".
14366         * inf-loop.h: Include it here.
14367
14368 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14369
14370         * dfp.h: Include "dboulest.h" and "expression.h".
14371
14372 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14373
14374         * ax-gdb.h: Include "ax.h".
14375
14376 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14377
14378         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14379         with nat/gdb_ptrace.h.
14380
14381 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14382
14383         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14384         new line.
14385         (mips64_fbsd_sigframe_init): Likewise.
14386
14387 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14388
14389         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14390         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14391
14392 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14393
14394         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14395         * NEWS: Mention new FreeBSD/mips native configuration.
14396         * config/mips/fbsd.mh: New file.
14397         * configure.host: Add mips*-*-freebsd*.
14398         * mips-fbsd-nat.c: New file.
14399
14400 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14401
14402         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14403         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14404         * NEWS: Mention new FreeBSD/mips target.
14405         * configure.tgt: Add mips*-*-freebsd*.
14406         * mips-fbsd-tdep.c: New file.
14407         * mips-fbsd-tdep.h: New file.
14408
14409 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14410
14411         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14412         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14413
14414 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14415
14416         Update copyright year range in all GDB files.
14417
14418 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14419
14420         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14421
14422 For older changes see ChangeLog-2016.
14423 \f
14424 Local Variables:
14425 mode: change-log
14426 left-margin: 8
14427 fill-column: 74
14428 version-control: never
14429 coding: utf-8
14430 End: