xtensa-xtregs: Constify field
[external/binutils.git] / gdb / ChangeLog
1 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4
5 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
6
7         PR python/21213
8         * python/py-infthread.c (thpy_get_inferior): Increment reference
9         of inferior before returning it.
10
11 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * unittests/common-utils-selftests.c (format): Add
14         ATTRIBUTE_PRINTF.
15
16 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
17
18         * xml-syscall.c (struct syscall_desc): Add constructor.
19         <name>: Change type to std::string.
20         (syscall_desc_up): New typedef.
21         (syscall_desc_p): Remove typeder.
22         (DEF_VEC_P(syscall_desc_p)): Remove.
23         (struct syscall_group_desc): Add constructor.
24         <name>: Change type to std::string.
25         <syscalls>: Change type to std::vector.
26         (syscall_group_desc_up): New typedef.
27         (syscall_group_desc_p): Remove typedef.
28         (DEF_VEC_P(syscall_group_desc_p)): Remove.
29         (struct syscalls_info) <syscalls>: Change type to std::vector of
30         unique_ptr.
31         <groups>: Likewise.
32         <my_gdb_datadir>: Change type to std::string.
33         (syscalls_info_up): New typedef.
34         (allocate_syscalls_info): Remove.
35         (syscalls_info_free_syscalls_desc): Remove.
36         (syscalls_info_free_syscall_group_desc): Remove.
37         (free_syscalls_info): Remove.
38         (make_cleanup_free_syscalls_info): Remove.
39         (syscall_group_create_syscall_group_desc): Adjust.
40         (syscall_group_add_syscall): Adjust.
41         (syscall_create_syscall_desc): Adjust.
42         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
43         (init_syscalls_info): Adjust.
44         (syscall_group_get_group_by_name): Adjust.
45         (xml_get_syscall_number): Adjust.
46         (xml_get_syscall_name): Adjust.
47         (xml_list_of_syscalls): Adjust.
48         (xml_list_syscalls_by_group): Adjust.
49         (xml_list_of_groups): Adjust.
50
51 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
52
53         * probe.h: Don't include gdb_vecs.h.
54         (DEF_VEC_P (probe_p)): Remove.
55         (find_probes_in_objfile): Return an std::vector.
56         * probe.c (find_probes_in_objfile): Likewise.
57         * breakpoint.c (breakpoint_objfile_data)
58         <longjmp_probes>: Change type to std::vector.
59         <exception_probes>: Likewise.
60         (free_breakpoint_probes): Don't manually free vectors.
61         (create_longjmp_master_breakpoint): Adjust.
62         (create_exception_master_breakpoint): Adjust.
63         * solib-svr4.c (svr4_create_probe_breakpoints): Change
64         parameter type, adjust.
65         (svr4_create_solib_event_breakpoints): Adjust.
66
67 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
68
69         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
70         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
71         with new.
72         (free_breakpoint_probes): Rename to ...
73         (free_breakpoint_objfile_data): ... this, and call delete on
74         bp_objfile_data..
75
76 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
77
78         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
79         (loaded_script_ptr): Remove typedef.
80         (DEF_VEC_P (loaded_script_ptr)): Remove.
81         (struct collect_matching_scripts_data): Add constructor.
82         <scripts_p>: Change type to (pointer to) std::vector.
83         (collect_matching_scripts_data): Adjust.
84         (sort_scripts_by_name): Make suitable for std::sort.
85         (print_scripts): Don't sort vector, adjust to std::vector.
86         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
87
88 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
89
90         * symfile.c (filename_language): Make struct, not typedef.  Add
91         constructor.
92         <ext>: Change type to std::string.
93         (DEF_VEC_O (filename_language)): Remove.
94         (filename_language_table): Change type to std::vector.
95         (add_filename_language): Adjust.
96         (set_ext_lang_command): Adjust.
97         (info_ext_lang_command): Adjust.
98         (deduce_language_from_filename): Adjust.
99         (class scoped_restore_filename_language_table): Remove.
100         (test_filename_language): Use scoped_restore.
101         (test_set_ext_lang_command): Use scoped_restore, adjust to
102         std::vector change.
103
104 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
105
106         * symfile.c: Include selftest.h.
107         (class scoped_restore_filename_language_table): New.
108         (test_filename_language): New test.
109         (test_set_ext_lang_command): New test.
110         (_initialize_symfile): Register tests.
111
112 2017-10-27  Keith Seitz  <keiths@redhat.com>
113
114         * breakpoint.c (print_breakpoint_location): Use the symbol saved
115         in the bp_location, falling back to find_pc_sect_function when
116         needed.
117         (add_location_to_breakpoint): Save sal->symbol.
118         * breakpoint.h (struct bp_location) <symbol>: New field.
119         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
120         * symtab.h (struct symtab_and_line) <symbol>: New field.
121
122 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
123
124         PR gdb/13669
125         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
126         to rewind obstack.
127
128 2017-10-26  Pedro Alves  <palves@redhat.com>
129
130         * remote.c (remote_async_terminal_ours_p): Delete.
131         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
132         Remove references to 'remote_async_terminal_ours_p'.
133
134 2017-10-26  Yao Qi  <yao.qi@linaro.org>
135
136         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
137
138 2017-10-26  Yao Qi  <yao.qi@linaro.org>
139
140         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
141         aspace const.
142         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
143         Likewise.
144         * breakpoint.c (bpstat_check_location): Remove cast.
145         (breakpoint_hit_catch_fork): Make aspce const.
146         (breakpoint_hit_catch_solib): Likewise.
147         (breakpoint_hit_catch_exec): Likewise.
148         (breakpoint_hit_ranged_breakpoint): Likewise.
149         (breakpoint_hit_watchpoint): Likewise.
150         (base_breakpoint_breakpoint_hit): Likewise.
151         (bkpt_breakpoint_hit): Likewise.
152         (dprintf_breakpoint_hit): Likewise.
153         (tracepoint_breakpoint_hit): Likewise.
154         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
155
156 2017-10-26  Yao Qi  <yao.qi@linaro.org>
157
158         * breakpoint.c (breakpoint_location_address_match): Change
159         "struct address_space *" to "const address_space".
160         (breakpoint_location_address_range_overlap): Likewise.
161         (breakpoint_here_p): Likewise.
162         (breakpoint_in_range_p): Likewise.
163         (moribund_breakpoint_here_p): Likewise.
164         (bp_location_inserted_here_p): Likewise.
165         (software_breakpoint_inserted_here_p): Likewise.
166         (hardware_breakpoint_inserted_here_p): Likewise.
167         (hardware_watchpoint_inserted_in_range): Likewise.
168         (bpstat_check_location): Likewise.
169         (bpstat_stop_status): Likewise.
170         (breakpoint_address_match): Likewise.
171         (breakpoint_address_match_range): Likewise.
172         (breakpoint_location_address_match): Likewise.
173         (breakpoint_location_address_range_overlap): Likewise.
174         (insert_single_step_breakpoint): Likewise.
175         (breakpoint_has_location_inserted_here): Likewise.
176         (single_step_breakpoint_inserted_here_p): Likewise.
177         (pc_at_non_inline_function): Likewise.
178         * breakpoint.h (bpstat_stop_status): Update declaration.
179         (breakpoint_here_p): Likewise.
180         (breakpoint_in_range_p): Likewise.
181         (moribund_breakpoint_here_p): Likewise.
182         (breakpoint_inserted_here_p): Likewise.
183         (software_breakpoint_inserted_here_p): Likewise.
184         (hardware_breakpoint_inserted_here_p): Likewise.
185         (breakpoint_has_location_inserted_here): Likewise.
186         (single_step_breakpoint_inserted_here_p): Likewise.
187         (hardware_watchpoint_inserted_in_range): Likewise.
188         (breakpoint_address_match): Likewise.
189         (insert_single_step_breakpoint): Likewise.
190         (pc_at_non_inline_function): Likewise.
191         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
192         * record.c (record_check_stopped_by_breakpoint): Likewise.
193         * record.h (record_check_stopped_by_breakpoint): Likewise.
194         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
195
196 2017-10-25  Yao Qi  <yao.qi@linaro.org>
197
198         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
199         regcache->arch () instead get_regcache_arch.
200         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
201         Likewise.
202         (aarch64_fbsd_store_inferior_registers): Likewise.
203         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
204         (store_gregs_to_thread): Likewise.
205         (fetch_fpregs_from_thread): Likewise.
206         (store_fpregs_to_thread): Likewise.
207         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
208         (aarch64_store_return_value): Likewise.
209         (aarch64_software_single_step): Likewise.
210         * aix-thread.c (aix_thread_wait): Likewise.
211         (supply_reg32): Likewise.
212         (supply_sprs64): Likewise.
213         (supply_sprs32): Likewise.
214         (fill_gprs64): Likewise.
215         (fill_gprs32): Likewise.
216         (fill_sprs64): Likewise.
217         (fill_sprs32): Likewise.
218         (store_regs_user_thread): Likewise.
219         (store_regs_kernel_thread): Likewise.
220         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
221         (alphabsd_store_inferior_registers): Likewise.
222         * alpha-tdep.c (alpha_extract_return_value): Likewise.
223         (alpha_store_return_value): Likewise.
224         (alpha_deal_with_atomic_sequence): Likewise.
225         (alpha_next_pc): Likewise.
226         (alpha_software_single_step): Likewise.
227         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
228         (amd64bsd_store_inferior_registers): Likewise.
229         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
230         Likewise.
231         (amd64_linux_store_inferior_registers): Likewise.
232         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
233         (amd64_collect_native_gregset): Likewise.
234         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
235         (amd64obsd_collect_uthread): Likewise.
236         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
237         (amd64_collect_fpregset): Likewise.
238         (amd64_supply_fxsave): Likewise.
239         (amd64_supply_xsave): Likewise.
240         (amd64_collect_fxsave): Likewise.
241         (amd64_collect_xsave): Likewise.
242         * arc-tdep.c (arc_write_pc): Likewise.
243         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
244         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
245         (arm_fbsd_store_inferior_registers): Likewise.
246         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
247         (store_vfp_regs): Likewise.
248         (arm_linux_fetch_inferior_registers): Likewise.
249         (arm_linux_store_inferior_registers): Likewise.
250         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
251         (arm_linux_sigreturn_next_pc): Likewise.
252         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
253         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
254         (fetch_register): Likewise.
255         (store_register): Likewise.
256         * arm-tdep.c (arm_is_thumb): Likewise.
257         (displaced_in_arm_mode): Likewise.
258         (bx_write_pc): Likewise.
259         (arm_get_next_pcs_addr_bits_remove): Likewise.
260         (arm_software_single_step): Likewise.
261         (arm_extract_return_value): Likewise.
262         (arm_store_return_value): Likewise.
263         (arm_write_pc): Likewise.
264         * bfin-tdep.c (bfin_extract_return_value): Likewise.
265         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
266         (bsd_uthread_store_registers): Likewise.
267         * core-regset.c (fetch_core_registers): Likewise.
268         * corelow.c (get_core_registers): Likewise.
269         * cris-tdep.c (cris_store_return_value): Likewise.
270         (cris_extract_return_value): Likewise.
271         (find_step_target): Likewise.
272         (find_step_target): Likewise.
273         (cris_software_single_step): Likewise.
274         * ctf.c (ctf_fetch_registers): Likewise.
275         * darwin-nat.c (cancel_breakpoint): Likewise.
276         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
277         * frv-tdep.c (frv_extract_return_value): Likewise.
278         * ft32-tdep.c (ft32_store_return_value): Likewise.
279         (ft32_extract_return_value): Likewise.
280         * go32-nat.c (fetch_register): Likewise.
281         (go32_fetch_registers): Likewise.
282         (go32_store_registers): Likewise.
283         (store_register): Likewise.
284         * h8300-tdep.c (h8300_extract_return_value): Likewise.
285         (h8300_store_return_value): Likewise.
286         * hppa-linux-nat.c (fetch_register): Likewise.
287         (store_register): Likewise.
288         (hppa_linux_fetch_inferior_registers): Likewise.
289         (hppa_linux_store_inferior_registers): Likewise.
290         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
291         (i386_darwin_store_inferior_registers): Likewise.
292         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
293         (gnu_store_registers): Likewise.
294         * i386-linux-nat.c (fetch_register): Likewise.
295         (store_register): Likewise.
296         (supply_gregset): Likewise.
297         (fill_gregset): Likewise.
298         (i386_linux_fetch_inferior_registers): Likewise.
299         (i386_linux_store_inferior_registers): Likewise.
300         (i386_linux_resume): Likewise.
301         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
302         Likewise.
303         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
304         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
305         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
306         (i386obsd_collect_uthread): Likewise.
307         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
308         (i386_supply_gregset): Likewise.
309         (i386_collect_gregset): Likewise.
310         (i386_supply_fpregset): Likewise.
311         (i386_collect_fpregset): Likewise.
312         (i386_mpx_bd_base): Likewise.
313         * i386-v4-nat.c (supply_fpregset): Likewise.
314         (fill_fpregset): Likewise.
315         * i387-tdep.c (i387_supply_fsave): Likewise.
316         (i387_collect_fsave): Likewise.
317         (i387_supply_fxsave): Likewise.
318         (i387_collect_fxsave): Likewise.
319         (i387_supply_xsave): Likewise.
320         (i387_collect_xsave): Likewise.
321         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
322         (ia64_linux_store_registers): Likewise.
323         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
324         (ia64_extract_return_value): Likewise.
325         (ia64_store_return_value): Likewise.
326         (find_func_descr): Likewise.
327         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
328         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
329         (inf_ptrace_store_registers): Likewise.
330         * infrun.c (use_displaced_stepping): Likewise.
331         (displaced_step_prepare_throw): Likewise.
332         (resume): Likewise.
333         (proceed): Likewise.
334         (do_target_wait): Likewise.
335         (adjust_pc_after_break): Likewise.
336         (handle_inferior_event_1): Likewise.
337         (handle_signal_stop): Likewise.
338         (save_infcall_suspend_state): Likewise.
339         (restore_infcall_suspend_state): Likewise.
340         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
341         * jit.c (jit_frame_prev_register): Likewise.
342         * linux-nat.c (save_stop_reason): Likewise.
343         (linux_nat_wait_1): Likewise.
344         (resume_stopped_resumed_lwps): Likewise.
345         * linux-record.c (record_linux_sockaddr): Likewise.
346         (record_linux_msghdr): Likewise.
347         (record_linux_system_call): Likewise.
348         * linux-tdep.c (linux_collect_thread_registers): Likewise.
349         * lm32-tdep.c (lm32_extract_return_value): Likewise.
350         (lm32_store_return_value): Likewise.
351         * m32c-tdep.c (m32c_read_flg): Likewise.
352         (m32c_pseudo_register_read): Likewise.
353         (m32c_pseudo_register_write): Likewise.
354         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
355         (m32r_linux_collect_gregset): Likewise.
356         * m32r-tdep.c (m32r_store_return_value): Likewise.
357         (m32r_extract_return_value): Likewise.
358         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
359         (m68kbsd_collect_fpregset): Likewise.
360         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
361         * m68k-linux-nat.c (fetch_register): Likewise.
362         (old_fetch_inferior_registers): Likewise.
363         (old_store_inferior_registers): Likewise.
364         (store_regs): Likewise.
365         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
366         (m68k_svr4_store_return_value): Likewise.
367         * m88k-tdep.c (m88k_store_arguments): Likewise.
368         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
369         (mi_cmd_data_write_register_values): Likewise.
370         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
371         (mips_fbsd_store_inferior_registers): Likewise.
372         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
373         (mips_fbsd_supply_gregs): Likewise.
374         (mips_fbsd_collect_fpregs): Likewise.
375         (mips_fbsd_collect_gregs): Likewise.
376         (mips_fbsd_supply_fpregset): Likewise.
377         (mips_fbsd_collect_fpregset): Likewise.
378         (mips_fbsd_supply_gregset): Likewise.
379         (mips_fbsd_collect_gregset): Likewise.
380         * mips-linux-nat.c (supply_gregset): Likewise.
381         (fill_gregset): Likewise.
382         (supply_fpregset): Likewise.
383         (fill_fpregset): Likewise.
384         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
385         (mips_fill_gregset): Likewise.
386         (mips_supply_fpregset): Likewise.
387         (mips_fill_fpregset): Likewise.
388         (mips64_supply_gregset): Likewise.
389         (micromips_linux_sigframe_validate): Likewise.
390         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
391         (mipsnbsd_fetch_inferior_registers): Likewise.
392         (mipsnbsd_store_inferior_registers): Likewise.
393         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
394         (mipsnbsd_supply_gregset): Likewise.
395         (mipsnbsd_iterate_over_regset_sections): Likewise.
396         (mipsnbsd_supply_reg): Likewise.
397         (mipsnbsd_supply_fpreg): Likewise.
398         * mips-tdep.c (mips_in_frame_stub): Likewise.
399         (mips_dummy_id): Likewise.
400         (is_octeon_bbit_op): Likewise.
401         (micromips_bc1_pc): Likewise.
402         (extended_mips16_next_pc): Likewise.
403         (mips16_next_pc): Likewise.
404         (deal_with_atomic_sequence): Likewise.
405         * moxie-tdep.c (moxie_process_readu): Likewise.
406         * nios2-tdep.c (nios2_get_next_pc): Likewise.
407         * nto-procfs.c (procfs_store_registers): Likewise.
408         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
409         (ppcfbsd_store_inferior_registers): Likewise.
410         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
411         (fetch_altivec_register): Likewise.
412         (get_spe_registers): Likewise.
413         (fetch_spe_register): Likewise.
414         (fetch_altivec_registers): Likewise.
415         (fetch_all_gp_regs): Likewise.
416         (fetch_all_fp_regs): Likewise.
417         (store_vsx_register): Likewise.
418         (store_altivec_register): Likewise.
419         (set_spe_registers): Likewise.
420         (store_spe_register): Likewise.
421         (store_altivec_registers): Likewise.
422         (store_all_gp_regs): Likewise.
423         (store_all_fp_regs): Likewise.
424         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
425         (ppc_linux_collect_gregset): Likewise.
426         (ppc_canonicalize_syscall): Likewise.
427         (ppc_linux_record_signal): Likewise.
428         (ppu2spu_prev_register): Likewise.
429         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
430         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
431         (ppcobsd_store_registers): Likewise.
432         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
433         Likewise.
434         (ppc_ravenscar_generic_store_registers): Likewise.
435         * procfs.c (procfs_fetch_registers): Likewise.
436         (procfs_store_registers): Likewise.
437         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
438         (ravenscar_store_registers): Likewise.
439         (ravenscar_prepare_to_store): Likewise.
440         * record-btrace.c (record_btrace_fetch_registers): Likewise.
441         * record-full.c (record_full_wait_1): Likewise.
442         (record_full_registers_change): Likewise.
443         (record_full_store_registers): Likewise.
444         (record_full_core_fetch_registers): Likewise.
445         (record_full_save): Likewise.
446         (record_full_goto_insn): Likewise.
447         * regcache.c (regcache_register_size): Likewise.
448         (get_regcache_arch): Remove.
449         (regcache_read_pc): Likewise.
450         * regcache.h (get_regcache_arch): Remove.
451         * remote-sim.c (gdbsim_fetch_register): Likewise.
452         (gdbsim_store_register): Likewise.
453         * remote.c (fetch_register_using_p): Likewise.
454         (send_g_packet): Likewise.
455         (remote_prepare_to_store): Likewise.
456         (store_registers_using_G): Likewise.
457         * reverse.c (save_bookmark_command): Likewise.
458         (goto_bookmark_command): Likewise.
459         * rs6000-aix-tdep.c (branch_dest): Likewise.
460         * rs6000-nat.c (rs6000_ptrace64): Likewise.
461         (fetch_register): Likewise.
462         * rs6000-tdep.c (ppc_supply_reg): Likewise.
463         (ppc_collect_reg): Likewise.
464         (ppc_collect_gregset): Likewise.
465         (ppc_collect_fpregset): Likewise.
466         (ppc_collect_vsxregset): Likewise.
467         (ppc_collect_vrregset): Likewise.
468         (ppc_displaced_step_hw_singlestep): Likewise.
469         (rs6000_pseudo_register_read): Likewise.
470         (rs6000_pseudo_register_write): Likewise.
471         * s390-linux-nat.c (supply_gregset): Likewise.
472         (fill_gregset): Likewise.
473         (s390_linux_fetch_inferior_registers): Likewise.
474         * s390-linux-tdep.c (s390_write_pc): Likewise.
475         (s390_software_single_step): Likewise.
476         (s390_all_but_pc_registers_record): Likewise.
477         (s390_linux_syscall_record): Likewise.
478         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
479         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
480         (shnbsd_store_inferior_registers): Likewise.
481         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
482         (sh_extract_return_value_fpu): Likewise.
483         (sh_store_return_value_nofpu): Likewise.
484         (sh_corefile_supply_regset): Likewise.
485         (sh_corefile_collect_regset): Likewise.
486         * sh64-tdep.c (sh64_extract_return_value): Likewise.
487         (sh64_store_return_value): Likewise.
488         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
489         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
490         (sparc_store_inferior_registers): Likewise.
491         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
492         (sparc_ravenscar_prepare_to_store): Likewise.
493         * sparc-tdep.c (sparc32_store_arguments): Likewise.
494         (sparc_analyze_control_transfer): Likewise.
495         (sparc_step_trap): Likewise.
496         (sparc_software_single_step): Likewise.
497         (sparc32_gdbarch_init): Likewise.
498         (sparc_supply_rwindow): Likewise.
499         (sparc_collect_rwindow): Likewise.
500         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
501         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
502         (sparc64nbsd_collect_gregset): Likewise.
503         (sparc64nbsd_supply_fpregset): Likewise.
504         (sparc64nbsd_collect_fpregset): Likewise.
505         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
506         (sparc64_supply_gregset): Likewise.
507         (sparc64_collect_gregset): Likewise.
508         (sparc64_supply_fpregset): Likewise.
509         (sparc64_collect_fpregset): Likewise.
510         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
511         * spu-tdep.c (spu_unwind_sp): Likewise.
512         (spu2ppu_prev_register): Likewise.
513         (spu_memory_remove_breakpoint): Likewise.
514         * stack.c (return_command): Likewise.
515         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
516         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
517         * tracefile.c (trace_save_ctf): Likewise.
518         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
519         (do_windows_store_inferior_registers): Likewise.
520         (windows_resume): Likewise.
521         * xtensa-linux-nat.c (fill_gregset): Likewise.
522         (supply_gregset_reg): Likewise.
523         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
524         (xtensa_register_read_masked): Likewise.
525         (xtensa_supply_gregset): Likewise.
526         (xtensa_extract_return_value): Likewise.
527         (xtensa_store_return_value): Likewise.
528
529 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
530
531         * doublest.c (floatformat_from_string): New function.
532         * doublest.h (floatformat_from_string): Add prototype.
533
534         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
535         (OP_FLOAT): ... this.
536         * expression.h: Do not include "doublest.h".
537         (union exp_element): Replace doubleconst and decfloatconst by
538         new element floatconst.
539         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
540         (ada_evaluate_subexp): Likewise.
541         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
542         OP_DOUBLE and OP_DECFLOAT.
543         * expprint.c (print_subexp_standard): Likewise.
544         (dump_subexp_body_standard): Likewise.
545         * breakpoint.c (watchpoint_exp_is_const): Likewise.
546
547         * parse.c: Include "dfp.h".
548         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
549         (write_exp_elt_floatcst): New function.
550         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
551         and OP_DECFLOAT.
552         (operator_check_standard): Likewise.
553         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
554         Return target format buffer instead of host DOUBLEST.
555         Use floatformat_from_string and decimal_from_string to parse
556         either binary or decimal floating-point types.
557         (parse_c_float): Remove.
558         * parser-defs.h: Do not include "doublest.h".
559         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
560         (write_exp_elt_floatcst): Add prototype.
561         (parse_float): Update prototype.
562         (parse_c_float): Remove.
563
564         * c-exp.y: Do not include "dfp.h".
565         (typed_val_float): Use byte buffer instead of DOUBLEST.
566         (typed_val_decfloat): Remove.
567         (DECFLOAT): Remove.
568         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
569         (parse_number): Update to new parse_float interface.
570         Parse suffixes and determine type before calling parse_float.
571         Handle decimal and binary FP types the same way.
572
573         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
574         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
575         (parse_number): Update to new parse_float interface.
576         Parse suffixes and determine type before calling parse_float.
577
578         * f-exp.y: Replace dval by typed_val_float.
579         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
580         (parse_number): Use parse_float instead of atof.
581
582         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
583         (parse_go_float): Remove.
584         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
585         (parse_number): Call parse_float instead of parse_go_float.
586         Parse suffixes and determine type before calling parse_float.
587
588         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
589         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
590         (parse_number): Update to new parse_float interface.
591         Parse suffixes and determine type before calling parse_float.
592
593         * m2-exp.y: Replace dval by byte buffer val.
594         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
595         (parse_number): Call parse_float instead of atof.
596
597         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
598         (lex_number): Call parse_float instead of strtod.
599         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
600         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
601         Use write_exp_elt_floatcst.
602         (unit_testing): Remove static variable.
603         (rust_type): Do not check unit_testing.
604         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
605
606         * ada-exp.y (type_float, type_double): Remove.
607         (typed_val_float): Use byte buffer instead of DOUBLEST.
608         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
609         * ada-lex.l (processReal): Use parse_float instead of sscanf.
610
611 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
612
613         * aarch64-tdep.h (enum aarch64_regnum): Remove.
614         * arch/aarch64.h: New file.
615
616 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
617
618         * dfp.h (decimal_from_string): Use const reference for argument.
619         * dfp.c (decimal_from_string): Likewise.
620
621 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
622
623         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
624         * sh64-tdep.c (sh64_do_fp_register): Likewise.
625         * mips-tdep.c (mips_print_fp_register): Likewise.
626
627 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
628
629         * common/format.h (enum argclass): Replace decfloat_arg by
630         dec32float_arg, dec64float_arg, and dec128float_arg.
631         * common/format.c (parse_format_string): Update to return
632         new decimal float argument classes.
633
634         * printcmd.c (printf_decfloat): Rename to ...
635         (printf_floating): ... this.  Add argclass argument, and use it
636         instead of parsing the format string again.  Add support for
637         binary floating-point values, using floatformat_to_string.
638         Convert value to the target format if it doesn't already match.
639         (ui_printf): Call printf_floating instead of printf_decfloat,
640         also for double_arg / long_double_arg.  Pass argclass.
641
642         * dfp.c (decimal_to_string): Add format string argument.
643         * dfp.h (decimal_to_string): Likewise.
644
645         * doublest.c (floatformat_to_string): Add format string argument.
646         * doublest.h (floatformat_to_string): Likewise.
647
648 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
649
650         * doublest.c (floatformat_precision): New routine.
651         (floatformat_to_string): Likewise.
652         * doublest.c (floatformat_to_string): Add prototype.
653
654         * printcmd.c (print_scalar_formatted): Only call print_floating
655         on floating-point types.
656         * valprint.c: Do not include "floatformat.h".
657         (generic_val_print_decfloat): Remove.
658         (generic_val_print): Call generic_val_print_float for both
659         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
660         (print_floating): Use floatformat_to_string.  Handle decimal float.
661         (print_decimal_floating): Remove, merge into floatformat_to_string.
662         * value.h (print_decimal_floating): Remove.
663
664         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
665
666 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
667
668         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
669
670 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
671
672         * memattr.h: Don't include vec.h.
673         (struct mem_attrib): Initialize fields.
674         <unknown>: New static method.
675         (struct mem_region): Add constructors, operator<, initialize
676         fields.
677         * memattr.c: Include algorithm.
678         (default_mem_attrib, unknown_mem_attrib): Remove.
679         (user_mem_region_list): New global.
680         (target_mem_region_list, mem_region_list): Change type to
681         std::vector<mem_region>.
682         (mem_use_target): Now a function.
683         (target_mem_regions_valid): Change type to bool.
684         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
685         (require_user_regions): Adjust.
686         (require_target_regions): Adjust.
687         (create_mem_region): Adjust.
688         (lookup_mem_region): Adjust.
689         (invalidate_target_mem_regions): Adjust.
690         (mem_clear): Rename to...
691         (user_mem_clear): ... this, and adjust.
692         (mem_command): Adjust.
693         (info_mem_command): Adjust.
694         (mem_enable, enable_mem_command, mem_disable,
695         disable_mem_command): Adjust.
696         (mem_delete): Adjust.
697         (delete_mem_command): Adjust.
698         * memory-map.h (parse_memory_map): Return an std::vector.
699         * memory-map.c (parse_memory_map): Likewise.
700         (struct memory_map_parsing_data): Add constructor.
701         <memory_map>: Point to std::vector.
702         (memory_map_start_memory): Adjust.
703         (memory_map_end_memory): Adjust.
704         (memory_map_end_property): Adjust.
705         (clear_result): Remove.
706         * remote.c (remote_memory_map): Return an std::vector.
707         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
708         Remove.
709         (target_debug_print_mem_region_vector): New.
710         * target-delegates.c: Regenerate.
711         * target.h (mem_region_vector): New typedef.
712         (to_memory_map): Return mem_region_vector.
713         (target_memory_map): Return an std::vector.
714         * target.c (target_memory_map): Return an std::vector.
715         (flash_erase_command): Adjust.
716
717 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
718
719         * memory-map.c (struct memory_map_parsing_data) <property_name>:
720         Change type to std::string.
721         (memory_map_start_property): Adjust.
722         (memory_map_end_property): Adjust.
723
724 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
725
726         * infrun.h: Include common/byte-vector.h.
727         (struct displaced_step_closure): New struct.
728         (struct buf_displaced_step_closure): New struct.
729         * infrun.c (displaced_step_closure::~displaced_step_closure):
730         Provide default implementation.
731         (displaced_step_clear): Deallocate step closure with delete.
732         * aarch64-tdep.c (displaced_step_closure): Rename to ...
733         (aarch64_displaced_step_closure): ... this, extend
734         displaced_step_closure.
735         (aarch64_displaced_step_data) <dsc>: Change type to
736         aarch64_displaced_step_closure.
737         (aarch64_displaced_step_copy_insn): Adjust to type change, use
738         unique_ptr.
739         (aarch64_displaced_step_fixup): Add cast for displaced step
740         closure.
741         * amd64-tdep.c (displaced_step_closure): Rename to ...
742         (amd64_displaced_step_closure): ... this, extend
743         displaced_step_closure.
744         <insn_buf>: Change type to std::vector<gdb_byte>.
745         <max_len>: Remove.
746         (fixup_riprel): Change type of DSC parameter, adjust to type
747         change of insn_buf.
748         (fixup_displaced_copy): Change type of DSC parameter.
749         (amd64_displaced_step_copy_insn): Instantiate
750         amd64_displaced_step_closure.
751         (amd64_displaced_step_fixup): Add cast for closure type, adjust
752         to type change of insn_buf.
753         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
754         parameter DSC.
755         (arm_linux_copy_svc): Likewise.
756         (cleanup_kernel_helper_return): Likewise.
757         (arm_catch_kernel_helper_return): Likewise.
758         (arm_linux_displaced_step_copy_insn): Instantiate
759         arm_displaced_step_closure.
760         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
761         (displaced_read_reg): Change type of parameter DSC.
762         (branch_write_pc): Likewise.
763         (load_write_pc): Likewise.
764         (alu_write_pc): Likewise.
765         (displaced_write_reg): Likewise.
766         (arm_copy_unmodified): Likewise.
767         (thumb_copy_unmodified_32bit): Likewise.
768         (thumb_copy_unmodified_16bit): Likewise.
769         (cleanup_preload): Likewise.
770         (install_preload): Likewise.
771         (arm_copy_preload): Likewise.
772         (thumb2_copy_preload): Likewise.
773         (install_preload_reg): Likewise.
774         (arm_copy_preload_reg): Likewise.
775         (cleanup_copro_load_store): Likewise.
776         (install_copro_load_store): Likewise.
777         (arm_copy_copro_load_store) Likewise.
778         (thumb2_copy_copro_load_store): Likewise.
779         (cleanup_branch): Likewise.
780         (install_b_bl_blx): Likewise.
781         (arm_copy_b_bl_blx): Likewise.
782         (thumb2_copy_b_bl_blx): Likewise.
783         (thumb_copy_b): Likewise.
784         (install_bx_blx_reg): Likewise.
785         (arm_copy_bx_blx_reg): Likewise.
786         (thumb_copy_bx_blx_reg): Likewise.
787         (cleanup_alu_imm): Likewise.
788         (arm_copy_alu_imm): Likewise.
789         (thumb2_copy_alu_imm): Likewise.
790         (cleanup_alu_reg): Likewise.
791         (install_alu_reg): Likewise.
792         (arm_copy_alu_reg): Likewise.
793         (thumb_copy_alu_reg): Likewise.
794         (cleanup_alu_shifted_reg): Likewise.
795         (install_alu_shifted_reg): Likewise.
796         (arm_copy_alu_shifted_reg): Likewise.
797         (cleanup_load): Likewise.
798         (cleanup_store): Likewise.
799         (arm_copy_extra_ld_st): Likewise.
800         (install_load_store): Likewise.
801         (thumb2_copy_load_literal): Likewise.
802         (thumb2_copy_load_reg_imm): Likewise.
803         (arm_copy_ldr_str_ldrb_strb): Likewise.
804         (cleanup_block_load_all): Likewise.
805         (cleanup_block_store_pc): Likewise.
806         (cleanup_block_load_pc): Likewise.
807         (arm_copy_block_xfer): Likewise.
808         (thumb2_copy_block_xfer): Likewise.
809         (cleanup_svc): Likewise.
810         (install_svc): Likewise.
811         (arm_copy_svc): Likewise.
812         (thumb_copy_svc): Likewise.
813         (arm_copy_undef): Likewise.
814         (thumb_32bit_copy_undef): Likewise.
815         (arm_copy_unpred): Likewise.
816         (arm_decode_misc_memhint_neon): Likewise.
817         (arm_decode_unconditional): Likewise.
818         (arm_decode_miscellaneous): Likewise.
819         (arm_decode_dp_misc): Likewise.
820         (arm_decode_ld_st_word_ubyte): Likewise.
821         (arm_decode_media): Likewise.
822         (arm_decode_b_bl_ldmstm): Likewise.
823         (arm_decode_ext_reg_ld_st): Likewise.
824         (thumb2_decode_dp_shift_reg): Likewise.
825         (thumb2_decode_ext_reg_ld_st): Likewise.
826         (arm_decode_svc_copro): Likewise.
827         (thumb2_decode_svc_copro): Likewise.
828         (install_pc_relative): Likewise.
829         (thumb_copy_pc_relative_16bit): Likewise.
830         (thumb_decode_pc_relative_16bit): Likewise.
831         (thumb_copy_pc_relative_32bit): Likewise.
832         (thumb_copy_16bit_ldr_literal): Likewise.
833         (thumb_copy_cbnz_cbz): Likewise.
834         (thumb2_copy_table_branch): Likewise.
835         (cleanup_pop_pc_16bit_all): Likewise.
836         (thumb_copy_pop_pc_16bit): Likewise.
837         (thumb_process_displaced_16bit_insn): Likewise.
838         (decode_thumb_32bit_ld_mem_hints): Likewise.
839         (thumb_process_displaced_32bit_insn): Likewise.
840         (thumb_process_displaced_insn): Likewise.
841         (arm_process_displaced_insn): Likewise.
842         (arm_displaced_init_closure): Likewise.
843         (arm_displaced_step_fixup): Add cast for closure.
844         * arm-tdep.h: Include infrun.h.
845         (displaced_step_closure): Rename to ...
846         (arm_displaced_step_closure): ... this, extend
847         displaced_step_closure.
848         <u::svc::copy_svc_os>: Change type of parameter DSC.
849         <cleanup>: Likewise.
850         (arm_process_displaced_insn): Likewise.
851         (arm_displaced_init_closure): Likewise.
852         (displaced_read_reg): Likewise.
853         (displaced_write_reg): Likewise.
854         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
855         Adjust.
856         * i386-tdep.h: Include infrun.h.
857         (i386_displaced_step_closure): New typedef.
858         * i386-tdep.c (i386_displaced_step_copy_insn): Use
859         i386_displaced_step_closure.
860         (i386_displaced_step_fixup): Adjust.
861         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
862         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
863         and unique_ptr.
864         (ppc_displaced_step_fixup): Adjust.
865         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
866         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
867         and unique_ptr.
868         (s390_displaced_step_fixup): Adjust.
869
870 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
871
872         * interps.h (interp_resume, interp_suspend, interp_set_temp):
873         Remove declarations.
874
875 2017-10-20  Tom Tromey  <tom@tromey.com>
876
877         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
878         std::vector.
879         (gdb_bfd_record_inclusion): Update.
880         (bfdp): Remove typedef.
881
882 2017-10-20  Tom Tromey  <tom@tromey.com>
883
884         * gdb_bfd.c (gdb_bfd_ref): Use new.
885         (struct gdb_bfd_data): Add constructor, destructor, and member
886         initializers.
887         (gdb_bfd_unref): Use delete.
888
889 2017-10-20  Tom Tromey  <tom@tromey.com>
890
891         * exec.c (exec_file_attach): Use new_bfd_ref.
892         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
893         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
894         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
895         new_bfd_ref.
896         * gdb_bfd.h (new_bfd_ref): New function.
897
898 2017-10-20  Pedro Alves  <palves@redhat.com>
899
900         * main.c (captured_command_loop): Add attribute noinline.
901
902 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
903
904         * interps.c (struct interp_factory): Add constructor.
905         (interp_factory_p): Remove typedef.
906         (DEF_VEC_P(interp_factory_p)): Remove.
907         (interpreter_factories): Change type to std::vector.
908         (interp_factory_register): Adjust.
909         (interp_lookup): Adjust.
910         (interpreter_completer): Adjust.
911
912 2017-10-19  Tom Tromey  <tom@tromey.com>
913
914         * break-catch-syscall.c (catch_syscall_completer): Use
915         std::string, gdb::unique_xmalloc_ptr.
916
917 2017-10-19  Tom Tromey  <tom@tromey.com>
918
919         * infcall.c (call_function_by_hand_dummy): Use std::string.
920
921 2017-10-19  Tom Tromey  <tom@tromey.com>
922
923         * mi/mi-main.c (mi_cmd_execute): Update.
924         * top.h (prepare_execute_command): Return scoped_value_mark.
925         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
926         Add move constructor.
927         * top.c (prepare_execute_command): Return scoped_value_mark.
928         (execute_command): Update.
929
930 2017-10-19  Pedro Alves  <palves@redhat.com>
931
932         * xml-support.c (xml_fetch_content_from_file): Check fread's
933         return.
934
935 2017-10-19  Pedro Alves  <palves@redhat.com>
936
937         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
938         async.
939         (handle_error_fd): New function.
940         (ser_base_async): Add/delete an event loop file handler for
941         error_fd.
942
943 2017-10-19  Pedro Alves  <palves@redhat.com>
944
945         * xml-support.c (xml_fetch_content_from_file): Don't read in
946         chunks.  Instead use fseek to determine the file's size, and read
947         it in one go.
948
949 2017-11-18  Keith Seitz  <keiths@redhat.com>
950
951         * c-exp.y (oper): Canonicalize conversion operators of user-defined
952         types.
953         Add whitespace to front of type name.
954
955 2017-10-18  Keith Seitz  <keiths@redhat.com>
956
957         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
958         DW_AT_accessibility.
959
960 2017-10-18  Yao Qi  <yao.qi@linaro.org>
961
962         * features/tic6x-c62x-linux.c: Remove.
963
964 2017-10-17  Tom Tromey  <tom@tromey.com>
965
966         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
967         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
968         (do_mixed_source_and_assembly): Likewise.
969
970 2017-10-17  Tom Tromey  <tom@tromey.com>
971
972         * regcache.c (regcache::xfer_part): Remove assertion.
973
974 2017-10-17  Pedro Alves  <palves@redhat.com>
975
976         * xml-support.c (xml_fetch_content_from_file): Call
977         unique_ptr::release() instead unique_ptr::get() when passing
978         through xrealloc.
979
980 2017-10-17  Yao Qi  <yao.qi@linaro.org>
981
982         * regcache.c (regcache::xfer_part): Remove parameters read and
983         write, add parameter is_raw.  All callers are updated.
984
985 2017-10-16  Keith Seitz  <keiths@redhat.com>
986
987         * c-typeprint.c (enum access_specifier): Moved here from
988         c_type_print_base.
989         (output_access_specifier): New function.
990         (c_type_print_base): Consider typedefs when assessing
991         whether access labels are needed.
992         Use output_access_specifier as needed.
993         Output access specifier for typedefs, if needed.
994         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
995         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
996         fields.
997         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
998         accessor macros.
999
1000 2017-10-16  Tom Tromey  <tom@tromey.com>
1001
1002         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1003         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1004         * target.c (target_fileio_read_stralloc): Update.
1005         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1006         * target.h (target_fileio_read_stralloc): Return
1007         unique_xmalloc_ptr.
1008
1009 2017-10-16  Tom Tromey  <tom@tromey.com>
1010
1011         * xml-syscall.c (xml_init_syscalls_info): Update.
1012         * xml-support.c (xinclude_start_include): Update.
1013         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1014         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1015         (xml_fetch_content_from_file): Likewise.
1016         * osdata.c (get_osdata): Update.
1017         * target.h (target_read_stralloc, target_get_osdata): Return
1018         unique_xmalloc_ptr.
1019         * solib-aix.c (solib_aix_get_library_list): Update.
1020         * solib-target.c (solib_target_current_sos): Update.
1021         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1022         * xml-tdesc.c (fetch_available_features_from_target): Update.
1023         (target_fetch_description_xml): Update.
1024         (file_read_description_xml): Update.
1025         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1026         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1027         (remote_pid_to_exec_file): Update.
1028         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1029         (target_get_osdata): Likewise.
1030
1031 2017-10-16  Tom Tromey  <tom@tromey.com>
1032
1033         * remote.c (remote_register_number_and_offset): Use std::vector.
1034         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1035         (putpkt_binary): Use gdb::def_vector.
1036         (compare_sections_command): Use gdb::byte_vector.
1037
1038 2017-10-16  Tom Tromey  <tom@tromey.com>
1039
1040         * ppc-linux-nat.c (hwdebug_insert_point): Use
1041         gdb::unique_xmalloc_ptr, XDUP.
1042
1043 2017-10-16  Tom Tromey  <tom@tromey.com>
1044
1045         * probe.c (parse_probes): Use std::string.
1046         (info_probes_for_ops, enable_probes_command)
1047         (disable_probes_command): Remove cleanups.
1048
1049 2017-10-16  Tom Tromey  <tom@tromey.com>
1050
1051         * buildsym.c (block_compar): Remove.
1052         (end_symtab_get_static_block): Use std::vector.
1053
1054 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1055
1056         * memrange.h (struct mem_range): Define operator< and operator==.
1057         (mem_range_s): Remove.
1058         (DEF_VEC_O (mem_range_s)): Remove.
1059         (normalize_mem_ranges): Change parameter type to std::vector.
1060         * memrange.c (compare_mem_ranges): Remove.
1061         (normalize_mem_ranges): Change parameter type to std::vector,
1062         adjust to vector change.
1063         * exec.c (section_table_available_memory): Return vector, remove
1064         parameter.
1065         (section_table_read_available_memory): Adjust to std::vector
1066         change.
1067         * remote.c (remote_read_bytes): Adjust to std::vector
1068         change.
1069         * tracepoint.h (traceframe_available_memory): Change parameter
1070         type to std::vector.
1071         * tracepoint.c (traceframe_available_memory): Change parameter
1072         type to std::vector, adjust.
1073         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1074         std::vector change.
1075         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1076         unittests/memrange-selftests.c.
1077         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1078         * gdb/unittests/memrange-selftests.c: New file.
1079
1080 2017-10-16  Pedro Alves  <palves@redhat.com>
1081
1082         * elfread.c (probe_key_free): Rename range-for variable.
1083         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1084         (find_probe_by_pc, collect_probes): Rename range-for variable.
1085
1086 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1087
1088         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1089         * features/tic6x-c62x.c: Remove.
1090         * features/tic6x-c64x-linux.c: Remove.
1091         * features/tic6x-c64x.c: Remove.
1092         * features/tic6x-c64xp-linux.c: Remove.
1093         * features/tic6x-c64xp.c: Remove.
1094         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1095         initialize_tdesc_tic6x_*_linux functions.
1096         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1097         initialize_tdesc_tic6x_* functions.
1098
1099 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1100
1101         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1102         tic6x-c62x.
1103         * regformats/tic6x-c62x.dat: Remove.
1104         * regformats/tic6x-c64x.dat: Remove.
1105         * regformats/tic6x-c64xp.dat: Remove.
1106
1107 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1108
1109         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1110         (the !HAVE_LIBEXPAT version).
1111
1112 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1113
1114         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1115         const.
1116
1117 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1118
1119         * target.h: Include tracepoint.h.
1120         (enum trace_find_type): Move to tracepoint.h.
1121         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1122         * tracepoint.h: Don't include target.h
1123         (enum trace_find_type): Move from target.h.
1124         (parse_traceframe_info): Return a unique ptr.
1125         * tracepoint.c (current_traceframe_info): Change type to unique
1126         ptr.
1127         (free_traceframe_info): Remove.
1128         (clear_traceframe_info): Don't manually free
1129         current_traceframe_info.
1130         (free_result): Remove.
1131         (parse_traceframe_info): Return a unique ptr.
1132         (get_traceframe_info): Adjust to unique ptr.
1133         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1134         * remote.c (remote_traceframe_info): Return a unique ptr.
1135         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1136         ptr.
1137         * target-debug.h (target_debug_print_traceframe_info_up): New
1138         macro.
1139         * target-delegates.c: Regenerate.
1140
1141 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1142
1143         * memrange.h (struct mem_range): Add constructors.
1144         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1145         std::vector<mem_range>.
1146         * tracepoint.c (free_traceframe_info): Don't manually free
1147         vector.
1148         (traceframe_info_start_memory): Adjust to vector change.
1149         (traceframe_available_memory): Likewise.
1150         * tracefile-tfile.c (build_traceframe_info): Likewise.
1151         * ctf.c (ctf_traceframe_info): Likewise.
1152
1153 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1154
1155         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1156         std::vector<int>.
1157         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1158         (traceframe_info_start_tvar): Adjust to vector change.
1159         (parse_traceframe_info): Allocate with new.
1160         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1161         vector change.
1162         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1163         change.
1164         tfile_traceframe_info): Allocate with new.
1165         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1166         change.
1167
1168 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1169
1170         * tracepoint.c (traceframe_info): Rename to...
1171         (current_traceframe_info): ...this.
1172         (clear_traceframe_info): Adjust.
1173         (get_traceframe_info): Adjust.
1174
1175 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1176
1177         * nat/linux-osdata.c: Include algorithm.
1178         (compare_processes): Remove.
1179         (struct pid_pgid_entry): New struct.
1180         (linux_xfer_osdata_processgroups): Use std::vector instead of
1181         XNEWVEC.
1182
1183 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1184
1185         * objfiles.h: Don't include symfile.h.
1186         (struct partial_symbol): Remove forward-declaration.
1187         (struct objfile) <global_psymbols, static_psymbols>: Change type
1188         to std::vector<partial_symbol *>.
1189         * objfiles.c (objfile::objfile): Don't memset those fields.
1190         (objfile::~objfile): Don't free those fields.
1191         * psympriv.h (struct psymbol_allocation_list): Remove
1192         forward-declaration.
1193         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1194         to std::vector.
1195         (start_psymtab_common): Change parameters to std::vector.
1196         * psymtab.c: Include algorithm.
1197         (require_partial_symbols): Call shrink_to_fit.
1198         (find_pc_sect_psymbol): Adjust to vector change.
1199         (match_partial_symbol): Likewise.
1200         (lookup_partial_symbol): Likewise.
1201         (psym_relocate): Likewise.
1202         (dump_psymtab): Likewise.
1203         (recursively_search_psymtabs): Likewise.
1204         (compare_psymbols): Remove.
1205         (sort_pst_symbols): Adjust to vector change.
1206         (start_psymtab_common): Likewise.
1207         (end_psymtab_common): Likewise.
1208         (psymbol_bcache_full): De-constify return value.
1209         (add_psymbol_to_bcache): Likewise.
1210         (extend_psymbol_list): Remove.
1211         (append_psymbol_to_list): Adjust to vector change.
1212         (add_psymbol_to_list): Likewise.
1213         (init_psymbol_list): Likewise.
1214         (maintenance_info_psymtabs): Likewise.
1215         (maintenance_check_psymtabs): Likewise.
1216         * symfile.h (struct psymbol_allocation_list): Remove.
1217         * symfile.c (reread_symbols): Adjust to vector change.
1218         * dbxread.c (start_psymtab): Change type of parameters.
1219         (dbx_symfile_read): Adjust to vector change.
1220         (read_dbx_symtab): Likewise.
1221         (start_psymtab): Change type of parameters.
1222         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1223         (create_partial_symtab): Likewise.
1224         (add_partial_symbol): Likewise.
1225         (write_one_signatured_type): Likewise.
1226         (recursively_write_psymbols): Likewise.
1227         * mdebugread.c (parse_partial_symbols): Likewise.
1228         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1229         (scan_xcoff_symtab): Adjust to vector change.
1230         (xcoff_initial_scan): Likewise.
1231
1232 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1233
1234         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1235
1236 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1237
1238         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1239         Remove s390x-*-expedite, add s390x-expedite.
1240
1241 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1242
1243         * features/s390-gs-linux64.c: Regenerated.
1244         * features/s390x-gs-linux64.c: Regenerated.
1245
1246 2017-10-13  Tom Tromey  <tom@tromey.com>
1247
1248         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1249         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1250         delete.
1251         * symfile.c (symbol_file_add_with_addrs): Use new.
1252         (symbol_file_add_separate): Update comment.
1253         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1254         * jit.c (jit_object_close_impl): Use new.
1255         (jit_unregister_code): Use delete.
1256         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1257         (~objfile): Rename from free_objfile.
1258         (free_objfile_separate_debug, do_free_objfile_cleanup)
1259         (free_all_objfiles, objfile_purge_solibs): Use delete.
1260         * objfiles.h (struct objfile): Add constructor and destructor.
1261         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1262         (allocate_objfile, free_objfile): Don't declare.
1263         (struct objstats): Add initializers.
1264
1265 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1266
1267         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1268         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1269         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1270         * gdbarch.h: Regenerate.
1271         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1272         Adjust comment.
1273         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1274         (i386_displaced_step_fixup): Adjust comment.
1275         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1276
1277 2017-10-12  Tom Tromey  <tom@tromey.com>
1278
1279         * prologue-value.h (pv_area::store_would_trash): Return bool.
1280         (pv_area::find_reg): Likewise.
1281         * prologue-value.c (pv_area::store_would_trash): Return bool.
1282         (pv_area::find_reg): Likewise.
1283
1284 2017-10-12  Tom Tromey  <tom@tromey.com>
1285
1286         * s390-linux-tdep.c (s390_store, s390_load)
1287         (s390_check_for_saved, s390_analyze_prologue): Update.
1288         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1289         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1290         * prologue-value.h (class pv_area): Move from prologue-value.c.
1291         Change names of members.  Add constructor, destructor, member
1292         functions.
1293         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1294         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1295         (pv_area_fetch, pv_area_scan): Don't declare.
1296         * prologue-value.c (struct pv_area::area_entry): Now member of
1297         pv_area.
1298         (struct pv_area): Move to prologue-value.h.
1299         (pv_area::pv_area): Rename from make_pv_area.
1300         (pv_area::~pv_area): Rename from free_pv_area.
1301         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1302         (clear_entries, find_entry, overlaps, store_would_trash, store)
1303         (fetch, find_reg, scan): Now member of pv_area.
1304         Remove "area" argument.  Update.
1305         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1306         Update.
1307         * mn10300-tdep.c (push_reg, check_for_saved)
1308         (mn10300_analyze_prologue): Update.
1309         * mep-tdep.c (is_arg_spill, check_for_saved)
1310         (mep_analyze_prologue): Update.
1311         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1312         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1313         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1314         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1315         Update.
1316         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1317         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1318
1319 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1320
1321         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1322         * linux-nat.c (linux_nat_delete_thread): New variable.
1323         (lwp_free): Invoke linux_nat_delete_thread if set.
1324         (linux_nat_set_delete_thread): New function.
1325         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1326         thread delete callback.
1327         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1328         (_initialize_arm_linux_nat): Assign thread delete callback.
1329         * s390-linux-nat.c (s390_delete_thread): New function.
1330         (_initialize_s390_nat): Assign thread delete callback.
1331         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1332         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1333         function.
1334         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1335         declaration.
1336         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1337         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1338
1339 2017-10-09  Tom Tromey  <tom@tromey.com>
1340
1341         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1342         std::string.
1343         * tui/tui-layout.c (enum tui_status): Use std::string.
1344
1345 2017-10-11  Tom Tromey  <tom@tromey.com>
1346
1347         * gdbthread.h (thread_command): Constify.
1348         * inferior.h (detach_command): Constify.
1349         * top.h (set_history, show_history): Constify.
1350         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1351         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1352         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1353         * printcmd.c (set_command): Constify.
1354         (non_const_set_command): New function.
1355         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1356         * breakpoint.c (enable_command, disable_command, delete_command)
1357         (catch_command, tcatch_command, set_breakpoint_cmd)
1358         (show_breakpoint_cmd): Constify.
1359         * macrocmd.c (macro_command): Constify.
1360         * infcmd.c (unset_command, kill_command, detach_command)
1361         (info_proc_cmd): Constify.
1362         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1363         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1364         (info_auto_load_cmd): Constify.
1365         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1366         (unset_tdesc_cmd): Constify.
1367         * ada-lang.c (set_ada_command, show_ada_command)
1368         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1369         * guile/guile.c (set_guile_command, show_guile_command)
1370         (info_guile_command): Constify.
1371         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1372         Constify.
1373         * skip.c (skip_command): Constify.
1374         * compile/compile.c (_initialize_compile): Constify.
1375         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1376         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1377         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1378         (maint_btrace_pt_show_cmd): Constify.
1379         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1380         Constify.
1381         * python/python.c (user_show_python, user_set_python): Constify.
1382         * mips-tdep.c (set_mips_command, show_mips_command)
1383         (set_mipsfpu_command): Constify.
1384         * record-btrace.c (cmd_record_btrace_start)
1385         (cmd_set_record_btrace, cmd_show_record_btrace)
1386         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1387         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1388         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1389         Constify.
1390         * symfile.c (overlay_command): Constify.
1391         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1392         * cli/cli-logging.c (set_logging_command, show_logging_command):
1393         Constify.
1394         * cli/cli-dump.c (dump_command, append_command)
1395         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1396         (tekhex_dump_command, binary_dump_command)
1397         (binary_append_command): Constify.
1398         * cli/cli-decode.c (struct cmd_list_element): Change type of
1399         "fun".
1400         * cli/cli-cmds.c (info_command, show_command, set_debug)
1401         (show_debug): Constify.
1402         (show_command): Add non-const overload.
1403         * top.c (set_history, show_history): Constify.
1404         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1405         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1406         * target.c (target_command): Constify.
1407         * sparc64-tdep.c (info_adi_command): Constify.
1408         * record-full.c (cmd_record_full_start): Constify.
1409         (set_record_full_command): Constify.  Fix typo.
1410         (show_record_full_command): Constify.
1411         * thread.c (thread_command, thread_apply_command): Constify.
1412         * memattr.c (dummy_cmd): Constify.
1413         * value.c (function_command): Constify.
1414         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1415         * probe.c (info_probes_command): Constify.
1416         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1417         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1418         (show_thread_cmd, set_thread_default_cmd)
1419         (show_thread_default_cmd): Constify.
1420         (check_empty): Constify.
1421         * tracepoint.c (tfind_command): Constify.
1422         * cp-support.c (maint_cplus_command): Constify.
1423         * windows-tdep.c (info_w32_command): Constify.
1424         * record.c (cmd_record_start, set_record_command)
1425         (show_record_command, info_record_command, cmd_record_goto):
1426         Constify.
1427         * ravenscar-thread.c (set_ravenscar_command)
1428         (show_ravenscar_command): Constify.
1429         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1430         Constify.
1431         (add_internal_problem_command): Remove casts.
1432         * arc-tdep.c (maintenance_print_arc_command): Constify.
1433         * valprint.c (set_print, show_print, set_print_raw)
1434         (show_print_raw): Constify.
1435         * maint.c (maintenance_command, maintenance_info_command)
1436         (maintenance_print_command, maintenance_set_cmd)
1437         (maintenance_show_cmd, set_per_command_cmd)
1438         (show_per_command_cmd, maintenance_check_command): Constify.
1439         * language.c (set_check, show_check): Constify.
1440         * typeprint.c (show_print_type, set_print_type): Constify.
1441         * go32-nat.c (go32_info_dos_command): Constify.
1442
1443 2017-10-11  Tom Tromey  <tom@tromey.com>
1444
1445         * breakpoint.c (prepare_re_set_context): Remove.
1446         (breakpoint_re_set_one): Update.  Don't use cleanups.
1447         (breakpoint_re_set): Use scoped_restore, std::string, and
1448         scoped_restore_current_language.
1449
1450 2017-10-11  Tom Tromey  <tom@tromey.com>
1451
1452         * breakpoint.c (commands_command_1): Use std::string.
1453         (cleanup_executing_breakpoints): Remove.
1454         (bpstat_do_actions_1): Use scoped_restore.
1455         (bpstat_check_watchpoint): Use std::string.
1456         (decode_static_tracepoint_spec): Likewise.
1457         (break_range_command): Likewise.
1458         (watch_command_1): Likewise.
1459         (compare_breakpoints): Change argument types.
1460         (clear_command): Use std::vector.
1461         (cleanup_executing_breakpoints): Remove.
1462         (update_global_location_list): Use unique_xmalloc_ptr.
1463         (strace_command): Remove unused declaration.
1464
1465 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1466
1467         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1468         * NEWS: Mention new FreeBSD/arm native configuration.
1469         * configure.host: Add arm*-*-freebsd*.
1470         * configure.nat: Likewise.
1471         * arm-fbsd-nat.c: New file.
1472
1473 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1474
1475         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1476         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1477         * NEWS: Mention new FreeBSD/arm target.
1478         * configure.tgt: Add arm*-*-freebsd*.
1479         * arm-fbsd-tdep.c: New file.
1480         * arm-fbsd-tdep.h: New file.
1481
1482 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1483
1484         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1485         `gdbarch_elfcore_write_linux_prpsinfo'.
1486         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1487         method.
1488         (elf_internal_linux_prpsinfo): Remove declaration.
1489         * gdbarch.h: Regenerate.
1490         * gdbarch.c: Regenerate.
1491
1492 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1493
1494         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1495         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1496
1497 2017-10-11  Pedro Alves  <palves@redhat.com>
1498
1499         * breakpoint.c (reattach_breakpoints): Delete.
1500         * breakpoint.h (reattach_breakpoints): Delete.
1501
1502 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1503
1504         * symfile.c (registered_sym_fns): Make struct, not typedef.
1505         (DEF_VEC_O (registered_sym_fns)): Remove.
1506         (symtab_fns): Change type to std::vector.
1507         (add_symtab_fns): Adjust.
1508         (find_sym_fns): Adjust.
1509
1510 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1511
1512         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1513         * arc-tdep.h (arc_arch_is_em): New function.
1514         (arc_arch_is_hs): Likewise.
1515
1516 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1517
1518         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1519         parentheses in the declaration.
1520         (macro_lookup_inclusion): Likewise.
1521         (macro_lookup_definition): Likewise.
1522         * p-lang.h (pascal_builtin_types): Likewise.
1523         * tui/tui-data.c (tui_win_list): Likewise.
1524         * tui/tui-data.h (tui_win_list): Likewise.
1525         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1526
1527 2017-10-11  Mark Rages  <markrages@gmail.com>
1528
1529         * target-memory.c (block_boundaries): Fix for block address not
1530         aligned on block size.
1531
1532 2017-10-10  Pedro Alves <palves@redhat.com>
1533             Tom Tromey  <tom@tromey.com>
1534
1535         * breakpoint.c (struct captured_breakpoint_query_args)
1536         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1537         (print_breakpoint): New.
1538         * breakpoint.h (print_breakpoint): Declare.
1539         * common/common-exceptions.h (enum return_reason): Remove
1540         references to catch_exceptions.
1541         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1542         Delete.
1543         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1544         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1545         * gdb.h: Delete.
1546         * gdbthread.h (thread_select): Declare.
1547         * mi/mi-cmd-break.c: Don't include gdb.h.
1548         (breakpoint_notify): Use print_breakpoint.
1549         * mi/mi-cmd-catch.c: Don't include gdb.h.
1550         * mi/mi-interp.c: Don't include gdb.h.
1551         (mi_print_breakpoint_for_event): New.
1552         (mi_breakpoint_created, mi_breakpoint_modified): Use
1553         mi_print_breakpoint_for_event.
1554         * mi/mi-main.c: Don't include gdb.h.
1555         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1556         thread_select instead of gdb_thread_select.
1557         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1558         of using gdb_list_thread_ids.
1559         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1560         FILEIO_ENOSYS here.
1561         (remote_fileio_request): Use TRY/CATCH instead of
1562         catch_exceptions.
1563         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1564         (symbol_file_add_from_memory_wrapper): Delete.
1565         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1566         * thread.c: Don't include gdb.h.
1567         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1568         (thread_alive): Use thread_select.
1569         (do_captured_thread_select): Delete, parts salvaged as ...
1570         (thread_select): ... this new function.
1571         (gdb_thread_select): Delete.
1572
1573 2017-10-10  Pedro Alves  <palves@redhat.com>
1574             Tom Tromey  <tom@tromey.com>
1575
1576         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1577         and reverse logic.
1578         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1579         No longer macros.  Instead ...
1580         (enum wp_check_result): They're now values of this new
1581         enumeration.
1582         (watchpoint_check): Change return type to wp_check_result and
1583         parameter type to bpstat.
1584         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1585         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1586         catch_errors.  Reverse logic of watchpoint_check call.
1587         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1588         pointer as parameter.
1589         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1590         * common/common-exceptions.c (throw_exception_sjlj): Update
1591         comments to avoid mentioning catch_errors.
1592         * exceptions.c (catch_errors): Delete.
1593         * exceptions.h: Update comments to avoid mentioning catch_errors.
1594         (catch_errors_ftype, catch_errors): Delete.
1595         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1596         (hook_stop_stub): Delete.
1597         (restore_selected_frame): Change return type to void, and
1598         parameter type to const frame_id &.
1599         (restore_infcall_control_state): Use TRY/CATCH instead of
1600         catch_errors.
1601         * main.c (captured_command_loop): Return void and remove
1602         parameter.  Remove references to catch_errors.
1603         (captured_main): Use TRY/CATCH instead of catch_errors.
1604         * objc-lang.c (objc_submethod_helper_data)
1605         (find_objc_msgcall_submethod_helper): Delete.
1606         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1607         catch_errors.
1608         * record-full.c (record_full_message): Return void.
1609         (record_full_message_args, record_full_message_wrapper): Delete.
1610         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1611         instead of catch_errors.
1612         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1613         parameter type to int.
1614         * solib-darwin.c (open_symbol_file_object): Ditto.
1615         * solib-dsbt.c (open_symbol_file_object): Ditto.
1616         * solib-frv.c (open_symbol_file_object): Ditto.
1617         * solib-svr4.c (open_symbol_file_object): Ditto.
1618         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1619         * solib.c (update_solib_list): Use TRY/CATCH instead of
1620         catch_errors.
1621         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1622         Change type.
1623         * symmisc.c (struct print_symbol_args): Remove.
1624         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1625         (print_symbol): Change type.
1626         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1627         and remove parameters.
1628         (catch_errors): New.
1629         (get_windows_debug_event): Adjust.
1630
1631 2017-10-09  Tom Tromey  <tom@tromey.com>
1632
1633         * mi/mi-main.c (free_splay_tree): Remove.
1634         (list_available_thread_groups): Use splay_tree_up.
1635         * common/gdb_splay_tree.h: New file.
1636
1637 2017-10-09  Tom Tromey  <tom@tromey.com>
1638
1639         * mi/mi-main.c (do_nothing): Remove.
1640         (list_available_thread_groups): Update.
1641
1642 2017-10-09  Pedro Alves  <palves@redhat.com>
1643
1644         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1645         reading registers when switching context.
1646
1647 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1648
1649         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1650         (fbsd_convert_siginfo): Likewise.
1651         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1652
1653 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1654
1655         * configure.ac (try_guile_versions): Remove guile-2.2.
1656         * configure: Regenerate.
1657
1658 2017-10-09  Tom Tromey  <tom@tromey.com>
1659
1660         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1661         (COMPILE.pre): Use $(CXX).
1662
1663 2017-10-09  Pedro Alves  <palves@redhat.com>
1664
1665         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1666         Use bool.
1667         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1668         * cp-support.h (cp_remove_params): Now returns a
1669         gdb::unique_xmalloc_ptr.
1670         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1671         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1672         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1673         returning a gdb::unique_xmalloc_ptr.
1674         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1675         * stack.c (find_frame_funname): Adjust to cp_remove_params
1676         returning a gdb::unique_xmalloc_ptr.
1677
1678 2017-10-08  Tom Tromey  <tom@tromey.com>
1679
1680         * dwarf2read.c (dwarf2_get_dwz_file): Use
1681         gdb::unique_xmalloc_ptr.
1682         (find_slot_in_mapped_hash): Likewise.
1683         (dwarf2_physname): Likewise.
1684         (create_dwo_unit_in_dwp_v1): Use std::string.
1685         (create_dwo_unit_in_dwp_v2): Likewise.
1686         (lookup_dwo_cutu): Likewise.
1687         (inherit_abstract_dies): Use std::vector.
1688         (read_array_type): Likewise.
1689         (dwarf_decode_macros): Remove unused declaration.
1690         (unsigned_int_compar): Remove.
1691         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1692         (psymtabs_addrmap_cleanup): Remove.
1693
1694 2017-10-08  Tom Tromey  <tom@tromey.com>
1695
1696         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1697         * frame.h (frame_cleanup_after_sniffer): Declare.
1698         (frame_prepare_for_sniffer): Return void.
1699         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1700         type of argument.
1701         (frame_prepare_for_sniffer): Return void.
1702
1703 2017-10-08  Tom Tromey  <tom@tromey.com>
1704
1705         * utils.h (make_cleanup_value_free): Remove.
1706         * utils.c (do_value_free, struct cleanup): Remove.
1707         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1708         Use gdb_value_up.
1709         * value.h (struct value_deleter): New.
1710         (gdb_value_up): New typedef.
1711
1712 2017-10-08  Tom Tromey  <tom@tromey.com>
1713
1714         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1715         (make_cleanup_free_search_symbols): Remove.
1716         (search_symbols): Return std::vector.
1717         (symbol_search::compare_search_syms): Now member of
1718         symbol_search.  Change arguments.
1719         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1720         (symtab_symbol_info, rbreak_command): Update.
1721         * symtab.h (struct symbol_search) <next>: Remove.
1722         Add constructors.
1723         (symbol_search::operator<): New function.
1724         (symbol_search::operator==): New function.
1725         (search_symbols): Remove std::vector.
1726         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1727         (symbol_search::compare_search_syms): Declare.
1728
1729 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1730
1731         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1732         arch/aarch64-insn.o.
1733         Remove one rule.
1734         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1735
1736 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1737
1738         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1739         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1740         arch/arm-linux.o respectively.
1741         * configure.tgt: Likewise.
1742
1743 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1744
1745         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1746         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1747
1748 2017-10-06  Pedro Alves  <palves@redhat.com>
1749
1750         * windows-nat.c: Include <algorithm>.
1751
1752 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1753
1754         * configure.tgt (i386_tobjs): New variable.
1755         (amd64_tobjs): New variable.
1756         Set $cpu_obs and $os_obs.
1757
1758 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1759
1760         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1761         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1762         (clean): Remove object files and dependency files.
1763         (distclean): Remove the directory.
1764         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1765         * configure: Re-generated.
1766         * configure.tgt: Replace amd64.o with arch/amd64.o.
1767
1768 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1769
1770         PR build/22188
1771         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1772         and SETEND.
1773
1774 2017-10-05  Pedro Alves  <palves@redhat.com>
1775
1776         * linux-nat.c (linux_child_follow_fork): When following the parent
1777         and detaching the child, consult the parent thread's architecture
1778         instead of the child's.
1779
1780 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1781
1782         * ax.h: Do not include "doublest.h".
1783         (union agent_val): Remove.
1784
1785 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1786
1787         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1788         (decimal_to_string): Return std::string object.
1789         (decimal_from_string): Accept std::string object.  Return bool.
1790         (decimal_from_integral, decimal_from_doublest): Remove.
1791         (decimal_from_longest): Add prototype.
1792         (decimal_from_ulongest): Likewise.
1793         (decimal_to_longest): Likewise.
1794         (decimal_from_doublest): Likewise.
1795         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1796         (MAX_DECIMAL_STRING): Move here.
1797         (decimal_to_string): Return std::string object.
1798         (decimal_from_string): Accept std::string object.  Return bool.
1799         (decimal_from_integral): Remove, replace by ...
1800         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1801         (decimal_to_longest): New function.
1802         (decimal_from_floating): Remove, replace by ...
1803         (decimal_from_doublest): ... this new function.
1804         (decimal_to_doublest): Update to new decimal_to_string interface.
1805
1806         * value.c (unpack_long): Use decimal_to_longest.
1807         * valops.c (value_cast): Use decimal_from_doublest instead of
1808         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1809         decimal_from_integral.
1810         * valarith.c (value_args_as_decimal): Likewise.
1811         * valprint.c (print_decimal_floating): Update to new
1812         decimal_to_string interface.
1813         * printcmd.c (printf_decfloat): Likewise.
1814         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1815
1816 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1817
1818         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1819         * gdbtypes.c: Include "floatformat.h".
1820         * value.c: Likewise.
1821         * m68k-tdep.c: Likewise.
1822
1823         * findvar.c: Do not include "floatformat.h".
1824         * amd64-darwin-tdep.c: Likewise.
1825         * arm-linux-tdep.c: Likewise.
1826         * i386-darwin-tdep.c: Likewise.
1827         * i387-tdep.c: Likewise.
1828         * m68k-linux-tdep.c: Likewise.
1829         * mep-tdep.c: Likewise.
1830         * mips-tdep.c: Likewise.
1831         * nios2-tdep.c: Likewise.
1832         * s390-linux-tdep.c: Likewise.
1833         * sparc-obsd-tdep.c: Likewise.
1834         * sparc-tdep.c: Likewise.
1835         * sparc64-tdep.c: Likewise.
1836         * spu-tdep.c: Likewise.
1837         * tic6x-tdep.c: Likewise.
1838         * tilegx-tdep.c: Likewise.
1839         * vax-tdep.c: Likewise.
1840         * xstormy16-tdep.c: Likewise.
1841         * xtensa-tdep.c: Likewise.
1842
1843         * top.c: Do not include "doublest.h".
1844         * aarch64-tdep.c: Likewise.
1845         * alpha-tdep.c: Likewise.
1846         * arm-linux-tdep.c: Likewise.
1847         * m68k-linux-tdep.c: Likewise.
1848         * tilegx-tdep.c: Likewise.
1849         * xstormy16-tdep.c: Likewise.
1850
1851 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1852
1853         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1854         (mipsn32_fbsd_sigframe): Define.
1855         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1856         for FreeBSD/mipsn32.
1857
1858 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1859
1860         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1861         AT_HWCAP.
1862
1863 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1864
1865         * MAINTAINERS (Misc): Update my email address.
1866
1867 2017-10-04  Pedro Alves  <palves@redhat.com>
1868
1869         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1870         it instead of target_gdbarch.
1871         (get_remote_state, get_remote_packet_size): Adjust
1872         get_remote_arch_state calls, passing down target_gdbarch
1873         explicitly.
1874         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1875         'gdbarch' and use it instead of target_gdbarch.
1876         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1877         passing down target_gdbarch explicitly.
1878         (struct stop_reply) <arch>: New field.
1879         (remote_parse_stop_reply): Use the stopped thread's architecture,
1880         not the current inferior's.  Save the architecture in the
1881         stop_reply.
1882         (process_stop_reply): Use the stop reply's architecture.
1883         (process_g_packet, remote_fetch_registers)
1884         (remote_prepare_to_store, store_registers_using_G)
1885         (remote_store_registers): Adjust get_remote_arch_state calls,
1886         using the regcache's architecture.
1887         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1888         passing down target_gdbarch explicitly.
1889         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1890         beneath instead of calling target_gdbarch.
1891         * target.c (default_thread_architecture): Use the specified
1892         inferior's architecture, instead of the current inferior's
1893         architecture (via target_gdbarch).
1894
1895 2017-10-04  Pedro Alves  <palves@redhat.com>
1896
1897         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1898         case.
1899         (regcache_print): Handle !target_has_registers here instead.
1900
1901 2017-10-04  Pedro Alves  <palves@redhat.com>
1902
1903         * frame.c (create_test_frame): Delete.
1904         * frame.h (create_test_frame): Delete.
1905         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1906         (class regcache_test): Delete.
1907         (test_target_has_registers, test_target_has_stack)
1908         (test_target_has_memory, test_target_prepare_to_store)
1909         (test_target_store_registers): New functions.
1910         (test_target_ops): New class.
1911         (register_to_value_test): Error out if there's already a
1912         process_stratum (or higher) target pushed.  Create a fuller mock
1913         environment, with mock target_ops, inferior, address space, thread
1914         and inferior_ptid.
1915         * progspace.c (struct address_space): Move to ...
1916         * progspace.h (struct address_space): ... here.
1917         * regcache.h (regcache::~regcache, regcache::raw_write)
1918         [GDB_SELF_TEST]: No longer virtual.
1919
1920 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1921
1922         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1923
1924 2017-10-04  Pedro Alves  <palves@redhat.com>
1925
1926         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1927         out of 'between TRY and CATCH'.
1928
1929 2017-10-04  Pedro Alves  <palves@redhat.com>
1930
1931         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1932         * common/common-exceptions.h (TRY): Open an outermost scope.
1933         Expand intro comment.
1934         (CATCH): Reindent.
1935         (END_CATCH): Close the outermost scope.
1936         * completer.c (complete_line_internal): Add missing END_CATCH.
1937
1938 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1939
1940         * NEWS (Changes since GDB 8.0): Add entry about new
1941         'set-cwd-on-gdbserver' feature.
1942         (New remote packets): Add entry for QSetWorkingDir.
1943         * common/common-inferior.h (set_inferior_cwd): New prototype.
1944         * infcmd.c (set_inferior_cwd): Remove "static".
1945         (show_cwd_command): Expand text to include remote debugging.
1946         * remote.c: Add PACKET_QSetWorkingDir.
1947         (remote_protocol_features) <QSetWorkingDir>: New entry for
1948         PACKET_QSetWorkingDir.
1949         (extended_remote_set_inferior_cwd): New function.
1950         (extended_remote_create_inferior): Call
1951         "extended_remote_set_inferior_cwd".
1952         (_initialize_remote): Call "add_packet_config_cmd" for
1953         QSetWorkingDir.
1954
1955 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1956
1957         * NEWS (New commands): Mention "set/show cwd".
1958         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1959         "cd" command's help text.
1960         * common/common-inferior.h (get_inferior_cwd): New prototype.
1961         * infcmd.c (inferior_cwd_scratch): New global variable.
1962         (set_inferior_cwd): New function.
1963         (get_inferior_cwd): Likewise.
1964         (set_cwd_command): Likewise.
1965         (show_cwd_command): Likewise.
1966         (_initialize_infcmd): Add "set/show cwd" commands.
1967         * inferior.h (class inferior) <cwd>: New field.
1968         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1969         (fork_inferior): Change inferior's cwd before its execution.
1970         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1971         to CreateProcess.
1972
1973 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1974
1975         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1976         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1977         (COMMON_OBS): Add gdb_tilde_expand.o.
1978         * common/gdb_tilde_expand.c: New file.
1979         * common/gdb_tilde_expand.h: Likewise.
1980
1981 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1982
1983         * gdbarch.sh (objfile): Remove duplicate declaration.
1984         * gdbarch.h: Regenerate.
1985
1986 2017-10-03  Tom Tromey  <tom@tromey.com>
1987
1988         * utils.c (internal_vproblem): Use string_vprintf.
1989
1990 2017-10-03  Tom Tromey  <tom@tromey.com>
1991
1992         * printcmd.c (info_symbol_command): Use std::string.
1993
1994 2017-10-03  Tom Tromey  <tom@tromey.com>
1995
1996         * top.c (gdb_safe_append_history): Use std::string.
1997
1998 2017-10-03  Tom Tromey  <tom@tromey.com>
1999
2000         * event-top.c (stdin_event_handler): Update.
2001         * main.c (captured_main_1): Update.
2002         * top.h (make_delete_ui_cleanup): Remove.
2003         (struct ui): Add constructor and destructor.
2004         (new_ui, delete_ui): Remove.
2005         * top.c (make_delete_ui_cleanup): Remove.
2006         (new_ui_command): Use std::unique_ptr.
2007         (delete_ui_cleanup): Remove.
2008         (ui::ui): Rename from new_ui.  Update.
2009         (free_ui): Remove.
2010         (ui::~ui): Rename from delete_ui.  Update.
2011
2012 2017-10-03  Tom Tromey  <tom@tromey.com>
2013
2014         * symfile.c (load_progress): Use gdb::byte_vector.
2015
2016 2017-10-03  Tom Tromey  <tom@tromey.com>
2017
2018         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2019         declaration.
2020         * printcmd.c (x_command): Remove unused declaration.
2021         * symfile.c (symbol_file_command): Remove unused declaration.
2022
2023 2017-10-03  Tom Tromey  <tom@tromey.com>
2024
2025         * utils.c (internal_vproblem): Use std::string.
2026         (defaulted_query): Likewise.
2027
2028 2017-10-03  Tom Tromey  <tom@tromey.com>
2029
2030         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2031         * top.c (execute_command_to_string): Update.
2032         * utils.c (make_cleanup_restore_page_info): Remove.
2033         (do_restore_page_info_cleanup): Remove.
2034         (set_batch_flag_and_restore_page_info):
2035         New.
2036         (make_cleanup_restore_page_info): Remove.
2037         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2038         (~set_batch_flag_and_restore_page_info): New
2039         (make_cleanup_restore_uinteger): Remove.
2040         (make_cleanup_restore_integer): Remove.
2041         (struct restore_integer_closure): Remove.
2042         (restore_integer): Remove.
2043         * utils.h (struct set_batch_flag_and_restore_page_info): New
2044         class.
2045         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2046         (make_cleanup_restore_page_info): Remove.
2047         (make_cleanup_restore_uinteger) Remove.
2048         (make_cleanup_restore_integer) Remove.
2049
2050 2017-10-03  Tom Tromey  <tom@tromey.com>
2051
2052         * record-full.h (record_full_gdb_operation_disable_set): Return
2053         scoped_restore_tmpl<int>.
2054         * infrun.c (adjust_pc_after_break): Update.
2055         (handle_signal_stop): Update.
2056         * record-full.c (record_full_gdb_operation_disable_set): Return
2057         scoped_restore_tmpl<int>.
2058         (record_full_wait_1, record_full_insert_breakpoint)
2059         (record_full_remove_breakpoint, record_full_save)
2060         (record_full_goto_insn): Update.
2061
2062 2017-10-02  Tom Tromey  <tom@tromey.com>
2063
2064         PR rust/22236:
2065         * rust-lang.c (rust_val_print_str): New function.
2066         (val_print_struct): Call it.
2067         (rust_subscript): Preserve name of slice type.
2068
2069 2017-10-02  Tom Tromey  <tom@tromey.com>
2070
2071         * rust-lang.c (rust_subscript): Handle slices in
2072         EVAL_AVOID_SIDE_EFFECTS case.
2073
2074 2017-10-02  Tom Tromey  <tom@tromey.com>
2075
2076         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2077
2078 2017-10-02  Tom Tromey  <tom@tromey.com>
2079
2080         * rust-lang.h (rust_slice_type): Add "extern".
2081
2082 2017-10-02  Tom Tromey  <tom@tromey.com>
2083             Pedro Alves  <palves@redhat.com>
2084
2085         * ada-lang.h (ada_exc_info::operator<): Make const.
2086         (ada_exc_info::operator==): Make const.
2087         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2088         Make const.
2089
2090 2017-09-29  Tom Tromey  <tom@tromey.com>
2091
2092         * target.c (read_whatever_is_readable): Change type of "result".
2093         Update.
2094         (free_memory_read_result_vector): Remove.
2095         (read_memory_robust): Change return type.  Update.
2096         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2097         bin2hex, std::string.
2098         * target.h (memory_read_result_s): Remove typedef.
2099         (free_memory_read_result_vector): Remove.
2100         (read_memory_robust): Return std::vector.
2101
2102 2017-09-29  Tom Tromey  <tom@tromey.com>
2103
2104         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2105
2106 2017-09-29  Tom Tromey  <tom@tromey.com>
2107
2108         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2109         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2110         operator< and operator==.
2111         (ada_exceptions_list): Return a std::vector.
2112         * ada-lang.c (ada_exc_info::operator<): Rename from
2113         compare_ada_exception_info.
2114         (ada_exc_info::operator==): New.
2115         (sort_remove_dups_ada_exceptions_list): Change type of
2116         "exceptions".
2117         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2118         (ada_add_global_exceptions): Likewise.
2119         (ada_exceptions_list_1): Return a std::vector.
2120         (ada_exceptions_list): Likewise.
2121
2122 2017-09-29  Tom Tromey  <tom@tromey.com>
2123
2124         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2125         'std::set *'.
2126         (print_one_inferior): Update.
2127         (free_vector_of_ints): Remove.
2128         (list_available_thread_groups): Change "ids" to std::set.
2129         (mi_cmd_list_thread_groups): Update.
2130         (struct collect_cores_data) <core>: Now a std::set.
2131         (collect_cores): Update.
2132         (unique): Remove.
2133         (print_one_inferior): Update.
2134
2135 2017-09-29  Tom Tromey  <tom@tromey.com>
2136
2137         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2138         (mi_execute_async_cli_command): Likewise.
2139         (mi_cmd_trace_frame_collected): Use field_fmt.
2140
2141 2017-09-29  Tom Tromey  <tom@tromey.com>
2142
2143         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2144         gdb::byte_vector.
2145
2146 2017-09-29  Tom Tromey  <tom@tromey.com>
2147
2148         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2149
2150 2017-09-29  Tom Tromey  <tom@tromey.com>
2151
2152         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2153
2154 2017-09-29  Tom Tromey  <tom@tromey.com>
2155
2156         * varobj.h (varobj_gen_name): Return std::string.
2157         * varobj.c (varobj_gen_name): Return std::string.
2158         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2159         (mi_cmd_var_delete): Don't copy "name".
2160
2161 2017-09-29  Tom Tromey  <tom@tromey.com>
2162
2163         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2164         (mi_cmd_break_insert_1): Update.
2165
2166 2017-09-29  Tom Tromey  <tom@tromey.com>
2167
2168         * target.h (make_scoped_defer_target_commit_resume): Update.
2169         * target.c (make_scoped_defer_target_commit_resume): Rename from
2170         make_cleanup_defer_target_commit_resume.  Return a
2171         scoped_restore.
2172         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2173
2174 2017-09-29  Tom Tromey  <tom@tromey.com>
2175
2176         * main.c (captured_main_1): Remove unused declaration.
2177         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2178
2179 2017-09-29  Tom Tromey  <tom@tromey.com>
2180
2181         * symtab.c (search_symbols): Remove unused outer cleanup.
2182         (make_source_files_completion_list): Remove unused declaration.
2183
2184 2017-09-29  Tom Tromey  <tom@tromey.com>
2185
2186         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2187
2188 2017-09-29  Tom Tromey  <tom@tromey.com>
2189
2190         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2191         gdb::byte_vector.
2192
2193 2017-09-29  Tom Tromey  <tom@tromey.com>
2194
2195         * complaints.c (vcomplaint): Use std::string.
2196
2197 2017-09-29  Tom Tromey  <tom@tromey.com>
2198
2199         * tracepoint.c (trace_variable_command): Use std::string.
2200         (encode_actions_1): Remove unused declarations.
2201         (create_tsv_from_upload): Use std::string.
2202
2203 2017-09-29  Tom Tromey  <tom@tromey.com>
2204
2205         * cp-support.c (gdb_demangle): Use std::string.
2206
2207 2017-09-29  Tom Tromey  <tom@tromey.com>
2208
2209         * stack.c (parse_frame_specification): Use std::string
2210         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2211
2212 2017-09-29  Tom Tromey  <tom@tromey.com>
2213
2214         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2215
2216 2017-09-29  Tom Tromey  <tom@tromey.com>
2217
2218         * utils.c (vfprintf_maybe_filtered): Use std::string.
2219         (vfprintf_unfiltered): Likewise.
2220
2221 2017-09-29  Tom Tromey  <tom@tromey.com>
2222
2223         * event-top.c (top_level_prompt): Return std::string.
2224         (display_gdb_prompt): Update.
2225
2226 2017-09-29  Tom Tromey  <tom@tromey.com>
2227
2228         * unittests/common-utils-selftests.c (format): New function.
2229         (string_vprintf_tests): New function.
2230         (_initialize_common_utils_selftests): Register new tests.
2231         * common/common-utils.c (string_vprintf): New function.
2232         * common/common-utils.h (string_vprintf): Declare.
2233
2234 2017-09-29  Pedro Alves  <palves@redhat.com>
2235
2236         * common/rsp-low.c (unpack_varlen_hex): Constify.
2237         * common/rsp-low.h (unpack_varlen_hex): Constify.
2238         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2239         Constify.
2240         * remote.c (remote_set_permissions, read_ptid)
2241         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2242         (remote_static_tracepoint_marker_at)
2243         (remote_static_tracepoint_markers_by_strid)
2244         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2245         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2246         (parse_tracepoint_definition, parse_tsv_definition)
2247         (parse_static_tracepoint_marker_definition): Constify.
2248         * tracepoint.h (parse_static_tracepoint_marker_definition)
2249         (parse_trace_status, parse_tracepoint_status)
2250         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2251
2252 2017-09-29  Pedro Alves  <palves@redhat.com>
2253
2254         * remote.c (target_buf, target_buf_size): Delete.
2255         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2256         Use the connection's packet buffer instead.
2257         All callers adjusted.
2258         (_initialize_remote): Remove references to target_buf and
2259         target_buf_size.
2260
2261 2017-09-28  Pedro Alves  <palves@redhat.com>
2262
2263         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2264         unittests/common-utils-selftests.c.
2265         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2266         (COMMON_OBS): Remove utils-selftests.o.
2267         * utils-selftests.c: Move to ...
2268         * unittests/common-utils-selftests.c: ... here and rename self
2269         test to "string_printf".
2270
2271 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2272
2273         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2274         having NULL cus or tus.
2275
2276 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2277
2278         * arm-tdep.c: (convert_from_extended): Remove.
2279         (convert_to_extended): Likewise.
2280         (arm_extract_return_value): Use convert_typed_floating.
2281         (arm_store_return_value): Likewise.
2282
2283         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2284         * sh-tdep.c: Do not include "floatformat.h".
2285         (sh_littlebyte_bigword_type): New function.
2286         (sh_register_convert_to_virtual): Use convert_typed_floating.
2287         (sh_register_convert_to_raw): Likewise.
2288         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2289         (sh64_littlebyte_bigword_type): New function.
2290         (sh64_extract_return_value): Use convert_typed_floating.
2291         (sh64_register_convert_to_virtual): Likewise.
2292         (sh64_register_convert_to_raw): Likewise.
2293
2294 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2295
2296         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2297         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2298
2299         * gdbtypes.h (union type_specific): Make field floatformat hold
2300         just a single struct floatformat, not an array.
2301         (floatformat_from_type): Move here.
2302         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2303         changed TYPE_FLOATFORMAT definition.
2304         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2305         (recursive_dump_type): Likewise.
2306         (init_float_type): Install correct floatformat for byte order.
2307         (arch_float_type): Likewise.
2308
2309 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2310
2311         * gdbtypes.c (init_type): Change incoming argument from
2312         length-in-bytes to length-in-bits.  Assert length is a
2313         multiple of TARGET_CHAR_BITS.
2314         (arch_type, arch_flags_type): Likewise.
2315         (init_integer_type): Update call to init_type.
2316         (init_character_type): Likewise.
2317         (init_boolean_type): Likewise.
2318         (init_float_type): Likewise.
2319         (init_decfloat_type): Likewise.
2320         (init_complex_type): Likewise.
2321         (init_pointer_type): Likewise.
2322         (objfile_type): Likewise.
2323         (arch_integer_type): Update call to arch_type.
2324         (arch_character_type): Likewise.
2325         (arch_boolean_type): Likewise.
2326         (arch_float_type): Likewise.
2327         (arch_decfloat_type): Likewise.
2328         (arch_complex_type): Likewise.
2329         (arch_pointer_type): Likewise.
2330         (gdbtypes_post_init): Likewise.
2331
2332         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2333         (read_base_type): Likewise.
2334         * mdebugread.c (basic_type): Likewise.
2335         * stabsread.c (dbx_init_float_type): Likewise.
2336         (rs6000_builtin_type): Likewise.
2337         (read_range_type): Likewise.  Also, fix call to init_integer_type
2338         with erroneous length argument.
2339
2340         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2341         * d-lang.c (build_d_types): Likewise.
2342         * f-lang.c (build_fortran_types): Likewise.
2343         * go-lang.c (build_go_types): Likewise.
2344         * opencl-lang.c (build_opencl_types): Likewise.
2345         * jit.c (finalize_symtab): Likewise.
2346         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2347         (build_std_type_info_type): Likewise.
2348         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2349         update call to arch_flags_type.
2350
2351         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2352         arch_type.
2353         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2354         * windows-tdep.c (windows_get_tlb_type): Likewise.
2355
2356         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2357         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2358         * m32c-tdep.c (make_types): Likewise.
2359         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2360         (rl78_psw_type): Update call to arch_flags_type.
2361         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2362         * rx-tdep.c (rx_psw_type): Likewise.
2363         (rx_fpsw_type): Likewise.
2364         * sparc-tdep.c (sparc_psr_type): Likewise.
2365         (sparc_fsr_type): Likewise.
2366         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2367         (sparc64_ccr_type): Likewise.
2368         (sparc64_fsr_type): Likewise.
2369         (sparc64_fprs_type): Likewise.
2370
2371 2017-09-27  Tom Tromey  <tom@tromey.com>
2372
2373         * findcmd.c (find_command): Constify.
2374
2375 2017-09-27  Tom Tromey  <tom@tromey.com>
2376
2377         * ada-tasks.c (task_command_1, task_command): Constify.
2378
2379 2017-09-27  Tom Tromey  <tom@tromey.com>
2380
2381         * symtab.c (maintenance_print_symbol_cache)
2382         (maintenance_flush_symbol_cache)
2383         (maintenance_print_symbol_cache_statistics): Constify.
2384
2385 2017-09-27  Tom Tromey  <tom@tromey.com>
2386
2387         * inferior.c (detach_inferior_command, kill_inferior_command)
2388         (inferior_command): Constify.
2389
2390 2017-09-27  Tom Tromey  <tom@tromey.com>
2391
2392         * regcache.c (regcache_print, maintenance_print_registers)
2393         (maintenance_print_raw_registers)
2394         (maintenance_print_cooked_registers)
2395         (maintenance_print_register_groups)
2396         (maintenance_print_remote_registers): Constify.
2397
2398 2017-09-27  Tom Tromey  <tom@tromey.com>
2399
2400         * printcmd.c (map_display_numbers, undisplay_command)
2401         (enable_disable_display_command, enable_display_command)
2402         (disable_display_command): Constify.
2403
2404 2017-09-27  Tom Tromey  <tom@tromey.com>
2405
2406         * breakpoint.h (delete_command): Don't declare.
2407         * breakpoint.c (delete_command, enable_once_command)
2408         (enable_count_command, enable_delete_command, breakpoint_1)
2409         (maintenance_info_breakpoints, stopin_command, stopat_command)
2410         (delete_command, delete_trace_command, save_breakpoints)
2411         (save_breakpoints_command, save_tracepoints_command): Constify.
2412
2413 2017-09-27  Tom Tromey  <tom@tromey.com>
2414
2415         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2416         (skip_ws, extract_identifier, macro_define_command)
2417         (macro_undef_command, macro_list_command): Constify.
2418
2419 2017-09-27  Tom Tromey  <tom@tromey.com>
2420
2421         * infcmd.c (environment_info, set_environment_command)
2422         (unset_environment_command, path_info, info_proc_cmd_1)
2423         (info_proc_cmd_mappings, info_proc_cmd_stat)
2424         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2425         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2426
2427 2017-09-27  Tom Tromey  <tom@tromey.com>
2428
2429         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2430         Constify.
2431
2432 2017-09-27  Tom Tromey  <tom@tromey.com>
2433
2434         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2435
2436 2017-09-27  Tom Tromey  <tom@tromey.com>
2437
2438         * demangle.c (demangle_command): Constify.
2439
2440 2017-09-27  Tom Tromey  <tom@tromey.com>
2441
2442         * progspace.c (maintenance_info_program_spaces_command):
2443         Constify.
2444
2445 2017-09-27  Tom Tromey  <tom@tromey.com>
2446
2447         * compile/compile.c (check_raw_argument, compile_file_command)
2448         (compile_code_command, compile_print_command): Constify.
2449
2450 2017-09-27  Tom Tromey  <tom@tromey.com>
2451
2452         * reggroups.c (maintenance_print_reggroups): Constify.
2453
2454 2017-09-27  Tom Tromey  <tom@tromey.com>
2455
2456         * dwarf2read.c (save_gdb_index_command): Constify.
2457
2458 2017-09-27  Tom Tromey  <tom@tromey.com>
2459
2460         * stap-probe.c (info_probes_stap_command): Constify.
2461
2462 2017-09-27  Tom Tromey  <tom@tromey.com>
2463
2464         * fork-child.c (unset_exec_wrapper_command): Constify.
2465
2466 2017-09-27  Tom Tromey  <tom@tromey.com>
2467
2468         * btrace.c (get_uint, get_context_size, no_chunk)
2469         (maint_btrace_packet_history_cmd)
2470         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2471         (maint_info_btrace_cmd): Constify.
2472
2473 2017-09-27  Tom Tromey  <tom@tromey.com>
2474
2475         * reverse.c (delete_bookmark_command): Constify.
2476
2477 2017-09-27  Tom Tromey  <tom@tromey.com>
2478
2479         * remote.c (set_memory_packet_size)
2480         (set_memory_write_packet_size, show_memory_write_packet_size)
2481         (set_memory_read_packet_size, show_memory_read_packet_size)
2482         (compare_sections_command, packet_command, remote_put_command)
2483         (remote_get_command, remote_delete_command): Constify.
2484
2485 2017-09-27  Tom Tromey  <tom@tromey.com>
2486
2487         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2488         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2489         (set_mipsfpu_auto_command): Constify.
2490
2491 2017-09-27  Tom Tromey  <tom@tromey.com>
2492
2493         * cli/cli-cmds.h (cd_command): Constify.
2494         * cli/cli-cmds.c (cd_command): Constify.
2495
2496 2017-09-27  Tom Tromey  <tom@tromey.com>
2497
2498         * thread.c (thread_name_command, thread_find_command): Constify.
2499
2500 2017-09-27  Tom Tromey  <tom@tromey.com>
2501
2502         * probe.c (enable_probes_command, disable_probes_command):
2503         Constify.
2504
2505 2017-09-27  Tom Tromey  <tom@tromey.com>
2506
2507         * symfile.c (symbol_file_command): Constify.
2508         * gdbcore.h (deprecated_file_changed_hook): Constify.
2509         * exec.c (deprecated_file_changed_hook, exec_file_command)
2510         (file_command): Constify.
2511         * defs.h (symbol_file_command): Constify.
2512
2513 2017-09-27  Tom Tromey  <tom@tromey.com>
2514
2515         * remote-fileio.c (set_system_call_allowed)
2516         (show_system_call_allowed): Constify.
2517
2518 2017-09-27  Tom Tromey  <tom@tromey.com>
2519
2520         * tracepoint.c (delete_trace_variable_command)
2521         (tfind_end_command, tfind_start_command, tfind_pc_command)
2522         (tfind_tracepoint_command, tfind_line_command)
2523         (tfind_range_command, tfind_outside_command): Constify.
2524
2525 2017-09-27  Tom Tromey  <tom@tromey.com>
2526
2527         * ax-gdb.c (maint_agent_printf_command, agent_command)
2528         (agent_eval_command): Constify.
2529
2530 2017-09-27  Tom Tromey  <tom@tromey.com>
2531
2532         * tracepoint.c (info_scope_command): Constify.
2533         * python/python.c (gdbpy_decode_line): Constify.
2534         * python/py-breakpoint.c (bppy_init): Constify.
2535         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2536         * location.h: (new_linespec_location)
2537         (string_to_event_location_basic, string_to_event_location):
2538         Constify.
2539         * location.c (new_linespec_location)
2540         (string_to_event_location_basic, string_to_event_location):
2541         Constify.
2542         * linespec.h (decode_line_with_current_source)
2543         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2544         * linespec.c (linespec_lex_to_end)
2545         (decode_line_with_current_source)
2546         (decode_line_with_last_displayed): Constify.
2547         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2548         Constify.
2549         * cli/cli-cmds.c (edit_command, list_command): Constify.
2550         * breakpoint.h (until_break_command, watch_command_wrapper)
2551         (awatch_command_wrapper, rwatch_command_wrapper)
2552         (init_ada_exception_breakpoint): Constify.
2553         * breakpoint.c (break_command_1, dprintf_command)
2554         (break_range_command, watch_command_wrapper)
2555         (rwatch_command_wrapper, awatch_command_wrapper)
2556         (until_break_command, init_ada_exception_breakpoint)
2557         (strace_marker_create_sals_from_location, trace_command)
2558         (ftrace_command, strace_command, struct tracepoint): Constify.
2559         * ax-gdb.c (agent_command_1): Constify.
2560         * ada-lang.c (ada_exception_sal): Constify.
2561
2562 2017-09-27  Tom Tromey  <tom@tromey.com>
2563
2564         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2565         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2566         (get_context_size, no_chunk, get_insn_history_modifiers)
2567         (cmd_record_insn_history, get_call_history_modifiers)
2568         (cmd_record_call_history): Constify.
2569
2570 2017-09-27  Tom Tromey  <tom@tromey.com>
2571
2572         * source.c (show_substitute_path_command)
2573         (unset_substitute_path_command, set_substitute_path_command):
2574         Constify.
2575
2576 2017-09-27  Tom Tromey  <tom@tromey.com>
2577
2578         * typeprint.c (maintenance_print_type): Constify.
2579         * maint.c (maintenance_dump_me, maintenance_demangle)
2580         (maintenance_time_display, maintenance_info_sections)
2581         (maintenance_print_statistics, maintenance_deprecate)
2582         (maintenance_undeprecate): Constify.
2583         (maintenance_do_deprecate): Constify.  Use std::string.
2584         (maintenance_selftest): Constify.
2585         * gdbtypes.h (maintenance_print_type): Constify.
2586
2587 2017-09-27  Tom Tromey  <tom@tromey.com>
2588
2589         * hppa-tdep.c (unwind_command): Constify.
2590
2591 2017-09-27  Tom Tromey  <tom@tromey.com>
2592
2593         * target-descriptions.c (unset_tdesc_filename_cmd)
2594         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2595         Constify.
2596
2597 2017-09-27  Tom Tromey  <tom@tromey.com>
2598
2599         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2600
2601 2017-09-27  Tom Tromey  <tom@tromey.com>
2602
2603         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2604
2605 2017-09-27  Tom Tromey  <tom@tromey.com>
2606
2607         * tui/tui-regs.c (tui_reg_command): Constify.
2608
2609 2017-09-27  Tom Tromey  <tom@tromey.com>
2610
2611         * skip.c (skip_file_command, skip_function_command)
2612         (skip_enable_command, skip_disable_command, skip_delete_command):
2613         Constify.
2614
2615 2017-09-27  Tom Tromey  <tom@tromey.com>
2616
2617         * record-btrace.c (cmd_record_btrace_bts_start)
2618         (cmd_record_btrace_pt_start): Constify.
2619
2620 2017-09-27  Tom Tromey  <tom@tromey.com>
2621
2622         * symmisc.c (maintenance_print_symbols)
2623         (maintenance_print_msymbols, maintenance_print_objfiles)
2624         (maintenance_info_symtabs, maintenance_check_symtabs)
2625         (maintenance_expand_symtabs, maintenance_info_line_tables):
2626         Constify.
2627
2628 2017-09-27  Tom Tromey  <tom@tromey.com>
2629
2630         * top.c (new_ui_command): Constify.
2631
2632 2017-09-27  Tom Tromey  <tom@tromey.com>
2633
2634         * symfile.c (add_symbol_file_command)
2635         (remove_symbol_file_command, list_overlays_command)
2636         (map_overlay_command, unmap_overlay_command)
2637         (overlay_auto_command, overlay_manual_command)
2638         (overlay_off_command, overlay_load_command): Constify.
2639
2640 2017-09-27  Tom Tromey  <tom@tromey.com>
2641
2642         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2643         (info_spu_mailbox_command, info_spu_dma_command)
2644         (info_spu_proxydma_command): Constify.
2645
2646 2017-09-27  Tom Tromey  <tom@tromey.com>
2647
2648         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2649
2650 2017-09-27  Tom Tromey  <tom@tromey.com>
2651
2652         * cli/cli-script.c (user_defined_command): Constify.
2653
2654 2017-09-27  Tom Tromey  <tom@tromey.com>
2655
2656         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2657         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2658         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2659         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2660         (dump_binary_value, append_binary_memory, append_binary_value):
2661         Constify.
2662         (struct dump_context) <func>: Constify.
2663         (add_dump_command): Update.
2664
2665 2017-09-27  Tom Tromey  <tom@tromey.com>
2666
2667         * cli/cli-cmds.c (show_version, show_configuration)
2668         (source_command, show_user): Constify.
2669
2670 2017-09-27  Tom Tromey  <tom@tromey.com>
2671
2672         * target.c (maintenance_print_target_stack): Constify.
2673
2674 2017-09-27  Tom Tromey  <tom@tromey.com>
2675
2676         * interps.c (interpreter_exec_cmd): Constify.
2677
2678 2017-09-27  Tom Tromey  <tom@tromey.com>
2679
2680         * record-full.c (cmd_record_full_restore): Constify.
2681
2682 2017-09-27  Tom Tromey  <tom@tromey.com>
2683
2684         * memattr.c (enable_mem_command, disable_mem_command)
2685         (delete_mem_command): Constify.
2686
2687 2017-09-27  Tom Tromey  <tom@tromey.com>
2688
2689         * value.c (show_convenience): Constify.
2690
2691 2017-09-27  Tom Tromey  <tom@tromey.com>
2692
2693         * gdbcore.h (core_file_command): Update.
2694         * corefile.c (core_file_command): Constify.
2695
2696 2017-09-27  Tom Tromey  <tom@tromey.com>
2697
2698         * user-regs.c (maintenance_print_user_registers): Constify.
2699
2700 2017-09-27  Tom Tromey  <tom@tromey.com>
2701
2702         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2703
2704 2017-09-27  Tom Tromey  <tom@tromey.com>
2705
2706         * cp-support.c (first_component_command): Constify.
2707
2708 2017-09-27  Tom Tromey  <tom@tromey.com>
2709
2710         * psymtab.c (maintenance_print_psymbols)
2711         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2712         Constify.
2713
2714 2017-09-27  Tom Tromey  <tom@tromey.com>
2715
2716         * windows-tdep.c (display_tib): Constify.
2717
2718 2017-09-27  Tom Tromey  <tom@tromey.com>
2719
2720         * linux-fork.c (delete_checkpoint_command)
2721         (detach_checkpoint_command): Constify.
2722
2723 2017-09-27  Tom Tromey  <tom@tromey.com>
2724
2725         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2726
2727 2017-09-27  Tom Tromey  <tom@tromey.com>
2728
2729         * arc-tdep.c (dump_arc_instruction_command): Constify.
2730
2731 2017-09-27  Tom Tromey  <tom@tromey.com>
2732
2733         * valprint.c (set_radix, show_radix): Constify.
2734
2735 2017-09-27  Tom Tromey  <tom@tromey.com>
2736
2737         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2738
2739 2017-09-27  Tom Tromey  <tom@tromey.com>
2740
2741         * command.h (not_just_help_class_command): Update.
2742         * cli/cli-decode.h (not_just_help_class_command): Update.
2743         * cli/cli-decode.c (not_just_help_class_command): Constify.
2744
2745 2017-09-27  Tom Tromey  <tom@tromey.com>
2746
2747         * gdb_bfd.c (maintenance_info_bfds): Constify.
2748
2749 2017-09-27  Tom Tromey  <tom@tromey.com>
2750
2751         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2752         overloads.
2753         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2754         (do_const_cfunc): New function.
2755         (cmd_cfunc_eq): New overload.
2756         (cli_user_command_p): Check do_const_cfunc.
2757         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2758         const_cfunc.
2759         * command.h (add_cmd): Add const overload and no-function
2760         overload.
2761         (set_cmd_cfunc): Add const overload.
2762         (cmd_const_cfunc_ftype): Declare.
2763         (cmd_cfunc_eq): Add const overload.
2764         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2765         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2766         overload.
2767
2768 2017-09-27  Tom Tromey  <tom@tromey.com>
2769
2770         * macroexp.c (get_next_token_for_substitution): New function.
2771         (substitute_args): Call it.  Check for __VA_OPT__.
2772
2773 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2774             Pedro Alves <palves@redhat.com>
2775
2776         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2777         producer_is_icc_lt_14.
2778         (producer_is_icc_lt_14): New function.
2779         (check_producer): Add code for checking version of ICC.
2780         (producer_is_icc): Move to producer.c.
2781         (read_structure_type): Restrict ICC workaround to ICC<14.
2782         * producer.c: Include selftest.h.
2783         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2784         New functions.
2785         * producer.h (producer_is_icc): New declaration.
2786
2787 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2788
2789         * Makefile.in (SFILES): Add producer.c.
2790         (COMMON_OBS): Add producer.o
2791         * amd64-tdep.c (producer.h): Add new include.
2792         * dwarf2read.c (producer.h): Add new include.
2793         * producer.c: New file.
2794         * producer.h: New file.
2795         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2796         producer.c.
2797         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2798         producer.h.
2799
2800 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2801
2802         * configure.ac: Search ncursesw before ncurses.
2803         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2804         * gdb_curses.h: Include <ncursesw/ncurses.h>
2805         * config.in, configure: Regenerate.
2806
2807 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2808
2809         PR gdb/22185
2810         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2811         obsolete.
2812         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2813         Remove i386sol2 support.
2814         * configure.nat <i386sol2>: Remove.
2815         <sol2-64>: Fold into ...
2816         <sol2>: ... this.
2817         Move common settings to default section.
2818         Add sol-thread.o.
2819         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2820         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2821         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2822         <i[34567]86-*-solaris*>: Remove.
2823         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2824
2825         * configure.ac: Remove wctype in libw check.
2826         (_MSE_INT_H): Don't define on Solaris 7-9.
2827         <solaris*>: Remove libthread_db.so.1 check.
2828         * configure: Regenerate.
2829         * config.in: Regenerate.
2830
2831         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2832         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2833         (gdb_ps_size_t): Remove.
2834         Use base types in users.
2835         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2836
2837         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2838
2839 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2840
2841         PR build/22206
2842         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2843         (adi_is_addr_mapped): Likewise.
2844         (PSR_ICC): Don't redefine.
2845         (PSR_IMPL): Likewise.
2846
2847 2017-09-25  Tom Tromey  <tom@tromey.com>
2848
2849         * regcache.c (regcache::dump): Use string_printf.
2850
2851 2017-09-25  Tom Tromey  <tom@tromey.com>
2852
2853         * regcache.c (class regcache_invalidator): New.
2854         (struct register_to_invalidate): Remove.
2855         (make_cleanup_regcache_invalidate): Remove.
2856         (regcache::raw_write): Use regcache_invalidator.
2857
2858 2017-09-25  Tom Tromey  <tom@tromey.com>
2859
2860         * spu-tdep.c (spu2ppu_sniffer): Update.
2861         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2862         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2863         Remove.
2864         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2865         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2866         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2867         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2868         (frame_pop): Update.
2869
2870 2017-09-25  Tom Tromey  <tom@tromey.com>
2871
2872         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2873         * regcache.h (regcache_xfree): Don't declare.
2874         * regcache.c (regcache_xfree): Remove.
2875         (do_regcache_xfree): Use delete.
2876         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2877         * linux-fork.c (free_fork): Use delete.
2878         (fork_save_infrun_state): Likewise.
2879         * jit.c (jit_dealloc_cache): Use delete.
2880         * infrun.c (discard_infcall_suspend_state): Use delete.
2881
2882 2017-09-25  Tom Tromey  <tom@tromey.com>
2883
2884         * regcache.h (regcache_xmalloc): Don't declare.
2885         (regcache_raw_set_cached_value): Update comment.
2886         * regcache.c (regcache_xmalloc): Remove.
2887         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2888         * jit.c (jit_frame_sniffer): Use new.
2889         * frame.c (frame_save_as_regcache): Use new.
2890
2891 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2892
2893         * NEWS: Advertise support for guarded-storage registers on IBM z.
2894
2895 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2896
2897         * s390-linux-nat.c (have_regset_gs): New static variable.
2898         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2899         control block and guarded-storage broadcast control regsets.
2900         (s390_read_description): Detect whether the target has
2901         guarded-storage support, return appropriate tdesc.
2902         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2903         (features/s390x-gs-linux64.c): Likewise.
2904         (struct gdbarch_tdep) <have_gs>: New field.
2905         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2906         (s390_gsbc_regset): New variables.
2907         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2908         and s390_gsbc_regset, if applicable.
2909         (s390_core_read_description): Check whether core file was from a
2910         target with guarded-storage support; include appropriate regsets.
2911         (s390_gdbarch_init): Add registers for guarded-storage support.
2912         (_initialize_s390_tdep): Initialize new target descriptions that
2913         include registers for guarded-storage support.
2914         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2915         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2916         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2917         (S390_NUM_REGS): Adjust macro definition.
2918         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2919         (tdesc_s390x_gs_linux64): New declarations.
2920
2921 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2922
2923         * features/s390-gs-linux64.xml: New file.
2924         * features/s390-gs.xml: New file.
2925         * features/s390-gsbc.xml: New file.
2926         * features/s390x-gs-linux64.xml: New file.
2927         * features/Makefile (WHICH): Add s390-gs-linux64 and
2928         s390x-gs-linux64.
2929         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2930         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2931         * features/s390-gs-linux64.c: New generated file.
2932         * features/s390x-gs-linux64.c: New file.
2933         * regformats/s390-gs-linux64.dat: New file.
2934         * regformats/s390x-gs-linux64.dat: New file.
2935
2936 2017-09-23  Tom Tromey  <tom@tromey.com>
2937
2938         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2939
2940 2017-09-22  Tom Tromey  <tom@tromey.com>
2941
2942         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2943         type to scoped_restore_tmpl.
2944         <scoped_input_handler>: Initialize m_quit_handler directly.
2945
2946 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2947
2948         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2949         (cd_command): Likewise.  Free "current_directory" before
2950         assigning to it.
2951         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2952         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2953         * top.c (gdb_dirbuf): Remove global declaration.
2954         * top.h (gdb_dirbuf): Likewise.
2955
2956 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2957
2958         * gnulib/aclocal.m4: Regenerate.
2959         * gnulib/config.in: Regenerate.
2960         * gnulib/configure: Regenerate.
2961         * gnulib/import/Makefile.am: Regenerate.
2962         * gnulib/import/Makefile.in: Regenerate.
2963         * gnulib/import/assure.h: New file.
2964         * gnulib/import/at-func.c: Likewise
2965         * gnulib/import/chdir-long.c: New file.
2966         * gnulib/import/chdir-long.h: New file.
2967         * gnulib/import/cloexec.c: New file.
2968         * gnulib/import/cloexec.h: New file.
2969         * gnulib/import/close.c: New file.
2970         * gnulib/import/closedir.c: New file.
2971         * gnulib/import/dirent-private.h: New file.
2972         * gnulib/import/dup-safer.c: New file.
2973         * gnulib/import/dup.c: New file.
2974         * gnulib/import/dup2.c: New file.
2975         * gnulib/import/error.c: New file.
2976         * gnulib/import/error.h: New file.
2977         * gnulib/import/exitfail.c: New file.
2978         * gnulib/import/exitfail.h: New file.
2979         * gnulib/import/fchdir.c: New file.
2980         * gnulib/import/fcntl.c: New file.
2981         * gnulib/import/fcntl.in.h: New file.
2982         * gnulib/import/fd-hook.c: New file.
2983         * gnulib/import/fd-hook.h: New file.
2984         * gnulib/import/fd-safer.c: New file.
2985         * gnulib/import/fdopendir.c: New file.
2986         * gnulib/import/filename.h: New file.
2987         * gnulib/import/filenamecat-lgpl.c: New file.
2988         * gnulib/import/filenamecat.h: New file.
2989         * gnulib/import/fstat.c: New file.
2990         * gnulib/import/fstatat.c: New file.
2991         * gnulib/import/getcwd-lgpl.c: New file.
2992         * gnulib/import/getcwd.c: New file.
2993         * gnulib/import/getdtablesize.c: New file.
2994         * gnulib/import/getlogin_r.c: New file.
2995         * gnulib/import/getprogname.c: New file.
2996         * gnulib/import/getprogname.h: New file.
2997         * gnulib/import/gettext.h: New file.
2998         * gnulib/import/glob-libc.h: New file.
2999         * gnulib/import/glob.c: New file.
3000         * gnulib/import/glob.in.h: New file.
3001         * gnulib/import/intprops.h: New file.
3002         * gnulib/import/m4/chdir-long.m4: New file.
3003         * gnulib/import/m4/close.m4: New file.
3004         * gnulib/import/m4/closedir.m4: New file.
3005         * gnulib/import/m4/d-ino.m4: New file.
3006         * gnulib/import/m4/d-type.m4: New file.
3007         * gnulib/import/m4/dup.m4: New file.
3008         * gnulib/import/m4/dup2.m4: New file.
3009         * gnulib/import/m4/error.m4: New file.
3010         * gnulib/import/m4/fchdir.m4: New file.
3011         * gnulib/import/m4/fcntl.m4: New file.
3012         * gnulib/import/m4/fcntl_h.m4: New file.
3013         * gnulib/import/m4/fdopendir.m4: New file.
3014         * gnulib/import/m4/filenamecat.m4: New file.
3015         * gnulib/import/m4/fstat.m4: New file.
3016         * gnulib/import/m4/fstatat.m4: New file.
3017         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3018         * gnulib/import/m4/getcwd-path-max.m4: New file.
3019         * gnulib/import/m4/getcwd.m4: New file.
3020         * gnulib/import/m4/getdtablesize.m4: New file.
3021         * gnulib/import/m4/getlogin_r.m4: New file.
3022         * gnulib/import/m4/getprogname.m4: New file.
3023         * gnulib/import/m4/glob.m4: New file.
3024         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3025         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3026         * gnulib/import/m4/mempcpy.m4: New file.
3027         * gnulib/import/m4/memrchr.m4: New file.
3028         * gnulib/import/m4/mode_t.m4: New file.
3029         * gnulib/import/m4/msvc-inval.m4: New file.
3030         * gnulib/import/m4/msvc-nothrow.m4: New file.
3031         * gnulib/import/m4/open.m4: New file.
3032         * gnulib/import/m4/openat.m4: New file.
3033         * gnulib/import/m4/opendir.m4: New file.
3034         * gnulib/import/m4/readdir.m4: New file.
3035         * gnulib/import/m4/realloc.m4: New file.
3036         * gnulib/import/m4/rewinddir.m4: New file.
3037         * gnulib/import/m4/save-cwd.m4: New file.
3038         * gnulib/import/m4/strdup.m4: New file.
3039         * gnulib/import/m4/strerror.m4: New file.
3040         * gnulib/import/m4/unistd-safer.m4: New file.
3041         * gnulib/import/mempcpy.c: New file.
3042         * gnulib/import/memrchr.c: New file.
3043         * gnulib/import/msvc-inval.c: New file.
3044         * gnulib/import/msvc-inval.h: New file.
3045         * gnulib/import/msvc-nothrow.c: New file.
3046         * gnulib/import/msvc-nothrow.h: New file.
3047         * gnulib/import/open.c: New file.
3048         * gnulib/import/openat-die.c: New file.
3049         * gnulib/import/openat-priv.h: New file.
3050         * gnulib/import/openat-proc.c: New file.
3051         * gnulib/import/openat.c: New file.
3052         * gnulib/import/openat.h: New file.
3053         * gnulib/import/opendir.c: New file.
3054         * gnulib/import/pipe-safer.c: New file.
3055         * gnulib/import/readdir.c: New file.
3056         * gnulib/import/realloc.c: New file.
3057         * gnulib/import/rewinddir.c: New file.
3058         * gnulib/import/save-cwd.c: New file.
3059         * gnulib/import/save-cwd.h: New file.
3060         * gnulib/import/strdup.c: New file.
3061         * gnulib/import/strerror-override.c: New file.
3062         * gnulib/import/strerror-override.h: New file.
3063         * gnulib/import/strerror.c: New file.
3064         * gnulib/import/unistd--.h: New file.
3065         * gnulib/import/unistd-safer.h: New file.
3066         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3067         "getcwd" and "glob".
3068         * ser-tcp.c: Undefine "close" before redefining it.
3069
3070 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3071
3072         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3073         get rid of res_val.
3074
3075 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3076
3077         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3078         <sol2,sparc>: Likewise.
3079         <sol2-64,i386>: Likewise.
3080
3081         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3082         -Wdeprecated-declarations on *-*-solaris*.
3083         * configure: Regenerate.
3084
3085         * procfs.c: Include "nat/inferior.h".
3086         (procfs_info_proc): Fix typo.
3087
3088 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3089
3090         * remote.c (vector): Include.
3091         (struct private_thread_info): Add field, thread_handle.
3092         (free_private_thread_info): Deallocate storage associated with
3093         thread handle.
3094         (get_private_info_thread): Initialize `thread_handle' field.
3095         (struct thread_item): Add field, thread_handle.
3096         (clear_threads_listing_context): Deallocate storage associated
3097         with thread handle.
3098         (start_thread): Add support for "handle" attribute.
3099         (thread_attributes): Add "handle".
3100         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3101         field.
3102         (remote_update_thread_list): Update thread_handle.
3103         (remote_thread_handle_to_thread_info): New function.
3104         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3105
3106 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3107
3108         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3109         function.
3110         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3111         * python/python-internal.h (thread_object_type): Declare.
3112
3113 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3114
3115         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3116         (target_thread_handle_to_thread_info): Declare.
3117         * target.c (target_thread_handle_to_thread_info): New function.
3118         * target-delegates.c: Regenerate.
3119         * gdbthread.h (find_thread_by_handle): Declare.
3120         * thread.c (find_thread_by_handle): New function.
3121         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3122         function.
3123         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3124
3125 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3126
3127         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3128
3129 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3130
3131         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3132
3133 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3134
3135         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3136         to gdb_target_obs.
3137
3138 2017-09-20  Tom Tromey  <tom@tromey.com>
3139
3140         * breakpoint.c (struct counted_command_line): Remove.
3141         (breakpoint_commands): Update.
3142         (alloc_counted_command_line, incref_counted_command_line)
3143         (decref_counted_command_line, do_cleanup_counted_command_line)
3144         (make_cleanup_decref_counted_command_line): Remove.
3145         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3146         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3147         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3148         (save_breakpoints): Update.
3149         * breakpoint.h (counted_command_line): Now a typedef to
3150         shared_ptr.
3151         (struct breakpoint) <commands>: Now a counted_command_line.
3152         (struct bpstats) <command>: Likewise.
3153
3154 2017-09-20  Tom Tromey  <tom@tromey.com>
3155
3156         * breakpoint.c (struct commands_info, do_map_commands_command):
3157         Remove.
3158         (commands_command_1): Update.
3159         (iterate_over_related_breakpoints): Take a function_view.
3160         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3161         (delete_command): Update.
3162         (map_breakpoint_numbers): Take a function_view.
3163         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3164         (disable_command): Update.
3165         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3166         (enable_command): Update.
3167         (struct disp_data, do_enable_breakpoint_disp)
3168         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3169         (do_map_enable_delete_breakpoint): Remove.
3170         (enable_once_command, enable_count_command, enable_delete_command)
3171         (delete_trace_variable_command): Update.
3172
3173 2017-09-20  Tom Tromey  <tom@tromey.com>
3174
3175         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3176         (bpstat_clear): Use delete.
3177         (bpstats): New constructors.
3178         (bpstat_copy, bpstat_stop_status): Use new.
3179         (dprintf_after_condition_true): Update.
3180         * breakpoint.h (bpstats::bpstats): Add constructors.
3181         (bpstats::~bpstats): Add destructor.
3182
3183 2017-09-20  Pedro Alves  <palves@redhat.com>
3184
3185         * eval.c (make_params): Delete, refactored as ...
3186         (class fake_method): ... this new type's ctor.
3187         (fake_method::~fake_method): New.
3188         (evaluate_subexp_standard): Use 'fake_method'.
3189
3190 2017-09-20  Tom Tromey  <tom@tromey.com>
3191
3192         * windows-nat.c (get_windows_debug_event, windows_wait)
3193         (do_initial_windows_stuff, windows_attach): Update.
3194         * utils.c (vwarning, internal_vproblem): Update.
3195         (ui_unregister_input_event_handler_cleanup)
3196         (prepare_to_handle_input): Remove.
3197         (class scoped_input_handler): New.
3198         (defaulted_query, prompt_for_continue): Update.
3199         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3200         Update.
3201         * top.c (undo_terminal_modifications_before_exit): Update.
3202         * target/target.h (target_terminal_init, target_terminal_inferior)
3203         (target_terminal_ours): Don't declare.
3204         (class target_terminal): New.
3205         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3206         (target_terminal_ours_for_output)
3207         (make_cleanup_restore_target_terminal): Don't declare.
3208         (target_terminal_info): Remove.
3209         * target.c (enum terminal_state, terminal_state): Remove.
3210         (target_terminal::terminal_state): Define.
3211         (target_terminal::init): Rename from target_terminal_init.
3212         (target_terminal::inferior): Rename from
3213         target_terminal_inferior.
3214         (target_terminal::ours): Rename from target_terminal_ours.
3215         (target_terminal::ours_for_output): Rename from
3216         target_terminal_ours_for_output.
3217         (target_terminal::info): New method.
3218         (cleanup_restore_target_terminal)
3219         (make_cleanup_restore_target_terminal): Remove.
3220         * solib.c (handle_solib_event): Update.
3221         * remote.c (remote_serial_quit_handler): Update.
3222         (remote_terminal_inferior, remote_wait_as): Update.
3223         * record-full.c (record_full_wait_1): Update.
3224         * nto-procfs.c (procfs_create_inferior): Update.
3225         * nat/fork-inferior.c (startup_inferior): Update.
3226         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3227         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3228         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3229         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3230         (mi_breakpoint_created, mi_breakpoint_deleted)
3231         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3232         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3233         (mi_user_selected_context_changed, report_initial_inferior):
3234         Update.
3235         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3236         (linux_nat_terminal_inferior): Update.
3237         * infrun.c (follow_fork_inferior)
3238         (handle_vfork_child_exec_or_exit, do_target_resume)
3239         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3240         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3241         Update.
3242         * inflow.c (child_terminal_init, info_terminal_command): Update.
3243         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3244         (attach_command): Update.
3245         * infcall.c (call_thread_fsm_should_stop): Update.
3246         * gnu-nat.c (gnu_attach): Update.
3247         * extension.c (struct active_ext_lang_state)
3248         (restore_active_ext_lang): Update.
3249         * exceptions.c (print_flush): Update.
3250         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3251         (struct quit_handler_cleanup_data, restore_quit_handler)
3252         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3253         Remove.
3254         * cp-support.c (gdb_demangle): Update.
3255         * breakpoint.c (update_inserted_breakpoint_locations)
3256         (insert_breakpoint_locations, handle_jit_event)
3257         (disable_breakpoints_in_unloaded_shlib): Update.
3258         * annotate.c (annotate_breakpoints_invalid)
3259         (annotate_frames_invalid): Update.
3260
3261 2017-09-20  Tom Tromey  <tom@tromey.com>
3262
3263         * main.c (catch_command_errors): Rename from
3264         catch_command_errors_const.
3265         (captured_main_1): Update.
3266
3267 2017-09-20  Pedro Alves  <palves@redhat.com>
3268
3269         * cli/cli-cmds.c (list_command): Use print_sal_location.
3270         (print_sal_location): New function.
3271         (ambiguous_line_spec): Use print_sal_location.
3272         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3273         * symtab.c (find_function_start_sal): Likewise.
3274         * symtab.h (symtab_and_line::symbol): New field.
3275
3276 2017-09-20  Pedro Alves  <palves@redhat.com>
3277
3278         * linespec.c (minsym_found): Handle non-text minsyms.
3279         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3280
3281 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3282
3283         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3284         backslash.
3285
3286 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3287
3288         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3289         vmovups instead vmovaps.
3290         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3291
3292 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3293
3294         * NEWS (Changes since GDB 8.0): Add starti.
3295         * infcmd.c (enum run_break): New.
3296         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3297         case.
3298         (run_command): Use enum run_how.
3299         (start_command): Likewise.
3300         (starti_command): New function.
3301         (RUN_ARGS_HELP): New macro.
3302         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3303         commands.  Add starti command.
3304
3305 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3306
3307         * Makefile.in (monitor.o): Remove the rule.
3308
3309 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3310
3311         * annotate.h (struct annotate_arg_emitter): Use
3312         DISABLE_COPY_AND_ASSIGN.
3313         * common/refcounted-object.h (refcounted_object): Likewise.
3314         * completer.h (struct completion_result): Likewise.
3315         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3316         * filename-seen-cache.h (filename_seen_cache): Likewise.
3317         * gdbcore.h (thread_section_name): Likewise.
3318         * gdb_regex.h (compiled_regex): Likewise.
3319         * gdbthread.h (scoped_restore_current_thread): Likewise.
3320         * inferior.h (scoped_restore_current_inferior): Likewise.
3321         * jit.c (jit_reader): Likewise.
3322         * linespec.h (struct linespec_result): Likewise.
3323         * mi/mi-parse.h (struct mi_parse): Likewise.
3324         * nat/fork-inferior.c (execv_argv): Likewise.
3325         * progspace.h (scoped_restore_current_program_space): Likewise.
3326         * python/python-internal.h (class gdbpy_enter): Likewise.
3327         * regcache.h (regcache): Likewise.
3328         * target-descriptions.c (struct tdesc_reg): Likewise.
3329         (struct tdesc_type): Likewise.
3330         (struct tdesc_feature): Likewise.
3331         * ui-out.h (ui_out_emit_type): Likewise.
3332
3333 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3334
3335         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3336         label abort_expression.
3337
3338 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3339
3340         * common/buffer.c (buffer_xml_printf): Adjust.
3341         * common/xml-utils.c (xml_escape_text): Change return type to
3342         std::string, update code accordingly.
3343         * common/xml-utils.h (xml_escape_text): Change return type to
3344         std::string.
3345         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3346         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3347         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3348         Adjust.
3349
3350 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3351
3352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3353         (SUBDIR_UNITTESTS_OBS): Add new object file.
3354         * unittests/xml-utils-selftests.c: New file.
3355
3356 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3357
3358         * common/selftest.h (selftest): New struct/interface.
3359         (register_test): Add name parameter, add new overload.
3360         (run_tests): Add filter parameter.
3361         (for_each_selftest_ftype): New typedef.
3362         (for_each_selftest): New declaration.
3363         * common/selftest.c (tests): Change type to
3364         map<string, unique_ptr<selftest>>.
3365         (simple_selftest): New struct.
3366         (register_test): New function.
3367         (register_test): Add name parameter and use it.
3368         (run_tests): Add filter parameter and use it.  Add prints.
3369         Adjust to vector -> map change.
3370         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3371         registering selftests.
3372         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3373         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3374         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3375         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3376         * findvar.c (_initialize_findvar): Likewise.
3377         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3378         * maint.c (maintenance_selftest): Update call to run_tests.
3379         (maintenance_info_selftests): New function.
3380         (_initialize_maint_cmds): Register "maintenance info selftests"
3381         command.  Update "maintenance selftest" doc.
3382         * regcache.c (_initialize_regcache): Add names when registering
3383         selftests.
3384         * rust-exp.y (_initialize_rust_exp): Likewise.
3385         * selftest-arch.c (gdbarch_selftest): New struct.
3386         (gdbarch_tests): Remove.
3387         (register_test_foreach_arch): Add name parameter.  Call
3388         register_test.
3389         (tests_with_arch): Remove, move most content to
3390         gdbarch_selftest::operator().
3391         (_initialize_selftests_foreach_arch): Remove.
3392         * selftest-arch.h (register_test_foreach_arch): Add name
3393         parameter.
3394         (run_tests_with_arch): New declaration.
3395         * utils-selftests.c (_initialize_utils_selftests): Add names
3396         when registering selftests.
3397         * utils.c (_initialize_utils): Likewise.
3398         * unittests/array-view-selftests.c
3399         (_initialize_array_view_selftests): Likewise.
3400         * unittests/environ-selftests.c (_initialize_environ_selftests):
3401         Likewise.
3402         * unittests/function-view-selftests.c
3403         (_initialize_function_view_selftests): Likewise.
3404         * unittests/offset-type-selftests.c
3405         (_initialize_offset_type_selftests): Likewise.
3406         * unittests/optional-selftests.c
3407         (_initialize_optional_selftests): Likewise.
3408         * unittests/scoped_restore-selftests.c
3409         (_initialize_scoped_restore_selftests): Likewise.
3410         * NEWS: Document "maintenance selftest" and "maint info
3411         selftests".
3412
3413 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3414
3415         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3416         scoped_restore.
3417
3418 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3419
3420         * mi/mi-main.c (mi_load_progress): Make uiout variable
3421         a unique_ptr.
3422
3423 2017-09-15  Pedro Alves  <palves@redhat.com>
3424
3425         * compile/compile-c-types.c (convert_enum, convert_int)
3426         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3427
3428 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3429
3430         * dwarf2read.c (copy_string): Remove.
3431         (parse_macro_definition): Replace copy_string with savestring.
3432
3433 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3434
3435         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3436         gdb_target_obs.
3437         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3438         Likewise.
3439         (i[34567]86-*-linux*): Likewise.
3440
3441 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3442
3443         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3444         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3445         <stack>: Change type to std::vector.
3446         <stack_len, stack_allocated>: Remove.
3447         <grow_stack>: Remove.
3448         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3449         (dwarf_expr_context::~dwarf_expr_context): Remove.
3450         (dwarf_expr_context::grow_stack): Remove.
3451         (dwarf_expr_context::push): Adjust.
3452         (dwarf_expr_context::pop): Adjust.
3453         (dwarf_expr_context::fetch): Adjust.
3454         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3455         (dwarf_expr_context::stack_empty_p): Adjust.
3456         (dwarf_expr_context::execute_stack_op): Adjust.
3457
3458 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3459
3460         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3461         return type to bool.
3462         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3463
3464 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3467         Change type to bool.
3468         (dwarf_stack_value) <in_stack_memory>: Likewise.
3469         (dwarf_expr_context) <push_address>: Change parameter type to
3470         bool.
3471         <fetch_in_stack_memory>: Change return type to bool.
3472         <push>: Change parameter type to bool.
3473         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3474         to bool.
3475         (dwarf_expr_context::push_address): Likewise.
3476         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3477         to bool.
3478         (dwarf_expr_context::execute_stack_op): Adjust.
3479         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3480
3481 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3482
3483         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3484         (struct dwarf_expr_context) <n_pieces>: Remove.
3485         <pieces>: Change type to std::vector.
3486         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3487         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3488         pieces.
3489         (dwarf_expr_context::add_piece): Adjust.
3490         * dwarf2loc.c (struct piece_closure): Initialize fields.
3491         <n_pieces>: Remove.
3492         <pieces>: Change type to std::vector.
3493         (allocate_piece_closure): Adjust, change parameter to
3494         std::vector rvalue and std::move it to piece_closure.
3495         (rw_pieced_value): Adjust.
3496         (check_pieced_synthetic_pointer): Adjust.
3497         (indirect_synthetic_pointer): Adjust.
3498         (coerce_pieced_ref): Adjust.
3499         (free_pieced_value_closure):  Adjust.  Use delete to free
3500         piece_closure.
3501         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3502         to allocate_piece_closure.
3503         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3504
3505 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3506
3507         * probe.h (probe_ops_cp): Remove typedef.
3508         (DEF_VEC_P (probe_ops_cp)): Remove.
3509         (all_probe_ops): Change type to std::vector.
3510         * probe.c (info_probes_for_ops): Adjust to vector change.
3511         (probe_linespec_to_ops): Likewise.
3512         (all_probe_ops): Change type to std::vector.
3513         (_initialize_probe): Adjust to vector change.
3514         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3515         * elfread.c (elf_get_probes): Likewise.
3516         * stap-probe.c (_initialize_stap_probe): Likewise.
3517
3518 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3519
3520         * probe.h (struct bound_probe): Define constructors.
3521         * probe.c (bound_probe_s): Remove typedef.
3522         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3523         (collect_probes): Change return type to std::vector, remove
3524         cleanup.
3525         (compare_probes): Return bool, change parameter type.  Change
3526         semantic to "less than".
3527         (gen_ui_out_table_header_info): Change parameter to std::vector
3528         and update.
3529         (exists_probe_with_pops): Likewise.
3530         (info_probes_for_ops): Update to std::vector change.
3531         (enable_probes_command): Likewise.
3532         (disable_probes_command): Likewise.
3533
3534 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3535
3536         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3537         vec to std::vector.
3538         * probe.c (parse_probes_in_pspace): Update.
3539         (find_probes_in_objfile): Update.
3540         (find_probe_by_pc): Update.
3541         (collect_probes): Update.
3542         (probe_any_get_probes): Update.
3543         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3544         return type to reference to std::vector.
3545         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3546         std::vector and update.
3547         (dtrace_process_dof): Likewise.
3548         (dtrace_get_probes): Likewise.
3549         * elfread.c (elf_get_probes): Change return type to std::vector,
3550         store an std::vector in bfd_data.
3551         (probe_key_free): Update to std::vector.
3552         * stap-probe.c (handle_stap_probe): Change parameter to
3553         std::vector and update.
3554         (stap_get_probes): Likewise.
3555         * symfile-debug.c (debug_sym_get_probes): Change return type to
3556         std::vector and update.
3557
3558 2017-09-11  Tom Tromey  <tom@tromey.com>
3559
3560         * breakpoint.c (program_breakpoint_here_p): Update.
3561         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3562         from make_show_memory_breakpoints_cleanup.  Return a
3563         scoped_restore_tmpl<int>.
3564         (restore_show_memory_breakpoints): Remove.
3565         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3566         * mem-break.c (memory_validate_breakpoint): Update.
3567         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3568         (ia64_memory_remove_breakpoint): Update.
3569         (ia64_breakpoint_from_pc): Update.
3570         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3571         from make_show_memory_breakpoints_cleanup.
3572
3573 2017-09-11  Tom Tromey  <tom@tromey.com>
3574
3575         * d-namespace.c (d_lookup_symbol): Use std::string.
3576         (find_symbol_in_baseclass): Likewise.
3577
3578 2017-09-11  Tom Tromey  <tom@tromey.com>
3579
3580         * ctf.c (ctf_start): Use std::string.
3581
3582 2017-09-11  Tom Tromey  <tom@tromey.com>
3583
3584         * ada-lang.c (is_known_support_routine): Update.
3585         (ada_unhandled_exception_name_addr_from_raise): Update.
3586         * guile/scm-frame.c (gdbscm_frame_name): Update.
3587         * python/py-frame.c (frapy_name): Update.
3588         (frapy_function): Update.
3589         * stack.h (find_frame_funname): Update.
3590         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3591         (print_frame): Update.
3592
3593 2017-09-11  Tom Tromey  <tom@tromey.com>
3594
3595         * findcmd.c (put_bits): Take a gdb::byte_vector.
3596         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3597         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3598         cleanups.
3599         (find_command): Update.
3600
3601 2017-09-11  Tom Tromey  <tom@tromey.com>
3602
3603         * cli/cli-script.c (class scoped_restore_hook_in): New.
3604         (clear_hook_in_cleanup): Remove.
3605         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3606         scoped_restore_hook_in.
3607
3608 2017-09-11  Tom Tromey  <tom@tromey.com>
3609
3610         * cli/cli-script.c (restore_interp): Remove.
3611         (read_command_lines): Use scoped_restore_interp.
3612         * interps.c (scoped_restore_interp::set_temp): Rename from
3613         interp_set_temp.
3614         * interps.h (class scoped_restore_interp): New.
3615         (interp_set_temp): Remove.
3616
3617 2017-09-11  Tom Tromey  <tom@tromey.com>
3618
3619         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3620         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3621         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3622         scoped_restore.
3623         (mi_cmd_break_insert_1): Update.
3624         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3625         scoped_restore.
3626
3627 2017-09-11  Tom Tromey  <tom@tromey.com>
3628
3629         * demangle.c (demangle_command): Update.
3630         * breakpoint.c (disable_command): Update.
3631         (enable_command): Update.
3632         (find_location_by_number): Make "number" const.  Use
3633         get_number_trailer.
3634         * cli/cli-utils.c (extract_arg): Return std::string.
3635         * probe.c (parse_probe_linespec): Update.  Change types.
3636         (collect_probes): Take string arguments.
3637         (parse_probe_linespec): Likewise.
3638         (info_probes_for_ops): Update.
3639         (enable_probes_command): Update.
3640         (disable_probes_command): Update.
3641         * break-catch-sig.c (catch_signal_split_args): Update.
3642         * mi/mi-parse.c (mi_parse): Update.
3643
3644 2017-09-11  Tom Tromey  <tom@tromey.com>
3645
3646         * language.h (language_enum): Make argument const.
3647         * language.c (language_enum): Make argument const.
3648
3649 2017-09-11  Tom Tromey  <tom@tromey.com>
3650
3651         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3652         as function.
3653         (skip_to_space): Rename from skip_to_space_const.
3654         * common/common-utils.c (skip_to_space): New function.
3655         (skip_to_space): Rename from skip_to_space_const.
3656         * cli/cli-utils.h (get_number): Rename from get_number_const.
3657         (extract_arg): Rename from extract_arg_const.
3658         * cli/cli-utils.c (get_number): Rename from get_number_const.
3659         (extract_arg): Rename from extract_arg_const.
3660         (number_or_range_parser::get_number): Use ::get_number.
3661         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3662         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3663         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3664         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3665         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3666         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3667         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3668         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3669
3670 2017-09-11  Tom Tromey  <tom@tromey.com>
3671
3672         * python/python.c (do_start_initialization): Use
3673         py-event-types.def to initialize types.
3674         Define all object type structures.
3675         * python/python-internal.h: Don't declare event initialization
3676         functions.
3677         * python/py-threadevent.c (thread_event_object_type): Don't
3678         define.
3679         * python/py-stopevent.c (stop_event_object_type): Don't define.
3680         * python/py-signalevent.c (signal_event_object_type): Don't
3681         declare or define.
3682         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3683         (clear_objfiles_event_object_type): Don't declare or define.
3684         * python/py-infevents.c (inferior_call_pre_event_object_type)
3685         (inferior_call_post_event_object_type)
3686         (register_changed_event_object_type)
3687         (memory_changed_event_object_type): Don't declare or define.
3688         * python/py-inferior.c (new_thread_event_object_type)
3689         (new_inferior_event_object_type)
3690         (inferior_deleted_event_object_type): Don't declare or define.
3691         * python/py-exitedevent.c (exited_event_object_type): Don't
3692         declare or define.
3693         * python/py-evts.c (gdbpy_initialize_py_events): Use
3694         py-all-events.def.
3695         * python/py-events.h (thread_event_object_type): Don't declare.
3696         (events_object): Use py-all-events.def.
3697         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3698         py-event-types.def.
3699         * python/py-event-types.def: New file.
3700         * python/py-continueevent.c (create_continue_event_object): Don't
3701         declare or define.
3702         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3703         declare or define.
3704         * python/py-all-events.def: New file.
3705
3706 2017-09-11  Tom Tromey  <tom@tromey.com>
3707
3708         * python/py-threadevent.c (create_thread_event_object): Return
3709         gdbpy_ref.
3710         * python/py-stopevent.h (create_stop_event_object)
3711         (create_breakpoint_event_object, create_signal_event_object):
3712         Update.
3713         * python/py-stopevent.c (create_stop_event_object): Return
3714         gdbpy_ref.
3715         (emit_stop_event): Update.
3716         * python/py-signalevent.c (create_signal_event_object): Return
3717         gdbpy_ref.
3718         * python/py-infevents.c (create_inferior_call_event_object):
3719         Update.
3720         * python/py-event.h (create_event_object)
3721         (create_thread_event_object): Update.
3722         * python/py-event.c (create_event_object): Return gdbpy_ref.
3723         * python/py-continueevent.c: Return gdbpy_ref.
3724         * python/py-bpevent.c (create_breakpoint_event_object): Return
3725         gdbpy_ref.
3726
3727 2017-09-11  Tom Tromey  <tom@tromey.com>
3728
3729         PR python/15622:
3730         * NEWS: Add entry.
3731         * python/python.c (do_start_initialization): Initialize new event
3732         types.
3733         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3734         (gdbpy_initialize_inferior_deleted_event)
3735         (gdbpy_initialize_new_thread_event): Declare.
3736         * python/py-threadevent.c (create_thread_event_object): Add option
3737         "thread" parameter.
3738         * python/py-inferior.c (new_thread_event_object_type)
3739         (new_inferior_event_object_type)
3740         (inferior_deleted_event_object_type): Declare.
3741         (python_new_inferior, python_inferior_deleted): New functions.
3742         (add_thread_object): Emit new_thread event.
3743         (gdbpy_initialize_inferior): Attach new functions to corresponding
3744         observers.
3745         (new_thread, new_inferior, inferior_deleted): Define new event
3746         types.
3747         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3748         registries.
3749         * python/py-events.h (events_object) <new_inferior,
3750         inferior_deleted, new_thread>: New fields.
3751         * python/py-event.h (create_thread_event_breakpoint): Add optional
3752         "thread" parameter.
3753
3754 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3755
3756         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3757         check current_ui instead.
3758         (internal_vproblem): Likewise.
3759
3760 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3761
3762         * thread.c (print_thread_info_1): Remove unnecessary calls to
3763         uiout->is_mi_like_p.
3764
3765 2017-09-09  Tom Tromey  <tom@tromey.com>
3766
3767         * namespace.h (add_using_directive): Update.
3768         * namespace.c (add_using_directive): Change type of excludes to
3769         std::vector.
3770         * dwarf2read.c (read_import_statement): Use std::vector.
3771         (read_namespace): Update.
3772         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3773
3774 2017-09-09  Tom Tromey  <tom@tromey.com>
3775
3776         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3777
3778 2017-09-09  Tom Tromey  <tom@tromey.com>
3779
3780         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3781
3782 2017-09-09  Tom Tromey  <tom@tromey.com>
3783
3784         * stack.c (func_command): Use gdb::def_vector.
3785
3786 2017-09-09  Tom Tromey  <tom@tromey.com>
3787
3788         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3789         ui_out_emit_list, ui_out_emit_tuple.
3790         (mi_cmd_var_update): Likewise.
3791
3792 2017-09-09  Tom Tromey  <tom@tromey.com>
3793
3794         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3795         ui_out_redirect_pop.
3796         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3797         ui_out_redirect_pop.
3798         * utils.c (do_ui_out_redirect_pop)
3799         (make_cleanup_ui_out_redirect_pop): Remove.
3800         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3801         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3802         * ui-out.h (ui_out_redirect_pop): New class.
3803
3804 2017-09-09  Tom Tromey  <tom@tromey.com>
3805
3806         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3807         (list_available_thread_groups, mi_cmd_list_thread_groups)
3808         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3809         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3810         Likewise.
3811
3812 2017-09-09  Tom Tromey  <tom@tromey.com>
3813
3814         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3815         ui_out_emit_tuple.
3816
3817 2017-09-09  Tom Tromey  <tom@tromey.com>
3818
3819         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3820         * stack.c (print_frame): Use ui_out_emit_tuple.
3821         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3822         (info_spu_mailbox_command, info_spu_dma_command)
3823         (info_spu_proxydma_command): Likewise.
3824         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3825         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3826         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3827         ui_out_emit_tuple.
3828         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3829
3830 2017-09-09  Tom Tromey  <tom@tromey.com>
3831
3832         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3833         (class ui_out_emit_table): Update comment.
3834         * ui-out.c (do_cleanup_table_end)
3835         (make_cleanup_ui_out_table_begin_end): Remove.
3836         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3837         (info_spu_dma_cmdlist): Likewise.
3838         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3839         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3840         ui_out_emit_table.
3841
3842 2017-09-09  Tom Tromey  <tom@tromey.com>
3843
3844         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3845         ui_out_emit_list, gdb::optional.
3846
3847 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3848
3849         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3850         prototype.
3851         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3852         prototype.
3853         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3854         prototype.
3855         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3856         * ada-exp.y: Remove _initialize_ada_exp prototype.
3857         * ada-lang.c: Remove _initialize_ada_language prototype.
3858         * ada-tasks.c: Remove _initialize_tasks prototype.
3859         * addrmap.c: Remove _initialize_addrmap prototype.
3860         * agent.c: Remove _initialize_agent prototype.
3861         * aix-thread.c: Remove _initialize_aix_thread prototype.
3862         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3863         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3864         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3865         prototype.
3866         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3867         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3868         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3869         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3870         prototype.
3871         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3872         prototype.
3873         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3874         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3875         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3876         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3877         prototype.
3878         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3879         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3880         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3881         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3882         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3883         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3884         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3885         prototype.
3886         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3887         prototype.
3888         * annotate.c: Remove _initialize_annotate prototype.
3889         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3890         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3891         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3892         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3893         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3894         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3895         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3896         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3897         prototype.
3898         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3899         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3900         * auto-load.c: Remove _initialize_auto_load prototype.
3901         * auxv.c: Remove _initialize_auxv prototype.
3902         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3903         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3904         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3905         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3906         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3907         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3908         prototype.
3909         * break-catch-throw.c: Remove _initialize_break_catch_throw
3910         prototype.
3911         * breakpoint.c: Remove _initialize_breakpoint prototype.
3912         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3913         * btrace.c: Remove _initialize_btrace prototype.
3914         * charset.c: Remove _initialize_charset prototype.
3915         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3916         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3917         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3918         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3919         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3920         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3921         * coffread.c: Remove _initialize_coffread prototype.
3922         * compile/compile.c: Remove _initialize_compile prototype.
3923         * complaints.c: Remove _initialize_complaints prototype.
3924         * completer.c: Remove _initialize_completer prototype.
3925         * copying.awk: Remove _initialize_copying prototype.
3926         * copying.c: Regenerate.
3927         * core-regset.c: Remove _initialize_core_regset prototype.
3928         * corefile.c: Remove _initialize_core prototype.
3929         * corelow.c: Remove _initialize_corelow prototype.
3930         * cp-abi.c: Remove _initialize_cp_abi prototype.
3931         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3932         * cp-support.c: Remove _initialize_cp_support prototype.
3933         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3934         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3935         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3936         * ctf.c: Remove _initialize_ctf prototype.
3937         * d-lang.c: Remove _initialize_d_language prototype.
3938         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3939         prototype.
3940         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3941         * dbxread.c: Remove _initialize_dbxread prototype.
3942         * dcache.c: Remove _initialize_dcache prototype.
3943         * demangle.c: Remove _initialize_demangler prototype.
3944         * disasm-selftests.c: Remove _initialize_disasm_selftests
3945         prototype.
3946         * disasm.c: Remove _initialize_disasm prototype.
3947         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3948         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3949         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3950         prototype.
3951         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3952         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3953         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3954         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3955         * elfread.c: Remove _initialize_elfread prototype.
3956         * exec.c: Remove _initialize_exec prototype.
3957         * extension.c: Remove _initialize_extension prototype.
3958         * f-lang.c: Remove _initialize_f_language prototype.
3959         * f-valprint.c: Remove _initialize_f_valprint prototype.
3960         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3961         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3962         * filesystem.c: Remove _initialize_filesystem prototype.
3963         * findcmd.c: Remove _initialize_mem_search prototype.
3964         * fork-child.c: Remove _initialize_fork_child prototype.
3965         * frame-base.c: Remove _initialize_frame_base prototype.
3966         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3967         * frame.c: Remove _initialize_frame prototype.
3968         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3969         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3970         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3971         * gcore.c: Remove _initialize_gcore prototype.
3972         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3973         * gdbarch.c: Regenerate.
3974         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3975         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3976         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3977         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3978         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3979         * go-lang.c: Remove _initialize_go_language prototype.
3980         * go32-nat.c: Remove _initialize_go32_nat prototype.
3981         * guile/guile.c: Remove _initialize_guile prototype.
3982         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3983         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3984         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3985         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3986         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3987         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3988         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3989         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3990         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3991         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3992         prototype.
3993         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3994         prototype.
3995         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3996         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3997         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3998         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3999         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4000         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4001         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4002         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4003         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4004         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4005         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4006         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4007         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4008         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4009         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4010         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4011         prototype.
4012         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4013         prototype.
4014         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4015         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4016         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4017         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4018         * infcall.c: Remove _initialize_infcall prototype.
4019         * infcmd.c: Remove _initialize_infcmd prototype.
4020         * inferior.c: Remove _initialize_inferiors prototype.
4021         * inflow.c: Remove _initialize_inflow prototype.
4022         * infrun.c: Remove _initialize_infrun prototype.
4023         * interps.c: Remove _initialize_interpreter prototype.
4024         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4025         * jit.c: Remove _initialize_jit prototype.
4026         * language.c: Remove _initialize_language prototype.
4027         * linux-fork.c: Remove _initialize_linux_fork prototype.
4028         * linux-nat.c: Remove _initialize_linux_nat prototype.
4029         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4030         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4031         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4032         * m2-lang.c: Remove _initialize_m2_language prototype.
4033         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4034         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4035         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4036         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4037         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4038         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4039         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4040         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4041         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4042         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4043         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4044         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4045         * machoread.c: Remove _initialize_machoread prototype.
4046         * macrocmd.c: Remove _initialize_macrocmd prototype.
4047         * macroscope.c: Remove _initialize_macroscope prototype.
4048         * maint.c: Remove _initialize_maint_cmds prototype.
4049         * mdebugread.c: Remove _initialize_mdebugread prototype.
4050         * memattr.c: Remove _initialize_mem prototype.
4051         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4052         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4053         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4054         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4055         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4056         * microblaze-linux-tdep.c: Remove
4057         _initialize_microblaze_linux_tdep prototype.
4058         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4059         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4060         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4061         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4062         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4063         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4064         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4065         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4066         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4067         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4068         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4069         prototype.
4070         * mipsread.c: Remove _initialize_mipsread prototype.
4071         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4072         prototype.
4073         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4074         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4075         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4076         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4077         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4078         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4079         prototype.
4080         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4081         * nto-procfs.c: Remove _initialize_procfs prototype.
4082         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4083         * objc-lang.c: Remove _initialize_objc_language prototype.
4084         * objfiles.c: Remove _initialize_objfiles prototype.
4085         * observer.c: Remove observer_test_first_notification_function,
4086         observer_test_second_notification_function,
4087         observer_test_third_notification_function, and
4088         _initialize_observer prototypes.
4089         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4090         * osabi.c: Remove _initialize_gdb_osabi prototype.
4091         * osdata.c: Remove _initialize_osdata prototype.
4092         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4093         * parse.c: Remove _initialize_parse prototype.
4094         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4095         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4096         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4097         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4098         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4099         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4100         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4101         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4102         * printcmd.c: Remove _initialize_printcmd prototype.
4103         * probe.c: Remove _initialize_probe prototype.
4104         * proc-api.c: Remove _initialize_proc_api prototype.
4105         * proc-events.c: Remove _initialize_proc_events prototype.
4106         * proc-service.c: Remove _initialize_proc_service prototype.
4107         * procfs.c: Remove _initialize_procfs prototype.
4108         * psymtab.c: Remove _initialize_psymtab prototype.
4109         * python/python.c: Remove _initialize_python prototype.
4110         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4111         * record-btrace.c: Remove _initialize_record_btrace prototype.
4112         * record-full.c: Remove _initialize_record_full prototype.
4113         * record.c: Remove _initialize_record prototype.
4114         * regcache.c: Remove _initialize_regcache prototype.
4115         * reggroups.c: Remove _initialize_reggroup prototype.
4116         * remote-notif.c: Remove _initialize_notif prototype.
4117         * remote-sim.c: Remove _initialize_remote_sim prototype.
4118         * remote.c: Remove _initialize_remote prototype.
4119         * reverse.c: Remove _initialize_reverse prototype.
4120         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4121         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4122         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4123         prototype.
4124         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4125         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4126         * rust-exp.y: Remove _initialize_rust_exp prototype.
4127         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4128         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4129         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4130         * score-tdep.c: Remove _initialize_score_tdep prototype.
4131         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4132         prototype.
4133         * ser-go32.c: Remove _initialize_ser_dos prototype.
4134         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4135         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4136         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4137         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4138         * serial.c: Remove _initialize_serial prototype.
4139         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4140         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4141         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4142         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4143         * skip.c: Remove _initialize_step_skip prototype.
4144         * sol-thread.c: Remove _initialize_sol_thread prototype.
4145         * solib-aix.c: Remove _initialize_solib_aix prototype.
4146         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4147         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4148         * solib-frv.c: Remove _initialize_frv_solib prototype.
4149         * solib-spu.c: Remove _initialize_spu_solib prototype.
4150         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4151         * solib-target.c: Remove _initialize_solib_target prototype.
4152         * solib.c: Remove _initialize_solib prototype.
4153         * source.c: Remove _initialize_source prototype.
4154         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4155         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4156         prototype.
4157         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4158         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4159         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4160         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4161         prototype.
4162         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4163         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4164         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4165         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4166         prototype.
4167         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4168         prototype.
4169         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4170         prototype.
4171         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4172         prototype.
4173         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4174         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4175         prototype.
4176         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4177         prototype.
4178         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4179         prototype.
4180         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4181         prototype.
4182         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4183         prototype.
4184         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4185         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4186         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4187         * stabsread.c: Remove _initialize_stabsread prototype.
4188         * stack.c: Remove _initialize_stack prototype.
4189         * stap-probe.c: Remove _initialize_stap_probe prototype.
4190         * std-regs.c: Remove _initialize_frame_reg prototype.
4191         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4192         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4193         * symfile.c: Remove _initialize_symfile prototype.
4194         * symmisc.c: Remove _initialize_symmisc prototype.
4195         * symtab.c: Remove _initialize_symtab prototype.
4196         * target-dcache.c: Remove _initialize_target_dcache prototype.
4197         * target-descriptions.c: Remove _initialize_target_descriptions
4198         prototype.
4199         * thread.c: Remove _initialize_thread prototype.
4200         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4201         prototype.
4202         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4203         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4204         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4205         prototype.
4206         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4207         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4208         * tracefile.c: Remove _initialize_tracefile prototype.
4209         * tracepoint.c: Remove _initialize_tracepoint prototype.
4210         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4211         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4212         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4213         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4214         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4215         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4216         * tui/tui.c: Remove _initialize_tui prototype.
4217         * typeprint.c: Remove _initialize_typeprint prototype.
4218         * user-regs.c: Remove _initialize_user_regs prototype.
4219         * utils.c: Remove _initialize_utils prototype.
4220         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4221         * valarith.c: Remove _initialize_valarith prototype.
4222         * valops.c: Remove _initialize_valops prototype.
4223         * valprint.c: Remove _initialize_valprint prototype.
4224         * value.c: Remove _initialize_values prototype.
4225         * varobj.c: Remove _initialize_varobj prototype.
4226         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4227         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4228         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4229         * windows-nat.c: Remove _initialize_windows_nat,
4230         _initialize_check_for_gdb_ini, and _initialize_loadable
4231         prototypes.
4232         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4233         * xcoffread.c: Remove _initialize_xcoffread prototype.
4234         * xml-support.c: Remove _initialize_xml_support prototype.
4235         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4236         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4237         prototype.
4238         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4239         prototype.
4240         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4241
4242 2017-09-08  Keith Seitz  <keiths@redhat.com>
4243
4244         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4245         field.
4246
4247 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4248
4249         * f-valprint.c (f_val_print): Remove check for one byte
4250         sized integers. Remove printing of character type.
4251
4252 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4253             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4254             Bernhard Heckel  <bernhard.heckel@intel.com>
4255
4256         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4257         to maintain proper indentation when printing pointers/refs.
4258
4259 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4260
4261         GDB 8.0.1 released.
4262
4263 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4264
4265         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4266
4267 2017-09-05  Tom Tromey  <tom@tromey.com>
4268
4269         * parse.c (funcall_chain): Now a std::vector.
4270         (start_arglist, end_arglist): Simplify.
4271         (free_funcalls): Remove.
4272         (parse_exp_in_context_1): Remove cleanup.
4273
4274 2017-09-05  Tom Tromey  <tom@tromey.com>
4275
4276         * go-exp.y (go_parse): Don't create a cleanup.
4277
4278 2017-09-05  Tom Tromey  <tom@tromey.com>
4279
4280         * d-exp.y (PrimaryExpression): Use std::string.
4281         (d_parse): Don't create a cleanup.
4282
4283 2017-09-05  Tom Tromey  <tom@tromey.com>
4284
4285         * utils.c (do_clear_parser_state): Remove.
4286         (make_cleanup_clear_parser_state): Remove.
4287         * p-exp.y (pascal_parse): Use scoped_restore.
4288         * m2-exp.y (m2_parse): Use scoped_restore.
4289         * f-exp.y (f_parse): Use scoped_restore.
4290         * d-exp.y (d_parse): Use scoped_restore.
4291         * c-exp.y (c_parse): Use scoped_restore.
4292         * ada-exp.y (ada_parse): Use scoped_restore.
4293         * utils.h (make_cleanup_clear_parser_state): Remove.
4294
4295 2017-09-06  Keith Seitz  <keiths@redhat.com>
4296
4297         * dwarf2read.c (dw2_linkage_name_attr): New function.
4298         (dw2_linkage_name): New function.
4299         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4300         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4301         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4302
4303 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4304
4305         * config/djgpp/djconfig.sh: Correct shell portability issue.
4306
4307 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4308
4309         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4310
4311 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4312
4313         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4314         * NEWS: Mention new FreeBSD/mips native configuration.
4315         * configure.host: Add aarch64*-*-freebsd*.
4316         * configure.nat: Likewise.
4317         * aarch64-fbsd-nat.c: New file.
4318
4319 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4320
4321         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4322         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4323         * NEWS: Mention new FreeBSD/aarch64 target.
4324         * configure.tgt: Add aarch64*-*-freebsd*.
4325         * aarch64-fbsd-tdep.c: New file.
4326         * aarch64-fbsd-tdep.h: New file.
4327
4328 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4329
4330         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4331
4332 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4333
4334         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4335         of TLS symbols.
4336
4337 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4338
4339         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4340         call.
4341
4342 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4343
4344         * infrun.c (follow_exec): Call add_thread after
4345         target_find_description.
4346
4347 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4348
4349         * infrun.c (handle_inferior_event_1): When exec'ing, read
4350         stop_pc after follow_exec.
4351
4352 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * remote.c (process_g_packet): Update error message.
4355
4356 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4357
4358         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4359         targets.
4360
4361 2017-09-05  Pedro Alves  <palves@redhat.com>
4362
4363         * eval.c (eval_call, evaluate_funcall): New functions, factored
4364         out from ...
4365         (evaluate_subexp_standard): ... this.
4366
4367 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4368
4369         * amd64-tdep.c (amd64_target_description): Create target
4370         descriptions.
4371         (_initialize_amd64_tdep): Don't call functions
4372         initialize_tdesc_amd64_*.  Add self tests.
4373         * arch/amd64.c (amd64_create_target_description): Add parameter
4374         is_linux.  Call set_tdesc_osabi if is_linux is true.
4375         * arch/amd64.h (amd64_create_target_description): Update the
4376         declaration.
4377         * arch/i386.c (i386_create_target_description): Add parameter
4378         is_linux.  Call set_tdesc_osabi if is_linux is true.
4379         * arch/i386.h (i386_create_target_description): Update
4380         declaration.
4381         * configure.tgt: Add i386.o to gdb_target_obs.
4382         * features/Makefile (XMLTOC): Remove i386/*.xml.
4383         * features/i386/amd64-avx-avx512.c: Remove.
4384         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4385         * features/i386/amd64-avx-mpx.c: Remove.
4386         * features/i386/amd64-avx.c: Remove.
4387         * features/i386/amd64-mpx.c: Remove.
4388         * features/i386/amd64.c: Remove.
4389         * features/i386/i386-avx-avx512.c: Remove.
4390         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4391         * features/i386/i386-avx-mpx.c: Remove.
4392         * features/i386/i386-avx.c: Remove.
4393         * features/i386/i386-mmx.c: Remove.
4394         * features/i386/i386-mpx.c: Remove.
4395         * features/i386/i386.c: Remove.
4396         * i386-tdep.c: Don't include features/i386/i386*.c., include
4397         target-descriptions.h and arch/i386.h.
4398         (i386_target_description): Create target descriptions.
4399         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4400         functions.  Do self tests.
4401
4402 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4403
4404         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4405         * features/i386/amd64-avx-avx512-linux.c: Removed.
4406         * features/i386/amd64-avx-linux.c: Removed.
4407         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4408         * features/i386/amd64-avx-mpx-linux.c: Removed.
4409         * features/i386/amd64-linux.c: Removed.
4410         * features/i386/amd64-mpx-linux.c: Removed.
4411         * features/i386/x32-avx-avx512-linux.c: Removed.
4412         * features/i386/x32-avx-linux.c: Removed.
4413         * features/i386/x32-linux.c: Removed.
4414
4415 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4416
4417         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4418         features/i386/*.c.
4419         (amd64_linux_read_description): Call
4420         amd64_create_target_description.
4421         * arch/amd64.c: New file.
4422         * arch/amd64.h: New file.
4423         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4424         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4425
4426 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4427
4428         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4429         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4430         (amd64_linux_read_description): Create target descriptions.
4431         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4432         functions.  Add unit tests.
4433         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4434         x32-core.xml.
4435         * features/i386/64bit-avx.c: Generated.
4436         * features/i386/64bit-avx512.c: Generated.
4437         * features/i386/64bit-core.c: Generated.
4438         * features/i386/64bit-linux.c: Generated.
4439         * features/i386/64bit-mpx.c: Generated.
4440         * features/i386/64bit-pkeys.c: Generated.
4441         * features/i386/64bit-segments.c: Generated.
4442         * features/i386/64bit-sse.c: Generated.
4443         * features/i386/x32-core.c: Generated.
4444         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4445         c files for amd64-linux and x32-linux.
4446
4447 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4448
4449         * amd64-linux-tdep.c (amd64_linux_read_description): New
4450         function.
4451         (amd64_linux_core_read_description): Call
4452         amd64_linux_read_description.
4453         (amd64_linux_init_abi): Likewise.
4454         (amd64_x32_linux_init_abi): Likewise.
4455         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4456         * x86-linux-nat.c (x86_linux_read_description): Call
4457         amd64_linux_read_description.
4458
4459 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4460
4461         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4462         comments.
4463
4464 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4465
4466         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4467         * features/i386/i386-avx-avx512-linux.c: Remove.
4468         * features/i386/i386-avx-linux.c: Remove.
4469         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4470         * features/i386/i386-avx-mpx-linux.c: Remove.
4471         * features/i386/i386-linux.c: Remove.
4472         * features/i386/i386-mmx-linux.c: Remove.
4473         * features/i386/i386-mpx-linux.c: Remove.
4474
4475 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4476
4477         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4478         (SFILES): Add arch/i386.c.
4479         (HFILES_NO_SRCDIR): Add arch/i386.h.
4480         * arch/i386.c: New file.
4481         * arch/i386.h: New file.
4482         * arch/tdesc.h (allocate_target_description): Declare.
4483         (set_tdesc_architecture): Declare.
4484         (set_tdesc_osabi): Declare.
4485         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4486         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4487         include arch/i386.h.
4488         (i386_linux_read_description): Remove code and call
4489         i386_create_target_description.
4490         (set_tdesc_architecture): New function.
4491         (set_tdesc_osabi): New function.
4492         * target-descriptions.h (allocate_target_description): Remove.
4493
4494 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4495
4496         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4497         * target-descriptions.c (tdesc_create_feature): Likewise, and
4498         adjust code.
4499         * features/i386/32bit-avx.c: Re-generated.
4500         * features/i386/32bit-avx512.c: Re-generated.
4501         * features/i386/32bit-core.c: Re-generated.
4502         * features/i386/32bit-linux.c: Re-generated.
4503         * features/i386/32bit-mpx.c: Re-generated.
4504         * features/i386/32bit-pkeys.c: Re-generated.
4505         * features/i386/32bit-sse.c: Re-generated.
4506
4507 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4508
4509         * regformats/regdef.h (struct reg): Override operator == and !=.
4510
4511 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4512
4513         * arch/tdesc.h: New file.
4514         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4515         * target-descriptions.c: Update comments.
4516         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4517         declarations.
4518         * features/i386/32bit-avx.c: Re-generated.
4519         * features/i386/32bit-avx512.c: Re-generated.
4520         * features/i386/32bit-core.c: Re-generated.
4521         * features/i386/32bit-linux.c: Re-generated.
4522         * features/i386/32bit-mpx.c: Re-generated.
4523         * features/i386/32bit-pkeys.c: Re-generated.
4524         * features/i386/32bit-sse.c: Re-generated.
4525
4526 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4527
4528         * regformats/regdat.sh: Update generated code.
4529
4530 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4531
4532         * regformats/regdat.sh: Adjust code order.
4533
4534 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4535
4536         * expprint.c (dump_subexp_body_standard): Use constant format
4537         string in fprintf_filtered call.
4538
4539 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4540
4541         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4542         NetBSD/i386.
4543         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4544
4545 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4546
4547         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4548
4549 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4550
4551         * bsd-kvm.o: Define _KMEMUSER.
4552         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4553         * configure: Regenerate.
4554
4555 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4556
4557         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4558         * i386-fbsd-nat.c: Likewise.
4559
4560 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4561
4562         * unittests/array-view-selftests.c: Add include of <array>.
4563
4564 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4565
4566         * spu-tdep.c (flush_ea_cache): Add missing argument to
4567         call_function_by_hand.
4568
4569 2017-09-04  Pedro Alves  <palves@redhat.com>
4570
4571         * NEWS (Safer support for debugging with no debug info): New.
4572
4573 2017-09-04  Pedro Alves  <palves@redhat.com>
4574
4575         * c-exp.y (function_method, function_method_void): Add current
4576         instance flags to TYPE_INSTANCE.
4577         * dwarf2read.c (check_modifier): New.
4578         (compute_delayed_physnames): Assert that only C++ adds delayed
4579         physnames.  Mark fn_fields as const/volatile depending on
4580         physname.
4581         * eval.c (make_params): New type_instance_flags parameter.  Use
4582         it as the new type's instance flags.
4583         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4584         flags element and pass it to make_params.
4585         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4586         instance flags element.
4587         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4588         * gdbtypes.h: Include "enum-flags.h".
4589         (type_instance_flags): New enum-flags type.
4590         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4591         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4592         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4593         (follow_type_instance_flags): New function.
4594         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4595         * parser-defs.h (follow_type_instance_flags): Declare.
4596         * valops.c (value_struct_elt_for_reference): const/volatile must
4597         match too.
4598
4599 2017-09-04  Pedro Alves  <palves@redhat.com>
4600
4601         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4602         function/method scopes; lookup the nested name as a function local
4603         static variable.
4604
4605 2017-09-04  Pedro Alves  <palves@redhat.com>
4606
4607         (%type <voidval>): Add function_method.
4608         * c-exp.y (exp): New production for calls with no arguments.
4609         (function_method, function_method_void_or_typelist): New
4610         productions.
4611         (exp): New production for "method()::static_var".
4612         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4613         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4614         Handle OP_FUNC_STATIC_VAR.
4615         * parse.c (operator_length_standard):
4616         Handle OP_FUNC_STATIC_VAR.
4617
4618 2017-09-04  Pedro Alves  <palves@redhat.com>
4619
4620         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4621         handling.
4622         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4623         Ditto.
4624         * parse.c (operator_length_standard, operator_check_standard):
4625         Ditto.
4626         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4627
4628 2017-09-04  Pedro Alves  <palves@redhat.com>
4629
4630         * ax-gdb.c: Include "typeprint.h".
4631         (gen_expr_for_cast): New function.
4632         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4633         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4634         type is unknown.
4635         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4636         nodebug_data_symbol.
4637         * eval.c: Include "typeprint.h".
4638         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4639         Error out if symbol has unknown type.
4640         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4641         evaluate_subexp_for_cast.
4642         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4643         OP_VAR_MSYM_VALUE.
4644         (evaluate_subexp_for_cast): New function.
4645         * gdbtypes.c (init_nodebug_var_type): New function.
4646         (objfile_type): Use it to initialize types of variables with no
4647         debug info.
4648         * typeprint.c (error_unknown_type): New.
4649         * typeprint.h (error_unknown_type): New declaration.
4650         * compile/compile-c-types.c (convert_type_basic): Handle
4651         TYPE_CODE_ERROR; warn and fallback to int for variables with
4652         unknown type.
4653
4654 2017-09-04  Pedro Alves  <palves@redhat.com>
4655
4656         * eval.c (evaluate_var_value): New function, factored out from ...
4657         (evaluate_subexp_standard): ... here.
4658
4659 2017-09-04  Pedro Alves  <palves@redhat.com>
4660
4661         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4662         Remove useless assignments to 'op'.
4663
4664 2017-09-04  Pedro Alves  <palves@redhat.com>
4665
4666         * eval.c (eval_skip_value): New function.
4667         (evaluate_subexp_standard): Use it.
4668
4669 2017-09-04  Pedro Alves  <palves@redhat.com>
4670
4671         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4672         function name from symbol/minsym and pass it to
4673         error_call_unknown_return_type.
4674
4675 2017-09-04  Pedro Alves  <palves@redhat.com>
4676
4677         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4678         * ax-gdb.c (gen_msym_var_ref): New function.
4679         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4680         * eval.c (evaluate_var_msym_value): New function.
4681         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4682         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4683         to call_function_by_hand.
4684         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4685         Handle OP_VAR_MSYM_VALUE.
4686         (union exp_element) <msymbol>: New field.
4687         * minsyms.h (struct type): Forward declare.
4688         (find_minsym_type_and_address): Declare.
4689         * parse.c (write_exp_elt_msym): New function.
4690         (write_exp_msymbol): Delete, refactored as ...
4691         (find_minsym_type_and_address): ... this new function.
4692         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4693         (operator_length_standard, operator_check_standard): Handle
4694         OP_VAR_MSYM_VALUE.
4695         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4696
4697 2017-09-04  Pedro Alves  <palves@redhat.com>
4698
4699         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4700         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4701         unknown.
4702         * ada-typeprint.c (print_func_type): Handle functions with unknown
4703         return type.
4704         * c-typeprint.c (c_type_print_base): Handle functions and methods
4705         with unknown return type.
4706         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4707         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4708         * compile/compile-c-types.c: Include "objfiles.h".
4709         (convert_func): For functions with unknown return type, warn and
4710         default to int.
4711         * compile/compile-object-run.c (compile_object_run): Adjust call
4712         to call_function_by_hand_dummy.
4713         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4714         call_function_by_hand.
4715         * eval.c (evaluate_subexp_standard): Adjust calls to
4716         call_function_by_hand.  Handle functions and methods with unknown
4717         return type.  Pass expect_type to call_function_by_hand.
4718         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4719         return type.
4720         * gcore.c (call_target_sbrk): Adjust call to
4721         call_function_by_hand.
4722         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4723         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4724         an integer address type instead of nodebug.
4725         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4726         call_function_by_hand.
4727         * infcall.c (error_call_unknown_return_type): New function.
4728         (call_function_by_hand): New "default_return_type" parameter.
4729         Pass it down.
4730         (call_function_by_hand_dummy): New "default_return_type"
4731         parameter.  Use it instead of defaulting to int.  If there's no
4732         default and the return type is unknown, throw an error.  If
4733         there's a default return type, and the called function has no
4734         debug info, then assume the function is prototyped.
4735         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4736         New "default_return_type" parameter.
4737         (error_call_unknown_return_type): New declaration.
4738         * linux-fork.c (call_lseek): Cast return type of lseek.
4739         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4740         call_function_by_hand.
4741         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4742         calls to call_function_by_hand.
4743         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4744         return type.
4745         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4746         (value_nsstring, print_object_command): Adjust calls to
4747         call_function_by_hand.
4748         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4749         functions with unknown return type.
4750         (pascal_type_print_func_varspec_suffix): New function.
4751         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4752         TYPE_CODE_METHOD>: Use it.
4753         * python/py-value.c (valpy_call): Adjust call to
4754         call_function_by_hand.
4755         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4756         call_function_by_hand.
4757         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4758         call_function_by_hand.
4759         * valops.c (value_allocate_space_in_inferior): Adjust call to
4760         call_function_by_hand.
4761         * typeprint.c (type_print_unknown_return_type): New function.
4762         * typeprint.h (type_print_unknown_return_type): New declaration.
4763
4764 2017-09-04  Pedro Alves  <palves@redhat.com>
4765
4766         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4767         types with more than one parameter as prototyped.
4768
4769 2017-09-04  Pedro Alves  <palves@redhat.com>
4770
4771         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4772         (disassemble_command): Use gdb_disassembly_flags instead of bare
4773         int.
4774         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4775         (dump_insns, do_mixed_source_and_assembly_deprecated)
4776         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4777         Use gdb_disassembly_flags instead of bare int.
4778         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4779         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4780         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4781         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4782         (enum gdb_disassembly_flag): ... values of this new enumeration.
4783         (gdb_disassembly_flags): Define.
4784         (gdb_disassembly)
4785         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4786         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4787         gdb_disassembly_flags instead of bare int.
4788         * record-btrace.c (btrace_insn_history)
4789         (record_btrace_insn_history, record_btrace_insn_history_range)
4790         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4791         instead of bare int.
4792         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4793         Use gdb_disassembly_flags instead of bare int.
4794         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4795         Define.
4796         * target-delegates.c: Regenerate.
4797         * target.c (target_insn_history, target_insn_history_from)
4798         (target_insn_history_range): Use gdb_disassembly_flags instead of
4799         bare int.
4800         * target.h: Include "disasm.h".
4801         (struct target_ops) <to_insn_history, to_insn_history_from,
4802         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4803         int.
4804         (target_insn_history, target_insn_history_from)
4805         (target_insn_history_range): Use gdb_disassembly_flags instead of
4806         bare int.
4807
4808 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4809
4810         * cli/cli-script.c (build_command_line): For if/while commands,
4811         check whether args is empty.
4812
4813 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4814
4815         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4816         (enum command_control_type): Likewise.
4817         (struct command_line): Likewise.
4818         (free_command_lines): Likewise.
4819         (struct command_lines_deleter): Likewise.
4820         (command_line_up): Likewise.
4821         (read_command_lines): Likewise.
4822         (read_command_lines_1): Likewise.
4823         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4824         (enum command_control_type): Likewise.
4825         (struct command_line): Likewise.
4826         (free_command_lines): Likewise.
4827         (struct command_lines_deleter): Likewise.
4828         (command_line_up): Likewise.
4829         (read_command_lines): Likewise.
4830         (read_command_lines_1): Likewise.
4831         * breakpoint.h: Include cli/cli-script.h.
4832         * extension-priv.h: Likewise.
4833         * gdbcmd.h: Likewise.
4834
4835 2017-09-04  Pedro Alves  <palves@redhat.com>
4836
4837         * ada-lang.c (is_known_support_routine): Move sal declaration to
4838         where it is initialized.
4839         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4840         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4841         (clear_command, update_static_tracepoint): Remove init_sal
4842         references.  Move declarations closer to initializations.
4843         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4844         initializations.
4845         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4846         references.  Move sal declarations closer to initializations.
4847         * frame.c (find_frame_sal): Return a symtab_and_line via function
4848         return instead of output parameter.  Remove init_sal references.
4849         * frame.h (find_frame_sal): Return a symtab_and_line via function
4850         return instead of output parameter.
4851         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4852         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4853         instead of memset.
4854         (gdbscm_find_pc_line): Remove init_sal reference.
4855         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4856         references.  Move declarations closer to initializations.
4857         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4858         initializations.
4859         (finish_backward): Remove init_sal references.  Move declarations
4860         closer to initializations.
4861         * infrun.c (process_event_stop_test, handle_step_into_function)
4862         (insert_hp_step_resume_breakpoint_at_frame)
4863         (insert_step_resume_breakpoint_at_caller): Likewise.
4864         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4865         (symbol_to_sal): Likewise.
4866         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4867         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4868         to its initialization.
4869         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4870         init_sal references.  Move declarations closer to initializations.
4871         * source.c (get_current_source_symtab_and_line): Remove brace
4872         initialization.
4873         (set_current_source_symtab_and_line): Now takes the sal by const
4874         reference.  Remove brace initialization.
4875         (line_info): Remove init_sal reference.
4876         * source.h (set_current_source_symtab_and_line): Now takes a
4877         symtab_and_line via const reference.
4878         * stack.c (set_current_sal_from_frame): Adjust.
4879         (print_frame_info): Adjust.
4880         (get_last_displayed_sal): Return the sal via function return
4881         instead of via output parameter.  Simplify.
4882         (frame_info): Adjust.
4883         * stack.h (get_last_displayed_sal): Return the sal via function
4884         return instead of via output parameter.
4885         * symtab.c (init_sal): Delete.
4886         (find_pc_sect_line): Remove init_sal references.  Move
4887         declarations closer to initializations.
4888         (find_function_start_sal): Remove init_sal references.  Move
4889         declarations closer to initializations.
4890         * symtab.h (struct symtab_and_line): In-class initialize all
4891         fields.
4892         * tracepoint.c (set_traceframe_context)
4893         (print_one_static_tracepoint_marker): Remove init_sal references.
4894         Move declarations closer to initializations.
4895         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4896         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4897         declarations closer to initializations.
4898         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4899         init_sal references.  Adjust.
4900
4901 2017-09-04  Pedro Alves  <palves@redhat.com>
4902
4903         * ax-gdb.c (agent_command_1): Use range-for.
4904         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4905         * breakpoint.c: Include "common/array-view.h".
4906         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4907         parameter from struct symtabs_and_lines to
4908         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4909         (breakpoint_sals_to_pc): Change sals parameter from struct
4910         symtabs_and_lines to std::vector reference.
4911         (check_fast_tracepoint_sals): Change sals parameter from struct
4912         symtabs_and_lines to std::array_view.  Use range-for.
4913         (decode_static_tracepoint_spec): Return a std::vector instead of
4914         symtabs_and_lines.  Update.
4915         (create_breakpoint): Update.
4916         (break_range_command, until_break_command, clear_command): Update.
4917         (base_breakpoint_decode_location, bkpt_decode_location)
4918         (bkpt_probe_create_sals_from_location)
4919         (bkpt_probe_decode_location, tracepoint_decode_location)
4920         (tracepoint_probe_decode_location)
4921         (strace_marker_create_sals_from_location): Return a std::vector
4922         instead of symtabs_and_lines.
4923         (strace_marker_create_breakpoints_sal): Update.
4924         (strace_marker_decode_location): Return a std::vector instead of
4925         symtabs_and_lines.  Update.
4926         (update_breakpoint_locations): Change struct symtabs_and_lines
4927         parameters to gdb::array_view.  Adjust.
4928         (location_to_sals): Return a std::vector instead of
4929         symtabs_and_lines.  Update.
4930         (breakpoint_re_set_default): Use std::vector instead of struct
4931         symtabs_and_lines.
4932         (decode_location_default): Return a std::vector instead of
4933         symtabs_and_lines.  Update.
4934         * breakpoint.h: Include "common/array-view.h".
4935         (struct breakpoint_ops) <decode_location>: Now returns a
4936         std::vector instead of returning a symtabs_and_lines via output
4937         parameter.
4938         (update_breakpoint_locations): Change sals parameters to use
4939         gdb::array_view.
4940         * cli/cli-cmds.c (edit_command, list_command): Update to use
4941         std::vector and gdb::array_view.
4942         (ambiguous_line_spec): Adjust to use gdb::array_view and
4943         range-for.
4944         (compare_symtabs): Rename to ...
4945         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4946         const reference and adjust.
4947         (filter_sals): Rewrite using std::vector and standard algorithms.
4948         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4949         (jump_command): Update to use std::vector.
4950         * linespec.c (struct linespec_state) <canonical_names>: Update
4951         comment.
4952         (add_sal_to_sals_basic): Delete.
4953         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4954         (decode_line_2, create_sals_line_offset)
4955         (convert_address_location_to_sals, convert_linespec_to_sals)
4956         (convert_explicit_location_to_sals, parse_linespec)
4957         (event_location_to_sals, decode_line_full, decode_line_1)
4958         (decode_line_with_current_source)
4959         (decode_line_with_last_displayed, decode_objc)
4960         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4961         (linespec_result::~linespec_result): Adjust to use std::vector
4962         instead of symtabs_and_lines.
4963         * linespec.h (linespec_sals::sals): Now a std::vector.
4964         (struct linespec_result): Use std::vector, bool, and in-class
4965         initialization.
4966         (decode_line_1, decode_line_with_current_source)
4967         (decode_line_with_last_displayed): Return std::vector.
4968         * macrocmd.c (info_macros_command): Use std::vector.
4969         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4970         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4971         std::vector.
4972         * probe.h (parse_probes): Return a std::vector.
4973         * python/python.c (gdbpy_decode_line): Use std::vector and
4974         gdb::array_view.
4975         * source.c (select_source_symtab, line_info): Use std::vector.
4976         * stack.c (func_command): Use std::vector.
4977         * symtab.h (struct symtabs_and_lines): Delete.
4978         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4979
4980 2017-09-04  Pedro Alves  <palves@redhat.com>
4981
4982         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4983         unittests/array-view-selftests.c.
4984         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4985         * common/array-view.h: New file.
4986         * unittests/array-view-selftests.c: New file.
4987
4988 2017-09-04  Pedro Alves  <palves@redhat.com>
4989
4990         * cli/cli-cmds.c (edit_command): Pass message to
4991         ambiguous_line_spec.
4992         (list_command): Pass message to ambiguous_line_spec.  Say
4993         "first"/"last" instead of "start" and "end" to be consistent with
4994         the manual.
4995         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4996         them to print formatted message.
4997
4998 2017-09-04  Pedro Alves  <palves@redhat.com>
4999
5000         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5001         ftrace_update_insns by reference instead of pointer.
5002
5003 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5004
5005         * i386-go32-tdep.c: Include x86-xstate.h.
5006         (i386_go32_init_abi): Call i386_target_description.
5007         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5008         if xcr0 is X86_XSTATE_X87_MASK.
5009         * i386-tdep.h (tdesc_i386): Remove the declaration.
5010         (tdesc_i386_mmx): Likewise.
5011
5012 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5013
5014         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5015         X86_XSTATE_SSE_MASK instead of 0.
5016
5017 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5018
5019         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5020         i386_target_description.
5021         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5022         i386_target_description.
5023         * i386-tdep.c (i386_gdbarch_init): Likewise.
5024
5025 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5026
5027         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5028         (x86_darwin_init_abi_64): Call amd64_target_description.
5029         * amd64-dicos-tdep.c: Likewise.
5030         * amd64-fbsd-nat.c: Likewise.
5031         * amd64-fbsd-tdep.c: Likewise.
5032         * amd64-nbsd-tdep.c: Likewise.
5033         * amd64-obsd-tdep.c: Likewise.
5034         * amd64-sol2-tdep.c: Likewise.
5035         * amd64-windows-tdep.c: Likewise.
5036         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5037
5038 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5039
5040         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5041         (btrace_function) <insn>: Change type to use std::vector.
5042         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5043         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5044         ftrace_update_insns, ftrace_compute_global_level_offset,
5045         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5046         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5047         change to std::vector.
5048         (ftrace_update_insns): Adjust to change to std::vector, change
5049         type of INSN parameter.
5050         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5051         * record-btrace.c (btrace_call_history_insn_range,
5052         btrace_compute_src_line_range,
5053         record_btrace_frame_prev_register): Adjust to change to
5054         std::vector.
5055         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5056         to change to std::vector.
5057
5058 2017-09-03  Tom Tromey  <tom@tromey.com>
5059
5060         * corefile.c (reopen_exec_file): Use std::string.
5061
5062 2017-09-03  Tom Tromey  <tom@tromey.com>
5063
5064         * compile/compile.c (compile_register_name_mangled): Return
5065         std::string.
5066         * compile/compile-loc2c.c (pushf_register_address): Update.
5067         (pushf_register): Update.
5068         * compile/compile-c-types.c (convert_array): Update.
5069         * compile/compile-c-symbols.c (generate_vla_size): Update.
5070         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5071         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5072         (convert_one_symbol): Update.
5073         (generate_c_for_for_one_variable): Update.
5074         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5075         std::string.
5076         (generate_register_struct): Update.
5077         * compile/compile-internal.h (c_get_range_decl_name): Return a
5078         std::string.
5079         (compile_register_name_mangled): Return std::string.
5080
5081 2017-09-03  Tom Tromey  <tom@tromey.com>
5082
5083         * utils.c (perror_string): Return a std::string.
5084         (throw_perror_with_name, perror_warning_with_name): Update.
5085
5086 2017-09-03  Tom Tromey  <tom@tromey.com>
5087
5088         * demangle.c (demangle_command): Use std::string,
5089         unique_xmalloc_ptr.
5090
5091 2017-09-03  Tom Tromey  <tom@tromey.com>
5092
5093         * cli/cli-setshow.c (do_set_command): Use std::string.
5094
5095 2017-09-03  Tom Tromey  <tom@tromey.com>
5096
5097         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5098
5099 2017-09-03  Tom Tromey  <tom@tromey.com>
5100
5101         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5102
5103 2017-09-03  Tom Tromey  <tom@tromey.com>
5104
5105         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5106         gdb::unique_xmalloc_ptr.
5107
5108 2017-09-03  Tom Tromey  <tom@tromey.com>
5109
5110         * thread.c (print_thread_info_1): Use string_printf.
5111         (thread_apply_command, thread_apply_all_command): Use
5112         std::string.
5113
5114 2017-09-03  Tom Tromey  <tom@tromey.com>
5115
5116         * valprint.c (val_print_string): Update.
5117         * gdbcore.h (memory_error_message): Return std::string.
5118         * corefile.c (memory_error_message): Return std::string.
5119         (memory_error): Update.
5120         * breakpoint.c (insert_bp_location): Update.
5121
5122 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * target/waitstatus.h (target_waitstatus_to_string): Change
5125         return type to std::string.
5126         * target/waitstatus.c (target_waitstatus_to_string): Return
5127         std::string.
5128         * target.h (target_waitstatus_to_string): Remove declaration.
5129         * infrun.c (resume, clear_proceed_status_thread,
5130         print_target_wait_results, do_target_wait, save_waitstatus,
5131         stop_all_threads): Adjust.
5132         * record-btrace.c (record_btrace_wait): Adjust.
5133         * target-debug.h
5134         (target_debug_print_struct_target_waitstatus_p): Adjust.
5135
5136 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5137
5138         PR gdb/22046
5139         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5140         detection.
5141
5142 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5143
5144         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5145         for setting/unsetting environment variables on the remote target.
5146         (New remote packets): Add entries for QEnvironmentHexEncoded,
5147         QEnvironmentUnset and QEnvironmentReset.
5148         * common/environ.c (gdb_environ::operator=): Extend method to
5149         handle m_user_set_env_list and m_user_unset_env_list.
5150         (gdb_environ::clear): Likewise.
5151         (match_var_in_string): Change type of first parameter from 'char
5152         *' to 'const char *'.
5153         (gdb_environ::set): Extend method to handle
5154         m_user_set_env_list and m_user_unset_env_list.
5155         (gdb_environ::unset): Likewise.
5156         (gdb_environ::clear_user_set_env): New method.
5157         (gdb_environ::user_set_envp): Likewise.
5158         (gdb_environ::user_unset_envp): Likewise.
5159         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5160         m_user_unset_env_list on move constructor/assignment.
5161         (unset): Add new default parameter 'update_unset_list = true'.
5162         (clear_user_set_env): New method.
5163         (user_set_envp): Likewise.
5164         (user_unset_envp): Likewise.
5165         (m_user_set_env_list): New std::set.
5166         (m_user_unset_env_list): Likewise.
5167         * common/rsp-low.c (hex2str): New function.
5168         (bin2hex): New overload for bin2hex function.
5169         * common/rsp-low.c (hex2str): New prototype.
5170         (str2hex): New overload prototype.
5171         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5172         QEnvironmentUnset and QEnvironmentReset.
5173         (remote_protocol_features): Add QEnvironmentHexEncoded,
5174         QEnvironmentUnset and QEnvironmentReset packets.
5175         (send_environment_packet): New function.
5176         (extended_remote_environment_support): Likewise.
5177         (extended_remote_create_inferior): Call
5178         extended_remote_environment_support.
5179         (_initialize_remote): Add QEnvironmentHexEncoded,
5180         QEnvironmentUnset and QEnvironmentReset packet configs.
5181         * unittests/environ-selftests.c (gdb_selftest_env_var):
5182         New variable.
5183         (test_vector_initialization): New function.
5184         (test_init_from_host_environ): Likewise.
5185         (test_reinit_from_host_environ): Likewise.
5186         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5187         Likewise.
5188         (test_unset_set_empty_vector): Likewise.
5189         (test_vector_clear): Likewise.
5190         (test_std_move): Likewise.
5191         (test_move_constructor):
5192         (test_self_move): Likewise.
5193         (test_set_unset_reset): Likewise.
5194         (run_tests): Rewrite in terms of the functions above.
5195
5196 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5197
5198         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5199         (adi_available): Use a temp variable of type CORE_ADDR as argument
5200         3 when calling target_auxv_search.
5201         (adi_normalize_address): Use masks and xor operators to calculate
5202         normalized address.
5203         (adi_read_versions, adi_write_versions, adi_print_versions)
5204         (do_examine, do_assign): Use paddress.
5205
5206 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5207
5208         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5209         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5210         out of loop and add supply of FIR.
5211         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5212         add collect of FIR.
5213
5214 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5215
5216         PR gdb/21827
5217         * cli/cli-script.c (define_command): Don't convert command name
5218         to lower case.
5219
5220 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5221
5222         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5223         Update all callers accordingly. Remove all code blocks handling
5224         the case where DISPP is not NULL.
5225
5226 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5227
5228         PR symtab/22003
5229         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5230         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5231         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5232
5233 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5234
5235         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5236         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5237         (read_comp_units_from_section): New parameter abbrev_section, use
5238         read_and_check_comp_unit_head, allocate signatured_type if needed.
5239         (create_all_comp_units): Update read_comp_units_from_section caller.
5240
5241 2017-08-23  Pedro Alves  <palves@redhat.com>
5242
5243         PR remote/21852
5244         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5245         to null_ptid and switch to thread without reading the registers
5246         after adding the inferior.
5247
5248 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5249
5250         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5251         compile-gcc.
5252         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5253         (compile_to_object): Implement compile_gcc.
5254         (_initialize_compile): Install "set compile-gcc".  Initialize
5255         compile_gcc.
5256
5257 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5258
5259         * compile/compile.c (compile_to_object): Conditionally call
5260         set_verbose.  Conditionally call compile or compile_v0.
5261
5262 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5263
5264         * sparc64-tdep.h: (adi_normalize_address): New export.
5265         * sparc-nat.h: (open_adi_tag_fd): New export.
5266         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5267         * sparc64-linux-tdep.c:
5268         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5269         (sparc64_linux_handle_segmentation_fault): New function.
5270         (sparc64_linux_init_abi): Register
5271         sparc64_linux_handle_segmentation_fault
5272         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5273         (sparc64_addr_bits_remove): New function.
5274         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5275         (MAX_PROC_NAME_SIZE): New macro.
5276         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5277         (sparc64adilist): New variable.
5278         (adi_proc_list): New variable.
5279         (find_adi_info): New function.
5280         (add_adi_info): New function.
5281         (get_adi_info_proc): New function.
5282         (get_adi_info): New function.
5283         (info_adi_command): New function.
5284         (read_maps_entry): New function.
5285         (adi_available): New function.
5286         (adi_normalize_address): New function.
5287         (adi_align_address): New function.
5288         (adi_convert_byte_count): New function.
5289         (adi_tag_fd): New function.
5290         (adi_is_addr_mapped): New function.
5291         (adi_read_versions): New function.
5292         (adi_write_versions): New function.
5293         (adi_print_versions): New function.
5294         (do_examine): New function.
5295         (do_assign): New function.
5296         (adi_examine_command): New function.
5297         (adi_assign_command): New function.
5298         (_initialize_sparc64_adi_tdep): New function.
5299
5300 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5301
5302         * breakpoint.c (breakpoints_info): Rename to ...
5303         (info_breakpoints_command): ... this.
5304         (watchpoints_info): Rename to ...
5305         (info_watchpoints_command): ... this.
5306         (tracepoints_info): Rename to ...
5307         (info_tracepoints_command): ... this.
5308         (_initialize_breakpoint): Adjust.
5309         * dcache.c (dcache_info): Rename to ...
5310         (info_display_command): ... this.
5311         (_initialize_dcache): Adjust.
5312         * frame.h (args_info): Rename to ...
5313         (info_args_command): ... this.
5314         (locals_info): Rename to ...
5315         (info_locals_command): ... this.
5316         * infcmd.c (nofp_registers_info): Rename to ...
5317         (info_registers_command): ... this.
5318         (float_info): Rename to ...
5319         (info_float_command): ... this.
5320         (program_info): Rename to ...
5321         (info_program_command): ... this.
5322         (all_registers_info): Rename to ...
5323         (info_all_registers_command): ... this.
5324         (vector_info): Rename to ...
5325         (info_vector_command): ... this.
5326         (float_info): Rename to ...
5327         (info_float_command): ... this.
5328         (_initialize_infcmd): Adjust.
5329         * inferior.h (term_info): Rename to ...
5330         (info_terminal_command): ... this.
5331         * inflow.c (term_info): Rename to ...
5332         (info_terminal_command): ... this.
5333         (_initialize_inflow): Adjust.
5334         * infrun.c (signals_info): Rename to ...
5335         (info_signals_command): ... this.
5336         (_initialize_infrun): Adjust.
5337         * objc-lang.c (classes_info): Rename to ...
5338         (info_classes_command): ... this.
5339         (selectors_info): Rename to ...
5340         (info_selectors_command): ... this.
5341         (_initialize_objc_language): Adjust.
5342         * printcmd.c (sym_info): Rename to ...
5343         (info_symbol_command): ... this.
5344         (address_info): Rename to ...
5345         (info_address_command): ... this.
5346         (display_info): Rename to ...
5347         (info_display_command): ... this.
5348         (_initialize_printcmd): Adjust.
5349         * reverse.c (bookmarks_info): Rename to ...
5350         (info_breakpoints_command): ... this.
5351         (_initialize_reverse): Adjust.
5352         * ser-go32.c (dos_info): Rename to ...
5353         (info_serial_command): ... this.
5354         (_initialize_ser_dos): Adjust.
5355         * skip.c (skip_info): Rename to ...
5356         (info_skip_command): ... this.
5357         (_initialize_step_skip): Adjust.
5358         * source.c (line_info): Rename to ...
5359         (info_line_command): ... this.
5360         (source_info): Rename to ...
5361         (info_source_command)
5362         * stack.c (frame_info): Rename to ...
5363         (info_frame_command): ... this.
5364         (locals_info): Rename to ...
5365         (info_locals_command): ... this.
5366         (args_info): Rename to ...
5367         (info_args_command): ... this.
5368         (_initialize_stack): Adjust.
5369         * symtab.c (sources_info): Rename to ...
5370         (info_sources_command): ... this.
5371         (variables_info): Rename to ...
5372         (info_variables_command): ... this.
5373         (functions_info): Rename to ...
5374         (info_functions_command): ... this.
5375         (types_info): Rename to ...
5376         (info_types_command): ... this.
5377         (_initialize_symtab): Adjust.
5378         * target.c (target_info): Rename to ...
5379         (info_target_command): ... this.
5380         (initialize_targets): Adjust.
5381         * tracepoint.c (tvariables_info): Rename to ...
5382         (info_tvariables_command): ... this.
5383         (scope_info): Rename to ...
5384         (info_scope_command): ... this.
5385         (trace_dump_actions): Adjust.
5386         (_initialize_tracepoint): Adjust.
5387
5388 2017-08-22  Tom Tromey  <tom@tromey.com>
5389
5390         * breakpoint.h (install_breakpoint): Update.
5391         * breakpoint.c (add_solib_catchpoint): Update.
5392         (install_breakpoint): Change argument to a std::unique_ptr.
5393         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5394         (create_breakpoint_sal, create_breakpoint): Update.
5395         (watch_command_1, catch_exec_command_1)
5396         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5397         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5398         Return the breakpoint.
5399         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5400         (new_single_step_breakpoint): Update.
5401         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5402         std::unique_ptr.
5403         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5404         std::unique_ptr.
5405         * break-catch-sig.c (create_signal_catchpoint): Use
5406         std::unique_ptr.
5407         * ada-lang.c (create_ada_exception_catchpoint): Use
5408         std::unique_ptr.
5409
5410 2017-08-22  Tom Tromey  <tom@tromey.com>
5411
5412         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5413
5414 2017-08-22  Tom Tromey  <tom@tromey.com>
5415
5416         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5417         (lookup_partial_symbol): Update.
5418
5419 2017-08-22  Tom Tromey  <tom@tromey.com>
5420
5421         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5422         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5423         (find_and_open_source, symtab_to_fullname): Update.
5424         * psymtab.c (psymtab_to_fullname): Update.
5425
5426 2017-08-22  Tom Tromey  <tom@tromey.com>
5427
5428         * exec.c (exec_file_attach): Update.
5429         * linux-thread-db.c (try_thread_db_load): Update.
5430         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5431         * utils.c (gdb_realpath): Change return type.
5432         (gdb_realpath_keepfile): Update.
5433         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5434         (_initialize_utils): Register the new self test.
5435         * source.c (openp): Update.
5436         (find_and_open_source): Update.
5437         * nto-tdep.c (nto_find_and_open_solib): Update.
5438         * main.c (set_gdb_data_directory): Update.
5439         (captured_main_1): Update.
5440         * dwarf2read.c (dwarf2_get_dwz_file): Update
5441         (dw2_map_symbol_filenames): Update.
5442         * auto-load.c (auto_load_safe_path_vec_update): Update.
5443         (filename_is_in_auto_load_safe_path_vec): Change type of
5444         "filename_realp".
5445         (auto_load_objfile_script): Update.
5446         (file_is_auto_load_safe): Update.  Use std::string.
5447         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5448
5449 2017-08-22  Tom Tromey  <tom@tromey.com>
5450
5451         * utils.c (gdb_realpath_keepfile): Return a
5452         gdb::unique_xmalloc_ptr.
5453         * exec.c (exec_file_attach): Update.
5454         * utils.h (gdb_realpath_keepfile): Return a
5455         gdb::unique_xmalloc_ptr.
5456
5457 2017-08-22  Tom Tromey  <tom@tromey.com>
5458
5459         * compile/compile.c (compile_file_command): Use
5460         gdb::unique_xmalloc_ptr, std::string.
5461         * utils.c (gdb_abspath): Change return type.
5462         * source.c (openp): Update.
5463         * objfiles.c (allocate_objfile): Update.
5464         * main.c (set_gdb_data_directory): Update.
5465         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5466
5467 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5468
5469         * cli-cmds.c (list_commands): List actual code around more than
5470         one location.
5471
5472 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5473
5474         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5475
5476 2017-08-21  Pedro Alves  <palves@redhat.com>
5477
5478         PR gdb/19487
5479         * c-exp.y (variable production): Handle function aliases.
5480         * minsyms.c (msymbol_is_text): New function.
5481         * minsyms.h (msymbol_is_text): Declare.
5482         * symtab.c (find_function_alias_target): New function.
5483         * symtab.h (find_function_alias_target): Declare.
5484
5485 2017-08-21  Pedro Alves  <palves@redhat.com>
5486
5487         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5488         typedefs.
5489         * typeprint.c (whatis_exp): If handling "whatis", and expression
5490         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5491         typedefs here.
5492         * valops.c (value_cast): Save "to" type before resolving
5493         stubs/typedefs.  Use that type as resulting value's type.
5494
5495 2017-08-18  Tom Tromey  <tom@tromey.com>
5496             Pedro Alves  <palves@redhat.com>
5497
5498         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5499         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5500         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5501         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5502         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5503         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5504         (linux_get_siginfo_data): Add "thread" argument.  Use
5505         scoped_restore.
5506         * linux-nat.c (linux_child_follow_fork)
5507         (check_stopped_by_watchpoint): Use scoped_restore.
5508         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5509         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5510         (restore_inferior_ptid, save_inferior_ptid): Remove.
5511         * btrace.c (btrace_fetch): Use scoped_restore.
5512         * bsd-uthread.c (bsd_uthread_fetch_registers)
5513         (bsd_uthread_store_registers): Use scoped_restore.
5514         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5515         scoped_restore.
5516         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5517         (aix_thread_xfer_partial): Use scoped_restore.
5518         * inferior.h (save_inferior_ptid): Remove.
5519
5520 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5521
5522         PR tdep/21818
5523         * arm-tdep.c (gdb_print_insn_arm): Mark
5524         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5525
5526 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5527
5528         * NEWS: Mention GDBserver's new option "--selftest".
5529         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5530         * selftest.c: Move it to common/selftest.c.
5531         * selftest.h: Move it to common/selftest.h.
5532         * selftest-arch.c (reset): New function.
5533         (tests_with_arch): Call reset.
5534
5535 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5536
5537         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5538         instead of exception_fprintf and printf_filtered.
5539
5540 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5541
5542         * selftest.c (register_self_test): Rename it to
5543         selftests::register_test.
5544         (run_self_tests): selftest::run_tests.
5545         * selftest.h: Update declarations.
5546         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5547         selftests::register_test_foreach_arch.
5548         * selftest-arch.h: Update declaration.
5549         * aarch64-tdep.c: Update.
5550         * arm-tdep.c: Likewise.
5551         * disasm-selftests.c: Likewise.
5552         * dwarf2loc.c: Likewise.
5553         * dwarf2-frame.c: Likewise.
5554         * findvar.c: Likewise.
5555         * gdbarch-selftests.c: Likewise.
5556         * maint.c (maintenance_selftest): Likewise.
5557         * regcache.c: Likewise.
5558         * rust-exp.y: Likewise.
5559         * selftest-arch.c: Likewise.
5560         * unittests/environ-selftests.c: Likewise.
5561         * unittests/function-view-selftests.c: Likewise.
5562         * unittests/offset-type-selftests.c: Likewise.
5563         * unittests/optional-selftests.c: Likewise.
5564         * unittests/scoped_restore-selftests.c: Likewise.
5565         * utils-selftests.c: Likewise.
5566
5567 2017-08-17  Pedro Alves  <palves@redhat.com>
5568
5569         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5570         local.
5571
5572 2017-08-17  Pedro Alves  <palves@redhat.com>
5573
5574         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5575         field.
5576         (reset_die_in_process): Delete, replaced by ...
5577         (process_die_scope): ... this new class.  Make it responsible for
5578         freeing cu->line_header too.
5579         (process_die): Use process_die_scope.
5580         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5581         cu->line_header_die_owner.  Don't release the line header if it's
5582         owned by the CU.
5583         (setup_type_unit_groups): Make the CU/DIE own the line header.
5584         Don't release the line header here.
5585
5586 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5587
5588         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5589
5590 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5591
5592         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5593         Single-Key mode
5594
5595 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5596
5597         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5598         mode command list.
5599
5600 2017-08-15  Stafford Horne  <shorne@gmail.com>
5601
5602         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5603
5604 2017-08-15  Stafford Horne  <shorne@gmail.com>
5605
5606         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5607
5608 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5609
5610         PR gdb/21954
5611         * infcmd.c (unset_environment_command): Use the 'clear' method on
5612         the environment instead of resetting it.
5613
5614 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5615
5616         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5617         platforms.
5618
5619 2017-08-14  Tom Tromey  <tom@tromey.com>
5620
5621         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5622         (print_binary_chars): Likewise.
5623         (BITS_IN_BYTES): Remove.
5624
5625 2017-08-14  Tom Tromey  <tom@tromey.com>
5626
5627         PR gdb/21675
5628         * valprint.c (LOW_ZERO): Change value to 034.
5629         (print_octal_chars): Add static_asserts for octal constants.
5630         * printcmd.c (print_scalar_formatted): Add 'd' case.
5631
5632 2017-08-11  Tom Tromey  <tom@tromey.com>
5633
5634         * symfile.c (add_symbol_file_command): Use std::vector.
5635
5636 2017-08-14  Tom Tromey  <tom@tromey.com>
5637
5638         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5639         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5640         std::move.
5641         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5642
5643 2017-08-11  Pedro Alves  <palves@redhat.com>
5644
5645         * infrun.c (process_event_stop_test): Adjust
5646         function_name_is_marked_for_skip call.
5647         * skip.c: Include <list>.
5648         (skiplist_entry): Make it a class with private fields, and
5649         getters/setters.
5650         (skiplist_entry_chain): Delete.
5651         (skiplist_entries): New.
5652         (skiplist_entry_count): Delete.
5653         (highest_skiplist_entry_num): New.
5654         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5655         (add_skiplist_entry): Delete.
5656         (skiplist_entry::skiplist_entry): New.
5657         (skiplist_entry::add_entry): New.
5658         (skip_file_command, skip_function): Adjust.
5659         (compile_skip_regexp): Delete.
5660         (skip_command): Don't compile regexp here.  Adjust to use
5661         skiplist_entry::add_entry.
5662         (skip_info): Adjust to use range-for and getters.
5663         (skip_enable_command, skip_disable_command): Adjust to use
5664         range-for and setters.
5665         (skip_delete_command): Adjust to use std::list.
5666         (add_skiplist_entry): Delete.
5667         (skip_file_p): Delete, refactored as ...
5668         (skiplist_entry::do_skip_file_p): ... this new method.
5669         (skip_gfile_p): Delete, refactored as ...
5670         (skiplist_entry::do_gskip_file_p): ... this new method.
5671         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5672         (skiplist_entry::skip_function_p): ... this new method.
5673         (function_name_is_marked_for_skip): Now returns bool, and takes
5674         the function sal by const reference.  Adjust to use range-for and
5675         skiplist_entry methods.
5676         (_initialize_step_skip): Remove references to
5677         skiplist_entry_chain, skiplist_entry_count.
5678         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5679         takes the function sal by const reference.
5680
5681 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5682
5683         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5684         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5685         (dwarf2_frame_cache):
5686         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5687         RETURN_MASK_ALL and set *this_case to NULL.
5688         * frame-unwind.h: Update comments.
5689
5690 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5691
5692         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5693         (dwarf2_frame_state_copy_regs): Remove.
5694         (dwarf2_frame_state_free_regs): Remove.
5695         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5696         (dwarf2_restore_rule): Call method .alloc_regs instead of
5697         dwarf2_frame_state_alloc_regs.
5698         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5699         constructor.  Call std::move.
5700         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5701         (dwarf2_frame_cache): Likewise.
5702
5703         [GDB_SELF_TEST]: Include selftest.h and
5704         selftest-arch.h.
5705         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5706         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5707         execute_cfa_program_test.
5708
5709         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5710         copy ctor, assignment operator, move assignment.
5711         <alloc_regs>: New method.
5712         <swap>: New method.
5713         (struct dwarf2_frame_state): Delete dtor.
5714         (dwarf2_frame_state_alloc_regs): Remove declaration.
5715         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5716         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5717
5718 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5719
5720         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5721         (dwarf2_frame_state::dwarf2_frame_state): New.
5722         (dwarf2_frame_state::~dwarf2_frame_state): New.
5723         (dwarf2_fetch_cfa_info): Update.
5724         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5725         rather than a pointer.  Update code.
5726         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5727         dtor.
5728         <data_align, code_align, retaddr_column>: Change them to const.
5729         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5730         to bool.
5731
5732 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5733
5734         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5735         <loc.exp>: New field.
5736         * dwarf2-frame.c (execute_cfa_program): Update.
5737         (dwarf2_frame_prev_register): Update.
5738
5739 2017-08-10  Pedro Alves  <palves@redhat.com>
5740
5741         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5742
5743 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5744
5745         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5746         (fbsd_pending_children): Use std::list.
5747         (fbsd_remember_child): Likewise.
5748         (fbsd_is_child_pending): Likewise.
5749         (fbsd_pending_vfork_done): Use std::forward_list.
5750         (fbsd_add_vfork_done): Likewise.
5751         (fbsd_is_vfork_done_pending): Likewise.
5752         (fbsd_next_vfork_done): Likewise.
5753
5754 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5755
5756         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5757         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5758         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5759         for `mapfilename'.
5760         (fbsd_xfer_partial): Use gdb::byte_vector.
5761         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5762
5763 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5764
5765         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5766         "filestuff.h".
5767         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5768
5769 2017-08-09  Tom Tromey  <tom@tromey.com>
5770
5771         * skip.c (skiplist_entry): New constructor.
5772         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5773         (skiplist_entry::file_is_glob): Now bool.
5774         (skiplist_entry::file, skiplist_entry::function): Now
5775         std::string.
5776         (make_skip_entry): Return a unique_ptr.  Use new.
5777         (free_skiplist_entry, free_skiplist_entry_cleanup)
5778         (make_free_skiplist_entry_cleanup): Remove.
5779         (skip_command, skip_disable_command, add_skiplist_entry)
5780         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5781         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5782         (function_name_is_marked_for_skip): Update.
5783         (skip_delete_command): Update.  Use delete.
5784
5785 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5786
5787         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5788         (aarch64_linux_core_read_description): New function.
5789         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5790
5791 2017-08-09  Pedro Alves  <palves@redhat.com>
5792
5793         * cp-name-parser.y (cp_comp_to_string): Return a
5794         gdb::unique_xmalloc_ptr<char>.
5795         * cp-support.c (replace_typedefs_qualified_name)
5796         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5797         (cp_canonicalize_string_full): Use op= instead of explicit
5798         convertion.
5799         (cp_class_name_from_physname, method_name_from_physname)
5800         (cp_func_name, cp_remove_params): Adjust to use
5801         gdb::unique_xmalloc_ptr<char>.
5802         * cp-support.h (cp_comp_to_string): Return a
5803         gdb::unique_xmalloc_ptr<char>.
5804         * python/py-type.c (typy_lookup_type): Adjust to use
5805         gdb::unique_xmalloc_ptr<char>.
5806
5807 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5808
5809         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5810
5811 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5812             Yao Qi  <yao.qi@linaro.org>
5813
5814         * cp-support.c (cp_canonicalize_string_full): Use
5815         gdb::unique_xmalloc_ptr<char>.
5816         (cp_canonicalize_string): Likewise.
5817
5818 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5819
5820         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5821         * regformats/i386/amd64-avx-avx512.dat: Remove.
5822         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5823         * regformats/i386/amd64-avx-mpx.dat:Remove.
5824         * regformats/i386/amd64-avx.dat: Remove.
5825         * regformats/i386/amd64-mpx.dat: Remove.
5826         * regformats/i386/i386-avx-avx512.dat: Remove.
5827         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5828         * regformats/i386/i386-avx-mpx.dat: Remove.
5829         * regformats/i386/i386-mmx.dat: Remove.
5830         * regformats/i386/i386-mpx.dat: Remove.
5831
5832 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5833
5834         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5835         * amd64-tdep.c: Don't include features/i386/x32*.c.
5836         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5837         functions.
5838         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5839         and i386/x32-avx-avx512.
5840         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5841         and i386/x32.xml.
5842         * features/i386/x32-avx-avx512.c: Removed.
5843         * features/i386/x32-avx-avx512.xml: Removed.
5844         * features/i386/x32-avx.c: Removed.
5845         * features/i386/x32-avx.xml: Removed.
5846         * features/i386/x32.c: Removed.
5847         * features/i386/x32.xml: Removed.
5848         * regformats/i386/x32-avx-avx512.dat: Removed.
5849         * regformats/i386/x32-avx.dat: Removed.
5850         * regformats/i386/x32.dat: Removed.
5851
5852 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5853
5854         PR breakpoints/21886
5855         * mem-break.c (default_memory_insert_breakpoint): Use
5856         `->placed_address' rather than `->reqstd_address' for the
5857         breakpoint location.
5858
5859 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5860
5861         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5862         assertions.
5863
5864 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5865
5866         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5867         a union of `tdep_info', `tdesc_data' and `id'.
5868         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5869         rather than `info.tdep_info'.
5870         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5871         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5872         * i386-tdep.c (i386_gdbarch_init): Likewise.
5873         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5874         * mips-tdep.c (mips_gdbarch_init): Likewise.
5875         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5876         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5877         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5878         `info.tdep_info'.
5879         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5880         `info.tdep_info'.
5881         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5882         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5883         `info.tdep_info'.
5884         * spu-tdep.c (spu_gdbarch_init): Likewise.
5885         * gdbarch.h: Regenerate.
5886
5887 2017-08-07  Leszek Swirski  <leszeks@google.com>
5888
5889         PR symtab/20899
5890         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5891
5892 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5893
5894         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5895         (gdbsim_open): Rename gdb_argv args object to argv.
5896
5897 2017-08-05  Tom Tromey  <tom@tromey.com>
5898
5899         * compile/compile-object-load.c (compile_object_load): Use
5900         gdb::unique_xmalloc_ptr.
5901         * cli/cli-dump.c (scan_filename): Rename from
5902         scan_filename_with_cleanup.  Change return type.
5903         (scan_expression): Rename from scan_expression_with_cleanup.
5904         Change return type.
5905         (dump_memory_to_file, dump_value_to_file, restore_command):
5906         Use gdb::unique_xmalloc_ptr.  Update.
5907         * cli/cli-cmds.c (find_and_open_script): Use
5908         gdb::unique_xmalloc_ptr.
5909         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5910         * symmisc.c (maintenance_print_symbols)
5911         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5912         * symfile.c (symfile_bfd_open, generic_load)
5913         (add_symbol_file_command, remove_symbol_file_command): Use
5914         gdb::unique_xmalloc_ptr.
5915         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5916         * psymtab.c (maintenance_print_psymbols): Use
5917         gdb::unique_xmalloc_ptr.
5918         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5919         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5920         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5921         (reload_shared_libraries_1): Likewise.
5922
5923 2017-08-05  Tom Tromey  <tom@tromey.com>
5924
5925         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5926         (rust_op_vector, rust_set_vector): New typedefs.
5927         (current_parser): New global.
5928         (work_obstack): Change to pointer type.  Update all users.
5929         (rust_ast, pstate): Remove globals.
5930         (struct rust_parser): New.
5931         (%union) <params, field_inits>: Change type.
5932         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5933         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5934         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5935         (convert_params_to_types, convert_params_to_expression): Change
5936         type of "params".
5937         (ast_string): Change type of "fields".
5938         (rust_parse): Make a rust_parser.  Remove cleanups.
5939         (rust_lex_tests): Make and install an auto_obstack.
5940
5941 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5942
5943         * configure.srv (ipa_x32_linux_regobj): New.
5944         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5945         instead of X86_TDESC_AVX512.
5946         (initialize_low_tracepoint): Call
5947         init_registers_x32_avx_avx512_linux.
5948
5949 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5950
5951         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5952
5953 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5954
5955         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5956
5957 2017-08-03  Tom Tromey  <tom@tromey.com>
5958
5959         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5960         Remove.
5961         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5962
5963 2017-08-03  Tom Tromey  <tom@tromey.com>
5964
5965         * python/py-param.c (compute_enum_values): Use gdb_argv.
5966
5967 2017-08-03  Tom Tromey  <tom@tromey.com>
5968
5969         * utils.h (struct gdb_argv_deleter): New.
5970         (gdb_argv): New class.
5971         * utils.c (gdb_argv::reset): New method.
5972         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5973         * tracefile.c (tsave_command): Use gdb_argv.
5974         * top.c (new_ui_command): Use gdb_argv.
5975         * symmisc.c (maintenance_print_symbols)
5976         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5977         * symfile.c (symbol_file_command, generic_load)
5978         (remove_symbol_file_command): Use gdb_argv.
5979         * stack.c (backtrace_command): Use gdb_argv.
5980         * source.c (add_path, show_substitute_path_command)
5981         (unset_substitute_path_command, set_substitute_path_command):
5982         Use gdb_argv.
5983         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5984         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5985         * remote.c (extended_remote_run, remote_put_command)
5986         (remote_get_command, remote_delete_command): Use gdb_argv.
5987         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5988         (gdbsim_open): Use gdb_argv.
5989         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5990         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5991         * procfs.c (procfs_info_proc): Use gdb_argv.
5992         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5993         * infrun.c (handle_command): Use gdb_argv.
5994         * inferior.c (add_inferior_command, clone_inferior_command):
5995         Use gdb_argv.
5996         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5997         * exec.c (exec_file_command): Use gdb_argv.
5998         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5999         * compile/compile.c (build_argc_argv): Use gdb_argv.
6000
6001 2017-08-03  Tom Tromey  <tom@tromey.com>
6002
6003         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6004
6005 2017-08-03  Tom Tromey  <tom@tromey.com>
6006
6007         * python/python.c (compute_python_string): Return std::string.
6008         (gdbpy_eval_from_control_command): Update.
6009         (do_start_initialization): Use std::string.
6010         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6011         xstrprintf.
6012         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6013         xstrprintf.
6014
6015 2017-08-03  Tom Tromey  <tom@tromey.com>
6016
6017         * top.h (do_restore_instream_cleanup): Remove.
6018         * top.c (do_restore_instream_cleanup): Remove.
6019         (read_command_file): Use scoped_restore.
6020         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6021
6022 2017-08-03  Tom Tromey  <tom@tromey.com>
6023
6024         * cli/cli-script.c (execute_user_command)
6025         (execute_control_command): Use scoped_restore.
6026
6027 2017-08-03  Tom Tromey  <tom@tromey.com>
6028
6029         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6030         (execute_user_command): Remove user_call_depth; use
6031         user_args_stack's size instead.
6032
6033 2017-08-03  Tom Tromey  <tom@tromey.com>
6034
6035         * top.h (in_user_command): Remove.
6036         * top.c (in_user_command): Remove.
6037         * cli/cli-script.c (do_restore_user_call_depth)
6038         (execute_user_command): Update.
6039
6040 2017-08-03  Tom Tromey  <tom@tromey.com>
6041
6042         * valops.c (search_struct_method): Use gdb::byte_vector.
6043         * valarith.c (value_concat): Use std::vector.
6044         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6045         (simple_search_memory): Likewise.
6046         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6047         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6048         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6049         * elfread.c (elf_rel_plt_read): Use std::string.
6050         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6051         * cli/cli-dump.c (restore_section_callback): Use
6052         gdb::byte_vector.
6053
6054 2017-08-03  Tom Tromey  <tom@tromey.com>
6055
6056         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6057
6058 2017-08-03  Tom Tromey  <tom@tromey.com>
6059
6060         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6061         (tui_register_format): Use scoped_restore.
6062
6063 2017-08-03  Tom Tromey  <tom@tromey.com>
6064
6065         * reverse.c (exec_direction_default): Remove.
6066         (exec_reverse_once): Use scoped_restore.
6067         * remote.c (restore_remote_timeout): Remove.
6068         (remote_flash_erase, remote_flash_write, remote_flash_done)
6069         (readchar, remote_serial_write): Use scoped_restore.
6070         * cli/cli-script.c (struct source_cleanup_lines_args)
6071         (source_cleanup_lines): Remove.
6072         (script_from_file): Use scoped_restore.
6073         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6074         (source_command): Use scoped_restore.
6075
6076 2017-08-03  Tom Tromey  <tom@tromey.com>
6077
6078         * utils.h (make_cleanup_free_so): Remove.
6079         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6080         * solist.h (struct so_deleter): New.
6081         (so_list_up): New typedef.
6082         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6083
6084 2017-08-03  Tom Tromey  <tom@tromey.com>
6085
6086         * utils.h (make_cleanup_restore_current_language): Remove.
6087         * utils.c (do_restore_current_language)
6088         (make_cleanup_restore_current_language): Remove.
6089         * parse.c (parse_exp_in_context_1)
6090         (parse_expression_with_language): Use
6091         scoped_restore_current_language.
6092         * mi/mi-main.c (mi_cmd_execute): Use
6093         scoped_restore_current_language.
6094         * language.h (scoped_restore_current_language): New class.
6095
6096 2017-08-03  Tom Tromey  <tom@tromey.com>
6097
6098         * compile/compile.c (cleanup_unlink_file): Remove.
6099         (compile_to_object): Use gdb::unlinker.
6100         (eval_compile_command): Likewise.
6101
6102 2017-08-03  Tom Tromey  <tom@tromey.com>
6103
6104         * utils.h (make_cleanup_fclose): Remove.
6105         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6106
6107 2017-08-03  Tom Tromey  <tom@tromey.com>
6108
6109         * top.c (open_terminal_stream): Return gdb_file_up.
6110         (new_ui_command): Update.
6111
6112 2017-08-03  Tom Tromey  <tom@tromey.com>
6113
6114         * source.c (print_source_lines_base, forward_search_command)
6115         (reverse_search_command): Use gdb_file_up.
6116
6117 2017-08-03  Tom Tromey  <tom@tromey.com>
6118
6119         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6120
6121 2017-08-03  Tom Tromey  <tom@tromey.com>
6122
6123         * cli/cli-cmds.c (find_and_open_script): Change return type.
6124         Remove "streamp" and "full_path" parameters.
6125         (source_script_with_search): Update.
6126         * auto-load.c (source_script_file): Update.
6127         * cli/cli-cmds.h (find_and_open_script): Change type.
6128         (open_script): New struct.
6129
6130 2017-08-03  Tom Tromey  <tom@tromey.com>
6131
6132         * xml-support.c (xml_fetch_content_from_file): Update.
6133         * ui-file.c (stdio_file::open): Update.
6134         * tracefile-tfile.c (tfile_start): Update.
6135         * remote.c (remote_file_put, remote_file_get): Update.
6136         * nat/linux-procfs.c (linux_proc_get_int)
6137         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6138         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6139         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6140         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6141         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6142         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6143         * linux-nat.c (linux_proc_pending_signals): Update.
6144         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6145         (file_closer): Remove.
6146         * compile/compile.c (compile_to_object): Update.
6147         * common/filestuff.h (struct gdb_file_deleter): New.
6148         (gdb_file_up): New typedef.
6149         (gdb_fopen_cloexec): Change return type.
6150         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6151         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6152         (dump_binary_file, restore_binary_file): Update.
6153         * auto-load.c (auto_load_objfile_script_1): Update.
6154
6155 2017-08-03  Tom Tromey  <tom@tromey.com>
6156
6157         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6158         (info_static_tracepoint_markers_command): Likewise.
6159         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6160         * skip.c (skip_info): Use ui_out_emit_table.
6161         * progspace.c (print_program_space): Use ui_out_emit_table.
6162         * osdata.c (info_osdata): Use ui_out_emit_table.
6163         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6164         ui_out_emit_table.
6165         * linux-thread-db.c (info_auto_load_libthread_db): Use
6166         ui_out_emit_table.
6167         * inferior.c (print_inferior): Use ui_out_emit_table.
6168         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6169         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6170         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6171         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6172         * ui-out.h (class ui_out_emit_table): New.
6173
6174 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6175
6176         * mips-tdep.c (mips_fpu_type_str): New function.
6177         (mips_dump_tdep): Call it.
6178
6179 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6180
6181         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6182         `->mips_fpu_type'.
6183
6184 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6185
6186         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6187
6188 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6189
6190         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6191
6192 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6193
6194         * cli/cli-cmds.c (maintenancechecklist): New variable.
6195         * gdbcmd.h (maintenancechecklist): Declare it.
6196         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6197         Call i386_linux_read_description with different masks.
6198         * maint.c (maintenance_check_command): New function.
6199         (_initialize_maint_cmds): Call add_prefix_cmd.
6200         * target-descriptions.c (tdesc_reg): override operator != and ==.
6201         (tdesc_type): Likewise.
6202         (tdesc_feature): Likewise.
6203         (target_desc): Likewise.
6204         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6205         (maintenance_check_xml_descriptions): New function.
6206         (_initialize_target_descriptions) Add command "xml-descriptions".
6207         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6208
6209 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6210
6211         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6212         Include features/i386/32bit-*.c.
6213         (i386_linux_read_description): Generate target description if it
6214         doesn't exist.
6215         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6216         functions.
6217         * features/i386/32bit-linux.c: Re-generated.
6218         * features/i386/32bit-sse.c: Likewise.
6219         * target-descriptions.c (print_c_feature::visit): Print code to
6220         set register number if needed.
6221         (print_c_feature) <m_next_regnum>: New field.
6222
6223 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6224
6225         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6226         (FEATURE_XMLFILES): New.
6227         (FEATURE_CFILES): New.
6228         New rules.
6229         (clean-cfiles): Remove generated c files.
6230         * features/i386/32bit-avx.c: Generated.
6231         * features/i386/32bit-avx512.c: Generated.
6232         * features/i386/32bit-core.c: Generated.
6233         * features/i386/32bit-linux.c: Generated.
6234         * features/i386/32bit-mpx.c: Generated.
6235         * features/i386/32bit-pkeys.c: Generated.
6236         * features/i386/32bit-sse.c: Generated.
6237         * target-descriptions.c: Include algorithm.
6238         (tdesc_element_visitor): Add method visit_end.
6239         (print_c_tdesc): Implement visit_end.
6240         (print_c_tdesc:: m_filename_after_features): Move it to
6241         protected.
6242         (print_c_feature): New class.
6243         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6244         name starts with "i386/32bit-".
6245
6246 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6247
6248         * target-descriptions.c (tdesc_element_visitor): New class.
6249         (tdesc_element): New class.
6250         (tdesc_reg): Inherit from tdesc_element.
6251         (tdesc_reg::accept): New function.
6252         (tdesc_type): Inherit from tdesc_element.
6253         (tdesc_type::accept): New function.
6254         (tdesc_feature): Inherit from tdesc_element.
6255         (tdesc_feature::accept): New function.
6256         (target_desc): Inherit from tdesc_element.
6257         (target_desc::target_desc): New.
6258         (target_desc::~target_desc): New.
6259         (target_desc::accept): New.
6260         (allocate_target_description): Use new.
6261         (free_target_description): Use delete.
6262         (print_c_tdesc): New class.
6263         (maint_print_c_tdesc_cmd): Adjust.
6264
6265         * features/aarch64.c: Re-generated.
6266         * features/arc-arcompact.c: Re-generated.
6267         * features/arc-v2.c: Re-generated.
6268         * features/arm/arm-with-iwmmxt.c: Re-generated.
6269         * features/arm/arm-with-m.c: Re-generated.
6270         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6271         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6272         * features/arm/arm-with-neon.c: Re-generated.
6273         * features/arm/arm-with-vfpv2.c: Re-generated.
6274         * features/arm/arm-with-vfpv3.c: Re-generated.
6275         * features/i386/amd64-avx-avx512.c: Re-generated.
6276         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6277         * features/i386/amd64-avx.c: Re-generated.
6278         * features/i386/amd64-avx-linux.c: Re-generated.
6279         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6280         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6281         * features/i386/amd64-avx-mpx.c: Re-generated.
6282         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6283         * features/i386/amd64.c: Re-generated.
6284         * features/i386/amd64-linux.c: Re-generated.
6285         * features/i386/amd64-mpx.c: Re-generated.
6286         * features/i386/amd64-mpx-linux.c: Re-generated.
6287         * features/i386/i386-avx-avx512.c: Re-generated.
6288         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6289         * features/i386/i386-avx.c: Re-generated.
6290         * features/i386/i386-avx-linux.c: Re-generated.
6291         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6292         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6293         * features/i386/i386-avx-mpx.c: Re-generated.
6294         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6295         * features/i386/i386.c: Re-generated.
6296         * features/i386/i386-linux.c: Re-generated.
6297         * features/i386/i386-mmx.c: Re-generated.
6298         * features/i386/i386-mmx-linux.c: Re-generated.
6299         * features/i386/i386-mpx.c: Re-generated.
6300         * features/i386/i386-mpx-linux.c: Re-generated.
6301         * features/i386/x32-avx-avx512.c: Re-generated.
6302         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6303         * features/i386/x32-avx.c: Re-generated.
6304         * features/i386/x32-avx-linux.c: Re-generated.
6305         * features/i386/x32.c: Re-generated.
6306         * features/i386/x32-linux.c: Re-generated.
6307         * features/microblaze.c: Re-generated.
6308         * features/microblaze-with-stack-protect.c: Re-generated.
6309         * features/mips64-dsp-linux.c: Re-generated.
6310         * features/mips64-linux.c: Re-generated.
6311         * features/mips-dsp-linux.c: Re-generated.
6312         * features/mips-linux.c: Re-generated.
6313         * features/nds32.c: Re-generated.
6314         * features/nios2.c: Re-generated.
6315         * features/nios2-linux.c: Re-generated.
6316         * features/rs6000/powerpc-32.c: Re-generated.
6317         * features/rs6000/powerpc-32l.c: Re-generated.
6318         * features/rs6000/powerpc-403.c: Re-generated.
6319         * features/rs6000/powerpc-403gc.c : Re-generated.
6320         * features/rs6000/powerpc-405.c: Re-generated.
6321         * features/rs6000/powerpc-505.c: Re-generated.
6322         * features/rs6000/powerpc-601.c: Re-generated.
6323         * features/rs6000/powerpc-602.c: Re-generated.
6324         * features/rs6000/powerpc-603.c: Re-generated.
6325         * features/rs6000/powerpc-604.c: Re-generated.
6326         * features/rs6000/powerpc-64.c: Re-generated.
6327         * features/rs6000/powerpc-64l.c: Re-generated.
6328         * features/rs6000/powerpc-7400.c: Re-generated.
6329         * features/rs6000/powerpc-750.c: Re-generated.
6330         * features/rs6000/powerpc-860.c: Re-generated.
6331         * features/rs6000/powerpc-altivec32.c: Re-generated.
6332         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6333         * features/rs6000/powerpc-altivec64.c: Re-generated.
6334         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6335         * features/rs6000/powerpc-cell32l.c: Re-generated.
6336         * features/rs6000/powerpc-cell64l.c: Re-generated.
6337         * features/rs6000/powerpc-e500.c: Re-generated.
6338         * features/rs6000/powerpc-e500l.c: Re-generated.
6339         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6340         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6341         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6342         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6343         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6344         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6345         * features/rs6000/powerpc-vsx32.c: Re-generated.
6346         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6347         * features/rs6000/powerpc-vsx64.c: Re-generated.
6348         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6349         * features/rs6000/rs6000.c: Re-generated.
6350         * features/s390-linux32.c: Re-generated.
6351         * features/s390-linux32v1.c: Re-generated.
6352         * features/s390-linux32v2.c: Re-generated.
6353         * features/s390-linux64.c: Re-generated.
6354         * features/s390-linux64v1.c: Re-generated.
6355         * features/s390-linux64v2.c: Re-generated.
6356         * features/s390-te-linux64.c: Re-generated.
6357         * features/s390-tevx-linux64.c: Re-generated.
6358         * features/s390-vx-linux64.c: Re-generated.
6359         * features/s390x-linux64.c: Re-generated.
6360         * features/s390x-linux64v1.c: Re-generated.
6361         * features/s390x-linux64v2.c: Re-generated.
6362         * features/s390x-te-linux64.c: Re-generated.
6363         * features/s390x-tevx-linux64.c: Re-generated.
6364         * features/s390x-vx-linux64.c: Re-generated.
6365         * features/sparc/sparc32-solaris.c: Re-generated.
6366         * features/sparc/sparc64-solaris.c: Re-generated.
6367         * features/tic6x-c62x.c: Re-generated.
6368         * features/tic6x-c62x-linux.c: Re-generated.
6369         * features/tic6x-c64x.c: Re-generated.
6370         * features/tic6x-c64x-linux.c: Re-generated.
6371         * features/tic6x-c64xp.c: Re-generated.
6372         * features/tic6x-c64xp-linux.c: Re-generated.
6373
6374 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6375
6376         * i386-linux-tdep.c (i386_linux_read_description): New function.
6377         (i386_linux_core_read_description): Call
6378         i386_linux_read_description.
6379         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6380         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6381         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6382         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6383         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6384         * x86-linux-nat.c (x86_linux_read_description): Call
6385         i386_linux_read_description.
6386
6387 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6388
6389         * NEWS: Mention it.
6390         * features/Makefile (%.c: %.xml): Pass the xml file name to
6391         command "maint print c-tdesc".
6392         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6393         name from 'arg'.
6394
6395 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6396
6397         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6398         in-class initialization.
6399         (tdesc_create_feature): Call new instead of XCNEW.
6400         (free_target_description): Ue delete.
6401
6402 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6403
6404         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6405
6406 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6407
6408         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6409         constant.
6410         (amd64_x32_init_abi): Likewise.
6411         * amd64-tdep.h (amd64_init_abi): Update declaration.
6412         (amd64_x32_init_abi): Likewise.
6413
6414 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6415
6416         PR tdep/21717
6417         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6418         condition for FPSCR.
6419         (arm_linux_store_inferior_registers): Likewise.
6420
6421 2017-07-22  Tom Tromey  <tom@tromey.com>
6422
6423         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6424         <syscalls_counts>: Now a std::vector.
6425         (get_catch_syscall_inferior_data): Use "new".
6426         (catch_syscall_inferior_data_cleanup): Use "delete".
6427         (insert_catch_syscall, remove_catch_syscall)
6428         (clear_syscall_counts): Update.
6429
6430 2017-07-22  Tom Tromey  <tom@tromey.com>
6431
6432         * break-catch-syscall.c (syscall_catchpoint)
6433         <syscalls_to_be_caught>: Now a std::vector<int>
6434         (~syscall_catchpoint): Remove.
6435         (insert_catch_syscall, remove_catch_syscall)
6436         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6437         (print_mention_catch_syscall, print_recreate_catch_syscall):
6438         Update.
6439         (create_syscall_event_catchpoint): Change type of "filter"
6440         parameter.
6441         (catch_syscall_split_args): Return a std::vector.
6442         (catch_syscall_command_1, catching_syscall_number_1): Update.
6443
6444 2017-07-22  Tom Tromey  <tom@tromey.com>
6445
6446         * break-catch-throw.c (struct exception_catchpoint)
6447         <exception_rx>: Now a std::string.
6448         (~exception_catchpoint): Remove.
6449         (print_one_detail_exception_catchpoint): Update.
6450         (handle_gnu_v3_exceptions): Change type of except_rx.
6451         (extract_exception_regexp): Return a std::string.
6452         (catch_exception_command_1): Update.
6453
6454 2017-07-22  Tom Tromey  <tom@tromey.com>
6455
6456         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6457         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6458         std::vector.
6459         <catch_all>: Now a bool.
6460         (~signal_catchpoint): Remove.
6461         (signal_catchpoint_insert_location)
6462         (signal_catchpoint_remove_location)
6463         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6464         (signal_catchpoint_print_mention)
6465         (signal_catchpoint_print_recreate)
6466         (signal_catchpoint_explains_signal): Update.
6467         (create_signal_catchpoint): Change type of "filter" and
6468         "catch_all".
6469         (catch_signal_split_args): Return a std::vector.  Change type of
6470         "catch_all".
6471         (catch_signal_command): Update.
6472
6473 2017-07-20  Pedro Alves  <palves@redhat.com>
6474
6475         * ada-lang.c (ada_language_defn): Make extern.
6476         (_initialize_ada_language): Remove add_language call.
6477         * c-lang.c (c_language_defn, cplus_language_defn)
6478         (asm_language_defn, minimal_language_defn): Make extern.
6479         (_initialize_c_language): Delete.
6480         * completer.c (compare_cstrings): Delete, moved to utils.h.
6481         * d-lang.c (d_language_defn): Make extern.
6482         (_initialize_d_language): Remove add_language calls.
6483         * defs.h (enum language): Add comment.
6484         * f-lang.c (f_language_defn): Make extern.
6485         (_initialize_f_language): Remove add_language call.
6486         * go-lang.c (go_language_defn): Make extern.
6487         (_initialize_go_language): Remove add_language call.
6488         * language.c: Include <algorithm>.
6489         (languages): Redefine as const array.
6490         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6491         (set_language_command): Handle "local".  Use for-range loop.
6492         (set_language): Remove loop.
6493         (language_enum): Rewrite.
6494         (language_def, language_str): Remove loops.
6495         (add_language): Delete.
6496         (add_set_language_command): New, based on add_languages.
6497         (skip_language_trampoline): Adjust.
6498         (local_language_defn): Delete.
6499         (language_gdbarch_post_init): Adjust.
6500         (_initialize_language): Remove add_language calls.  Call
6501         add_set_language_command.
6502         * language.h (add_language): Delete.
6503         (auto_language_defn)
6504         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6505         (asm_language_defn, c_language_defn, cplus_language_defn)
6506         (d_language_defn, f_language_defn, go_language_defn)
6507         (m2_language_defn, objc_language_defn, opencl_language_defn)
6508         (pascal_language_defn, rust_language_defn): Declare.
6509         * m2-lang.c (m2_language_defn): Make extern.
6510         (_initialize_m2_language): Remove add_language call.
6511         * objc-lang.c (objc_language_defn): Make extern.
6512         (_initialize_objc_language): Remove add_language call.
6513         * opencl-lang.c (opencl_language_defn): Make extern.
6514         (_initialize_opencl_language): Remove add_language call.
6515         * p-lang.c (pascal_language_defn): Make extern.
6516         (_initialize_pascal_language): Delete.
6517         * rust-lang.c (rust_language_defn): Make extern.
6518         (_initialize_rust_language): Delete.
6519         * utils.h (compare_cstrings): New static inline function.
6520
6521 2017-07-20  Pedro Alves  <palves@redhat.com>
6522
6523         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6524         (get_var_value): Constify parameters.
6525         (get_int_var_value): Change prototype.
6526         (to_fixed_range_type): Adjust.
6527         * ada-lang.h (get_int_var_value): Change prototype.
6528
6529 2017-07-20  Pedro Alves  <palves@redhat.com>
6530
6531         * dwarf2read.c (dw2_lookup_symbol): Use
6532         SYMBOL_MATCHES_SEARCH_NAME.
6533         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6534
6535 2017-07-20  Pedro Alves  <palves@redhat.com>
6536
6537         * block.c (block_iter_name_step, block_iter_name_first)
6538         (block_iter_name_next): Delete.
6539         (block_lookup_symbol_primary): Adjust to use
6540         dict_iter_match_first/dict_iter_match_next.
6541         * block.h (block_iter_name_first, block_iter_name_next): Delete
6542         declarations.
6543         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6544         dict_iter_match_first/dict_iter_match_next.
6545
6546 2017-07-20  Pedro Alves  <palves@redhat.com>
6547
6548         * cp-support.c (cp_find_first_component_aux): Add missing case for
6549         end of string.
6550
6551 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6552
6553         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6554         of dwo_cu's dwo_file.
6555
6556 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6557
6558         * remote.c (store_registers_using_G): Remove one line comment.
6559
6560 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6561
6562         * regcache.c (regcache_cpy): Simplify it.
6563         (regcache::cpy_no_passthrough): Remove it.
6564         * regcache.h (cpy_no_passthrough): Remove it.
6565         (regcache_dup, regcache_cpy): Update comments.
6566
6567 2017-07-18  Pedro Alves  <palves@redhat.com>
6568
6569         * remote-sim.c (sim_command_completer): Adjust to work with a
6570         completion_tracker instead of a VEC.
6571
6572 2017-07-17  Pedro Alves  <palves@redhat.com>
6573
6574         * completer.c (complete_source_filenames): New function.
6575         (complete_address_and_linespec_locations): New function.
6576         (location_completer): Use complete_address_and_linespec_locations.
6577         (completion_tracker::build_completion_result): Honor the tracker's
6578         request to suppress append.
6579         * completer.h (completion_tracker::suppress_append_ws)
6580         (completion_tracker::set_suppress_append_ws): New methods.
6581         (completion_tracker::m_suppress_append_ws): New field.
6582         (complete_source_filenames): New declaration.
6583         * linespec.c (linespec_complete_what): New.
6584         (struct ls_parser) <complete_what, completion_word,
6585         completion_quote_char, completion_quote_end, completion_tracker>:
6586         New fields.
6587         (string_find_incomplete_keyword_at_end): New.
6588         (linespec_lexer_lex_string): Record quote char.  If in completion
6589         mode, don't throw.
6590         (linespec_lexer_consume_token): Advance the completion word point.
6591         (linespec_lexer_peek_token): Save/restore completion info.
6592         (save_stream_and_consume_token): New.
6593         (set_completion_after_number): New.
6594         (linespec_parse_basic): Set what to complete next depending on
6595         token.  Handle function and label completions specially.
6596         (parse_linespec): Disable objc shortcut in completion mode.  Set
6597         what to complete next depending on token type.  Skip keyword if in
6598         completion mode.
6599         (complete_linespec_component, linespec_complete): New.
6600         * linespec.h (linespec_complete): Declare.
6601
6602 2017-07-17  Pedro Alves  <palves@redhat.com>
6603
6604         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6605         Handle 'operator<' / 'operator<<'.
6606
6607 2017-07-17  Pedro Alves  <palves@redhat.com>
6608
6609         * completer.c (collect_explicit_location_matches): Handle
6610         MATCH_LABEL.
6611         (convert_explicit_location_to_linespec): New, factored out from
6612         ...
6613         (convert_explicit_location_to_sals): ... this.
6614         (complete_label): New.
6615         (linespec_complete_label, find_label_symbols_in_block): New.
6616         (find_label_symbols): Add completion_mode parameter and adjust to
6617         call find_label_symbols_in_block.
6618         * linespec.h (linespec_complete_label): Declare.
6619
6620 2017-07-17  Pedro Alves  <palves@redhat.com>
6621
6622         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6623         complete_symbol_mode parameter.
6624         * cli/cli-cmds.c (complete_command): Get the completion result out
6625         of the handle_brkchars tracker if used a custom word point.
6626         * completer.c: Include "linespec.h".
6627         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6628         (advance_to_expression_complete_word_point): New.
6629         (completion_tracker::completes_to_completion_word): New.
6630         (complete_files_symbols): Pass down
6631         complete_symbol_mode::EXPRESSION.
6632         (explicit_options, probe_options): New.
6633         (collect_explicit_location_matches): Complete on the
6634         explictit_loc->foo instead of word.  Use
6635         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6636         keyword and options completions.
6637         (backup_text_ptr): Delete.
6638         (skip_keyword): New.
6639         (complete_explicit_location): Remove 'word' parameter.  Add
6640         language, quoted_arg_start and quoted_arg_end parameters.
6641         Rewrite, parsing left to right.
6642         (location_completer): Rewrite.
6643         (location_completer_handle_brkchars): New function.
6644         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6645         (enum complete_line_internal_reason): Adjust comments.
6646         (completion_tracker::discard_completions): New.
6647         (completer_handle_brkchars_func_for_completer): Handle
6648         location_completer.
6649         (gdb_custom_word_point_brkchars)
6650         (gdb_org_rl_basic_quote_characters): New.
6651         (gdb_completion_word_break_characters_throw)
6652         (completion_find_completion_word): Handle trackers that use a
6653         custom word point.
6654         (completion_tracker::advance_custom_word_point_by): New.
6655         (completion_tracker::build_completion_result): Don't rely on
6656         readline appending the quote char.
6657         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6658         use a custom word point.
6659         (gdb_rl_attempted_completion_function): Restore
6660         rl_basic_quote_characters.
6661         * completer.h (class completion_tracker): Extend intro comment.
6662         (completion_tracker::set_quote_char)
6663         (completion_tracker::quote_char)
6664         (completion_tracker::set_use_custom_word_point)
6665         (completion_tracker::use_custom_word_point)
6666         (completion_tracker::custom_word_point)
6667         (completion_tracker::set_custom_word_point)
6668         (completion_tracker::advance_custom_word_point_by)
6669         (completion_tracker::completes_to_completion_word)
6670         (completion_tracker::discard_completions): New methods.
6671         (completion_tracker::m_quote_char)
6672         (completion_tracker::m_use_custom_word_point)
6673         (completion_tracker::m_custom_word_point): New fields.
6674         (advance_to_expression_complete_word_point): Declare.
6675         * f-lang.c (f_collect_symbol_completion_matches): Add
6676         complete_symbol_mode parameter.
6677         * language.h (struct language_defn)
6678         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6679         parameter.
6680         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6681         (linespec_complete_function): New function.
6682         (linespec_lexer_lex_keyword): Adjust.
6683         * linespec.h (linespec_keywords, linespec_complete_function): New
6684         declarations.
6685         * location.c (find_end_quote): New function.
6686         (explicit_location_lex_one): Add explicit_completion_info
6687         parameter.  Save quoting info.  Don't throw if being called for
6688         completion.  Don't handle Ada operators here.
6689         (is_cp_operator, skip_op_false_positives, first_of)
6690         (explicit_location_lex_one_function): New function.
6691         (string_to_explicit_location): Replace 'dont_throw' parameter with
6692         an explicit_completion_info pointer parameter.  Handle it.  Don't
6693         use explicit_location_lex_one to lex function names.  Use
6694         explicit_location_lex_one_function instead.
6695         * location.h (struct explicit_completion_info): New.
6696         (string_to_explicit_location): Replace 'dont_throw' parameter with
6697         an explicit_completion_info pointer parameter.
6698         * symtab.c (default_collect_symbol_completion_matches_break_on):
6699         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6700         (default_collect_symbol_completion_matches)
6701         (collect_symbol_completion_matches): Add complete_symbol_mode
6702         parameter.
6703         (collect_symbol_completion_matches_type): Pass down
6704         complete_symbol_mode::EXPRESSION.
6705         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6706         parameter.  Handle LINESPEC mode.
6707         * symtab.h (complete_symbol_mode): New.
6708         (default_collect_symbol_completion_matches_break_on)
6709         (default_collect_symbol_completion_matches)
6710         (collect_symbol_completion_matches)
6711         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6712         parameter.
6713
6714 2017-07-17  Pedro Alves  <palves@redhat.com>
6715
6716         * utils.c (enum class strncmp_iw_mode): New.
6717         (strcmp_iw): Rename to ...
6718         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6719         parameters.  Handle them.
6720         (strncmp_iw): New.
6721         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6722         * utils.h (strncmp_iw): Declare.
6723         (strcmp_iw): Move describing comments here.
6724
6725 2017-07-17  Pedro Alves  <palves@redhat.com>
6726
6727         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6728         CP_OPERATOR_STR.
6729         * c-typeprint.c (is_type_conversion_operator): Use
6730         CP_OPERATOR_STR.
6731         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6732         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6733         CP_OPERATOR_LEN.
6734         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6735         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6736         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6737         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6738         CP_OPERATOR_STR.
6739         * location.c: Include "cp-support.h".
6740         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6741         CP_OPERATOR_STR.
6742         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6743         CP_OPERATOR_LEN.
6744
6745 2017-07-17  Pedro Alves  <palves@redhat.com>
6746
6747         * cli/cli-cmds.c (complete_command): Use a completion tracker
6748         along with completion_find_completion_word for handle_brkchars
6749         phase.
6750         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6751         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6752         (struct gdb_rl_completion_word_info): New.
6753         (gdb_rl_find_completion_word): New.
6754         (completion_find_completion_word): New.
6755         * completer.h (completion_find_completion_word): Declare.
6756
6757 2017-07-17  Pedro Alves  <palves@redhat.com>
6758
6759         * ada-lang.c (symbol_completion_match): Adjust comments.
6760         (symbol_completion_add): Replace vector parameter with
6761         completion_tracker parameter.  Use it.
6762         (ada_make_symbol_completion_list): Rename to...
6763         (ada_collect_symbol_completion_matches): ... this.  Add
6764         completion_tracker parameter and use it.
6765         (ada_language_defn): Adjust.
6766         * break-catch-syscall.c (catch_syscall_completer): Adjust
6767         prototype and work with completion_tracker instead of VEC.
6768         * breakpoint.c (condition_completer): Adjust prototype and work
6769         with completion_tracker instead of VEC.
6770         * c-lang.c (c_language_defn, cplus_language_defn)
6771         (asm_language_defn, minimal_language_defn): Adjust to renames.
6772         * cli/cli-cmds.c (complete_command): Rework using
6773         completion_tracker.  Catch exceptions when completing.
6774         * cli/cli-decode.c (integer_unlimited_completer)
6775         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6776         with completion_tracker instead of VEC.
6777         * command.h (struct completion_tracker): Forward declare.
6778         (completer_ftype, completer_handle_brkchars_ftype): Change
6779         types.
6780         (complete_on_cmdlist, complete_on_enum): Adjust.
6781         * completer.c: Include <algorithm>.
6782         (struct gdb_completer_state): New.
6783         (current_completion): New global.
6784         (readline_line_completion_function): Delete.
6785         (noop_completer, filename_completer)
6786         (filename_completer_handle_brkchars, complete_files_symbols)
6787         (linespec_location_completer): Adjust to work with a
6788         completion_tracker instead of a VEC.
6789         (string_or_empty): New.
6790         (collect_explicit_location_matches): Adjust to work with a
6791         completion_tracker instead of a VEC.
6792         (explicit_location_completer): Rename to ...
6793         (complete_explicit_location): ... this and adjust to work with a
6794         completion_tracker instead of a VEC.
6795         (location_completer): Adjust to work with a completion_tracker
6796         instead of a VEC.
6797         (add_struct_fields): Adjust to work with a completion_list instead
6798         of VEC.
6799         (expression_completer): Rename to ...
6800         (complete_expression): ... this and adjust to work with a
6801         completion_tracker instead of a VEC.  Use complete_files_symbols.
6802         (expression_completer): Reimplement on top of complete_expression.
6803         (symbol_completer): Adjust to work with a completion_tracker
6804         instead of a VEC.
6805         (enum complete_line_internal_reason): Add describing comments.
6806         (complete_line_internal_normal_command): Adjust to work with a
6807         completion_tracker instead of a VEC.
6808         (complete_line_internal): Rename to ...
6809         (complete_line_internal_1): ... this and adjust to work with a
6810         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6811         handle_brkchars phase.
6812         (new_completion_tracker): Delete.
6813         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6814         complete_line_internal_1.
6815         (free_completion_tracker): Delete.
6816         (INITIAL_COMPLETION_HTAB_SIZE): New.
6817         (completion_tracker::completion_tracker)
6818         (completion_tracker::~completion_tracker): New.
6819         (maybe_add_completion): Delete.
6820         (completion_tracker::maybe_add_completion)
6821         (completion_tracker::add_completion)
6822         (completion_tracker::add_completions): New.
6823         (throw_max_completions_reached_error): Delete.
6824         (complete_line): Adjust to work with a completion_tracker instead
6825         of a VEC.  Don't create a completion_tracker_t or check for max
6826         completions here.
6827         (command_completer, command_completer_handle_brkchars)
6828         (signal_completer, reg_or_group_completer_1)
6829         (reg_or_group_completer, default_completer_handle_brkchars):
6830         Adjust to work with a completion_tracker.
6831         (gdb_completion_word_break_characters_throw): New.
6832         (gdb_completion_word_break_characters): Reimplement.
6833         (line_completion_function): Delete.
6834         (completion_tracker::recompute_lowest_common_denominator)
6835         (expand_preserving_ws)
6836         (completion_tracker::build_completion_result)
6837         (completion_result::completion_result)
6838         (completion_result::completion_result)
6839         (completion_result::~completion_result)
6840         (completion_result::completion_result)
6841         (completion_result::release_match_list, compare_cstrings)
6842         (completion_result::sort_match_list)
6843         (completion_result::reset_match_list)
6844         (gdb_rl_attempted_completion_function_throw)
6845         (gdb_rl_attempted_completion_function): New.
6846         * completer.h (completion_list, struct completion_result)
6847         (class completion_tracker): New.
6848         (complete_line): Add completion_tracker parameter.
6849         (readline_line_completion_function): Delete.
6850         (gdb_rl_attempted_completion_function): New.
6851         (noop_completer, filename_completer, expression_completer)
6852         (location_completer, symbol_completer, command_completer)
6853         (signal_completer, reg_or_group_completer): Update prototypes.
6854         (completion_tracker_t, new_completion_tracker)
6855         (make_cleanup_free_completion_tracker): Delete.
6856         (enum maybe_add_completion_enum): Delete.
6857         (maybe_add_completion): Delete.
6858         (throw_max_completions_reached_error): Delete.
6859         * corefile.c (complete_set_gnutarget): Adjust to work with a
6860         completion_tracker instead of a VEC.
6861         * cp-abi.c (cp_abi_completer): Adjust to work with a
6862         completion_tracker instead of a VEC.
6863         * d-lang.c (d_language_defn): Adjust.
6864         * disasm.c (disassembler_options_completer): Adjust to work with a
6865         completion_tracker instead of a VEC.
6866         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6867         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6868         with a completion_tracker instead of a VEC.
6869         (f_language_defn): Adjust.
6870         * go-lang.c (go_language_defn): Adjust.
6871         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6872         Adjust to work with a completion_tracker instead of a VEC.
6873         * infrun.c (handle_completer): Likewise.
6874         * interps.c (interpreter_completer): Likewise.
6875         * interps.h (interpreter_completer): Likewise.
6876         * language.c (unknown_language_defn, auto_language_defn)
6877         (local_language_defn): Adjust.
6878         * language.h (language_defn::la_make_symbol_completion_list):
6879         Rename to ...
6880         (language_defn::la_collect_symbol_completion_matches): ... this
6881         and adjust to work with a completion_tracker instead of a VEC.
6882         * m2-lang.c (m2_language_defn): Adjust.
6883         * objc-lang.c (objc_language_defn): Adjust.
6884         * opencl-lang.c (opencl_language_defn): Adjust.
6885         * p-lang.c (pascal_language_defn): Adjust.
6886         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6887         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6888         with a completion_tracker.
6889         * rust-lang.c (rust_language_defn): Adjust.
6890         * symtab.c (free_completion_list, do_free_completion_list)
6891         (return_val, completion_tracker): Delete.
6892         (completion_list_add_name, completion_list_add_symbol)
6893         (completion_list_add_msymbol, completion_list_objc_symbol)
6894         (completion_list_add_fields, add_symtab_completions): Add
6895         completion_tracker parameter and use it.
6896         (default_make_symbol_completion_list_break_on_1): Rename to...
6897         (default_collect_symbol_completion_matches_break_on): ... this.
6898         Add completion_tracker parameter and use it instead of allocating
6899         a completion tracker here.
6900         (default_make_symbol_completion_list_break_on): Delete old
6901         implementation.
6902         (default_make_symbol_completion_list): Delete.
6903         (default_collect_symbol_completion_matches): New.
6904         (make_symbol_completion_list): Delete.
6905         (collect_symbol_completion_matches): New.
6906         (make_symbol_completion_type): Rename to ...
6907         (collect_symbol_completion_matches_type): ... this.  Add
6908         completion_tracker parameter and use it instead of VEC.
6909         (make_file_symbol_completion_list_1): Rename to...
6910         (collect_file_symbol_completion_matches): ... this.  Add
6911         completion_tracker parameter and use it instead of VEC.
6912         (make_file_symbol_completion_list): Delete.
6913         (add_filename_to_list): Use completion_list instead of a VEC.
6914         (add_partial_filename_data::list): Now a completion_list.
6915         (make_source_files_completion_list): Work with a completion_list
6916         instead of a VEC.
6917         * symtab.h: Include "completer.h".
6918         (default_make_symbol_completion_list_break_on)
6919         (default_make_symbol_completion_list, make_symbol_completion_list)
6920         (make_symbol_completion_type, make_file_symbol_completion_list)
6921         (make_source_files_completion_list): Delete.
6922         (default_collect_symbol_completion_matches_break_on)
6923         (default_collect_symbol_completion_matches)
6924         (collect_symbol_completion_matches)
6925         (collect_symbol_completion_matches_type)
6926         (collect_file_symbol_completion_matches)
6927         (make_source_files_completion_list): New.
6928         * top.c (init_main): Don't install a rl_completion_entry_function
6929         hook.  Install a rl_attempted_completion_function hook instead.
6930         * tui/tui-layout.c (layout_completer): Adjust to work with a
6931         completion_tracker.
6932         * tui/tui-regs.c (tui_reggroup_completer):
6933         * tui/tui-win.c (window_name_completer, focus_completer)
6934         (winheight_completer): Adjust to work with a completion_tracker.
6935         * value.c: Include "completer.h".
6936         (complete_internalvar): Adjust to work with a completion_tracker.
6937         * value.h (complete_internalvar): Likewise.
6938
6939 2017-07-17  Pedro Alves  <palves@redhat.com>
6940
6941         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6942         renames.
6943         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6944         comments to completer_ftype's declaration.
6945         <completer_handle_brkchars>: Change type to
6946         completer_handle_brkchars_ftype.
6947         * command.h (completer_ftype): Add describing comment and give
6948         names to parameters.
6949         (completer_ftype_void): Rename to ...
6950         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6951         (set_cmd_completer_handle_brkchars): Adjust.
6952         * completer.c (filename_completer_handle_brkchars): New function.
6953         (complete_line_internal_normal_command): New function, factored
6954         out from ...
6955         (complete_line_internal): ... here.
6956         (command_completer_handle_brkchars)
6957         (default_completer_handle_brkchars)
6958         (completer_handle_brkchars_func_for_completer): New functions.
6959         * completer.h (set_gdb_completion_word_break_characters): Delete
6960         declaration.
6961         (completer_handle_brkchars_func_for_completer): New declaration.
6962         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6963         completer_handle_brkchars_func_for_completer.
6964
6965 2017-07-17  Pedro Alves  <palves@redhat.com>
6966
6967         * completer.c (symbol_completer): New function, based on
6968         make_symbol_completion_list_fn.
6969         * completer.h (symbol_completer): New declaration.
6970         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6971         * python/py-cmd.c (completers): Adjust.
6972         * symtab.c (make_symbol_completion_list_fn): Delete.
6973         * symtab.h (make_symbol_completion_list_fn): Delete.
6974         * cli/cli-decode.c (add_cmd): Adjust.
6975
6976 2017-07-17  Pedro Alves  <palves@redhat.com>
6977
6978         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6979         * dwarf2read.c: Include "filename-seen-cache.h".
6980         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6981         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6982         * filename-seen-cache.c: New file.
6983         * filename-seen-cache.h: New file.
6984         * symtab.c: Include "filename-seen-cache.h".
6985         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6986         (create_filename_seen_cache, clear_filename_seen_cache)
6987         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6988         to filename-seen-cache.h/filename-seen-cache.c.
6989         (output_source_filename, sources_info)
6990         (maybe_add_partial_symtab_filename)
6991         (make_source_files_completion_list): Adjust to use
6992         filename_seen_cache.
6993
6994 2017-07-17  Pedro Alves  <palves@redhat.com>
6995
6996         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6997         fields.
6998         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6999         dwarf2_debug_sections*)): New.
7000         (dwarf2_per_objfile::dwarf2_per_objfile(const
7001         dwarf2_per_objfile&)): Declare as deleted.
7002         (dwarf2_per_objfile::operator=): Declare as deleted.
7003         (dwarf2_per_objfile::dwarf2_per_objfile)
7004         (dwarf2_per_objfile::~dwarf2_per_objfile)
7005         (dwarf2_per_objfile::free_cached_comp_units): New.
7006         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7007         ctor.  Call dwarf2_per_objfile's ctor manually.
7008         (dwarf2_locate_sections): Deleted/refactored as ...
7009         (dwarf2_per_objfile::locate_sections): ... this new method.
7010         (free_cached_comp_units): Defer to
7011         dwarf2_per_objfile::free_cached_comp_units.
7012         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7013
7014 2017-07-14  Tom Tromey  <tom@tromey.com>
7015
7016         PR rust/21764:
7017         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7018         parameter.
7019         <UNOP_SIZEOF>: Split into separate case.
7020         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7021
7022 2017-07-14  Tom Tromey  <tom@tromey.com>
7023
7024         PR rust/21763:
7025         * symtab.c (symbol_matches_domain): Add language_rust to special
7026         case.
7027         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7028         treat LOC_TYPEDEF symbols as variables.
7029
7030 2017-07-14  Pedro Alves  <palves@redhat.com>
7031
7032         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7033         symtabs matching all symtabs with SRCFILE as file name instead of
7034         only considering the first hit, with lookup_symtab.
7035
7036 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7037
7038         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7039         operator_name parameters.
7040         (gen_expr): Update function call.
7041
7042 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7043
7044         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7045         parameter.
7046         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7047         Likewise.
7048         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7049         parameter, use agent_expr::gdbarch instead, update function
7050         calls.
7051         (locexpr_tracepoint_var_ref): Likewise.
7052         (loclist_tracepoint_var_ref): Likewise.
7053         * ax-gdb.c (gen_trace_static_fields): Likewise.
7054         (gen_traced_pop): Likewise.
7055         (gen_frame_args_address): Likewise.
7056         (gen_frame_locals_address): Likewise.
7057         (gen_var_ref): Likewise.
7058         (gen_struct_ref_recursive): Likewise.
7059         (gen_static_field): Likewise.
7060         (gen_maybe_namespace_elt): Likewise.
7061         (gen_expr): Likewise.
7062         (gen_trace_for_var): Likewise.
7063         (gen_trace_for_expr): Likewise.
7064         (gen_trace_for_return_address): Likewise.
7065
7066 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7067
7068         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7069         parameter.
7070         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7071
7072 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7073
7074         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7075         from ax, update calls.
7076         (gen_usual_arithmetic): Likewise.
7077         (gen_integral_promotions): Likewise.
7078         (gen_bitfield_ref): Likewise.
7079         (gen_primitive_field): Likewise.
7080         (gen_struct_ref_recursive): Likewise.
7081         (gen_struct_ref): Likewise.
7082         (gen_maybe_namespace_elt): Likewise.
7083         (gen_struct_elt_for_reference): Likewise.
7084         (gen_namespace_elt): Likewise.
7085         (gen_aggregate_elt_ref): Likewise.
7086         (gen_expr): Get gdbarch from ax, update calls.
7087         (gen_expr_binop_rest): Likewise.
7088
7089 2017-07-13  Pedro Alves  <palves@redhat.com>
7090
7091         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7092         as default tdesc.
7093         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7094         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7095         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7096         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7097         tdep.
7098         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7099         Get final tdesc from the tdep.
7100         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7101         default tdesc.
7102         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7103         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7104         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7105         Use it as default tdesc.
7106         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7107         down to amd_init_abi.  No longer handle fallback tdesc here.
7108         * amd64-tdep.h (tdesc_x32): Declare.
7109         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7110         parameter.
7111         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7112         as default tdesc.
7113
7114 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7115
7116         * s390-linux-tdep.c (s390_process_record): Add support for
7117         instructions new in arch12.
7118
7119 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7120
7121         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7122         PT_GETFSBASE and PT_GETGSBASE.
7123         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7124         PT_SETGSBASE.
7125
7126 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7127
7128         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7129         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7130         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7131         those rules.
7132         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7133         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7134         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7135         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7136         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7137         * features/i386/amd64.xml: Add 64bit-segments.xml.
7138         * features/i386/amd64-avx-avx512.c: Regenerated.
7139         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7140         * features/i386/amd64-avx-mpx.c: Regenerated.
7141         * features/i386/amd64-avx.c: Regenerated.
7142         * features/i386/amd64-mpx.c: Regenerated.
7143         * features/i386/amd64.c: Regenerated.
7144         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7145         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7146         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7147         * regformats/i386/amd64-avx.dat: Regenerated.
7148         * regformats/i386/amd64-mpx.dat: Regenerated.
7149         * regformats/i386/amd64.dat: Regenerated.
7150
7151 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7152
7153         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7154         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7155
7156 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7157
7158         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7159         unsetenv.
7160         * gnulib/aclocal.m4: Regenerate.
7161         * gnulib/config.in: Regenerate.
7162         * gnulib/configure: Regenerate.
7163         * gnulib/import/Makefile.am: Regenerate.
7164         * gnulib/import/Makefile.in: Regenerate.
7165         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7166         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7167         * gnulib/import/m4/environ.m4: New file.
7168         * gnulib/import/m4/setenv.m4: New file.
7169         * gnulib/import/setenv.c: New file.
7170         * gnulib/import/unsetenv.c: New file.
7171
7172 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7173
7174         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7175         address when op is DW_OP_addr.
7176
7177 2017-07-09  Tom Tromey  <tom@tromey.com>
7178
7179         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7180         check and apply to outer type.
7181
7182 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7183
7184         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7185         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7186         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7187         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7188
7189 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7190
7191         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7192
7193 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7194
7195         * corelow.c (get_core_siginfo): Remove.
7196         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7197         instead of get_core_siginfo.
7198         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7199         * gdbarch.h: Re-generate.
7200         * gdbarch.c: Re-generate.
7201         * linux-tdep.c (linux_core_xfer_siginfo): New.
7202         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7203
7204 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7205
7206         * corelow.c (thread_section_name): Move to ...
7207         * gdbcore.h (thread_section_name): ... here.
7208
7209 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7210
7211         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7212         (struct siginfo32): New.
7213         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7214         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7215         via ptrace(PT_LWPINFO).
7216
7217 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7218
7219         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7220         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7221         (fbsd_get_siginfo_type): New.
7222         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7223         (_initialize_fbsd_tdep): New.
7224
7225 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7226
7227         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7228         a singular dwo_unit*) to support multiple CUs in the same way that
7229         multiple TUs are supported.
7230         (create_cus_hash_table): Replace create_dwo_cu with a function for
7231         parsing multiple CUs from a DWO file.
7232         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7233         create_dwo_cu.
7234         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7235         htab_find, rather than comparing the signature to a singleton CU in
7236         the dwo_file.
7237
7238 2017-07-06  Pedro Alves  <palves@redhat.com>
7239
7240         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7241
7242 2017-07-04  Pedro Alves  <palves@redhat.com>
7243
7244         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7245         * gdbtypes.h (TYPE_STATIC): Delete.
7246         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7247         is_synchronized, is_native>: Delete.
7248         <dummy>: Bump.
7249         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7250         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7251         (TYPE_FN_FIELD_ABSTRACT): Delete.
7252
7253 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7254
7255         * buffer.h (buffer_finish): Fix spelling mistakes.
7256
7257 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7258
7259         * .dir-locals.el: Automatically switch to C-style comments in
7260         versions of Emacs that support the feature.
7261
7262 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7263             Pedro Alves  <palves@redhat.com>
7264
7265         PR cli/21688
7266         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7267         (process_next_line): New variable 'inline_cmd'.
7268         Adjust 'if' clauses for "python", "compile" and "guile" to use
7269         'command_name_equals' and check for '!inline_cmd'.
7270
7271 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7272
7273         PR cli/21688
7274         * cli/cli-script.c (command_name_equals_not_inline): New function.
7275         (process_next_line): Adjust 'if' clauses for "python", "compile"
7276         and "guile" to use command_name_equals_not_inline.
7277
7278 2017-06-29  Pedro Alves  <palves@redhat.com>
7279
7280         * completer.c (expression_completer): Call
7281         linespec_location_completer instead of location_completer.
7282
7283 2017-06-29  Pedro Alves  <palves@redhat.com>
7284
7285         * completer.c (expression_completer): Remove code that recomputes
7286         'text' from 'word'.
7287
7288 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7289
7290         * regformats/regdat.sh: Generate code with
7291         "ifndef IN_PROCESS_AGENT".
7292
7293 2017-06-28  Pedro Alves  <palves@redhat.com>
7294
7295         * command.h: Include "common/scoped_restore.h".
7296
7297 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7298
7299         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7300         instead of obstack_grow.
7301
7302 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7303
7304         PR gdb/21337
7305         * symfile.c (reread_symbols): Call objfiles_changed just before
7306         read_symbols.
7307
7308 2017-06-27  Pedro Alves  <palves@redhat.com>
7309
7310         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7311         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7312         (completion_list_add_symbol, completion_list_add_msymbol):
7313         ... these new functions.
7314         (add_symtab_completions)
7315         (default_make_symbol_completion_list_break_on_1): Adjust.
7316
7317 2017-06-27  Pedro Alves  <palves@redhat.com>
7318
7319         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7320         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7321         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7322         dtor.
7323         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7324         'storage_obstack' field an auto_obstack.  In-class initialize all
7325         non-bitfield fields.  Make minsyms_read bool.
7326         * symfile.c (read_symbols): Adjust.
7327
7328 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7329
7330         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7331         (gdbsim_store_register): Likewise.
7332
7333 2017-06-27  Pedro Alves  <palves@redhat.com>
7334
7335         * c-exp.y (name_obstack): Now an auto_obstack.
7336         (yylex): Use auto_obstack::clear.
7337         (c_parse): Use auto_obstack::clear instead of reinitializing and
7338         freeing the obstack.
7339         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7340         * d-exp.y (name_obstack): Now an auto_obstack.
7341         (yylex): Use auto_obstack::clear.
7342         (d_parse): Use auto_obstack::clear instead of reinitializing and
7343         freeing the obstack.
7344         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7345         auto_obstack.
7346         * dwarf2read.c (create_addrmap_from_index)
7347         (dwarf2_build_psymtabs_hard)
7348         (update_enumeration_type_from_children): Likewise.
7349         * gdb_obstack.h (auto_obstack): New type.
7350         * go-exp.y (name_obstack): Now an auto_obstack.
7351         (build_packaged_name): Use auto_obstack::clear.
7352         (go_parse): Use auto_obstack::clear instead of reinitializing and
7353         freeing the obstack.
7354         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7355         auto_obstack.
7356         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7357         * rust-exp.y (work_obstack): Now an auto_obstack.
7358         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7359         reinitializing and freeing the obstack.
7360         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7361         (host_char_to_target): Use auto_obstack.
7362         * utils.h (make_cleanup_obstack_free): Delete declaration.
7363         * valprint.c (generic_emit_char, generic_printstr): Use
7364         auto_obstack.
7365
7366 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7367
7368         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7369         thread.
7370         (darwin_init_thread_list): Don't update dummy thread.
7371         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7372
7373 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7374
7375         * record-full.c (netorder16): Remove.
7376
7377 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7378
7379         * common/diagnostics.h: Define macros for GCC.
7380         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7381         * common/vec.h: Include diagnostics.h.
7382         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7383         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7384         warning.
7385
7386 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7387
7388         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7389         New macro.
7390         * ada-lex.l: Ignore deprecated register warnings.
7391
7392 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7393
7394         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7395         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7396
7397 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7398
7399         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7400         its own line.
7401
7402 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7403
7404         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7405
7406 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7407
7408         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7409         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7410         (xtensa_register_read_masked): Likewise.
7411
7412 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7413
7414         * common/environ.c (gdb_environ::unset): Update comment.
7415
7416 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7417
7418         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7419         registers.
7420
7421 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7422
7423         * record-full.c (record_full_exec_insn): Use byte_vector.
7424
7425 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7426
7427         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7428         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7429
7430 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7431
7432         * remote.c (cached_reg): Move from here...
7433         * regcache.h (cached_reg): ...to here.
7434         * python/py-unwind.c (struct reg_info): Remove.
7435         (cached_frame_info): Use cached_reg_t.
7436         (pyuw_prev_register): Likewise.
7437         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7438         (pyuw_dealloc_cache): Free all registers.
7439
7440 2017-06-22  Pedro Alves  <palves@redhat.com>
7441             Simon Marchi  <simon.marchi@ericsson.com>
7442
7443         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7444         warning.
7445         * common/diagnostics.h: New file.
7446
7447 2017-06-22  Pedro Alves  <palves@redhat.com>
7448
7449         * common/agent.h: Add include guards.
7450
7451 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7452
7453         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7454         talk about addressable units instead of bytes.
7455
7456 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7457
7458         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7459         of '::const_iterator'.
7460
7461 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7462
7463         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7464         'unittests/environ-selftests.c'.
7465         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7466         * charset.c (find_charset_names): Declare object 'iconv_env'.
7467         Update code to use 'iconv_env' object.  Remove call to
7468         'free_environ'.
7469         * common/environ.c: Include <utility>.
7470         (make_environ): Delete function.
7471         (free_environ): Delete function.
7472         (gdb_environ::clear): New function.
7473         (gdb_environ::operator=): New function.
7474         (gdb_environ::get): Likewise.
7475         (environ_vector): Delete function.
7476         (set_in_environ): Delete function.
7477         (gdb_environ::set): New function.
7478         (unset_in_environ): Delete function.
7479         (gdb_environ::unset): New function.
7480         (gdb_environ::envp): Likewise.
7481         * common/environ.h: Include <vector>.
7482         (struct gdb_environ): Delete; transform into...
7483         (class gdb_environ): ... this class.
7484         (free_environ): Delete prototype.
7485         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7486         environ_vector): Likewise.
7487         * infcmd.c (run_command_1): Update code to call
7488         'envp' from 'gdb_environ' class.
7489         (environment_info): Update code to call methods from 'gdb_environ'
7490         class.
7491         (unset_environment_command): Likewise.
7492         (path_info): Likewise.
7493         (path_command): Likewise.
7494         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7495         (inferior::inferior): Initialize 'environment' using the host's
7496         information.
7497         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7498         Include "environ.h".
7499         (class inferior) <environment>: Change type from 'struct
7500         gdb_environ' to 'gdb_environ'.
7501         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7502         methods from 'gdb_environ' class.
7503         * solib.c (solib_find_1): Likewise
7504         * unittests/environ-selftests.c: New file.
7505
7506 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7507
7508         * features/i386/i386-linux.xml: Exchange the order of including
7509         32bit-linux.xml and 32bit-sse.xml.
7510         * features/i386/i386-linux.c: Regenerated.
7511
7512 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7513
7514         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7515         Delete copy ctor and assignment operator.
7516         (tdesc_type): Likewise.
7517         (tdesc_feature): Likewise.
7518         (tdesc_free_reg): Remove.
7519         (tdesc_create_reg): Use new.
7520         (tdesc_free_type): Remove.
7521         (tdesc_create_vector): Use new.
7522         (tdesc_create_union): Likewise.
7523         (tdesc_create_flags): Likewise.
7524         (tdesc_create_enum): Likewise.
7525         (tdesc_free_feature): Delete.
7526         (free_target_description): Use delete.
7527
7528 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7529
7530         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7531         registers.
7532
7533 2017-06-19  Pedro Alves  <palves@redhat.com>
7534
7535         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7536         after gdb::unlinker.
7537
7538 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7539
7540         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7541         gdb_environ to access an environment variable.
7542
7543 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7544
7545         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7546         gdb_byte*.
7547
7548 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7549
7550         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7551
7552 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7553
7554         * configure: Re-generate.
7555         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7556
7557 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7558
7559         * configure: Re-generate.
7560         * warning.m4: Pass -Werror to compiler when checking for
7561         supported warning flags.
7562
7563 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7564
7565         * Makefile.in (COMPILE.pre): Add "-x c++".
7566
7567 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7568             Pedro Alves  <palves@redhat.com>
7569             Yao Qi  <yao.qi@linaro.org>
7570
7571         * defs.h (RequireLongest): New.
7572         (extract_integer): Declare function template.
7573         (extract_signed_integer): Remove the declaration, but define it
7574         static inline.
7575         (extract_unsigned_integer): Likewise.
7576         (store_integer): Declare function template.
7577         (store_signed_integer): Remove the declaration, but define it
7578         static inline.
7579         (store_unsigned_integer): Likewise.
7580         * findvar.c (extract_integer): New function template.
7581         (extract_signed_integer): Remove.
7582         (extract_unsigned_integer): Remove.
7583         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7584         instantiations.
7585         (store_integer): New function template.
7586         (store_signed_integer): Remove.
7587         (store_unsigned_integer): Remove.
7588         (store_integer): Explicit instantiations.
7589         * regcache.c (regcache_raw_read_signed): Update.
7590         (regcache::raw_read): New function.
7591         (regcache::raw_read_signed): Remove.
7592         (regcache::raw_read_unsigned): Remove.
7593         (regcache_raw_read_unsigned): Update.
7594         (regcache_raw_write_unsigned): Update.
7595         (regcache::raw_write_signed): Remove.
7596         (regcache::raw_write): New function.
7597         (regcache_cooked_read_signed): Update.
7598         (regcache::raw_write_unsigned): Remove.
7599         (regcache::cooked_read_signed): Remove.
7600         (regcache_cooked_read_unsigned): Update.
7601         (regcache::cooked_read_unsigned): Remove.
7602         (regcache_cooked_write_signed): Update.
7603         (regcache_cooked_write_unsigned): Update.
7604         * regcache.h (regcache) <raw_read_signed>: Remove.
7605         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7606         <raw_read, raw_write>: New.
7607         <cooked_read_signed, cooked_write_signed>: Remove.
7608         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7609         <cooked_read, cooked_write>: New.
7610         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7611         (sh64_pseudo_register_write): Update.
7612
7613 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7614
7615         * arc-tdep.c (arc_disassembler_options): New variable.
7616         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7617         of default_print_insn.
7618         (arc_delayed_print_insn): Set info->section when needed,
7619         use default_print_insn to retrieve a disassembler.
7620
7621 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7622
7623         PR gdb/21574
7624         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7625         to mention $SHELL and startup-with-shell.
7626
7627 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7628
7629         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7630
7631 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7632
7633         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7634         default_print_insn instead of print_insn_aarch64.
7635         * arm-tdep.c (gdb_print_insn_arm): Call
7636         default_print_insn instead of print_insn_big_arm
7637         and print_insn_little_arm.
7638         * i386-tdep.c (i386_print_insn): Call default_print_insn
7639         instead of print_insn_i386.
7640         * ia64-tdep.c (ia64_print_insn): Call
7641         default_print_insn instead of print_insn_ia64.
7642         * mips-tdep.c (gdb_print_insn_mips): Call
7643         default_print_insn instead of print_insn_big_mips
7644         and print_insn_little_mips.
7645         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7646         instead of print_insn_spu.
7647
7648 2017-06-14  Pedro Alves  <palves@redhat.com>
7649
7650         * ada-lang.c: Include "common/byte-vector.h".
7651         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7652         * charset.c (wchar_iterator::iterate): Resize the vector instead
7653         of reserving it.
7654         * common/byte-vector.h: Include "common/def-vector.h".
7655         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7656         * cli/cli-dump.c: Include "common/byte-vector.h".
7657         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7658         * common/byte-vector.h: New file.
7659         * common/def-vector.h: New file.
7660         * common/default-init-alloc.h: New file.
7661         * dwarf2loc.c: Include "common/byte-vector.h".
7662         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7663         instead of reserving it.
7664         * dwarf2read.c: Include "common/byte-vector.h".
7665         (data_buf::m_vec): Now a gdb::byte_vector.
7666         * gdb_regex.c: Include "common/def-vector.h".
7667         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7668         * mi/mi-main.c: Include "common/byte-vector.h".
7669         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7670         * printcmd.c: Include "common/byte-vector.h".
7671         (print_scalar_formatted): Use gdb::byte_vector.
7672         * valprint.c: Include "common/byte-vector.h".
7673         (maybe_negate_by_bytes, print_decimal_chars): Use
7674         gdb::byte_vector.
7675
7676 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7677
7678         * darwin-nat.c: Include "nat/fork-inferior.h".
7679
7680 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * configure.nat: Factor out Darwin bits that are not
7683         architecture-specific.  Add fork-inferior.o.
7684
7685 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7686
7687         * configure.nat: Factor out AIX bits that are not
7688         architecture-specific.  Add fork-inferior.o.
7689
7690 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7691
7692         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7693         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7694         wrappers that just call rw_pieced_value.
7695
7696 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7697
7698         * dwarf2loc.c (write_pieced_value): When writing the data for a
7699         memory piece, use write_memory_with_notification instead of
7700         write_memory.
7701
7702 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7703
7704         * valops.c (read_value_memory): Change embedded_offset to
7705         represent a bit offset instead of a byte offset.
7706         * value.h (read_value_memory): Adjust comment.
7707
7708 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7709
7710         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7711         dest_offset_bits and source_offset_bits.
7712         (write_pieced_value): Likewise.
7713
7714 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7715
7716         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7717         given by DW_OP_bit_piece.
7718         (write_pieced_value): Likewise.
7719
7720 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7721
7722         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7723         some other preparations to the places where sufficient information
7724         is available.
7725         (write_pieced_value): Likewise.
7726
7727 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7728
7729         * dwarf2loc.c (bits_to_bytes): New function.
7730         (read_pieced_value): Fix offset calculations for register pieces
7731         on big-endian targets.
7732         (write_pieced_value): Likewise.
7733
7734 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7735
7736         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7737         (write_pieced_value): Likewise.
7738
7739 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7740
7741         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7742         transfer the source value's least significant bits, instead of its
7743         lowest-addressed ones.  Rename type_len to max_offset.
7744         (read_pieced_value): Mirror above changes to write_pieced_value as
7745         applicable.
7746
7747 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7748
7749         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7750         truncate full bytes from dest_offset_bits before using it as an
7751         offset into the buffer.
7752
7753 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7754
7755         * dwarf2loc.c (write_pieced_value): Include transfer size in
7756         byte-wise check.
7757
7758 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7759
7760         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7761         calculation of this_size.
7762
7763 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7764
7765         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7766         when targeting a bit-field.
7767         (write_pieced_value): Likewise.
7768
7769 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7770
7771         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7772         (allocate_piece_closure): Drop addr_size parameter.
7773         (dwarf2_evaluate_loc_desc_full): Adjust call to
7774         allocate_piece_closure.
7775
7776 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7777
7778         PR gdb/21226
7779         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7780         the LSB end, independent of endianness.
7781
7782 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7783
7784         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7785         size capping.
7786
7787 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7788
7789         * mips-linux-nat.c: Move include features/mips*-linux.c to
7790         mips-linux-tdep.c.
7791         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7792         to mips-linux-tdep.c.
7793         * mips-linux-tdep.c: Include features/mips*-linux.c
7794         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7795         functions.
7796         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7797         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7798         (tdesc_mips64_dsp_linux): Declare.
7799
7800 2017-06-12  Tom Tromey  <tom@tromey.com>
7801
7802         * valprint.h (val_print_type_code_int): Remove.
7803         * valprint.c (generic_val_print_int): Always call
7804         val_print_scalar_formatted.
7805         (val_print_type_code_int): Remove.
7806         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7807         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7808         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7809         * ada-valprint.c (ada_val_print_num): Use
7810         val_print_scalar_formatted.
7811
7812 2017-06-12  Tom Tromey  <tom@tromey.com>
7813
7814         * printcmd.c (print_scalar_formatted): Unify the two switches.
7815         Don't convert scalars to LONGEST.
7816
7817 2017-06-12  Tom Tromey  <tom@tromey.com>
7818
7819         PR exp/16225:
7820         * valprint.h (print_decimal_chars): Update.
7821         * valprint.c (maybe_negate_by_bytes): New function.
7822         (print_decimal_chars): Add "is_signed" argument.
7823         * printcmd.c (print_scalar_formatted): Update.
7824
7825 2017-06-12  Tom Tromey  <tom@tromey.com>
7826
7827         PR exp/16225:
7828         * valprint.h (print_binary_chars, print_hex_chars): Update.
7829         * valprint.c (val_print_type_code_int): Update.
7830         (print_binary_chars): Add "zero_pad" argument.
7831         (emit_octal_digit): New function.
7832         (print_octal_chars): Don't zero-pad.
7833         (print_decimal_chars): Likewise.
7834         (print_hex_chars): Add "zero_pad" argument.
7835         * sh64-tdep.c (sh64_do_fp_register): Update.
7836         * regcache.c (regcache::dump): Update.
7837         * printcmd.c (print_scalar_formatted): Update.
7838         * infcmd.c (default_print_one_register_info): Update.
7839
7840 2017-06-12  Pedro Alves  <palves@redhat.com>
7841             Alan Hayward  <alan.hayward@arm.com>
7842
7843         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7844         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7845         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7846         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7847         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7848
7849 2017-06-12  Pedro Alves  <palves@redhat.com>
7850
7851         * dwarf2read.c (mapped_symtab::data): Now a vector of
7852         symtab_index_entry instead of vector of
7853         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7854         whether an element's name is NULL instead of checking whether the
7855         element itself is NULL.
7856         (find_slot): Change return type.  Adjust.
7857         (hash_expand, , add_index_entry, uniquify_cu_indices)
7858         (write_hash_table): Adjust.
7859
7860 2017-06-12  Pedro Alves  <palves@redhat.com>
7861
7862         * dwarf2read.c (recursively_count_psymbols): New function.
7863         (write_psymtabs_to_index): Call it to compute number of psyms and
7864         pass estimate size of psyms_seen to unordered_set's ctor.
7865
7866 2017-06-12  Pedro Alves  <palves@redhat.com>
7867
7868         * dwarf2read.c (write_hash_table): Check if key already exists
7869         before emplacing.
7870
7871 2017-06-12  Pedro Alves  <palves@redhat.com>
7872
7873         * dwarf2read.c (data_buf::append_space): Rename to...
7874         (data_buf::grow): ... this, and make private.  Adjust all callers.
7875         (data_buf::append_uint): New method.
7876         (add_address_entry, write_one_signatured_type)
7877         (write_psymtabs_to_index): Use it.
7878
7879 2017-06-12  Pedro Alves  <palves@redhat.com>
7880
7881         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7882         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7883         (data_buf::file_write): Call ::fwrite directly.
7884
7885 2017-06-12  Pedro Alves  <palves@redhat.com>
7886
7887         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7888         std::vector::erase.
7889
7890 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7891
7892         Code cleanup: C++ify .gdb_index producer.
7893         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7894         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7895         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7896         (create_strtab, add_string): Remove.
7897         (file_write, data_buf): New.
7898         (struct symtab_index_entry): Use std::vector for cu_indices.
7899         (struct mapped_symtab): Use std::vector for data.
7900         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7901         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7902         Remove.
7903         (find_slot): Change return type.  Update it to the new data structures.
7904         (hash_expand, add_index_entry): Update it to the new data structures.
7905         (offset_type_compare): Remove.
7906         (uniquify_cu_indices): Update it to the new data structures.
7907         (c_str_view, c_str_view_hasher, vector_hasher): New.
7908         (add_indices_to_cpool): Remove.
7909         (write_hash_table): Update it to the new data structures.
7910         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7911         (eq_psymtab_cu_index): Remove.
7912         (psym_index_map): New typedef.
7913         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7914         reference and std::unordered_map for cu_index_htab.
7915         (add_address_entry, add_address_entry_worker, write_address_map)
7916         (write_psymbols): Update it to the new data structures.
7917         (write_obstack): Remove.
7918         (struct signatured_type_index_data): Change types_list to a data_buf
7919         reference and psyms_seen to a std::unordered_set reference.
7920         (write_one_signatured_type, recursively_write_psymbols)
7921         (write_psymtabs_to_index): Update it to the new data structures.
7922
7923 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7924
7925         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7926         separate-debug-file commands.
7927         * symfile.h (separate_debug_file_debug): New global.
7928         * symfile.c (separate_debug_file_debug): New global.
7929         (separate_debug_file_exists, find_separate_debug_file): Add
7930         debug output.
7931         (_initialize_symfile): Add "set debug separate-debug-file"
7932         command.
7933         * build-id.c (build_id_to_debug_bfd,
7934         find_separate_debug_file_by_buildid): Add debug output.
7935
7936 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7937
7938         * gdbarch.sh (displaced_step_free_closure): Remove.
7939         * gdbarch.h, gdbarch.c: Re-generate.
7940         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7941         displaced_step_free_closure.
7942         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7943         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7944         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7945         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7946         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7947         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7948         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7949         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7950         * infrun.c (displaced_step_clear): Call xfree instead of
7951         gdbarch_displaced_step_free_closure.
7952
7953 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7954
7955         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7956         NULL".
7957
7958 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7959
7960         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7961         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7962         (mn10300_push_dummy_call): Likewise.
7963
7964 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7965
7966         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7967
7968 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7969
7970         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7971
7972 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7973
7974         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7975         able to start inferiors using a shell.
7976         (New remote packets): Announce new packet "QStartupWithShell".
7977         * remote.c: Add PACKET_QStartupWithShell.
7978         (extended_remote_create_inferior): Handle new
7979         PACKET_QStartupWithShell.
7980         (remote_protocol_features) <QStartupWithShell>: New entry for
7981         PACKET_QStartupWithShell.
7982         (_initialize_remote): Call "add_packet_config_cmd" for
7983         QStartupShell.
7984
7985 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7986             Pedro Alves  <palves@redhat.com>
7987
7988         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7989         and "nat/fork-inferior.h".
7990         * common/common-inferior.h: New file, with contents from
7991         "gdb/inferior.h".
7992         * commom/common-utils.c: Include "common-utils.h".
7993         (stringify_argv): New function.
7994         * common/common-utils.h (stringify_argv): New prototype.
7995         * configure.nat: Add "fork-inferior.o" as a dependency for
7996         "*linux*", "fbsd*" and "nbsd*" hosts.
7997         * corefile.c (get_exec_file): Update comment.
7998         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7999         instead of "startup_inferior".
8000         (darwin_create_inferior): Call "add_thread_silent" after
8001         "fork_inferior".
8002         * fork-child.c: Cleanup unnecessary includes.
8003         (SHELL_FILE): Move to "common/common-fork-child.c".
8004         (environ): Likewise.
8005         (exec_wrapper): Initialize.
8006         (get_exec_wrapper): New function.
8007         (breakup_args): Move to "common/common-fork-child.c"; rename to
8008         "breakup_args_for_exec".
8009         (escape_bang_in_quoted_argument): Move to
8010         "common/common-fork-child.c".
8011         (saved_ui): New variable.
8012         (prefork_hook): New function.
8013         (postfork_hook): Likewise.
8014         (postfork_child_hook): Likewise.
8015         (gdb_startup_inferior): Likewise.
8016         (fork_inferior): Move to "common/common-fork-child.c".  Update
8017         function to support gdbserver.
8018         (startup_inferior): Likewise.
8019         * gdbcore.h (get_exec_file): Remove declaration.
8020         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8021         instead of "startup_inferior".  Call "add_thread_silent" after
8022         "fork_inferior".
8023         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8024         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8025         instead of "startup_inferior".  Call "add_thread_silent" after
8026         "fork_inferior".
8027         * inferior.h: Include "common-inferior.h".
8028         (trace_start_error): Move to "common/common-utils.h".
8029         (trace_start_error_with_name): Likewise.
8030         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8031         (startup_inferior): Likewise.
8032         (gdb_startup_inferior): New prototype.
8033         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8034         * nat/fork-inferior.h: New file.
8035         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8036         instead of "startup_inferior".  Call "add_thread_silent" after
8037         "fork_inferior".
8038         * target.h (target_terminal_init): Move prototype to
8039         "target/target.h".
8040         (target_terminal_inferior): Likewise.
8041         (target_terminal_ours): Likewise.
8042         * target/target.h (target_terminal_init): New prototype, moved
8043         from "target.h".
8044         (target_terminal_inferior): Likewise.
8045         (target_terminal_ours): Likewise.
8046         * utils.c (gdb_flush_out_err): New function.
8047
8048 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8049
8050         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8051         * common/common-gdbthread.h: New file, with parts from
8052         "gdb/gdbthread.h".
8053         * gdbthread.h: Include "common-gdbthread.h".
8054         (switch_to_thread): Moved to "common/common-gdbthread.h".
8055
8056 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8057
8058         * Makefile.in (SFILES): Add "common/job-control.c".
8059         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8060         (COMMON_OBS): Add "job-control.o".
8061         * common/job-control.c: New file, with contents from
8062         "gdb/inflow.c".
8063         * common/job-control.h: New file, with contents from "terminal.h".
8064         * fork-child.c: Include "job-control.h".
8065         * inflow.c: Include "job-control.h".
8066         (gdb_setpgid): Move to "common/common-inflow.c".
8067         (_initialize_inflow): Move setting of "job_control" to
8068         "handle_job_control".
8069         * terminal.h (job_control): Moved to "common/common-terminal.h".
8070         (gdb_setpgid): Likewise.
8071         * top.c: Include "job_control.h".
8072         * utils.c: Likewise.
8073         (job_control): Moved to "job-control.c".
8074
8075 2017-06-07  Pedro Alves  <palves@redhat.com>
8076
8077         * Makefile.in (SFILES): Add gdb_regex.c.
8078         (COMMON_OBS): Add gdb_regex.o.
8079         * ada-lang.c (ada_add_standard_exceptions)
8080         (ada_add_exceptions_from_frame, name_matches_regex)
8081         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8082         parameter type to compiled_regex.  Adjust.
8083         (ada_exceptions_list): Use compiled_regex.
8084         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8085         std::unique_ptr<compiled_regex>.
8086         (exception_catchpoint::~exception_catchpoint): Remove regfree
8087         call.
8088         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8089         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8090         * breakpoint.c (solib_catchpoint::compiled): Now a
8091         std::unique_ptr<compiled_regex>.
8092         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8093         (check_status_catch_solib): Adjust to use compiled_regex.
8094         (add_solib_catchpoint): Adjust to use compiled_regex.
8095         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8096         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8097         compiled_regex reference.  Adjust to use it.
8098         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8099         declaration.  Include "gdb_regex.h".
8100         (apropos_cmd): Change regex parameter to compiled_regex reference.
8101         * gdb_regex.c: New file.
8102         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8103         declarations.
8104         (class compiled_regex): New.
8105         * linux-tdep.c: Include "common/gdb_optional.h".
8106         (struct mapping_regexes): New, factored out from
8107         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8108         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8109         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8110         * probe.c: Include "common/gdb_optional.h".
8111         (collect_probes): Use compiled_regex and gdb::optional and remove
8112         cleanups.
8113         * skip.c: Include "common/gdb_optional.h".
8114         (skiplist_entry::compiled_function_regexp): Now a
8115         gdb::optional<compiled_regex>.
8116         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8117         (free_skiplist_entry): Remove regfree call.
8118         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8119         compiled_regex and gdb::optional.
8120         * symtab.c: Include "common/gdb_optional.h".
8121         (search_symbols): Use compiled_regex and gdb::optional.
8122         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8123         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8124         to gdb_regex.c.
8125
8126 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8127
8128         * regcache.c (regcache::save): Avoid buffer use.
8129         (regcache::dump): Likewise.
8130
8131 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8132
8133         * sh-tdep.c (sh_pseudo_register_read): Remove
8134         MAX_REGISTER_SIZE.
8135         (sh_pseudo_register_write): Likewise.
8136         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8137         (sh64_pseudo_register_write): Likewise
8138
8139 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8140
8141         * aarch64-tdep.c (aarch64_store_return_value): Use
8142         V_REGISTER_SIZE.
8143         (aarch64_pseudo_read_value): Likewise.
8144         (aarch64_pseudo_write): Likewise.
8145
8146 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8147
8148         * regformats/regdef.h (set_register_cache): Remove the
8149         declaration.
8150
8151 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8152
8153         * frame.c (frame_unwind_register_signed): Use
8154         frame_unwind_register_value.
8155
8156 2017-06-06  Pedro Alves  <palves@redhat.com>
8157
8158         PR breakpoints/21553
8159         * breakpoint.c (create_breakpoints_sal_default)
8160         (init_breakpoint_sal, create_breakpoint_sal): Use
8161         gdb::unique_xmalloc_ptr for string parameters.
8162         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8163         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8164         (base_breakpoint_create_breakpoints_sal)
8165         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8166         (strace_marker_create_breakpoints_sal)
8167         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8168         string parameters.
8169         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8170         gdb::unique_xmalloc_ptr for string parameters.
8171         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8172         parameters.
8173
8174 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8175
8176         * alpha-tdep.c (alpha_register_to_value): Use
8177         get_frame_register_value.
8178         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8179
8180 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8181
8182         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8183         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8184         (ia64_value_to_register): Likewise.
8185         (ia64_extract_return_value): Likewise.
8186         (ia64_store_return_value): Likewise.
8187         (ia64_push_dummy_call): Likewise.
8188
8189 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8190
8191         GDB 8.0 released.
8192
8193 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8194
8195         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8196
8197 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8198
8199         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8200         parameter.
8201         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8202
8203 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8204
8205         * event-loop.c (poll_timers): Unallocate timer using delete
8206         instead of xfree.
8207
8208 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8209
8210         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8211         (struct breakpoint) <~breakpoint>: New.
8212         (struct watchpoint): Inherit from breakpoint.
8213         <~watchpoint>: New.
8214         <base>: Remove.
8215         (struct tracepoint): Inherit from breakpoint.
8216         <base>: Remove.
8217         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8218         (struct longjmp_breakpoint): Inherit from breakpoint.
8219         <~longjmp_breakpoint>: New.
8220         <base>: Remove.
8221         (new_breakpoint_from_type): Remove casts.
8222         (watchpoint_in_thread_scope): Remove reference to base field.
8223         (watchpoint_del_at_next_stop): Likewise.
8224         (update_watchpoint): Likewise.
8225         (watchpoint_check): Likewise.
8226         (bpstat_check_watchpoint): Likewise.
8227         (set_longjmp_breakpoint): Likewise.
8228         (struct fork_catchpoint): Inherit from breakpoint.
8229         <base>: Remove.
8230         (struct solib_catchpoint): Inherit from breakpoint.
8231         <~solib_catchpoint>: New.
8232         <base>: Remove.
8233         (dtor_catch_solib): Change to ...
8234         (solib_catchpoint::~solib_catchpoint): ... this.
8235         (breakpoint_hit_catch_solib): Remove reference to base field.
8236         (add_solib_catchpoint): Likewise.
8237         (create_fork_vfork_event_catchpoint): Likewise.
8238         (struct exec_catchpoint): Inherit from breakpoint.
8239         <~exec_catchpoint>: New.
8240         <base>: Remove.
8241         (dtor_catch_exec): Change to ...
8242         (exec_catchpoint::~exec_catchpoint): ... this.
8243         (dtor_watchpoint): Change to ...
8244         (watchpoint::~watchpoint): ... this.
8245         (watch_command_1): Remove reference to base field.
8246         (catch_exec_command_1): Likewise.
8247         (base_breakpoint_dtor): Change to ...
8248         (breakpoint::~breakpoint): ... this.
8249         (base_breakpoint_ops): Remove dtor field value.
8250         (longjmp_bkpt_dtor): Change to ...
8251         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8252         (strace_marker_create_breakpoints_sal): Remove reference to base
8253         field.
8254         (delete_breakpoint): Don't manually call breakpoint destructor.
8255         (create_tracepoint_from_upload): Remove reference to base field.
8256         (trace_pass_set_count): Likewise.
8257         (initialize_breakpoint_ops): Don't initialize
8258         momentary_breakpoint_ops, don't set dtors.
8259         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8260         <~ada_catchpoint>: New.
8261         <base>: Remove.
8262         (create_excep_cond_exprs): Remove reference to base field.
8263         (dtor_exception): Change to ...
8264         (ada_catchpoint::~ada_catchpoint): ... this.
8265         (dtor_catch_exception): Remove.
8266         (dtor_catch_exception_unhandled): Remove.
8267         (dtor_catch_assert): Remove.
8268         (create_ada_exception_catchpoint): Remove reference to base
8269         field.
8270         (initialize_ada_catchpoint_ops): Don't set dtors.
8271         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8272         breakpoint.
8273         <~signal_catchpoint>: New.
8274         <base>: Remove.
8275         (signal_catchpoint_dtor): Change to ...
8276         (signal_catchpoint::~signal_catchpoint): ... this.
8277         (create_signal_catchpoint): Remove reference to base field.
8278         (initialize_signal_catchpoint_ops): Don't set dtor.
8279         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8280         from breakpoint.
8281         <~syscall_catchpoint>: New.
8282         <base>: Remove.
8283         (dtor_catch_syscall): Change to ...
8284         (syscall_catchpoint::~syscall_catchpoint): ... this.
8285         (create_syscall_event_catchpoint): Remove reference to base
8286         field.
8287         (initialize_syscall_catchpoint_ops): Don't set dtor.
8288         * break-catch-throw.c (struct exception_catchpoint): Inherit
8289         from breakpoint.
8290         <~exception_catchpoint>: New.
8291         <base>: Remove.
8292         (dtor_exception_catchpoint): Change to ...
8293         (exception_catchpoint::~exception_catchpoint): ... this.
8294         (handle_gnu_v3_exceptions): Remove reference to base field.
8295         (initialize_throw_catchpoint_ops): Don't set dtor.
8296         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8297         field.
8298         * remote.c (remote_get_tracepoint_status): Likewise.
8299         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8300         * tracefile.c (tracefile_fetch_registers): Likewise.
8301         * tracepoint.c (actions_command): Likewise.
8302         (validate_actionline): Likewise.
8303         (tfind_1): Likewise.
8304         (get_traceframe_location): Likewise.
8305         (find_matching_tracepoint_location): Likewise.
8306         (parse_tracepoint_status): Likewise.
8307         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8308
8309 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8310
8311         * breakpoint.c (struct longjmp_breakpoint): New struct.
8312         (is_tracepoint_type): Change return type to bool.
8313         (is_longjmp_type): New function.
8314         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8315         (set_raw_breakpoint_without_location): Use
8316         new_breakpoint_from_type.
8317         (set_raw_breakpoint): Likewise.
8318
8319 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8320
8321         * breakpoint.c (new_breakpoint_from_type): New function.
8322         (create_breakpoint_sal): Use new_breakpoint_from_type and
8323         unique_ptr.
8324         (create_breakpoint): Likewise.
8325
8326 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8327
8328         * memattr.c (mem_info_command): Rename to ...
8329         (info_mem_command): ... this.
8330         (mem_enable_command): Rename to ...
8331         (enable_mem_command): ... this.
8332         (mem_disable_command): Rename to ...
8333         (disable_mem_command): ... this.
8334         (mem_delete_command): Rename to ...
8335         (delete_mem_command): ... this.
8336         (_initialize_mem): Adjust function names.
8337
8338 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8339
8340         * btrace.c (handle_pt_insn_events): New.
8341         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8342         STATUS.  Split into this and ...
8343         (handle_pt_insn_event_flags): ... this.
8344
8345 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8346
8347         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8348         and struct pt_insn.resynced.
8349         * configure: Regenerated.
8350         * config.in: Regenerated.
8351
8352 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8353
8354         * btrace.c (ftrace_find_call_by_number): New function.
8355         (ftrace_new_function): Store objects, not pointers.
8356         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8357         ftrace_new_gap, ftrace_update_function,
8358         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8359         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8360         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8361         btrace_ends_with_single_insn, btrace_call_get): Account for
8362         btrace_thread_info::functions now storing objects.
8363         * btrace.h (struct btrace_thread_info): Add constructor.
8364         (struct btrace_thread_info) <functions>: Make std::vector.
8365         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8366         Initialize with default values.
8367         * record-btrace.c (record_btrace_frame_sniffer): Account for
8368         btrace_thread_info::functions now storing objects.
8369
8370 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8371
8372         * btrace.c: Remove typedef bfun_s.
8373         (ftrace_new_gap): Directly add gaps to the list of gaps.
8374         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8375         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8376         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8377         instead of gdb VEC.
8378
8379 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8380
8381         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8382         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8383         with btrace_thread_info::next_segment and
8384         btrace_thread_info::prev_segment.
8385         * btrace.h: Remove struct btrace_func_link.
8386         (struct btrace_function): Replace pair of function segment pointers
8387         with pair of indices.
8388         * python/py-record-btrace.c (btpy_call_prev_sibling,
8389         btpy_call_next_sibling): Replace references to
8390         btrace_thread_info::segment with btrace_thread_info::next_segment and
8391         btrace_thread_info::prev_segment.
8392         * record-btrace.c (record_btrace_frame_this_id): Use
8393         btrace_find_call_by_number.
8394
8395 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8396
8397         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8398         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8399         btrace_insn_next, btrace_insn_prev): Remove references to
8400         btrace_thread_info::flow.
8401         * btrace.h (struct btrace_function): Remove FLOW.
8402
8403 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8404
8405         * btrace.c (ftrace_find_call_by_number): New function.
8406         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8407         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8408         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8409         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8410         index.
8411         * btrace.h (struct btrace_function): Turn UP into an index.
8412         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8413         as an index.
8414         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8415         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8416         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8417
8418 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8419
8420         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8421         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8422         ftrace_update_function, ftrace_compute_global_level_offset,
8423         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8424         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8425         btrace_insn_end, btrace_is_empty): Remove references to
8426         btrace_thread_info::begin and btrace_thread_info::end.
8427         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8428         (struct btrace_thread_info) <functions>: Adjust comment.
8429         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8430         btrace_thread_info::begin.
8431
8432 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8433
8434         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8435         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8436         ftrace_update_function): Remove arguments that implicitly were always
8437         BTINFO->END.
8438         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8439         Don't pass BTINFO->END.
8440
8441 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8442
8443         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8444         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8445         btrace_find_insn_by_number): Replace function segment pointer with
8446         index.
8447         (btrace_insn_cmp): Simplify.
8448         * btrace.h: (struct btrace_insn_iterator) Rename index to
8449         insn_index.  Replace function segment pointer with index into function
8450         segment vector.
8451         * record-btrace.c (record_btrace_call_history): Replace function
8452         segment pointer use with index.
8453         (record_btrace_frame_sniffer): Retrieve function call segment through
8454         vector.
8455         (record_btrace_set_replay): Remove defunc't safety check.
8456
8457 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8458
8459         * btrace.c (btrace_ends_with_single_insn): New function.
8460         (btrace_call_get, btrace_call_number, btrace_call_begin,
8461         btrace_call_end, btrace_call_next, btrace_call_prev,
8462         btrace_find_call_by_number): Use index into call segment vector
8463         instead of pointer.
8464         (btrace_call_cmp): Simplify.
8465         * btrace.h (struct btrace_call_iterator): Replace function call segment
8466         pointer with index into vector.
8467         * record-btrace.c (record_btrace_call_history): Use index instead of
8468         pointer.
8469
8470 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8471
8472         * btrace.c (btrace_insn_begin, btrace_insn_end,
8473         btrace_find_insn_by_number): Add btinfo to iterator.
8474         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8475
8476 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8477
8478         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8479         and save pointers directly.
8480         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8481         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8482         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8483         changed signature of functions.
8484         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8485         (btrace_fetch): Remove code that adds btrace_function pointers to
8486         vector of btrace_functions.
8487         (btrace_clear): Simplify freeing vector of btrace_functions.
8488
8489 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8490
8491         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8492         Replace VEC_* with std::vector functions.
8493         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8494         (struct btrace_thread_info)<functions>: Change type to std::vector.
8495
8496 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8497
8498         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8499         "Removed targets and native configurations" up.  Merge duplicate
8500         "New commands" sub-sections.  Add "New options" sub-sections.
8501
8502 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8503
8504         * defs.h (copy_integer_to_size): New declaration.
8505         * findvar.c (copy_integer_to_size): New function.
8506         (do_cint_test): New selftest function.
8507         (copy_integer_to_size_test): Likewise.
8508         (_initialize_findvar): Likewise.
8509         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8510         (mips_fbsd_collect_reg): Use raw_collect_integer.
8511         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8512         (mips64_fill_gregset): Use raw_collect_integer
8513         (mips64_fill_fpregset): Use raw_supply_integer.
8514         * regcache.c (regcache::raw_supply_integer): New function.
8515         (regcache::raw_collect_integer): Likewise.
8516         * regcache.h: (regcache::raw_supply_integer): New declaration.
8517         (regcache::raw_collect_integer): Likewise.
8518
8519 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8520
8521         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8522         (COMMON_OBS): Add gdbarch-selftests.o.
8523         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8524         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8525         * gdbarch-selftests.c: New file.
8526         * regcache.h (regcache) <~regcache>: Mark it virtual if
8527         GDB_SELF_TEST.
8528         <raw_write>: Likewise.
8529
8530 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8531
8532         * regcache.c (current_regcache): Change it to
8533         regcache::current_regcache.
8534         (regcache_observer_target_changed): Update.
8535         (regcache_thread_ptid_changed): Make it a regcache static
8536         method.
8537         (regcache_thread_ptid_changed): Update.
8538         (class regcache_access): New.
8539         (current_regcache_test): Update.
8540         (_initialize_regcache): Update.
8541         * regcache.h: Include forward_list.
8542         (regcache): Declare regcache_thread_ptid_changed and declare
8543         registers_changed_ptid as friend.
8544
8545 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8546
8547         * i387-tdep.c (i387_register_to_value): Use register_size
8548         instead of TYPE_LENGTH.
8549         * m68k-tdep.c (m68k_register_to_value): Likewise.
8550
8551 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8552
8553         * i387-tdep.c (i387_convert_register_p): Return false if type
8554         code isn't TYPE_CODE_FLT.
8555
8556 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8557
8558         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8559         length is 4.
8560         (alpha_register_to_value): Remove type length check.
8561         (alpha_value_to_register): Likewise.
8562
8563 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8564
8565         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8566         TYPE_CODE_FLT.
8567
8568 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8569
8570         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8571         TYPE_CODE_FLT or not.
8572
8573 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8574
8575         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8576         * avr-tdep.c (avr_gdbarch_init): Likewise.
8577         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8578         * cris-tdep.c (cris_gdbarch_init): Likewise.
8579         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8580         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8581         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8582         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8583         * mep-tdep.c (mep_gdbarch_init): Likewise.
8584         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8585         * mips-tdep.c (mips_gdbarch_init): Likewise.
8586         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8587         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8588         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8589         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8590         * v850-tdep.c (v850_gdbarch_init): Likewise.
8591
8592 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8593
8594         * selftest-arch.c (tests_with_arch): Call registers_changed
8595         and reinit_frame_cache.
8596         * selftest.c (run_self_tests): Likewise.
8597
8598 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8599
8600         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8601         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8602
8603 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8604
8605         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8606         set_gdbarch_print_insn.
8607
8608 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8609
8610         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8611         set_gdbarch_print_insn.
8612
8613 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8614
8615         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8616         set_gdbarch_print_insn.
8617         * arc-tdep.c (arc_gdbarch_init): Likewise.
8618         * arch-utils.c: include dis-asm.h.
8619         (default_print_insn): New function.
8620         * arch-utils.h (default_print_insn): Declare.
8621         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8622         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8623         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8624         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8625         * frv-tdep.c (frv_gdbarch_init): Likewise.
8626         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8627         * gdbarch.sh (print_insn): Use default_print_insn.
8628         * gdbarch.c: Regenerated.
8629         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8630         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8631         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8632         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8633         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8634         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8635         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8636         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8637         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8638         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8639         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8640         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8641         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8642         * mt-tdep.c (mt_gdbarch_init): Likewise.
8643         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8644         * nios2-tdep.c (nios2_print_insn): Remove.
8645         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8646         * rx-tdep.c (rx_gdbarch_init): Likewise.
8647         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8648         * score-tdep.c (score_print_insn): Remove.
8649         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8650         * sh-tdep.c (sh_gdbarch_init): Likewise.
8651         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8652         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8653         * tic6x-tdep.c (tic6x_print_insn): Remove.
8654         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8655         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8656         * v850-tdep.c (v850_gdbarch_init): Likewise.
8657         * vax-tdep.c (vax_gdbarch_init): Likewise.
8658         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8659         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8660
8661 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8662
8663         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8664         (MIPS_FP0_REGNUM): Remove.
8665         (MIPS_FSR_REGNUM): Remove.
8666         (mips_fbsd_supply_fpregs): Use mips_regnum.
8667         (mips_fbsd_supply_gregs): Likewise.
8668         (mips_fbsd_collect_fpregs): Likewise.
8669         (mips_fbsd_collect_gregs): Likewise.
8670
8671 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8672
8673         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8674         (getpfpregs_supplies): New function.
8675         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8676         getfpregs_supplies.
8677         (mips_fbsd_store_inferior_registers): Likewise.
8678
8679 2017-05-22  Pedro Alves <palves@redhat.com>
8680
8681         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8682         maintainer.
8683
8684 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8685
8686         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8687         (store_register): Likewise.
8688         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8689         (get_decimal_float_return_value): Likewise.
8690         (do_ppc_sysv_return_value): Likewise.
8691         (ppc64_sysv_abi_push_integer): Likewise.
8692         (ppc64_sysv_abi_push_freg): Likewise.
8693         (ppc64_sysv_abi_return_value_base): Likewise.
8694         (ppc64_sysv_abi_return_value): Likewise.
8695         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8696         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8697         * rs6000-nat.c: Likewise.
8698         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8699         (rs6000_value_to_register): Likewise.
8700         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8701
8702 2017-05-21  Tom Tromey  <tom@tromey.com>
8703
8704         PR rust/21466:
8705         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8706         arrays as "[T]", not "[T; ]".
8707
8708 2017-05-19  Tom Tromey  <tom@tromey.com>
8709
8710         PR rust/21484:
8711         * rust-lang.c (exp_descriptor_rust): New function.
8712         (rust_language_defn): Use it.
8713         * p-lang.c (pascal_language_defn): Update.
8714         * opencl-lang.c (opencl_language_defn): Update.
8715         * objc-lang.c (objc_language_defn): Update.
8716         * m2-lang.c (m2_language_defn): Update.
8717         * language.h (struct language_defn)
8718         <la_watch_location_expression>: New member.
8719         * language.c (unknown_language_defn, auto_language_defn)
8720         (local_language_defn): Update.
8721         * go-lang.c (go_language_defn): Update.
8722         * f-lang.c (f_language_defn): Update.
8723         * d-lang.c (d_language_defn): Update.
8724         * c-lang.h (c_watch_location_expression): Declare.
8725         * c-lang.c (c_watch_location_expression): New function.
8726         (c_language_defn, cplus_language_defn, asm_language_defn)
8727         (minimal_language_defn): Use it.
8728         * breakpoint.c (watch_command_1): Call
8729         la_watch_location_expression.
8730         * ada-lang.c (ada_language_defn): Update.
8731
8732 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8733
8734         PR tui/21482
8735         * gdb_curses.h (NOMACROS): Define.
8736         (NCURSES_NOMACROS): Define.
8737
8738 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8739
8740         PR tui/21482
8741         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8742         arg to char *.
8743         * tui/tui-wingeneral.c (box_win): Likewise.
8744         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8745         (tui_show_source_line): Likewise.
8746         (tui_show_exec_info_content): Likewise.
8747
8748 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8749
8750         * sparc-tdep.c (sparc_structure_return_p)
8751         (sparc_arg_on_registers_p): New functions.
8752         (sparc32_store_arguments): Use them.
8753         * sparc64-tdep.c (sparc64_16_byte_align_p)
8754         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8755         Handle TYPE_CODE_ARRAY.
8756
8757 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8758
8759         * cli/cli-decode.c (add_alias_cmd): New function.
8760         * command.h (add_alias_cmd): Declare.
8761         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8762         instead call add_alias_cmd.
8763
8764 2017-05-17  Pedro Alves  <palves@redhat.com>
8765
8766         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8767         (nat_makefile_frag): ... this.  All references updated.
8768         * configure.ac: Likewise.
8769         * configure.nat: Likewise.  Enhance comments.
8770         * configure: Regenerate.
8771
8772 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8773
8774         * procfs.c (procfs_create_inferior): Change prototype to match
8775         definition.
8776
8777 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8778
8779         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8780         C++ compiler warning.
8781
8782 2017-05-12  Tom Tromey  <tom@tromey.com>
8783
8784         PR rust/21483:
8785         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8786         recurse, just call value_struct_elt directly.
8787
8788 2017-05-12  Tom Tromey  <tom@tromey.com>
8789
8790         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8791         OP_RUST_ARRAY>: Fix.
8792
8793 2017-05-12  Tom Tromey  <tom@tromey.com>
8794
8795         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8796
8797 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8798
8799         * regcache.c: Include <forward_list>.
8800         (struct regcache_list): Remove.
8801         (current_regcache): Update.
8802         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8803         (regcache_thread_ptid_changed): Likewise.
8804         (registers_changed_ptid): Likewise.
8805         (current_regcache_size): Likewise.
8806
8807 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8808
8809         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8810         (current_regcache_size): New function.
8811         (current_regcache_test): New function.
8812         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8813
8814 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8815
8816         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8817         (print_gp_register_row): Use get_frame_register_value.
8818
8819 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8820
8821         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8822         (mips_supply_fpregset): Likewise.
8823         (mips64_supply_gregset): Likewise.
8824
8825 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8826
8827         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8828         regcache->raw_supply_zeroed.
8829
8830 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8831
8832         * configure.nat: Rearrange 'case' statements to match
8833         host before cpu.
8834
8835 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8836
8837         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8838         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8839         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8840         "@nat_extra_makefile_frag@".
8841         (Makefile): Remove dependency on "@frags@".
8842         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8843         (data-directory/Makefile): Likewise.
8844         * config/aarch64/linux.mh: Deleted; moved contents to
8845         "gdb/configure.nat".
8846         * config/alpha/alpha-linux.mh: Likewise.
8847         * config/alpha/nbsd.mh: Likewise.
8848         * config/arm/linux.mh: Likewise.
8849         * config/arm/nbsdelf.mh: Likewise.
8850         * config/i386/cygwin.mh: Likewise.
8851         * config/i386/cygwin64.mh: Likewise.
8852         * config/i386/darwin.mh: Likewise.
8853         * config/i386/fbsd.mh: Likewise.
8854         * config/i386/fbsd64.mh: Likewise.
8855         * config/i386/go32.mh: Likewise.
8856         * config/i386/i386gnu.mh: Likewise.
8857         * config/i386/i386sol2.mh: Likewise.
8858         * config/i386/linux.mh: Likewise.
8859         * config/i386/linux64.mh: Likewise.
8860         * config/i386/mingw.mh: Likewise.
8861         * config/i386/mingw64.mh: Likewise.
8862         * config/i386/nbsd64.mh: Likewise.
8863         * config/i386/nbsdelf.mh: Likewise.
8864         * config/i386/nto.mh: Likewise.
8865         * config/i386/obsd.mh: Likewise.
8866         * config/i386/obsd64.mh: Likewise.
8867         * config/i386/sol2-64.mh: Likewise.
8868         * config/ia64/linux.mh: Likewise.
8869         * config/m32r/linux.mh: Likewise.
8870         * config/m68k/linux.mh: Likewise.
8871         * config/m68k/nbsdelf.mh: Likewise.
8872         * config/m68k/obsd.mh: Likewise.
8873         * config/m88k/obsd.mh: Likewise.
8874         * config/mips/fbsd.mh: Likewise.
8875         * config/mips/linux.mh: Likewise.
8876         * config/mips/nbsd.mh: Likewise.
8877         * config/mips/obsd64.mh: Likewise.
8878         * config/pa/linux.mh: Likewise.
8879         * config/pa/nbsd.mh: Likewise.
8880         * config/pa/obsd.mh: Likewise.
8881         * config/powerpc/aix.mh: Likewise.
8882         * config/powerpc/fbsd.mh: Likewise.
8883         * config/powerpc/linux.mh: Likewise.
8884         * config/powerpc/nbsd.mh: Likewise.
8885         * config/powerpc/obsd.mh: Likewise.
8886         * config/powerpc/ppc64-linux.mh: Likewise.
8887         * config/powerpc/spu-linux.mh: Likewise.
8888         * config/s390/linux.mh: Likewise.
8889         * config/sh/nbsd.mh: Likewise.
8890         * config/sparc/fbsd.mh: Likewise.
8891         * config/sparc/linux.mh: Likewise.
8892         * config/sparc/linux64.mh: Likewise.
8893         * config/sparc/nbsd64.mh: Likewise.
8894         * config/sparc/nbsdelf.mh: Likewise.
8895         * config/sparc/obsd64.mh: Likewise.
8896         * config/sparc/sol2.mh: Likewise.
8897         * config/tilegx/linux.mh: Likewise.
8898         * config/vax/nbsdelf.mh: Likewise.
8899         * config/vax/obsd.mh: Likewise.
8900         * config/xtensa/linux.mh: Likewise.
8901         * config/i386/i386gnu.mn: New file, with excerpts from
8902         "config/i386/i386gnu.mh".
8903         * configure: Regenerate.
8904         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8905         *.mh files under "gdb/config".
8906         * configure.nat: New file, with contents from the
8907         "gdb/config/*/*.mh" files.
8908
8909 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8910
8911         * btrace.c (btrace_clear): Free insn vector.
8912
8913 2017-05-05  Pedro Alves  <palves@redhat.com>
8914
8915         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8916         * configure: Regenerate.
8917
8918 2017-05-04  Pedro Alves  <palves@redhat.com>
8919
8920         * Makefile.in (SFILES): Add progspace-and-thread.c.
8921         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8922         (COMMON_OBS): Add progspace-and-thread.o.
8923         * breakpoint.c: Include "progspace-and-thread.h".
8924         (update_inserted_breakpoint_locations)
8925         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8926         Use scoped_restore_current_pspace_and_thread.
8927         (create_std_terminate_master_breakpoint): Use
8928         scoped_restore_current_program_space.
8929         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8930         (print_breakpoint_location): Use
8931         scoped_restore_current_program_space.
8932         (bp_loc_is_permanent): Use
8933         scoped_restore_current_pspace_and_thread.
8934         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8935         (download_tracepoint_locations): Use
8936         scoped_restore_current_pspace_and_thread.
8937         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8938         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8939         (enum step_over_calls_kind): Moved from inferior.h.
8940         (class scoped_restore_current_thread): New class.
8941         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8942         declaration.
8943         (scoped_restore_current_thread): New class.
8944         * infcmd.c: Include "common/gdb_optional.h".
8945         (continue_1, proceed_after_attach): Use
8946         scoped_restore_current_thread.
8947         (notice_new_inferior): Use scoped_restore_current_thread.
8948         * inferior.c: Include "progspace-and-thread.h".
8949         (restore_inferior, save_current_inferior): Delete.
8950         (add_inferior_command, clone_inferior_command): Use
8951         scoped_restore_current_pspace_and_thread.
8952         * inferior.h (scoped_restore_current_inferior): New class.
8953         * infrun.c: Include "progspace-and-thread.h" and
8954         "common/gdb_optional.h".
8955         (follow_fork_inferior): Use
8956         scoped_restore_current_pspace_and_thread.
8957         (scoped_restore_exited_inferior): New class.
8958         (handle_vfork_child_exec_or_exit): Use
8959         scoped_restore_exited_inferior,
8960         scoped_restore_current_pspace_and_thread,
8961         scoped_restore_current_thread and scoped_restore.
8962         (fetch_inferior_event): Use scoped_restore_current_thread.
8963         * linespec.c (decode_line_full, decode_line_1): Use
8964         scoped_restore_current_program_space.
8965         * mi/mi-main.c: Include "progspace-and-thread.h".
8966         (exec_continue): Use scoped_restore_current_thread.
8967         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8968         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8969         * proc-service.c (ps_pglobal_lookup): Use
8970         scoped_restore_current_program_space.
8971         * progspace-and-thread.c: New file.
8972         * progspace-and-thread.h: New file.
8973         * progspace.c (release_program_space, clone_program_space): Use
8974         scoped_restore_current_program_space.
8975         (restore_program_space, save_current_program_space)
8976         (save_current_space_and_thread): Delete.
8977         (switch_to_program_space_and_thread): Moved to
8978         progspace-and-thread.c.
8979         * progspace.h (save_current_program_space)
8980         (save_current_space_and_thread): Delete declarations.
8981         (scoped_restore_current_program_space): New class.
8982         * remote.c (remote_btrace_maybe_reopen): Use
8983         scoped_restore_current_thread.
8984         * symtab.c: Include "progspace-and-thread.h".
8985         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8986         * thread.c (print_thread_info_1): Use
8987         scoped_restore_current_thread.
8988         (struct current_thread_cleanup): Delete.
8989         (do_restore_current_thread_cleanup)
8990         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8991         (scoped_restore_current_thread::~scoped_restore_current_thread):
8992         ... this new dtor.
8993         (make_cleanup_restore_current_thread): Rename/convert to ...
8994         (scoped_restore_current_thread::scoped_restore_current_thread):
8995         ... this new ctor.
8996         (thread_apply_all_command): Use scoped_restore_current_thread.
8997         (thread_apply_command): Use scoped_restore_current_thread.
8998         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8999         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9000
9001 2017-05-04  Pedro Alves  <palves@redhat.com>
9002
9003         * thread.c (make_cleanup_restore_current_thread): Move
9004         find_thread_ptid call before the is_stopped call.  Assert that the
9005         thread is found.  Replace is_stopped call by checking the thread's
9006         state directly.  Remove unnecessary NULL-thread check.
9007
9008 2017-05-04  Pedro Alves  <palves@redhat.com>
9009
9010         * corelow.c (thread_section_name): New class.
9011         (get_core_register_section, get_core_siginfo): Use it.
9012
9013 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9014
9015         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9016         (get_core_register_section): Remove xfree of NULL pointer.
9017
9018 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9019
9020         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9021         * regcache.c (regcache::raw_supply_zeroed): New function.
9022         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9023
9024 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9025
9026         * gdbarch.sh: Remove commented out definition of
9027         TARGET_CHAR_BIT.
9028         * gdbarch.h: Re-generate.
9029
9030 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9031
9032         * configure: Regenerate.
9033
9034 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9035
9036         * solib-target.c (solib_target_relocate_section_addresses):
9037         Remove num_section_bases, num_bases, segment_bases variables.
9038
9039 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9040
9041         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9042
9043 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9044
9045         * solib-target.c: Include <vector>
9046         (struct lm_info_target) <~lm_info_target>: Remove.
9047         <segment_bases, section_bases>: Change type to
9048         std::vector<CORE_ADDR>.
9049         (library_list_start_segment, library_list_start_section,
9050         library_list_end_library,
9051         solib_target_relocate_section_addresses): Adjust.
9052
9053 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9054
9055         * gdbarch.sh (software_single_step): Change return type to
9056         std::vector<CORE_ADDR>.
9057         * gdbarch.c, gdbarch.h: Re-generate.
9058         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9059         Adjust.
9060         (arm_deal_with_atomic_sequence_raw): Adjust.
9061         (thumb_get_next_pcs_raw): Adjust.
9062         (arm_get_next_pcs_raw): Adjust.
9063         (arm_get_next_pcs): Adjust.
9064         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9065         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9066         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9067         (alpha_software_single_step): Adjust.
9068         * alpha-tdep.h (alpha_software_single_step): Adjust.
9069         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9070         * arm-tdep.c (arm_software_single_step): Adjust.
9071         (arm_breakpoint_kind_from_current_state): Adjust.
9072         * arm-tdep.h (arm_software_single_step): Adjust.
9073         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9074         * cris-tdep.c (cris_software_single_step): Adjust.
9075         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9076         (micromips_deal_with_atomic_sequence): Adjust.
9077         (deal_with_atomic_sequence): Adjust.
9078         (mips_software_single_step): Adjust.
9079         * mips-tdep.h (mips_software_single_step): Adjust.
9080         * moxie-tdep.c (moxie_software_single_step): Adjust.
9081         * nios2-tdep.c (nios2_software_single_step): Adjust.
9082         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9083         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9084         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9085         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9086         * sparc-tdep.c (sparc_software_single_step): Adjust.
9087         * spu-tdep.c (spu_software_single_step): Adjust.
9088         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9089
9090 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9091
9092         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9093         * gdbarch.h: Re-generate.
9094
9095 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9096
9097         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9098         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9099         * python/py-instruction.c, python/py-instruction.h: New file.
9100         * python/py-record.c: Add py-instruction.h include.
9101         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9102         gdb.RecordInstruction.
9103         * python/python-internal.h: Add gdbpy_initialize_instruction
9104         declaration.
9105         * python/python.c (do_start_initialization): Add
9106         gdbpy_initialize_instruction.
9107
9108 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9109
9110         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9111         Remove.
9112         (btrace_func_from_recpy_func): New function.
9113         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9114         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9115         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9116         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9117         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9118         Also, use new helper functions.
9119         (btpy_list_item): Use new helper functions.
9120         (recpy_bt_function_call_history): Use new type name.
9121         (btpy_call_getset): Remove.
9122         (gdbpy_initialize_btrace): Remove code to initialize
9123         gdb.BtraceFunctionCall.
9124         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9125         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9126         recpy_bt_func_prev, recpy_bt_func_next): New export.
9127         * python/py-record.c (recpy_func_type): New static object.
9128         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9129         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9130         recpy_func_next): New function.
9131         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9132         (recpy_func_getset): New static object.
9133         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9134         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9135
9136 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9137
9138         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9139         (btpy_object, btpy_insn_type, btpy_new): Remove.
9140         (btpy_list_object): Use gdb.RecordInstruction type instead of
9141         gdb.BtraceInstruction type.
9142         (btrace_insn_from_recpy_insn): New function.
9143         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9144         btpy_new.
9145         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9146         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9147         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9148         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9149         instead of btpy_object.
9150         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9151         btpy_insn_data, btpy_insn_decode): Rename to ...
9152         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9153         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9154         recpy_bt_insn_decode): This.  Also, use new helper functions.
9155         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9156         recpy_insn_type.
9157         (btpy_insn_getset): Remove.
9158         (gdbpy_initialize_btrace): Remove code to initialize
9159         gdb.BtraceInstruction.  Use recpy_element_object.
9160         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9161         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9162         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9163         * python/py-record.c (recpy_insn_type): New static object.
9164         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9165         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9166         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9167         New function.
9168         (recpy_insn_getset): New static object.
9169         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9170         * python/py-record.h (recpy_element_object): New typedef.
9171         (recpy_insn_type, recpy_insn_new): New export.
9172
9173 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9174
9175         * py-record-btrace.c (btpy_insn_new): Removed.
9176         (btpy_insn_or_gap_new): New function.
9177         (btpy_insn_error): Removed.
9178         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9179         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9180         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9181         btpy_insn_or_gap_new instead of btpy_insn_new.
9182         (btpy_insn_getset): Remove btpy_insn_error.
9183         * py-record.c (recpy_gap_type): New static object.
9184         (recpy_gap_object): New typedef.
9185         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9186         recpy_gap_reason_string): New function.
9187         (recpy_gap_getset): New static object.
9188         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9189         * py-record.h (recpy_gap_new): New export.
9190
9191 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9192
9193         * python/py-record.c (recpy_ptid): Remove.
9194         (recpy_record_getset): Remove recpy_ptid.
9195
9196 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9197
9198         * btrace.c (btrace_fetch): Set inferior_ptid.
9199         * python/py-record-btrace.c: Add "py-record.h" include.
9200         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9201         recpy_bt_end, recpy_bt_instruction_history,
9202         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9203         in gdb.Record object instead of current ptid.
9204         * python/py-record.c: Include new "py-record.h" file.
9205         (recpy_record_object): Moved to py-record.h.
9206         * python/py-record.h: New file.
9207
9208 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9209
9210         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9211         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9212         indentation.
9213
9214 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9215
9216         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9217         the past maintainers section.
9218
9219 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9220
9221         * infcmd.c (get_return_value): Use regcache ctor, and remove
9222         cleanup.
9223
9224 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9225             Pedro Alves  <palves@redhat.com>
9226
9227         * regcache.c (regcache::regcache): New tag dispatch ctor.
9228         (do_cooked_read): Moved above.
9229         (regcache_dup): Use the tag dispatch ctor..
9230         * regcache.h (regcache): Declare ctor, delete copy ctor and
9231         assignment operator, remove friend regcache_dup.
9232
9233 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9234
9235         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9236         call method save instead of regcache_cpy.
9237         * regcache.h (struct regcache): Make regcache_dup a friend.
9238
9239 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9240
9241         * regcache.c (struct regcache): Move to regcache.h
9242         (regcache::arch): New method.
9243         (regcache_get_ptid): Update.
9244         (get_regcache_arch): Call arch method.
9245         (get_regcache_aspace): Call method aspace.
9246         (register_buffer): Change it to method.
9247         (regcache_save): Change it to regcache::save.
9248         (regcache_restore): Likewise.
9249         (regcache_cpy_no_passthrough): Remove the declaration.
9250         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9251         (regcache_cpy_no_passthrough): Change it to method
9252         cpy_no_passthrough.
9253         (regcache_register_status): Change it to method
9254         get_register_status.
9255         (regcache_invalidate): Change it to method invalidate.
9256         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9257         (regcache_raw_update): Change it to method raw_update.
9258         (regcache_raw_read): Likewise.
9259         (regcache_raw_read_signed): Likewise.
9260         (regcache_raw_read_unsigned): Likewise.
9261         (regcache_raw_write_signed): Likewise.
9262         (regcache_raw_write_unsigned): Likewise.
9263         (regcache_cooked_read): Likewise.
9264         (regcache_cooked_read_value): Likewise.
9265         (regcache_cooked_read_signed): Likewise.
9266         (regcache_cooked_read_unsigned): Likewise.
9267         (regcache_cooked_write_signed): Likewise.
9268         (regcache_cooked_write_unsigned): Likewise.
9269         (regcache_raw_set_cached_value): Likewise.
9270         (regcache_raw_write): Likewise.
9271         (regcache_cooked_write): Likewise.
9272         (regcache_xfer_part): Likewise.
9273         (regcache_raw_read_part): Likewise.
9274         (regcache_raw_write_part): Likewise.
9275         (regcache_cooked_read_part): Likewise.
9276         (regcache_cooked_write_part): Likewise.
9277         (regcache_raw_supply): Likewise.
9278         (regcache_raw_collect): Likewise.
9279         (regcache_transfer_regset): Likewise.
9280         (regcache_supply_regset): Likewise.
9281         (regcache_collect_regset): Likewise.
9282         (regcache_debug_print_register): Likewise.
9283         (enum regcache_dump_what): Move it to regcache.h.
9284         (regcache_dump): Change it to method dump.
9285         * regcache.h (enum regcache_dump_what): New.
9286         (class regcache): New.
9287         * target.c (target_fetch_registers): Call method
9288         debug_print_register.
9289         (target_store_registers): Likewise.
9290
9291 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9292
9293         * windows-nat.c (struct lm_info_windows): Initialize field.
9294         (windows_make_so): Allocate lm_info_windows with new.
9295         (windows_free_so): Free lm_info_windows with delete.
9296
9297 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9298
9299         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9300         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9301         cleanup.
9302         (darwin_free_so): Free lm_info_darwin with delete.
9303
9304 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9305
9306         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9307         <l_addr_p>: Change type to bool.
9308         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9309         (svr4_free_so): Free lm_info_svr4 with delete.
9310         (svr4_copy_library_list): Replace memcpy with call to copy
9311         constructor.
9312         (library_list_start_library, svr4_default_sos): Allocate
9313         lm_info_svr4 with new.
9314
9315 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9316
9317         * solib-target.c (struct lm_info_target): Add destructor,
9318         initialize fields.
9319         <name>: Change type to std::string.
9320         (library_list_start_library): Allocate lm_info_target with new.
9321         (solib_target_free_library_list): Free lm_info_target with
9322         delete.
9323         (solib_target_current_sos): Adapt to std::string.
9324         (solib_target_free_so): Free lm_info_target with delete.
9325
9326 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9327
9328         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9329         fields.
9330         (frv_current_sos): Allocate lm_info_frv with new.
9331         (frv_relocate_main_executable): Free lm_info_frv with delete,
9332         allocate with new.
9333         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9334
9335 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9336
9337         * solib-frv.c (struct lm_info_frv): Fix indentation.
9338
9339 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9340
9341         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9342         map field.
9343         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9344         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9345         and allocate with new.
9346         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9347
9348 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9349
9350         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9351         <filename, member_name>: Change type to std::string.
9352         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9353         (library_list_start_library): Allocate lm_info_aix with new.
9354         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9355         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9356         with copy constructor.
9357
9358 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9359
9360         * solist.h (struct lm_info): Remove.
9361         (struct lm_info_base): New class.
9362         (struct so_list) <lm_info>: Change type to lm_info_base *.
9363         * nto-tdep.c (struct lm_info): Remove.
9364         (lm_addr): Adjust.
9365         * solib-aix.c (struct lm_info): Rename to ...
9366         (struct lm_info_aix): ... this.  Extend lm_info_base.
9367         (lm_info_p): Rename to ...
9368         (lm_info_aix_p): ... this, and adjust.
9369         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9370         solib_aix_parse_libraries, library_list_start_library,
9371         solib_aix_free_library_list, solib_aix_parse_libraries,
9372         solib_aix_get_library_list,
9373         solib_aix_relocate_section_addresses, solib_aix_free_so,
9374         solib_aix_get_section_offsets,
9375         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9376         Adjust.
9377         (struct solib_aix_inferior_data) <library_list>: Adjust.
9378         * solib-darwin.c (struct lm_info): Rename to ...
9379         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9380         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9381         * solib-dsbt.c (struct lm_info): Rename to ...
9382         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9383         (struct dsbt_info) <main_executable_lm_info): Adjust.
9384         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9385         dsbt_relocate_section_addresses): Adjust.
9386         * solib-frv.c (struct lm_info): Rename to ...
9387         (struct lm_info_frv): ... this.  Extend lm_info_base.
9388         (main_executable_lm_info): Adjust.
9389         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9390         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9391         find_canonical_descriptor_in_load_object,
9392         frv_fdpic_find_canonical_descriptor): Adjust.
9393         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9394         to lm_info_svr4.
9395         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9396         svr4_clear_so, svr4_copy_library_list,
9397         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9398         svr4_current_sos, svr4_fetch_objfile_link_map,
9399         solist_update_incremental): Adjust.
9400         * solib-svr4.h (struct lm_info_svr4): Move here from
9401         solib-svr4.c.
9402         * solib-target.c (struct lm_info): Rename to ...
9403         (struct lm_info_target): ... this.  Extend lm_info_base.
9404         (lm_info_p): Rename to ...
9405         (lm_info_target_p): ... this.
9406         (solib_target_parse_libraries, library_list_start_segment,
9407         library_list_start_section, library_list_start_library,
9408         library_list_end_library, solib_target_free_library_list,
9409         solib_target_current_sos, solib_target_free_so,
9410         solib_target_relocate_section_addresses): Adjust.
9411         * windows-nat.c (struct lm_info): Rename to ...
9412         (struct lm_info_windows): ... this.  Extend lm_info_base.
9413         (windows_make_so, handle_load_dll, handle_unload_dll,
9414         windows_xfer_shared_libraries): Adjust.
9415
9416 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9417
9418         * solib-darwin.c (struct darwin_so_list): Remove.
9419         (darwin_current_sos): Allocate an so_list object instead of a
9420         darwin_so_list, separately allocate an lm_info object.
9421         (darwin_free_so): Free lm_info.
9422
9423 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9424
9425         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9426         with fprintf_filtered.
9427
9428 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9429
9430         * regcache.c (regcache::regcache): New function.
9431         (regcache::~regcache): New function.
9432         (regcache_xmalloc_1): Remove.
9433         (regcache_xmalloc): Call new regcache.
9434         (regcache_xfree): Call delete regcache.
9435         (get_thread_arch_aspace_regcache): Call new regcache.
9436
9437 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9438
9439         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9440         lwp instead of ptid_get_lwp.
9441
9442 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9443
9444         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9445         lwp_info instead of getting from inferior_ptid.
9446
9447 2017-04-27  Keith Seitz  <keiths@redhat.com>
9448
9449         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9450         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9451         (CV_CONVERSION_BADNESS): Define.
9452         (rank_one_type): Remove overly restrictive rvalue reference
9453         rank checks.
9454         Add cv-qualifier checks and subranks for type equality.
9455         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9456         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9457         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9458
9459 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9460
9461         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9462         count when creating the object.
9463
9464 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9465             Ulrich Weigand  <uweigand@de.ibm.com>
9466
9467         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9468         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9469         is used in AIX.
9470         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9471         (process_xcoff_symbol): Likewise.
9472         (scan_xcoff_symtab): Likewise.
9473
9474 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9475
9476         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9477         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9478         (ia64_access_reg): Use get_frame_register_unsigned.
9479         (ia64_access_rse_reg): Likewise.
9480         (ia64_libunwind_frame_prev_register): Likewise.
9481
9482 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9483
9484         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9485         * gdbarch.c: Regenerated.
9486         * gdbarch.h: Regenerated.
9487         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9488         visibility external.
9489         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9490         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9491         (enum cfa_how_kind): Move to ...
9492         (struct dwarf2_frame_state_reg_info): Likewise.
9493         (struct dwarf2_frame_state): Likewise.
9494         * dwarf2-frame.h: ... here.
9495         (dwarf2_frame_state_alloc_regs): New declaration.
9496         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9497         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9498
9499 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9500
9501         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9502         regcache_raw_read_unsigned.
9503         (xtensa_pseudo_register_write): Likewise.
9504
9505 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9506
9507         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9508         (nds32_pseudo_register_write): Likewise.
9509
9510 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9511
9512         * regcache.c (struct regcache) <readonly_p>: Change its type
9513         to bool.
9514         (regcache_xmalloc_1): Update parameter type and callers update.
9515
9516 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9517
9518         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9519         set_gdbarch_wchar_bit.
9520         * arm-tdep.c (arm_gdbarch_init): Likewise.
9521
9522 2017-04-25  Pedro Alves  <palves@redhat.com>
9523
9524         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9525         (BothAreRelocatable, memcopy, memmove): Don't define.
9526         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9527         macros.
9528
9529 2017-04-25  Pedro Alves  <palves@redhat.com>
9530
9531         * common/common-defs.h: Include "common/poison.h".
9532         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9533         and adjust.
9534         * common/poison.h: New file.
9535         * common/traits.h: Include <type_traits>.
9536         (Not, Or, Requires): New, moved from common/function-view.h.
9537
9538 2017-04-25  Pedro Alves  <palves@redhat.com>
9539
9540         * breakpoint.h (struct breakpoint): In-class initialize all
9541         fields.  Make boolean fields "bool".
9542         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9543         memset call and initializations no longer necessary.
9544
9545 2017-04-25  Pedro Alves  <palves@redhat.com>
9546
9547         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9548         reference.
9549         (pt_btrace_insn): New function.
9550         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9551
9552 2017-04-25  Pedro Alves  <palves@redhat.com>
9553
9554         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9555         "base" field and inherit from "bp_location" instead.  Add
9556         non-default ctor.
9557         (allocate_location_exception): Use new non-default ctor.
9558         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9559         (init_bp_location): Convert to ...
9560         (bp_location::bp_location): ... this new ctor, and remove memset
9561         call.
9562         (base_breakpoint_allocate_location): Use the new non-default ctor.
9563         * breakpoint.h (bp_location): Now a class.  Declare default and
9564         non-default ctors.  In-class initialize all members.
9565         (init_bp_location): Remove declaration.
9566
9567 2017-04-25  Pedro Alves  <palves@redhat.com>
9568
9569         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9570         assignment operator.
9571
9572 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9573
9574         * doublest.c (convert_doublest_to_floatformat): Call
9575         floatformat_totalsize_bytes.
9576
9577 2017-04-22  Tom Tromey  <tom@tromey.com>
9578
9579         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9580         ui_out_emit_list.
9581         * stack.c (print_frame): Use ui_out_emit_list.
9582         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9583         ui_out_emit_list.
9584         * mi/mi-main.c (print_one_inferior)
9585         (mi_cmd_data_list_register_names)
9586         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9587         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9588         ui_out_emit_list.
9589         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9590         (mi_output_solib_attribs): Use ui_out_emit_list,
9591         ui_out_emit_tuple.
9592         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9593         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9594         (mi_cmd_stack_list_args, list_args_or_locals): Use
9595         ui_out_emit_list.
9596         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9597         * breakpoint.c (print_solib_event, output_thread_groups): Use
9598         ui_out_emit_list.
9599
9600 2017-04-22  Tom Tromey  <tom@tromey.com>
9601
9602         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9603         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9604         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9605
9606 2017-04-22  Tom Tromey  <tom@tromey.com>
9607
9608         * tracepoint.c (tvariables_info_1)
9609         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9610
9611 2017-04-22  Tom Tromey  <tom@tromey.com>
9612
9613         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9614         annotate_arg_emitter.
9615         * breakpoint.c (print_mention_watchpoint)
9616         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9617         * annotate.h (struct annotate_arg_emitter): New.
9618
9619 2017-04-22  Tom Tromey  <tom@tromey.com>
9620
9621         * record-btrace.c (record_btrace_insn_history)
9622         (record_btrace_insn_history_range, record_btrace_call_history)
9623         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9624         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9625         ui_out_emit_tuple.
9626         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9627         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9628         * skip.c (skip_info): Use ui_out_emit_tuple.
9629         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9630         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9631         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9632         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9633         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9634         ui_out_emit_tuple.
9635         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9636         (output_register, mi_cmd_data_read_memory)
9637         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9638         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9639         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9640         Use ui_out_emit_tuple.
9641         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9642         ui_out_emit_tuple.
9643         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9644         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9645         * linux-thread-db.c (info_auto_load_libthread_db): Use
9646         ui_out_emit_tuple.
9647         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9648         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9649         * disasm.c (do_mixed_source_and_assembly_deprecated)
9650         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9651         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9652         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9653         * breakpoint.c (print_one_breakpoint_location)
9654         (print_one_breakpoint): Use ui_out_emit_tuple.
9655         * auto-load.c (print_script, info_auto_load_cmd): Use
9656         ui_out_emit_tuple.
9657         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9658
9659 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9660
9661         * thread.c (print_thread_info_1): Remove dead code.
9662
9663 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9664
9665         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9666         GDB_SELF_TEST.
9667         * arm-tdep.c (selftests::arm_record_test): Likewise.
9668
9669 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9670
9671         * regcache.c (regcache_restore): Remove argument 2.  Replace
9672         argument 3 with regcache.  Get register status from
9673         src->register_status and get register contents from
9674         register_buffer (src, regnum).
9675         (regcache_cpy): Update.
9676
9677 2017-04-19  Pedro Alves  <palves@redhat.com>
9678
9679         * gdbthread.h (thread): Add missing closing parenthesis in
9680         comment.
9681
9682 2017-04-19  Pedro Alves  <palves@redhat.com>
9683
9684         * common/refcounted-object.h: New file.
9685         * gdbthread.h: Include "common/refcounted-object.h".
9686         (thread_info): Inherit from refcounted_object and add comments.
9687         (thread_info::incref, thread_info::decref)
9688         (thread_info::m_refcount): Delete.
9689         (thread_info::deletable): Use the refcounted_object::refcount()
9690         method.
9691         * inferior.c (current_inferior_): Add comment.
9692         (set_current_inferior): Increment/decrement refcounts.
9693         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9694         not-deletable instead of comparing with the current inferior.
9695         (initialize_inferiors): Increment the initial inferior's refcount.
9696         * inferior.h (struct inferior): Forward declare.
9697         Include "common/refcounted-object.h".
9698         (current_inferior, set_current_inferior): Move declaration to
9699         before struct inferior's definition, and fix comment.
9700         (inferior): Inherit from refcounted_object.  Add comments.
9701         * thread.c (switch_to_thread_no_regs): Reference the thread's
9702         inferior pointer directly instead of doing a ptid lookup.
9703         (switch_to_no_thread): New function.
9704         (switch_to_thread(thread_info *)): New function, factored out
9705         from ...
9706         (switch_to_thread(ptid_t)): ... this.
9707         (restore_current_thread): Delete.
9708         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9709         fields, and add 'inf' field.
9710         (do_restore_current_thread_cleanup): Check whether old->inf is
9711         alive instead of looking up an inferior by ptid.  Use
9712         switch_to_thread and switch_to_no_thread.
9713         (restore_current_thread_cleanup_dtor): Use old->inf directly
9714         instead of lookup up an inferior by id.  Decref the inferior.
9715         Don't restore 'removable'.
9716         (make_cleanup_restore_current_thread): Same the inferior pointer
9717         in old, instead of the inferior number.  Incref the inferior.
9718         Don't save/clear 'removable'.
9719
9720 2017-04-19  Pedro Alves  <palves@redhat.com>
9721
9722         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9723         unittests/scoped_restore-selftests.c.
9724         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9725         * common/scoped_restore.h (scoped_restore_base): Make "class".
9726         (scoped_restore_base::release): New public method.
9727         (scoped_restore_base::scoped_restore_base): New protected ctor.
9728         (scoped_restore_base::m_saved_var): New protected field.
9729         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9730         scoped_restore_base base class instead of m_saved_var directly.
9731         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9732         (scoped_restore_tmpl::scoped_restore_tmpl(const
9733         scoped_restore_tmpl<T>&)): Likewise.
9734         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9735         method.
9736         (scoped_restore_tmpl::saved_var): New method.
9737         (scoped_restore_tmpl::m_saved_var): Delete.
9738         * inferior.h (inferior::detaching): Now a bool.
9739         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9740         cleanup.
9741         * unittests/scoped_restore-selftests.c: New file.
9742
9743 2017-04-19  Pedro Alves  <palves@redhat.com>
9744
9745         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9746         Re-sort in alphabetic order.
9747
9748 2017-04-18  Pedro Alves  <palves@redhat.com>
9749
9750         * xml-support.c (obstack_xml_printf): Delete.
9751         * xml-support.h (obstack_xml_printf): Delete.
9752
9753 2017-04-18  Pedro Alves  <palves@redhat.com>
9754
9755         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9756         vdebug, verror, body_text, start_element, end_element, name,
9757         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9758         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9759         is_xinclude>: Make private and add m_ prefix.
9760         (gdb_xml_parser::body_text): New method, based on ...
9761         (gdb_xml_body_text): ... this.  Adjust.
9762         (gdb_xml_parser::vdebug): New method, based on ...
9763         (gdb_xml_debug): ... this.  Adjust.
9764         (gdb_xml_parser::verror): New method, based on ...
9765         (gdb_xml_error): ... this.  Adjust.
9766         (gdb_xml_parser::start_element): New method, based on ...
9767         (gdb_xml_start_element): ... this.  Adjust.
9768         (gdb_xml_start_element_wrapper): Defer to
9769         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9770         (gdb_xml_parser::end_element): New method, based on ...
9771         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9772         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9773         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9774         (gdb_xml_parser::use_dtd): New method, based on ...
9775         (gdb_xml_use_dtd): ... this.  Adjust.
9776         (gdb_xml_parser::parse): New method, based on ...
9777         (gdb_xml_parse): ... this.  Adjust.
9778         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9779         (xinclude_start_include): Adjust to call the parser's name method.
9780         (xml_xinclude_default, xml_xinclude_start_doctype)
9781         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9782         method.
9783         (xml_process_xincludes): Adjust to call parser methods.
9784         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9785         declarations.
9786
9787 2017-04-18  Pedro Alves  <palves@redhat.com>
9788
9789         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9790         gdb::optional<std::string>.
9791         * xml-support.c: Include <string>.
9792         (scope_level::scope_level(scope_level &&))
9793         (scope_level::~scope_level): Delete.
9794         (scope_level::body): Now a std::string.
9795         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9796         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9797         parameter.
9798         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9799         (xinclude_parsing_data::output): Now a std::string reference.
9800         (xinclude_start_include): Adjust.
9801         (xml_xinclude_default): Adjust.
9802         (xml_process_xincludes): Add 'output' parameter, and return bool.
9803         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9804         and return bool.
9805         * xml-tdesc.c: Include <unordered_map> and <string>.
9806         (tdesc_xml_cache): Delete.
9807         (tdesc_xml_cache_s): Delete.
9808         (xml_cache): Now an std::unordered_map.
9809         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9810         (target_fetch_description_xml): Change return type to
9811         gdb::optional<std::string>, and adjust.
9812         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9813         (target_fetch_description_xml): Change return type to
9814         gdb::optional<std::string>.
9815
9816 2017-04-18  Pedro Alves  <palves@redhat.com>
9817
9818         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9819         unittests/optional-selftests.c.
9820         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9821         * unittests/optional-selftests.c: New file.
9822         * unittests/optional/assignment/1.cc: New file.
9823         * unittests/optional/assignment/2.cc: New file.
9824         * unittests/optional/assignment/3.cc: New file.
9825         * unittests/optional/assignment/4.cc: New file.
9826         * unittests/optional/assignment/5.cc: New file.
9827         * unittests/optional/assignment/6.cc: New file.
9828         * unittests/optional/assignment/7.cc: New file.
9829         * unittests/optional/cons/copy.cc: New file.
9830         * unittests/optional/cons/default.cc: New file.
9831         * unittests/optional/cons/move.cc: New file.
9832         * unittests/optional/cons/value.cc: New file.
9833         * unittests/optional/in_place.cc: New file.
9834         * unittests/optional/observers/1.cc: New file.
9835         * unittests/optional/observers/2.cc: New file.
9836
9837 2017-04-18  Pedro Alves  <palves@redhat.com>
9838
9839         * common/gdb_optional.h: Include common/traits.h.
9840         (in_place_t): New type.
9841         (in_place): New constexpr variable.
9842         (optional::optional): Remove member initialization of
9843         m_instantiated.
9844         (optional::optional(in_place_t...)): New constructor.
9845         (optional::~optional): Use reset.
9846         (optional::optional(const optional&)): New.
9847         (optional::optional(const optional&&)): New.
9848         (optional::optional(T &)): New.
9849         (optional::optional(T &&)): New.
9850         (operator::operator=(const optional &)): New.
9851         (operator::operator=(optional &&)): New.
9852         (operator::operator= (const T &))
9853         (operator::operator= (T &&))
9854         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9855         (operator::reset): New.
9856         (operator::m_instantiated):: Add in-class initializer.
9857         * common/traits.h: Include <type_traits>.
9858         (struct And): New types.
9859
9860 2017-04-18  Pedro Alves  <palves@redhat.com>
9861
9862         * xml-support.c: Include <vector>.
9863         (scope_level::scope_level(const gdb_xml_element *))
9864         (scope_level::scope_level(scope_level&&)): New.
9865         (scope_level::~scope_level): New.
9866         (scope_level_s): Delete.
9867         (gdb_xml_parser::scopes): Now a std::vector.
9868         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9869         Use std::vector.
9870         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9871         scope cleanup code.
9872         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9873         of the scopes member.  Use std::vector::emplace_back.
9874
9875 2017-04-18  Pedro Alves  <palves@redhat.com>
9876
9877         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9878         a bool.
9879         (gdb_xml_end_element): Change type of first parameter.
9880         (gdb_xml_cleanup): Rename to ...
9881         (gdb_xml_parser::~gdb_xml_parser): ... this.
9882         (gdb_xml_create_parser_and_cleanup): Delete with ...
9883         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9884         to this new ctor.
9885         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9886         using gdb_xml_create_parser_and_cleanup.
9887         (xinclude_parsing_data): Add ctor/dtor.
9888         (xml_xinclude_cleanup): Delete.
9889         (xml_process_xincludes): Create a local xinclude_parsing_data
9890         instead of heap-allocating one.  Create a local gdb_xml_parser
9891         instead of heap-allocating one with
9892         gdb_xml_create_parser_and_cleanup.
9893
9894 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9895
9896         PR threads/20743
9897         * fbsd-nat.c (resume_one_thread_cb): Remove.
9898         (resume_all_threads_cb): Remove.
9899         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9900         iterate_over_threads.
9901
9902 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9903
9904         * NEWS: Create a new section for the next release branch.
9905         Rename the section of the current branch, now that it has
9906         been cut.
9907
9908 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9909
9910         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9911         * version.in: Bump version to 8.0.50.DATE-git.
9912
9913 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9914
9915         PR gdb/21385
9916         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9917         independently of the host, and fix build breakage on Cygwin.
9918
9919 2017-04-13  Pedro Alves  <palves@redhat.com>
9920
9921         * inferior.c (free_inferior): Convert to ...
9922         (inferior::~inferior): ... this dtor.
9923         (inferior::inferior): New ctor, factored out from ...
9924         (add_inferior_silent): ... here.  Allocate the inferior with a new
9925         expression.
9926         (delete_inferior): Call delete instead of free_inferior.
9927         * inferior.h (gdb_environ, continuation): Forward declare.
9928         (inferior): Now a class.  Add in-class initialization to all
9929         members.  Make boolean fields bool, except 'detaching'.
9930         (inferior::inferior): New explicit ctor.
9931         (inferior::~inferior): New.
9932
9933 2017-04-13  Pedro Alves  <palves@redhat.com>
9934
9935         * inferior.c (init_inferior_list): Delete.
9936         * inferior.h (init_inferior_list): Delete.
9937
9938 2017-04-13  Pedro Alves  <palves@redhat.com>
9939
9940         PR threads/13217
9941         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9942         (top level): Call it twice, with different thread sets.
9943
9944 2017-04-13  Pedro Alves  <palves@redhat.com>
9945
9946         * thread.c: Include <algorithm>.
9947         (thread_array_cleanup): Delete.
9948         (scoped_inc_dec_ref): New class.
9949         (live_threads_count): New function.
9950         (set_thread_refcount): Delete.
9951         (tp_array_compar_ascending): Now a bool.
9952         (tp_array_compar): Convert to a std::sort comparison function.
9953         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9954         and live_threads_count.
9955
9956 2017-04-13  Pedro Alves  <palves@redhat.com>
9957
9958         * infrun.c (follow_fork_inferior): Also switch the current
9959         inferior.
9960
9961 2017-04-13  Pedro Alves  <palves@redhat.com>
9962
9963         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9964         before calling create_internal_breakpoint.
9965
9966 2017-04-13  Pedro Alves  <palves@redhat.com>
9967
9968         * fork-child.c (execv_argv): New class.
9969         (breakup_args): Refactored as ...
9970         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9971         Copy arguments to storage and replace separators with NULL
9972         terminators in place.
9973         (escape_bang_in_quoted_argument): Adjust to return bool.
9974         (execv_argv::execv_argv): New ctor.
9975         (execv_argv::init_for_shell): New method, factored out from
9976         fork_inferior.  Don't strdup strings into the vector.
9977         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9978         Remove free_vector_argv call.
9979
9980 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9981
9982         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9983         tdep->rx_psw_type.
9984
9985 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9986
9987         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9988         * rx-tdep.c (rx_gdbarch_init): Likewise.
9989
9990 2017-04-13  Pedro Alves  <palves@redhat.com>
9991
9992         * breakpoint.h (struct breakpoint): Reindent.
9993
9994 2017-04-13  Pedro Alves  <palves@redhat.com>
9995
9996         * breakpoint.c (bp_location): Rename to ...
9997         (bp_locations): ... this.  All references updated.
9998         (bp_location_count): Rename to ...
9999         (bp_locations_count): ... this.  All references updated.
10000         (bp_location_placed_address_before_address_max): Rename to ...
10001         (bp_locations_placed_address_before_address_max): ... this.  All
10002         references updated.
10003         (bp_location_shadow_len_after_address_max): Rename to ...
10004         (bp_locations_shadow_len_after_address_max): ... this.  All
10005         references updated.
10006         (bp_location_compare_addrs): Rename to ...
10007         (bp_locations_compare_addrs): ... this.  All references updated.
10008         (bp_location_compare):Rename to ...
10009         (bp_locations_compare): ... this.  All references updated.
10010         (bp_location_target_extensions_update): Rename to ...
10011         (bp_locations_target_extensions_update): ... this.  All references
10012         updated.
10013
10014 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10015
10016         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10017         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10018         'sgtty.h'.
10019         * common/gdb_termios.h: New file, with parts of "terminal.h".
10020         * inflow.c: Include "gdb_termios.h".
10021         * ser-unix.c: Include "gdb_termios.h".
10022         * terminal.h: Move terminal-related defines to
10023         "common/gdb_termios.h".
10024
10025 2017-04-12  Tom Tromey  <tom@tromey.com>
10026
10027         * probe.c (parse_probes): Update.
10028         * location.h (delete_event_location): Don't declare.
10029         (event_location_deleter::operator()): Update.
10030         * location.c (event_location_deleter::operator()): Rename from
10031         delete_event_location.
10032         * linespec.h (linespec_result) <location>: Change type to
10033         event_location_up.
10034         * linespec.c (canonicalize_linespec, event_location_to_sals)
10035         (decode_objc): Update.
10036         (linespec_result): Don't call delete_event_location.
10037         * breakpoint.c (create_breakpoints_sal)
10038         (bkpt_probe_create_sals_from_location)
10039         (strace_marker_create_sals_from_location): Update.
10040
10041 2017-04-12  Tom Tromey  <tom@tromey.com>
10042
10043         * linespec.h (struct linespec_result): Add constructor and
10044         destructor.
10045         (init_linespec_result, destroy_linespec_result)
10046         (make_cleanup_destroy_linespec_result): Don't declare.
10047         * linespec.c (init_linespec_result): Remove.
10048         (linespec_result::~linespec_result): Rename from
10049         destroy_linespec_result.  Update.
10050         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10051         Remove.
10052         * breakpoint.c (create_breakpoint, break_range_command)
10053         (decode_location_default): Update.
10054         * ax-gdb.c (agent_command_1): Update.
10055
10056 2017-04-12  Tom Tromey  <tom@tromey.com>
10057
10058         * remote.c (remote_download_tracepoint): Update.
10059         * python/py-breakpoint.c (bppy_get_location): Update.
10060         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10061         (gdbscm_breakpoint_location): Update.
10062         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10063         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10064         Change type to event_location_up.
10065         * breakpoint.c (create_overlay_event_breakpoint)
10066         (create_longjmp_master_breakpoint)
10067         (create_std_terminate_master_breakpoint)
10068         (create_exception_master_breakpoint)
10069         (breakpoint_event_location_empty_p, print_breakpoint_location)
10070         (print_one_breakpoint_location, create_thread_event_breakpoint)
10071         (init_breakpoint_sal, create_breakpoint)
10072         (print_recreate_ranged_breakpoint, break_range_command)
10073         (init_ada_exception_breakpoint, say_where): Update.
10074         (base_breakpoint_dtor): Don't call delete_event_location.
10075         (bkpt_print_recreate, tracepoint_print_recreate)
10076         (dprintf_print_recreate, update_static_tracepoint)
10077         (breakpoint_re_set_default): Update.
10078
10079 2017-04-12  Tom Tromey  <tom@tromey.com>
10080
10081         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10082         type of "to_do".  Update.
10083         (compute_stack_depth): Use std::vector.
10084
10085 2017-04-12  Tom Tromey  <tom@tromey.com>
10086
10087         * printcmd.c (find_instruction_backward): Use std::vector.
10088
10089 2017-04-12  Tom Tromey  <tom@tromey.com>
10090
10091         * symfile.c (objfilep): Remove typedef.
10092         (reread_symbols): Use a std::vector.
10093
10094 2017-04-12  Tom Tromey  <tom@tromey.com>
10095
10096         * mi/mi-main.c (exec_direction_forward): Remove.
10097         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10098         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10099         scoped_restore.
10100         * guile/guile.c (guile_repl_command, guile_command)
10101         (gdbscm_execute_gdb_command): Use scoped_restore.
10102         * go-exp.y (go_parse): Use scoped_restore.
10103         * d-exp.y (d_parse): Use scoped_restore.
10104         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10105         * c-exp.y (c_parse): Use scoped_restore.
10106
10107 2017-04-12  Tom Tromey  <tom@tromey.com>
10108
10109         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10110         (mi_parse): Update return type.
10111         (mi_parse_free): Remove.
10112         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10113         (mi_parse::~mi_parse): Rename from mi_parse_free.
10114         (mi_parse_cleanup): Remove.
10115         (mi_parse): Return a unique_ptr.  Use new.
10116         * mi/mi-main.c (mi_execute_command): Update.
10117
10118 2017-04-12  Tom Tromey  <tom@tromey.com>
10119
10120         * location.c (explicit_location_lex_one): Return a
10121         unique_xmalloc_ptr.
10122         (string_to_explicit_location): Update.  Remove cleanups.
10123
10124 2017-04-12  Tom Tromey  <tom@tromey.com>
10125
10126         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10127         (compare_value_and_voffset): Change type.  Update.
10128         (compute_vtable_size): Change type of "offset_vec".
10129         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10130         (gnuv3_get_typeid): Remove extraneous declaration.
10131
10132 2017-04-12  Tom Tromey  <tom@tromey.com>
10133
10134         * charset.h (wchar_iterator): Fix comment.
10135
10136 2017-04-12  Tom Tromey  <tom@tromey.com>
10137
10138         * charset.c (iconv_wrapper): New class.
10139         (cleanup_iconv): Remove.
10140         (convert_between_encodings): Use it.
10141
10142 2017-04-12  Tom Tromey  <tom@tromey.com>
10143
10144         * symfile.h (increment_reading_symtab): Update type.
10145         * symfile.c (decrement_reading_symtab): Remove.
10146         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10147         * psymtab.c (psymtab_to_symtab): Update.
10148         * dwarf2read.c (dw2_instantiate_symtab): Update.
10149
10150 2017-04-12  Tom Tromey  <tom@tromey.com>
10151
10152         * jit.c (struct jit_reader): Declare separately.  Add constructor
10153         and destructor.  Change type of "handle".
10154         (loaded_jit_reader): Define separately.
10155         (jit_reader_load): Update.  New "new".
10156         (jit_reader_unload_command): Use "delete".
10157         * gdb-dlfcn.h (struct dlclose_deleter): New.
10158         (gdb_dlhandle_up): New typedef.
10159         (gdb_dlopen, gdb_dlsym): Update types.
10160         (gdb_dlclose): Remove.
10161         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10162         (gdb_dlsym): Change type of "handle".
10163         (make_cleanup_dlclose): Remove.
10164         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10165         * compile/compile-c-support.c (load_libcc): Update.
10166
10167 2017-04-12  Tom Tromey  <tom@tromey.com>
10168
10169         * symtab.h (find_pcs_for_symtab_line): Change return type.
10170         * symtab.c (find_pcs_for_symtab_line): Change return type.
10171         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10172         type of "vec".  Update.
10173         (ltpy_get_pcs_for_line): Update.
10174         * linespec.c (decode_digits_ordinary): Update.
10175
10176 2017-04-12  Tom Tromey  <tom@tromey.com>
10177
10178         * tracepoint.c (actions_command): Update.
10179         * python/python.c (python_command, python_interactive_command):
10180         Update.
10181         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10182         * guile/guile.c (guile_command): Update.
10183         * defs.h (read_command_lines, read_command_lines_1): Return
10184         command_line_up.
10185         (command_lines_deleter): New struct.
10186         (command_line_up): New typedef.
10187         * compile/compile.c (compile_code_command)
10188         (compile_print_command): Update.
10189         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10190         command_line_up.
10191         (make_cleanup_free_command_lines): Remove.
10192         * cli/cli-script.c (get_command_line, read_command_lines_1)
10193         (copy_command_lines): Return command_line_up.
10194         (while_command, if_command, read_command_lines, define_command)
10195         (document_command): Update.
10196         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10197         Remove.
10198         * breakpoint.h (breakpoint_set_commands): Change type of
10199         "commands".
10200         * breakpoint.c (breakpoint_set_commands): Change type of
10201         "commands".  Update.
10202         (do_map_commands_command, update_dprintf_command_list)
10203         (create_tracepoint_from_upload): Update.
10204
10205 2017-04-12  Tom Tromey  <tom@tromey.com>
10206
10207         * tracepoint.c (scope_info): Update.
10208         * spu-tdep.c (spu_catch_start): Update.
10209         * python/python.c (gdbpy_decode_line): Update.
10210         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10211         * python/py-breakpoint.c (bppy_init): Update.
10212         * probe.c (parse_probes): Update.
10213         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10214         * location.h (event_location_deleter): New struct.
10215         (event_location_up): New typedef.
10216         (new_linespec_location, new_address_location, new_probe_location)
10217         (new_explicit_location, copy_event_location)
10218         (string_to_event_location, string_to_event_location_basic)
10219         (string_to_explicit_location): Update return type.
10220         (make_cleanup_delete_event_location): Remove.
10221         * location.c (new_linespec_location, new_address_location)
10222         (new_probe_location, new_explicit_location, copy_event_location):
10223         Return event_location_up.
10224         (delete_event_location_cleanup)
10225         (make_cleanup_delete_event_location): Remove.
10226         (string_to_explicit_location, string_to_event_location_basic)
10227         (string_to_event_location): Return event_location_up.
10228         * linespec.c (canonicalize_linespec, event_location_to_sals)
10229         (decode_line_with_current_source)
10230         (decode_line_with_last_displayed, decode_objc): Update.
10231         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10232         * completer.c (location_completer): Update.
10233         * cli/cli-cmds.c (edit_command, list_command): Update.
10234         * breakpoint.c (create_overlay_event_breakpoint)
10235         (create_longjmp_master_breakpoint)
10236         (create_std_terminate_master_breakpoint)
10237         (create_exception_master_breakpoint)
10238         (create_thread_event_breakpoint): Update.
10239         (init_breakpoint_sal): Update.  Remove some dead code.
10240         (create_breakpoint_sal): Change type of "location".  Update.
10241         (create_breakpoints_sal, create_breakpoint, break_command_1)
10242         (dprintf_command, break_range_command, until_break_command)
10243         (init_ada_exception_breakpoint)
10244         (strace_marker_create_sals_from_location)
10245         (update_static_tracepoint, trace_command, ftrace_command)
10246         (strace_command, create_tracepoint_from_upload): Update.
10247         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10248         * ax-gdb.c (agent_command_1): Update.
10249
10250 2017-04-12  Pedro Alves  <palves@redhat.com>
10251
10252         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10253         * configure.tgt: Handle i[34567]86-*-go32* and
10254         i[34567]86-*-msdosdjgpp*.
10255         * i386-tdep.c (i386_svr4_reg_to_regnum):
10256         Make extern.
10257         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10258         i386-go32-tdep.c.
10259         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10260         * i386-go32-tdep.c: New file.
10261         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10262         declarations.
10263
10264 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10265
10266         * aix-thread.c (pd_status2str): Change return type to const char *.
10267
10268 2017-04-12  Pedro Alves  <palves@redhat.com>
10269
10270         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10271         calls to set_gdbarch_gnu_triplet_regexp.
10272
10273 2017-04-12  Pedro Alves  <palves@redhat.com>
10274
10275         PR gdb/21323
10276         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10277         New enum value.
10278         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10279         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10280         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10281         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10282         * gdbarch.h, gdbarch.c: Regenerate.
10283         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10284         gdbarch_wchar_bit and gdbarch_wchar_signed.
10285         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10286         * arm-tdep.c (arm_gdbarch_init): Likewise.
10287         * avr-tdep.c (avr_gdbarch_init): Likewise.
10288         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10289         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10290         * i386-tdep.c (i386_go32_init_abi): Likewise.
10291         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10292         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10293         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10294         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10295         * sh-tdep.c (sh_gdbarch_init): Likewise.
10296         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10297         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10298         * windows-tdep.c (windows_init_abi): Likewise.
10299         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10300
10301 2017-04-12  Pedro Alves  <palves@redhat.com>
10302
10303         PR c++/21323
10304         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10305         cplus_primitive_type_char32_t>: New enum values.
10306         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10307         and cplus_primitive_type_char32_t.
10308         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10309         32, use the archtecture's built-in type for char16_t and char32_t,
10310         respectively.  Otherwise, fallback to init_integer_type as before,
10311         but make the type unsigned, and issue a complaint.
10312         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10313
10314 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10315
10316         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10317         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10318
10319 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10320
10321         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10322         'const char *'.
10323
10324 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10325
10326         * common/common-utils.c (free_vector_argv): New function.
10327         * common/common-utils.h: Include <vector>.
10328         (free_vector_argv): New prototype.
10329         * darwin-nat.c (darwin_create_inferior): Rewrite function
10330         prototype in order to constify "exec_file" and accept a
10331         "std::string" for "allargs".
10332         * fork-child.c: Include <vector>.
10333         (breakup_args): Rewrite function, using C++.
10334         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10335         and accept "std::string" for "allargs".  Update the code to
10336         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10337         and "execvp".
10338         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10339         order to constify "exec_file" and accept a "std::string" for
10340         "allargs".
10341         * go32-nat.c (go32_create_inferior): Likewise.
10342         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10343         * infcmd.c (run_command_1): Constify "exec_file".  Use
10344         "std::string" for inferior arguments.
10345         * inferior.h (fork_inferior): Update prototype.
10346         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10347         prototype in order to constify "exec_file" and accept a
10348         "std::string" for "allargs".
10349         * nto-procfs.c (procfs_create_inferior): Likewise.
10350         * procfs.c (procfs_create_inferior): Likewise.
10351         * remote-sim.c (gdbsim_create_inferior): Likewise.
10352         * remote.c (extended_remote_run): Update code to accept
10353         "std::string" as argument.
10354         (extended_remote_create_inferior): Rewrite function prototype in
10355         order to constify "exec_file" and accept a "std::string" for
10356         "allargs".
10357         * rs6000-nat.c (super_create_inferior): Likewise.
10358         (rs6000_create_inferior): Likewise.
10359         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10360         * windows-nat.c (windows_create_inferior): Likewise.
10361
10362 2017-04-11  Pedro Alves  <palves@redhat.com>
10363
10364         * thread.c: Fix whitespace throughout.
10365
10366 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10367
10368         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10369
10370 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10371
10372         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10373
10374 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10375
10376         PR gdb/21364
10377         * osdata.c (info_osdata): Check if 'type' is an empty string
10378         instead of NULL.
10379
10380 2017-04-10  Pedro Alves  <palves@redhat.com>
10381
10382         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10383         (ptid_to_global_thread_id, in_thread_list)
10384         (do_captured_list_thread_ids, set_resumed, set_running)
10385         (set_executing, set_stop_requested, finish_thread_state)
10386         (validate_registers_access, can_access_registers_ptid)
10387         (print_thread_info_1, switch_to_thread)
10388         (do_restore_current_thread_cleanup)
10389         (make_cleanup_restore_current_thread, thread_command)
10390         (thread_name_command): Use operator== instead of ptid_equal.
10391
10392 2017-04-10  Pedro Alves  <palves@redhat.com>
10393
10394         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10395         (current_thread_cleanup_chain): Delete.
10396         (restore_current_thread_cleanup_dtor)
10397         (make_cleanup_restore_current_thread): Remove references to
10398         current_thread_cleanup_chain.
10399
10400 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10401
10402         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10403         REG_UNKNOWN.
10404
10405 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10406
10407         PR gdb/19942
10408         * gdbthread.h (thread_info::deletable): New method.
10409         (thread_info::incref): New method.
10410         (thread_info::decref): New method.
10411         (thread_info::refcount): Move it to private.
10412         * infrun.c (save_stop_context): Call inc_refcount.
10413         (release_stop_context_cleanup): Likewise.
10414         * thread.c (set_thread_exited): New function.
10415         (init_thread_list): Delete "tp" only it is deletable, otherwise
10416         call set_thread_exited.
10417         (delete_thread_1): Call set_thread_exited.
10418         (current_thread_cleanup) <inferior_pid>: Remove.
10419         <thread>: New field.
10420         (restore_current_thread_ptid_changed): Removed.
10421         (do_restore_current_thread_cleanup): Adjust.
10422         (restore_current_thread_cleanup_dtor): Don't call
10423         find_thread_ptid.
10424         (set_thread_refcount): Use dec_refcount.
10425         (make_cleanup_restore_current_thread): Adjust.
10426         (thread_apply_all_command): Call inc_refcount.
10427         (_initialize_thread): Don't call
10428         observer_attach_thread_ptid_changed.
10429
10430 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10431
10432         * thread.c (delete_thread_1): Hoist code on marking thread as
10433         exited.
10434
10435 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10436
10437         * windows-nat.c (windows_detach): Initialize ptid with
10438         minus_one_ptid.
10439
10440 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10441
10442         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10443
10444 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10445
10446         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10447         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10448         (bfin_pseudo_register_write): Likewise
10449
10450 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10451
10452         * common/ptid.h (struct ptid): Change to...
10453         (class ptid_t): ... this.
10454         <ptid_t>: New constructors.
10455         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10456         matches>: New methods.
10457         <make_null, make_minus_one>: New static methods.
10458         <pid>: Rename to...
10459         <m_pid>: ...this.
10460         <lwp>: Rename to...
10461         <m_lwp>: ...this.
10462         <tid>: Rename to...
10463         <m_tid>: ...this.
10464         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10465         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10466         as references, move comment to class ptid_t.
10467         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10468         ptid_t static methods.
10469         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10470         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10471         Take ptid arguments as references, implement using ptid_t methods.
10472         * unittests/ptid-selftests.c: New file.
10473         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10474         unittests/ptid-selftests.c.
10475         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10476
10477 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10478
10479         * python/python.c (python_run_simple_file): Cast mode literal to
10480         non-const char pointer as expected by PyFile_FromString.
10481
10482 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10483
10484         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10485         minus_one_ptid and null_ptid.
10486
10487 2017-04-05  Pedro Alves  <palves@redhat.com>
10488
10489         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10490         * configure: Regenerate.
10491
10492 2017-04-05  Pedro Alves  <palves@redhat.com>
10493
10494         * ada-exp.y (yyerror): Constify.
10495         * ada-lang.c (bound_name, get_selections)
10496         (ada_variant_discrim_type)
10497         (ada_variant_discrim_name, ada_value_struct_elt)
10498         (ada_lookup_struct_elt_type, is_unchecked_variant)
10499         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10500         (catch_ada_exception_command_split)
10501         (catch_ada_assert_command_split, catch_assert_command)
10502         (ada_op_name): Constify.
10503         * ada-lang.h (ada_yyerror, get_selections)
10504         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10505         * arc-tdep.c (arc_print_frame_cache): Constify.
10506         * arm-tdep.c (arm_skip_stub): Constify.
10507         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10508         (gen_aggregate_elt_ref): Constify.
10509         * bcache.c (print_bcache_statistics): Constify.
10510         * bcache.h (print_bcache_statistics): Constify.
10511         * break-catch-throw.c (catch_exception_command_1):
10512         * breakpoint.c (struct ep_type_description::description):
10513         Constify.
10514         (add_solib_catchpoint): Constify.
10515         (catch_fork_command_1): Add cast.
10516         (add_catch_command): Constify.
10517         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10518         Constify.
10519         * bsd-uthread.c (bsd_uthread_state): Constify.
10520         * buildsym.c (patch_subfile_names): Constify.
10521         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10522         Constify.
10523         * c-exp.y (yyerror): Constify.
10524         (token::oper): Constify.
10525         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10526         * c-varobj.c (cplus_describe_child): Constify.
10527         * charset.c (find_charset_names): Add cast.
10528         (find_charset_names): Constify array and add const_cast.
10529         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10530         (edit_command): Constify.
10531         * cli/cli-decode.c (lookup_cmd): Constify.
10532         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10533         Constify.
10534         (struct dump_context): Constify.
10535         (add_dump_command, restore_command): Constify.
10536         * cli/cli-script.c (get_command_line): Constify.
10537         * cli/cli-script.h (get_command_line): Constify.
10538         * cli/cli-utils.c (check_for_argument): Constify.
10539         * cli/cli-utils.h (check_for_argument): Constify.
10540         * coff-pe-read.c (struct read_pe_section_data): Constify.
10541         * command.h (lookup_cmd): Constify.
10542         * common/print-utils.c (decimal2str): Constify.
10543         * completer.c (gdb_print_filename): Constify.
10544         * corefile.c (set_gnutarget): Constify.
10545         * cp-name-parser.y (yyerror): Constify.
10546         * cp-valprint.c (cp_print_class_member): Constify.
10547         * cris-tdep.c (cris_register_name, crisv32_register_name):
10548         Constify.
10549         * d-exp.y (yyerror): Constify.
10550         (struct token::oper): Constify.
10551         * d-lang.h (d_yyerror): Constify.
10552         * dbxread.c (struct header_file_location::name): Constify.
10553         (add_old_header_file, add_new_header_file, last_function_name)
10554         (dbx_next_symbol_text, add_bincl_to_list)
10555         (find_corresponding_bincl_psymtab, set_namestring)
10556         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10557         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10558         * defs.h (command_line_input, print_address_symbolic)
10559         (deprecated_readline_begin_hook): Constify.
10560         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10561         Constify.
10562         * event-top.c (handle_line_of_input): Constify and add cast.
10563         * exceptions.c (catch_errors): Constify.
10564         * exceptions.h (catch_errors): Constify.
10565         * expprint.c (print_subexp_standard, op_string, op_name)
10566         (op_name_standard, dump_raw_expression, dump_raw_expression):
10567         * expression.h (op_name, op_string, dump_raw_expression):
10568         Constify.
10569         * f-exp.y (yyerror): Constify.
10570         (struct token::oper): Constify.
10571         (struct f77_boolean_val::name): Constify.
10572         * f-lang.c (f_word_break_characters): Constify.
10573         * f-lang.h (f_yyerror): Constify.
10574         * fork-child.c (fork_inferior): Add cast.
10575         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10576         (new_variant): Constify.
10577         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10578         * gdbarch.c: Regenerate.
10579         * gdbcore.h (set_gnutarget): Constify.
10580         * go-exp.y (yyerror): Constify.
10581         (token::oper): Constify.
10582         * go-lang.h (go_yyerror): Constify.
10583         * go32-nat.c (go32_sysinfo): Constify.
10584         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10585         * guile/scm-cmd.c (cmdscm_function): Constify.
10586         * guile/scm-param.c (pascm_param_value): Constify.
10587         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10588         (h8300sx_register_name): Constify.
10589         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10590         Constify.
10591         * ia64-tdep.c (ia64_register_names): Constify.
10592         * infcmd.c (construct_inferior_arguments): Constify.
10593         (path_command, attach_post_wait): Constify.
10594         * language.c (show_range_command, show_case_command)
10595         (unk_lang_error): Constify.
10596         * language.h (language_defn::la_error)
10597         (language_defn::la_name_of_this): Constify.
10598         * linespec.c (decode_line_2): Constify.
10599         * linux-thread-db.c (thread_db_err_str): Constify.
10600         * lm32-tdep.c (lm32_register_name): Constify.
10601         * m2-exp.y (yyerror): Constify.
10602         * m2-lang.h (m2_yyerror): Constify.
10603         * m32r-tdep.c (m32r_register_names): Constify and make static.
10604         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10605         * m88k-tdep.c (m88k_register_name): Constify.
10606         * macroexp.c (appendmem): Constify.
10607         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10608         (upgrade_type, parse_external, parse_partial_symbols)
10609         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10610         (new_symbol): Constify.
10611         * memattr.c (mem_info_command): Constify.
10612         * mep-tdep.c (register_name_from_keyword): Constify.
10613         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10614         Constify.
10615         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10616         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10617         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10618         cast.
10619         (mi_execute_async_cli_command): Constify.
10620         * mips-tdep.c (mips_register_name): Constify.
10621         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10622         (am33_register_name, am33_2_register_name)
10623         * moxie-tdep.c (moxie_register_names): Constify.
10624         * nat/linux-osdata.c (osdata_type): Constify fields.
10625         * nto-tdep.c (nto_parse_redirection): Constify.
10626         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10627         (lookup_child_selector): Constify.
10628         (objc_methcall::name): Constify.
10629         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10630         (lookup_struct_typedef): Constify.
10631         * objfiles.c (pc_in_section): Constify.
10632         * objfiles.h (pc_in_section): Constify.
10633         * p-exp.y (struct token::oper): Constify.
10634         (yyerror): Constify.
10635         * p-lang.h (pascal_yyerror): Constify.
10636         * parser-defs.h (op_name_standard): Constify.
10637         (op_print::string): Constify.
10638         (exp_descriptor::op_name): Constify.
10639         * printcmd.c (print_address_symbolic): Constify.
10640         * psymtab.c (print_partial_symbols): Constify.
10641         * python/py-breakpoint.c (stop_func): Constify.
10642         (bppy_get_expression): Constify.
10643         * python/py-cmd.c (cmdpy_completer::name): Constify.
10644         (cmdpy_function): Constify.
10645         * python/py-event.c (evpy_add_attribute)
10646         (gdbpy_initialize_event_generic): Constify.
10647         * python/py-event.h (evpy_add_attribute)
10648         (gdbpy_initialize_event_generic): Constify.
10649         * python/py-evts.c (add_new_registry): Constify.
10650         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10651         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10652         * python/py-inferior.c (get_buffer): Add cast.
10653         * python/py-param.c (parm_constant::name): Constify.
10654         * python/py-unwind.c (fprint_frame_id): Constify.
10655         * python/python.c (gdbpy_parameter_value): Constify.
10656         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10657         * remote.c (memory_packet_config::name): Constify.
10658         (show_packet_config_cmd, remote_write_bytes)
10659         (remote_buffer_add_string):
10660         * reverse.c (exec_reverse_once): Constify.
10661         * rs6000-tdep.c (variant::name, variant::description): Constify.
10662         * rust-exp.y (rustyyerror): Constify.
10663         * rust-lang.c (rust_op_name): Constify.
10664         * rust-lang.h (rustyyerror): Constify.
10665         * serial.h (serial_ops::name): Constify.
10666         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10667         (sh_sh3e_register_name, sh_sh2e_register_name)
10668         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10669         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10670         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10671         (sh_sh4al_dsp_register_name): Constify.
10672         * sh64-tdep.c (sh64_register_name): Constify.
10673         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10674         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10675         * stabsread.c (patch_block_stabs, read_type_number)
10676         (ref_map::stabs, ref_add, process_reference)
10677         (symbol_reference_defined, define_symbol, define_symbol)
10678         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10679         (read_one_struct_field, read_struct_fields, read_baseclasses)
10680         (read_tilde_fields, read_struct_type, read_array_type)
10681         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10682         (read_huge_number, read_range_type, read_args, common_block_start)
10683         (find_name_end): Constify.
10684         * stabsread.h (common_block_start, define_symbol)
10685         (process_one_symbol, symbol_reference_defined, ref_add):
10686         * symfile.c (get_section_index, add_symbol_file_command):
10687         * symfile.h (get_section_index): Constify.
10688         * target-descriptions.c (tdesc_type::name): Constify.
10689         (tdesc_free_type): Add cast.
10690         * target.c (find_default_run_target):
10691         (add_deprecated_target_alias, find_default_run_target)
10692         (target_announce_detach): Constify.
10693         (do_option): Constify.
10694         * target.h (add_deprecated_target_alias): Constify.
10695         * thread.c (print_thread_info_1): Constify.
10696         * top.c (deprecated_readline_begin_hook, command_line_input):
10697         Constify.
10698         (init_main): Add casts.
10699         * top.h (handle_line_of_input): Constify.
10700         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10701         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10702         (tfind_command): Rename to ...
10703         (tfind_command_1): ... this and constify.
10704         (tfind_command): New function.
10705         (tfind_end_command, tfind_start_command): Adjust.
10706         (encode_source_string): Constify.
10707         * tracepoint.h (encode_source_string): Constify.
10708         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10709         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10710         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10711         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10712         * tui/tui-win.c (parse_scrolling_args): Constify.
10713         * tui/tui-windata.c (tui_erase_data_content): Constify.
10714         * tui/tui-windata.h (tui_erase_data_content): Constify.
10715         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10716         * tui/tui.c (tui_enable): Add cast.
10717         * utils.c (defaulted_query): Constify.
10718         (init_page_info): Add cast.
10719         (puts_debug, subset_compare): Constify.
10720         * utils.h (subset_compare): Constify.
10721         * varobj.c (varobj_format_string): Constify.
10722         * varobj.h (varobj_format_string): Constify.
10723         * vax-tdep.c (vax_register_name): Constify.
10724         * windows-nat.c (windows_detach): Constify.
10725         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10726         * xml-support.c (gdb_xml_end_element): Constify.
10727         * xml-tdesc.c (tdesc_start_reg): Constify.
10728         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10729         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10730         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10731
10732 2017-04-05  Pedro Alves  <palves@redhat.com>
10733
10734         * proc-api.c (struct trans): Constify.
10735         (procfs_note): Constify.
10736         * proc-events.c (struct trans, syscall_table):
10737         * proc-flags.c (struct trans): Constify.
10738         * proc-utils.h (procfs_note): Constify.
10739         * proc-why.c (struct trans): Constify.
10740         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10741         (procfs_detach): Constify.
10742         * sol-thread.c (struct string_map): Constify.
10743         (td_err_string, td_state_string): Constify.
10744
10745 2017-04-05  Pedro Alves  <palves@redhat.com>
10746
10747         * proc-api.c (procfs_filename): Don't initialize
10748         procfs_filename.
10749         (prepare_to_trace): Assume procfs_filename is non-NULL.
10750         (_initialize_proc_api): Give procfs_filename a default value here.
10751
10752 2017-04-05  Pedro Alves  <palves@redhat.com>
10753
10754         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10755         'cond_string' parameter.
10756         (extract_exception_regexp): Constify 'string' parameter.
10757         (catch_exception_command_1): Constify.
10758         * breakpoint.c (init_catchpoint)
10759         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10760         parameter.
10761         (ep_parse_optional_if_clause, catch_fork_command_1)
10762         (catch_exec_command_1): Constify.
10763         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10764         parameter.
10765         (ep_parse_optional_if_clause): Constify.
10766         * cli/cli-utils.c (remove_trailing_whitespace)
10767         (check_for_argument): Constify.
10768         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10769         non-const overload.
10770         (check_for_argument): Likewise.
10771
10772 2017-04-05  Pedro Alves  <palves@redhat.com>
10773
10774         * event-top.c (command_line_handler): Add cast to execute_command
10775         call.
10776         * record-btrace.c (cmd_record_btrace_bts_start)
10777         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10778         (cmd_record_btrace_start): Add cast to execute_command call.
10779         * record-full.c (record_full_goto_insn):
10780         * record.c (record_start, record_stop): Add cast to
10781         execute_command_to_string calls.
10782         (cmd_record_start): Add cast to execute_command calls.
10783
10784 2017-04-05  Pedro Alves  <palves@redhat.com>
10785
10786         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10787         static inline function.
10788         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10789         array and use gdb_PyArg_ParseTupleAndKeywords.
10790         * python/py-cmd.c (cmdpy_init): Likewise.
10791         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10792         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10793         (infpy_search_memory): Likewise.
10794         * python/py-objfile.c (objfpy_add_separate_debug_file)
10795         (gdbpy_lookup_objfile): Likewise.
10796         * python/py-symbol.c (gdbpy_lookup_symbol)
10797         (gdbpy_lookup_global_symbol): Likewise.
10798         * python/py-type.c (gdbpy_lookup_type): Likewise.
10799         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10800         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10801         Likewise.
10802
10803 2017-04-05  Pedro Alves  <palves@redhat.com>
10804
10805         * python/python-internal.h (gdb_PyGetSetDef): New type.
10806         * python/py-block.c (block_object_getset)
10807         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10808         * python/py-event.c (event_object_getset)
10809         (finish_breakpoint_object_getset): Likewise.
10810         * python/py-inferior.c (inferior_object_getset): Likewise.
10811         * python/py-infthread.c (thread_object_getset): Likewise.
10812         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10813         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10814         * python/py-objfile.c (objfile_getset): Likewise.
10815         * python/py-progspace.c (pspace_getset): Likewise.
10816         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10817         Likewise.
10818         * python/py-record.c (recpy_record_getset): Likewise.
10819         * python/py-symbol.c (symbol_object_getset): Likewise.
10820         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10821         Likewise.
10822         * python/py-type.c (type_object_getset, field_object_getset):
10823         Likewise.
10824         * python/py-value.c (value_object_getset): Likewise.
10825
10826 2017-04-05  Pedro Alves  <palves@redhat.com>
10827
10828         * python/python-internal.h (gdb_PyObject_CallMethod)
10829         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10830         New functions.
10831         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10832         (PySys_GetObject, PySys_SetPath): New macros.
10833
10834 2017-04-05  Pedro Alves  <palves@redhat.com>
10835
10836         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10837         info_osdata_command.
10838         * osdata.c (info_osdata_command): Rename to ...
10839         (info_osdata): ... this.  Constify 'type' parameter, and remove
10840         the 'from_tty' parameter.  Accept NULL TYPE.
10841         (info_osdata_command): New function.
10842         * osdata.h (info_osdata_command): Remove declaration.
10843         (info_osdata): New declaration.
10844
10845 2017-04-05  Pedro Alves  <palves@redhat.com>
10846
10847         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10848         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10849         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10850         parameter.
10851         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10852         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10853         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10854         parameter.
10855         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10856         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10857         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10858         (mi_cmd_file_list_exec_source_files)
10859         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10860         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10861         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10862         parameter.
10863         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10864         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10865         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10866         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10867         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10868         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10869         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10870         'command' parameter.
10871         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10872         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10873         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10874         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10875         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10876         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10877         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10878         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10879         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10880         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10881         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10882         parameter.
10883         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10884         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10885         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10886         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10887         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10888         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10889         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10890         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10891         (mi_cmd_data_list_changed_registers)
10892         (mi_cmd_data_write_register_values)
10893         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10894         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10895         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10896         (mi_cmd_list_features, mi_cmd_list_target_features)
10897         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10898         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10899         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10900         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10901         (mi_cmd_trace_frame_collected): Constify 'command'
10902         parameter.
10903         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10904         'command' parameter.
10905
10906 2017-04-05  Pedro Alves  <palves@redhat.com>
10907
10908         * ada-lang.c (ada_completer_word_break_characters): Now a const
10909         array.
10910         (ada_get_gdb_completer_word_break_characters): Constify.
10911         * completer.c (gdb_completer_command_word_break_characters)
10912         (gdb_completer_file_name_break_characters)
10913         (gdb_completer_quote_characters): Now const arrays.
10914         (get_gdb_completer_quote_characters): Constify.
10915         (set_rl_completer_word_break_characters): New function.
10916         (set_gdb_completion_word_break_characters)
10917         (complete_line_internal): Use it.
10918         * completer.h (get_gdb_completer_quote_characters): Constify.
10919         (set_rl_completer_word_break_characters): Declare.
10920         * f-lang.c (f_word_break_characters): Constify.
10921         * language.c (default_word_break_characters): Constify.
10922         * language.h (language_defn::la_word_break_characters): Constify.
10923         (default_word_break_characters): Constify.
10924         * top.c (init_main): Use set_rl_completer_word_break_characters.
10925
10926 2017-04-05  Pedro Alves  <palves@redhat.com>
10927
10928         * aix-thread.c (aix_thread_pid_to_str)
10929         (aix_thread_extra_thread_info): Constify.
10930         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10931         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10932         (bsd_uthread_pid_to_str): Constify.
10933         * corelow.c (core_pid_to_str): Constify.
10934         * darwin-nat.c (darwin_pid_to_str): Constify.
10935         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10936         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10937         Constify.
10938         * gnu-nat.c (gnu_pid_to_str): Constify.
10939         * go32-nat.c (go32_pid_to_str): Constify.
10940         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10941         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10942         * inferior.c (inferior_pid_to_str): Constify.
10943         * linux-nat.c (linux_nat_pid_to_str): Constify.
10944         * linux-tdep.c (linux_core_pid_to_str): Constify.
10945         * linux-thread-db.c (thread_db_pid_to_str)
10946         (thread_db_extra_thread_info): Constify.
10947         * nto-tdep.c (nto_extra_thread_info): Constify.
10948         * nto-tdep.h (nto_extra_thread_info): Constify.
10949         * obsd-nat.c (obsd_pid_to_str): Constify.
10950         * procfs.c (procfs_pid_to_str): Constify.
10951         * ravenscar-thread.c (ravenscar_extra_thread_info)
10952         (ravenscar_pid_to_str): Constify.
10953         * remote-sim.c (gdbsim_pid_to_str): Constify.
10954         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10955         Constify.
10956         * sol-thread.c (solaris_pid_to_str): Constify.
10957         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10958         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10959         * target.c (default_pid_to_str, target_pid_to_str)
10960         (normal_pid_to_str, default_pid_to_str): Constify.
10961         * target.h (target_ops::to_pid_to_str)
10962         (target_ops::to_extra_thread_info): Constify.
10963         (target_pid_to_str, normal_pid_to_str): Constify.
10964         * windows-nat.c (windows_pid_to_str): Constify.
10965         * gdbarch.sh (core_pid_to_str): Constify.
10966         * target-delegates.c: Regenerate.
10967         * gdbarch.h, gdbarch.c: Regenerate.
10968
10969 2017-04-05  Pedro Alves  <palves@redhat.com>
10970
10971         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10972         the memory of the temporary warning_pre_print override.
10973         * utils.c (warning_pre_print): Constify.
10974         * utils.h (warning_pre_print): Constify.
10975
10976 2017-04-05  Pedro Alves  <palves@redhat.com>
10977
10978         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10979         (shell_command): New function.
10980         (make_command): Use std::string.
10981         (init_cli_cmds): Register shell_command instead of shell_escape.
10982
10983 2017-04-05  Pedro Alves  <palves@redhat.com>
10984
10985         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10986         * tracepoint.c (default_collect): Don't initialize.
10987
10988 2017-04-05  Pedro Alves  <palves@redhat.com>
10989
10990         * macroexp.c (macro_buffer::shared): Now a bool.
10991         (init_buffer): Update.
10992         (init_shared_buffer): Constify 'addr' parameter.
10993         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10994         casts.
10995
10996 2017-04-05  Pedro Alves  <palves@redhat.com>
10997
10998         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10999         * disasm.c (set_disassembler_options): Constify local.
11000         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11001
11002 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11003
11004         PR gdb/21352
11005         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11006         option.
11007
11008 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11009
11010         * frame.c (frame_unwind_register_unsigned): Call
11011         frame_unwind_register_value.
11012
11013 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11014
11015         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11016         Use gdb_test_multiple, and don't match anchor.
11017
11018 2017-04-05  Pedro Alves  <palves@redhat.com>
11019
11020         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11021         (Write After Approval): Remove Simon Marchi.
11022
11023 2017-04-05  Pedro Alves  <palves@redhat.com>
11024
11025         * common/gdb_optional.h (optional::optional): Make constexpr and
11026         initialize m_dummy.
11027
11028 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11029
11030         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11031         (amd64fbsd_jmp_buf_reg_offset): Remove.
11032         (amd64fbsd_supply_uthread): Remove function.
11033         (amd64fbsd_collect_uthread): Remove function.
11034         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11035         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11036         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11037         (fbsd-nat.c): Update comment.
11038         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11039         (i386fbsd_jmp_buf_reg_offset): Remove.
11040         (i386fbsd_supply_uthread): Remove function.
11041         (i386fbsd_collect_uthread): Remove function.
11042         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11043
11044 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11045
11046         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11047         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11048         * NEWS: Mention that support for FreeBSD/alpha was removed.
11049         * alpha-fbsd-tdep.c: Delete file.
11050         * config/alpha/fbsd.mh: Delete file.
11051         * configure.host: Delete alpha*-*-freebsd* and
11052         alpha*-*-kfreebsd*-gnu.
11053         * configure.tgt: Delete alpha*-*-freebsd* and
11054         alpha*-*-kfreebsd*-gnu.
11055
11056 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11057
11058         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11059         amd64bsd_store_inferior_registers): Use ptid from regcache.
11060
11061 2017-04-04  Pedro Alves  <palves@redhat.com>
11062
11063         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11064         data fields, make them private and add "m_" prefixes.
11065         (lnp_state_machine::lnp_state_machine): New ctor.
11066         (record_line, check_line_address, handle_set_discriminator)
11067         (handle_set_address, handle_advance_pc, handle_special_opcode)
11068         (handle_advance_line, handle_set_file, handle_negate_stmt)
11069         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11070         (end_sequence, advance_line): New methods.
11071         (m_gdbarch, m_record_lines_p): New fields.
11072         (lnp_reader_state): Delete.
11073         (dwarf_record_line): Rename to ...
11074         (lnp_state_machine::record_line): ... adjust.
11075         (init_lnp_state_machine): Delete.
11076         (lnp_state_machine::lnp_state_machine): New.
11077         (check_line_address): Rename to ...
11078         (lnp_state_machine::check_line_address): This.
11079         (dwarf_decode_lines_1): Remove reference to "reader_state".
11080         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11081         State machine internal state manipulation moved to
11082         lnp_state_machine methods.
11083
11084 2017-04-04  Pedro Alves  <palves@redhat.com>
11085
11086         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11087         unittests/offset-type-selftests.c.
11088         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11089         * common/offset-type.h: New file.
11090         * common/preprocessor.h: New file.
11091         * common/traits.h: New file.
11092         * common/valid-expr.h: New file.
11093         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11094         sect_offset and cu_offset strong typedefs throughout.
11095         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11096         typedefs throughout.
11097         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11098         sect_offset and cu_offset strong typedefs throughout.
11099         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11100         typedefs throughout.
11101         * gdbtypes.h: Include "common/offset-type.h".
11102         (cu_offset): Now an offset type (strong typedef) instead of a
11103         struct.
11104         (sect_offset): Likewise.
11105         (union call_site_parameter_u): Rename "param_offset" field to
11106         "param_cu_off".
11107         * unittests/offset-type-selftests.c: New file.
11108
11109 2017-04-04  Pedro Alves  <palves@redhat.com>
11110
11111         * common/underlying.h: New file.
11112         * dwarf2read.c: Include "common/gdb_optional.h" and
11113         "common/underlying.h".
11114         (dir_index, file_name_index): New types.
11115         (file_entry): Use them.
11116         (file_entry::include): Use to_underlying.
11117         (line_header::add_file_name): Use dir_index.
11118         (read_formatted_entries): Use gdb::optional.  Read form before
11119         writting to file_entry.
11120         (dwarf_decode_line_header): Use dir_index.
11121         (lnp_state_machine::current_file): Use to_underlying.
11122         (lnp_state_machine::file): Change type to file_name_index.
11123         (dwarf_record_line): Use to_underlying.
11124         (init_lnp_state_machine): Use file_name_index.
11125         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11126
11127 2017-04-04  Pedro Alves  <palves@redhat.com>
11128
11129         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11130         operator bool, has_value and get methods.
11131
11132 2017-04-04  Pedro Alves  <palves@redhat.com>
11133
11134         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11135         fields.
11136         (line_header): Initialize all data fields.  Change type of
11137         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11138         Change type of include_dirs to std::vector<const char *>.  Remove
11139         num_include_dirs, include_dirs_size.  Change type of file_names to
11140         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11141         (line_header::line_header): New.
11142         (line_header::add_include_dir, line_header::add_file_name): New
11143         methods.
11144         (line_header::include_dir_at): Remove NULL check.
11145         (line_header::file_name_at): Add const overload.
11146         (line_header_up): New unique_ptr typedef.
11147         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11148         std::vector.  Remove free_line_header call.
11149         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11150         free_line_header call.
11151         (free_cu_line_header): Delete.
11152         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11153         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11154         Adjust to use std::vector.
11155         (free_line_header): Delete.
11156         (free_line_header_voidp): Use delete.
11157         (add_include_dir): Replace with ...
11158         (line_header::add_include_dir): ... this method.  Use std::vector.
11159         (add_file_name): Replace with ...
11160         (line_header::add_file_name): ... this method.  Use std::vector.
11161         (add_include_dir_stub): Delete.
11162         (read_formatted_entries): Remove memset.
11163         (dwarf_decode_line_header): Return a line_header_up instead of a
11164         raw pointer.  Remove cleanup handling.  Pass lambdas to
11165         read_formatted_entries.  Adjust to use line_header methods.
11166         (dwarf_decode_lines_1): Adjust to use line_header methods.
11167         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11168         use std::vector.
11169
11170 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11171
11172         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11173         instead of struct ptid.
11174
11175 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11176
11177         * frame.c (get_frame_register_bytes): Unwind using value.
11178         (put_frame_register_bytes): Likewise.
11179
11180 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11181
11182         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11183         aggregate-like.
11184
11185 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11186
11187         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11188
11189 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11190
11191         * gdbthread.h (struct thread_info): Declare constructor and
11192         destructor.  Add some in-class member initializers.
11193         * thread.c (free_thread): Remove.
11194         (init_thread_list): Call delete instead of free_thread.
11195         (new_thread): Call thread_info constructor.
11196         (thread_info::thread_info): New function.
11197         (thread_info::~thread_info): New function.
11198         (delete_thread_1): Call delete instead of free_thread.
11199         (make_cleanup_restore_current_thread): Move tp and frame to
11200         inner block.
11201
11202 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11203
11204         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11205         (arc_skip_prologue): Likewise.
11206         (arc_make_frame_cache): Likewise.
11207         (arc_pv_get_operand): New function.
11208         (arc_is_in_prologue): Likewise.
11209         (arc_analyze_prologue): Likewise.
11210         (arc_print_frame_cache): Likewise.
11211         (MAX_PROLOGUE_LENGTH): New constant.
11212
11213 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11214
11215         * configure.tgt: Add arc-insn.o.
11216         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11217         (dump_arc_instruction_command): New function.
11218         (arc_fprintf_disasm): Likewise.
11219         (arc_disassemble_info): Likewise.
11220         (arc_insn_get_operand_value): Likewise.
11221         (arc_insn_get_operand_value_signed): Likewise.
11222         (arc_insn_get_memory_base_reg): Likewise.
11223         (arc_insn_get_memory_offset): Likewise.
11224         (arc_insn_get_branch_target): Likewise.
11225         (arc_insn_dump): Likewise.
11226         (arc_insn_get_linear_next_pc): Likewise.
11227         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11228         (arc_disassemble_info): Likewise.
11229         (arc_insn_get_branch_target): Likewise.
11230         (arc_insn_get_linear_next_pc): Likewise.
11231         * NEWS: Mention new "maint print arc arc-instruction".
11232
11233 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11234
11235         * arc-tdep (maintenance_print_arc_list): New variable.
11236         (maintenance_print_arc_command): New function.
11237
11238 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11239
11240         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11241         Add "limm" and "reserved".
11242         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11243         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11244         * arc-tdep.h (arc_regnum): Likewise.
11245
11246 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11247
11248         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11249         for THREADPTR register.
11250         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11251         register.
11252         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11253         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11254         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11255
11256 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11257
11258         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11259         registers above gdbarch_num_regs (gdbarch) as privileged in
11260         call0 ABI.
11261
11262 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11263
11264         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11265         for a single specified register or for all registers in
11266         a0_base..a0_base + C0_NREGS range.
11267         (supply_gregset_reg): Call regcache_raw_supply for a single
11268         specified register or for all registers in a0_base..a0_base +
11269         C0_NREGS range.
11270
11271 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11272
11273         * arch/xtensa.h (C0_NREGS): Add definition.
11274         * xtensa-tdep.c (C0_NREGS): Remove definition.
11275
11276 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11277
11278         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11279         Drop xtensa_default_isa initialization.
11280         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11281
11282 2017-03-27  Pedro Alves  <palves@redhat.com>
11283
11284         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11285         (file_entry::include_dir): New method.
11286         (line_header::include_dir_at, line_header::file_name_at): New
11287         methods.
11288         (setup_type_unit_groups, setup_type_unit_groups)
11289         (psymtab_include_file_name): Simplify using the new methods.
11290         (lnp_state_machine) <the_line_header>: New field.
11291         <file>: Add comment.
11292         (lnp_state_machine::current_file): New method.
11293         (dwarf_record_line): Simplify using the new methods.
11294         (init_lnp_state_machine): Initialize the "the_line_header" field.
11295         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11296         Simplify using the new methods.
11297
11298 2017-03-27  Pedro Alves  <palves@redhat.com>
11299
11300         * cp-name-parser.y (make_empty): Delete.
11301         (demangler_special, nested_name, ptr_operator, array_indicator)
11302         (direct_declarator, declarator_1): Use fill_comp instead of
11303         make_empty.
11304
11305 2017-03-27  Pedro Alves  <palves@redhat.com>
11306
11307         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11308         to ATTRIBUTE_PRINTF.
11309         * solib-target.c (library_list_start_list): Print "string" not
11310         "version".
11311         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11312         gdb_xml_error call.
11313
11314 2017-03-27  Pedro Alves  <palves@redhat.com>
11315
11316         * dwarf2read.c (struct file_and_directory): New.
11317         (dwarf2_get_dwz_file): Adjust to use std::string.
11318         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11319         (find_file_and_directory): Adjust to return a file_and_directory
11320         object.
11321         (read_file_scope): Adjust to use file_and_directory.  Remove
11322         make_cleanup/do_cleanups calls.
11323         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11324         make_cleanup/do_cleanups calls.
11325         * python/python.c (do_start_initialization): Adjust to ldirname
11326         returning a std::string.
11327         * utils.c (ldirname): Now returns a std::string.
11328         * utils.h (ldirname): Change return type to std::string.
11329         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11330         returning a std::string.
11331         * xml-tdesc.c (file_read_description_xml): Likewise.
11332
11333 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11334
11335         * regcache.c (regcache_debug_print_register): New function.
11336         * regcache.h (regcache_debug_print_register): New declaration.
11337         * target.c (debug_print_register): Remove.
11338         (target_fetch_registers): Call regcache_debug_print_register.
11339         (target_store_registers): Likewise.
11340
11341 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11342
11343         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11344         reference beyond the 'lh->include_dirs' array before accessing to
11345         it.
11346         (psymtab_include_file_name): Likewise.
11347         (dwarf_decode_lines_1): Likewise.
11348         (dwarf_decode_lines): Likewise.
11349         (file_file_name): Likewise.
11350
11351 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11352
11353         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11354         inferior_ptid.
11355         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11356         ps_lsetfpregs): Likewise.
11357         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11358         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11359         ps_lsetfpregs): Likewise.
11360         * target.c (target_fetch_registers, target_store_registers):
11361         Remove asserts.
11362
11363 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11364
11365         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11366
11367 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11368
11369         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11370         (_initialize_aarch64_tdep): Register it.
11371         (aarch64_record_load_store): Handle PRFM instruction.
11372         (aarch64_process_record_test): New function.
11373
11374 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11375
11376         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11377         indentation.
11378
11379 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11380
11381         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11382
11383 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11384
11385         python/python.c (do_start_initialization): Fix memory leak.
11386
11387 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11388
11389         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11390         using get_ptrace_pid.
11391         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11392         inferior_ptid.
11393         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11394         inferior_ptid instead of pid.
11395
11396 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11397
11398         * aarch64-tdep.c: Wrap locally used classes in anonymous
11399         namespace.
11400         * arm-tdep.c: Likewise.
11401         * linespec.c: Likewise.
11402         * ui-out.c: Likewise.
11403
11404 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11405
11406         PR gdb/19637
11407         * python/lib/gdb/printer/bound_registers.py: Import sys.
11408
11409 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11410
11411         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11412         windows_thread_info parameter and use it instead of
11413         current_thread.
11414         (windows_fetch_inferior_registers): Don't set current_thread,
11415         pass the thread to do_windows_fetch_inferior_registers.  Use
11416         ptid from regcache instead of inferior_ptid.
11417         (do_windows_store_inferior_registers): Add windows_thread_info
11418         parameter and use it instead of current_thread.
11419         (windows_store_inferior_registers): Don't set current_thread,
11420         pass the thread to do_windows_store_inferior_registers.  Use
11421         ptid from regcache instead of inferior_ptid.
11422
11423 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11424
11425         * ser-mingw.c (ser_windows_raw): Remove reference to
11426         struct serial::current_timeout.
11427
11428 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11429
11430         PR tdep/20928
11431         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11432         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11433         (sparc64_fsr_type): Fix %fsr decoding.
11434
11435 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11436
11437         * python/py-record-btrace.c (btpy_insn_data): Change return type
11438         for Python 2.
11439
11440 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11441
11442         * spu-linux-nat.c (spu_fetch_inferior_registers,
11443         spu_store_inferior_registers): Use ptid from regcache, set and
11444         restore inferior_ptid.
11445         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11446         Likewise.
11447
11448 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11449
11450         * i386-linux-nat.c (fetch_register, store_register,
11451         i386_linux_fetch_inferior_registers,
11452         i386_linux_store_inferior_registers): Use ptid from regcache.
11453         * ia64-linux-nat.c (ia64_linux_fetch_register,
11454         ia64_linux_store_register): Likewise.
11455         * inf-ptrace.c (inf_ptrace_fetch_register,
11456         inf_ptrace_store_register): Likewise.
11457         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11458         m32r_linux_store_inferior_registers): Likewise.
11459         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11460         m68kbsd_store_inferior_registers): Likewise.
11461         * m68k-linux-nat.c (fetch_register, store_register,
11462         m68k_linux_fetch_inferior_registers,
11463         m68k_linux_store_inferior_registers): Likewise.
11464         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11465         m88kbsd_store_inferior_registers): Likewise.
11466         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11467         mips_fbsd_store_inferior_registers): Likewise.
11468         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11469         mips64_linux_regsets_store_registers): Likewise.
11470         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11471         mipsnbsd_store_inferior_registers): Likewise.
11472         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11473         mips64obsd_store_inferior_registers): Likewise.
11474         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11475         Likewise.
11476         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11477         ppcfbsd_store_inferior_registers): Likewise.
11478         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11479         ppc_linux_store_inferior_registers): Likewise.
11480         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11481         ppcnbsd_store_inferior_registers): Likewise.
11482         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11483         ppcobsd_store_registers): Likewise.
11484         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11485         Likewise.
11486         * ravenscar-thread.c (ravenscar_fetch_registers,
11487         ravenscar_store_registers, ravenscar_prepare_to_store):
11488         Likewise.
11489         * record-btrace.c (record_btrace_fetch_registers,
11490         record_btrace_store_registers, record_btrace_prepare_to_store):
11491         Likewise.
11492         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11493         Lookup inferior using ptid from regcache, instead of
11494         current_inferior.
11495         * remote.c (remote_fetch_registers, remote_store_registers): Use
11496         ptid from regcache.
11497         * rs6000-nat.c (fetch_register, store_register): Likewise.
11498         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11499         s390_linux_store_inferior_registers): Likewise.
11500         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11501         shnbsd_store_inferior_registers): Likewise.
11502         * sol-thread.c (sol_thread_fetch_registers,
11503         sol_thread_store_registers): Likewise.
11504         * sparc-nat.c (sparc_fetch_inferior_registers,
11505         sparc_store_inferior_registers): Likewise.
11506         * tilegx-linux-nat.c (fetch_inferior_registers,
11507         store_inferior_registers): Likewise.
11508         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11509         vaxbsd_store_inferior_registers): Likewise.
11510         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11511         store_xtregs): Likewise.
11512
11513 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11514
11515         PR gdb/14441
11516         * NEWS: Mention support for rvalue references in GDB and python.
11517         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11518         supports both lvalue and rvalue references.
11519
11520 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11521
11522         PR gdb/14441
11523         * gdbtypes.c (rank_one_type): Implement overloading
11524         resolution rules regarding rvalue references.
11525
11526 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11527
11528         PR gdb/14441
11529         * aarch64-tdep.c (aarch64_type_align)
11530         (aarch64_extract_return_value, aarch64_store_return_value): Change
11531         lvalue reference type checks to general reference type checks.
11532         * amd64-tdep.c (amd64_classify): Likewise.
11533         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11534         Likewise.
11535         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11536         (arm_store_return_value): Likewise.
11537         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11538         * c-typeprint.c (c_print_type): Likewise.
11539         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11540         (cplus_number_of_children, cplus_describe_child): Likewise.
11541         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11542         * completer.c (expression_completer): Likewise.
11543         * cp-support.c (make_symbol_overload_list_adl_namespace):
11544         Likewise.
11545         * darwin-nat-info.c (info_mach_region_command): Likewise.
11546         * dwarf2loc.c (entry_data_value_coerce_ref)
11547         (value_of_dwarf_reg_entry): Likewise.
11548         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11549         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11550         Likewise.
11551         * findvar.c (extract_typed_address, store_typed_address):
11552         Likewise.
11553         * gdbtypes.c (rank_one_type): Likewise.
11554         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11555         * infcall.c (value_arg_coerce): Likewise.
11556         * language.c (pointer_type): Likewise.
11557         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11558         Likewise.
11559         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11560         * mn10300-tdep.c (mn10300_type_align): Likewise.
11561         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11562         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11563         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11564         Likewise.
11565         * printcmd.c (print_formatted, x_command): Likewise.
11566         * python/py-type.c (typy_get_composite, typy_template_argument):
11567         Likewise.
11568         * python/py-value.c (valpy_referenced_value)
11569         (valpy_get_dynamic_type, value_has_field): Likewise.
11570         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11571         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11572         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11573         * spu-tdep.c (spu_scalar_value_p): Likewise.
11574         * symtab.c (lookup_symbol_aux): Likewise.
11575         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11576         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11577         Likewise.
11578         * valops.c (value_cast_pointers, value_cast)
11579         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11580         (value_struct_elt, value_struct_elt_bitpos)
11581         (value_find_oload_method_list, find_overload_match)
11582         (value_rtti_indirect_type): Likewise.
11583         * valprint.c (val_print_scalar_type_p, generic_val_print):
11584         Likewise.
11585         * value.c (value_actual_type, value_as_address, unpack_long)
11586         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11587         (coerce_ref): Likewise.
11588         * varobj.c (varobj_get_value_type): Likewise.
11589
11590 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11591
11592         PR gdb/14441
11593         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11594         table of constants.
11595         * python/lib/gdb/command/explore.py: Support exploring values
11596         of rvalue reference types.
11597         * python/lib/gdb/types.py: Implement get_basic_type() for
11598         rvalue reference types.
11599         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11600         constant.
11601         * python/py-value.c (valpy_getitem): Add an rvalue reference
11602         check.
11603         (valpy_reference_value): Add new parameter "refcode".
11604         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11605         New wrappers for valpy_reference_value().
11606         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11607         (gdbpy_invoke_xmethod): Likewise.
11608
11609 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11610
11611         PR gdb/14441
11612         * dwarf2read.c (process_die, read_type_die_1): Handle the
11613         DW_TAG_rvalue_reference_type DIE.
11614         (read_tag_reference_type): Add new parameter "refcode".
11615
11616 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11617
11618         PR gdb/14441
11619         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11620         (c_type_print_modifier, c_type_print_varspec_suffix)
11621         (c_type_print_base): Support printing rvalue reference types.
11622         * c-valprint.c (c_val_print, c_value_print): Support printing
11623         rvalue reference values.
11624
11625 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11626
11627         PR gdb/14441
11628         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11629         typename.
11630         * cp-support.c (replace_typedefs): Handle
11631         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11632         * python/py-type.c (typy_lookup_type): Likewise.
11633
11634 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11635
11636         PR gdb/14441
11637         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11638         * parse.c (insert_type): Change assert statement.
11639         (follow_types): Handle rvalue reference types.
11640         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11641         constant.
11642
11643 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11644
11645         PR gdb/14441
11646         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11647         value_ref() interface.
11648         * c-valprint.c (c_value_print): Likewise.
11649         * infcall.c (value_arg_coerce): Likewise.
11650         * python/py-value.c (valpy_reference_value): Likewise.
11651         * valops.c (value_cast, value_reinterpret_cast)
11652         (value_dynamic_cast, typecmp): Likewise.
11653         (value_ref): Parameterize by kind of return value reference type.
11654         * value.h (value_ref): Add new parameter "refcode".
11655
11656 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11657
11658         PR gdb/14441
11659         * dwarf2read.c (read_tag_reference_type): Use
11660         lookup_lvalue_reference_type() instead of lookup_reference_type().
11661         * eval.c (evaluate_subexp_standard): Likewise.
11662         * f-exp.y: Likewise.
11663         * gdbtypes.c (make_reference_type, lookup_reference_type):
11664         Generalize with rvalue reference types.
11665         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11666         convenience wrappers for lookup_reference_type().
11667         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11668         reference kind parameter.
11669         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11670         wrappers for lookup_reference_type().
11671         * guile/scm-type.c (gdbscm_type_reference): Use
11672         lookup_lvalue_reference_type() instead of lookup_reference_type().
11673         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11674         * parse.c (follow_types): Likewise.
11675         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11676         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11677         Likewise.
11678         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11679         (gdbpy_invoke_xmethod): Likewise.
11680         * stabsread.c: Provide extra argument to make_reference_type()
11681         call.
11682         * valops.c (value_ref, value_rtti_indirect_type): Use
11683         lookup_lvalue_reference_type() instead of lookup_reference_type().
11684
11685 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11686
11687         PR gdb/14441
11688         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11689         (TYPE_IS_REFERENCE): New macro.
11690         (struct type): Add rvalue_reference_type field.
11691         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11692
11693 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11694
11695         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11696         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11697         New function definition.
11698         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11699         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11700         New function declaration.
11701         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11702         * mi/mi-interp.h: New file.
11703         * solib.c (info_sharedlibrary_command): Replace for loop with
11704         ALL_SO_LIBS macro
11705         * solib.h (update_solib_list): New function declaration.
11706         (so_list_head): Move macro.
11707         * solist.h (ALL_SO_LIBS): New macro.
11708
11709 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11710
11711         * infcmd.c (post_create_inferior): Remove unused argument in
11712         call to solib_add.
11713         * remote.c (remote_start_remote): Likewise.
11714         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11715         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11716         (enable_break): Likewise.
11717         * solib.c (update_solib_list): Remove unused target argument
11718         and its documentation.
11719         (solib_add): Remove unused target argument.  Remove unused
11720         argument in call to update_solib_list.
11721         (info_sharedlibrary_command): Remove unused argument in call
11722         to update_solib_list.
11723         (sharedlibrary_command): Remove unused argument in call to
11724         solib_add.
11725         (handle_solib_event): Likewise.
11726         (reload_shared_libraries): Likewise.
11727         * solib.h (solib_add): Remove unused target argument.
11728
11729 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11730
11731         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11732         (s390_displaced_step_fixup): Cover relative branches with the
11733         default fixup handling.  This fixes lack of support for some
11734         relative branch instructions.
11735
11736 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11737
11738         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11739         ptid from regcache.
11740
11741 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11742
11743         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11744         i386_darwin_store_inferior_registers): Use ptid from regcache.
11745
11746 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11747
11748         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11749         i386bsd_store_inferior_registers): Use ptid from regcache.
11750
11751 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11752
11753         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11754         hppaobsd_store_registers): Use ptid from regcache.
11755
11756 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11757
11758         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11759         hppanbsd_store_registers): Use ptid from regcache.
11760
11761 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11762
11763         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11764         from regcache.  Use get_ptrace_pid.
11765
11766 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11767
11768         * corelow.c (get_core_register_section): Use ptid from regcache,
11769         update doc.
11770
11771 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11772
11773         * bsd-uthread.c (bsd_uthread_fetch_registers,
11774         bsd_uthread_store_registers): Use ptid from regcache, set and
11775         restore inferior_ptid.
11776
11777 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11778
11779         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11780         fetch_fp_regs, store_register, store_regs, store_fp_register,
11781         store_fp_regs): Use ptid from regcache.
11782
11783 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11784
11785         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11786         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11787         store_vfp_regs): Use ptid from regcache.
11788
11789 2017-03-17  Pedro Alves  <palves@redhat.com>
11790
11791         PR remote/21188
11792         * ser-base.c (ser_base_wait_for): Add comment.
11793         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11794         version.
11795         * ser-unix.c (hardwire_raw): Remove reference to
11796         scb->current_timeout.
11797         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11798         (hardwire_ops): Install ser_base_readchar instead of
11799         hardwire_readchar.
11800         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11801         Remove fields.
11802
11803 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11804
11805         PR gdb/19637
11806         * python/lib/gdb/printer/bound_registers.py: Add support for
11807         Python 3.
11808
11809 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11810
11811         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11812         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11813         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11814         byte_offset to subobj_byte_offset.  Fix the handling of
11815         DWARF_VALUE_STACK on big-endian targets when coming via an
11816         implicit pointer.
11817         (dwarf2_evaluate_loc_desc): Adjust call to
11818         dwarf2_evaluate_loc_desc_full.
11819         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11820         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11821
11822 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11823
11824         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11825         and REVSH instructions.
11826
11827 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11828
11829         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11830         (arm_record_test): Declare.
11831         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11832         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11833         align with the manual.
11834         (thumb_record_misc): Adjust the code order to align with the
11835         manual.
11836         (thumb2_record_decode_insn_handler): Fix instruction matching.
11837         (instruction_reader_thumb): New class.
11838         (arm_record_test): New function.
11839
11840 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11841
11842         * arm-tdep.c (abstract_memory_reader): New class.
11843         (instruction_reader): New class.
11844         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11845         (decode_insn): Likewise.
11846
11847 2017-03-16  Doug Evans  <dje@google.com>
11848
11849         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11850         member.  Change type of TYPE member to SCM.  All uses updated.
11851         (lsscm_make_lazy_string_smob): Add assert.
11852         (lsscm_make_lazy_string): Flag bad length values.
11853         (lsscm_elt_type): New function.
11854         (gdbscm_lazy_string_to_value): Rewrite to use
11855         lsscm_safe_lazy_string_to_value.
11856         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11857         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11858         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11859         in incoming type.
11860         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11861         * guile/scm-type.c (tyscm_scm_to_type): New function.
11862
11863 2017-03-15  Doug Evans  <dje@google.com>
11864
11865         PR python/17728, python/18439, python/18779
11866         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11867         member.  Change type of TYPE member to PyObject *.  All uses updated.
11868         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11869         (gdbpy_create_lazy_string_object): Flag bad length values.
11870         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11871         Handle typedefs in incoming type.
11872         (stpy_lazy_string_elt_type): New function.
11873         (gdbpy_extract_lazy_string): Call it.
11874         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11875         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11876         typedefs in incoming type.
11877
11878 2017-03-16  Doug Evans  <dje@google.com>
11879
11880         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11881         * guile/scm-type.c (tyscm_scm_to_type): New function.
11882
11883 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11884
11885         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11886         "ULONGEST" for "skip".
11887
11888 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11889
11890         PR gdb/21220
11891         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11892         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11893         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11894         over ptrace peek/poke until end of buffer or error.
11895
11896 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11897
11898         * parse.c (length_of_subexp): Make static.
11899         * parser-defs.h (length_of_subexp): Remove.
11900
11901 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11902
11903         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11904         as well.
11905
11906 2017-03-14  Pedro Alves  <palves@redhat.com>
11907
11908         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11909         (main): Use std::unique_ptr.  Remove calls to
11910         cp_demangled_name_parse_free.
11911
11912 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11913
11914         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11915         alphabsd_store_inferior_registers): Use regcache->ptid instead
11916         of inferior_ptid.
11917
11918 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11919
11920         * aix-thread.c (aix_thread_fetch_registers,
11921         aix_thread_store_registers): Use regcache->ptid instead of
11922         inferior_ptid.
11923
11924 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11925
11926         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11927         store_gregs_to_thread, fetch_fpregs_from_thread,
11928         store_fpregs_to_thread): Use regcache->ptid instead of
11929         inferior_ptid.
11930
11931 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11932
11933         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11934         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11935         instead of inferior_ptid.
11936
11937 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11938
11939         * target.c (target_fetch_registers, target_store_registers): Add
11940         assert.
11941
11942 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11943
11944         * regcache.h (regcache_get_ptid): New function.
11945         * regcache.c (regcache_get_ptid): New function.
11946
11947 2017-03-13  Mark Wielaard  <mark@klomp.org>
11948
11949         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11950
11951 2017-03-10  Keith Seitz  <keiths@redhat.com>
11952
11953         PR c++/8218
11954         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11955
11956 2017-03-08  Pedro Alves  <palves@redhat.com>
11957
11958         PR gdb/18360
11959         * infrun.c (start_step_over, do_target_resume, resume)
11960         (restart_threads): Assert we're not resuming a thread that is
11961         meant to be stopped.
11962         (infrun_thread_stop_requested_callback): Delete.
11963         (infrun_thread_stop_requested): If the thread is internally
11964         stopped, queue a pending stop event and clear the thread's
11965         inline-frame state.
11966         (handle_stop_requested): New function.
11967         (handle_syscall_event, handle_inferior_event_1): Use
11968         handle_stop_requested.
11969         (handle_stop_requested): New function.
11970         (handle_signal_stop): Set the thread's stop_signal here instead of
11971         at caller.
11972         (finish_step_over): Clear step over info unconditionally.
11973         (handle_signal_stop): If the user had interrupted the event
11974         thread, consider the stop a random signal.
11975         (handle_signal_stop) <signal arrived while stepping over
11976         breakpoint>: Don't restart threads here.
11977         (stop_waiting): Don't clear step-over info here.
11978
11979 2017-03-08  Pedro Alves  <palves@redhat.com>
11980
11981         PR 21206
11982         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11983         goes to argument 2, not 1.
11984
11985 2017-03-08  Pedro Alves  <palves@redhat.com>
11986
11987         PR cli/21218
11988         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11989         display_gdb_prompt.
11990         (command_line_input): Add comment.
11991
11992 2017-03-08  Pedro Alves  <palves@redhat.com>
11993
11994         PR tui/21216
11995         * tui/tui-file.c (tui_file::write): New.
11996         * tui/tui-file.h (tui_file): Override "write".
11997         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11998         factored out from ...
11999         (tui_puts): ... here.
12000         (tui_putc): Use them.
12001         (tui_write): New function.
12002         * tui/tui-io.h (tui_write): Declare.
12003
12004 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12005
12006         * Makefile.in (SFILES): Replace "environ.c" with
12007         "common/environ.c".
12008         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12009         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12010         to...
12011         * common/environ.c: ... here.
12012         * environ.h: Moved to...
12013         * common/environ.h: ... here.
12014
12015 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12016
12017         * gdbarch.sh (pstring_ptr): New static function.
12018         (gdbarch_disassembler_options): Use it.
12019         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12020         not valid_disassembler_option->name.
12021         * gdbarch.c: Regenerate.
12022
12023 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12024
12025         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12026
12027 2017-03-07  Pedro Alves  <palves@redhat.com>
12028
12029         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12030
12031 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12032
12033         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12034         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12035         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12036         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12037
12038 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12039
12040         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12041
12042 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12043
12044         * remote.c (remote_add_target_side_commands): Use range-based
12045         for loop.
12046
12047 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12048
12049         PR gdb/21165
12050         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12051         value is lazy.
12052         * valprint.c (common_val_print): Likewise.
12053
12054 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12055
12056         * NEWS: Mention new set/show disassembler-options commands.
12057         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12058         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12059         (prospective_options): New static variable.
12060         (gdb_disassembler::gdb_disassembler): Initialize
12061         m_di.disassembler_options.
12062         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12063         (get_disassembler_options): New function.
12064         (set_disassembler_options): Likewise.
12065         (set_disassembler_options_sfunc): Likewise.
12066         (show_disassembler_options_sfunc): Likewise.
12067         (disassembler_options_completer): Likewise.
12068         (_initialize_disasm): Likewise.
12069         * disasm.h (get_disassembler_options): New prototype.
12070         (set_disassembler_options): Likewise.
12071         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12072         (gdbarch_verify_disassembler_options): Likewise.
12073         * gdbarch.c: Regenerate.
12074         * gdbarch.h: Likewise.
12075         * arm-tdep.c (num_disassembly_options): Delete.
12076         (set_disassembly_style): Likewise.
12077         (arm_disassembler_options): New static variable.
12078         (set_disassembly_style_sfunc): Convert short style name into long
12079         option name.  Call set_disassembler_options.
12080         (show_disassembly_style_sfunc): New function.
12081         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12082         set_gdbarch_verify_disassembler_options.
12083         (_initialize_arm_tdep): Delete regnames variable and update callers.
12084         (arm_disassembler_options): Initialize.
12085         (disasm_options): New variable.
12086         (num_disassembly_options): Rename from this...
12087         (num_disassembly_styles): ...to this.  Compute by scanning through
12088         disasm_options.
12089         (valid_disassembly_styles): Initialize using disasm_options.
12090         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12091         set_arm_regname_option.
12092         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12093         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12094         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12095         set_gdbarch_verify_disassembler_options.
12096         * s390-tdep.c (s390_disassembler_options): New static variable.
12097         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12098         set_gdbarch_verify_disassembler_options.
12099
12100 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12101
12102         * remote.c (remote_add_target_side_condition): Remove "struct"
12103         keyword from range-based for loop.
12104
12105 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12106
12107         * remote.c (remote_add_target_side_condition): Use range-based
12108         for loop.  Update comment.
12109
12110 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12111
12112         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12113
12114 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12115
12116         * regcache.c (regcache_raw_update): New function.
12117         (regcache_raw_read): Move code to regcache_raw_update.
12118         * regcache.h (regcache_raw_update): New declaration.
12119         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12120
12121 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12122
12123         * dwarf2read.c (create_debug_type_hash_table): Initialize
12124         header.signature and header.type_offset_in_tu.
12125
12126 2017-02-24  Pedro Alves  <palves@redhat.com>
12127
12128         * symtab.c (make_file_symbol_completion_list_1): Use
12129         add_symtab_completions.
12130
12131 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12132
12133         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12134
12135 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12136
12137         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12138         I386_MAX_REGISTER_SIZE.
12139         (i386_pseudo_register_write): Likewise.
12140         (i386_process_record): Likewise.
12141         * i387-tdep.c (i387_supply_xsave): Likewise.
12142         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12143         (store_register): Likewise.
12144
12145 2017-02-23  Pedro Alves  <palves@redhat.com>
12146
12147         * ada-lang.c: Include "common/function-view.h".
12148         (ada_iterate_over_symbols): Adjust to use function_view as
12149         callback type.
12150         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12151         (ada_make_symbol_completion_list): Use a lambda.
12152         (ada_exc_search_name_matches): Delete.
12153         (name_matches_regex): New.
12154         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12155         * compile/compile-c-support.c: Include "common/function-view.h".
12156         (print_one_macro): Change prototype to accept a ui_file pointer.
12157         (write_macro_definitions): Use a lambda.
12158         * dwarf2read.c: Include "common/function-view.h".
12159         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12160         (dw2_expand_symtabs_matching): Adjust to use function_view as
12161         callback type.
12162         * language.h: Include "common/function-view.h".
12163         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12164         function_view as callback type.
12165         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12166         * linespec.c: Include "common/function-view.h".
12167         (collect_info::add_symbol): New method.
12168         (struct symbol_and_data_callback, iterate_inline_only, struct
12169         symbol_matcher_data, iterate_name_matcher): Delete.
12170         (iterate_over_all_matching_symtabs): Adjust to use function_view
12171         as callback type and lambdas.
12172         (iterate_over_file_blocks): Adjust to use function_view as
12173         callback type.
12174         (decode_compound_collector): Now a class with private fields.
12175         (decode_compound_collector::release_symbols): New method.
12176         (collect_one_symbol): Rename to...
12177         (decode_compound_collector::operator()): ... this and adjust.
12178         (lookup_prefix_sym): decode_compound_collector construction bits
12179         move to decode_compound_collector ctor.  Pass the
12180         decode_compound_collector object directly as callback.  Remove
12181         cleanups and use decode_compound_collector::release_symbols
12182         instead.
12183         (symtab_collector): Now a class with private fields.
12184         (symtab_collector::release_symtabs): New method.
12185         (add_symtabs_to_list): Rename to...
12186         (symtab_collector::operator()): ... this and adjust.
12187         (collect_symtabs_from_filename): symtab_collector construction
12188         bits move to symtab_collector ctor.  Pass the symtab_collector
12189         object directly as callback.  Remove cleanups and use
12190         symtab_collector::release_symtabs instead.
12191         (collect_symbols): Delete.
12192         (add_matching_symbols_to_info): Use lambdas.
12193         * macrocmd.c (print_macro_callback): Delete.
12194         (info_macro_command): Use a lambda.
12195         (info_macros_command): Pass print_macro_definition as callable
12196         directly.
12197         (print_one_macro): Remove 'ignore' parameter.
12198         (macro_list_command): Adjust.
12199         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12200         (macro_for_each_data::user_data): Delete field.
12201         (foreach_macro): Adjust to call the function_view.
12202         (macro_for_each): Adjust to use function_view as callback type.
12203         (foreach_macro_in_scope): Adjust to call the function_view.
12204         (macro_for_each_in_scope): Adjust to use function_view as callback
12205         type.
12206         * macrotab.h: Include "common/function-view.h".
12207         (macro_callback_fn): Declare a prototype instead of a pointer.
12208         Remove "user_data" parameter.
12209         (macro_for_each, macro_for_each_in_scope): Adjust to use
12210         function_view as callback type.
12211         * psymtab.c (partial_map_expand_apply)
12212         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12213         Adjust to use function_view as callback type and to return bool.
12214         (psym_expand_symtabs_matching): Adjust to use function_view as
12215         callback types.
12216         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12217         to use function_view as callback type and to return bool.
12218         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12219         callback types.
12220         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12221         as callback types.
12222         * symfile.h: Include "common/function-view.h".
12223         (expand_symtabs_file_matcher_ftype)
12224         (expand_symtabs_symbol_matcher_ftype)
12225         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12226         return bool.
12227         (quick_symbol_functions::map_symtabs_matching_filename)
12228         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12229         function_view as callback type and return bool.
12230         (expand_symtabs_matching): Adjust to use function_view as callback
12231         type.
12232         (maintenance_expand_name_matcher)
12233         (maintenance_expand_file_matcher): Delete.
12234         (maintenance_expand_symtabs): Use lambdas.
12235         * symtab.c (iterate_over_some_symtabs): Adjust to use
12236         function_view as callback types and return bool.
12237         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12238         of a cleanup.
12239         (lookup_symtab_callback): Delete.
12240         (lookup_symtab): Use a lambda.
12241         (iterate_over_symbols): Adjust to use function_view as callback
12242         type.
12243         (struct search_symbols_data, search_symbols_file_matches)
12244         (search_symbols_name_matches): Delete.
12245         (search_symbols): Use a pair of lambdas.
12246         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12247         (symtab_expansion_callback): Delete.
12248         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12249         * symtab.h: Include "common/function-view.h".
12250         (iterate_over_some_symtabs): Adjust to use function_view as
12251         callback type and return bool.
12252         (iterate_over_symtabs): Adjust to use function_view as callback
12253         type.
12254         (symbol_found_callback_ftype): Remove 'data' parameter and return
12255         bool.
12256         (iterate_over_symbols): Adjust to use function_view as callback
12257         type.
12258
12259 2017-02-23  Pedro Alves  <palves@redhat.com>
12260
12261         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12262         (%.o) <unittests/%.c>: New pattern.
12263         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12264         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12265         * common/function-view.h: New file.
12266         * unittests/function-view-selftests.c: New file.
12267         * configure: Regenerate.
12268
12269 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12270
12271         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12272         inferior_ptid.
12273         * go32-nat.c (go32_thread_alive): Likewise.
12274
12275 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12276
12277         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12278         delete.
12279
12280 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12281
12282         * varobj.c (varobj_clear_saved_item): Use delete instead of
12283         xfree.
12284         (update_dynamic_varobj_children): Likewise.
12285
12286 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12287
12288         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12289
12290 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12291
12292         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12293         m_enum_value to 0 in default constructor.
12294
12295 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12296
12297         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12298         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12299         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12300         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12301         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12302         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12303         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12304         IS_STORE_CONDITIONAL_INSN.
12305
12306 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12307
12308         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12309
12310 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12311
12312         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12313
12314 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12315
12316         * dwarf2read.c (skip_one_die, read_attribute_value)
12317         (dwarf2_const_value_attr, dump_die_shallow)
12318         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12319         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12320
12321 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12322
12323         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12324         (dwarf_parse_macro_header): Accept DWARF version 5.
12325         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12326
12327 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12328
12329         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12330         DW_AT_GNU_*.
12331         * common/common-exceptions.h (enum errors): Likewise.
12332         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12333         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12334         (dwarf_expr_context::execute_stack_op): Likewise.
12335         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12336         Likewise.
12337         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12338         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12339         (show_entry_values_debug, call_site_to_target_addr)
12340         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12341         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12342         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12343         (value_of_dwarf_block_entry, indirect_pieced_value)
12344         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12345         (disassemble_dwarf_expression): Likewise.
12346         * dwarf2read.c (process_die, inherit_abstract_dies)
12347         (read_call_site_scope): Likewise.
12348         * gdbtypes.h (struct func_type, struct call_site_parameter)
12349         (struct call_site): Likewise.
12350         * stack.c (read_frame_arg): Likewise.
12351         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12352
12353 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12354
12355         * defs.h (read_unsigned_leb128): New declaration.
12356         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12357         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12358         (dwarf2_find_location_expression): Call also
12359         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12360         * dwarf2loc.h (dwarf2_version): New declaration.
12361         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12362         rnglists.
12363         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12364         .debug_rnglists.
12365         (struct dwop_section_names): Add loclists_dwo.
12366         (dwop_section_names): Add .debug_loclists.dwo.
12367         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12368         (struct dwarf2_per_cu_data): Add dwarf_version.
12369         (struct dwo_sections): Add loclists.
12370         (struct attr_abbrev): Add implicit_const.
12371         (read_indirect_line_string): New declaration.
12372         (read_unsigned_leb128): Delete declaration.
12373         (rcuh_kind): New definition.
12374         (read_and_check_comp_unit_head): Change parameter
12375         is_debug_types_section to section_kind.
12376         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12377         (read_comp_unit_head): Change parameter abfd to section, add parameter
12378         section_kind.  Handle DWARF-5.
12379         (error_check_comp_unit_head): Accept also DWARF version 5.
12380         (read_and_check_comp_unit_head): Change parameter
12381         is_debug_types_section to section_kind.
12382         (read_and_check_type_unit_head): Delete function.
12383         (read_abbrev_offset): Handle DWARF-5.
12384         (create_debug_type_hash_table): Add parameter section_kind.  Process
12385         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12386         comp_unit_head.
12387         (create_debug_types_hash_table): Update create_debug_type_hash_table
12388         caller.
12389         (create_all_type_units): Call create_debug_type_hash_table.
12390         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12391         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12392         caller.
12393         (skip_one_die): Handle DW_FORM_implicit_const.
12394         (dwarf2_rnglists_process): New function.
12395         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12396         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12397         (read_attribute_value): Handle DW_FORM_implicit_const,
12398         DW_FORM_line_strp.
12399         (read_attribute): Handle DW_FORM_implicit_const.
12400         (read_indirect_string_at_offset_from): New function from
12401         read_indirect_string_at_offset.
12402         (read_indirect_string_at_offset): Call
12403         read_indirect_string_at_offset_from.
12404         (read_indirect_line_string_at_offset): New function.
12405         (read_indirect_string): New function comment.
12406         (read_indirect_line_string): New function.
12407         (read_unsigned_leb128): Make it global.
12408         (dwarf2_string_attr): Handle DWARF-5.
12409         (add_include_dir_stub, read_formatted_entries): New functions.
12410         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12411         Handle DWARF-5.
12412         (per_cu_header_read_in): Update read_comp_unit_head caller.
12413         (dwarf2_version): New function.
12414         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12415         rnglists.
12416         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12417         fields.
12418
12419 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12420
12421         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12422
12423 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12424
12425         * dwarf2read.c (dwarf2_ranges_process): New function from
12426         dwarf2_ranges_read.
12427         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12428         dwarf2_ranges_process.
12429
12430 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12431
12432         * dwarf2read.c (create_debug_type_hash_table): New function from
12433         create_debug_types_hash_table.
12434         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12435         (create_all_type_units, open_and_init_dwo_file): Update
12436         create_debug_types_hash_table callers.
12437
12438 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12439
12440         PR gdb/16188
12441         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12442         refer to 'ap', not 'args'.
12443
12444 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12445             Pedro Alves  <palves@redhat.com>
12446
12447         PR gdb/16188
12448         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12449         calls succeeded.
12450         * fork-child.c (trace_start_error): New function.
12451         (trace_start_error_with_name): Likewise.
12452         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12453         * inf-ptrace.c (inf_ptrace_me): Likewise.
12454         * inferior.h (trace_start_error): New prototype.
12455         (trace_start_error_with_name): Likewise.
12456
12457 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12458
12459         PR gdb/21164
12460         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12461         NULL before using it.
12462         * symmisc.c (maintenance_print_symbols): Likewise.
12463         (maintenance_print_msymbols): Likewise.
12464
12465 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12466
12467         * NEWS: Add record Python bindings entry.
12468
12469 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12470
12471         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12472         py-record-full.o.
12473         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12474         * python/py-record-btrace.c, python/py-record-btrace.h,
12475         python/py-record-full.c, python/py-record-full.h: New file.
12476         * python/py-record.c: Add include for py-record-btrace.h and
12477         py-record-full.h.
12478         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12479         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12480         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12481         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12482         New definition.
12483         (gdbpy_initialize_btrace): New export.
12484         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12485
12486 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12487
12488         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12489         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12490         * python/py-record.c: New file.
12491         * python/python-internal.h (gdbpy_start_recording,
12492         gdbpy_current_recording, gdpy_stop_recording,
12493         gdbpy_initialize_record): New export.
12494         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12495         (python_GdbMethods): Add gdbpy_start_recording,
12496         gdbpy_current_recording and gdbpy_stop_recording.
12497
12498 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12499
12500         * record-btrace.c (record_btrace_record_method): New function.
12501         (init_record_btrace_ops): Initialize to_record_method.
12502         * record-full.c (record_full_record_method): New function.
12503         (init_record_full_ops, init_record_full_core_ops): Add
12504         record_full_record_method.
12505         * record.h (enum record_method): New enum.
12506         * target-debug.h (target_debug_print_enum_record_method: New define.
12507         * target-delegates.c: Regenerate.
12508         * target.c (target_record_method): New function.
12509         * target.h: Include record.h.
12510         (struct target_ops) <to_record_method>: New field.
12511         (target_record_method): New export.
12512
12513 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12514
12515         * record.h (record_start, record_stop): New export.
12516         * record.c (record_start, record_stop): New function.
12517
12518 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12519
12520         * btrace.c (btrace_fetch): Copy function call segments pointer
12521         into a vector.
12522         (btrace_clear): Clear the vector.
12523         (btrace_find_insn_by_number): Use binary search to find the correct
12524         function call segment.
12525         * btrace.h (brace_fun_p): New typedef.
12526         (struct btrace_thread_info) <functions>: New field.
12527
12528 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12529
12530         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12531         * btrace.c (btrace_decode_error): ... here.  New function.
12532         * btrace.h (btrace_decode_error): New export.
12533
12534 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12535
12536         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12537         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12538         btrace_find_insn_by_number): Remove special case for gaps.
12539         * btrace.h (btrace_insn_get_error): New export.
12540         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12541         * record-btrace.c (btrace_insn_history): Print number for gaps.
12542         (record_btrace_info, record_btrace_goto): Handle gaps.
12543
12544 2017-02-14  Tom Tromey  <tom@tromey.com>
12545
12546         PR python/13598:
12547         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12548         event.
12549         * python/py-evts.c (gdbpy_initialize_py_events): Add
12550         before_prompt registry.
12551         * python/py-events.h (events_object) <before_prompt>: New field.
12552
12553 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12554
12555         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12556
12557 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12558
12559         * symfile (_initialize_symfile): Add usage text to the load command's
12560         help text.
12561
12562 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12563
12564         * utils.c (defaulted_query): Don't query on secondary UIs.
12565
12566 2017-02-10  Tom Tromey  <tom@tromey.com>
12567
12568         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12569
12570 2017-02-10  Tom Tromey  <tom@tromey.com>
12571
12572         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12573         "cleanup" local.
12574         * python/py-type.c (typy_legacy_template_argument): Remove
12575         unnecessary "cleanup" local.
12576
12577 2017-02-10  Tom Tromey  <tom@tromey.com>
12578
12579         * python/python.c (do_start_initialization): New function, from
12580         _initialize_python.
12581         (_initialize_python): Call do_start_initialization.
12582         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12583         goto.
12584
12585 2017-02-10  Tom Tromey  <tom@tromey.com>
12586
12587         * python/py-prettyprint.c (pretty_print_one_value): Use
12588         gdbpy_ref.
12589
12590 2017-02-10  Tom Tromey  <tom@tromey.com>
12591
12592         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12593         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12594         gdbpy_ref.
12595         * python/py-type.c (field_new): Use gdbpy_ref.
12596         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12597         gdbpy_ref.
12598         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12599         (py_free_pspace): Likewise.
12600         (pspace_to_pspace_object): Likewise.
12601         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12602         (py_free_objfile): Likewise.
12603         (objfile_to_objfile_object): Likewise.
12604         * python/py-inferior.c (delete_thread_object): Use
12605         gdbpy_ref.
12606         (infpy_read_memory): Likewise.
12607         (py_free_inferior): Likewise.
12608         * python/py-evtregistry.c (create_eventregistry_object): Use
12609         gdbpy_ref.
12610         * python/py-event.c (create_event_object): Use gdbpy_ref.
12611
12612 2017-02-10  Tom Tromey  <tom@tromey.com>
12613
12614         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12615         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12616         used.
12617         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12618         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12619         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12620         python/py-framefilter.c, python/py-function.c,
12621         python/py-inferior.c, python/py-infevents.c,
12622         python/py-linetable.c, python/py-newobjfileevent.c,
12623         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12624         python/py-signalevent.c, python/py-stopevent.c,
12625         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12626         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12627         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12628         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12629
12630 2017-02-10  Tom Tromey  <tom@tromey.com>
12631
12632         * ui-out.h (ui_out_emit_type): New class.
12633         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12634         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12635         and ui_out_emit_tuple.
12636         (enumerate_locals): Likewise.
12637         (py_mi_print_variables, py_print_locals, py_print_args): Use
12638         ui_out_emit_list.
12639         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12640         ui_out_emit_list.
12641         * common/gdb_optional.h: New file.
12642
12643 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12644
12645         * MAINTAINERS (Write After Approval): Update my e-mail address.
12646
12647 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12648
12649         PR gdb/21122
12650         * breakpoint.c (_initialize_breakpoint): Update the help description
12651         of the 'commands' command to indicate that it takes a list argument.
12652
12653 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12654
12655         * interps.c (current_interp_set_logging): Remove "return".
12656
12657 2017-02-09  Gary Benson  <gbenson@redhat.com>
12658
12659         * symtab.c (add_symtab_completions): Prevent NULL pointer
12660         dereference.
12661
12662 2017-02-08  Pedro Alves  <palves@redhat.com>
12663
12664         * interps.c (interp::interp): Remove reference to quiet_p.
12665         (interp_set): Make static.  Remove dead "Switching to" output
12666         code.
12667         (interp_quiet_p, interp_set_quiet): Delete.
12668         (interpreter_exec_cmd): Don't set the interpreter quiet.
12669         * interps.h (interp_quiet_p): Make static.
12670         (class interp) <quiet_p>: Remove field
12671
12672 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12673
12674         * cli/cli-decode.c (find_command_name_length): Make it extern.
12675         * cli/cli-decode.h (find_command_name_length): Declare.
12676         * cli/cli-script.c (command_name_equals, line_first_arg):
12677         New functions.
12678         (process_next_line): Use cli-decode to parse command names.
12679         (build_command_line): Make args a constant pointer.
12680
12681 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12682
12683         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12684         Remove case-insensitive search.
12685
12686 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12687
12688         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12689         at the end of the line.  Avoids an ARI warning.
12690
12691 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12692
12693         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12694         rdseed instructions.
12695         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12696
12697 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12698
12699         PR tdep/20936
12700         Provide and use sparc32 and sparc64 target description XML files.
12701         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12702         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12703         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12704         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12705         * features/sparc/sparc32-solaris.xml: New file.
12706         * features/sparc/sparc64-solaris.xml: New file.
12707         * features/sparc/sparc32-solaris.c: Generated.
12708         * features/sparc/sparc64-solaris.c: Generated.
12709         * sparc-tdep.h: Account for differences in target descriptions.
12710         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12711         (sparc32_register_type): Use target provided registers.
12712         (validate_tdesc_registers): New function.
12713         (sparc32_gdbarch_init): Use tdesc_has_registers.
12714         Set pseudoregister functions.
12715         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12716         (sparc64_register_type): Use target provided registers.
12717         (sparc64_init_abi): Set pseudoregister functions.
12718
12719 2017-02-03  Tom Tromey  <tom@tromey.com>
12720
12721         PR rust/21097:
12722         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12723         with a single member.
12724
12725 2017-02-03  Pedro Alves  <palves@redhat.com>
12726
12727         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12728         (cli_interp_base::~cli_interp_base): New.
12729         (cli_interp): New struct.
12730         (as_cli_interp): Cast the interp itself to cli_interp.
12731         (cli_interpreter_pre_command_loop): Rename to ...
12732         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12733         parameter.
12734         (cli_interpreter_init): Rename to ...
12735         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12736         boolean.  Make extern.
12737         (cli_interpreter_resume): Rename to ...
12738         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12739         extern.
12740         (cli_interpreter_suspend): Rename to ...
12741         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12742         extern.
12743         (cli_interpreter_exec): Rename to ...
12744         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12745         extern.
12746         (cli_interpreter_supports_command_editing): Rename to ...
12747         (cli_interp_base::supports_command_editing): ... this.  Remove
12748         'interp' parameter.  Make extern.
12749         (cli_ui_out): Rename to ...
12750         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12751         Make extern.
12752         (cli_set_logging): Rename to ...
12753         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12754         parameter.  Make extern.
12755         (cli_interp_procs): Delete.
12756         (cli_interp_factory): Adjust to use "new".
12757         * cli/cli-interp.h: Include "interps.h".
12758         (struct cli_interp_base): New struct.
12759         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12760         (interp_new): Delete.
12761         (interp::interp, interp::~interp): New.
12762         (interp_set): Use bool, and return void.  Assume the interpreter
12763         has suspend, init and resume methods, and that the all return
12764         void.
12765         (set_top_level_interpreter): interp_set returns void.
12766         (interp_ui_out): Adapt.
12767         (current_interp_set_logging): Adapt.
12768         (interp_data): Delete.
12769         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12770         (interp_exec): Adapt.
12771         (top_level_interpreter_data): Delete.
12772         * interps.h (interp_init_ftype, interp_resume_ftype)
12773         (interp_suspend_ftype, interp_exec_ftype)
12774         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12775         (class interp): New.
12776         (interp_new): Delete.
12777         (interp_set): Now returns void.  Use bool.
12778         (interp_data, top_level_interpreter_data): Delete.
12779         * mi/mi-common.h: Include interps.h.
12780         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12781         init, resume, suspect, exec, interp_ui_out, set_logging and
12782         pre_command_loop methods.
12783         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12784         (mi_interpreter_init): Rename to ...
12785         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12786         bool, return void and make extern.  Adjust.
12787         (mi_interpreter_resume): ... Rename to ...
12788         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12789         return void and make extern.  Adjust.
12790         (mi_interpreter_suspend): ... Rename to ...
12791         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12792         return void and make extern.  Adjust.
12793         (mi_interpreter_exec): ... Rename to ...
12794         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12795         extern.  Adjust.
12796         (mi_interpreter_pre_command_loop): ... Rename to ...
12797         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12798         parameter and make extern.
12799         (mi_on_normal_stop_1): Adjust.
12800         (mi_ui_out): Rename to ...
12801         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12802         parameter and make extern.  Adjust.
12803         (mi_set_logging): Rename to ...
12804         (mi_interp::set_logging): ... this.  Remove the 'interp'
12805         parameter and make extern.  Adjust.
12806         (mi_interp_procs): Delete.
12807         (mi_interp_factory): Adjust to use 'new'.
12808         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12809         (mi_print_exception, mi_execute_command, mi_load_progress):
12810         Adjust.
12811         * tui/tui-interp.c (tui_interp): New class.
12812         (as_tui_interp): Return a tui_interp pointer.
12813         (tui_on_normal_stop, tui_on_signal_received)
12814         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12815         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12816         to use interp::interp_ui_out.
12817         (tui_init): Rename to ...
12818         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12819         bool, return void and make extern.  Adjust.
12820         (tui_resume): Rename to ...
12821         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12822         return void and make extern.  Adjust.
12823         (tui_suspend): Rename to ...
12824         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12825         return void and make extern.  Adjust.
12826         (tui_ui_out): Rename to ...
12827         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12828         parameter, and make extern.  Adjust.
12829         (tui_exec): Rename to ...
12830         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12831         make extern.
12832         (tui_interp_procs): Delete.
12833         (tui_interp_factory): Use "new".
12834
12835 2017-02-02  Tom Tromey  <tom@tromey.com>
12836
12837         * rust-exp.y (ends_raw_string, space_then_number)
12838         (rust_identifier_start_p): Return bool.
12839         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12840         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12841         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12842         (rust_chartype_p): Return bool.
12843         (val_print_struct, rust_print_struct_def, rust_print_type):
12844         Update.
12845         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12846         Return bool.
12847
12848 2017-02-02  Tom Tromey  <tom@tromey.com>
12849
12850         * rust-lang.c: Reindent.
12851
12852 2017-02-02  Tom Tromey  <tom@tromey.com>
12853
12854         * rust-lang.h (rust_crate_for_block): Update.
12855         * rust-lang.c (rust_crate_for_block): Return std::string.
12856         (rust_get_disr_info): Use std:;string, not
12857         gdb::unique_xmalloc_ptr.
12858         * rust-exp.y (crate_name): Update.
12859
12860 2017-02-02  Pedro Alves  <palves@redhat.com>
12861
12862         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12863         field out of gdb_disassembler_test and make it static.
12864
12865 2017-02-02  Pedro Alves  <palves@redhat.com>
12866
12867         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12868         mi1_interp and mi_interp fields.
12869
12870 2017-02-02  Pedro Alves  <palves@redhat.com>
12871
12872         * cli/cli-interp.c (struct saved_output_files, saved_output):
12873         Moved from cli/cli-logging.c.
12874         (cli_set_logging): New function.
12875         (cli_interp_procs): Install cli_set_logging.
12876         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12877         Declare.
12878         * cli/cli-logging.c (struct saved_output_files, saved_output):
12879         Moved to cli/cli-interp.c.
12880         (pop_output_files): Don't save outputs here.
12881         (make_logging_output): New function.
12882         (handle_redirections): Don't build tee nor save previous outputs
12883         here.
12884         * interps.c (current_interp_set_logging): Change prototype.
12885         Assume there's always a set_logging_proc method installed.
12886         * interps.h (interp_set_logging_ftype): Change prototype.
12887         (current_interp_set_logging): Change prototype and adjust comment.
12888         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12889         use make_logging_output.
12890         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12891 2017-02-02  Pedro Alves  <palves@redhat.com>
12892
12893         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12894         from ...
12895         (set_logging_overwrite): ... here.
12896         (logging_no_redirect_file): Delete.
12897         (set_logging_redirect): Don't handle redirection on the fly.
12898         Instead warn that "logging off" / "logging on" is necessary.
12899         (pop_output_files): Delete references to logging_no_redirect_file.
12900         (show_logging_command): Always speak in terms of what will happen
12901         once logging is reenabled.
12902
12903 2017-02-02  Pedro Alves  <palves@redhat.com>
12904
12905         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12906
12907 2017-02-02  Pedro Alves  <palves@redhat.com>
12908
12909         * disasm.c (gdb_pretty_print_insn): Rename to ...
12910         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12911         Remove gdbarch parameter.  Adapt to clear the object's buffers
12912         instead of allocating new buffers, and to print using the object's
12913         gdb_disassembler instead of calling gdb_print_insn.
12914         (dump_insns): Use gdb_pretty_print_disassembler.
12915         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12916         (gdb_pretty_print_disassembler): New class.
12917         * record-btrace.c (btrace_insn_history): Use
12918         gdb_pretty_print_disassembler.
12919
12920 2017-02-02  Pedro Alves  <palves@redhat.com>
12921
12922         * ada-lang.c (type_as_string): Use string_file.
12923         * ada-valprint.c (ada_print_floating): Use string_file.
12924         * ada-varobj.c (ada_varobj_scalar_image)
12925         (ada_varobj_get_value_image): Use string_file.
12926         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12927         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12928         * breakpoint.c (update_inserted_breakpoint_locations)
12929         (insert_breakpoint_locations, reattach_breakpoints)
12930         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12931         (print_it_watchpoint): Use string_file.
12932         (save_breakpoints): Use stdio_file.
12933         * c-exp.y (oper): Use string_file.
12934         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12935         tee_file.
12936         (pop_output_files): Use delete.
12937         (handle_redirections): Use stdio_file and tee_file.
12938         * cli/cli-setshow.c (do_show_command): Use string_file.
12939         * compile/compile-c-support.c (c_compute_program): Use
12940         string_file.
12941         * compile/compile-c-symbols.c (generate_vla_size): Take a
12942         'string_file &' instead of a 'ui_file *'.
12943         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12944         of a 'ui_file *'.  Use string_file.
12945         (generate_c_for_variable_locations): Take a 'string_file &'
12946         instead of a 'ui_file *'.
12947         * compile/compile-internal.h (generate_c_for_for_one_variable):
12948         Take a 'string_file &' instead of a 'ui_file *'.
12949         * compile/compile-loc2c.c (push, pushf, unary, binary)
12950         (print_label, pushf_register_address, pushf_register)
12951         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12952         'ui_file *'.  Adjust.
12953         * compile/compile.c (compile_to_object): Use string_file.
12954         * compile/compile.h (compile_dwarf_expr_to_c)
12955         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12956         'ui_file *'.
12957         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12958         (replace_typedefs_qualified_name): Use string_file and
12959         obstack_copy0.
12960         * disasm.c (gdb_pretty_print_insn): Use string_file.
12961         (gdb_disassembly): Adjust reference the null_stream global.
12962         (do_ui_file_delete): Delete.
12963         (gdb_insn_length): Use null_stream.
12964         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12965         * dwarf2loc.c (dwarf2_compile_property_to_c)
12966         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12967         'string_file &' instead of a 'ui_file *'.
12968         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12969         * dwarf2read.c (do_ui_file_peek_last): Delete.
12970         (dwarf2_compute_name): Use string_file.
12971         * event-top.c (gdb_setup_readline): Use stdio_file.
12972         * gdbarch.sh (verify_gdbarch): Use string_file.
12973         * gdbtypes.c (safe_parse_type): Use null_stream.
12974         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12975         string_file.
12976         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12977         'string_file *' instead of a 'ui_file *'.
12978         (gdbscm_arch_disassemble): Use string_file.
12979         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12980         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12981         inherits from ui_file.
12982         (ioscm_file_port_delete, ioscm_file_port_rewind)
12983         (ioscm_file_port_put): Delete.
12984         (ioscm_file_port_write): Rename to ...
12985         (ioscm_file_port::write): ... this.  Remove file_port_magic
12986         checks.
12987         (ioscm_file_port_new): Delete.
12988         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12989         ui_file_up.
12990         * guile/scm-type.c (tyscm_type_name): Use string_file.
12991         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12992         Use string_file.
12993         * infcmd.c (print_return_value_1): Use string_file.
12994         * infrun.c (print_target_wait_results): Use string_file.
12995         * language.c (add_language): Use string_file.
12996         * location.c (explicit_to_string_internal): Use string_file.
12997         * main.c (captured_main_1): Use null_file.
12998         * maint.c (maintenance_print_architecture): Use stdio_file.
12999         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13000         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13001         event_channel>: Change type to mi_console_file pointer.
13002         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13003         (mi_console_file_delete): Delete.
13004         (struct mi_console_file): Delete.
13005         (mi_console_file_magic): Delete.
13006         (mi_console_file_new): Delete.
13007         (mi_console_file::mi_console_file): New.
13008         (mi_console_file_delete): Delete.
13009         (mi_console_file_fputs): Delete.
13010         (mi_console_file::write): New.
13011         (mi_console_raw_packet): Delete.
13012         (mi_console_file::flush): New.
13013         (mi_console_file_flush): Delete.
13014         (mi_console_set_raw): Rename to ...
13015         (mi_console_file::set_raw): ... this.
13016         * mi/mi-console.h (class mi_console_file): New class.
13017         (mi_console_file_new, mi_console_set_raw): Delete.
13018         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13019         (mi_set_logging): Use delete and tee_file.  Adjust.
13020         * mi/mi-main.c (output_register): Use string_file.
13021         (mi_cmd_data_evaluate_expression): Use string_file.
13022         (mi_cmd_data_read_memory): Use string_file.
13023         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13024         * mi/mi-out.c (mi_ui_out::main_stream): New.
13025         (mi_ui_out::rewind): Use main_stream and
13026         string_file.
13027         (mi_ui_out::put): Use main_stream and string_file.
13028         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13029         Allocate a 'string_file' instead.
13030         (mi_out_new): Don't allocate a mem_fileopen stream here.
13031         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13032         (mi_ui_out::main_stream): Declare method.
13033         * printcmd.c (eval_command): Use string_file.
13034         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13035         * python/py-arch.c (archpy_disassemble): Use string_file.
13036         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13037         * python/py-frame.c (frapy_str): Use string_file.
13038         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13039         Use string_file.
13040         * python/py-type.c (typy_str): Use string_file.
13041         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13042         * python/py-value.c (valpy_str): Use string_file.
13043         * record-btrace.c (btrace_insn_history): Use string_file.
13044         * regcache.c (regcache_print): Use stdio_file.
13045         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13046         * remote.c (escape_buffer): Use string_file.
13047         * rust-lang.c (rust_get_disr_info): Use string_file.
13048         * serial.c (serial_open_ops_1): Use stdio_file.
13049         (do_serial_close): Use delete.
13050         * stack.c (print_frame_arg): Use string_file.
13051         (print_frame_args): Remove local mem_fileopen stream, not used.
13052         (print_frame): Use string_file.
13053         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13054         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13055         Take a 'string_file *' instead of a 'ui_file *'.
13056         * top.c (new_ui): Use stdio_file and stderr_file.
13057         (free_ui): Use delete.
13058         (execute_command_to_string): Use string_file.
13059         (quit_confirm): Use string_file.
13060         * tracepoint.c (collection_list::append_exp): Use string_file.
13061         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13062         * tui/tui-file.c: Don't include "ui-file.h".
13063         (enum streamtype, struct tui_stream): Delete.
13064         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13065         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13066         (tui_file::tui_file): New method.
13067         (tui_file_fputs): Delete.
13068         (tui_file_get_strbuf): Delete.
13069         (tui_file::puts): New method.
13070         (tui_file_adjust_strbuf): Delete.
13071         (tui_file_flush): Delete.
13072         (tui_file::flush): New method.
13073         * tui/tui-file.h: Tweak intro comment.
13074         Include ui-file.h.
13075         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13076         (tui_file_adjust_strbuf): Delete declarations.
13077         (class tui_file): New class.
13078         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13079         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13080         (tui_register_format): Use string_stream.
13081         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13082         (tui_get_function_from_frame): Use string_file.
13083         * typeprint.c (type_to_string): Use string_file.
13084         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13085         (null_stream): New global.
13086         (ui_file_delete): Delete.
13087         (ui_file::ui_file): New.
13088         (null_file_isatty): Delete.
13089         (ui_file::~ui_file): New.
13090         (null_file_rewind): Delete.
13091         (ui_file::printf): New.
13092         (null_file_put): Delete.
13093         (null_file_flush): Delete.
13094         (ui_file::putstr): New.
13095         (null_file_write): Delete.
13096         (ui_file::putstrn): New.
13097         (null_file_read): Delete.
13098         (ui_file::putc): New.
13099         (null_file_fputs): Delete.
13100         (null_file_write_async_safe): Delete.
13101         (ui_file::vprintf): New.
13102         (null_file_delete): Delete.
13103         (null_file::write): New.
13104         (null_file_fseek): Delete.
13105         (null_file::puts): New.
13106         (ui_file_data): Delete.
13107         (null_file::write_async_safe): New.
13108         (gdb_flush, ui_file_isatty): Adjust.
13109         (ui_file_put, ui_file_rewind): Delete.
13110         (ui_file_write): Adjust.
13111         (ui_file_write_for_put): Delete.
13112         (ui_file_write_async_safe, ui_file_read): Adjust.
13113         (ui_file_fseek): Delete.
13114         (fputs_unfiltered): Adjust.
13115         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13116         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13117         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13118         (set_ui_file_data): Delete.
13119         (string_file::~string_file, string_file::write)
13120         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13121         (do_ui_file_as_string, ui_file_as_string): Delete.
13122         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13123         (struct mem_file): Delete.
13124         (mem_file_new): Delete.
13125         (stdio_file::stdio_file): New.
13126         (mem_file_delete): Delete.
13127         (stdio_file::stdio_file): New.
13128         (mem_fileopen): Delete.
13129         (stdio_file::~stdio_file): New.
13130         (mem_file_rewind): Delete.
13131         (stdio_file::set_stream): New.
13132         (mem_file_put): Delete.
13133         (stdio_file::open): New.
13134         (mem_file_write): Delete.
13135         (stdio_file_magic, struct stdio_file): Delete.
13136         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13137         (stdio_file::flush): New.
13138         (stdio_file_read): Rename to ...
13139         (stdio_file::read): ... this.  Adjust.
13140         (stdio_file_write): Rename to ...
13141         (stdio_file::write): ... this.  Adjust.
13142         (stdio_file_write_async_safe): Rename to ...
13143         (stdio_file::write_async_safe) ... this.  Adjust.
13144         (stdio_file_fputs): Rename to ...
13145         (stdio_file::puts) ... this.  Adjust.
13146         (stdio_file_isatty): Delete.
13147         (stdio_file_fseek): Delete.
13148         (stdio_file::isatty): New.
13149         (stderr_file_write): Rename to ...
13150         (stderr_file::write) ... this.  Adjust.
13151         (stderr_file_fputs): Rename to ...
13152         (stderr_file::puts) ... this.  Adjust.
13153         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13154         (stderr_file::stderr_file): New.
13155         (tee_file_magic): Delete.
13156         (struct tee_file): Delete.
13157         (tee_file::tee_file): New.
13158         (tee_file_new): Delete.
13159         (tee_file::~tee_file): New.
13160         (tee_file_delete): Delete.
13161         (tee_file_flush): Rename to ...
13162         (tee_file::flush): ... this.  Adjust.
13163         (tee_file_write): Rename to ...
13164         (tee_file::write): ... this.  Adjust.
13165         (tee_file::write_async_safe): New.
13166         (tee_file_fputs): Rename to ...
13167         (tee_file::puts): ... this.  Adjust.
13168         (tee_file_isatty): Rename to ...
13169         (tee_file::isatty): ... this.  Adjust.
13170         * ui-file.h (struct obstack, struct ui_file): Don't
13171         forward-declare.
13172         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13173         (ui_file_write_ftype)
13174         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13175         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13176         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13177         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13178         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13179         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13180         (set_ui_file_fseek): Delete.
13181         (ui_file_data, ui_file_delete, ui_file_rewind)
13182         (struct ui_file): New.
13183         (ui_file_up): New.
13184         (class null_file): New.
13185         (null_stream): Declare.
13186         (ui_file_write_for_put, ui_file_put): Delete.
13187         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13188         Delete.
13189         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13190         (gdb_fopen, tee_file_new): Delete.
13191         (struct string_file): New.
13192         (struct stdio_file): New.
13193         (stdio_file_up): New.
13194         (struct stderr_file): New.
13195         (class tee_file): New.
13196         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13197         of a 'ui_file *'.  Adjust.
13198         * ui-out.h (class ui_out) <field_stream>: Likewise.
13199         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13200         (null_stream): Delete.
13201         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13202         Adjust.
13203         * utils.h (struct ui_file): Delete forward declaration..
13204         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13205         (error_stream): Take a 'string_file &' instead of a
13206         'ui_file *'.
13207         * varobj.c (varobj_value_get_print_value): Use string_file.
13208         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13209         * gdbarch.c: Regenerate.
13210
13211 2017-02-02  Pedro Alves  <palves@redhat.com>
13212
13213         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13214         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13215         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13216         Adjust to call gdb_print_insn instead of
13217         gdb_disassembler::print_insn.
13218         (dump_insns, do_mixed_source_and_assembly_deprecated)
13219         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13220         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13221         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13222         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13223         declaration.
13224         (gdb_pretty_print_insn): Re-add declaration.
13225         * record-btrace.c (btrace_insn_history): Don't allocate a
13226         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13227
13228 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13229
13230         * disasm.h (gdb_disassembly): Remove file_string parameter.
13231         * disasm.c (gdb_disassembly): Likewise.
13232         * cli/cli-cmds.c (print_disassembly): Adapt.
13233         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13234         * stack.c (do_gdb_disassembly): Likewise.
13235
13236 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13237
13238         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13239         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13240         targets.  And if the implicit value is longer than needed, extract
13241         the first bytes instead of the "least significant" ones.
13242
13243 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13244
13245         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13246         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13247         (btrace_fetch): Assert can_access_registers_ptid.
13248         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13249         validate_registers_access.
13250
13251 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13252
13253         * gdbthread.h (can_access_registers_ptid): New.
13254         * thread.c (can_access_registers_ptid): New.
13255
13256 2017-02-01  Pedro Alves  <palves@redhat.com>
13257
13258         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13259
13260 2017-01-31  Pedro Alves  <palves@redhat.com>
13261
13262         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13263         Fix typos.
13264
13265 2017-01-31  Pedro Alves  <palves@redhat.com>
13266
13267         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13268         not used.
13269
13270 2017-01-31  Pedro Alves  <palves@redhat.com>
13271
13272         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13273
13274 2017-01-31  Pedro Alves  <palves@redhat.com>
13275
13276         * common/scoped_restore.h
13277         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13278         change the value's parameter type to T2.
13279         (make_scoped_restore): Likewise.
13280
13281 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13282             Richard Henderson  <rth@redhat.com>
13283
13284         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13285         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13286         GS_BASE for older kernels.
13287         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13288         GS_BASE for older kernels.
13289         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13290         and GS_BASE to the offset table.
13291         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13292         system register group.
13293         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13294         for older kernels.
13295         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13296         amd64 ABI.
13297         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13298         AMD64_GSBASE_REGNUM.
13299         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13300         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13301         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13302         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13303         i386/64bit-segments.xml in those rules.
13304         * features/i386/64bit-segments.xml: New file.
13305         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13306         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13307         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13308         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13309         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13310         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13311         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13312         * features/i386/amd64-avx-linux.c: Regenerated.
13313         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13314         * features/i386/amd64-avx-mpx.c: Regenerated.
13315         * features/i386/amd64-avx512-linux.c: Regenerated.
13316         * features/i386/amd64-linux.c: Regenerated.
13317         * features/i386/amd64-mpx-linux.c: Regenerated.
13318         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13319         * features/i386/i386-avx-mpx.c: Regenerated.
13320         * features/i386/x32-avx-linux.c: Regenerated.
13321         * features/i386/x32-avx512-linux.c: Regenerated.
13322         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13323         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13324         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13325         * regformats/i386/amd64-linux.dat: Regenerated.
13326         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13327         * regformats/i386/x32-avx-linux.dat: Regenerated.
13328         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13329         * regformats/i386/x32-linux.dat: Regenerated.
13330
13331 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13332
13333         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13334         Set to AMD64_NUM_REGS.
13335
13336 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13337
13338         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13339         that checks validity of a register number.
13340
13341 2017-01-27  Kees Cook  <keescook@google.com>
13342
13343         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13344         fetch_fpregs if target has fpa registers.
13345         (arm_linux_store_inferior_registers): Call store_fpregs if target
13346         has fpa registers.
13347
13348 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13349
13350         * cris-tdep.c (cris_gdbarch_init): Remove check for
13351         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13352
13353 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13354
13355         * corelow.c (get_core_register_section): Check for regset
13356         existence before checking for REGSET_VARIABLE_SIZE.
13357
13358 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13359             Pedro Alves  <palves@redhat.com>
13360
13361         PR gdb/20939
13362         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13363         call memory_error, save memaddr instead.
13364         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13365         negative, cal memory_error.
13366         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13367
13368 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13369
13370         * disasm-selftests.c (memory_error_test): New function.
13371         (_initialize_disasm_selftests): Register memory_error_test.
13372
13373 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13374
13375         * Makefile.in (SFILES): Add disasm-selftests.c and
13376         selftest-arch.c.
13377         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13378         * disasm-selftests.c: New file.
13379         * selftest-arch.c: New file.
13380         * selftest-arch.h: New file.
13381
13382 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13383
13384         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13385         to bfd_arch_mep.  Don't return 0 if section is not
13386         found.  Call print_insn_mep.
13387
13388 2017-01-26  Pedro Alves  <palves@redhat.com>
13389             Yao Qi  <yao.qi@linaro.org>
13390
13391         * arm-tdep.c: Include "disasm.h".
13392         (gdb_print_insn_arm): Update code to get gdbarch.
13393         * disasm.c (dis_asm_read_memory): Change it to
13394         gdb_disassembler::dis_asm_read_memory.
13395         (dis_asm_memory_error): Likewise.
13396         (dis_asm_print_address): Likewise.
13397         (gdb_pretty_print_insn): Change it to
13398         gdb_disassembler::pretty_print_insn.
13399         (dump_insns): Add one argument gdb_disassemlber.  All
13400         callers updated.
13401         (do_mixed_source_and_assembly_deprecated): Likewise.
13402         (do_mixed_source_and_assembly): Likewise.
13403         (do_assembly_only): Likewise.
13404         (gdb_disassembler::gdb_disassembler): New.
13405         (gdb_disassembler::print_insn): New.
13406         * disasm.h (class gdb_disassembler): New.
13407         (gdb_pretty_print_insn): Remove declaration.
13408         (gdb_disassemble_info): Likewise.
13409         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13410         (gdbscm_disasm_read_memory_worker): Update.
13411         (gdbscm_disasm_read_memory): Update.
13412         (gdbscm_disasm_memory_error): Remove.
13413         (gdbscm_disasm_print_address): Remove.
13414         (gdbscm_disassembler::gdbscm_disassembler): New.
13415         (gdbscm_print_insn_from_port): Update.
13416         * mips-tdep.c: Include disasm.h.
13417         (gdb_print_insn_mips): Update code to get gdbarch.
13418         * record-btrace.c (btrace_insn_history): Update.
13419         * spu-tdep.c: Include disasm.h.
13420         (struct spu_dis_asm_data): Remove.
13421         (struct spu_dis_asm_info): New.
13422         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13423         SPU id.
13424         (gdb_print_insn_spu): Cast disassemble_info to
13425         spu_dis_asm_info.
13426
13427 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13428
13429         * disasm.c (do_ui_file_delete): Delete.
13430         (gdb_insn_length): Move code creating stream to ...
13431         * utils.c (null_stream): ... here.  New function.
13432         * utils.h (null_stream): Declare.
13433
13434 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13435
13436         * python/py-inferior.c (find_thread_object): Return directly
13437         from the loop.  Remove "found" variable.
13438
13439 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13440
13441         GDB 7.12.1 released.
13442
13443 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13444
13445         * python/py-function.c (fnpy_call): Reorder declarations to have
13446         the gdbpy_enter object declared first.
13447         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13448
13449 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13450
13451         PR python/21068
13452         * python/python-internal.h (PyMem_RawMalloc): Define for
13453         Python < 3.4.
13454         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13455         PyMem_RawMalloc instead of PyMem_Malloc.
13456
13457 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13458             Luis Machado  <lgustavo@codesourcery.com>
13459
13460         * NEWS (New commands): Mention flash-erase.
13461         (New MI commands): Mention target-flash-erase.
13462         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13463         command.
13464         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13465         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13466         * target.c (flash_erase_command): New function.
13467         (initialize_targets): Add new flash-erase command.
13468         * target.h (flash_erase_command): New declaration.
13469
13470 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13471
13472         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13473         HAVE_SYS_PROCFS_H is defined.
13474
13475 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13476
13477         * remote.c (struct cached_reg): Change data into a pointer.
13478         * (stop_reply_dtr): Free data pointers before deleting vector.
13479         (process_stop_reply): Likewise.
13480         (remote_parse_stop_reply): Allocate space for data
13481
13482 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13483
13484         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13485         MAX_REGISTER_SIZE.
13486         (amd64_pseudo_register_read_value): Likewise.
13487         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13488         (store_register_using_P): Likewise.
13489         * regcache.c (regcache_xfer_part): Likewise.
13490
13491 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13492
13493         Split real and pseudo registers.
13494         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13495         (sparc32_pseudo_regnum): New enum.
13496         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13497         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13498         (SPARC32_CP0_REGISTERS): New macro.
13499         (sparc32_pseudo_register_name): New function.
13500         (sparc32_register_name): Use sparc32_pseudo_register_name.
13501         (sparc32_pseudo_register_type): New function.
13502         (sparc32_register_type): Use sparc32_pseudo_register_type.
13503         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13504         pseudo register numbers.
13505         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13506         (SPARC64_CP0_REGISTERS): New macro.
13507         (sparc64_pseudo_register_name): New function.
13508         (sparc64_register_name): Use sparc64_pseudo_register_name.
13509         (sparc64_pseudo_register_type): New function.
13510         (sparc64_register_type): Use sparc64_pseudo_register_type.
13511         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13512         pseudo register numbers.
13513         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13514         sparc64_store_arguments): Handle pseudo register numbers.
13515
13516 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13517
13518         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13519         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13520         output.
13521         (getpkt_or_notif_sane_1): Likewise.
13522
13523 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13524
13525         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13526         of CC.  Pass "-x c++-header" instead of "-x c".
13527
13528 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13529
13530         * remote.c (remote_can_async_p): Update comment.
13531
13532 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13533
13534         * linux-nat.c (linux_nat_can_async_p): Update comment.
13535
13536 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13537
13538         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13539
13540 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13541
13542         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13543
13544 2017-01-10  Tom Tromey  <tom@tromey.com>
13545
13546         * python/py-type.c (typy_legacy_template_argument): Update.
13547         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13548         ~demangle_parse_info): Declare new members.
13549         (cp_demangled_name_to_comp): Return unique_ptr.
13550         (cp_demangled_name_parse_free)
13551         (make_cleanup_cp_demangled_name_parse_free)
13552         (cp_new_demangle_parse_info): Remove.
13553         * cp-support.c (do_demangled_name_parse_free_cleanup)
13554         (make_cleanup_cp_demangled_name_parse_free): Remove.
13555         (inspect_type, cp_canonicalize_string_full)
13556         (cp_canonicalize_string): Update.
13557         (mangled_name_to_comp): Change return type.
13558         (cp_class_name_from_physname, method_name_from_physname)
13559         (cp_func_name, cp_remove_params): Update.
13560         * cp-name-parser.y (demangle_parse_info): New constructor, from
13561         cp_new_demangle_parse_info.
13562         (~demangle_parse_info): New destructor, from
13563         cp_demangled_name_parse_free.
13564         (cp_merge_demangle_parse_infos): Update.
13565         (cp_demangled_name_to_comp): Change return type.
13566
13567 2017-01-10  Tom Tromey  <tom@tromey.com>
13568
13569         * top.c (prevent_dont_repeat): Change return type.
13570         * python/python.c (execute_gdb_command): Use std::string.
13571         Update.
13572         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13573         * command.h (prevent_dont_repeat): Change return type.
13574         * breakpoint.c (bpstat_do_actions_1): Update.
13575
13576 2017-01-10  Tom Tromey  <tom@tromey.com>
13577
13578         * value.h (scoped_value_mark::~scoped_value_mark): Call
13579         free_to_mark.
13580         (scoped_value_mark::free_to_mark): New method.
13581         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13582         scoped_value_mark.
13583
13584 2017-01-10  Tom Tromey  <tom@tromey.com>
13585
13586         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13587         (valpy_reference_value, valpy_const_value, valpy_get_address)
13588         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13589         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13590         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13591         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13592         scoped_value_mark.
13593         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13594         * value.h (scoped_value_mark): New class.
13595
13596 2017-01-10  Tom Tromey  <tom@tromey.com>
13597
13598         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13599         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13600         * psymtab.c (discard_psymtabs_upto): Remove.
13601         (make_cleanup_discard_psymtabs): Remove.
13602         (struct psymtab_state): Remove.
13603
13604 2017-01-10  Tom Tromey  <tom@tromey.com>
13605
13606         * record-full.c (record_full_save_cleanups): Remove.
13607         (record_full_save): Use gdb::unlinker.
13608         * gcore.c (do_bfd_delete_cleanup): Remove.
13609         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13610         cleanups.
13611         * dwarf2read.c (unlink_if_set): Remove.
13612         (write_psymtabs_to_index): Use gdb::unlinker.
13613         * common/gdb_unlinker.h: New file.
13614
13615 2017-01-10  Tom Tromey  <tom@tromey.com>
13616
13617         * windows-tdep.c (windows_xfer_shared_library): Update.
13618         * windows-nat.c (windows_make_so): Update.
13619         * utils.h (make_cleanup_bfd_unref): Remove.
13620         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13621         * symfile.h (symfile_bfd_open)
13622         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13623         * symfile.c (read_symbols, symbol_file_add)
13624         (separate_debug_file_exists): Update.
13625         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13626         (generic_load, reread_symbols): Update.
13627         * symfile-mem.c (symbol_file_add_from_memory): Update.
13628         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13629         (spu_symbol_file_add_from_memory): Update.
13630         * solist.h (struct target_so_ops) <bfd_open>: Return
13631         gdb_bfd_ref_ptr.
13632         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13633         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13634         gdb_bfd_ref_ptr.
13635         (solib_map_sections, reload_shared_libraries_1): Update.
13636         * solib-svr4.c (enable_break): Update.
13637         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13638         * solib-frv.c (enable_break2): Update.
13639         * solib-dsbt.c (enable_break): Update.
13640         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13641         gdb_bfd_ref_ptr.
13642         (darwin_solib_get_all_image_info_addr_at_init): Update.
13643         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13644         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13645         * record-full.c (record_full_save): Update.
13646         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13647         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13648         * minidebug.c (find_separate_debug_file_in_section): Return
13649         gdb_bfd_ref_ptr.
13650         * machoread.c (macho_add_oso_symfile): Change abfd to
13651         gdb_bfd_ref_ptr.
13652         (macho_symfile_read_all_oso): Update.
13653         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13654         (macho_symfile_read): Update.
13655         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13656         (jit_bfd_try_read_symtab): Update.
13657         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13658         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13659         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13660         gdb_bfd_ref_ptr.
13661         (gdb_bfd_ref_policy): New struct.
13662         (gdb_bfd_ref_ptr): New typedef.
13663         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13664         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13665         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13666         gdb_bfd_ref_ptr.
13667         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13668         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13669         (gcore_command): Update.
13670         * exec.c (exec_file_attach): Update.
13671         * elfread.c (elf_symfile_read): Update.
13672         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13673         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13674         (open_and_init_dwo_file): Update.
13675         (open_dwp_file): Return gdb_bfd_ref_ptr.
13676         (open_and_init_dwp_file): Update.
13677         * corelow.c (core_open): Update.
13678         * compile/compile-object-load.c (compile_object_load): Update.
13679         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13680         * coffread.c (coff_symfile_read): Update.
13681         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13682         gdb_bfd_ref_ptr.  Rename.
13683         (dump_bfd_file, restore_command): Update.
13684         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13685         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13686         (find_separate_debug_file_by_buildid): Update.
13687
13688 2017-01-10  Tom Tromey  <tom@tromey.com>
13689
13690         * common/gdb_ref_ptr.h: New file.
13691         * python/py-ref.h (struct gdbpy_ref_policy): New.
13692         (gdbpy_ref): Now a typedef.
13693
13694 2017-01-10  Tom Tromey  <tom@tromey.com>
13695
13696         * utils.h (make_cleanup_htab_delete): Don't declare.
13697         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13698         Remove.
13699         * linespec.c (decode_compound_collector): Add constructor,
13700         destructor.
13701         (lookup_prefix_sym): Remove cleanup.
13702         (symtab_collector): Add constructor, destructor.
13703         (collect_symtabs_from_filename): Remove cleanup.
13704         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13705         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13706         Use htab_up.
13707         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13708         * dwarf2read.c (dw2_expand_symtabs_matching)
13709         (dw2_map_symbol_filenames, dwarf_decode_macros)
13710         (write_psymtabs_to_index): Use htab_up.
13711         * dwarf2loc.c (func_verify_no_selftailcall)
13712         (call_site_find_chain_1, func_verify_no_selftailcall)
13713         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13714         std::vector, gdb::unique_xmalloc_ptr.
13715         (call_sitep): Remove typedef.
13716         (dwarf2_locexpr_baton_eval): Remove unused variable.
13717
13718 2017-01-10  Tom Tromey  <tom@tromey.com>
13719
13720         * python/python-internal.h (make_cleanup_py_decref)
13721         (make_cleanup_py_xdecref): Don't declare.
13722         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13723         (py_xdecref, make_cleanup_py_xdecref): Remove.
13724
13725 2017-01-10  Tom Tromey  <tom@tromey.com>
13726
13727         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13728         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13729
13730 2017-01-10  Tom Tromey  <tom@tromey.com>
13731
13732         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13733
13734 2017-01-10  Tom Tromey  <tom@tromey.com>
13735
13736         * python/py-utils.c (unicode_to_encoded_string)
13737         (python_string_to_target_string)
13738         (python_string_to_target_python_string)
13739         (python_string_to_host_string, gdbpy_obj_to_string)
13740         (get_addr_from_python): Use gdbpy_ref.
13741
13742 2017-01-10  Tom Tromey  <tom@tromey.com>
13743
13744         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13745         gdbpy_ref.
13746
13747 2017-01-10  Tom Tromey  <tom@tromey.com>
13748
13749         * python/python.c (eval_python_command, gdbpy_decode_line)
13750         (gdbpy_run_events, gdbpy_start_type_printers)
13751         (gdbpy_apply_type_printers): Use gdbpy_ref.
13752
13753 2017-01-10  Tom Tromey  <tom@tromey.com>
13754
13755         * python/py-param.c (get_doc_string, compute_enum_values): Use
13756         gdbpy_ref.
13757
13758 2017-01-10  Tom Tromey  <tom@tromey.com>
13759
13760         * python/py-inferior.c (find_thread_object, build_inferior_list):
13761         Use gdbpy_ref.
13762
13763 2017-01-10  Tom Tromey  <tom@tromey.com>
13764
13765         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13766
13767 2017-01-10  Tom Tromey  <tom@tromey.com>
13768
13769         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13770         gdbpy_ref.
13771
13772 2017-01-10  Tom Tromey  <tom@tromey.com>
13773
13774         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13775         extra incref.
13776         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13777         Use gdbpy_ref.
13778
13779 2017-01-10  Tom Tromey  <tom@tromey.com>
13780
13781         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13782         gdbpy_ref.
13783
13784 2017-01-10  Tom Tromey  <tom@tromey.com>
13785
13786         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13787         decref results of PyArg_ParseTupleAndKeywords.
13788
13789 2017-01-10  Tom Tromey  <tom@tromey.com>
13790
13791         * python/python.c (python_run_simple_file): Use
13792         unique_xmalloc_ptr, gdbpy_ref.
13793
13794 2017-01-10  Tom Tromey  <tom@tromey.com>
13795
13796         * python/py-prettyprint.c (print_stack_unless_memory_error)
13797         (print_string_repr, print_children): Use gdbpy_ref.
13798         (dummy_python_frame): New class.
13799         (dummy_python_frame::dummy_python_frame): Rename from
13800         push_dummy_python_frame.
13801         (py_restore_tstate): Remove.
13802
13803 2017-01-10  Tom Tromey  <tom@tromey.com>
13804
13805         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13806
13807 2017-01-10  Tom Tromey  <tom@tromey.com>
13808
13809         * python/python.c (ensure_python_env, restore_python_env):
13810         Remove.
13811         * python/python-internal.h (ensure_python_env): Don't declare.
13812         * varobj.h (varobj_ensure_python_env): Don't declare.
13813         * varobj.c (varobj_ensure_python_env): Remove.
13814
13815 2017-01-10  Tom Tromey  <tom@tromey.com>
13816
13817         * varobj.c (varobj_value_get_print_value): Use
13818         gdbpy_enter_varobj.
13819
13820 2017-01-10  Tom Tromey  <tom@tromey.com>
13821
13822         * python/py-prettyprint.c (print_string_repr, print_children):
13823         Update.
13824         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13825         of "encoding".
13826         * varobj.c (varobj_value_get_print_value): Update.
13827         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13828
13829 2017-01-10  Tom Tromey  <tom@tromey.com>
13830
13831         * varobj.c (varobj_get_display_hint)
13832         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13833         (varobj_set_visualizer, free_variable): Use
13834         gdbpy_enter_varobj.
13835
13836 2017-01-10  Tom Tromey  <tom@tromey.com>
13837
13838         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13839         (do_finish_initialization): New function.  Use gdbpy_ref.
13840         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13841         do_finish_initialization.
13842
13843 2017-01-10  Tom Tromey  <tom@tromey.com>
13844
13845         * python/py-param.c (get_set_value, get_show_value): Use
13846         gdbpy_enter, gdbpy_ref.
13847
13848 2017-01-10  Tom Tromey  <tom@tromey.com>
13849
13850         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13851
13852 2017-01-10  Tom Tromey  <tom@tromey.com>
13853
13854         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13855
13856 2017-01-10  Tom Tromey  <tom@tromey.com>
13857
13858         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13859         Use gdbpy_enter_varobj.
13860
13861 2017-01-10  Tom Tromey  <tom@tromey.com>
13862
13863         * varobj.c (gdbpy_enter_varobj): New constructor.
13864         * python/python-internal.h (gdbpy_enter_varobj): New class.
13865         * python/py-varobj.c (py_varobj_get_iterator): Use
13866         gdbpy_enter_varobj.
13867
13868 2017-01-10  Tom Tromey  <tom@tromey.com>
13869
13870         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13871         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13872         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13873         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13874         unique_xmalloc_ptr.
13875         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13876
13877 2017-01-10  Tom Tromey  <tom@tromey.com>
13878
13879         * python/py-xmethods.c (invoke_match_method): Use
13880         gdbpy_ref.
13881
13882 2017-01-10  Tom Tromey  <tom@tromey.com>
13883
13884         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13885         gdbpy_enter, gdbpy_ref.
13886
13887 2017-01-10  Tom Tromey  <tom@tromey.com>
13888
13889         * python/python.c (python_interactive_command): Use gdbpy_enter.
13890
13891 2017-01-10  Tom Tromey  <tom@tromey.com>
13892
13893         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13894         gdbpy_ref.
13895
13896 2017-01-10  Tom Tromey  <tom@tromey.com>
13897
13898         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13899         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13900
13901 2017-01-10  Tom Tromey  <tom@tromey.com>
13902
13903         * utils.h (htab_deleter): New struct.
13904         (htab_up): New typedef.
13905         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13906         gdbpy_enter, gdbpy_ref, htab_up.
13907
13908 2017-01-10  Tom Tromey  <tom@tromey.com>
13909
13910         * python/py-unwind.c (pending_frame_invalidate): Remove.
13911         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13912
13913 2017-01-10  Tom Tromey  <tom@tromey.com>
13914
13915         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13916         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13917
13918 2017-01-10  Tom Tromey  <tom@tromey.com>
13919
13920         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13921
13922 2017-01-10  Tom Tromey  <tom@tromey.com>
13923
13924         * python/python.c (gdbpy_eval_from_control_command)
13925         (gdbpy_source_script, gdbpy_run_events)
13926         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13927         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13928         gdbpy_enter.
13929
13930 2017-01-10  Tom Tromey  <tom@tromey.com>
13931
13932         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13933
13934 2017-01-10  Tom Tromey  <tom@tromey.com>
13935
13936         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13937
13938 2017-01-10  Tom Tromey  <tom@tromey.com>
13939
13940         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13941         (python_on_inferior_call_pre, python_on_inferior_call_post)
13942         (python_on_memory_change, python_on_register_change)
13943         (python_inferior_exit, python_new_objfile, add_thread_object)
13944         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13945
13946 2017-01-10  Tom Tromey  <tom@tromey.com>
13947
13948         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13949         (bpfinishpy_handle_exit): Use gdbpy_enter.
13950
13951 2017-01-10  Tom Tromey  <tom@tromey.com>
13952
13953         * python/py-cmd.c (cmdpy_destroyer)
13954         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13955         gdbpy_enter.
13956
13957 2017-01-10  Tom Tromey  <tom@tromey.com>
13958
13959         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13960         gdbpy_enter.
13961         (gdbpy_breakpoint_has_cond): Likewise.
13962
13963 2017-01-10  Tom Tromey  <tom@tromey.com>
13964
13965         * python/python.c (gdbpy_enter): New constructor.
13966         (~gdbpy_enter): New destructor.
13967         (restore_python_env, ensure_python_env): Rewrite.
13968         * python/python-internal.h (gdbpy_enter): New class.
13969
13970 2017-01-10  Tom Tromey  <tom@tromey.com>
13971
13972         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13973
13974 2017-01-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-value.c (value_has_field, get_field_flag)
13977         (get_field_type, valpy_getitem, convert_value_from_python): Use
13978         gdbpy_ref.
13979
13980 2017-01-10  Tom Tromey  <tom@tromey.com>
13981
13982         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13983         gdbpy_ref.
13984
13985 2017-01-10  Tom Tromey  <tom@tromey.com>
13986
13987         * python/py-prettyprint.c (search_pp_list)
13988         (find_pretty_printer_from_objfiles)
13989         (find_pretty_printer_from_progspace)
13990         (find_pretty_printer_from_gdb, find_pretty_printer)
13991         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13992         gdbpy_ref.
13993
13994 2017-01-10  Tom Tromey  <tom@tromey.com>
13995
13996         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13997
13998 2017-01-10  Tom Tromey  <tom@tromey.com>
13999
14000         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14001         (ltpy_get_all_source_lines): Use gdbpy_ref.
14002
14003 2017-01-10  Tom Tromey  <tom@tromey.com>
14004
14005         * python/py-framefilter.c (extract_sym, extract_value)
14006         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14007         gdbpy_ref.
14008
14009 2017-01-10  Tom Tromey  <tom@tromey.com>
14010
14011         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14012
14013 2017-01-10  Tom Tromey  <tom@tromey.com>
14014
14015         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14016
14017 2017-01-10  Tom Tromey  <tom@tromey.com>
14018
14019         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14020         gdbpy_ref.
14021
14022 2017-01-10  Tom Tromey  <tom@tromey.com>
14023
14024         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14025
14026 2017-01-10  Tom Tromey  <tom@tromey.com>
14027
14028         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14029         (typy_range): Use gdbpy_ref.
14030
14031 2017-01-10  Tom Tromey  <tom@tromey.com>
14032
14033         * python/py-threadevent.c (create_thread_event_object): Use
14034         gdbpy_ref.
14035         * python/py-stopevent.c (create_stop_event_object): Simplify.
14036         (emit_stop_event): Use gdbpy_ref.
14037         * python/py-signalevent.c (create_signal_event_object): Use
14038         gdbpy_ref.
14039         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14040         (emit_new_objfile_event, create_clear_objfiles_event_object)
14041         (emit_clear_objfiles_event): Use gdbpy_ref.
14042         * python/py-infevents.c (create_inferior_call_event_object)
14043         (create_register_changed_event_object)
14044         (create_memory_changed_event_object, emit_inferior_call_event)
14045         (emit_memory_changed_event, emit_register_changed_event): Use
14046         gdbpy_ref.
14047         * python/py-exitedevent.c (create_exited_event_object)
14048         (emit_exited_event): Use gdbpy_ref.
14049         * python/py-event.h (evpy_emit_event): Remove
14050         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14051         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14052         * python/py-continueevent.c (emit_continue_event): Use
14053         gdbpy_ref.
14054         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14055         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14056         gdbpy_ref.
14057         * python/py-bpevent.c (create_breakpoint_event_object): Use
14058         gdbpy_ref.
14059
14060 2017-01-10  Tom Tromey  <tom@tromey.com>
14061
14062         * python/py-ref.h: New file.
14063
14064 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14065
14066         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14067         void.
14068         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14069         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14070         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14071         * ui-out.c (ui_out::redirect): Likewise.
14072         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14073         * cli/cli-logging.c (set_logging_redirect): Update call site of
14074         ui_out::redirect.
14075         (handle_redirections): Likewise.
14076         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14077         * top.c (execute_command_to_string): Likewise.
14078         * utils.c (do_ui_out_redirect_pop): Likewise.
14079
14080 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14081
14082         * stack.c (_initialize_stack): Update "frame" command help message.
14083
14084 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14085
14086         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14087
14088 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14089
14090         * x86-linux-nat.h: Include gdb_proc_service.h.
14091
14092 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14093
14094         * ser-base.h: Include serial.h.
14095
14096 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14097
14098         * ppc-linux-tdep.h: Include ppc-tdep.h.
14099
14100 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14101
14102         * nat/amd64-linux-siginfo.h: Include signal.h.
14103
14104 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14105
14106         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14107
14108 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14109
14110         * mi/mi-parse.h: Include mi-cmds.h.
14111
14112 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14113
14114         * inf-loop.c: Don't include "target.h".
14115         * inf-loop.h: Include it here.
14116
14117 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14118
14119         * dfp.h: Include "dboulest.h" and "expression.h".
14120
14121 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14122
14123         * ax-gdb.h: Include "ax.h".
14124
14125 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14126
14127         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14128         with nat/gdb_ptrace.h.
14129
14130 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14131
14132         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14133         new line.
14134         (mips64_fbsd_sigframe_init): Likewise.
14135
14136 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14137
14138         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14139         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14140
14141 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14142
14143         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14144         * NEWS: Mention new FreeBSD/mips native configuration.
14145         * config/mips/fbsd.mh: New file.
14146         * configure.host: Add mips*-*-freebsd*.
14147         * mips-fbsd-nat.c: New file.
14148
14149 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14150
14151         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14152         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14153         * NEWS: Mention new FreeBSD/mips target.
14154         * configure.tgt: Add mips*-*-freebsd*.
14155         * mips-fbsd-tdep.c: New file.
14156         * mips-fbsd-tdep.h: New file.
14157
14158 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14159
14160         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14161         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14162
14163 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14164
14165         Update copyright year range in all GDB files.
14166
14167 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14168
14169         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14170
14171 For older changes see ChangeLog-2016.
14172 \f
14173 Local Variables:
14174 mode: change-log
14175 left-margin: 8
14176 fill-column: 74
14177 version-control: never
14178 coding: utf-8
14179 End: