C++ify xml-syscall.c
[external/binutils.git] / gdb / ChangeLog
1 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * xml-syscall.c (struct syscall_desc): Add constructor.
4         <name>: Change type to std::string.
5         (syscall_desc_up): New typedef.
6         (syscall_desc_p): Remove typeder.
7         (DEF_VEC_P(syscall_desc_p)): Remove.
8         (struct syscall_group_desc): Add constructor.
9         <name>: Change type to std::string.
10         <syscalls>: Change type to std::vector.
11         (syscall_group_desc_up): New typedef.
12         (syscall_group_desc_p): Remove typedef.
13         (DEF_VEC_P(syscall_group_desc_p)): Remove.
14         (struct syscalls_info) <syscalls>: Change type to std::vector of
15         unique_ptr.
16         <groups>: Likewise.
17         <my_gdb_datadir>: Change type to std::string.
18         (syscalls_info_up): New typedef.
19         (allocate_syscalls_info): Remove.
20         (syscalls_info_free_syscalls_desc): Remove.
21         (syscalls_info_free_syscall_group_desc): Remove.
22         (free_syscalls_info): Remove.
23         (make_cleanup_free_syscalls_info): Remove.
24         (syscall_group_create_syscall_group_desc): Adjust.
25         (syscall_group_add_syscall): Adjust.
26         (syscall_create_syscall_desc): Adjust.
27         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
28         (init_syscalls_info): Adjust.
29         (syscall_group_get_group_by_name): Adjust.
30         (xml_get_syscall_number): Adjust.
31         (xml_get_syscall_name): Adjust.
32         (xml_list_of_syscalls): Adjust.
33         (xml_list_syscalls_by_group): Adjust.
34         (xml_list_of_groups): Adjust.
35
36 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
37
38         * probe.h: Don't include gdb_vecs.h.
39         (DEF_VEC_P (probe_p)): Remove.
40         (find_probes_in_objfile): Return an std::vector.
41         * probe.c (find_probes_in_objfile): Likewise.
42         * breakpoint.c (breakpoint_objfile_data)
43         <longjmp_probes>: Change type to std::vector.
44         <exception_probes>: Likewise.
45         (free_breakpoint_probes): Don't manually free vectors.
46         (create_longjmp_master_breakpoint): Adjust.
47         (create_exception_master_breakpoint): Adjust.
48         * solib-svr4.c (svr4_create_probe_breakpoints): Change
49         parameter type, adjust.
50         (svr4_create_solib_event_breakpoints): Adjust.
51
52 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
53
54         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
55         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
56         with new.
57         (free_breakpoint_probes): Rename to ...
58         (free_breakpoint_objfile_data): ... this, and call delete on
59         bp_objfile_data..
60
61 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
62
63         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
64         (loaded_script_ptr): Remove typedef.
65         (DEF_VEC_P (loaded_script_ptr)): Remove.
66         (struct collect_matching_scripts_data): Add constructor.
67         <scripts_p>: Change type to (pointer to) std::vector.
68         (collect_matching_scripts_data): Adjust.
69         (sort_scripts_by_name): Make suitable for std::sort.
70         (print_scripts): Don't sort vector, adjust to std::vector.
71         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
72
73 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
74
75         * symfile.c (filename_language): Make struct, not typedef.  Add
76         constructor.
77         <ext>: Change type to std::string.
78         (DEF_VEC_O (filename_language)): Remove.
79         (filename_language_table): Change type to std::vector.
80         (add_filename_language): Adjust.
81         (set_ext_lang_command): Adjust.
82         (info_ext_lang_command): Adjust.
83         (deduce_language_from_filename): Adjust.
84         (class scoped_restore_filename_language_table): Remove.
85         (test_filename_language): Use scoped_restore.
86         (test_set_ext_lang_command): Use scoped_restore, adjust to
87         std::vector change.
88
89 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
90
91         * symfile.c: Include selftest.h.
92         (class scoped_restore_filename_language_table): New.
93         (test_filename_language): New test.
94         (test_set_ext_lang_command): New test.
95         (_initialize_symfile): Register tests.
96
97 2017-10-27  Keith Seitz  <keiths@redhat.com>
98
99         * breakpoint.c (print_breakpoint_location): Use the symbol saved
100         in the bp_location, falling back to find_pc_sect_function when
101         needed.
102         (add_location_to_breakpoint): Save sal->symbol.
103         * breakpoint.h (struct bp_location) <symbol>: New field.
104         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
105         * symtab.h (struct symtab_and_line) <symbol>: New field.
106
107 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
108
109         PR gdb/13669
110         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
111         to rewind obstack.
112
113 2017-10-26  Pedro Alves  <palves@redhat.com>
114
115         * remote.c (remote_async_terminal_ours_p): Delete.
116         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
117         Remove references to 'remote_async_terminal_ours_p'.
118
119 2017-10-26  Yao Qi  <yao.qi@linaro.org>
120
121         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
122
123 2017-10-26  Yao Qi  <yao.qi@linaro.org>
124
125         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
126         aspace const.
127         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
128         Likewise.
129         * breakpoint.c (bpstat_check_location): Remove cast.
130         (breakpoint_hit_catch_fork): Make aspce const.
131         (breakpoint_hit_catch_solib): Likewise.
132         (breakpoint_hit_catch_exec): Likewise.
133         (breakpoint_hit_ranged_breakpoint): Likewise.
134         (breakpoint_hit_watchpoint): Likewise.
135         (base_breakpoint_breakpoint_hit): Likewise.
136         (bkpt_breakpoint_hit): Likewise.
137         (dprintf_breakpoint_hit): Likewise.
138         (tracepoint_breakpoint_hit): Likewise.
139         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
140
141 2017-10-26  Yao Qi  <yao.qi@linaro.org>
142
143         * breakpoint.c (breakpoint_location_address_match): Change
144         "struct address_space *" to "const address_space".
145         (breakpoint_location_address_range_overlap): Likewise.
146         (breakpoint_here_p): Likewise.
147         (breakpoint_in_range_p): Likewise.
148         (moribund_breakpoint_here_p): Likewise.
149         (bp_location_inserted_here_p): Likewise.
150         (software_breakpoint_inserted_here_p): Likewise.
151         (hardware_breakpoint_inserted_here_p): Likewise.
152         (hardware_watchpoint_inserted_in_range): Likewise.
153         (bpstat_check_location): Likewise.
154         (bpstat_stop_status): Likewise.
155         (breakpoint_address_match): Likewise.
156         (breakpoint_address_match_range): Likewise.
157         (breakpoint_location_address_match): Likewise.
158         (breakpoint_location_address_range_overlap): Likewise.
159         (insert_single_step_breakpoint): Likewise.
160         (breakpoint_has_location_inserted_here): Likewise.
161         (single_step_breakpoint_inserted_here_p): Likewise.
162         (pc_at_non_inline_function): Likewise.
163         * breakpoint.h (bpstat_stop_status): Update declaration.
164         (breakpoint_here_p): Likewise.
165         (breakpoint_in_range_p): Likewise.
166         (moribund_breakpoint_here_p): Likewise.
167         (breakpoint_inserted_here_p): Likewise.
168         (software_breakpoint_inserted_here_p): Likewise.
169         (hardware_breakpoint_inserted_here_p): Likewise.
170         (breakpoint_has_location_inserted_here): Likewise.
171         (single_step_breakpoint_inserted_here_p): Likewise.
172         (hardware_watchpoint_inserted_in_range): Likewise.
173         (breakpoint_address_match): Likewise.
174         (insert_single_step_breakpoint): Likewise.
175         (pc_at_non_inline_function): Likewise.
176         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
177         * record.c (record_check_stopped_by_breakpoint): Likewise.
178         * record.h (record_check_stopped_by_breakpoint): Likewise.
179         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
180
181 2017-10-25  Yao Qi  <yao.qi@linaro.org>
182
183         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
184         regcache->arch () instead get_regcache_arch.
185         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
186         Likewise.
187         (aarch64_fbsd_store_inferior_registers): Likewise.
188         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
189         (store_gregs_to_thread): Likewise.
190         (fetch_fpregs_from_thread): Likewise.
191         (store_fpregs_to_thread): Likewise.
192         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
193         (aarch64_store_return_value): Likewise.
194         (aarch64_software_single_step): Likewise.
195         * aix-thread.c (aix_thread_wait): Likewise.
196         (supply_reg32): Likewise.
197         (supply_sprs64): Likewise.
198         (supply_sprs32): Likewise.
199         (fill_gprs64): Likewise.
200         (fill_gprs32): Likewise.
201         (fill_sprs64): Likewise.
202         (fill_sprs32): Likewise.
203         (store_regs_user_thread): Likewise.
204         (store_regs_kernel_thread): Likewise.
205         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
206         (alphabsd_store_inferior_registers): Likewise.
207         * alpha-tdep.c (alpha_extract_return_value): Likewise.
208         (alpha_store_return_value): Likewise.
209         (alpha_deal_with_atomic_sequence): Likewise.
210         (alpha_next_pc): Likewise.
211         (alpha_software_single_step): Likewise.
212         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
213         (amd64bsd_store_inferior_registers): Likewise.
214         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
215         Likewise.
216         (amd64_linux_store_inferior_registers): Likewise.
217         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
218         (amd64_collect_native_gregset): Likewise.
219         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
220         (amd64obsd_collect_uthread): Likewise.
221         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
222         (amd64_collect_fpregset): Likewise.
223         (amd64_supply_fxsave): Likewise.
224         (amd64_supply_xsave): Likewise.
225         (amd64_collect_fxsave): Likewise.
226         (amd64_collect_xsave): Likewise.
227         * arc-tdep.c (arc_write_pc): Likewise.
228         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
229         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
230         (arm_fbsd_store_inferior_registers): Likewise.
231         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
232         (store_vfp_regs): Likewise.
233         (arm_linux_fetch_inferior_registers): Likewise.
234         (arm_linux_store_inferior_registers): Likewise.
235         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
236         (arm_linux_sigreturn_next_pc): Likewise.
237         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
238         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
239         (fetch_register): Likewise.
240         (store_register): Likewise.
241         * arm-tdep.c (arm_is_thumb): Likewise.
242         (displaced_in_arm_mode): Likewise.
243         (bx_write_pc): Likewise.
244         (arm_get_next_pcs_addr_bits_remove): Likewise.
245         (arm_software_single_step): Likewise.
246         (arm_extract_return_value): Likewise.
247         (arm_store_return_value): Likewise.
248         (arm_write_pc): Likewise.
249         * bfin-tdep.c (bfin_extract_return_value): Likewise.
250         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
251         (bsd_uthread_store_registers): Likewise.
252         * core-regset.c (fetch_core_registers): Likewise.
253         * corelow.c (get_core_registers): Likewise.
254         * cris-tdep.c (cris_store_return_value): Likewise.
255         (cris_extract_return_value): Likewise.
256         (find_step_target): Likewise.
257         (find_step_target): Likewise.
258         (cris_software_single_step): Likewise.
259         * ctf.c (ctf_fetch_registers): Likewise.
260         * darwin-nat.c (cancel_breakpoint): Likewise.
261         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
262         * frv-tdep.c (frv_extract_return_value): Likewise.
263         * ft32-tdep.c (ft32_store_return_value): Likewise.
264         (ft32_extract_return_value): Likewise.
265         * go32-nat.c (fetch_register): Likewise.
266         (go32_fetch_registers): Likewise.
267         (go32_store_registers): Likewise.
268         (store_register): Likewise.
269         * h8300-tdep.c (h8300_extract_return_value): Likewise.
270         (h8300_store_return_value): Likewise.
271         * hppa-linux-nat.c (fetch_register): Likewise.
272         (store_register): Likewise.
273         (hppa_linux_fetch_inferior_registers): Likewise.
274         (hppa_linux_store_inferior_registers): Likewise.
275         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
276         (i386_darwin_store_inferior_registers): Likewise.
277         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
278         (gnu_store_registers): Likewise.
279         * i386-linux-nat.c (fetch_register): Likewise.
280         (store_register): Likewise.
281         (supply_gregset): Likewise.
282         (fill_gregset): Likewise.
283         (i386_linux_fetch_inferior_registers): Likewise.
284         (i386_linux_store_inferior_registers): Likewise.
285         (i386_linux_resume): Likewise.
286         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
287         Likewise.
288         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
289         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
290         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
291         (i386obsd_collect_uthread): Likewise.
292         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
293         (i386_supply_gregset): Likewise.
294         (i386_collect_gregset): Likewise.
295         (i386_supply_fpregset): Likewise.
296         (i386_collect_fpregset): Likewise.
297         (i386_mpx_bd_base): Likewise.
298         * i386-v4-nat.c (supply_fpregset): Likewise.
299         (fill_fpregset): Likewise.
300         * i387-tdep.c (i387_supply_fsave): Likewise.
301         (i387_collect_fsave): Likewise.
302         (i387_supply_fxsave): Likewise.
303         (i387_collect_fxsave): Likewise.
304         (i387_supply_xsave): Likewise.
305         (i387_collect_xsave): Likewise.
306         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
307         (ia64_linux_store_registers): Likewise.
308         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
309         (ia64_extract_return_value): Likewise.
310         (ia64_store_return_value): Likewise.
311         (find_func_descr): Likewise.
312         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
313         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
314         (inf_ptrace_store_registers): Likewise.
315         * infrun.c (use_displaced_stepping): Likewise.
316         (displaced_step_prepare_throw): Likewise.
317         (resume): Likewise.
318         (proceed): Likewise.
319         (do_target_wait): Likewise.
320         (adjust_pc_after_break): Likewise.
321         (handle_inferior_event_1): Likewise.
322         (handle_signal_stop): Likewise.
323         (save_infcall_suspend_state): Likewise.
324         (restore_infcall_suspend_state): Likewise.
325         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
326         * jit.c (jit_frame_prev_register): Likewise.
327         * linux-nat.c (save_stop_reason): Likewise.
328         (linux_nat_wait_1): Likewise.
329         (resume_stopped_resumed_lwps): Likewise.
330         * linux-record.c (record_linux_sockaddr): Likewise.
331         (record_linux_msghdr): Likewise.
332         (record_linux_system_call): Likewise.
333         * linux-tdep.c (linux_collect_thread_registers): Likewise.
334         * lm32-tdep.c (lm32_extract_return_value): Likewise.
335         (lm32_store_return_value): Likewise.
336         * m32c-tdep.c (m32c_read_flg): Likewise.
337         (m32c_pseudo_register_read): Likewise.
338         (m32c_pseudo_register_write): Likewise.
339         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
340         (m32r_linux_collect_gregset): Likewise.
341         * m32r-tdep.c (m32r_store_return_value): Likewise.
342         (m32r_extract_return_value): Likewise.
343         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
344         (m68kbsd_collect_fpregset): Likewise.
345         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
346         * m68k-linux-nat.c (fetch_register): Likewise.
347         (old_fetch_inferior_registers): Likewise.
348         (old_store_inferior_registers): Likewise.
349         (store_regs): Likewise.
350         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
351         (m68k_svr4_store_return_value): Likewise.
352         * m88k-tdep.c (m88k_store_arguments): Likewise.
353         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
354         (mi_cmd_data_write_register_values): Likewise.
355         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
356         (mips_fbsd_store_inferior_registers): Likewise.
357         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
358         (mips_fbsd_supply_gregs): Likewise.
359         (mips_fbsd_collect_fpregs): Likewise.
360         (mips_fbsd_collect_gregs): Likewise.
361         (mips_fbsd_supply_fpregset): Likewise.
362         (mips_fbsd_collect_fpregset): Likewise.
363         (mips_fbsd_supply_gregset): Likewise.
364         (mips_fbsd_collect_gregset): Likewise.
365         * mips-linux-nat.c (supply_gregset): Likewise.
366         (fill_gregset): Likewise.
367         (supply_fpregset): Likewise.
368         (fill_fpregset): Likewise.
369         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
370         (mips_fill_gregset): Likewise.
371         (mips_supply_fpregset): Likewise.
372         (mips_fill_fpregset): Likewise.
373         (mips64_supply_gregset): Likewise.
374         (micromips_linux_sigframe_validate): Likewise.
375         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
376         (mipsnbsd_fetch_inferior_registers): Likewise.
377         (mipsnbsd_store_inferior_registers): Likewise.
378         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
379         (mipsnbsd_supply_gregset): Likewise.
380         (mipsnbsd_iterate_over_regset_sections): Likewise.
381         (mipsnbsd_supply_reg): Likewise.
382         (mipsnbsd_supply_fpreg): Likewise.
383         * mips-tdep.c (mips_in_frame_stub): Likewise.
384         (mips_dummy_id): Likewise.
385         (is_octeon_bbit_op): Likewise.
386         (micromips_bc1_pc): Likewise.
387         (extended_mips16_next_pc): Likewise.
388         (mips16_next_pc): Likewise.
389         (deal_with_atomic_sequence): Likewise.
390         * moxie-tdep.c (moxie_process_readu): Likewise.
391         * nios2-tdep.c (nios2_get_next_pc): Likewise.
392         * nto-procfs.c (procfs_store_registers): Likewise.
393         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
394         (ppcfbsd_store_inferior_registers): Likewise.
395         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
396         (fetch_altivec_register): Likewise.
397         (get_spe_registers): Likewise.
398         (fetch_spe_register): Likewise.
399         (fetch_altivec_registers): Likewise.
400         (fetch_all_gp_regs): Likewise.
401         (fetch_all_fp_regs): Likewise.
402         (store_vsx_register): Likewise.
403         (store_altivec_register): Likewise.
404         (set_spe_registers): Likewise.
405         (store_spe_register): Likewise.
406         (store_altivec_registers): Likewise.
407         (store_all_gp_regs): Likewise.
408         (store_all_fp_regs): Likewise.
409         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
410         (ppc_linux_collect_gregset): Likewise.
411         (ppc_canonicalize_syscall): Likewise.
412         (ppc_linux_record_signal): Likewise.
413         (ppu2spu_prev_register): Likewise.
414         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
415         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
416         (ppcobsd_store_registers): Likewise.
417         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
418         Likewise.
419         (ppc_ravenscar_generic_store_registers): Likewise.
420         * procfs.c (procfs_fetch_registers): Likewise.
421         (procfs_store_registers): Likewise.
422         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
423         (ravenscar_store_registers): Likewise.
424         (ravenscar_prepare_to_store): Likewise.
425         * record-btrace.c (record_btrace_fetch_registers): Likewise.
426         * record-full.c (record_full_wait_1): Likewise.
427         (record_full_registers_change): Likewise.
428         (record_full_store_registers): Likewise.
429         (record_full_core_fetch_registers): Likewise.
430         (record_full_save): Likewise.
431         (record_full_goto_insn): Likewise.
432         * regcache.c (regcache_register_size): Likewise.
433         (get_regcache_arch): Remove.
434         (regcache_read_pc): Likewise.
435         * regcache.h (get_regcache_arch): Remove.
436         * remote-sim.c (gdbsim_fetch_register): Likewise.
437         (gdbsim_store_register): Likewise.
438         * remote.c (fetch_register_using_p): Likewise.
439         (send_g_packet): Likewise.
440         (remote_prepare_to_store): Likewise.
441         (store_registers_using_G): Likewise.
442         * reverse.c (save_bookmark_command): Likewise.
443         (goto_bookmark_command): Likewise.
444         * rs6000-aix-tdep.c (branch_dest): Likewise.
445         * rs6000-nat.c (rs6000_ptrace64): Likewise.
446         (fetch_register): Likewise.
447         * rs6000-tdep.c (ppc_supply_reg): Likewise.
448         (ppc_collect_reg): Likewise.
449         (ppc_collect_gregset): Likewise.
450         (ppc_collect_fpregset): Likewise.
451         (ppc_collect_vsxregset): Likewise.
452         (ppc_collect_vrregset): Likewise.
453         (ppc_displaced_step_hw_singlestep): Likewise.
454         (rs6000_pseudo_register_read): Likewise.
455         (rs6000_pseudo_register_write): Likewise.
456         * s390-linux-nat.c (supply_gregset): Likewise.
457         (fill_gregset): Likewise.
458         (s390_linux_fetch_inferior_registers): Likewise.
459         * s390-linux-tdep.c (s390_write_pc): Likewise.
460         (s390_software_single_step): Likewise.
461         (s390_all_but_pc_registers_record): Likewise.
462         (s390_linux_syscall_record): Likewise.
463         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
464         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
465         (shnbsd_store_inferior_registers): Likewise.
466         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
467         (sh_extract_return_value_fpu): Likewise.
468         (sh_store_return_value_nofpu): Likewise.
469         (sh_corefile_supply_regset): Likewise.
470         (sh_corefile_collect_regset): Likewise.
471         * sh64-tdep.c (sh64_extract_return_value): Likewise.
472         (sh64_store_return_value): Likewise.
473         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
474         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
475         (sparc_store_inferior_registers): Likewise.
476         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
477         (sparc_ravenscar_prepare_to_store): Likewise.
478         * sparc-tdep.c (sparc32_store_arguments): Likewise.
479         (sparc_analyze_control_transfer): Likewise.
480         (sparc_step_trap): Likewise.
481         (sparc_software_single_step): Likewise.
482         (sparc32_gdbarch_init): Likewise.
483         (sparc_supply_rwindow): Likewise.
484         (sparc_collect_rwindow): Likewise.
485         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
486         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
487         (sparc64nbsd_collect_gregset): Likewise.
488         (sparc64nbsd_supply_fpregset): Likewise.
489         (sparc64nbsd_collect_fpregset): Likewise.
490         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
491         (sparc64_supply_gregset): Likewise.
492         (sparc64_collect_gregset): Likewise.
493         (sparc64_supply_fpregset): Likewise.
494         (sparc64_collect_fpregset): Likewise.
495         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
496         * spu-tdep.c (spu_unwind_sp): Likewise.
497         (spu2ppu_prev_register): Likewise.
498         (spu_memory_remove_breakpoint): Likewise.
499         * stack.c (return_command): Likewise.
500         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
501         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
502         * tracefile.c (trace_save_ctf): Likewise.
503         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
504         (do_windows_store_inferior_registers): Likewise.
505         (windows_resume): Likewise.
506         * xtensa-linux-nat.c (fill_gregset): Likewise.
507         (supply_gregset_reg): Likewise.
508         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
509         (xtensa_register_read_masked): Likewise.
510         (xtensa_supply_gregset): Likewise.
511         (xtensa_extract_return_value): Likewise.
512         (xtensa_store_return_value): Likewise.
513
514 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
515
516         * doublest.c (floatformat_from_string): New function.
517         * doublest.h (floatformat_from_string): Add prototype.
518
519         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
520         (OP_FLOAT): ... this.
521         * expression.h: Do not include "doublest.h".
522         (union exp_element): Replace doubleconst and decfloatconst by
523         new element floatconst.
524         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
525         (ada_evaluate_subexp): Likewise.
526         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
527         OP_DOUBLE and OP_DECFLOAT.
528         * expprint.c (print_subexp_standard): Likewise.
529         (dump_subexp_body_standard): Likewise.
530         * breakpoint.c (watchpoint_exp_is_const): Likewise.
531
532         * parse.c: Include "dfp.h".
533         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
534         (write_exp_elt_floatcst): New function.
535         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
536         and OP_DECFLOAT.
537         (operator_check_standard): Likewise.
538         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
539         Return target format buffer instead of host DOUBLEST.
540         Use floatformat_from_string and decimal_from_string to parse
541         either binary or decimal floating-point types.
542         (parse_c_float): Remove.
543         * parser-defs.h: Do not include "doublest.h".
544         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
545         (write_exp_elt_floatcst): Add prototype.
546         (parse_float): Update prototype.
547         (parse_c_float): Remove.
548
549         * c-exp.y: Do not include "dfp.h".
550         (typed_val_float): Use byte buffer instead of DOUBLEST.
551         (typed_val_decfloat): Remove.
552         (DECFLOAT): Remove.
553         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
554         (parse_number): Update to new parse_float interface.
555         Parse suffixes and determine type before calling parse_float.
556         Handle decimal and binary FP types the same way.
557
558         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
559         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
560         (parse_number): Update to new parse_float interface.
561         Parse suffixes and determine type before calling parse_float.
562
563         * f-exp.y: Replace dval by typed_val_float.
564         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
565         (parse_number): Use parse_float instead of atof.
566
567         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
568         (parse_go_float): Remove.
569         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
570         (parse_number): Call parse_float instead of parse_go_float.
571         Parse suffixes and determine type before calling parse_float.
572
573         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
574         (FLOAT): 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         * m2-exp.y: Replace dval by byte buffer val.
579         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
580         (parse_number): Call parse_float instead of atof.
581
582         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
583         (lex_number): Call parse_float instead of strtod.
584         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
585         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
586         Use write_exp_elt_floatcst.
587         (unit_testing): Remove static variable.
588         (rust_type): Do not check unit_testing.
589         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
590
591         * ada-exp.y (type_float, type_double): Remove.
592         (typed_val_float): Use byte buffer instead of DOUBLEST.
593         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
594         * ada-lex.l (processReal): Use parse_float instead of sscanf.
595
596 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
597
598         * aarch64-tdep.h (enum aarch64_regnum): Remove.
599         * arch/aarch64.h: New file.
600
601 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
602
603         * dfp.h (decimal_from_string): Use const reference for argument.
604         * dfp.c (decimal_from_string): Likewise.
605
606 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
607
608         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
609         * sh64-tdep.c (sh64_do_fp_register): Likewise.
610         * mips-tdep.c (mips_print_fp_register): Likewise.
611
612 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
613
614         * common/format.h (enum argclass): Replace decfloat_arg by
615         dec32float_arg, dec64float_arg, and dec128float_arg.
616         * common/format.c (parse_format_string): Update to return
617         new decimal float argument classes.
618
619         * printcmd.c (printf_decfloat): Rename to ...
620         (printf_floating): ... this.  Add argclass argument, and use it
621         instead of parsing the format string again.  Add support for
622         binary floating-point values, using floatformat_to_string.
623         Convert value to the target format if it doesn't already match.
624         (ui_printf): Call printf_floating instead of printf_decfloat,
625         also for double_arg / long_double_arg.  Pass argclass.
626
627         * dfp.c (decimal_to_string): Add format string argument.
628         * dfp.h (decimal_to_string): Likewise.
629
630         * doublest.c (floatformat_to_string): Add format string argument.
631         * doublest.h (floatformat_to_string): Likewise.
632
633 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
634
635         * doublest.c (floatformat_precision): New routine.
636         (floatformat_to_string): Likewise.
637         * doublest.c (floatformat_to_string): Add prototype.
638
639         * printcmd.c (print_scalar_formatted): Only call print_floating
640         on floating-point types.
641         * valprint.c: Do not include "floatformat.h".
642         (generic_val_print_decfloat): Remove.
643         (generic_val_print): Call generic_val_print_float for both
644         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
645         (print_floating): Use floatformat_to_string.  Handle decimal float.
646         (print_decimal_floating): Remove, merge into floatformat_to_string.
647         * value.h (print_decimal_floating): Remove.
648
649         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
650
651 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
652
653         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
654
655 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
656
657         * memattr.h: Don't include vec.h.
658         (struct mem_attrib): Initialize fields.
659         <unknown>: New static method.
660         (struct mem_region): Add constructors, operator<, initialize
661         fields.
662         * memattr.c: Include algorithm.
663         (default_mem_attrib, unknown_mem_attrib): Remove.
664         (user_mem_region_list): New global.
665         (target_mem_region_list, mem_region_list): Change type to
666         std::vector<mem_region>.
667         (mem_use_target): Now a function.
668         (target_mem_regions_valid): Change type to bool.
669         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
670         (require_user_regions): Adjust.
671         (require_target_regions): Adjust.
672         (create_mem_region): Adjust.
673         (lookup_mem_region): Adjust.
674         (invalidate_target_mem_regions): Adjust.
675         (mem_clear): Rename to...
676         (user_mem_clear): ... this, and adjust.
677         (mem_command): Adjust.
678         (info_mem_command): Adjust.
679         (mem_enable, enable_mem_command, mem_disable,
680         disable_mem_command): Adjust.
681         (mem_delete): Adjust.
682         (delete_mem_command): Adjust.
683         * memory-map.h (parse_memory_map): Return an std::vector.
684         * memory-map.c (parse_memory_map): Likewise.
685         (struct memory_map_parsing_data): Add constructor.
686         <memory_map>: Point to std::vector.
687         (memory_map_start_memory): Adjust.
688         (memory_map_end_memory): Adjust.
689         (memory_map_end_property): Adjust.
690         (clear_result): Remove.
691         * remote.c (remote_memory_map): Return an std::vector.
692         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
693         Remove.
694         (target_debug_print_mem_region_vector): New.
695         * target-delegates.c: Regenerate.
696         * target.h (mem_region_vector): New typedef.
697         (to_memory_map): Return mem_region_vector.
698         (target_memory_map): Return an std::vector.
699         * target.c (target_memory_map): Return an std::vector.
700         (flash_erase_command): Adjust.
701
702 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
703
704         * memory-map.c (struct memory_map_parsing_data) <property_name>:
705         Change type to std::string.
706         (memory_map_start_property): Adjust.
707         (memory_map_end_property): Adjust.
708
709 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
710
711         * infrun.h: Include common/byte-vector.h.
712         (struct displaced_step_closure): New struct.
713         (struct buf_displaced_step_closure): New struct.
714         * infrun.c (displaced_step_closure::~displaced_step_closure):
715         Provide default implementation.
716         (displaced_step_clear): Deallocate step closure with delete.
717         * aarch64-tdep.c (displaced_step_closure): Rename to ...
718         (aarch64_displaced_step_closure): ... this, extend
719         displaced_step_closure.
720         (aarch64_displaced_step_data) <dsc>: Change type to
721         aarch64_displaced_step_closure.
722         (aarch64_displaced_step_copy_insn): Adjust to type change, use
723         unique_ptr.
724         (aarch64_displaced_step_fixup): Add cast for displaced step
725         closure.
726         * amd64-tdep.c (displaced_step_closure): Rename to ...
727         (amd64_displaced_step_closure): ... this, extend
728         displaced_step_closure.
729         <insn_buf>: Change type to std::vector<gdb_byte>.
730         <max_len>: Remove.
731         (fixup_riprel): Change type of DSC parameter, adjust to type
732         change of insn_buf.
733         (fixup_displaced_copy): Change type of DSC parameter.
734         (amd64_displaced_step_copy_insn): Instantiate
735         amd64_displaced_step_closure.
736         (amd64_displaced_step_fixup): Add cast for closure type, adjust
737         to type change of insn_buf.
738         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
739         parameter DSC.
740         (arm_linux_copy_svc): Likewise.
741         (cleanup_kernel_helper_return): Likewise.
742         (arm_catch_kernel_helper_return): Likewise.
743         (arm_linux_displaced_step_copy_insn): Instantiate
744         arm_displaced_step_closure.
745         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
746         (displaced_read_reg): Change type of parameter DSC.
747         (branch_write_pc): Likewise.
748         (load_write_pc): Likewise.
749         (alu_write_pc): Likewise.
750         (displaced_write_reg): Likewise.
751         (arm_copy_unmodified): Likewise.
752         (thumb_copy_unmodified_32bit): Likewise.
753         (thumb_copy_unmodified_16bit): Likewise.
754         (cleanup_preload): Likewise.
755         (install_preload): Likewise.
756         (arm_copy_preload): Likewise.
757         (thumb2_copy_preload): Likewise.
758         (install_preload_reg): Likewise.
759         (arm_copy_preload_reg): Likewise.
760         (cleanup_copro_load_store): Likewise.
761         (install_copro_load_store): Likewise.
762         (arm_copy_copro_load_store) Likewise.
763         (thumb2_copy_copro_load_store): Likewise.
764         (cleanup_branch): Likewise.
765         (install_b_bl_blx): Likewise.
766         (arm_copy_b_bl_blx): Likewise.
767         (thumb2_copy_b_bl_blx): Likewise.
768         (thumb_copy_b): Likewise.
769         (install_bx_blx_reg): Likewise.
770         (arm_copy_bx_blx_reg): Likewise.
771         (thumb_copy_bx_blx_reg): Likewise.
772         (cleanup_alu_imm): Likewise.
773         (arm_copy_alu_imm): Likewise.
774         (thumb2_copy_alu_imm): Likewise.
775         (cleanup_alu_reg): Likewise.
776         (install_alu_reg): Likewise.
777         (arm_copy_alu_reg): Likewise.
778         (thumb_copy_alu_reg): Likewise.
779         (cleanup_alu_shifted_reg): Likewise.
780         (install_alu_shifted_reg): Likewise.
781         (arm_copy_alu_shifted_reg): Likewise.
782         (cleanup_load): Likewise.
783         (cleanup_store): Likewise.
784         (arm_copy_extra_ld_st): Likewise.
785         (install_load_store): Likewise.
786         (thumb2_copy_load_literal): Likewise.
787         (thumb2_copy_load_reg_imm): Likewise.
788         (arm_copy_ldr_str_ldrb_strb): Likewise.
789         (cleanup_block_load_all): Likewise.
790         (cleanup_block_store_pc): Likewise.
791         (cleanup_block_load_pc): Likewise.
792         (arm_copy_block_xfer): Likewise.
793         (thumb2_copy_block_xfer): Likewise.
794         (cleanup_svc): Likewise.
795         (install_svc): Likewise.
796         (arm_copy_svc): Likewise.
797         (thumb_copy_svc): Likewise.
798         (arm_copy_undef): Likewise.
799         (thumb_32bit_copy_undef): Likewise.
800         (arm_copy_unpred): Likewise.
801         (arm_decode_misc_memhint_neon): Likewise.
802         (arm_decode_unconditional): Likewise.
803         (arm_decode_miscellaneous): Likewise.
804         (arm_decode_dp_misc): Likewise.
805         (arm_decode_ld_st_word_ubyte): Likewise.
806         (arm_decode_media): Likewise.
807         (arm_decode_b_bl_ldmstm): Likewise.
808         (arm_decode_ext_reg_ld_st): Likewise.
809         (thumb2_decode_dp_shift_reg): Likewise.
810         (thumb2_decode_ext_reg_ld_st): Likewise.
811         (arm_decode_svc_copro): Likewise.
812         (thumb2_decode_svc_copro): Likewise.
813         (install_pc_relative): Likewise.
814         (thumb_copy_pc_relative_16bit): Likewise.
815         (thumb_decode_pc_relative_16bit): Likewise.
816         (thumb_copy_pc_relative_32bit): Likewise.
817         (thumb_copy_16bit_ldr_literal): Likewise.
818         (thumb_copy_cbnz_cbz): Likewise.
819         (thumb2_copy_table_branch): Likewise.
820         (cleanup_pop_pc_16bit_all): Likewise.
821         (thumb_copy_pop_pc_16bit): Likewise.
822         (thumb_process_displaced_16bit_insn): Likewise.
823         (decode_thumb_32bit_ld_mem_hints): Likewise.
824         (thumb_process_displaced_32bit_insn): Likewise.
825         (thumb_process_displaced_insn): Likewise.
826         (arm_process_displaced_insn): Likewise.
827         (arm_displaced_init_closure): Likewise.
828         (arm_displaced_step_fixup): Add cast for closure.
829         * arm-tdep.h: Include infrun.h.
830         (displaced_step_closure): Rename to ...
831         (arm_displaced_step_closure): ... this, extend
832         displaced_step_closure.
833         <u::svc::copy_svc_os>: Change type of parameter DSC.
834         <cleanup>: Likewise.
835         (arm_process_displaced_insn): Likewise.
836         (arm_displaced_init_closure): Likewise.
837         (displaced_read_reg): Likewise.
838         (displaced_write_reg): Likewise.
839         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
840         Adjust.
841         * i386-tdep.h: Include infrun.h.
842         (i386_displaced_step_closure): New typedef.
843         * i386-tdep.c (i386_displaced_step_copy_insn): Use
844         i386_displaced_step_closure.
845         (i386_displaced_step_fixup): Adjust.
846         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
847         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
848         and unique_ptr.
849         (ppc_displaced_step_fixup): Adjust.
850         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
851         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
852         and unique_ptr.
853         (s390_displaced_step_fixup): Adjust.
854
855 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
856
857         * interps.h (interp_resume, interp_suspend, interp_set_temp):
858         Remove declarations.
859
860 2017-10-20  Tom Tromey  <tom@tromey.com>
861
862         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
863         std::vector.
864         (gdb_bfd_record_inclusion): Update.
865         (bfdp): Remove typedef.
866
867 2017-10-20  Tom Tromey  <tom@tromey.com>
868
869         * gdb_bfd.c (gdb_bfd_ref): Use new.
870         (struct gdb_bfd_data): Add constructor, destructor, and member
871         initializers.
872         (gdb_bfd_unref): Use delete.
873
874 2017-10-20  Tom Tromey  <tom@tromey.com>
875
876         * exec.c (exec_file_attach): Use new_bfd_ref.
877         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
878         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
879         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
880         new_bfd_ref.
881         * gdb_bfd.h (new_bfd_ref): New function.
882
883 2017-10-20  Pedro Alves  <palves@redhat.com>
884
885         * main.c (captured_command_loop): Add attribute noinline.
886
887 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
888
889         * interps.c (struct interp_factory): Add constructor.
890         (interp_factory_p): Remove typedef.
891         (DEF_VEC_P(interp_factory_p)): Remove.
892         (interpreter_factories): Change type to std::vector.
893         (interp_factory_register): Adjust.
894         (interp_lookup): Adjust.
895         (interpreter_completer): Adjust.
896
897 2017-10-19  Tom Tromey  <tom@tromey.com>
898
899         * break-catch-syscall.c (catch_syscall_completer): Use
900         std::string, gdb::unique_xmalloc_ptr.
901
902 2017-10-19  Tom Tromey  <tom@tromey.com>
903
904         * infcall.c (call_function_by_hand_dummy): Use std::string.
905
906 2017-10-19  Tom Tromey  <tom@tromey.com>
907
908         * mi/mi-main.c (mi_cmd_execute): Update.
909         * top.h (prepare_execute_command): Return scoped_value_mark.
910         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
911         Add move constructor.
912         * top.c (prepare_execute_command): Return scoped_value_mark.
913         (execute_command): Update.
914
915 2017-10-19  Pedro Alves  <palves@redhat.com>
916
917         * xml-support.c (xml_fetch_content_from_file): Check fread's
918         return.
919
920 2017-10-19  Pedro Alves  <palves@redhat.com>
921
922         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
923         async.
924         (handle_error_fd): New function.
925         (ser_base_async): Add/delete an event loop file handler for
926         error_fd.
927
928 2017-10-19  Pedro Alves  <palves@redhat.com>
929
930         * xml-support.c (xml_fetch_content_from_file): Don't read in
931         chunks.  Instead use fseek to determine the file's size, and read
932         it in one go.
933
934 2017-11-18  Keith Seitz  <keiths@redhat.com>
935
936         * c-exp.y (oper): Canonicalize conversion operators of user-defined
937         types.
938         Add whitespace to front of type name.
939
940 2017-10-18  Keith Seitz  <keiths@redhat.com>
941
942         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
943         DW_AT_accessibility.
944
945 2017-10-18  Yao Qi  <yao.qi@linaro.org>
946
947         * features/tic6x-c62x-linux.c: Remove.
948
949 2017-10-17  Tom Tromey  <tom@tromey.com>
950
951         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
952         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
953         (do_mixed_source_and_assembly): Likewise.
954
955 2017-10-17  Tom Tromey  <tom@tromey.com>
956
957         * regcache.c (regcache::xfer_part): Remove assertion.
958
959 2017-10-17  Pedro Alves  <palves@redhat.com>
960
961         * xml-support.c (xml_fetch_content_from_file): Call
962         unique_ptr::release() instead unique_ptr::get() when passing
963         through xrealloc.
964
965 2017-10-17  Yao Qi  <yao.qi@linaro.org>
966
967         * regcache.c (regcache::xfer_part): Remove parameters read and
968         write, add parameter is_raw.  All callers are updated.
969
970 2017-10-16  Keith Seitz  <keiths@redhat.com>
971
972         * c-typeprint.c (enum access_specifier): Moved here from
973         c_type_print_base.
974         (output_access_specifier): New function.
975         (c_type_print_base): Consider typedefs when assessing
976         whether access labels are needed.
977         Use output_access_specifier as needed.
978         Output access specifier for typedefs, if needed.
979         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
980         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
981         fields.
982         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
983         accessor macros.
984
985 2017-10-16  Tom Tromey  <tom@tromey.com>
986
987         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
988         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
989         * target.c (target_fileio_read_stralloc): Update.
990         * sparc64-tdep.c (adi_is_addr_mapped): Update.
991         * target.h (target_fileio_read_stralloc): Return
992         unique_xmalloc_ptr.
993
994 2017-10-16  Tom Tromey  <tom@tromey.com>
995
996         * xml-syscall.c (xml_init_syscalls_info): Update.
997         * xml-support.c (xinclude_start_include): Update.
998         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
999         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1000         (xml_fetch_content_from_file): Likewise.
1001         * osdata.c (get_osdata): Update.
1002         * target.h (target_read_stralloc, target_get_osdata): Return
1003         unique_xmalloc_ptr.
1004         * solib-aix.c (solib_aix_get_library_list): Update.
1005         * solib-target.c (solib_target_current_sos): Update.
1006         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1007         * xml-tdesc.c (fetch_available_features_from_target): Update.
1008         (target_fetch_description_xml): Update.
1009         (file_read_description_xml): Update.
1010         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1011         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1012         (remote_pid_to_exec_file): Update.
1013         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1014         (target_get_osdata): Likewise.
1015
1016 2017-10-16  Tom Tromey  <tom@tromey.com>
1017
1018         * remote.c (remote_register_number_and_offset): Use std::vector.
1019         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1020         (putpkt_binary): Use gdb::def_vector.
1021         (compare_sections_command): Use gdb::byte_vector.
1022
1023 2017-10-16  Tom Tromey  <tom@tromey.com>
1024
1025         * ppc-linux-nat.c (hwdebug_insert_point): Use
1026         gdb::unique_xmalloc_ptr, XDUP.
1027
1028 2017-10-16  Tom Tromey  <tom@tromey.com>
1029
1030         * probe.c (parse_probes): Use std::string.
1031         (info_probes_for_ops, enable_probes_command)
1032         (disable_probes_command): Remove cleanups.
1033
1034 2017-10-16  Tom Tromey  <tom@tromey.com>
1035
1036         * buildsym.c (block_compar): Remove.
1037         (end_symtab_get_static_block): Use std::vector.
1038
1039 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1040
1041         * memrange.h (struct mem_range): Define operator< and operator==.
1042         (mem_range_s): Remove.
1043         (DEF_VEC_O (mem_range_s)): Remove.
1044         (normalize_mem_ranges): Change parameter type to std::vector.
1045         * memrange.c (compare_mem_ranges): Remove.
1046         (normalize_mem_ranges): Change parameter type to std::vector,
1047         adjust to vector change.
1048         * exec.c (section_table_available_memory): Return vector, remove
1049         parameter.
1050         (section_table_read_available_memory): Adjust to std::vector
1051         change.
1052         * remote.c (remote_read_bytes): Adjust to std::vector
1053         change.
1054         * tracepoint.h (traceframe_available_memory): Change parameter
1055         type to std::vector.
1056         * tracepoint.c (traceframe_available_memory): Change parameter
1057         type to std::vector, adjust.
1058         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1059         std::vector change.
1060         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1061         unittests/memrange-selftests.c.
1062         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1063         * gdb/unittests/memrange-selftests.c: New file.
1064
1065 2017-10-16  Pedro Alves  <palves@redhat.com>
1066
1067         * elfread.c (probe_key_free): Rename range-for variable.
1068         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1069         (find_probe_by_pc, collect_probes): Rename range-for variable.
1070
1071 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1072
1073         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1074         * features/tic6x-c62x.c: Remove.
1075         * features/tic6x-c64x-linux.c: Remove.
1076         * features/tic6x-c64x.c: Remove.
1077         * features/tic6x-c64xp-linux.c: Remove.
1078         * features/tic6x-c64xp.c: Remove.
1079         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1080         initialize_tdesc_tic6x_*_linux functions.
1081         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1082         initialize_tdesc_tic6x_* functions.
1083
1084 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1085
1086         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1087         tic6x-c62x.
1088         * regformats/tic6x-c62x.dat: Remove.
1089         * regformats/tic6x-c64x.dat: Remove.
1090         * regformats/tic6x-c64xp.dat: Remove.
1091
1092 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1093
1094         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1095         (the !HAVE_LIBEXPAT version).
1096
1097 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1098
1099         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1100         const.
1101
1102 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1103
1104         * target.h: Include tracepoint.h.
1105         (enum trace_find_type): Move to tracepoint.h.
1106         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1107         * tracepoint.h: Don't include target.h
1108         (enum trace_find_type): Move from target.h.
1109         (parse_traceframe_info): Return a unique ptr.
1110         * tracepoint.c (current_traceframe_info): Change type to unique
1111         ptr.
1112         (free_traceframe_info): Remove.
1113         (clear_traceframe_info): Don't manually free
1114         current_traceframe_info.
1115         (free_result): Remove.
1116         (parse_traceframe_info): Return a unique ptr.
1117         (get_traceframe_info): Adjust to unique ptr.
1118         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1119         * remote.c (remote_traceframe_info): Return a unique ptr.
1120         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1121         ptr.
1122         * target-debug.h (target_debug_print_traceframe_info_up): New
1123         macro.
1124         * target-delegates.c: Regenerate.
1125
1126 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1127
1128         * memrange.h (struct mem_range): Add constructors.
1129         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1130         std::vector<mem_range>.
1131         * tracepoint.c (free_traceframe_info): Don't manually free
1132         vector.
1133         (traceframe_info_start_memory): Adjust to vector change.
1134         (traceframe_available_memory): Likewise.
1135         * tracefile-tfile.c (build_traceframe_info): Likewise.
1136         * ctf.c (ctf_traceframe_info): Likewise.
1137
1138 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1139
1140         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1141         std::vector<int>.
1142         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1143         (traceframe_info_start_tvar): Adjust to vector change.
1144         (parse_traceframe_info): Allocate with new.
1145         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1146         vector change.
1147         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1148         change.
1149         tfile_traceframe_info): Allocate with new.
1150         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1151         change.
1152
1153 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1154
1155         * tracepoint.c (traceframe_info): Rename to...
1156         (current_traceframe_info): ...this.
1157         (clear_traceframe_info): Adjust.
1158         (get_traceframe_info): Adjust.
1159
1160 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1161
1162         * nat/linux-osdata.c: Include algorithm.
1163         (compare_processes): Remove.
1164         (struct pid_pgid_entry): New struct.
1165         (linux_xfer_osdata_processgroups): Use std::vector instead of
1166         XNEWVEC.
1167
1168 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1169
1170         * objfiles.h: Don't include symfile.h.
1171         (struct partial_symbol): Remove forward-declaration.
1172         (struct objfile) <global_psymbols, static_psymbols>: Change type
1173         to std::vector<partial_symbol *>.
1174         * objfiles.c (objfile::objfile): Don't memset those fields.
1175         (objfile::~objfile): Don't free those fields.
1176         * psympriv.h (struct psymbol_allocation_list): Remove
1177         forward-declaration.
1178         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1179         to std::vector.
1180         (start_psymtab_common): Change parameters to std::vector.
1181         * psymtab.c: Include algorithm.
1182         (require_partial_symbols): Call shrink_to_fit.
1183         (find_pc_sect_psymbol): Adjust to vector change.
1184         (match_partial_symbol): Likewise.
1185         (lookup_partial_symbol): Likewise.
1186         (psym_relocate): Likewise.
1187         (dump_psymtab): Likewise.
1188         (recursively_search_psymtabs): Likewise.
1189         (compare_psymbols): Remove.
1190         (sort_pst_symbols): Adjust to vector change.
1191         (start_psymtab_common): Likewise.
1192         (end_psymtab_common): Likewise.
1193         (psymbol_bcache_full): De-constify return value.
1194         (add_psymbol_to_bcache): Likewise.
1195         (extend_psymbol_list): Remove.
1196         (append_psymbol_to_list): Adjust to vector change.
1197         (add_psymbol_to_list): Likewise.
1198         (init_psymbol_list): Likewise.
1199         (maintenance_info_psymtabs): Likewise.
1200         (maintenance_check_psymtabs): Likewise.
1201         * symfile.h (struct psymbol_allocation_list): Remove.
1202         * symfile.c (reread_symbols): Adjust to vector change.
1203         * dbxread.c (start_psymtab): Change type of parameters.
1204         (dbx_symfile_read): Adjust to vector change.
1205         (read_dbx_symtab): Likewise.
1206         (start_psymtab): Change type of parameters.
1207         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1208         (create_partial_symtab): Likewise.
1209         (add_partial_symbol): Likewise.
1210         (write_one_signatured_type): Likewise.
1211         (recursively_write_psymbols): Likewise.
1212         * mdebugread.c (parse_partial_symbols): Likewise.
1213         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1214         (scan_xcoff_symtab): Adjust to vector change.
1215         (xcoff_initial_scan): Likewise.
1216
1217 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1218
1219         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1220
1221 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1222
1223         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1224         Remove s390x-*-expedite, add s390x-expedite.
1225
1226 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1227
1228         * features/s390-gs-linux64.c: Regenerated.
1229         * features/s390x-gs-linux64.c: Regenerated.
1230
1231 2017-10-13  Tom Tromey  <tom@tromey.com>
1232
1233         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1234         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1235         delete.
1236         * symfile.c (symbol_file_add_with_addrs): Use new.
1237         (symbol_file_add_separate): Update comment.
1238         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1239         * jit.c (jit_object_close_impl): Use new.
1240         (jit_unregister_code): Use delete.
1241         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1242         (~objfile): Rename from free_objfile.
1243         (free_objfile_separate_debug, do_free_objfile_cleanup)
1244         (free_all_objfiles, objfile_purge_solibs): Use delete.
1245         * objfiles.h (struct objfile): Add constructor and destructor.
1246         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1247         (allocate_objfile, free_objfile): Don't declare.
1248         (struct objstats): Add initializers.
1249
1250 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1251
1252         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1253         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1254         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1255         * gdbarch.h: Regenerate.
1256         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1257         Adjust comment.
1258         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1259         (i386_displaced_step_fixup): Adjust comment.
1260         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1261
1262 2017-10-12  Tom Tromey  <tom@tromey.com>
1263
1264         * prologue-value.h (pv_area::store_would_trash): Return bool.
1265         (pv_area::find_reg): Likewise.
1266         * prologue-value.c (pv_area::store_would_trash): Return bool.
1267         (pv_area::find_reg): Likewise.
1268
1269 2017-10-12  Tom Tromey  <tom@tromey.com>
1270
1271         * s390-linux-tdep.c (s390_store, s390_load)
1272         (s390_check_for_saved, s390_analyze_prologue): Update.
1273         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1274         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1275         * prologue-value.h (class pv_area): Move from prologue-value.c.
1276         Change names of members.  Add constructor, destructor, member
1277         functions.
1278         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1279         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1280         (pv_area_fetch, pv_area_scan): Don't declare.
1281         * prologue-value.c (struct pv_area::area_entry): Now member of
1282         pv_area.
1283         (struct pv_area): Move to prologue-value.h.
1284         (pv_area::pv_area): Rename from make_pv_area.
1285         (pv_area::~pv_area): Rename from free_pv_area.
1286         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1287         (clear_entries, find_entry, overlaps, store_would_trash, store)
1288         (fetch, find_reg, scan): Now member of pv_area.
1289         Remove "area" argument.  Update.
1290         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1291         Update.
1292         * mn10300-tdep.c (push_reg, check_for_saved)
1293         (mn10300_analyze_prologue): Update.
1294         * mep-tdep.c (is_arg_spill, check_for_saved)
1295         (mep_analyze_prologue): Update.
1296         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1297         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1298         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1299         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1300         Update.
1301         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1302         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1303
1304 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1305
1306         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1307         * linux-nat.c (linux_nat_delete_thread): New variable.
1308         (lwp_free): Invoke linux_nat_delete_thread if set.
1309         (linux_nat_set_delete_thread): New function.
1310         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1311         thread delete callback.
1312         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1313         (_initialize_arm_linux_nat): Assign thread delete callback.
1314         * s390-linux-nat.c (s390_delete_thread): New function.
1315         (_initialize_s390_nat): Assign thread delete callback.
1316         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1317         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1318         function.
1319         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1320         declaration.
1321         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1322         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1323
1324 2017-10-09  Tom Tromey  <tom@tromey.com>
1325
1326         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1327         std::string.
1328         * tui/tui-layout.c (enum tui_status): Use std::string.
1329
1330 2017-10-11  Tom Tromey  <tom@tromey.com>
1331
1332         * gdbthread.h (thread_command): Constify.
1333         * inferior.h (detach_command): Constify.
1334         * top.h (set_history, show_history): Constify.
1335         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1336         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1337         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1338         * printcmd.c (set_command): Constify.
1339         (non_const_set_command): New function.
1340         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1341         * breakpoint.c (enable_command, disable_command, delete_command)
1342         (catch_command, tcatch_command, set_breakpoint_cmd)
1343         (show_breakpoint_cmd): Constify.
1344         * macrocmd.c (macro_command): Constify.
1345         * infcmd.c (unset_command, kill_command, detach_command)
1346         (info_proc_cmd): Constify.
1347         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1348         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1349         (info_auto_load_cmd): Constify.
1350         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1351         (unset_tdesc_cmd): Constify.
1352         * ada-lang.c (set_ada_command, show_ada_command)
1353         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1354         * guile/guile.c (set_guile_command, show_guile_command)
1355         (info_guile_command): Constify.
1356         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1357         Constify.
1358         * skip.c (skip_command): Constify.
1359         * compile/compile.c (_initialize_compile): Constify.
1360         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1361         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1362         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1363         (maint_btrace_pt_show_cmd): Constify.
1364         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1365         Constify.
1366         * python/python.c (user_show_python, user_set_python): Constify.
1367         * mips-tdep.c (set_mips_command, show_mips_command)
1368         (set_mipsfpu_command): Constify.
1369         * record-btrace.c (cmd_record_btrace_start)
1370         (cmd_set_record_btrace, cmd_show_record_btrace)
1371         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1372         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1373         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1374         Constify.
1375         * symfile.c (overlay_command): Constify.
1376         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1377         * cli/cli-logging.c (set_logging_command, show_logging_command):
1378         Constify.
1379         * cli/cli-dump.c (dump_command, append_command)
1380         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1381         (tekhex_dump_command, binary_dump_command)
1382         (binary_append_command): Constify.
1383         * cli/cli-decode.c (struct cmd_list_element): Change type of
1384         "fun".
1385         * cli/cli-cmds.c (info_command, show_command, set_debug)
1386         (show_debug): Constify.
1387         (show_command): Add non-const overload.
1388         * top.c (set_history, show_history): Constify.
1389         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1390         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1391         * target.c (target_command): Constify.
1392         * sparc64-tdep.c (info_adi_command): Constify.
1393         * record-full.c (cmd_record_full_start): Constify.
1394         (set_record_full_command): Constify.  Fix typo.
1395         (show_record_full_command): Constify.
1396         * thread.c (thread_command, thread_apply_command): Constify.
1397         * memattr.c (dummy_cmd): Constify.
1398         * value.c (function_command): Constify.
1399         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1400         * probe.c (info_probes_command): Constify.
1401         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1402         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1403         (show_thread_cmd, set_thread_default_cmd)
1404         (show_thread_default_cmd): Constify.
1405         (check_empty): Constify.
1406         * tracepoint.c (tfind_command): Constify.
1407         * cp-support.c (maint_cplus_command): Constify.
1408         * windows-tdep.c (info_w32_command): Constify.
1409         * record.c (cmd_record_start, set_record_command)
1410         (show_record_command, info_record_command, cmd_record_goto):
1411         Constify.
1412         * ravenscar-thread.c (set_ravenscar_command)
1413         (show_ravenscar_command): Constify.
1414         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1415         Constify.
1416         (add_internal_problem_command): Remove casts.
1417         * arc-tdep.c (maintenance_print_arc_command): Constify.
1418         * valprint.c (set_print, show_print, set_print_raw)
1419         (show_print_raw): Constify.
1420         * maint.c (maintenance_command, maintenance_info_command)
1421         (maintenance_print_command, maintenance_set_cmd)
1422         (maintenance_show_cmd, set_per_command_cmd)
1423         (show_per_command_cmd, maintenance_check_command): Constify.
1424         * language.c (set_check, show_check): Constify.
1425         * typeprint.c (show_print_type, set_print_type): Constify.
1426         * go32-nat.c (go32_info_dos_command): Constify.
1427
1428 2017-10-11  Tom Tromey  <tom@tromey.com>
1429
1430         * breakpoint.c (prepare_re_set_context): Remove.
1431         (breakpoint_re_set_one): Update.  Don't use cleanups.
1432         (breakpoint_re_set): Use scoped_restore, std::string, and
1433         scoped_restore_current_language.
1434
1435 2017-10-11  Tom Tromey  <tom@tromey.com>
1436
1437         * breakpoint.c (commands_command_1): Use std::string.
1438         (cleanup_executing_breakpoints): Remove.
1439         (bpstat_do_actions_1): Use scoped_restore.
1440         (bpstat_check_watchpoint): Use std::string.
1441         (decode_static_tracepoint_spec): Likewise.
1442         (break_range_command): Likewise.
1443         (watch_command_1): Likewise.
1444         (compare_breakpoints): Change argument types.
1445         (clear_command): Use std::vector.
1446         (cleanup_executing_breakpoints): Remove.
1447         (update_global_location_list): Use unique_xmalloc_ptr.
1448         (strace_command): Remove unused declaration.
1449
1450 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1451
1452         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1453         * NEWS: Mention new FreeBSD/arm native configuration.
1454         * configure.host: Add arm*-*-freebsd*.
1455         * configure.nat: Likewise.
1456         * arm-fbsd-nat.c: New file.
1457
1458 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1459
1460         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1461         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1462         * NEWS: Mention new FreeBSD/arm target.
1463         * configure.tgt: Add arm*-*-freebsd*.
1464         * arm-fbsd-tdep.c: New file.
1465         * arm-fbsd-tdep.h: New file.
1466
1467 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1468
1469         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1470         `gdbarch_elfcore_write_linux_prpsinfo'.
1471         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1472         method.
1473         (elf_internal_linux_prpsinfo): Remove declaration.
1474         * gdbarch.h: Regenerate.
1475         * gdbarch.c: Regenerate.
1476
1477 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1478
1479         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1480         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1481
1482 2017-10-11  Pedro Alves  <palves@redhat.com>
1483
1484         * breakpoint.c (reattach_breakpoints): Delete.
1485         * breakpoint.h (reattach_breakpoints): Delete.
1486
1487 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1488
1489         * symfile.c (registered_sym_fns): Make struct, not typedef.
1490         (DEF_VEC_O (registered_sym_fns)): Remove.
1491         (symtab_fns): Change type to std::vector.
1492         (add_symtab_fns): Adjust.
1493         (find_sym_fns): Adjust.
1494
1495 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1496
1497         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1498         * arc-tdep.h (arc_arch_is_em): New function.
1499         (arc_arch_is_hs): Likewise.
1500
1501 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1502
1503         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1504         parentheses in the declaration.
1505         (macro_lookup_inclusion): Likewise.
1506         (macro_lookup_definition): Likewise.
1507         * p-lang.h (pascal_builtin_types): Likewise.
1508         * tui/tui-data.c (tui_win_list): Likewise.
1509         * tui/tui-data.h (tui_win_list): Likewise.
1510         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1511
1512 2017-10-11  Mark Rages  <markrages@gmail.com>
1513
1514         * target-memory.c (block_boundaries): Fix for block address not
1515         aligned on block size.
1516
1517 2017-10-10  Pedro Alves <palves@redhat.com>
1518             Tom Tromey  <tom@tromey.com>
1519
1520         * breakpoint.c (struct captured_breakpoint_query_args)
1521         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1522         (print_breakpoint): New.
1523         * breakpoint.h (print_breakpoint): Declare.
1524         * common/common-exceptions.h (enum return_reason): Remove
1525         references to catch_exceptions.
1526         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1527         Delete.
1528         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1529         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1530         * gdb.h: Delete.
1531         * gdbthread.h (thread_select): Declare.
1532         * mi/mi-cmd-break.c: Don't include gdb.h.
1533         (breakpoint_notify): Use print_breakpoint.
1534         * mi/mi-cmd-catch.c: Don't include gdb.h.
1535         * mi/mi-interp.c: Don't include gdb.h.
1536         (mi_print_breakpoint_for_event): New.
1537         (mi_breakpoint_created, mi_breakpoint_modified): Use
1538         mi_print_breakpoint_for_event.
1539         * mi/mi-main.c: Don't include gdb.h.
1540         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1541         thread_select instead of gdb_thread_select.
1542         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1543         of using gdb_list_thread_ids.
1544         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1545         FILEIO_ENOSYS here.
1546         (remote_fileio_request): Use TRY/CATCH instead of
1547         catch_exceptions.
1548         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1549         (symbol_file_add_from_memory_wrapper): Delete.
1550         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1551         * thread.c: Don't include gdb.h.
1552         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1553         (thread_alive): Use thread_select.
1554         (do_captured_thread_select): Delete, parts salvaged as ...
1555         (thread_select): ... this new function.
1556         (gdb_thread_select): Delete.
1557
1558 2017-10-10  Pedro Alves  <palves@redhat.com>
1559             Tom Tromey  <tom@tromey.com>
1560
1561         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1562         and reverse logic.
1563         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1564         No longer macros.  Instead ...
1565         (enum wp_check_result): They're now values of this new
1566         enumeration.
1567         (watchpoint_check): Change return type to wp_check_result and
1568         parameter type to bpstat.
1569         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1570         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1571         catch_errors.  Reverse logic of watchpoint_check call.
1572         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1573         pointer as parameter.
1574         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1575         * common/common-exceptions.c (throw_exception_sjlj): Update
1576         comments to avoid mentioning catch_errors.
1577         * exceptions.c (catch_errors): Delete.
1578         * exceptions.h: Update comments to avoid mentioning catch_errors.
1579         (catch_errors_ftype, catch_errors): Delete.
1580         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1581         (hook_stop_stub): Delete.
1582         (restore_selected_frame): Change return type to void, and
1583         parameter type to const frame_id &.
1584         (restore_infcall_control_state): Use TRY/CATCH instead of
1585         catch_errors.
1586         * main.c (captured_command_loop): Return void and remove
1587         parameter.  Remove references to catch_errors.
1588         (captured_main): Use TRY/CATCH instead of catch_errors.
1589         * objc-lang.c (objc_submethod_helper_data)
1590         (find_objc_msgcall_submethod_helper): Delete.
1591         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1592         catch_errors.
1593         * record-full.c (record_full_message): Return void.
1594         (record_full_message_args, record_full_message_wrapper): Delete.
1595         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1596         instead of catch_errors.
1597         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1598         parameter type to int.
1599         * solib-darwin.c (open_symbol_file_object): Ditto.
1600         * solib-dsbt.c (open_symbol_file_object): Ditto.
1601         * solib-frv.c (open_symbol_file_object): Ditto.
1602         * solib-svr4.c (open_symbol_file_object): Ditto.
1603         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1604         * solib.c (update_solib_list): Use TRY/CATCH instead of
1605         catch_errors.
1606         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1607         Change type.
1608         * symmisc.c (struct print_symbol_args): Remove.
1609         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1610         (print_symbol): Change type.
1611         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1612         and remove parameters.
1613         (catch_errors): New.
1614         (get_windows_debug_event): Adjust.
1615
1616 2017-10-09  Tom Tromey  <tom@tromey.com>
1617
1618         * mi/mi-main.c (free_splay_tree): Remove.
1619         (list_available_thread_groups): Use splay_tree_up.
1620         * common/gdb_splay_tree.h: New file.
1621
1622 2017-10-09  Tom Tromey  <tom@tromey.com>
1623
1624         * mi/mi-main.c (do_nothing): Remove.
1625         (list_available_thread_groups): Update.
1626
1627 2017-10-09  Pedro Alves  <palves@redhat.com>
1628
1629         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1630         reading registers when switching context.
1631
1632 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1633
1634         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1635         (fbsd_convert_siginfo): Likewise.
1636         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1637
1638 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1639
1640         * configure.ac (try_guile_versions): Remove guile-2.2.
1641         * configure: Regenerate.
1642
1643 2017-10-09  Tom Tromey  <tom@tromey.com>
1644
1645         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1646         (COMPILE.pre): Use $(CXX).
1647
1648 2017-10-09  Pedro Alves  <palves@redhat.com>
1649
1650         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1651         Use bool.
1652         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1653         * cp-support.h (cp_remove_params): Now returns a
1654         gdb::unique_xmalloc_ptr.
1655         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1656         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1657         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1658         returning a gdb::unique_xmalloc_ptr.
1659         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1660         * stack.c (find_frame_funname): Adjust to cp_remove_params
1661         returning a gdb::unique_xmalloc_ptr.
1662
1663 2017-10-08  Tom Tromey  <tom@tromey.com>
1664
1665         * dwarf2read.c (dwarf2_get_dwz_file): Use
1666         gdb::unique_xmalloc_ptr.
1667         (find_slot_in_mapped_hash): Likewise.
1668         (dwarf2_physname): Likewise.
1669         (create_dwo_unit_in_dwp_v1): Use std::string.
1670         (create_dwo_unit_in_dwp_v2): Likewise.
1671         (lookup_dwo_cutu): Likewise.
1672         (inherit_abstract_dies): Use std::vector.
1673         (read_array_type): Likewise.
1674         (dwarf_decode_macros): Remove unused declaration.
1675         (unsigned_int_compar): Remove.
1676         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1677         (psymtabs_addrmap_cleanup): Remove.
1678
1679 2017-10-08  Tom Tromey  <tom@tromey.com>
1680
1681         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1682         * frame.h (frame_cleanup_after_sniffer): Declare.
1683         (frame_prepare_for_sniffer): Return void.
1684         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1685         type of argument.
1686         (frame_prepare_for_sniffer): Return void.
1687
1688 2017-10-08  Tom Tromey  <tom@tromey.com>
1689
1690         * utils.h (make_cleanup_value_free): Remove.
1691         * utils.c (do_value_free, struct cleanup): Remove.
1692         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1693         Use gdb_value_up.
1694         * value.h (struct value_deleter): New.
1695         (gdb_value_up): New typedef.
1696
1697 2017-10-08  Tom Tromey  <tom@tromey.com>
1698
1699         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1700         (make_cleanup_free_search_symbols): Remove.
1701         (search_symbols): Return std::vector.
1702         (symbol_search::compare_search_syms): Now member of
1703         symbol_search.  Change arguments.
1704         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1705         (symtab_symbol_info, rbreak_command): Update.
1706         * symtab.h (struct symbol_search) <next>: Remove.
1707         Add constructors.
1708         (symbol_search::operator<): New function.
1709         (symbol_search::operator==): New function.
1710         (search_symbols): Remove std::vector.
1711         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1712         (symbol_search::compare_search_syms): Declare.
1713
1714 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1715
1716         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1717         arch/aarch64-insn.o.
1718         Remove one rule.
1719         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1720
1721 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1722
1723         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1724         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1725         arch/arm-linux.o respectively.
1726         * configure.tgt: Likewise.
1727
1728 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1729
1730         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1731         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1732
1733 2017-10-06  Pedro Alves  <palves@redhat.com>
1734
1735         * windows-nat.c: Include <algorithm>.
1736
1737 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1738
1739         * configure.tgt (i386_tobjs): New variable.
1740         (amd64_tobjs): New variable.
1741         Set $cpu_obs and $os_obs.
1742
1743 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1744
1745         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1746         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1747         (clean): Remove object files and dependency files.
1748         (distclean): Remove the directory.
1749         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1750         * configure: Re-generated.
1751         * configure.tgt: Replace amd64.o with arch/amd64.o.
1752
1753 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1754
1755         PR build/22188
1756         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1757         and SETEND.
1758
1759 2017-10-05  Pedro Alves  <palves@redhat.com>
1760
1761         * linux-nat.c (linux_child_follow_fork): When following the parent
1762         and detaching the child, consult the parent thread's architecture
1763         instead of the child's.
1764
1765 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1766
1767         * ax.h: Do not include "doublest.h".
1768         (union agent_val): Remove.
1769
1770 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1771
1772         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1773         (decimal_to_string): Return std::string object.
1774         (decimal_from_string): Accept std::string object.  Return bool.
1775         (decimal_from_integral, decimal_from_doublest): Remove.
1776         (decimal_from_longest): Add prototype.
1777         (decimal_from_ulongest): Likewise.
1778         (decimal_to_longest): Likewise.
1779         (decimal_from_doublest): Likewise.
1780         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1781         (MAX_DECIMAL_STRING): Move here.
1782         (decimal_to_string): Return std::string object.
1783         (decimal_from_string): Accept std::string object.  Return bool.
1784         (decimal_from_integral): Remove, replace by ...
1785         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1786         (decimal_to_longest): New function.
1787         (decimal_from_floating): Remove, replace by ...
1788         (decimal_from_doublest): ... this new function.
1789         (decimal_to_doublest): Update to new decimal_to_string interface.
1790
1791         * value.c (unpack_long): Use decimal_to_longest.
1792         * valops.c (value_cast): Use decimal_from_doublest instead of
1793         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1794         decimal_from_integral.
1795         * valarith.c (value_args_as_decimal): Likewise.
1796         * valprint.c (print_decimal_floating): Update to new
1797         decimal_to_string interface.
1798         * printcmd.c (printf_decfloat): Likewise.
1799         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1800
1801 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1802
1803         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1804         * gdbtypes.c: Include "floatformat.h".
1805         * value.c: Likewise.
1806         * m68k-tdep.c: Likewise.
1807
1808         * findvar.c: Do not include "floatformat.h".
1809         * amd64-darwin-tdep.c: Likewise.
1810         * arm-linux-tdep.c: Likewise.
1811         * i386-darwin-tdep.c: Likewise.
1812         * i387-tdep.c: Likewise.
1813         * m68k-linux-tdep.c: Likewise.
1814         * mep-tdep.c: Likewise.
1815         * mips-tdep.c: Likewise.
1816         * nios2-tdep.c: Likewise.
1817         * s390-linux-tdep.c: Likewise.
1818         * sparc-obsd-tdep.c: Likewise.
1819         * sparc-tdep.c: Likewise.
1820         * sparc64-tdep.c: Likewise.
1821         * spu-tdep.c: Likewise.
1822         * tic6x-tdep.c: Likewise.
1823         * tilegx-tdep.c: Likewise.
1824         * vax-tdep.c: Likewise.
1825         * xstormy16-tdep.c: Likewise.
1826         * xtensa-tdep.c: Likewise.
1827
1828         * top.c: Do not include "doublest.h".
1829         * aarch64-tdep.c: Likewise.
1830         * alpha-tdep.c: Likewise.
1831         * arm-linux-tdep.c: Likewise.
1832         * m68k-linux-tdep.c: Likewise.
1833         * tilegx-tdep.c: Likewise.
1834         * xstormy16-tdep.c: Likewise.
1835
1836 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1837
1838         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1839         (mipsn32_fbsd_sigframe): Define.
1840         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1841         for FreeBSD/mipsn32.
1842
1843 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1844
1845         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1846         AT_HWCAP.
1847
1848 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1849
1850         * MAINTAINERS (Misc): Update my email address.
1851
1852 2017-10-04  Pedro Alves  <palves@redhat.com>
1853
1854         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1855         it instead of target_gdbarch.
1856         (get_remote_state, get_remote_packet_size): Adjust
1857         get_remote_arch_state calls, passing down target_gdbarch
1858         explicitly.
1859         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1860         'gdbarch' and use it instead of target_gdbarch.
1861         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1862         passing down target_gdbarch explicitly.
1863         (struct stop_reply) <arch>: New field.
1864         (remote_parse_stop_reply): Use the stopped thread's architecture,
1865         not the current inferior's.  Save the architecture in the
1866         stop_reply.
1867         (process_stop_reply): Use the stop reply's architecture.
1868         (process_g_packet, remote_fetch_registers)
1869         (remote_prepare_to_store, store_registers_using_G)
1870         (remote_store_registers): Adjust get_remote_arch_state calls,
1871         using the regcache's architecture.
1872         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1873         passing down target_gdbarch explicitly.
1874         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1875         beneath instead of calling target_gdbarch.
1876         * target.c (default_thread_architecture): Use the specified
1877         inferior's architecture, instead of the current inferior's
1878         architecture (via target_gdbarch).
1879
1880 2017-10-04  Pedro Alves  <palves@redhat.com>
1881
1882         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1883         case.
1884         (regcache_print): Handle !target_has_registers here instead.
1885
1886 2017-10-04  Pedro Alves  <palves@redhat.com>
1887
1888         * frame.c (create_test_frame): Delete.
1889         * frame.h (create_test_frame): Delete.
1890         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1891         (class regcache_test): Delete.
1892         (test_target_has_registers, test_target_has_stack)
1893         (test_target_has_memory, test_target_prepare_to_store)
1894         (test_target_store_registers): New functions.
1895         (test_target_ops): New class.
1896         (register_to_value_test): Error out if there's already a
1897         process_stratum (or higher) target pushed.  Create a fuller mock
1898         environment, with mock target_ops, inferior, address space, thread
1899         and inferior_ptid.
1900         * progspace.c (struct address_space): Move to ...
1901         * progspace.h (struct address_space): ... here.
1902         * regcache.h (regcache::~regcache, regcache::raw_write)
1903         [GDB_SELF_TEST]: No longer virtual.
1904
1905 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1906
1907         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1908
1909 2017-10-04  Pedro Alves  <palves@redhat.com>
1910
1911         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1912         out of 'between TRY and CATCH'.
1913
1914 2017-10-04  Pedro Alves  <palves@redhat.com>
1915
1916         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1917         * common/common-exceptions.h (TRY): Open an outermost scope.
1918         Expand intro comment.
1919         (CATCH): Reindent.
1920         (END_CATCH): Close the outermost scope.
1921         * completer.c (complete_line_internal): Add missing END_CATCH.
1922
1923 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1924
1925         * NEWS (Changes since GDB 8.0): Add entry about new
1926         'set-cwd-on-gdbserver' feature.
1927         (New remote packets): Add entry for QSetWorkingDir.
1928         * common/common-inferior.h (set_inferior_cwd): New prototype.
1929         * infcmd.c (set_inferior_cwd): Remove "static".
1930         (show_cwd_command): Expand text to include remote debugging.
1931         * remote.c: Add PACKET_QSetWorkingDir.
1932         (remote_protocol_features) <QSetWorkingDir>: New entry for
1933         PACKET_QSetWorkingDir.
1934         (extended_remote_set_inferior_cwd): New function.
1935         (extended_remote_create_inferior): Call
1936         "extended_remote_set_inferior_cwd".
1937         (_initialize_remote): Call "add_packet_config_cmd" for
1938         QSetWorkingDir.
1939
1940 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1941
1942         * NEWS (New commands): Mention "set/show cwd".
1943         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1944         "cd" command's help text.
1945         * common/common-inferior.h (get_inferior_cwd): New prototype.
1946         * infcmd.c (inferior_cwd_scratch): New global variable.
1947         (set_inferior_cwd): New function.
1948         (get_inferior_cwd): Likewise.
1949         (set_cwd_command): Likewise.
1950         (show_cwd_command): Likewise.
1951         (_initialize_infcmd): Add "set/show cwd" commands.
1952         * inferior.h (class inferior) <cwd>: New field.
1953         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1954         (fork_inferior): Change inferior's cwd before its execution.
1955         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1956         to CreateProcess.
1957
1958 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1959
1960         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1961         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1962         (COMMON_OBS): Add gdb_tilde_expand.o.
1963         * common/gdb_tilde_expand.c: New file.
1964         * common/gdb_tilde_expand.h: Likewise.
1965
1966 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1967
1968         * gdbarch.sh (objfile): Remove duplicate declaration.
1969         * gdbarch.h: Regenerate.
1970
1971 2017-10-03  Tom Tromey  <tom@tromey.com>
1972
1973         * utils.c (internal_vproblem): Use string_vprintf.
1974
1975 2017-10-03  Tom Tromey  <tom@tromey.com>
1976
1977         * printcmd.c (info_symbol_command): Use std::string.
1978
1979 2017-10-03  Tom Tromey  <tom@tromey.com>
1980
1981         * top.c (gdb_safe_append_history): Use std::string.
1982
1983 2017-10-03  Tom Tromey  <tom@tromey.com>
1984
1985         * event-top.c (stdin_event_handler): Update.
1986         * main.c (captured_main_1): Update.
1987         * top.h (make_delete_ui_cleanup): Remove.
1988         (struct ui): Add constructor and destructor.
1989         (new_ui, delete_ui): Remove.
1990         * top.c (make_delete_ui_cleanup): Remove.
1991         (new_ui_command): Use std::unique_ptr.
1992         (delete_ui_cleanup): Remove.
1993         (ui::ui): Rename from new_ui.  Update.
1994         (free_ui): Remove.
1995         (ui::~ui): Rename from delete_ui.  Update.
1996
1997 2017-10-03  Tom Tromey  <tom@tromey.com>
1998
1999         * symfile.c (load_progress): Use gdb::byte_vector.
2000
2001 2017-10-03  Tom Tromey  <tom@tromey.com>
2002
2003         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2004         declaration.
2005         * printcmd.c (x_command): Remove unused declaration.
2006         * symfile.c (symbol_file_command): Remove unused declaration.
2007
2008 2017-10-03  Tom Tromey  <tom@tromey.com>
2009
2010         * utils.c (internal_vproblem): Use std::string.
2011         (defaulted_query): Likewise.
2012
2013 2017-10-03  Tom Tromey  <tom@tromey.com>
2014
2015         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2016         * top.c (execute_command_to_string): Update.
2017         * utils.c (make_cleanup_restore_page_info): Remove.
2018         (do_restore_page_info_cleanup): Remove.
2019         (set_batch_flag_and_restore_page_info):
2020         New.
2021         (make_cleanup_restore_page_info): Remove.
2022         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2023         (~set_batch_flag_and_restore_page_info): New
2024         (make_cleanup_restore_uinteger): Remove.
2025         (make_cleanup_restore_integer): Remove.
2026         (struct restore_integer_closure): Remove.
2027         (restore_integer): Remove.
2028         * utils.h (struct set_batch_flag_and_restore_page_info): New
2029         class.
2030         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2031         (make_cleanup_restore_page_info): Remove.
2032         (make_cleanup_restore_uinteger) Remove.
2033         (make_cleanup_restore_integer) Remove.
2034
2035 2017-10-03  Tom Tromey  <tom@tromey.com>
2036
2037         * record-full.h (record_full_gdb_operation_disable_set): Return
2038         scoped_restore_tmpl<int>.
2039         * infrun.c (adjust_pc_after_break): Update.
2040         (handle_signal_stop): Update.
2041         * record-full.c (record_full_gdb_operation_disable_set): Return
2042         scoped_restore_tmpl<int>.
2043         (record_full_wait_1, record_full_insert_breakpoint)
2044         (record_full_remove_breakpoint, record_full_save)
2045         (record_full_goto_insn): Update.
2046
2047 2017-10-02  Tom Tromey  <tom@tromey.com>
2048
2049         PR rust/22236:
2050         * rust-lang.c (rust_val_print_str): New function.
2051         (val_print_struct): Call it.
2052         (rust_subscript): Preserve name of slice type.
2053
2054 2017-10-02  Tom Tromey  <tom@tromey.com>
2055
2056         * rust-lang.c (rust_subscript): Handle slices in
2057         EVAL_AVOID_SIDE_EFFECTS case.
2058
2059 2017-10-02  Tom Tromey  <tom@tromey.com>
2060
2061         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2062
2063 2017-10-02  Tom Tromey  <tom@tromey.com>
2064
2065         * rust-lang.h (rust_slice_type): Add "extern".
2066
2067 2017-10-02  Tom Tromey  <tom@tromey.com>
2068             Pedro Alves  <palves@redhat.com>
2069
2070         * ada-lang.h (ada_exc_info::operator<): Make const.
2071         (ada_exc_info::operator==): Make const.
2072         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2073         Make const.
2074
2075 2017-09-29  Tom Tromey  <tom@tromey.com>
2076
2077         * target.c (read_whatever_is_readable): Change type of "result".
2078         Update.
2079         (free_memory_read_result_vector): Remove.
2080         (read_memory_robust): Change return type.  Update.
2081         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2082         bin2hex, std::string.
2083         * target.h (memory_read_result_s): Remove typedef.
2084         (free_memory_read_result_vector): Remove.
2085         (read_memory_robust): Return std::vector.
2086
2087 2017-09-29  Tom Tromey  <tom@tromey.com>
2088
2089         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2090
2091 2017-09-29  Tom Tromey  <tom@tromey.com>
2092
2093         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2094         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2095         operator< and operator==.
2096         (ada_exceptions_list): Return a std::vector.
2097         * ada-lang.c (ada_exc_info::operator<): Rename from
2098         compare_ada_exception_info.
2099         (ada_exc_info::operator==): New.
2100         (sort_remove_dups_ada_exceptions_list): Change type of
2101         "exceptions".
2102         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2103         (ada_add_global_exceptions): Likewise.
2104         (ada_exceptions_list_1): Return a std::vector.
2105         (ada_exceptions_list): Likewise.
2106
2107 2017-09-29  Tom Tromey  <tom@tromey.com>
2108
2109         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2110         'std::set *'.
2111         (print_one_inferior): Update.
2112         (free_vector_of_ints): Remove.
2113         (list_available_thread_groups): Change "ids" to std::set.
2114         (mi_cmd_list_thread_groups): Update.
2115         (struct collect_cores_data) <core>: Now a std::set.
2116         (collect_cores): Update.
2117         (unique): Remove.
2118         (print_one_inferior): Update.
2119
2120 2017-09-29  Tom Tromey  <tom@tromey.com>
2121
2122         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2123         (mi_execute_async_cli_command): Likewise.
2124         (mi_cmd_trace_frame_collected): Use field_fmt.
2125
2126 2017-09-29  Tom Tromey  <tom@tromey.com>
2127
2128         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2129         gdb::byte_vector.
2130
2131 2017-09-29  Tom Tromey  <tom@tromey.com>
2132
2133         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2134
2135 2017-09-29  Tom Tromey  <tom@tromey.com>
2136
2137         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2138
2139 2017-09-29  Tom Tromey  <tom@tromey.com>
2140
2141         * varobj.h (varobj_gen_name): Return std::string.
2142         * varobj.c (varobj_gen_name): Return std::string.
2143         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2144         (mi_cmd_var_delete): Don't copy "name".
2145
2146 2017-09-29  Tom Tromey  <tom@tromey.com>
2147
2148         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2149         (mi_cmd_break_insert_1): Update.
2150
2151 2017-09-29  Tom Tromey  <tom@tromey.com>
2152
2153         * target.h (make_scoped_defer_target_commit_resume): Update.
2154         * target.c (make_scoped_defer_target_commit_resume): Rename from
2155         make_cleanup_defer_target_commit_resume.  Return a
2156         scoped_restore.
2157         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2158
2159 2017-09-29  Tom Tromey  <tom@tromey.com>
2160
2161         * main.c (captured_main_1): Remove unused declaration.
2162         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2163
2164 2017-09-29  Tom Tromey  <tom@tromey.com>
2165
2166         * symtab.c (search_symbols): Remove unused outer cleanup.
2167         (make_source_files_completion_list): Remove unused declaration.
2168
2169 2017-09-29  Tom Tromey  <tom@tromey.com>
2170
2171         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2172
2173 2017-09-29  Tom Tromey  <tom@tromey.com>
2174
2175         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2176         gdb::byte_vector.
2177
2178 2017-09-29  Tom Tromey  <tom@tromey.com>
2179
2180         * complaints.c (vcomplaint): Use std::string.
2181
2182 2017-09-29  Tom Tromey  <tom@tromey.com>
2183
2184         * tracepoint.c (trace_variable_command): Use std::string.
2185         (encode_actions_1): Remove unused declarations.
2186         (create_tsv_from_upload): Use std::string.
2187
2188 2017-09-29  Tom Tromey  <tom@tromey.com>
2189
2190         * cp-support.c (gdb_demangle): Use std::string.
2191
2192 2017-09-29  Tom Tromey  <tom@tromey.com>
2193
2194         * stack.c (parse_frame_specification): Use std::string
2195         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2196
2197 2017-09-29  Tom Tromey  <tom@tromey.com>
2198
2199         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2200
2201 2017-09-29  Tom Tromey  <tom@tromey.com>
2202
2203         * utils.c (vfprintf_maybe_filtered): Use std::string.
2204         (vfprintf_unfiltered): Likewise.
2205
2206 2017-09-29  Tom Tromey  <tom@tromey.com>
2207
2208         * event-top.c (top_level_prompt): Return std::string.
2209         (display_gdb_prompt): Update.
2210
2211 2017-09-29  Tom Tromey  <tom@tromey.com>
2212
2213         * unittests/common-utils-selftests.c (format): New function.
2214         (string_vprintf_tests): New function.
2215         (_initialize_common_utils_selftests): Register new tests.
2216         * common/common-utils.c (string_vprintf): New function.
2217         * common/common-utils.h (string_vprintf): Declare.
2218
2219 2017-09-29  Pedro Alves  <palves@redhat.com>
2220
2221         * common/rsp-low.c (unpack_varlen_hex): Constify.
2222         * common/rsp-low.h (unpack_varlen_hex): Constify.
2223         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2224         Constify.
2225         * remote.c (remote_set_permissions, read_ptid)
2226         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2227         (remote_static_tracepoint_marker_at)
2228         (remote_static_tracepoint_markers_by_strid)
2229         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2230         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2231         (parse_tracepoint_definition, parse_tsv_definition)
2232         (parse_static_tracepoint_marker_definition): Constify.
2233         * tracepoint.h (parse_static_tracepoint_marker_definition)
2234         (parse_trace_status, parse_tracepoint_status)
2235         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2236
2237 2017-09-29  Pedro Alves  <palves@redhat.com>
2238
2239         * remote.c (target_buf, target_buf_size): Delete.
2240         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2241         Use the connection's packet buffer instead.
2242         All callers adjusted.
2243         (_initialize_remote): Remove references to target_buf and
2244         target_buf_size.
2245
2246 2017-09-28  Pedro Alves  <palves@redhat.com>
2247
2248         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2249         unittests/common-utils-selftests.c.
2250         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2251         (COMMON_OBS): Remove utils-selftests.o.
2252         * utils-selftests.c: Move to ...
2253         * unittests/common-utils-selftests.c: ... here and rename self
2254         test to "string_printf".
2255
2256 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2257
2258         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2259         having NULL cus or tus.
2260
2261 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2262
2263         * arm-tdep.c: (convert_from_extended): Remove.
2264         (convert_to_extended): Likewise.
2265         (arm_extract_return_value): Use convert_typed_floating.
2266         (arm_store_return_value): Likewise.
2267
2268         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2269         * sh-tdep.c: Do not include "floatformat.h".
2270         (sh_littlebyte_bigword_type): New function.
2271         (sh_register_convert_to_virtual): Use convert_typed_floating.
2272         (sh_register_convert_to_raw): Likewise.
2273         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2274         (sh64_littlebyte_bigword_type): New function.
2275         (sh64_extract_return_value): Use convert_typed_floating.
2276         (sh64_register_convert_to_virtual): Likewise.
2277         (sh64_register_convert_to_raw): Likewise.
2278
2279 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2280
2281         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2282         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2283
2284         * gdbtypes.h (union type_specific): Make field floatformat hold
2285         just a single struct floatformat, not an array.
2286         (floatformat_from_type): Move here.
2287         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2288         changed TYPE_FLOATFORMAT definition.
2289         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2290         (recursive_dump_type): Likewise.
2291         (init_float_type): Install correct floatformat for byte order.
2292         (arch_float_type): Likewise.
2293
2294 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2295
2296         * gdbtypes.c (init_type): Change incoming argument from
2297         length-in-bytes to length-in-bits.  Assert length is a
2298         multiple of TARGET_CHAR_BITS.
2299         (arch_type, arch_flags_type): Likewise.
2300         (init_integer_type): Update call to init_type.
2301         (init_character_type): Likewise.
2302         (init_boolean_type): Likewise.
2303         (init_float_type): Likewise.
2304         (init_decfloat_type): Likewise.
2305         (init_complex_type): Likewise.
2306         (init_pointer_type): Likewise.
2307         (objfile_type): Likewise.
2308         (arch_integer_type): Update call to arch_type.
2309         (arch_character_type): Likewise.
2310         (arch_boolean_type): Likewise.
2311         (arch_float_type): Likewise.
2312         (arch_decfloat_type): Likewise.
2313         (arch_complex_type): Likewise.
2314         (arch_pointer_type): Likewise.
2315         (gdbtypes_post_init): Likewise.
2316
2317         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2318         (read_base_type): Likewise.
2319         * mdebugread.c (basic_type): Likewise.
2320         * stabsread.c (dbx_init_float_type): Likewise.
2321         (rs6000_builtin_type): Likewise.
2322         (read_range_type): Likewise.  Also, fix call to init_integer_type
2323         with erroneous length argument.
2324
2325         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2326         * d-lang.c (build_d_types): Likewise.
2327         * f-lang.c (build_fortran_types): Likewise.
2328         * go-lang.c (build_go_types): Likewise.
2329         * opencl-lang.c (build_opencl_types): Likewise.
2330         * jit.c (finalize_symtab): Likewise.
2331         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2332         (build_std_type_info_type): Likewise.
2333         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2334         update call to arch_flags_type.
2335
2336         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2337         arch_type.
2338         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2339         * windows-tdep.c (windows_get_tlb_type): Likewise.
2340
2341         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2342         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2343         * m32c-tdep.c (make_types): Likewise.
2344         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2345         (rl78_psw_type): Update call to arch_flags_type.
2346         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2347         * rx-tdep.c (rx_psw_type): Likewise.
2348         (rx_fpsw_type): Likewise.
2349         * sparc-tdep.c (sparc_psr_type): Likewise.
2350         (sparc_fsr_type): Likewise.
2351         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2352         (sparc64_ccr_type): Likewise.
2353         (sparc64_fsr_type): Likewise.
2354         (sparc64_fprs_type): Likewise.
2355
2356 2017-09-27  Tom Tromey  <tom@tromey.com>
2357
2358         * findcmd.c (find_command): Constify.
2359
2360 2017-09-27  Tom Tromey  <tom@tromey.com>
2361
2362         * ada-tasks.c (task_command_1, task_command): Constify.
2363
2364 2017-09-27  Tom Tromey  <tom@tromey.com>
2365
2366         * symtab.c (maintenance_print_symbol_cache)
2367         (maintenance_flush_symbol_cache)
2368         (maintenance_print_symbol_cache_statistics): Constify.
2369
2370 2017-09-27  Tom Tromey  <tom@tromey.com>
2371
2372         * inferior.c (detach_inferior_command, kill_inferior_command)
2373         (inferior_command): Constify.
2374
2375 2017-09-27  Tom Tromey  <tom@tromey.com>
2376
2377         * regcache.c (regcache_print, maintenance_print_registers)
2378         (maintenance_print_raw_registers)
2379         (maintenance_print_cooked_registers)
2380         (maintenance_print_register_groups)
2381         (maintenance_print_remote_registers): Constify.
2382
2383 2017-09-27  Tom Tromey  <tom@tromey.com>
2384
2385         * printcmd.c (map_display_numbers, undisplay_command)
2386         (enable_disable_display_command, enable_display_command)
2387         (disable_display_command): Constify.
2388
2389 2017-09-27  Tom Tromey  <tom@tromey.com>
2390
2391         * breakpoint.h (delete_command): Don't declare.
2392         * breakpoint.c (delete_command, enable_once_command)
2393         (enable_count_command, enable_delete_command, breakpoint_1)
2394         (maintenance_info_breakpoints, stopin_command, stopat_command)
2395         (delete_command, delete_trace_command, save_breakpoints)
2396         (save_breakpoints_command, save_tracepoints_command): Constify.
2397
2398 2017-09-27  Tom Tromey  <tom@tromey.com>
2399
2400         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2401         (skip_ws, extract_identifier, macro_define_command)
2402         (macro_undef_command, macro_list_command): Constify.
2403
2404 2017-09-27  Tom Tromey  <tom@tromey.com>
2405
2406         * infcmd.c (environment_info, set_environment_command)
2407         (unset_environment_command, path_info, info_proc_cmd_1)
2408         (info_proc_cmd_mappings, info_proc_cmd_stat)
2409         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2410         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2411
2412 2017-09-27  Tom Tromey  <tom@tromey.com>
2413
2414         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2415         Constify.
2416
2417 2017-09-27  Tom Tromey  <tom@tromey.com>
2418
2419         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2420
2421 2017-09-27  Tom Tromey  <tom@tromey.com>
2422
2423         * demangle.c (demangle_command): Constify.
2424
2425 2017-09-27  Tom Tromey  <tom@tromey.com>
2426
2427         * progspace.c (maintenance_info_program_spaces_command):
2428         Constify.
2429
2430 2017-09-27  Tom Tromey  <tom@tromey.com>
2431
2432         * compile/compile.c (check_raw_argument, compile_file_command)
2433         (compile_code_command, compile_print_command): Constify.
2434
2435 2017-09-27  Tom Tromey  <tom@tromey.com>
2436
2437         * reggroups.c (maintenance_print_reggroups): Constify.
2438
2439 2017-09-27  Tom Tromey  <tom@tromey.com>
2440
2441         * dwarf2read.c (save_gdb_index_command): Constify.
2442
2443 2017-09-27  Tom Tromey  <tom@tromey.com>
2444
2445         * stap-probe.c (info_probes_stap_command): Constify.
2446
2447 2017-09-27  Tom Tromey  <tom@tromey.com>
2448
2449         * fork-child.c (unset_exec_wrapper_command): Constify.
2450
2451 2017-09-27  Tom Tromey  <tom@tromey.com>
2452
2453         * btrace.c (get_uint, get_context_size, no_chunk)
2454         (maint_btrace_packet_history_cmd)
2455         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2456         (maint_info_btrace_cmd): Constify.
2457
2458 2017-09-27  Tom Tromey  <tom@tromey.com>
2459
2460         * reverse.c (delete_bookmark_command): Constify.
2461
2462 2017-09-27  Tom Tromey  <tom@tromey.com>
2463
2464         * remote.c (set_memory_packet_size)
2465         (set_memory_write_packet_size, show_memory_write_packet_size)
2466         (set_memory_read_packet_size, show_memory_read_packet_size)
2467         (compare_sections_command, packet_command, remote_put_command)
2468         (remote_get_command, remote_delete_command): Constify.
2469
2470 2017-09-27  Tom Tromey  <tom@tromey.com>
2471
2472         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2473         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2474         (set_mipsfpu_auto_command): Constify.
2475
2476 2017-09-27  Tom Tromey  <tom@tromey.com>
2477
2478         * cli/cli-cmds.h (cd_command): Constify.
2479         * cli/cli-cmds.c (cd_command): Constify.
2480
2481 2017-09-27  Tom Tromey  <tom@tromey.com>
2482
2483         * thread.c (thread_name_command, thread_find_command): Constify.
2484
2485 2017-09-27  Tom Tromey  <tom@tromey.com>
2486
2487         * probe.c (enable_probes_command, disable_probes_command):
2488         Constify.
2489
2490 2017-09-27  Tom Tromey  <tom@tromey.com>
2491
2492         * symfile.c (symbol_file_command): Constify.
2493         * gdbcore.h (deprecated_file_changed_hook): Constify.
2494         * exec.c (deprecated_file_changed_hook, exec_file_command)
2495         (file_command): Constify.
2496         * defs.h (symbol_file_command): Constify.
2497
2498 2017-09-27  Tom Tromey  <tom@tromey.com>
2499
2500         * remote-fileio.c (set_system_call_allowed)
2501         (show_system_call_allowed): Constify.
2502
2503 2017-09-27  Tom Tromey  <tom@tromey.com>
2504
2505         * tracepoint.c (delete_trace_variable_command)
2506         (tfind_end_command, tfind_start_command, tfind_pc_command)
2507         (tfind_tracepoint_command, tfind_line_command)
2508         (tfind_range_command, tfind_outside_command): Constify.
2509
2510 2017-09-27  Tom Tromey  <tom@tromey.com>
2511
2512         * ax-gdb.c (maint_agent_printf_command, agent_command)
2513         (agent_eval_command): Constify.
2514
2515 2017-09-27  Tom Tromey  <tom@tromey.com>
2516
2517         * tracepoint.c (info_scope_command): Constify.
2518         * python/python.c (gdbpy_decode_line): Constify.
2519         * python/py-breakpoint.c (bppy_init): Constify.
2520         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2521         * location.h: (new_linespec_location)
2522         (string_to_event_location_basic, string_to_event_location):
2523         Constify.
2524         * location.c (new_linespec_location)
2525         (string_to_event_location_basic, string_to_event_location):
2526         Constify.
2527         * linespec.h (decode_line_with_current_source)
2528         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2529         * linespec.c (linespec_lex_to_end)
2530         (decode_line_with_current_source)
2531         (decode_line_with_last_displayed): Constify.
2532         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2533         Constify.
2534         * cli/cli-cmds.c (edit_command, list_command): Constify.
2535         * breakpoint.h (until_break_command, watch_command_wrapper)
2536         (awatch_command_wrapper, rwatch_command_wrapper)
2537         (init_ada_exception_breakpoint): Constify.
2538         * breakpoint.c (break_command_1, dprintf_command)
2539         (break_range_command, watch_command_wrapper)
2540         (rwatch_command_wrapper, awatch_command_wrapper)
2541         (until_break_command, init_ada_exception_breakpoint)
2542         (strace_marker_create_sals_from_location, trace_command)
2543         (ftrace_command, strace_command, struct tracepoint): Constify.
2544         * ax-gdb.c (agent_command_1): Constify.
2545         * ada-lang.c (ada_exception_sal): Constify.
2546
2547 2017-09-27  Tom Tromey  <tom@tromey.com>
2548
2549         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2550         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2551         (get_context_size, no_chunk, get_insn_history_modifiers)
2552         (cmd_record_insn_history, get_call_history_modifiers)
2553         (cmd_record_call_history): Constify.
2554
2555 2017-09-27  Tom Tromey  <tom@tromey.com>
2556
2557         * source.c (show_substitute_path_command)
2558         (unset_substitute_path_command, set_substitute_path_command):
2559         Constify.
2560
2561 2017-09-27  Tom Tromey  <tom@tromey.com>
2562
2563         * typeprint.c (maintenance_print_type): Constify.
2564         * maint.c (maintenance_dump_me, maintenance_demangle)
2565         (maintenance_time_display, maintenance_info_sections)
2566         (maintenance_print_statistics, maintenance_deprecate)
2567         (maintenance_undeprecate): Constify.
2568         (maintenance_do_deprecate): Constify.  Use std::string.
2569         (maintenance_selftest): Constify.
2570         * gdbtypes.h (maintenance_print_type): Constify.
2571
2572 2017-09-27  Tom Tromey  <tom@tromey.com>
2573
2574         * hppa-tdep.c (unwind_command): Constify.
2575
2576 2017-09-27  Tom Tromey  <tom@tromey.com>
2577
2578         * target-descriptions.c (unset_tdesc_filename_cmd)
2579         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2580         Constify.
2581
2582 2017-09-27  Tom Tromey  <tom@tromey.com>
2583
2584         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2585
2586 2017-09-27  Tom Tromey  <tom@tromey.com>
2587
2588         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2589
2590 2017-09-27  Tom Tromey  <tom@tromey.com>
2591
2592         * tui/tui-regs.c (tui_reg_command): Constify.
2593
2594 2017-09-27  Tom Tromey  <tom@tromey.com>
2595
2596         * skip.c (skip_file_command, skip_function_command)
2597         (skip_enable_command, skip_disable_command, skip_delete_command):
2598         Constify.
2599
2600 2017-09-27  Tom Tromey  <tom@tromey.com>
2601
2602         * record-btrace.c (cmd_record_btrace_bts_start)
2603         (cmd_record_btrace_pt_start): Constify.
2604
2605 2017-09-27  Tom Tromey  <tom@tromey.com>
2606
2607         * symmisc.c (maintenance_print_symbols)
2608         (maintenance_print_msymbols, maintenance_print_objfiles)
2609         (maintenance_info_symtabs, maintenance_check_symtabs)
2610         (maintenance_expand_symtabs, maintenance_info_line_tables):
2611         Constify.
2612
2613 2017-09-27  Tom Tromey  <tom@tromey.com>
2614
2615         * top.c (new_ui_command): Constify.
2616
2617 2017-09-27  Tom Tromey  <tom@tromey.com>
2618
2619         * symfile.c (add_symbol_file_command)
2620         (remove_symbol_file_command, list_overlays_command)
2621         (map_overlay_command, unmap_overlay_command)
2622         (overlay_auto_command, overlay_manual_command)
2623         (overlay_off_command, overlay_load_command): Constify.
2624
2625 2017-09-27  Tom Tromey  <tom@tromey.com>
2626
2627         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2628         (info_spu_mailbox_command, info_spu_dma_command)
2629         (info_spu_proxydma_command): Constify.
2630
2631 2017-09-27  Tom Tromey  <tom@tromey.com>
2632
2633         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2634
2635 2017-09-27  Tom Tromey  <tom@tromey.com>
2636
2637         * cli/cli-script.c (user_defined_command): Constify.
2638
2639 2017-09-27  Tom Tromey  <tom@tromey.com>
2640
2641         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2642         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2643         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2644         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2645         (dump_binary_value, append_binary_memory, append_binary_value):
2646         Constify.
2647         (struct dump_context) <func>: Constify.
2648         (add_dump_command): Update.
2649
2650 2017-09-27  Tom Tromey  <tom@tromey.com>
2651
2652         * cli/cli-cmds.c (show_version, show_configuration)
2653         (source_command, show_user): Constify.
2654
2655 2017-09-27  Tom Tromey  <tom@tromey.com>
2656
2657         * target.c (maintenance_print_target_stack): Constify.
2658
2659 2017-09-27  Tom Tromey  <tom@tromey.com>
2660
2661         * interps.c (interpreter_exec_cmd): Constify.
2662
2663 2017-09-27  Tom Tromey  <tom@tromey.com>
2664
2665         * record-full.c (cmd_record_full_restore): Constify.
2666
2667 2017-09-27  Tom Tromey  <tom@tromey.com>
2668
2669         * memattr.c (enable_mem_command, disable_mem_command)
2670         (delete_mem_command): Constify.
2671
2672 2017-09-27  Tom Tromey  <tom@tromey.com>
2673
2674         * value.c (show_convenience): Constify.
2675
2676 2017-09-27  Tom Tromey  <tom@tromey.com>
2677
2678         * gdbcore.h (core_file_command): Update.
2679         * corefile.c (core_file_command): Constify.
2680
2681 2017-09-27  Tom Tromey  <tom@tromey.com>
2682
2683         * user-regs.c (maintenance_print_user_registers): Constify.
2684
2685 2017-09-27  Tom Tromey  <tom@tromey.com>
2686
2687         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2688
2689 2017-09-27  Tom Tromey  <tom@tromey.com>
2690
2691         * cp-support.c (first_component_command): Constify.
2692
2693 2017-09-27  Tom Tromey  <tom@tromey.com>
2694
2695         * psymtab.c (maintenance_print_psymbols)
2696         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2697         Constify.
2698
2699 2017-09-27  Tom Tromey  <tom@tromey.com>
2700
2701         * windows-tdep.c (display_tib): Constify.
2702
2703 2017-09-27  Tom Tromey  <tom@tromey.com>
2704
2705         * linux-fork.c (delete_checkpoint_command)
2706         (detach_checkpoint_command): Constify.
2707
2708 2017-09-27  Tom Tromey  <tom@tromey.com>
2709
2710         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2711
2712 2017-09-27  Tom Tromey  <tom@tromey.com>
2713
2714         * arc-tdep.c (dump_arc_instruction_command): Constify.
2715
2716 2017-09-27  Tom Tromey  <tom@tromey.com>
2717
2718         * valprint.c (set_radix, show_radix): Constify.
2719
2720 2017-09-27  Tom Tromey  <tom@tromey.com>
2721
2722         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2723
2724 2017-09-27  Tom Tromey  <tom@tromey.com>
2725
2726         * command.h (not_just_help_class_command): Update.
2727         * cli/cli-decode.h (not_just_help_class_command): Update.
2728         * cli/cli-decode.c (not_just_help_class_command): Constify.
2729
2730 2017-09-27  Tom Tromey  <tom@tromey.com>
2731
2732         * gdb_bfd.c (maintenance_info_bfds): Constify.
2733
2734 2017-09-27  Tom Tromey  <tom@tromey.com>
2735
2736         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2737         overloads.
2738         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2739         (do_const_cfunc): New function.
2740         (cmd_cfunc_eq): New overload.
2741         (cli_user_command_p): Check do_const_cfunc.
2742         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2743         const_cfunc.
2744         * command.h (add_cmd): Add const overload and no-function
2745         overload.
2746         (set_cmd_cfunc): Add const overload.
2747         (cmd_const_cfunc_ftype): Declare.
2748         (cmd_cfunc_eq): Add const overload.
2749         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2750         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2751         overload.
2752
2753 2017-09-27  Tom Tromey  <tom@tromey.com>
2754
2755         * macroexp.c (get_next_token_for_substitution): New function.
2756         (substitute_args): Call it.  Check for __VA_OPT__.
2757
2758 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2759             Pedro Alves <palves@redhat.com>
2760
2761         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2762         producer_is_icc_lt_14.
2763         (producer_is_icc_lt_14): New function.
2764         (check_producer): Add code for checking version of ICC.
2765         (producer_is_icc): Move to producer.c.
2766         (read_structure_type): Restrict ICC workaround to ICC<14.
2767         * producer.c: Include selftest.h.
2768         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2769         New functions.
2770         * producer.h (producer_is_icc): New declaration.
2771
2772 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2773
2774         * Makefile.in (SFILES): Add producer.c.
2775         (COMMON_OBS): Add producer.o
2776         * amd64-tdep.c (producer.h): Add new include.
2777         * dwarf2read.c (producer.h): Add new include.
2778         * producer.c: New file.
2779         * producer.h: New file.
2780         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2781         producer.c.
2782         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2783         producer.h.
2784
2785 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2786
2787         * configure.ac: Search ncursesw before ncurses.
2788         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2789         * gdb_curses.h: Include <ncursesw/ncurses.h>
2790         * config.in, configure: Regenerate.
2791
2792 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2793
2794         PR gdb/22185
2795         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2796         obsolete.
2797         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2798         Remove i386sol2 support.
2799         * configure.nat <i386sol2>: Remove.
2800         <sol2-64>: Fold into ...
2801         <sol2>: ... this.
2802         Move common settings to default section.
2803         Add sol-thread.o.
2804         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2805         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2806         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2807         <i[34567]86-*-solaris*>: Remove.
2808         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2809
2810         * configure.ac: Remove wctype in libw check.
2811         (_MSE_INT_H): Don't define on Solaris 7-9.
2812         <solaris*>: Remove libthread_db.so.1 check.
2813         * configure: Regenerate.
2814         * config.in: Regenerate.
2815
2816         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2817         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2818         (gdb_ps_size_t): Remove.
2819         Use base types in users.
2820         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2821
2822         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2823
2824 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2825
2826         PR build/22206
2827         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2828         (adi_is_addr_mapped): Likewise.
2829         (PSR_ICC): Don't redefine.
2830         (PSR_IMPL): Likewise.
2831
2832 2017-09-25  Tom Tromey  <tom@tromey.com>
2833
2834         * regcache.c (regcache::dump): Use string_printf.
2835
2836 2017-09-25  Tom Tromey  <tom@tromey.com>
2837
2838         * regcache.c (class regcache_invalidator): New.
2839         (struct register_to_invalidate): Remove.
2840         (make_cleanup_regcache_invalidate): Remove.
2841         (regcache::raw_write): Use regcache_invalidator.
2842
2843 2017-09-25  Tom Tromey  <tom@tromey.com>
2844
2845         * spu-tdep.c (spu2ppu_sniffer): Update.
2846         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2847         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2848         Remove.
2849         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2850         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2851         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2852         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2853         (frame_pop): Update.
2854
2855 2017-09-25  Tom Tromey  <tom@tromey.com>
2856
2857         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2858         * regcache.h (regcache_xfree): Don't declare.
2859         * regcache.c (regcache_xfree): Remove.
2860         (do_regcache_xfree): Use delete.
2861         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2862         * linux-fork.c (free_fork): Use delete.
2863         (fork_save_infrun_state): Likewise.
2864         * jit.c (jit_dealloc_cache): Use delete.
2865         * infrun.c (discard_infcall_suspend_state): Use delete.
2866
2867 2017-09-25  Tom Tromey  <tom@tromey.com>
2868
2869         * regcache.h (regcache_xmalloc): Don't declare.
2870         (regcache_raw_set_cached_value): Update comment.
2871         * regcache.c (regcache_xmalloc): Remove.
2872         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2873         * jit.c (jit_frame_sniffer): Use new.
2874         * frame.c (frame_save_as_regcache): Use new.
2875
2876 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2877
2878         * NEWS: Advertise support for guarded-storage registers on IBM z.
2879
2880 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2881
2882         * s390-linux-nat.c (have_regset_gs): New static variable.
2883         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2884         control block and guarded-storage broadcast control regsets.
2885         (s390_read_description): Detect whether the target has
2886         guarded-storage support, return appropriate tdesc.
2887         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2888         (features/s390x-gs-linux64.c): Likewise.
2889         (struct gdbarch_tdep) <have_gs>: New field.
2890         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2891         (s390_gsbc_regset): New variables.
2892         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2893         and s390_gsbc_regset, if applicable.
2894         (s390_core_read_description): Check whether core file was from a
2895         target with guarded-storage support; include appropriate regsets.
2896         (s390_gdbarch_init): Add registers for guarded-storage support.
2897         (_initialize_s390_tdep): Initialize new target descriptions that
2898         include registers for guarded-storage support.
2899         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2900         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2901         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2902         (S390_NUM_REGS): Adjust macro definition.
2903         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2904         (tdesc_s390x_gs_linux64): New declarations.
2905
2906 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2907
2908         * features/s390-gs-linux64.xml: New file.
2909         * features/s390-gs.xml: New file.
2910         * features/s390-gsbc.xml: New file.
2911         * features/s390x-gs-linux64.xml: New file.
2912         * features/Makefile (WHICH): Add s390-gs-linux64 and
2913         s390x-gs-linux64.
2914         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2915         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2916         * features/s390-gs-linux64.c: New generated file.
2917         * features/s390x-gs-linux64.c: New file.
2918         * regformats/s390-gs-linux64.dat: New file.
2919         * regformats/s390x-gs-linux64.dat: New file.
2920
2921 2017-09-23  Tom Tromey  <tom@tromey.com>
2922
2923         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2924
2925 2017-09-22  Tom Tromey  <tom@tromey.com>
2926
2927         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2928         type to scoped_restore_tmpl.
2929         <scoped_input_handler>: Initialize m_quit_handler directly.
2930
2931 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2932
2933         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2934         (cd_command): Likewise.  Free "current_directory" before
2935         assigning to it.
2936         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2937         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2938         * top.c (gdb_dirbuf): Remove global declaration.
2939         * top.h (gdb_dirbuf): Likewise.
2940
2941 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2942
2943         * gnulib/aclocal.m4: Regenerate.
2944         * gnulib/config.in: Regenerate.
2945         * gnulib/configure: Regenerate.
2946         * gnulib/import/Makefile.am: Regenerate.
2947         * gnulib/import/Makefile.in: Regenerate.
2948         * gnulib/import/assure.h: New file.
2949         * gnulib/import/at-func.c: Likewise
2950         * gnulib/import/chdir-long.c: New file.
2951         * gnulib/import/chdir-long.h: New file.
2952         * gnulib/import/cloexec.c: New file.
2953         * gnulib/import/cloexec.h: New file.
2954         * gnulib/import/close.c: New file.
2955         * gnulib/import/closedir.c: New file.
2956         * gnulib/import/dirent-private.h: New file.
2957         * gnulib/import/dup-safer.c: New file.
2958         * gnulib/import/dup.c: New file.
2959         * gnulib/import/dup2.c: New file.
2960         * gnulib/import/error.c: New file.
2961         * gnulib/import/error.h: New file.
2962         * gnulib/import/exitfail.c: New file.
2963         * gnulib/import/exitfail.h: New file.
2964         * gnulib/import/fchdir.c: New file.
2965         * gnulib/import/fcntl.c: New file.
2966         * gnulib/import/fcntl.in.h: New file.
2967         * gnulib/import/fd-hook.c: New file.
2968         * gnulib/import/fd-hook.h: New file.
2969         * gnulib/import/fd-safer.c: New file.
2970         * gnulib/import/fdopendir.c: New file.
2971         * gnulib/import/filename.h: New file.
2972         * gnulib/import/filenamecat-lgpl.c: New file.
2973         * gnulib/import/filenamecat.h: New file.
2974         * gnulib/import/fstat.c: New file.
2975         * gnulib/import/fstatat.c: New file.
2976         * gnulib/import/getcwd-lgpl.c: New file.
2977         * gnulib/import/getcwd.c: New file.
2978         * gnulib/import/getdtablesize.c: New file.
2979         * gnulib/import/getlogin_r.c: New file.
2980         * gnulib/import/getprogname.c: New file.
2981         * gnulib/import/getprogname.h: New file.
2982         * gnulib/import/gettext.h: New file.
2983         * gnulib/import/glob-libc.h: New file.
2984         * gnulib/import/glob.c: New file.
2985         * gnulib/import/glob.in.h: New file.
2986         * gnulib/import/intprops.h: New file.
2987         * gnulib/import/m4/chdir-long.m4: New file.
2988         * gnulib/import/m4/close.m4: New file.
2989         * gnulib/import/m4/closedir.m4: New file.
2990         * gnulib/import/m4/d-ino.m4: New file.
2991         * gnulib/import/m4/d-type.m4: New file.
2992         * gnulib/import/m4/dup.m4: New file.
2993         * gnulib/import/m4/dup2.m4: New file.
2994         * gnulib/import/m4/error.m4: New file.
2995         * gnulib/import/m4/fchdir.m4: New file.
2996         * gnulib/import/m4/fcntl.m4: New file.
2997         * gnulib/import/m4/fcntl_h.m4: New file.
2998         * gnulib/import/m4/fdopendir.m4: New file.
2999         * gnulib/import/m4/filenamecat.m4: New file.
3000         * gnulib/import/m4/fstat.m4: New file.
3001         * gnulib/import/m4/fstatat.m4: New file.
3002         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3003         * gnulib/import/m4/getcwd-path-max.m4: New file.
3004         * gnulib/import/m4/getcwd.m4: New file.
3005         * gnulib/import/m4/getdtablesize.m4: New file.
3006         * gnulib/import/m4/getlogin_r.m4: New file.
3007         * gnulib/import/m4/getprogname.m4: New file.
3008         * gnulib/import/m4/glob.m4: New file.
3009         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3010         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3011         * gnulib/import/m4/mempcpy.m4: New file.
3012         * gnulib/import/m4/memrchr.m4: New file.
3013         * gnulib/import/m4/mode_t.m4: New file.
3014         * gnulib/import/m4/msvc-inval.m4: New file.
3015         * gnulib/import/m4/msvc-nothrow.m4: New file.
3016         * gnulib/import/m4/open.m4: New file.
3017         * gnulib/import/m4/openat.m4: New file.
3018         * gnulib/import/m4/opendir.m4: New file.
3019         * gnulib/import/m4/readdir.m4: New file.
3020         * gnulib/import/m4/realloc.m4: New file.
3021         * gnulib/import/m4/rewinddir.m4: New file.
3022         * gnulib/import/m4/save-cwd.m4: New file.
3023         * gnulib/import/m4/strdup.m4: New file.
3024         * gnulib/import/m4/strerror.m4: New file.
3025         * gnulib/import/m4/unistd-safer.m4: New file.
3026         * gnulib/import/mempcpy.c: New file.
3027         * gnulib/import/memrchr.c: New file.
3028         * gnulib/import/msvc-inval.c: New file.
3029         * gnulib/import/msvc-inval.h: New file.
3030         * gnulib/import/msvc-nothrow.c: New file.
3031         * gnulib/import/msvc-nothrow.h: New file.
3032         * gnulib/import/open.c: New file.
3033         * gnulib/import/openat-die.c: New file.
3034         * gnulib/import/openat-priv.h: New file.
3035         * gnulib/import/openat-proc.c: New file.
3036         * gnulib/import/openat.c: New file.
3037         * gnulib/import/openat.h: New file.
3038         * gnulib/import/opendir.c: New file.
3039         * gnulib/import/pipe-safer.c: New file.
3040         * gnulib/import/readdir.c: New file.
3041         * gnulib/import/realloc.c: New file.
3042         * gnulib/import/rewinddir.c: New file.
3043         * gnulib/import/save-cwd.c: New file.
3044         * gnulib/import/save-cwd.h: New file.
3045         * gnulib/import/strdup.c: New file.
3046         * gnulib/import/strerror-override.c: New file.
3047         * gnulib/import/strerror-override.h: New file.
3048         * gnulib/import/strerror.c: New file.
3049         * gnulib/import/unistd--.h: New file.
3050         * gnulib/import/unistd-safer.h: New file.
3051         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3052         "getcwd" and "glob".
3053         * ser-tcp.c: Undefine "close" before redefining it.
3054
3055 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3056
3057         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3058         get rid of res_val.
3059
3060 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3061
3062         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3063         <sol2,sparc>: Likewise.
3064         <sol2-64,i386>: Likewise.
3065
3066         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3067         -Wdeprecated-declarations on *-*-solaris*.
3068         * configure: Regenerate.
3069
3070         * procfs.c: Include "nat/inferior.h".
3071         (procfs_info_proc): Fix typo.
3072
3073 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3074
3075         * remote.c (vector): Include.
3076         (struct private_thread_info): Add field, thread_handle.
3077         (free_private_thread_info): Deallocate storage associated with
3078         thread handle.
3079         (get_private_info_thread): Initialize `thread_handle' field.
3080         (struct thread_item): Add field, thread_handle.
3081         (clear_threads_listing_context): Deallocate storage associated
3082         with thread handle.
3083         (start_thread): Add support for "handle" attribute.
3084         (thread_attributes): Add "handle".
3085         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3086         field.
3087         (remote_update_thread_list): Update thread_handle.
3088         (remote_thread_handle_to_thread_info): New function.
3089         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3090
3091 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3092
3093         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3094         function.
3095         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3096         * python/python-internal.h (thread_object_type): Declare.
3097
3098 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3099
3100         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3101         (target_thread_handle_to_thread_info): Declare.
3102         * target.c (target_thread_handle_to_thread_info): New function.
3103         * target-delegates.c: Regenerate.
3104         * gdbthread.h (find_thread_by_handle): Declare.
3105         * thread.c (find_thread_by_handle): New function.
3106         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3107         function.
3108         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3109
3110 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3111
3112         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3113
3114 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3115
3116         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3117
3118 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3119
3120         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3121         to gdb_target_obs.
3122
3123 2017-09-20  Tom Tromey  <tom@tromey.com>
3124
3125         * breakpoint.c (struct counted_command_line): Remove.
3126         (breakpoint_commands): Update.
3127         (alloc_counted_command_line, incref_counted_command_line)
3128         (decref_counted_command_line, do_cleanup_counted_command_line)
3129         (make_cleanup_decref_counted_command_line): Remove.
3130         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3131         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3132         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3133         (save_breakpoints): Update.
3134         * breakpoint.h (counted_command_line): Now a typedef to
3135         shared_ptr.
3136         (struct breakpoint) <commands>: Now a counted_command_line.
3137         (struct bpstats) <command>: Likewise.
3138
3139 2017-09-20  Tom Tromey  <tom@tromey.com>
3140
3141         * breakpoint.c (struct commands_info, do_map_commands_command):
3142         Remove.
3143         (commands_command_1): Update.
3144         (iterate_over_related_breakpoints): Take a function_view.
3145         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3146         (delete_command): Update.
3147         (map_breakpoint_numbers): Take a function_view.
3148         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3149         (disable_command): Update.
3150         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3151         (enable_command): Update.
3152         (struct disp_data, do_enable_breakpoint_disp)
3153         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3154         (do_map_enable_delete_breakpoint): Remove.
3155         (enable_once_command, enable_count_command, enable_delete_command)
3156         (delete_trace_variable_command): Update.
3157
3158 2017-09-20  Tom Tromey  <tom@tromey.com>
3159
3160         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3161         (bpstat_clear): Use delete.
3162         (bpstats): New constructors.
3163         (bpstat_copy, bpstat_stop_status): Use new.
3164         (dprintf_after_condition_true): Update.
3165         * breakpoint.h (bpstats::bpstats): Add constructors.
3166         (bpstats::~bpstats): Add destructor.
3167
3168 2017-09-20  Pedro Alves  <palves@redhat.com>
3169
3170         * eval.c (make_params): Delete, refactored as ...
3171         (class fake_method): ... this new type's ctor.
3172         (fake_method::~fake_method): New.
3173         (evaluate_subexp_standard): Use 'fake_method'.
3174
3175 2017-09-20  Tom Tromey  <tom@tromey.com>
3176
3177         * windows-nat.c (get_windows_debug_event, windows_wait)
3178         (do_initial_windows_stuff, windows_attach): Update.
3179         * utils.c (vwarning, internal_vproblem): Update.
3180         (ui_unregister_input_event_handler_cleanup)
3181         (prepare_to_handle_input): Remove.
3182         (class scoped_input_handler): New.
3183         (defaulted_query, prompt_for_continue): Update.
3184         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3185         Update.
3186         * top.c (undo_terminal_modifications_before_exit): Update.
3187         * target/target.h (target_terminal_init, target_terminal_inferior)
3188         (target_terminal_ours): Don't declare.
3189         (class target_terminal): New.
3190         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3191         (target_terminal_ours_for_output)
3192         (make_cleanup_restore_target_terminal): Don't declare.
3193         (target_terminal_info): Remove.
3194         * target.c (enum terminal_state, terminal_state): Remove.
3195         (target_terminal::terminal_state): Define.
3196         (target_terminal::init): Rename from target_terminal_init.
3197         (target_terminal::inferior): Rename from
3198         target_terminal_inferior.
3199         (target_terminal::ours): Rename from target_terminal_ours.
3200         (target_terminal::ours_for_output): Rename from
3201         target_terminal_ours_for_output.
3202         (target_terminal::info): New method.
3203         (cleanup_restore_target_terminal)
3204         (make_cleanup_restore_target_terminal): Remove.
3205         * solib.c (handle_solib_event): Update.
3206         * remote.c (remote_serial_quit_handler): Update.
3207         (remote_terminal_inferior, remote_wait_as): Update.
3208         * record-full.c (record_full_wait_1): Update.
3209         * nto-procfs.c (procfs_create_inferior): Update.
3210         * nat/fork-inferior.c (startup_inferior): Update.
3211         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3212         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3213         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3214         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3215         (mi_breakpoint_created, mi_breakpoint_deleted)
3216         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3217         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3218         (mi_user_selected_context_changed, report_initial_inferior):
3219         Update.
3220         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3221         (linux_nat_terminal_inferior): Update.
3222         * infrun.c (follow_fork_inferior)
3223         (handle_vfork_child_exec_or_exit, do_target_resume)
3224         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3225         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3226         Update.
3227         * inflow.c (child_terminal_init, info_terminal_command): Update.
3228         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3229         (attach_command): Update.
3230         * infcall.c (call_thread_fsm_should_stop): Update.
3231         * gnu-nat.c (gnu_attach): Update.
3232         * extension.c (struct active_ext_lang_state)
3233         (restore_active_ext_lang): Update.
3234         * exceptions.c (print_flush): Update.
3235         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3236         (struct quit_handler_cleanup_data, restore_quit_handler)
3237         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3238         Remove.
3239         * cp-support.c (gdb_demangle): Update.
3240         * breakpoint.c (update_inserted_breakpoint_locations)
3241         (insert_breakpoint_locations, handle_jit_event)
3242         (disable_breakpoints_in_unloaded_shlib): Update.
3243         * annotate.c (annotate_breakpoints_invalid)
3244         (annotate_frames_invalid): Update.
3245
3246 2017-09-20  Tom Tromey  <tom@tromey.com>
3247
3248         * main.c (catch_command_errors): Rename from
3249         catch_command_errors_const.
3250         (captured_main_1): Update.
3251
3252 2017-09-20  Pedro Alves  <palves@redhat.com>
3253
3254         * cli/cli-cmds.c (list_command): Use print_sal_location.
3255         (print_sal_location): New function.
3256         (ambiguous_line_spec): Use print_sal_location.
3257         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3258         * symtab.c (find_function_start_sal): Likewise.
3259         * symtab.h (symtab_and_line::symbol): New field.
3260
3261 2017-09-20  Pedro Alves  <palves@redhat.com>
3262
3263         * linespec.c (minsym_found): Handle non-text minsyms.
3264         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3265
3266 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3267
3268         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3269         backslash.
3270
3271 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3272
3273         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3274         vmovups instead vmovaps.
3275         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3276
3277 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3278
3279         * NEWS (Changes since GDB 8.0): Add starti.
3280         * infcmd.c (enum run_break): New.
3281         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3282         case.
3283         (run_command): Use enum run_how.
3284         (start_command): Likewise.
3285         (starti_command): New function.
3286         (RUN_ARGS_HELP): New macro.
3287         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3288         commands.  Add starti command.
3289
3290 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3291
3292         * Makefile.in (monitor.o): Remove the rule.
3293
3294 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3295
3296         * annotate.h (struct annotate_arg_emitter): Use
3297         DISABLE_COPY_AND_ASSIGN.
3298         * common/refcounted-object.h (refcounted_object): Likewise.
3299         * completer.h (struct completion_result): Likewise.
3300         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3301         * filename-seen-cache.h (filename_seen_cache): Likewise.
3302         * gdbcore.h (thread_section_name): Likewise.
3303         * gdb_regex.h (compiled_regex): Likewise.
3304         * gdbthread.h (scoped_restore_current_thread): Likewise.
3305         * inferior.h (scoped_restore_current_inferior): Likewise.
3306         * jit.c (jit_reader): Likewise.
3307         * linespec.h (struct linespec_result): Likewise.
3308         * mi/mi-parse.h (struct mi_parse): Likewise.
3309         * nat/fork-inferior.c (execv_argv): Likewise.
3310         * progspace.h (scoped_restore_current_program_space): Likewise.
3311         * python/python-internal.h (class gdbpy_enter): Likewise.
3312         * regcache.h (regcache): Likewise.
3313         * target-descriptions.c (struct tdesc_reg): Likewise.
3314         (struct tdesc_type): Likewise.
3315         (struct tdesc_feature): Likewise.
3316         * ui-out.h (ui_out_emit_type): Likewise.
3317
3318 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3319
3320         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3321         label abort_expression.
3322
3323 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3324
3325         * common/buffer.c (buffer_xml_printf): Adjust.
3326         * common/xml-utils.c (xml_escape_text): Change return type to
3327         std::string, update code accordingly.
3328         * common/xml-utils.h (xml_escape_text): Change return type to
3329         std::string.
3330         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3331         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3332         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3333         Adjust.
3334
3335 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3336
3337         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3338         (SUBDIR_UNITTESTS_OBS): Add new object file.
3339         * unittests/xml-utils-selftests.c: New file.
3340
3341 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3342
3343         * common/selftest.h (selftest): New struct/interface.
3344         (register_test): Add name parameter, add new overload.
3345         (run_tests): Add filter parameter.
3346         (for_each_selftest_ftype): New typedef.
3347         (for_each_selftest): New declaration.
3348         * common/selftest.c (tests): Change type to
3349         map<string, unique_ptr<selftest>>.
3350         (simple_selftest): New struct.
3351         (register_test): New function.
3352         (register_test): Add name parameter and use it.
3353         (run_tests): Add filter parameter and use it.  Add prints.
3354         Adjust to vector -> map change.
3355         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3356         registering selftests.
3357         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3358         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3359         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3360         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3361         * findvar.c (_initialize_findvar): Likewise.
3362         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3363         * maint.c (maintenance_selftest): Update call to run_tests.
3364         (maintenance_info_selftests): New function.
3365         (_initialize_maint_cmds): Register "maintenance info selftests"
3366         command.  Update "maintenance selftest" doc.
3367         * regcache.c (_initialize_regcache): Add names when registering
3368         selftests.
3369         * rust-exp.y (_initialize_rust_exp): Likewise.
3370         * selftest-arch.c (gdbarch_selftest): New struct.
3371         (gdbarch_tests): Remove.
3372         (register_test_foreach_arch): Add name parameter.  Call
3373         register_test.
3374         (tests_with_arch): Remove, move most content to
3375         gdbarch_selftest::operator().
3376         (_initialize_selftests_foreach_arch): Remove.
3377         * selftest-arch.h (register_test_foreach_arch): Add name
3378         parameter.
3379         (run_tests_with_arch): New declaration.
3380         * utils-selftests.c (_initialize_utils_selftests): Add names
3381         when registering selftests.
3382         * utils.c (_initialize_utils): Likewise.
3383         * unittests/array-view-selftests.c
3384         (_initialize_array_view_selftests): Likewise.
3385         * unittests/environ-selftests.c (_initialize_environ_selftests):
3386         Likewise.
3387         * unittests/function-view-selftests.c
3388         (_initialize_function_view_selftests): Likewise.
3389         * unittests/offset-type-selftests.c
3390         (_initialize_offset_type_selftests): Likewise.
3391         * unittests/optional-selftests.c
3392         (_initialize_optional_selftests): Likewise.
3393         * unittests/scoped_restore-selftests.c
3394         (_initialize_scoped_restore_selftests): Likewise.
3395         * NEWS: Document "maintenance selftest" and "maint info
3396         selftests".
3397
3398 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3399
3400         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3401         scoped_restore.
3402
3403 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3404
3405         * mi/mi-main.c (mi_load_progress): Make uiout variable
3406         a unique_ptr.
3407
3408 2017-09-15  Pedro Alves  <palves@redhat.com>
3409
3410         * compile/compile-c-types.c (convert_enum, convert_int)
3411         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3412
3413 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3414
3415         * dwarf2read.c (copy_string): Remove.
3416         (parse_macro_definition): Replace copy_string with savestring.
3417
3418 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3419
3420         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3421         gdb_target_obs.
3422         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3423         Likewise.
3424         (i[34567]86-*-linux*): Likewise.
3425
3426 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3427
3428         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3429         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3430         <stack>: Change type to std::vector.
3431         <stack_len, stack_allocated>: Remove.
3432         <grow_stack>: Remove.
3433         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3434         (dwarf_expr_context::~dwarf_expr_context): Remove.
3435         (dwarf_expr_context::grow_stack): Remove.
3436         (dwarf_expr_context::push): Adjust.
3437         (dwarf_expr_context::pop): Adjust.
3438         (dwarf_expr_context::fetch): Adjust.
3439         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3440         (dwarf_expr_context::stack_empty_p): Adjust.
3441         (dwarf_expr_context::execute_stack_op): Adjust.
3442
3443 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3444
3445         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3446         return type to bool.
3447         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3448
3449 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3450
3451         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3452         Change type to bool.
3453         (dwarf_stack_value) <in_stack_memory>: Likewise.
3454         (dwarf_expr_context) <push_address>: Change parameter type to
3455         bool.
3456         <fetch_in_stack_memory>: Change return type to bool.
3457         <push>: Change parameter type to bool.
3458         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3459         to bool.
3460         (dwarf_expr_context::push_address): Likewise.
3461         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3462         to bool.
3463         (dwarf_expr_context::execute_stack_op): Adjust.
3464         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3465
3466 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3467
3468         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3469         (struct dwarf_expr_context) <n_pieces>: Remove.
3470         <pieces>: Change type to std::vector.
3471         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3472         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3473         pieces.
3474         (dwarf_expr_context::add_piece): Adjust.
3475         * dwarf2loc.c (struct piece_closure): Initialize fields.
3476         <n_pieces>: Remove.
3477         <pieces>: Change type to std::vector.
3478         (allocate_piece_closure): Adjust, change parameter to
3479         std::vector rvalue and std::move it to piece_closure.
3480         (rw_pieced_value): Adjust.
3481         (check_pieced_synthetic_pointer): Adjust.
3482         (indirect_synthetic_pointer): Adjust.
3483         (coerce_pieced_ref): Adjust.
3484         (free_pieced_value_closure):  Adjust.  Use delete to free
3485         piece_closure.
3486         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3487         to allocate_piece_closure.
3488         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3489
3490 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3491
3492         * probe.h (probe_ops_cp): Remove typedef.
3493         (DEF_VEC_P (probe_ops_cp)): Remove.
3494         (all_probe_ops): Change type to std::vector.
3495         * probe.c (info_probes_for_ops): Adjust to vector change.
3496         (probe_linespec_to_ops): Likewise.
3497         (all_probe_ops): Change type to std::vector.
3498         (_initialize_probe): Adjust to vector change.
3499         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3500         * elfread.c (elf_get_probes): Likewise.
3501         * stap-probe.c (_initialize_stap_probe): Likewise.
3502
3503 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3504
3505         * probe.h (struct bound_probe): Define constructors.
3506         * probe.c (bound_probe_s): Remove typedef.
3507         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3508         (collect_probes): Change return type to std::vector, remove
3509         cleanup.
3510         (compare_probes): Return bool, change parameter type.  Change
3511         semantic to "less than".
3512         (gen_ui_out_table_header_info): Change parameter to std::vector
3513         and update.
3514         (exists_probe_with_pops): Likewise.
3515         (info_probes_for_ops): Update to std::vector change.
3516         (enable_probes_command): Likewise.
3517         (disable_probes_command): Likewise.
3518
3519 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3520
3521         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3522         vec to std::vector.
3523         * probe.c (parse_probes_in_pspace): Update.
3524         (find_probes_in_objfile): Update.
3525         (find_probe_by_pc): Update.
3526         (collect_probes): Update.
3527         (probe_any_get_probes): Update.
3528         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3529         return type to reference to std::vector.
3530         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3531         std::vector and update.
3532         (dtrace_process_dof): Likewise.
3533         (dtrace_get_probes): Likewise.
3534         * elfread.c (elf_get_probes): Change return type to std::vector,
3535         store an std::vector in bfd_data.
3536         (probe_key_free): Update to std::vector.
3537         * stap-probe.c (handle_stap_probe): Change parameter to
3538         std::vector and update.
3539         (stap_get_probes): Likewise.
3540         * symfile-debug.c (debug_sym_get_probes): Change return type to
3541         std::vector and update.
3542
3543 2017-09-11  Tom Tromey  <tom@tromey.com>
3544
3545         * breakpoint.c (program_breakpoint_here_p): Update.
3546         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3547         from make_show_memory_breakpoints_cleanup.  Return a
3548         scoped_restore_tmpl<int>.
3549         (restore_show_memory_breakpoints): Remove.
3550         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3551         * mem-break.c (memory_validate_breakpoint): Update.
3552         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3553         (ia64_memory_remove_breakpoint): Update.
3554         (ia64_breakpoint_from_pc): Update.
3555         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3556         from make_show_memory_breakpoints_cleanup.
3557
3558 2017-09-11  Tom Tromey  <tom@tromey.com>
3559
3560         * d-namespace.c (d_lookup_symbol): Use std::string.
3561         (find_symbol_in_baseclass): Likewise.
3562
3563 2017-09-11  Tom Tromey  <tom@tromey.com>
3564
3565         * ctf.c (ctf_start): Use std::string.
3566
3567 2017-09-11  Tom Tromey  <tom@tromey.com>
3568
3569         * ada-lang.c (is_known_support_routine): Update.
3570         (ada_unhandled_exception_name_addr_from_raise): Update.
3571         * guile/scm-frame.c (gdbscm_frame_name): Update.
3572         * python/py-frame.c (frapy_name): Update.
3573         (frapy_function): Update.
3574         * stack.h (find_frame_funname): Update.
3575         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3576         (print_frame): Update.
3577
3578 2017-09-11  Tom Tromey  <tom@tromey.com>
3579
3580         * findcmd.c (put_bits): Take a gdb::byte_vector.
3581         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3582         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3583         cleanups.
3584         (find_command): Update.
3585
3586 2017-09-11  Tom Tromey  <tom@tromey.com>
3587
3588         * cli/cli-script.c (class scoped_restore_hook_in): New.
3589         (clear_hook_in_cleanup): Remove.
3590         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3591         scoped_restore_hook_in.
3592
3593 2017-09-11  Tom Tromey  <tom@tromey.com>
3594
3595         * cli/cli-script.c (restore_interp): Remove.
3596         (read_command_lines): Use scoped_restore_interp.
3597         * interps.c (scoped_restore_interp::set_temp): Rename from
3598         interp_set_temp.
3599         * interps.h (class scoped_restore_interp): New.
3600         (interp_set_temp): Remove.
3601
3602 2017-09-11  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3605         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3606         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3607         scoped_restore.
3608         (mi_cmd_break_insert_1): Update.
3609         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3610         scoped_restore.
3611
3612 2017-09-11  Tom Tromey  <tom@tromey.com>
3613
3614         * demangle.c (demangle_command): Update.
3615         * breakpoint.c (disable_command): Update.
3616         (enable_command): Update.
3617         (find_location_by_number): Make "number" const.  Use
3618         get_number_trailer.
3619         * cli/cli-utils.c (extract_arg): Return std::string.
3620         * probe.c (parse_probe_linespec): Update.  Change types.
3621         (collect_probes): Take string arguments.
3622         (parse_probe_linespec): Likewise.
3623         (info_probes_for_ops): Update.
3624         (enable_probes_command): Update.
3625         (disable_probes_command): Update.
3626         * break-catch-sig.c (catch_signal_split_args): Update.
3627         * mi/mi-parse.c (mi_parse): Update.
3628
3629 2017-09-11  Tom Tromey  <tom@tromey.com>
3630
3631         * language.h (language_enum): Make argument const.
3632         * language.c (language_enum): Make argument const.
3633
3634 2017-09-11  Tom Tromey  <tom@tromey.com>
3635
3636         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3637         as function.
3638         (skip_to_space): Rename from skip_to_space_const.
3639         * common/common-utils.c (skip_to_space): New function.
3640         (skip_to_space): Rename from skip_to_space_const.
3641         * cli/cli-utils.h (get_number): Rename from get_number_const.
3642         (extract_arg): Rename from extract_arg_const.
3643         * cli/cli-utils.c (get_number): Rename from get_number_const.
3644         (extract_arg): Rename from extract_arg_const.
3645         (number_or_range_parser::get_number): Use ::get_number.
3646         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3647         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3648         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3649         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3650         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3651         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3652         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3653         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3654
3655 2017-09-11  Tom Tromey  <tom@tromey.com>
3656
3657         * python/python.c (do_start_initialization): Use
3658         py-event-types.def to initialize types.
3659         Define all object type structures.
3660         * python/python-internal.h: Don't declare event initialization
3661         functions.
3662         * python/py-threadevent.c (thread_event_object_type): Don't
3663         define.
3664         * python/py-stopevent.c (stop_event_object_type): Don't define.
3665         * python/py-signalevent.c (signal_event_object_type): Don't
3666         declare or define.
3667         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3668         (clear_objfiles_event_object_type): Don't declare or define.
3669         * python/py-infevents.c (inferior_call_pre_event_object_type)
3670         (inferior_call_post_event_object_type)
3671         (register_changed_event_object_type)
3672         (memory_changed_event_object_type): Don't declare or define.
3673         * python/py-inferior.c (new_thread_event_object_type)
3674         (new_inferior_event_object_type)
3675         (inferior_deleted_event_object_type): Don't declare or define.
3676         * python/py-exitedevent.c (exited_event_object_type): Don't
3677         declare or define.
3678         * python/py-evts.c (gdbpy_initialize_py_events): Use
3679         py-all-events.def.
3680         * python/py-events.h (thread_event_object_type): Don't declare.
3681         (events_object): Use py-all-events.def.
3682         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3683         py-event-types.def.
3684         * python/py-event-types.def: New file.
3685         * python/py-continueevent.c (create_continue_event_object): Don't
3686         declare or define.
3687         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3688         declare or define.
3689         * python/py-all-events.def: New file.
3690
3691 2017-09-11  Tom Tromey  <tom@tromey.com>
3692
3693         * python/py-threadevent.c (create_thread_event_object): Return
3694         gdbpy_ref.
3695         * python/py-stopevent.h (create_stop_event_object)
3696         (create_breakpoint_event_object, create_signal_event_object):
3697         Update.
3698         * python/py-stopevent.c (create_stop_event_object): Return
3699         gdbpy_ref.
3700         (emit_stop_event): Update.
3701         * python/py-signalevent.c (create_signal_event_object): Return
3702         gdbpy_ref.
3703         * python/py-infevents.c (create_inferior_call_event_object):
3704         Update.
3705         * python/py-event.h (create_event_object)
3706         (create_thread_event_object): Update.
3707         * python/py-event.c (create_event_object): Return gdbpy_ref.
3708         * python/py-continueevent.c: Return gdbpy_ref.
3709         * python/py-bpevent.c (create_breakpoint_event_object): Return
3710         gdbpy_ref.
3711
3712 2017-09-11  Tom Tromey  <tom@tromey.com>
3713
3714         PR python/15622:
3715         * NEWS: Add entry.
3716         * python/python.c (do_start_initialization): Initialize new event
3717         types.
3718         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3719         (gdbpy_initialize_inferior_deleted_event)
3720         (gdbpy_initialize_new_thread_event): Declare.
3721         * python/py-threadevent.c (create_thread_event_object): Add option
3722         "thread" parameter.
3723         * python/py-inferior.c (new_thread_event_object_type)
3724         (new_inferior_event_object_type)
3725         (inferior_deleted_event_object_type): Declare.
3726         (python_new_inferior, python_inferior_deleted): New functions.
3727         (add_thread_object): Emit new_thread event.
3728         (gdbpy_initialize_inferior): Attach new functions to corresponding
3729         observers.
3730         (new_thread, new_inferior, inferior_deleted): Define new event
3731         types.
3732         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3733         registries.
3734         * python/py-events.h (events_object) <new_inferior,
3735         inferior_deleted, new_thread>: New fields.
3736         * python/py-event.h (create_thread_event_breakpoint): Add optional
3737         "thread" parameter.
3738
3739 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3740
3741         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3742         check current_ui instead.
3743         (internal_vproblem): Likewise.
3744
3745 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3746
3747         * thread.c (print_thread_info_1): Remove unnecessary calls to
3748         uiout->is_mi_like_p.
3749
3750 2017-09-09  Tom Tromey  <tom@tromey.com>
3751
3752         * namespace.h (add_using_directive): Update.
3753         * namespace.c (add_using_directive): Change type of excludes to
3754         std::vector.
3755         * dwarf2read.c (read_import_statement): Use std::vector.
3756         (read_namespace): Update.
3757         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3758
3759 2017-09-09  Tom Tromey  <tom@tromey.com>
3760
3761         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3762
3763 2017-09-09  Tom Tromey  <tom@tromey.com>
3764
3765         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3766
3767 2017-09-09  Tom Tromey  <tom@tromey.com>
3768
3769         * stack.c (func_command): Use gdb::def_vector.
3770
3771 2017-09-09  Tom Tromey  <tom@tromey.com>
3772
3773         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3774         ui_out_emit_list, ui_out_emit_tuple.
3775         (mi_cmd_var_update): Likewise.
3776
3777 2017-09-09  Tom Tromey  <tom@tromey.com>
3778
3779         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3780         ui_out_redirect_pop.
3781         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3782         ui_out_redirect_pop.
3783         * utils.c (do_ui_out_redirect_pop)
3784         (make_cleanup_ui_out_redirect_pop): Remove.
3785         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3786         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3787         * ui-out.h (ui_out_redirect_pop): New class.
3788
3789 2017-09-09  Tom Tromey  <tom@tromey.com>
3790
3791         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3792         (list_available_thread_groups, mi_cmd_list_thread_groups)
3793         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3794         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3795         Likewise.
3796
3797 2017-09-09  Tom Tromey  <tom@tromey.com>
3798
3799         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3800         ui_out_emit_tuple.
3801
3802 2017-09-09  Tom Tromey  <tom@tromey.com>
3803
3804         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3805         * stack.c (print_frame): Use ui_out_emit_tuple.
3806         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3807         (info_spu_mailbox_command, info_spu_dma_command)
3808         (info_spu_proxydma_command): Likewise.
3809         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3810         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3811         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3812         ui_out_emit_tuple.
3813         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3814
3815 2017-09-09  Tom Tromey  <tom@tromey.com>
3816
3817         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3818         (class ui_out_emit_table): Update comment.
3819         * ui-out.c (do_cleanup_table_end)
3820         (make_cleanup_ui_out_table_begin_end): Remove.
3821         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3822         (info_spu_dma_cmdlist): Likewise.
3823         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3824         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3825         ui_out_emit_table.
3826
3827 2017-09-09  Tom Tromey  <tom@tromey.com>
3828
3829         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3830         ui_out_emit_list, gdb::optional.
3831
3832 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3833
3834         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3835         prototype.
3836         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3837         prototype.
3838         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3839         prototype.
3840         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3841         * ada-exp.y: Remove _initialize_ada_exp prototype.
3842         * ada-lang.c: Remove _initialize_ada_language prototype.
3843         * ada-tasks.c: Remove _initialize_tasks prototype.
3844         * addrmap.c: Remove _initialize_addrmap prototype.
3845         * agent.c: Remove _initialize_agent prototype.
3846         * aix-thread.c: Remove _initialize_aix_thread prototype.
3847         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3848         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3849         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3850         prototype.
3851         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3852         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3853         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3854         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3855         prototype.
3856         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3857         prototype.
3858         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3859         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3860         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3861         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3862         prototype.
3863         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3864         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3865         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3866         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3867         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3868         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3869         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3870         prototype.
3871         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3872         prototype.
3873         * annotate.c: Remove _initialize_annotate prototype.
3874         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3875         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3876         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3877         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3878         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3879         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3880         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3881         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3882         prototype.
3883         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3884         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3885         * auto-load.c: Remove _initialize_auto_load prototype.
3886         * auxv.c: Remove _initialize_auxv prototype.
3887         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3888         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3889         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3890         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3891         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3892         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3893         prototype.
3894         * break-catch-throw.c: Remove _initialize_break_catch_throw
3895         prototype.
3896         * breakpoint.c: Remove _initialize_breakpoint prototype.
3897         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3898         * btrace.c: Remove _initialize_btrace prototype.
3899         * charset.c: Remove _initialize_charset prototype.
3900         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3901         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3902         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3903         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3904         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3905         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3906         * coffread.c: Remove _initialize_coffread prototype.
3907         * compile/compile.c: Remove _initialize_compile prototype.
3908         * complaints.c: Remove _initialize_complaints prototype.
3909         * completer.c: Remove _initialize_completer prototype.
3910         * copying.awk: Remove _initialize_copying prototype.
3911         * copying.c: Regenerate.
3912         * core-regset.c: Remove _initialize_core_regset prototype.
3913         * corefile.c: Remove _initialize_core prototype.
3914         * corelow.c: Remove _initialize_corelow prototype.
3915         * cp-abi.c: Remove _initialize_cp_abi prototype.
3916         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3917         * cp-support.c: Remove _initialize_cp_support prototype.
3918         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3919         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3920         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3921         * ctf.c: Remove _initialize_ctf prototype.
3922         * d-lang.c: Remove _initialize_d_language prototype.
3923         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3924         prototype.
3925         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3926         * dbxread.c: Remove _initialize_dbxread prototype.
3927         * dcache.c: Remove _initialize_dcache prototype.
3928         * demangle.c: Remove _initialize_demangler prototype.
3929         * disasm-selftests.c: Remove _initialize_disasm_selftests
3930         prototype.
3931         * disasm.c: Remove _initialize_disasm prototype.
3932         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3933         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3934         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3935         prototype.
3936         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3937         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3938         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3939         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3940         * elfread.c: Remove _initialize_elfread prototype.
3941         * exec.c: Remove _initialize_exec prototype.
3942         * extension.c: Remove _initialize_extension prototype.
3943         * f-lang.c: Remove _initialize_f_language prototype.
3944         * f-valprint.c: Remove _initialize_f_valprint prototype.
3945         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3946         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3947         * filesystem.c: Remove _initialize_filesystem prototype.
3948         * findcmd.c: Remove _initialize_mem_search prototype.
3949         * fork-child.c: Remove _initialize_fork_child prototype.
3950         * frame-base.c: Remove _initialize_frame_base prototype.
3951         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3952         * frame.c: Remove _initialize_frame prototype.
3953         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3954         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3955         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3956         * gcore.c: Remove _initialize_gcore prototype.
3957         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3958         * gdbarch.c: Regenerate.
3959         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3960         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3961         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3962         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3963         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3964         * go-lang.c: Remove _initialize_go_language prototype.
3965         * go32-nat.c: Remove _initialize_go32_nat prototype.
3966         * guile/guile.c: Remove _initialize_guile prototype.
3967         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3968         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3969         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3970         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3971         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3972         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3973         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3974         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3975         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3976         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3977         prototype.
3978         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3979         prototype.
3980         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3981         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3982         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3983         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3984         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3985         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3986         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3987         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3988         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3989         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3990         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3991         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3992         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3993         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3994         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3995         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3996         prototype.
3997         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3998         prototype.
3999         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4000         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4001         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4002         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4003         * infcall.c: Remove _initialize_infcall prototype.
4004         * infcmd.c: Remove _initialize_infcmd prototype.
4005         * inferior.c: Remove _initialize_inferiors prototype.
4006         * inflow.c: Remove _initialize_inflow prototype.
4007         * infrun.c: Remove _initialize_infrun prototype.
4008         * interps.c: Remove _initialize_interpreter prototype.
4009         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4010         * jit.c: Remove _initialize_jit prototype.
4011         * language.c: Remove _initialize_language prototype.
4012         * linux-fork.c: Remove _initialize_linux_fork prototype.
4013         * linux-nat.c: Remove _initialize_linux_nat prototype.
4014         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4015         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4016         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4017         * m2-lang.c: Remove _initialize_m2_language prototype.
4018         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4019         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4020         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4021         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4022         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4023         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4024         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4025         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4026         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4027         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4028         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4029         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4030         * machoread.c: Remove _initialize_machoread prototype.
4031         * macrocmd.c: Remove _initialize_macrocmd prototype.
4032         * macroscope.c: Remove _initialize_macroscope prototype.
4033         * maint.c: Remove _initialize_maint_cmds prototype.
4034         * mdebugread.c: Remove _initialize_mdebugread prototype.
4035         * memattr.c: Remove _initialize_mem prototype.
4036         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4037         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4038         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4039         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4040         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4041         * microblaze-linux-tdep.c: Remove
4042         _initialize_microblaze_linux_tdep prototype.
4043         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4044         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4045         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4046         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4047         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4048         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4049         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4050         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4051         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4052         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4053         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4054         prototype.
4055         * mipsread.c: Remove _initialize_mipsread prototype.
4056         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4057         prototype.
4058         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4059         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4060         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4061         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4062         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4063         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4064         prototype.
4065         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4066         * nto-procfs.c: Remove _initialize_procfs prototype.
4067         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4068         * objc-lang.c: Remove _initialize_objc_language prototype.
4069         * objfiles.c: Remove _initialize_objfiles prototype.
4070         * observer.c: Remove observer_test_first_notification_function,
4071         observer_test_second_notification_function,
4072         observer_test_third_notification_function, and
4073         _initialize_observer prototypes.
4074         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4075         * osabi.c: Remove _initialize_gdb_osabi prototype.
4076         * osdata.c: Remove _initialize_osdata prototype.
4077         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4078         * parse.c: Remove _initialize_parse prototype.
4079         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4080         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4081         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4082         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4083         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4084         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4085         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4086         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4087         * printcmd.c: Remove _initialize_printcmd prototype.
4088         * probe.c: Remove _initialize_probe prototype.
4089         * proc-api.c: Remove _initialize_proc_api prototype.
4090         * proc-events.c: Remove _initialize_proc_events prototype.
4091         * proc-service.c: Remove _initialize_proc_service prototype.
4092         * procfs.c: Remove _initialize_procfs prototype.
4093         * psymtab.c: Remove _initialize_psymtab prototype.
4094         * python/python.c: Remove _initialize_python prototype.
4095         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4096         * record-btrace.c: Remove _initialize_record_btrace prototype.
4097         * record-full.c: Remove _initialize_record_full prototype.
4098         * record.c: Remove _initialize_record prototype.
4099         * regcache.c: Remove _initialize_regcache prototype.
4100         * reggroups.c: Remove _initialize_reggroup prototype.
4101         * remote-notif.c: Remove _initialize_notif prototype.
4102         * remote-sim.c: Remove _initialize_remote_sim prototype.
4103         * remote.c: Remove _initialize_remote prototype.
4104         * reverse.c: Remove _initialize_reverse prototype.
4105         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4106         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4107         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4108         prototype.
4109         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4110         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4111         * rust-exp.y: Remove _initialize_rust_exp prototype.
4112         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4113         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4114         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4115         * score-tdep.c: Remove _initialize_score_tdep prototype.
4116         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4117         prototype.
4118         * ser-go32.c: Remove _initialize_ser_dos prototype.
4119         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4120         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4121         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4122         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4123         * serial.c: Remove _initialize_serial prototype.
4124         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4125         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4126         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4127         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4128         * skip.c: Remove _initialize_step_skip prototype.
4129         * sol-thread.c: Remove _initialize_sol_thread prototype.
4130         * solib-aix.c: Remove _initialize_solib_aix prototype.
4131         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4132         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4133         * solib-frv.c: Remove _initialize_frv_solib prototype.
4134         * solib-spu.c: Remove _initialize_spu_solib prototype.
4135         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4136         * solib-target.c: Remove _initialize_solib_target prototype.
4137         * solib.c: Remove _initialize_solib prototype.
4138         * source.c: Remove _initialize_source prototype.
4139         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4140         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4141         prototype.
4142         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4143         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4144         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4145         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4146         prototype.
4147         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4148         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4149         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4150         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4151         prototype.
4152         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4153         prototype.
4154         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4155         prototype.
4156         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4157         prototype.
4158         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4159         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4160         prototype.
4161         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4162         prototype.
4163         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4164         prototype.
4165         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4166         prototype.
4167         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4168         prototype.
4169         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4170         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4171         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4172         * stabsread.c: Remove _initialize_stabsread prototype.
4173         * stack.c: Remove _initialize_stack prototype.
4174         * stap-probe.c: Remove _initialize_stap_probe prototype.
4175         * std-regs.c: Remove _initialize_frame_reg prototype.
4176         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4177         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4178         * symfile.c: Remove _initialize_symfile prototype.
4179         * symmisc.c: Remove _initialize_symmisc prototype.
4180         * symtab.c: Remove _initialize_symtab prototype.
4181         * target-dcache.c: Remove _initialize_target_dcache prototype.
4182         * target-descriptions.c: Remove _initialize_target_descriptions
4183         prototype.
4184         * thread.c: Remove _initialize_thread prototype.
4185         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4186         prototype.
4187         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4188         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4189         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4190         prototype.
4191         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4192         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4193         * tracefile.c: Remove _initialize_tracefile prototype.
4194         * tracepoint.c: Remove _initialize_tracepoint prototype.
4195         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4196         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4197         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4198         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4199         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4200         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4201         * tui/tui.c: Remove _initialize_tui prototype.
4202         * typeprint.c: Remove _initialize_typeprint prototype.
4203         * user-regs.c: Remove _initialize_user_regs prototype.
4204         * utils.c: Remove _initialize_utils prototype.
4205         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4206         * valarith.c: Remove _initialize_valarith prototype.
4207         * valops.c: Remove _initialize_valops prototype.
4208         * valprint.c: Remove _initialize_valprint prototype.
4209         * value.c: Remove _initialize_values prototype.
4210         * varobj.c: Remove _initialize_varobj prototype.
4211         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4212         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4213         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4214         * windows-nat.c: Remove _initialize_windows_nat,
4215         _initialize_check_for_gdb_ini, and _initialize_loadable
4216         prototypes.
4217         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4218         * xcoffread.c: Remove _initialize_xcoffread prototype.
4219         * xml-support.c: Remove _initialize_xml_support prototype.
4220         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4221         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4222         prototype.
4223         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4224         prototype.
4225         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4226
4227 2017-09-08  Keith Seitz  <keiths@redhat.com>
4228
4229         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4230         field.
4231
4232 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4233
4234         * f-valprint.c (f_val_print): Remove check for one byte
4235         sized integers. Remove printing of character type.
4236
4237 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4238             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4239             Bernhard Heckel  <bernhard.heckel@intel.com>
4240
4241         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4242         to maintain proper indentation when printing pointers/refs.
4243
4244 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4245
4246         GDB 8.0.1 released.
4247
4248 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4249
4250         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4251
4252 2017-09-05  Tom Tromey  <tom@tromey.com>
4253
4254         * parse.c (funcall_chain): Now a std::vector.
4255         (start_arglist, end_arglist): Simplify.
4256         (free_funcalls): Remove.
4257         (parse_exp_in_context_1): Remove cleanup.
4258
4259 2017-09-05  Tom Tromey  <tom@tromey.com>
4260
4261         * go-exp.y (go_parse): Don't create a cleanup.
4262
4263 2017-09-05  Tom Tromey  <tom@tromey.com>
4264
4265         * d-exp.y (PrimaryExpression): Use std::string.
4266         (d_parse): Don't create a cleanup.
4267
4268 2017-09-05  Tom Tromey  <tom@tromey.com>
4269
4270         * utils.c (do_clear_parser_state): Remove.
4271         (make_cleanup_clear_parser_state): Remove.
4272         * p-exp.y (pascal_parse): Use scoped_restore.
4273         * m2-exp.y (m2_parse): Use scoped_restore.
4274         * f-exp.y (f_parse): Use scoped_restore.
4275         * d-exp.y (d_parse): Use scoped_restore.
4276         * c-exp.y (c_parse): Use scoped_restore.
4277         * ada-exp.y (ada_parse): Use scoped_restore.
4278         * utils.h (make_cleanup_clear_parser_state): Remove.
4279
4280 2017-09-06  Keith Seitz  <keiths@redhat.com>
4281
4282         * dwarf2read.c (dw2_linkage_name_attr): New function.
4283         (dw2_linkage_name): New function.
4284         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4285         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4286         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4287
4288 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4289
4290         * config/djgpp/djconfig.sh: Correct shell portability issue.
4291
4292 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4293
4294         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4295
4296 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4297
4298         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4299         * NEWS: Mention new FreeBSD/mips native configuration.
4300         * configure.host: Add aarch64*-*-freebsd*.
4301         * configure.nat: Likewise.
4302         * aarch64-fbsd-nat.c: New file.
4303
4304 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4305
4306         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4307         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4308         * NEWS: Mention new FreeBSD/aarch64 target.
4309         * configure.tgt: Add aarch64*-*-freebsd*.
4310         * aarch64-fbsd-tdep.c: New file.
4311         * aarch64-fbsd-tdep.h: New file.
4312
4313 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4314
4315         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4316
4317 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4318
4319         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4320         of TLS symbols.
4321
4322 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4323
4324         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4325         call.
4326
4327 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4328
4329         * infrun.c (follow_exec): Call add_thread after
4330         target_find_description.
4331
4332 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4333
4334         * infrun.c (handle_inferior_event_1): When exec'ing, read
4335         stop_pc after follow_exec.
4336
4337 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * remote.c (process_g_packet): Update error message.
4340
4341 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4342
4343         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4344         targets.
4345
4346 2017-09-05  Pedro Alves  <palves@redhat.com>
4347
4348         * eval.c (eval_call, evaluate_funcall): New functions, factored
4349         out from ...
4350         (evaluate_subexp_standard): ... this.
4351
4352 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4353
4354         * amd64-tdep.c (amd64_target_description): Create target
4355         descriptions.
4356         (_initialize_amd64_tdep): Don't call functions
4357         initialize_tdesc_amd64_*.  Add self tests.
4358         * arch/amd64.c (amd64_create_target_description): Add parameter
4359         is_linux.  Call set_tdesc_osabi if is_linux is true.
4360         * arch/amd64.h (amd64_create_target_description): Update the
4361         declaration.
4362         * arch/i386.c (i386_create_target_description): Add parameter
4363         is_linux.  Call set_tdesc_osabi if is_linux is true.
4364         * arch/i386.h (i386_create_target_description): Update
4365         declaration.
4366         * configure.tgt: Add i386.o to gdb_target_obs.
4367         * features/Makefile (XMLTOC): Remove i386/*.xml.
4368         * features/i386/amd64-avx-avx512.c: Remove.
4369         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4370         * features/i386/amd64-avx-mpx.c: Remove.
4371         * features/i386/amd64-avx.c: Remove.
4372         * features/i386/amd64-mpx.c: Remove.
4373         * features/i386/amd64.c: Remove.
4374         * features/i386/i386-avx-avx512.c: Remove.
4375         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4376         * features/i386/i386-avx-mpx.c: Remove.
4377         * features/i386/i386-avx.c: Remove.
4378         * features/i386/i386-mmx.c: Remove.
4379         * features/i386/i386-mpx.c: Remove.
4380         * features/i386/i386.c: Remove.
4381         * i386-tdep.c: Don't include features/i386/i386*.c., include
4382         target-descriptions.h and arch/i386.h.
4383         (i386_target_description): Create target descriptions.
4384         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4385         functions.  Do self tests.
4386
4387 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4388
4389         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4390         * features/i386/amd64-avx-avx512-linux.c: Removed.
4391         * features/i386/amd64-avx-linux.c: Removed.
4392         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4393         * features/i386/amd64-avx-mpx-linux.c: Removed.
4394         * features/i386/amd64-linux.c: Removed.
4395         * features/i386/amd64-mpx-linux.c: Removed.
4396         * features/i386/x32-avx-avx512-linux.c: Removed.
4397         * features/i386/x32-avx-linux.c: Removed.
4398         * features/i386/x32-linux.c: Removed.
4399
4400 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4401
4402         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4403         features/i386/*.c.
4404         (amd64_linux_read_description): Call
4405         amd64_create_target_description.
4406         * arch/amd64.c: New file.
4407         * arch/amd64.h: New file.
4408         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4409         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4410
4411 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4412
4413         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4414         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4415         (amd64_linux_read_description): Create target descriptions.
4416         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4417         functions.  Add unit tests.
4418         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4419         x32-core.xml.
4420         * features/i386/64bit-avx.c: Generated.
4421         * features/i386/64bit-avx512.c: Generated.
4422         * features/i386/64bit-core.c: Generated.
4423         * features/i386/64bit-linux.c: Generated.
4424         * features/i386/64bit-mpx.c: Generated.
4425         * features/i386/64bit-pkeys.c: Generated.
4426         * features/i386/64bit-segments.c: Generated.
4427         * features/i386/64bit-sse.c: Generated.
4428         * features/i386/x32-core.c: Generated.
4429         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4430         c files for amd64-linux and x32-linux.
4431
4432 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4433
4434         * amd64-linux-tdep.c (amd64_linux_read_description): New
4435         function.
4436         (amd64_linux_core_read_description): Call
4437         amd64_linux_read_description.
4438         (amd64_linux_init_abi): Likewise.
4439         (amd64_x32_linux_init_abi): Likewise.
4440         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4441         * x86-linux-nat.c (x86_linux_read_description): Call
4442         amd64_linux_read_description.
4443
4444 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4445
4446         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4447         comments.
4448
4449 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4450
4451         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4452         * features/i386/i386-avx-avx512-linux.c: Remove.
4453         * features/i386/i386-avx-linux.c: Remove.
4454         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4455         * features/i386/i386-avx-mpx-linux.c: Remove.
4456         * features/i386/i386-linux.c: Remove.
4457         * features/i386/i386-mmx-linux.c: Remove.
4458         * features/i386/i386-mpx-linux.c: Remove.
4459
4460 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4461
4462         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4463         (SFILES): Add arch/i386.c.
4464         (HFILES_NO_SRCDIR): Add arch/i386.h.
4465         * arch/i386.c: New file.
4466         * arch/i386.h: New file.
4467         * arch/tdesc.h (allocate_target_description): Declare.
4468         (set_tdesc_architecture): Declare.
4469         (set_tdesc_osabi): Declare.
4470         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4471         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4472         include arch/i386.h.
4473         (i386_linux_read_description): Remove code and call
4474         i386_create_target_description.
4475         (set_tdesc_architecture): New function.
4476         (set_tdesc_osabi): New function.
4477         * target-descriptions.h (allocate_target_description): Remove.
4478
4479 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4480
4481         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4482         * target-descriptions.c (tdesc_create_feature): Likewise, and
4483         adjust code.
4484         * features/i386/32bit-avx.c: Re-generated.
4485         * features/i386/32bit-avx512.c: Re-generated.
4486         * features/i386/32bit-core.c: Re-generated.
4487         * features/i386/32bit-linux.c: Re-generated.
4488         * features/i386/32bit-mpx.c: Re-generated.
4489         * features/i386/32bit-pkeys.c: Re-generated.
4490         * features/i386/32bit-sse.c: Re-generated.
4491
4492 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4493
4494         * regformats/regdef.h (struct reg): Override operator == and !=.
4495
4496 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4497
4498         * arch/tdesc.h: New file.
4499         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4500         * target-descriptions.c: Update comments.
4501         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4502         declarations.
4503         * features/i386/32bit-avx.c: Re-generated.
4504         * features/i386/32bit-avx512.c: Re-generated.
4505         * features/i386/32bit-core.c: Re-generated.
4506         * features/i386/32bit-linux.c: Re-generated.
4507         * features/i386/32bit-mpx.c: Re-generated.
4508         * features/i386/32bit-pkeys.c: Re-generated.
4509         * features/i386/32bit-sse.c: Re-generated.
4510
4511 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4512
4513         * regformats/regdat.sh: Update generated code.
4514
4515 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4516
4517         * regformats/regdat.sh: Adjust code order.
4518
4519 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4520
4521         * expprint.c (dump_subexp_body_standard): Use constant format
4522         string in fprintf_filtered call.
4523
4524 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4525
4526         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4527         NetBSD/i386.
4528         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4529
4530 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4531
4532         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4533
4534 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4535
4536         * bsd-kvm.o: Define _KMEMUSER.
4537         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4538         * configure: Regenerate.
4539
4540 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4541
4542         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4543         * i386-fbsd-nat.c: Likewise.
4544
4545 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4546
4547         * unittests/array-view-selftests.c: Add include of <array>.
4548
4549 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4550
4551         * spu-tdep.c (flush_ea_cache): Add missing argument to
4552         call_function_by_hand.
4553
4554 2017-09-04  Pedro Alves  <palves@redhat.com>
4555
4556         * NEWS (Safer support for debugging with no debug info): New.
4557
4558 2017-09-04  Pedro Alves  <palves@redhat.com>
4559
4560         * c-exp.y (function_method, function_method_void): Add current
4561         instance flags to TYPE_INSTANCE.
4562         * dwarf2read.c (check_modifier): New.
4563         (compute_delayed_physnames): Assert that only C++ adds delayed
4564         physnames.  Mark fn_fields as const/volatile depending on
4565         physname.
4566         * eval.c (make_params): New type_instance_flags parameter.  Use
4567         it as the new type's instance flags.
4568         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4569         flags element and pass it to make_params.
4570         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4571         instance flags element.
4572         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4573         * gdbtypes.h: Include "enum-flags.h".
4574         (type_instance_flags): New enum-flags type.
4575         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4576         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4577         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4578         (follow_type_instance_flags): New function.
4579         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4580         * parser-defs.h (follow_type_instance_flags): Declare.
4581         * valops.c (value_struct_elt_for_reference): const/volatile must
4582         match too.
4583
4584 2017-09-04  Pedro Alves  <palves@redhat.com>
4585
4586         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4587         function/method scopes; lookup the nested name as a function local
4588         static variable.
4589
4590 2017-09-04  Pedro Alves  <palves@redhat.com>
4591
4592         (%type <voidval>): Add function_method.
4593         * c-exp.y (exp): New production for calls with no arguments.
4594         (function_method, function_method_void_or_typelist): New
4595         productions.
4596         (exp): New production for "method()::static_var".
4597         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4598         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4599         Handle OP_FUNC_STATIC_VAR.
4600         * parse.c (operator_length_standard):
4601         Handle OP_FUNC_STATIC_VAR.
4602
4603 2017-09-04  Pedro Alves  <palves@redhat.com>
4604
4605         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4606         handling.
4607         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4608         Ditto.
4609         * parse.c (operator_length_standard, operator_check_standard):
4610         Ditto.
4611         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4612
4613 2017-09-04  Pedro Alves  <palves@redhat.com>
4614
4615         * ax-gdb.c: Include "typeprint.h".
4616         (gen_expr_for_cast): New function.
4617         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4618         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4619         type is unknown.
4620         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4621         nodebug_data_symbol.
4622         * eval.c: Include "typeprint.h".
4623         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4624         Error out if symbol has unknown type.
4625         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4626         evaluate_subexp_for_cast.
4627         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4628         OP_VAR_MSYM_VALUE.
4629         (evaluate_subexp_for_cast): New function.
4630         * gdbtypes.c (init_nodebug_var_type): New function.
4631         (objfile_type): Use it to initialize types of variables with no
4632         debug info.
4633         * typeprint.c (error_unknown_type): New.
4634         * typeprint.h (error_unknown_type): New declaration.
4635         * compile/compile-c-types.c (convert_type_basic): Handle
4636         TYPE_CODE_ERROR; warn and fallback to int for variables with
4637         unknown type.
4638
4639 2017-09-04  Pedro Alves  <palves@redhat.com>
4640
4641         * eval.c (evaluate_var_value): New function, factored out from ...
4642         (evaluate_subexp_standard): ... here.
4643
4644 2017-09-04  Pedro Alves  <palves@redhat.com>
4645
4646         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4647         Remove useless assignments to 'op'.
4648
4649 2017-09-04  Pedro Alves  <palves@redhat.com>
4650
4651         * eval.c (eval_skip_value): New function.
4652         (evaluate_subexp_standard): Use it.
4653
4654 2017-09-04  Pedro Alves  <palves@redhat.com>
4655
4656         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4657         function name from symbol/minsym and pass it to
4658         error_call_unknown_return_type.
4659
4660 2017-09-04  Pedro Alves  <palves@redhat.com>
4661
4662         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4663         * ax-gdb.c (gen_msym_var_ref): New function.
4664         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4665         * eval.c (evaluate_var_msym_value): New function.
4666         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4667         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4668         to call_function_by_hand.
4669         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4670         Handle OP_VAR_MSYM_VALUE.
4671         (union exp_element) <msymbol>: New field.
4672         * minsyms.h (struct type): Forward declare.
4673         (find_minsym_type_and_address): Declare.
4674         * parse.c (write_exp_elt_msym): New function.
4675         (write_exp_msymbol): Delete, refactored as ...
4676         (find_minsym_type_and_address): ... this new function.
4677         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4678         (operator_length_standard, operator_check_standard): Handle
4679         OP_VAR_MSYM_VALUE.
4680         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4681
4682 2017-09-04  Pedro Alves  <palves@redhat.com>
4683
4684         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4685         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4686         unknown.
4687         * ada-typeprint.c (print_func_type): Handle functions with unknown
4688         return type.
4689         * c-typeprint.c (c_type_print_base): Handle functions and methods
4690         with unknown return type.
4691         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4692         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4693         * compile/compile-c-types.c: Include "objfiles.h".
4694         (convert_func): For functions with unknown return type, warn and
4695         default to int.
4696         * compile/compile-object-run.c (compile_object_run): Adjust call
4697         to call_function_by_hand_dummy.
4698         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4699         call_function_by_hand.
4700         * eval.c (evaluate_subexp_standard): Adjust calls to
4701         call_function_by_hand.  Handle functions and methods with unknown
4702         return type.  Pass expect_type to call_function_by_hand.
4703         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4704         return type.
4705         * gcore.c (call_target_sbrk): Adjust call to
4706         call_function_by_hand.
4707         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4708         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4709         an integer address type instead of nodebug.
4710         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4711         call_function_by_hand.
4712         * infcall.c (error_call_unknown_return_type): New function.
4713         (call_function_by_hand): New "default_return_type" parameter.
4714         Pass it down.
4715         (call_function_by_hand_dummy): New "default_return_type"
4716         parameter.  Use it instead of defaulting to int.  If there's no
4717         default and the return type is unknown, throw an error.  If
4718         there's a default return type, and the called function has no
4719         debug info, then assume the function is prototyped.
4720         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4721         New "default_return_type" parameter.
4722         (error_call_unknown_return_type): New declaration.
4723         * linux-fork.c (call_lseek): Cast return type of lseek.
4724         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4725         call_function_by_hand.
4726         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4727         calls to call_function_by_hand.
4728         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4729         return type.
4730         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4731         (value_nsstring, print_object_command): Adjust calls to
4732         call_function_by_hand.
4733         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4734         functions with unknown return type.
4735         (pascal_type_print_func_varspec_suffix): New function.
4736         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4737         TYPE_CODE_METHOD>: Use it.
4738         * python/py-value.c (valpy_call): Adjust call to
4739         call_function_by_hand.
4740         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4741         call_function_by_hand.
4742         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4743         call_function_by_hand.
4744         * valops.c (value_allocate_space_in_inferior): Adjust call to
4745         call_function_by_hand.
4746         * typeprint.c (type_print_unknown_return_type): New function.
4747         * typeprint.h (type_print_unknown_return_type): New declaration.
4748
4749 2017-09-04  Pedro Alves  <palves@redhat.com>
4750
4751         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4752         types with more than one parameter as prototyped.
4753
4754 2017-09-04  Pedro Alves  <palves@redhat.com>
4755
4756         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4757         (disassemble_command): Use gdb_disassembly_flags instead of bare
4758         int.
4759         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4760         (dump_insns, do_mixed_source_and_assembly_deprecated)
4761         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4762         Use gdb_disassembly_flags instead of bare int.
4763         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4764         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4765         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4766         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4767         (enum gdb_disassembly_flag): ... values of this new enumeration.
4768         (gdb_disassembly_flags): Define.
4769         (gdb_disassembly)
4770         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4771         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4772         gdb_disassembly_flags instead of bare int.
4773         * record-btrace.c (btrace_insn_history)
4774         (record_btrace_insn_history, record_btrace_insn_history_range)
4775         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4776         instead of bare int.
4777         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4778         Use gdb_disassembly_flags instead of bare int.
4779         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4780         Define.
4781         * target-delegates.c: Regenerate.
4782         * target.c (target_insn_history, target_insn_history_from)
4783         (target_insn_history_range): Use gdb_disassembly_flags instead of
4784         bare int.
4785         * target.h: Include "disasm.h".
4786         (struct target_ops) <to_insn_history, to_insn_history_from,
4787         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4788         int.
4789         (target_insn_history, target_insn_history_from)
4790         (target_insn_history_range): Use gdb_disassembly_flags instead of
4791         bare int.
4792
4793 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4794
4795         * cli/cli-script.c (build_command_line): For if/while commands,
4796         check whether args is empty.
4797
4798 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4799
4800         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4801         (enum command_control_type): Likewise.
4802         (struct command_line): Likewise.
4803         (free_command_lines): Likewise.
4804         (struct command_lines_deleter): Likewise.
4805         (command_line_up): Likewise.
4806         (read_command_lines): Likewise.
4807         (read_command_lines_1): Likewise.
4808         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4809         (enum command_control_type): Likewise.
4810         (struct command_line): Likewise.
4811         (free_command_lines): Likewise.
4812         (struct command_lines_deleter): Likewise.
4813         (command_line_up): Likewise.
4814         (read_command_lines): Likewise.
4815         (read_command_lines_1): Likewise.
4816         * breakpoint.h: Include cli/cli-script.h.
4817         * extension-priv.h: Likewise.
4818         * gdbcmd.h: Likewise.
4819
4820 2017-09-04  Pedro Alves  <palves@redhat.com>
4821
4822         * ada-lang.c (is_known_support_routine): Move sal declaration to
4823         where it is initialized.
4824         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4825         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4826         (clear_command, update_static_tracepoint): Remove init_sal
4827         references.  Move declarations closer to initializations.
4828         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4829         initializations.
4830         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4831         references.  Move sal declarations closer to initializations.
4832         * frame.c (find_frame_sal): Return a symtab_and_line via function
4833         return instead of output parameter.  Remove init_sal references.
4834         * frame.h (find_frame_sal): Return a symtab_and_line via function
4835         return instead of output parameter.
4836         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4837         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4838         instead of memset.
4839         (gdbscm_find_pc_line): Remove init_sal reference.
4840         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4841         references.  Move declarations closer to initializations.
4842         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4843         initializations.
4844         (finish_backward): Remove init_sal references.  Move declarations
4845         closer to initializations.
4846         * infrun.c (process_event_stop_test, handle_step_into_function)
4847         (insert_hp_step_resume_breakpoint_at_frame)
4848         (insert_step_resume_breakpoint_at_caller): Likewise.
4849         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4850         (symbol_to_sal): Likewise.
4851         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4852         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4853         to its initialization.
4854         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4855         init_sal references.  Move declarations closer to initializations.
4856         * source.c (get_current_source_symtab_and_line): Remove brace
4857         initialization.
4858         (set_current_source_symtab_and_line): Now takes the sal by const
4859         reference.  Remove brace initialization.
4860         (line_info): Remove init_sal reference.
4861         * source.h (set_current_source_symtab_and_line): Now takes a
4862         symtab_and_line via const reference.
4863         * stack.c (set_current_sal_from_frame): Adjust.
4864         (print_frame_info): Adjust.
4865         (get_last_displayed_sal): Return the sal via function return
4866         instead of via output parameter.  Simplify.
4867         (frame_info): Adjust.
4868         * stack.h (get_last_displayed_sal): Return the sal via function
4869         return instead of via output parameter.
4870         * symtab.c (init_sal): Delete.
4871         (find_pc_sect_line): Remove init_sal references.  Move
4872         declarations closer to initializations.
4873         (find_function_start_sal): Remove init_sal references.  Move
4874         declarations closer to initializations.
4875         * symtab.h (struct symtab_and_line): In-class initialize all
4876         fields.
4877         * tracepoint.c (set_traceframe_context)
4878         (print_one_static_tracepoint_marker): Remove init_sal references.
4879         Move declarations closer to initializations.
4880         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4881         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4882         declarations closer to initializations.
4883         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4884         init_sal references.  Adjust.
4885
4886 2017-09-04  Pedro Alves  <palves@redhat.com>
4887
4888         * ax-gdb.c (agent_command_1): Use range-for.
4889         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4890         * breakpoint.c: Include "common/array-view.h".
4891         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4892         parameter from struct symtabs_and_lines to
4893         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4894         (breakpoint_sals_to_pc): Change sals parameter from struct
4895         symtabs_and_lines to std::vector reference.
4896         (check_fast_tracepoint_sals): Change sals parameter from struct
4897         symtabs_and_lines to std::array_view.  Use range-for.
4898         (decode_static_tracepoint_spec): Return a std::vector instead of
4899         symtabs_and_lines.  Update.
4900         (create_breakpoint): Update.
4901         (break_range_command, until_break_command, clear_command): Update.
4902         (base_breakpoint_decode_location, bkpt_decode_location)
4903         (bkpt_probe_create_sals_from_location)
4904         (bkpt_probe_decode_location, tracepoint_decode_location)
4905         (tracepoint_probe_decode_location)
4906         (strace_marker_create_sals_from_location): Return a std::vector
4907         instead of symtabs_and_lines.
4908         (strace_marker_create_breakpoints_sal): Update.
4909         (strace_marker_decode_location): Return a std::vector instead of
4910         symtabs_and_lines.  Update.
4911         (update_breakpoint_locations): Change struct symtabs_and_lines
4912         parameters to gdb::array_view.  Adjust.
4913         (location_to_sals): Return a std::vector instead of
4914         symtabs_and_lines.  Update.
4915         (breakpoint_re_set_default): Use std::vector instead of struct
4916         symtabs_and_lines.
4917         (decode_location_default): Return a std::vector instead of
4918         symtabs_and_lines.  Update.
4919         * breakpoint.h: Include "common/array-view.h".
4920         (struct breakpoint_ops) <decode_location>: Now returns a
4921         std::vector instead of returning a symtabs_and_lines via output
4922         parameter.
4923         (update_breakpoint_locations): Change sals parameters to use
4924         gdb::array_view.
4925         * cli/cli-cmds.c (edit_command, list_command): Update to use
4926         std::vector and gdb::array_view.
4927         (ambiguous_line_spec): Adjust to use gdb::array_view and
4928         range-for.
4929         (compare_symtabs): Rename to ...
4930         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4931         const reference and adjust.
4932         (filter_sals): Rewrite using std::vector and standard algorithms.
4933         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4934         (jump_command): Update to use std::vector.
4935         * linespec.c (struct linespec_state) <canonical_names>: Update
4936         comment.
4937         (add_sal_to_sals_basic): Delete.
4938         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4939         (decode_line_2, create_sals_line_offset)
4940         (convert_address_location_to_sals, convert_linespec_to_sals)
4941         (convert_explicit_location_to_sals, parse_linespec)
4942         (event_location_to_sals, decode_line_full, decode_line_1)
4943         (decode_line_with_current_source)
4944         (decode_line_with_last_displayed, decode_objc)
4945         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4946         (linespec_result::~linespec_result): Adjust to use std::vector
4947         instead of symtabs_and_lines.
4948         * linespec.h (linespec_sals::sals): Now a std::vector.
4949         (struct linespec_result): Use std::vector, bool, and in-class
4950         initialization.
4951         (decode_line_1, decode_line_with_current_source)
4952         (decode_line_with_last_displayed): Return std::vector.
4953         * macrocmd.c (info_macros_command): Use std::vector.
4954         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4955         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4956         std::vector.
4957         * probe.h (parse_probes): Return a std::vector.
4958         * python/python.c (gdbpy_decode_line): Use std::vector and
4959         gdb::array_view.
4960         * source.c (select_source_symtab, line_info): Use std::vector.
4961         * stack.c (func_command): Use std::vector.
4962         * symtab.h (struct symtabs_and_lines): Delete.
4963         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4964
4965 2017-09-04  Pedro Alves  <palves@redhat.com>
4966
4967         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4968         unittests/array-view-selftests.c.
4969         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4970         * common/array-view.h: New file.
4971         * unittests/array-view-selftests.c: New file.
4972
4973 2017-09-04  Pedro Alves  <palves@redhat.com>
4974
4975         * cli/cli-cmds.c (edit_command): Pass message to
4976         ambiguous_line_spec.
4977         (list_command): Pass message to ambiguous_line_spec.  Say
4978         "first"/"last" instead of "start" and "end" to be consistent with
4979         the manual.
4980         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4981         them to print formatted message.
4982
4983 2017-09-04  Pedro Alves  <palves@redhat.com>
4984
4985         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4986         ftrace_update_insns by reference instead of pointer.
4987
4988 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4989
4990         * i386-go32-tdep.c: Include x86-xstate.h.
4991         (i386_go32_init_abi): Call i386_target_description.
4992         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4993         if xcr0 is X86_XSTATE_X87_MASK.
4994         * i386-tdep.h (tdesc_i386): Remove the declaration.
4995         (tdesc_i386_mmx): Likewise.
4996
4997 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4998
4999         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5000         X86_XSTATE_SSE_MASK instead of 0.
5001
5002 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5003
5004         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5005         i386_target_description.
5006         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5007         i386_target_description.
5008         * i386-tdep.c (i386_gdbarch_init): Likewise.
5009
5010 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5011
5012         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5013         (x86_darwin_init_abi_64): Call amd64_target_description.
5014         * amd64-dicos-tdep.c: Likewise.
5015         * amd64-fbsd-nat.c: Likewise.
5016         * amd64-fbsd-tdep.c: Likewise.
5017         * amd64-nbsd-tdep.c: Likewise.
5018         * amd64-obsd-tdep.c: Likewise.
5019         * amd64-sol2-tdep.c: Likewise.
5020         * amd64-windows-tdep.c: Likewise.
5021         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5022
5023 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5024
5025         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5026         (btrace_function) <insn>: Change type to use std::vector.
5027         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5028         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5029         ftrace_update_insns, ftrace_compute_global_level_offset,
5030         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5031         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5032         change to std::vector.
5033         (ftrace_update_insns): Adjust to change to std::vector, change
5034         type of INSN parameter.
5035         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5036         * record-btrace.c (btrace_call_history_insn_range,
5037         btrace_compute_src_line_range,
5038         record_btrace_frame_prev_register): Adjust to change to
5039         std::vector.
5040         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5041         to change to std::vector.
5042
5043 2017-09-03  Tom Tromey  <tom@tromey.com>
5044
5045         * corefile.c (reopen_exec_file): Use std::string.
5046
5047 2017-09-03  Tom Tromey  <tom@tromey.com>
5048
5049         * compile/compile.c (compile_register_name_mangled): Return
5050         std::string.
5051         * compile/compile-loc2c.c (pushf_register_address): Update.
5052         (pushf_register): Update.
5053         * compile/compile-c-types.c (convert_array): Update.
5054         * compile/compile-c-symbols.c (generate_vla_size): Update.
5055         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5056         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5057         (convert_one_symbol): Update.
5058         (generate_c_for_for_one_variable): Update.
5059         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5060         std::string.
5061         (generate_register_struct): Update.
5062         * compile/compile-internal.h (c_get_range_decl_name): Return a
5063         std::string.
5064         (compile_register_name_mangled): Return std::string.
5065
5066 2017-09-03  Tom Tromey  <tom@tromey.com>
5067
5068         * utils.c (perror_string): Return a std::string.
5069         (throw_perror_with_name, perror_warning_with_name): Update.
5070
5071 2017-09-03  Tom Tromey  <tom@tromey.com>
5072
5073         * demangle.c (demangle_command): Use std::string,
5074         unique_xmalloc_ptr.
5075
5076 2017-09-03  Tom Tromey  <tom@tromey.com>
5077
5078         * cli/cli-setshow.c (do_set_command): Use std::string.
5079
5080 2017-09-03  Tom Tromey  <tom@tromey.com>
5081
5082         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5083
5084 2017-09-03  Tom Tromey  <tom@tromey.com>
5085
5086         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5087
5088 2017-09-03  Tom Tromey  <tom@tromey.com>
5089
5090         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5091         gdb::unique_xmalloc_ptr.
5092
5093 2017-09-03  Tom Tromey  <tom@tromey.com>
5094
5095         * thread.c (print_thread_info_1): Use string_printf.
5096         (thread_apply_command, thread_apply_all_command): Use
5097         std::string.
5098
5099 2017-09-03  Tom Tromey  <tom@tromey.com>
5100
5101         * valprint.c (val_print_string): Update.
5102         * gdbcore.h (memory_error_message): Return std::string.
5103         * corefile.c (memory_error_message): Return std::string.
5104         (memory_error): Update.
5105         * breakpoint.c (insert_bp_location): Update.
5106
5107 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5108
5109         * target/waitstatus.h (target_waitstatus_to_string): Change
5110         return type to std::string.
5111         * target/waitstatus.c (target_waitstatus_to_string): Return
5112         std::string.
5113         * target.h (target_waitstatus_to_string): Remove declaration.
5114         * infrun.c (resume, clear_proceed_status_thread,
5115         print_target_wait_results, do_target_wait, save_waitstatus,
5116         stop_all_threads): Adjust.
5117         * record-btrace.c (record_btrace_wait): Adjust.
5118         * target-debug.h
5119         (target_debug_print_struct_target_waitstatus_p): Adjust.
5120
5121 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5122
5123         PR gdb/22046
5124         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5125         detection.
5126
5127 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5128
5129         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5130         for setting/unsetting environment variables on the remote target.
5131         (New remote packets): Add entries for QEnvironmentHexEncoded,
5132         QEnvironmentUnset and QEnvironmentReset.
5133         * common/environ.c (gdb_environ::operator=): Extend method to
5134         handle m_user_set_env_list and m_user_unset_env_list.
5135         (gdb_environ::clear): Likewise.
5136         (match_var_in_string): Change type of first parameter from 'char
5137         *' to 'const char *'.
5138         (gdb_environ::set): Extend method to handle
5139         m_user_set_env_list and m_user_unset_env_list.
5140         (gdb_environ::unset): Likewise.
5141         (gdb_environ::clear_user_set_env): New method.
5142         (gdb_environ::user_set_envp): Likewise.
5143         (gdb_environ::user_unset_envp): Likewise.
5144         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5145         m_user_unset_env_list on move constructor/assignment.
5146         (unset): Add new default parameter 'update_unset_list = true'.
5147         (clear_user_set_env): New method.
5148         (user_set_envp): Likewise.
5149         (user_unset_envp): Likewise.
5150         (m_user_set_env_list): New std::set.
5151         (m_user_unset_env_list): Likewise.
5152         * common/rsp-low.c (hex2str): New function.
5153         (bin2hex): New overload for bin2hex function.
5154         * common/rsp-low.c (hex2str): New prototype.
5155         (str2hex): New overload prototype.
5156         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5157         QEnvironmentUnset and QEnvironmentReset.
5158         (remote_protocol_features): Add QEnvironmentHexEncoded,
5159         QEnvironmentUnset and QEnvironmentReset packets.
5160         (send_environment_packet): New function.
5161         (extended_remote_environment_support): Likewise.
5162         (extended_remote_create_inferior): Call
5163         extended_remote_environment_support.
5164         (_initialize_remote): Add QEnvironmentHexEncoded,
5165         QEnvironmentUnset and QEnvironmentReset packet configs.
5166         * unittests/environ-selftests.c (gdb_selftest_env_var):
5167         New variable.
5168         (test_vector_initialization): New function.
5169         (test_init_from_host_environ): Likewise.
5170         (test_reinit_from_host_environ): Likewise.
5171         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5172         Likewise.
5173         (test_unset_set_empty_vector): Likewise.
5174         (test_vector_clear): Likewise.
5175         (test_std_move): Likewise.
5176         (test_move_constructor):
5177         (test_self_move): Likewise.
5178         (test_set_unset_reset): Likewise.
5179         (run_tests): Rewrite in terms of the functions above.
5180
5181 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5182
5183         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5184         (adi_available): Use a temp variable of type CORE_ADDR as argument
5185         3 when calling target_auxv_search.
5186         (adi_normalize_address): Use masks and xor operators to calculate
5187         normalized address.
5188         (adi_read_versions, adi_write_versions, adi_print_versions)
5189         (do_examine, do_assign): Use paddress.
5190
5191 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5192
5193         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5194         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5195         out of loop and add supply of FIR.
5196         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5197         add collect of FIR.
5198
5199 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5200
5201         PR gdb/21827
5202         * cli/cli-script.c (define_command): Don't convert command name
5203         to lower case.
5204
5205 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5206
5207         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5208         Update all callers accordingly. Remove all code blocks handling
5209         the case where DISPP is not NULL.
5210
5211 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5212
5213         PR symtab/22003
5214         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5215         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5216         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5217
5218 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5219
5220         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5221         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5222         (read_comp_units_from_section): New parameter abbrev_section, use
5223         read_and_check_comp_unit_head, allocate signatured_type if needed.
5224         (create_all_comp_units): Update read_comp_units_from_section caller.
5225
5226 2017-08-23  Pedro Alves  <palves@redhat.com>
5227
5228         PR remote/21852
5229         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5230         to null_ptid and switch to thread without reading the registers
5231         after adding the inferior.
5232
5233 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5234
5235         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5236         compile-gcc.
5237         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5238         (compile_to_object): Implement compile_gcc.
5239         (_initialize_compile): Install "set compile-gcc".  Initialize
5240         compile_gcc.
5241
5242 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5243
5244         * compile/compile.c (compile_to_object): Conditionally call
5245         set_verbose.  Conditionally call compile or compile_v0.
5246
5247 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5248
5249         * sparc64-tdep.h: (adi_normalize_address): New export.
5250         * sparc-nat.h: (open_adi_tag_fd): New export.
5251         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5252         * sparc64-linux-tdep.c:
5253         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5254         (sparc64_linux_handle_segmentation_fault): New function.
5255         (sparc64_linux_init_abi): Register
5256         sparc64_linux_handle_segmentation_fault
5257         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5258         (sparc64_addr_bits_remove): New function.
5259         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5260         (MAX_PROC_NAME_SIZE): New macro.
5261         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5262         (sparc64adilist): New variable.
5263         (adi_proc_list): New variable.
5264         (find_adi_info): New function.
5265         (add_adi_info): New function.
5266         (get_adi_info_proc): New function.
5267         (get_adi_info): New function.
5268         (info_adi_command): New function.
5269         (read_maps_entry): New function.
5270         (adi_available): New function.
5271         (adi_normalize_address): New function.
5272         (adi_align_address): New function.
5273         (adi_convert_byte_count): New function.
5274         (adi_tag_fd): New function.
5275         (adi_is_addr_mapped): New function.
5276         (adi_read_versions): New function.
5277         (adi_write_versions): New function.
5278         (adi_print_versions): New function.
5279         (do_examine): New function.
5280         (do_assign): New function.
5281         (adi_examine_command): New function.
5282         (adi_assign_command): New function.
5283         (_initialize_sparc64_adi_tdep): New function.
5284
5285 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5286
5287         * breakpoint.c (breakpoints_info): Rename to ...
5288         (info_breakpoints_command): ... this.
5289         (watchpoints_info): Rename to ...
5290         (info_watchpoints_command): ... this.
5291         (tracepoints_info): Rename to ...
5292         (info_tracepoints_command): ... this.
5293         (_initialize_breakpoint): Adjust.
5294         * dcache.c (dcache_info): Rename to ...
5295         (info_display_command): ... this.
5296         (_initialize_dcache): Adjust.
5297         * frame.h (args_info): Rename to ...
5298         (info_args_command): ... this.
5299         (locals_info): Rename to ...
5300         (info_locals_command): ... this.
5301         * infcmd.c (nofp_registers_info): Rename to ...
5302         (info_registers_command): ... this.
5303         (float_info): Rename to ...
5304         (info_float_command): ... this.
5305         (program_info): Rename to ...
5306         (info_program_command): ... this.
5307         (all_registers_info): Rename to ...
5308         (info_all_registers_command): ... this.
5309         (vector_info): Rename to ...
5310         (info_vector_command): ... this.
5311         (float_info): Rename to ...
5312         (info_float_command): ... this.
5313         (_initialize_infcmd): Adjust.
5314         * inferior.h (term_info): Rename to ...
5315         (info_terminal_command): ... this.
5316         * inflow.c (term_info): Rename to ...
5317         (info_terminal_command): ... this.
5318         (_initialize_inflow): Adjust.
5319         * infrun.c (signals_info): Rename to ...
5320         (info_signals_command): ... this.
5321         (_initialize_infrun): Adjust.
5322         * objc-lang.c (classes_info): Rename to ...
5323         (info_classes_command): ... this.
5324         (selectors_info): Rename to ...
5325         (info_selectors_command): ... this.
5326         (_initialize_objc_language): Adjust.
5327         * printcmd.c (sym_info): Rename to ...
5328         (info_symbol_command): ... this.
5329         (address_info): Rename to ...
5330         (info_address_command): ... this.
5331         (display_info): Rename to ...
5332         (info_display_command): ... this.
5333         (_initialize_printcmd): Adjust.
5334         * reverse.c (bookmarks_info): Rename to ...
5335         (info_breakpoints_command): ... this.
5336         (_initialize_reverse): Adjust.
5337         * ser-go32.c (dos_info): Rename to ...
5338         (info_serial_command): ... this.
5339         (_initialize_ser_dos): Adjust.
5340         * skip.c (skip_info): Rename to ...
5341         (info_skip_command): ... this.
5342         (_initialize_step_skip): Adjust.
5343         * source.c (line_info): Rename to ...
5344         (info_line_command): ... this.
5345         (source_info): Rename to ...
5346         (info_source_command)
5347         * stack.c (frame_info): Rename to ...
5348         (info_frame_command): ... this.
5349         (locals_info): Rename to ...
5350         (info_locals_command): ... this.
5351         (args_info): Rename to ...
5352         (info_args_command): ... this.
5353         (_initialize_stack): Adjust.
5354         * symtab.c (sources_info): Rename to ...
5355         (info_sources_command): ... this.
5356         (variables_info): Rename to ...
5357         (info_variables_command): ... this.
5358         (functions_info): Rename to ...
5359         (info_functions_command): ... this.
5360         (types_info): Rename to ...
5361         (info_types_command): ... this.
5362         (_initialize_symtab): Adjust.
5363         * target.c (target_info): Rename to ...
5364         (info_target_command): ... this.
5365         (initialize_targets): Adjust.
5366         * tracepoint.c (tvariables_info): Rename to ...
5367         (info_tvariables_command): ... this.
5368         (scope_info): Rename to ...
5369         (info_scope_command): ... this.
5370         (trace_dump_actions): Adjust.
5371         (_initialize_tracepoint): Adjust.
5372
5373 2017-08-22  Tom Tromey  <tom@tromey.com>
5374
5375         * breakpoint.h (install_breakpoint): Update.
5376         * breakpoint.c (add_solib_catchpoint): Update.
5377         (install_breakpoint): Change argument to a std::unique_ptr.
5378         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5379         (create_breakpoint_sal, create_breakpoint): Update.
5380         (watch_command_1, catch_exec_command_1)
5381         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5382         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5383         Return the breakpoint.
5384         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5385         (new_single_step_breakpoint): Update.
5386         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5387         std::unique_ptr.
5388         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5389         std::unique_ptr.
5390         * break-catch-sig.c (create_signal_catchpoint): Use
5391         std::unique_ptr.
5392         * ada-lang.c (create_ada_exception_catchpoint): Use
5393         std::unique_ptr.
5394
5395 2017-08-22  Tom Tromey  <tom@tromey.com>
5396
5397         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5398
5399 2017-08-22  Tom Tromey  <tom@tromey.com>
5400
5401         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5402         (lookup_partial_symbol): Update.
5403
5404 2017-08-22  Tom Tromey  <tom@tromey.com>
5405
5406         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5407         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5408         (find_and_open_source, symtab_to_fullname): Update.
5409         * psymtab.c (psymtab_to_fullname): Update.
5410
5411 2017-08-22  Tom Tromey  <tom@tromey.com>
5412
5413         * exec.c (exec_file_attach): Update.
5414         * linux-thread-db.c (try_thread_db_load): Update.
5415         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5416         * utils.c (gdb_realpath): Change return type.
5417         (gdb_realpath_keepfile): Update.
5418         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5419         (_initialize_utils): Register the new self test.
5420         * source.c (openp): Update.
5421         (find_and_open_source): Update.
5422         * nto-tdep.c (nto_find_and_open_solib): Update.
5423         * main.c (set_gdb_data_directory): Update.
5424         (captured_main_1): Update.
5425         * dwarf2read.c (dwarf2_get_dwz_file): Update
5426         (dw2_map_symbol_filenames): Update.
5427         * auto-load.c (auto_load_safe_path_vec_update): Update.
5428         (filename_is_in_auto_load_safe_path_vec): Change type of
5429         "filename_realp".
5430         (auto_load_objfile_script): Update.
5431         (file_is_auto_load_safe): Update.  Use std::string.
5432         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5433
5434 2017-08-22  Tom Tromey  <tom@tromey.com>
5435
5436         * utils.c (gdb_realpath_keepfile): Return a
5437         gdb::unique_xmalloc_ptr.
5438         * exec.c (exec_file_attach): Update.
5439         * utils.h (gdb_realpath_keepfile): Return a
5440         gdb::unique_xmalloc_ptr.
5441
5442 2017-08-22  Tom Tromey  <tom@tromey.com>
5443
5444         * compile/compile.c (compile_file_command): Use
5445         gdb::unique_xmalloc_ptr, std::string.
5446         * utils.c (gdb_abspath): Change return type.
5447         * source.c (openp): Update.
5448         * objfiles.c (allocate_objfile): Update.
5449         * main.c (set_gdb_data_directory): Update.
5450         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5451
5452 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5453
5454         * cli-cmds.c (list_commands): List actual code around more than
5455         one location.
5456
5457 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5458
5459         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5460
5461 2017-08-21  Pedro Alves  <palves@redhat.com>
5462
5463         PR gdb/19487
5464         * c-exp.y (variable production): Handle function aliases.
5465         * minsyms.c (msymbol_is_text): New function.
5466         * minsyms.h (msymbol_is_text): Declare.
5467         * symtab.c (find_function_alias_target): New function.
5468         * symtab.h (find_function_alias_target): Declare.
5469
5470 2017-08-21  Pedro Alves  <palves@redhat.com>
5471
5472         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5473         typedefs.
5474         * typeprint.c (whatis_exp): If handling "whatis", and expression
5475         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5476         typedefs here.
5477         * valops.c (value_cast): Save "to" type before resolving
5478         stubs/typedefs.  Use that type as resulting value's type.
5479
5480 2017-08-18  Tom Tromey  <tom@tromey.com>
5481             Pedro Alves  <palves@redhat.com>
5482
5483         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5484         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5485         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5486         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5487         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5488         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5489         (linux_get_siginfo_data): Add "thread" argument.  Use
5490         scoped_restore.
5491         * linux-nat.c (linux_child_follow_fork)
5492         (check_stopped_by_watchpoint): Use scoped_restore.
5493         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5494         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5495         (restore_inferior_ptid, save_inferior_ptid): Remove.
5496         * btrace.c (btrace_fetch): Use scoped_restore.
5497         * bsd-uthread.c (bsd_uthread_fetch_registers)
5498         (bsd_uthread_store_registers): Use scoped_restore.
5499         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5500         scoped_restore.
5501         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5502         (aix_thread_xfer_partial): Use scoped_restore.
5503         * inferior.h (save_inferior_ptid): Remove.
5504
5505 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5506
5507         PR tdep/21818
5508         * arm-tdep.c (gdb_print_insn_arm): Mark
5509         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5510
5511 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5512
5513         * NEWS: Mention GDBserver's new option "--selftest".
5514         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5515         * selftest.c: Move it to common/selftest.c.
5516         * selftest.h: Move it to common/selftest.h.
5517         * selftest-arch.c (reset): New function.
5518         (tests_with_arch): Call reset.
5519
5520 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5521
5522         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5523         instead of exception_fprintf and printf_filtered.
5524
5525 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5526
5527         * selftest.c (register_self_test): Rename it to
5528         selftests::register_test.
5529         (run_self_tests): selftest::run_tests.
5530         * selftest.h: Update declarations.
5531         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5532         selftests::register_test_foreach_arch.
5533         * selftest-arch.h: Update declaration.
5534         * aarch64-tdep.c: Update.
5535         * arm-tdep.c: Likewise.
5536         * disasm-selftests.c: Likewise.
5537         * dwarf2loc.c: Likewise.
5538         * dwarf2-frame.c: Likewise.
5539         * findvar.c: Likewise.
5540         * gdbarch-selftests.c: Likewise.
5541         * maint.c (maintenance_selftest): Likewise.
5542         * regcache.c: Likewise.
5543         * rust-exp.y: Likewise.
5544         * selftest-arch.c: Likewise.
5545         * unittests/environ-selftests.c: Likewise.
5546         * unittests/function-view-selftests.c: Likewise.
5547         * unittests/offset-type-selftests.c: Likewise.
5548         * unittests/optional-selftests.c: Likewise.
5549         * unittests/scoped_restore-selftests.c: Likewise.
5550         * utils-selftests.c: Likewise.
5551
5552 2017-08-17  Pedro Alves  <palves@redhat.com>
5553
5554         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5555         local.
5556
5557 2017-08-17  Pedro Alves  <palves@redhat.com>
5558
5559         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5560         field.
5561         (reset_die_in_process): Delete, replaced by ...
5562         (process_die_scope): ... this new class.  Make it responsible for
5563         freeing cu->line_header too.
5564         (process_die): Use process_die_scope.
5565         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5566         cu->line_header_die_owner.  Don't release the line header if it's
5567         owned by the CU.
5568         (setup_type_unit_groups): Make the CU/DIE own the line header.
5569         Don't release the line header here.
5570
5571 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5572
5573         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5574
5575 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5576
5577         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5578         Single-Key mode
5579
5580 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5581
5582         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5583         mode command list.
5584
5585 2017-08-15  Stafford Horne  <shorne@gmail.com>
5586
5587         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5588
5589 2017-08-15  Stafford Horne  <shorne@gmail.com>
5590
5591         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5592
5593 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5594
5595         PR gdb/21954
5596         * infcmd.c (unset_environment_command): Use the 'clear' method on
5597         the environment instead of resetting it.
5598
5599 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5600
5601         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5602         platforms.
5603
5604 2017-08-14  Tom Tromey  <tom@tromey.com>
5605
5606         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5607         (print_binary_chars): Likewise.
5608         (BITS_IN_BYTES): Remove.
5609
5610 2017-08-14  Tom Tromey  <tom@tromey.com>
5611
5612         PR gdb/21675
5613         * valprint.c (LOW_ZERO): Change value to 034.
5614         (print_octal_chars): Add static_asserts for octal constants.
5615         * printcmd.c (print_scalar_formatted): Add 'd' case.
5616
5617 2017-08-11  Tom Tromey  <tom@tromey.com>
5618
5619         * symfile.c (add_symbol_file_command): Use std::vector.
5620
5621 2017-08-14  Tom Tromey  <tom@tromey.com>
5622
5623         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5624         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5625         std::move.
5626         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5627
5628 2017-08-11  Pedro Alves  <palves@redhat.com>
5629
5630         * infrun.c (process_event_stop_test): Adjust
5631         function_name_is_marked_for_skip call.
5632         * skip.c: Include <list>.
5633         (skiplist_entry): Make it a class with private fields, and
5634         getters/setters.
5635         (skiplist_entry_chain): Delete.
5636         (skiplist_entries): New.
5637         (skiplist_entry_count): Delete.
5638         (highest_skiplist_entry_num): New.
5639         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5640         (add_skiplist_entry): Delete.
5641         (skiplist_entry::skiplist_entry): New.
5642         (skiplist_entry::add_entry): New.
5643         (skip_file_command, skip_function): Adjust.
5644         (compile_skip_regexp): Delete.
5645         (skip_command): Don't compile regexp here.  Adjust to use
5646         skiplist_entry::add_entry.
5647         (skip_info): Adjust to use range-for and getters.
5648         (skip_enable_command, skip_disable_command): Adjust to use
5649         range-for and setters.
5650         (skip_delete_command): Adjust to use std::list.
5651         (add_skiplist_entry): Delete.
5652         (skip_file_p): Delete, refactored as ...
5653         (skiplist_entry::do_skip_file_p): ... this new method.
5654         (skip_gfile_p): Delete, refactored as ...
5655         (skiplist_entry::do_gskip_file_p): ... this new method.
5656         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5657         (skiplist_entry::skip_function_p): ... this new method.
5658         (function_name_is_marked_for_skip): Now returns bool, and takes
5659         the function sal by const reference.  Adjust to use range-for and
5660         skiplist_entry methods.
5661         (_initialize_step_skip): Remove references to
5662         skiplist_entry_chain, skiplist_entry_count.
5663         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5664         takes the function sal by const reference.
5665
5666 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5667
5668         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5669         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5670         (dwarf2_frame_cache):
5671         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5672         RETURN_MASK_ALL and set *this_case to NULL.
5673         * frame-unwind.h: Update comments.
5674
5675 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5676
5677         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5678         (dwarf2_frame_state_copy_regs): Remove.
5679         (dwarf2_frame_state_free_regs): Remove.
5680         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5681         (dwarf2_restore_rule): Call method .alloc_regs instead of
5682         dwarf2_frame_state_alloc_regs.
5683         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5684         constructor.  Call std::move.
5685         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5686         (dwarf2_frame_cache): Likewise.
5687
5688         [GDB_SELF_TEST]: Include selftest.h and
5689         selftest-arch.h.
5690         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5691         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5692         execute_cfa_program_test.
5693
5694         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5695         copy ctor, assignment operator, move assignment.
5696         <alloc_regs>: New method.
5697         <swap>: New method.
5698         (struct dwarf2_frame_state): Delete dtor.
5699         (dwarf2_frame_state_alloc_regs): Remove declaration.
5700         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5701         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5702
5703 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5704
5705         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5706         (dwarf2_frame_state::dwarf2_frame_state): New.
5707         (dwarf2_frame_state::~dwarf2_frame_state): New.
5708         (dwarf2_fetch_cfa_info): Update.
5709         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5710         rather than a pointer.  Update code.
5711         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5712         dtor.
5713         <data_align, code_align, retaddr_column>: Change them to const.
5714         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5715         to bool.
5716
5717 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5718
5719         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5720         <loc.exp>: New field.
5721         * dwarf2-frame.c (execute_cfa_program): Update.
5722         (dwarf2_frame_prev_register): Update.
5723
5724 2017-08-10  Pedro Alves  <palves@redhat.com>
5725
5726         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5727
5728 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5729
5730         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5731         (fbsd_pending_children): Use std::list.
5732         (fbsd_remember_child): Likewise.
5733         (fbsd_is_child_pending): Likewise.
5734         (fbsd_pending_vfork_done): Use std::forward_list.
5735         (fbsd_add_vfork_done): Likewise.
5736         (fbsd_is_vfork_done_pending): Likewise.
5737         (fbsd_next_vfork_done): Likewise.
5738
5739 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5740
5741         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5742         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5743         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5744         for `mapfilename'.
5745         (fbsd_xfer_partial): Use gdb::byte_vector.
5746         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5747
5748 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5749
5750         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5751         "filestuff.h".
5752         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5753
5754 2017-08-09  Tom Tromey  <tom@tromey.com>
5755
5756         * skip.c (skiplist_entry): New constructor.
5757         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5758         (skiplist_entry::file_is_glob): Now bool.
5759         (skiplist_entry::file, skiplist_entry::function): Now
5760         std::string.
5761         (make_skip_entry): Return a unique_ptr.  Use new.
5762         (free_skiplist_entry, free_skiplist_entry_cleanup)
5763         (make_free_skiplist_entry_cleanup): Remove.
5764         (skip_command, skip_disable_command, add_skiplist_entry)
5765         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5766         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5767         (function_name_is_marked_for_skip): Update.
5768         (skip_delete_command): Update.  Use delete.
5769
5770 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5771
5772         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5773         (aarch64_linux_core_read_description): New function.
5774         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5775
5776 2017-08-09  Pedro Alves  <palves@redhat.com>
5777
5778         * cp-name-parser.y (cp_comp_to_string): Return a
5779         gdb::unique_xmalloc_ptr<char>.
5780         * cp-support.c (replace_typedefs_qualified_name)
5781         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5782         (cp_canonicalize_string_full): Use op= instead of explicit
5783         convertion.
5784         (cp_class_name_from_physname, method_name_from_physname)
5785         (cp_func_name, cp_remove_params): Adjust to use
5786         gdb::unique_xmalloc_ptr<char>.
5787         * cp-support.h (cp_comp_to_string): Return a
5788         gdb::unique_xmalloc_ptr<char>.
5789         * python/py-type.c (typy_lookup_type): Adjust to use
5790         gdb::unique_xmalloc_ptr<char>.
5791
5792 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5793
5794         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5795
5796 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5797             Yao Qi  <yao.qi@linaro.org>
5798
5799         * cp-support.c (cp_canonicalize_string_full): Use
5800         gdb::unique_xmalloc_ptr<char>.
5801         (cp_canonicalize_string): Likewise.
5802
5803 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5804
5805         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5806         * regformats/i386/amd64-avx-avx512.dat: Remove.
5807         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5808         * regformats/i386/amd64-avx-mpx.dat:Remove.
5809         * regformats/i386/amd64-avx.dat: Remove.
5810         * regformats/i386/amd64-mpx.dat: Remove.
5811         * regformats/i386/i386-avx-avx512.dat: Remove.
5812         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5813         * regformats/i386/i386-avx-mpx.dat: Remove.
5814         * regformats/i386/i386-mmx.dat: Remove.
5815         * regformats/i386/i386-mpx.dat: Remove.
5816
5817 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5818
5819         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5820         * amd64-tdep.c: Don't include features/i386/x32*.c.
5821         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5822         functions.
5823         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5824         and i386/x32-avx-avx512.
5825         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5826         and i386/x32.xml.
5827         * features/i386/x32-avx-avx512.c: Removed.
5828         * features/i386/x32-avx-avx512.xml: Removed.
5829         * features/i386/x32-avx.c: Removed.
5830         * features/i386/x32-avx.xml: Removed.
5831         * features/i386/x32.c: Removed.
5832         * features/i386/x32.xml: Removed.
5833         * regformats/i386/x32-avx-avx512.dat: Removed.
5834         * regformats/i386/x32-avx.dat: Removed.
5835         * regformats/i386/x32.dat: Removed.
5836
5837 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5838
5839         PR breakpoints/21886
5840         * mem-break.c (default_memory_insert_breakpoint): Use
5841         `->placed_address' rather than `->reqstd_address' for the
5842         breakpoint location.
5843
5844 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5845
5846         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5847         assertions.
5848
5849 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5850
5851         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5852         a union of `tdep_info', `tdesc_data' and `id'.
5853         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5854         rather than `info.tdep_info'.
5855         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5856         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5857         * i386-tdep.c (i386_gdbarch_init): Likewise.
5858         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5859         * mips-tdep.c (mips_gdbarch_init): Likewise.
5860         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5861         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5862         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5863         `info.tdep_info'.
5864         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5865         `info.tdep_info'.
5866         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5867         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5868         `info.tdep_info'.
5869         * spu-tdep.c (spu_gdbarch_init): Likewise.
5870         * gdbarch.h: Regenerate.
5871
5872 2017-08-07  Leszek Swirski  <leszeks@google.com>
5873
5874         PR symtab/20899
5875         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5876
5877 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5878
5879         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5880         (gdbsim_open): Rename gdb_argv args object to argv.
5881
5882 2017-08-05  Tom Tromey  <tom@tromey.com>
5883
5884         * compile/compile-object-load.c (compile_object_load): Use
5885         gdb::unique_xmalloc_ptr.
5886         * cli/cli-dump.c (scan_filename): Rename from
5887         scan_filename_with_cleanup.  Change return type.
5888         (scan_expression): Rename from scan_expression_with_cleanup.
5889         Change return type.
5890         (dump_memory_to_file, dump_value_to_file, restore_command):
5891         Use gdb::unique_xmalloc_ptr.  Update.
5892         * cli/cli-cmds.c (find_and_open_script): Use
5893         gdb::unique_xmalloc_ptr.
5894         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5895         * symmisc.c (maintenance_print_symbols)
5896         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5897         * symfile.c (symfile_bfd_open, generic_load)
5898         (add_symbol_file_command, remove_symbol_file_command): Use
5899         gdb::unique_xmalloc_ptr.
5900         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5901         * psymtab.c (maintenance_print_psymbols): Use
5902         gdb::unique_xmalloc_ptr.
5903         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5904         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5905         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5906         (reload_shared_libraries_1): Likewise.
5907
5908 2017-08-05  Tom Tromey  <tom@tromey.com>
5909
5910         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5911         (rust_op_vector, rust_set_vector): New typedefs.
5912         (current_parser): New global.
5913         (work_obstack): Change to pointer type.  Update all users.
5914         (rust_ast, pstate): Remove globals.
5915         (struct rust_parser): New.
5916         (%union) <params, field_inits>: Change type.
5917         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5918         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5919         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5920         (convert_params_to_types, convert_params_to_expression): Change
5921         type of "params".
5922         (ast_string): Change type of "fields".
5923         (rust_parse): Make a rust_parser.  Remove cleanups.
5924         (rust_lex_tests): Make and install an auto_obstack.
5925
5926 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5927
5928         * configure.srv (ipa_x32_linux_regobj): New.
5929         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5930         instead of X86_TDESC_AVX512.
5931         (initialize_low_tracepoint): Call
5932         init_registers_x32_avx_avx512_linux.
5933
5934 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5935
5936         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5937
5938 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5939
5940         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5941
5942 2017-08-03  Tom Tromey  <tom@tromey.com>
5943
5944         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5945         Remove.
5946         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5947
5948 2017-08-03  Tom Tromey  <tom@tromey.com>
5949
5950         * python/py-param.c (compute_enum_values): Use gdb_argv.
5951
5952 2017-08-03  Tom Tromey  <tom@tromey.com>
5953
5954         * utils.h (struct gdb_argv_deleter): New.
5955         (gdb_argv): New class.
5956         * utils.c (gdb_argv::reset): New method.
5957         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5958         * tracefile.c (tsave_command): Use gdb_argv.
5959         * top.c (new_ui_command): Use gdb_argv.
5960         * symmisc.c (maintenance_print_symbols)
5961         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5962         * symfile.c (symbol_file_command, generic_load)
5963         (remove_symbol_file_command): Use gdb_argv.
5964         * stack.c (backtrace_command): Use gdb_argv.
5965         * source.c (add_path, show_substitute_path_command)
5966         (unset_substitute_path_command, set_substitute_path_command):
5967         Use gdb_argv.
5968         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5969         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5970         * remote.c (extended_remote_run, remote_put_command)
5971         (remote_get_command, remote_delete_command): Use gdb_argv.
5972         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5973         (gdbsim_open): Use gdb_argv.
5974         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5975         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5976         * procfs.c (procfs_info_proc): Use gdb_argv.
5977         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5978         * infrun.c (handle_command): Use gdb_argv.
5979         * inferior.c (add_inferior_command, clone_inferior_command):
5980         Use gdb_argv.
5981         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5982         * exec.c (exec_file_command): Use gdb_argv.
5983         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5984         * compile/compile.c (build_argc_argv): Use gdb_argv.
5985
5986 2017-08-03  Tom Tromey  <tom@tromey.com>
5987
5988         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5989
5990 2017-08-03  Tom Tromey  <tom@tromey.com>
5991
5992         * python/python.c (compute_python_string): Return std::string.
5993         (gdbpy_eval_from_control_command): Update.
5994         (do_start_initialization): Use std::string.
5995         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5996         xstrprintf.
5997         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5998         xstrprintf.
5999
6000 2017-08-03  Tom Tromey  <tom@tromey.com>
6001
6002         * top.h (do_restore_instream_cleanup): Remove.
6003         * top.c (do_restore_instream_cleanup): Remove.
6004         (read_command_file): Use scoped_restore.
6005         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6006
6007 2017-08-03  Tom Tromey  <tom@tromey.com>
6008
6009         * cli/cli-script.c (execute_user_command)
6010         (execute_control_command): Use scoped_restore.
6011
6012 2017-08-03  Tom Tromey  <tom@tromey.com>
6013
6014         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6015         (execute_user_command): Remove user_call_depth; use
6016         user_args_stack's size instead.
6017
6018 2017-08-03  Tom Tromey  <tom@tromey.com>
6019
6020         * top.h (in_user_command): Remove.
6021         * top.c (in_user_command): Remove.
6022         * cli/cli-script.c (do_restore_user_call_depth)
6023         (execute_user_command): Update.
6024
6025 2017-08-03  Tom Tromey  <tom@tromey.com>
6026
6027         * valops.c (search_struct_method): Use gdb::byte_vector.
6028         * valarith.c (value_concat): Use std::vector.
6029         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6030         (simple_search_memory): Likewise.
6031         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6032         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6033         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6034         * elfread.c (elf_rel_plt_read): Use std::string.
6035         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6036         * cli/cli-dump.c (restore_section_callback): Use
6037         gdb::byte_vector.
6038
6039 2017-08-03  Tom Tromey  <tom@tromey.com>
6040
6041         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6042
6043 2017-08-03  Tom Tromey  <tom@tromey.com>
6044
6045         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6046         (tui_register_format): Use scoped_restore.
6047
6048 2017-08-03  Tom Tromey  <tom@tromey.com>
6049
6050         * reverse.c (exec_direction_default): Remove.
6051         (exec_reverse_once): Use scoped_restore.
6052         * remote.c (restore_remote_timeout): Remove.
6053         (remote_flash_erase, remote_flash_write, remote_flash_done)
6054         (readchar, remote_serial_write): Use scoped_restore.
6055         * cli/cli-script.c (struct source_cleanup_lines_args)
6056         (source_cleanup_lines): Remove.
6057         (script_from_file): Use scoped_restore.
6058         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6059         (source_command): Use scoped_restore.
6060
6061 2017-08-03  Tom Tromey  <tom@tromey.com>
6062
6063         * utils.h (make_cleanup_free_so): Remove.
6064         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6065         * solist.h (struct so_deleter): New.
6066         (so_list_up): New typedef.
6067         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6068
6069 2017-08-03  Tom Tromey  <tom@tromey.com>
6070
6071         * utils.h (make_cleanup_restore_current_language): Remove.
6072         * utils.c (do_restore_current_language)
6073         (make_cleanup_restore_current_language): Remove.
6074         * parse.c (parse_exp_in_context_1)
6075         (parse_expression_with_language): Use
6076         scoped_restore_current_language.
6077         * mi/mi-main.c (mi_cmd_execute): Use
6078         scoped_restore_current_language.
6079         * language.h (scoped_restore_current_language): New class.
6080
6081 2017-08-03  Tom Tromey  <tom@tromey.com>
6082
6083         * compile/compile.c (cleanup_unlink_file): Remove.
6084         (compile_to_object): Use gdb::unlinker.
6085         (eval_compile_command): Likewise.
6086
6087 2017-08-03  Tom Tromey  <tom@tromey.com>
6088
6089         * utils.h (make_cleanup_fclose): Remove.
6090         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6091
6092 2017-08-03  Tom Tromey  <tom@tromey.com>
6093
6094         * top.c (open_terminal_stream): Return gdb_file_up.
6095         (new_ui_command): Update.
6096
6097 2017-08-03  Tom Tromey  <tom@tromey.com>
6098
6099         * source.c (print_source_lines_base, forward_search_command)
6100         (reverse_search_command): Use gdb_file_up.
6101
6102 2017-08-03  Tom Tromey  <tom@tromey.com>
6103
6104         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6105
6106 2017-08-03  Tom Tromey  <tom@tromey.com>
6107
6108         * cli/cli-cmds.c (find_and_open_script): Change return type.
6109         Remove "streamp" and "full_path" parameters.
6110         (source_script_with_search): Update.
6111         * auto-load.c (source_script_file): Update.
6112         * cli/cli-cmds.h (find_and_open_script): Change type.
6113         (open_script): New struct.
6114
6115 2017-08-03  Tom Tromey  <tom@tromey.com>
6116
6117         * xml-support.c (xml_fetch_content_from_file): Update.
6118         * ui-file.c (stdio_file::open): Update.
6119         * tracefile-tfile.c (tfile_start): Update.
6120         * remote.c (remote_file_put, remote_file_get): Update.
6121         * nat/linux-procfs.c (linux_proc_get_int)
6122         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6123         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6124         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6125         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6126         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6127         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6128         * linux-nat.c (linux_proc_pending_signals): Update.
6129         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6130         (file_closer): Remove.
6131         * compile/compile.c (compile_to_object): Update.
6132         * common/filestuff.h (struct gdb_file_deleter): New.
6133         (gdb_file_up): New typedef.
6134         (gdb_fopen_cloexec): Change return type.
6135         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6136         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6137         (dump_binary_file, restore_binary_file): Update.
6138         * auto-load.c (auto_load_objfile_script_1): Update.
6139
6140 2017-08-03  Tom Tromey  <tom@tromey.com>
6141
6142         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6143         (info_static_tracepoint_markers_command): Likewise.
6144         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6145         * skip.c (skip_info): Use ui_out_emit_table.
6146         * progspace.c (print_program_space): Use ui_out_emit_table.
6147         * osdata.c (info_osdata): Use ui_out_emit_table.
6148         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6149         ui_out_emit_table.
6150         * linux-thread-db.c (info_auto_load_libthread_db): Use
6151         ui_out_emit_table.
6152         * inferior.c (print_inferior): Use ui_out_emit_table.
6153         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6154         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6155         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6156         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6157         * ui-out.h (class ui_out_emit_table): New.
6158
6159 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6160
6161         * mips-tdep.c (mips_fpu_type_str): New function.
6162         (mips_dump_tdep): Call it.
6163
6164 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6165
6166         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6167         `->mips_fpu_type'.
6168
6169 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6170
6171         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6172
6173 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6174
6175         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6176
6177 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6178
6179         * cli/cli-cmds.c (maintenancechecklist): New variable.
6180         * gdbcmd.h (maintenancechecklist): Declare it.
6181         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6182         Call i386_linux_read_description with different masks.
6183         * maint.c (maintenance_check_command): New function.
6184         (_initialize_maint_cmds): Call add_prefix_cmd.
6185         * target-descriptions.c (tdesc_reg): override operator != and ==.
6186         (tdesc_type): Likewise.
6187         (tdesc_feature): Likewise.
6188         (target_desc): Likewise.
6189         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6190         (maintenance_check_xml_descriptions): New function.
6191         (_initialize_target_descriptions) Add command "xml-descriptions".
6192         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6193
6194 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6195
6196         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6197         Include features/i386/32bit-*.c.
6198         (i386_linux_read_description): Generate target description if it
6199         doesn't exist.
6200         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6201         functions.
6202         * features/i386/32bit-linux.c: Re-generated.
6203         * features/i386/32bit-sse.c: Likewise.
6204         * target-descriptions.c (print_c_feature::visit): Print code to
6205         set register number if needed.
6206         (print_c_feature) <m_next_regnum>: New field.
6207
6208 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6209
6210         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6211         (FEATURE_XMLFILES): New.
6212         (FEATURE_CFILES): New.
6213         New rules.
6214         (clean-cfiles): Remove generated c files.
6215         * features/i386/32bit-avx.c: Generated.
6216         * features/i386/32bit-avx512.c: Generated.
6217         * features/i386/32bit-core.c: Generated.
6218         * features/i386/32bit-linux.c: Generated.
6219         * features/i386/32bit-mpx.c: Generated.
6220         * features/i386/32bit-pkeys.c: Generated.
6221         * features/i386/32bit-sse.c: Generated.
6222         * target-descriptions.c: Include algorithm.
6223         (tdesc_element_visitor): Add method visit_end.
6224         (print_c_tdesc): Implement visit_end.
6225         (print_c_tdesc:: m_filename_after_features): Move it to
6226         protected.
6227         (print_c_feature): New class.
6228         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6229         name starts with "i386/32bit-".
6230
6231 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6232
6233         * target-descriptions.c (tdesc_element_visitor): New class.
6234         (tdesc_element): New class.
6235         (tdesc_reg): Inherit from tdesc_element.
6236         (tdesc_reg::accept): New function.
6237         (tdesc_type): Inherit from tdesc_element.
6238         (tdesc_type::accept): New function.
6239         (tdesc_feature): Inherit from tdesc_element.
6240         (tdesc_feature::accept): New function.
6241         (target_desc): Inherit from tdesc_element.
6242         (target_desc::target_desc): New.
6243         (target_desc::~target_desc): New.
6244         (target_desc::accept): New.
6245         (allocate_target_description): Use new.
6246         (free_target_description): Use delete.
6247         (print_c_tdesc): New class.
6248         (maint_print_c_tdesc_cmd): Adjust.
6249
6250         * features/aarch64.c: Re-generated.
6251         * features/arc-arcompact.c: Re-generated.
6252         * features/arc-v2.c: Re-generated.
6253         * features/arm/arm-with-iwmmxt.c: Re-generated.
6254         * features/arm/arm-with-m.c: Re-generated.
6255         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6256         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6257         * features/arm/arm-with-neon.c: Re-generated.
6258         * features/arm/arm-with-vfpv2.c: Re-generated.
6259         * features/arm/arm-with-vfpv3.c: Re-generated.
6260         * features/i386/amd64-avx-avx512.c: Re-generated.
6261         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6262         * features/i386/amd64-avx.c: Re-generated.
6263         * features/i386/amd64-avx-linux.c: Re-generated.
6264         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6265         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6266         * features/i386/amd64-avx-mpx.c: Re-generated.
6267         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6268         * features/i386/amd64.c: Re-generated.
6269         * features/i386/amd64-linux.c: Re-generated.
6270         * features/i386/amd64-mpx.c: Re-generated.
6271         * features/i386/amd64-mpx-linux.c: Re-generated.
6272         * features/i386/i386-avx-avx512.c: Re-generated.
6273         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6274         * features/i386/i386-avx.c: Re-generated.
6275         * features/i386/i386-avx-linux.c: Re-generated.
6276         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6277         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6278         * features/i386/i386-avx-mpx.c: Re-generated.
6279         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6280         * features/i386/i386.c: Re-generated.
6281         * features/i386/i386-linux.c: Re-generated.
6282         * features/i386/i386-mmx.c: Re-generated.
6283         * features/i386/i386-mmx-linux.c: Re-generated.
6284         * features/i386/i386-mpx.c: Re-generated.
6285         * features/i386/i386-mpx-linux.c: Re-generated.
6286         * features/i386/x32-avx-avx512.c: Re-generated.
6287         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6288         * features/i386/x32-avx.c: Re-generated.
6289         * features/i386/x32-avx-linux.c: Re-generated.
6290         * features/i386/x32.c: Re-generated.
6291         * features/i386/x32-linux.c: Re-generated.
6292         * features/microblaze.c: Re-generated.
6293         * features/microblaze-with-stack-protect.c: Re-generated.
6294         * features/mips64-dsp-linux.c: Re-generated.
6295         * features/mips64-linux.c: Re-generated.
6296         * features/mips-dsp-linux.c: Re-generated.
6297         * features/mips-linux.c: Re-generated.
6298         * features/nds32.c: Re-generated.
6299         * features/nios2.c: Re-generated.
6300         * features/nios2-linux.c: Re-generated.
6301         * features/rs6000/powerpc-32.c: Re-generated.
6302         * features/rs6000/powerpc-32l.c: Re-generated.
6303         * features/rs6000/powerpc-403.c: Re-generated.
6304         * features/rs6000/powerpc-403gc.c : Re-generated.
6305         * features/rs6000/powerpc-405.c: Re-generated.
6306         * features/rs6000/powerpc-505.c: Re-generated.
6307         * features/rs6000/powerpc-601.c: Re-generated.
6308         * features/rs6000/powerpc-602.c: Re-generated.
6309         * features/rs6000/powerpc-603.c: Re-generated.
6310         * features/rs6000/powerpc-604.c: Re-generated.
6311         * features/rs6000/powerpc-64.c: Re-generated.
6312         * features/rs6000/powerpc-64l.c: Re-generated.
6313         * features/rs6000/powerpc-7400.c: Re-generated.
6314         * features/rs6000/powerpc-750.c: Re-generated.
6315         * features/rs6000/powerpc-860.c: Re-generated.
6316         * features/rs6000/powerpc-altivec32.c: Re-generated.
6317         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6318         * features/rs6000/powerpc-altivec64.c: Re-generated.
6319         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6320         * features/rs6000/powerpc-cell32l.c: Re-generated.
6321         * features/rs6000/powerpc-cell64l.c: Re-generated.
6322         * features/rs6000/powerpc-e500.c: Re-generated.
6323         * features/rs6000/powerpc-e500l.c: Re-generated.
6324         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6325         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6326         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6327         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6328         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6329         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6330         * features/rs6000/powerpc-vsx32.c: Re-generated.
6331         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6332         * features/rs6000/powerpc-vsx64.c: Re-generated.
6333         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6334         * features/rs6000/rs6000.c: Re-generated.
6335         * features/s390-linux32.c: Re-generated.
6336         * features/s390-linux32v1.c: Re-generated.
6337         * features/s390-linux32v2.c: Re-generated.
6338         * features/s390-linux64.c: Re-generated.
6339         * features/s390-linux64v1.c: Re-generated.
6340         * features/s390-linux64v2.c: Re-generated.
6341         * features/s390-te-linux64.c: Re-generated.
6342         * features/s390-tevx-linux64.c: Re-generated.
6343         * features/s390-vx-linux64.c: Re-generated.
6344         * features/s390x-linux64.c: Re-generated.
6345         * features/s390x-linux64v1.c: Re-generated.
6346         * features/s390x-linux64v2.c: Re-generated.
6347         * features/s390x-te-linux64.c: Re-generated.
6348         * features/s390x-tevx-linux64.c: Re-generated.
6349         * features/s390x-vx-linux64.c: Re-generated.
6350         * features/sparc/sparc32-solaris.c: Re-generated.
6351         * features/sparc/sparc64-solaris.c: Re-generated.
6352         * features/tic6x-c62x.c: Re-generated.
6353         * features/tic6x-c62x-linux.c: Re-generated.
6354         * features/tic6x-c64x.c: Re-generated.
6355         * features/tic6x-c64x-linux.c: Re-generated.
6356         * features/tic6x-c64xp.c: Re-generated.
6357         * features/tic6x-c64xp-linux.c: Re-generated.
6358
6359 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6360
6361         * i386-linux-tdep.c (i386_linux_read_description): New function.
6362         (i386_linux_core_read_description): Call
6363         i386_linux_read_description.
6364         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6365         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6366         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6367         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6368         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6369         * x86-linux-nat.c (x86_linux_read_description): Call
6370         i386_linux_read_description.
6371
6372 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6373
6374         * NEWS: Mention it.
6375         * features/Makefile (%.c: %.xml): Pass the xml file name to
6376         command "maint print c-tdesc".
6377         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6378         name from 'arg'.
6379
6380 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6381
6382         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6383         in-class initialization.
6384         (tdesc_create_feature): Call new instead of XCNEW.
6385         (free_target_description): Ue delete.
6386
6387 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6388
6389         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6390
6391 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6392
6393         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6394         constant.
6395         (amd64_x32_init_abi): Likewise.
6396         * amd64-tdep.h (amd64_init_abi): Update declaration.
6397         (amd64_x32_init_abi): Likewise.
6398
6399 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6400
6401         PR tdep/21717
6402         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6403         condition for FPSCR.
6404         (arm_linux_store_inferior_registers): Likewise.
6405
6406 2017-07-22  Tom Tromey  <tom@tromey.com>
6407
6408         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6409         <syscalls_counts>: Now a std::vector.
6410         (get_catch_syscall_inferior_data): Use "new".
6411         (catch_syscall_inferior_data_cleanup): Use "delete".
6412         (insert_catch_syscall, remove_catch_syscall)
6413         (clear_syscall_counts): Update.
6414
6415 2017-07-22  Tom Tromey  <tom@tromey.com>
6416
6417         * break-catch-syscall.c (syscall_catchpoint)
6418         <syscalls_to_be_caught>: Now a std::vector<int>
6419         (~syscall_catchpoint): Remove.
6420         (insert_catch_syscall, remove_catch_syscall)
6421         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6422         (print_mention_catch_syscall, print_recreate_catch_syscall):
6423         Update.
6424         (create_syscall_event_catchpoint): Change type of "filter"
6425         parameter.
6426         (catch_syscall_split_args): Return a std::vector.
6427         (catch_syscall_command_1, catching_syscall_number_1): Update.
6428
6429 2017-07-22  Tom Tromey  <tom@tromey.com>
6430
6431         * break-catch-throw.c (struct exception_catchpoint)
6432         <exception_rx>: Now a std::string.
6433         (~exception_catchpoint): Remove.
6434         (print_one_detail_exception_catchpoint): Update.
6435         (handle_gnu_v3_exceptions): Change type of except_rx.
6436         (extract_exception_regexp): Return a std::string.
6437         (catch_exception_command_1): Update.
6438
6439 2017-07-22  Tom Tromey  <tom@tromey.com>
6440
6441         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6442         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6443         std::vector.
6444         <catch_all>: Now a bool.
6445         (~signal_catchpoint): Remove.
6446         (signal_catchpoint_insert_location)
6447         (signal_catchpoint_remove_location)
6448         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6449         (signal_catchpoint_print_mention)
6450         (signal_catchpoint_print_recreate)
6451         (signal_catchpoint_explains_signal): Update.
6452         (create_signal_catchpoint): Change type of "filter" and
6453         "catch_all".
6454         (catch_signal_split_args): Return a std::vector.  Change type of
6455         "catch_all".
6456         (catch_signal_command): Update.
6457
6458 2017-07-20  Pedro Alves  <palves@redhat.com>
6459
6460         * ada-lang.c (ada_language_defn): Make extern.
6461         (_initialize_ada_language): Remove add_language call.
6462         * c-lang.c (c_language_defn, cplus_language_defn)
6463         (asm_language_defn, minimal_language_defn): Make extern.
6464         (_initialize_c_language): Delete.
6465         * completer.c (compare_cstrings): Delete, moved to utils.h.
6466         * d-lang.c (d_language_defn): Make extern.
6467         (_initialize_d_language): Remove add_language calls.
6468         * defs.h (enum language): Add comment.
6469         * f-lang.c (f_language_defn): Make extern.
6470         (_initialize_f_language): Remove add_language call.
6471         * go-lang.c (go_language_defn): Make extern.
6472         (_initialize_go_language): Remove add_language call.
6473         * language.c: Include <algorithm>.
6474         (languages): Redefine as const array.
6475         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6476         (set_language_command): Handle "local".  Use for-range loop.
6477         (set_language): Remove loop.
6478         (language_enum): Rewrite.
6479         (language_def, language_str): Remove loops.
6480         (add_language): Delete.
6481         (add_set_language_command): New, based on add_languages.
6482         (skip_language_trampoline): Adjust.
6483         (local_language_defn): Delete.
6484         (language_gdbarch_post_init): Adjust.
6485         (_initialize_language): Remove add_language calls.  Call
6486         add_set_language_command.
6487         * language.h (add_language): Delete.
6488         (auto_language_defn)
6489         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6490         (asm_language_defn, c_language_defn, cplus_language_defn)
6491         (d_language_defn, f_language_defn, go_language_defn)
6492         (m2_language_defn, objc_language_defn, opencl_language_defn)
6493         (pascal_language_defn, rust_language_defn): Declare.
6494         * m2-lang.c (m2_language_defn): Make extern.
6495         (_initialize_m2_language): Remove add_language call.
6496         * objc-lang.c (objc_language_defn): Make extern.
6497         (_initialize_objc_language): Remove add_language call.
6498         * opencl-lang.c (opencl_language_defn): Make extern.
6499         (_initialize_opencl_language): Remove add_language call.
6500         * p-lang.c (pascal_language_defn): Make extern.
6501         (_initialize_pascal_language): Delete.
6502         * rust-lang.c (rust_language_defn): Make extern.
6503         (_initialize_rust_language): Delete.
6504         * utils.h (compare_cstrings): New static inline function.
6505
6506 2017-07-20  Pedro Alves  <palves@redhat.com>
6507
6508         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6509         (get_var_value): Constify parameters.
6510         (get_int_var_value): Change prototype.
6511         (to_fixed_range_type): Adjust.
6512         * ada-lang.h (get_int_var_value): Change prototype.
6513
6514 2017-07-20  Pedro Alves  <palves@redhat.com>
6515
6516         * dwarf2read.c (dw2_lookup_symbol): Use
6517         SYMBOL_MATCHES_SEARCH_NAME.
6518         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6519
6520 2017-07-20  Pedro Alves  <palves@redhat.com>
6521
6522         * block.c (block_iter_name_step, block_iter_name_first)
6523         (block_iter_name_next): Delete.
6524         (block_lookup_symbol_primary): Adjust to use
6525         dict_iter_match_first/dict_iter_match_next.
6526         * block.h (block_iter_name_first, block_iter_name_next): Delete
6527         declarations.
6528         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6529         dict_iter_match_first/dict_iter_match_next.
6530
6531 2017-07-20  Pedro Alves  <palves@redhat.com>
6532
6533         * cp-support.c (cp_find_first_component_aux): Add missing case for
6534         end of string.
6535
6536 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6537
6538         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6539         of dwo_cu's dwo_file.
6540
6541 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6542
6543         * remote.c (store_registers_using_G): Remove one line comment.
6544
6545 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6546
6547         * regcache.c (regcache_cpy): Simplify it.
6548         (regcache::cpy_no_passthrough): Remove it.
6549         * regcache.h (cpy_no_passthrough): Remove it.
6550         (regcache_dup, regcache_cpy): Update comments.
6551
6552 2017-07-18  Pedro Alves  <palves@redhat.com>
6553
6554         * remote-sim.c (sim_command_completer): Adjust to work with a
6555         completion_tracker instead of a VEC.
6556
6557 2017-07-17  Pedro Alves  <palves@redhat.com>
6558
6559         * completer.c (complete_source_filenames): New function.
6560         (complete_address_and_linespec_locations): New function.
6561         (location_completer): Use complete_address_and_linespec_locations.
6562         (completion_tracker::build_completion_result): Honor the tracker's
6563         request to suppress append.
6564         * completer.h (completion_tracker::suppress_append_ws)
6565         (completion_tracker::set_suppress_append_ws): New methods.
6566         (completion_tracker::m_suppress_append_ws): New field.
6567         (complete_source_filenames): New declaration.
6568         * linespec.c (linespec_complete_what): New.
6569         (struct ls_parser) <complete_what, completion_word,
6570         completion_quote_char, completion_quote_end, completion_tracker>:
6571         New fields.
6572         (string_find_incomplete_keyword_at_end): New.
6573         (linespec_lexer_lex_string): Record quote char.  If in completion
6574         mode, don't throw.
6575         (linespec_lexer_consume_token): Advance the completion word point.
6576         (linespec_lexer_peek_token): Save/restore completion info.
6577         (save_stream_and_consume_token): New.
6578         (set_completion_after_number): New.
6579         (linespec_parse_basic): Set what to complete next depending on
6580         token.  Handle function and label completions specially.
6581         (parse_linespec): Disable objc shortcut in completion mode.  Set
6582         what to complete next depending on token type.  Skip keyword if in
6583         completion mode.
6584         (complete_linespec_component, linespec_complete): New.
6585         * linespec.h (linespec_complete): Declare.
6586
6587 2017-07-17  Pedro Alves  <palves@redhat.com>
6588
6589         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6590         Handle 'operator<' / 'operator<<'.
6591
6592 2017-07-17  Pedro Alves  <palves@redhat.com>
6593
6594         * completer.c (collect_explicit_location_matches): Handle
6595         MATCH_LABEL.
6596         (convert_explicit_location_to_linespec): New, factored out from
6597         ...
6598         (convert_explicit_location_to_sals): ... this.
6599         (complete_label): New.
6600         (linespec_complete_label, find_label_symbols_in_block): New.
6601         (find_label_symbols): Add completion_mode parameter and adjust to
6602         call find_label_symbols_in_block.
6603         * linespec.h (linespec_complete_label): Declare.
6604
6605 2017-07-17  Pedro Alves  <palves@redhat.com>
6606
6607         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6608         complete_symbol_mode parameter.
6609         * cli/cli-cmds.c (complete_command): Get the completion result out
6610         of the handle_brkchars tracker if used a custom word point.
6611         * completer.c: Include "linespec.h".
6612         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6613         (advance_to_expression_complete_word_point): New.
6614         (completion_tracker::completes_to_completion_word): New.
6615         (complete_files_symbols): Pass down
6616         complete_symbol_mode::EXPRESSION.
6617         (explicit_options, probe_options): New.
6618         (collect_explicit_location_matches): Complete on the
6619         explictit_loc->foo instead of word.  Use
6620         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6621         keyword and options completions.
6622         (backup_text_ptr): Delete.
6623         (skip_keyword): New.
6624         (complete_explicit_location): Remove 'word' parameter.  Add
6625         language, quoted_arg_start and quoted_arg_end parameters.
6626         Rewrite, parsing left to right.
6627         (location_completer): Rewrite.
6628         (location_completer_handle_brkchars): New function.
6629         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6630         (enum complete_line_internal_reason): Adjust comments.
6631         (completion_tracker::discard_completions): New.
6632         (completer_handle_brkchars_func_for_completer): Handle
6633         location_completer.
6634         (gdb_custom_word_point_brkchars)
6635         (gdb_org_rl_basic_quote_characters): New.
6636         (gdb_completion_word_break_characters_throw)
6637         (completion_find_completion_word): Handle trackers that use a
6638         custom word point.
6639         (completion_tracker::advance_custom_word_point_by): New.
6640         (completion_tracker::build_completion_result): Don't rely on
6641         readline appending the quote char.
6642         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6643         use a custom word point.
6644         (gdb_rl_attempted_completion_function): Restore
6645         rl_basic_quote_characters.
6646         * completer.h (class completion_tracker): Extend intro comment.
6647         (completion_tracker::set_quote_char)
6648         (completion_tracker::quote_char)
6649         (completion_tracker::set_use_custom_word_point)
6650         (completion_tracker::use_custom_word_point)
6651         (completion_tracker::custom_word_point)
6652         (completion_tracker::set_custom_word_point)
6653         (completion_tracker::advance_custom_word_point_by)
6654         (completion_tracker::completes_to_completion_word)
6655         (completion_tracker::discard_completions): New methods.
6656         (completion_tracker::m_quote_char)
6657         (completion_tracker::m_use_custom_word_point)
6658         (completion_tracker::m_custom_word_point): New fields.
6659         (advance_to_expression_complete_word_point): Declare.
6660         * f-lang.c (f_collect_symbol_completion_matches): Add
6661         complete_symbol_mode parameter.
6662         * language.h (struct language_defn)
6663         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6664         parameter.
6665         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6666         (linespec_complete_function): New function.
6667         (linespec_lexer_lex_keyword): Adjust.
6668         * linespec.h (linespec_keywords, linespec_complete_function): New
6669         declarations.
6670         * location.c (find_end_quote): New function.
6671         (explicit_location_lex_one): Add explicit_completion_info
6672         parameter.  Save quoting info.  Don't throw if being called for
6673         completion.  Don't handle Ada operators here.
6674         (is_cp_operator, skip_op_false_positives, first_of)
6675         (explicit_location_lex_one_function): New function.
6676         (string_to_explicit_location): Replace 'dont_throw' parameter with
6677         an explicit_completion_info pointer parameter.  Handle it.  Don't
6678         use explicit_location_lex_one to lex function names.  Use
6679         explicit_location_lex_one_function instead.
6680         * location.h (struct explicit_completion_info): New.
6681         (string_to_explicit_location): Replace 'dont_throw' parameter with
6682         an explicit_completion_info pointer parameter.
6683         * symtab.c (default_collect_symbol_completion_matches_break_on):
6684         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6685         (default_collect_symbol_completion_matches)
6686         (collect_symbol_completion_matches): Add complete_symbol_mode
6687         parameter.
6688         (collect_symbol_completion_matches_type): Pass down
6689         complete_symbol_mode::EXPRESSION.
6690         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6691         parameter.  Handle LINESPEC mode.
6692         * symtab.h (complete_symbol_mode): New.
6693         (default_collect_symbol_completion_matches_break_on)
6694         (default_collect_symbol_completion_matches)
6695         (collect_symbol_completion_matches)
6696         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6697         parameter.
6698
6699 2017-07-17  Pedro Alves  <palves@redhat.com>
6700
6701         * utils.c (enum class strncmp_iw_mode): New.
6702         (strcmp_iw): Rename to ...
6703         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6704         parameters.  Handle them.
6705         (strncmp_iw): New.
6706         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6707         * utils.h (strncmp_iw): Declare.
6708         (strcmp_iw): Move describing comments here.
6709
6710 2017-07-17  Pedro Alves  <palves@redhat.com>
6711
6712         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6713         CP_OPERATOR_STR.
6714         * c-typeprint.c (is_type_conversion_operator): Use
6715         CP_OPERATOR_STR.
6716         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6717         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6718         CP_OPERATOR_LEN.
6719         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6720         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6721         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6722         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6723         CP_OPERATOR_STR.
6724         * location.c: Include "cp-support.h".
6725         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6726         CP_OPERATOR_STR.
6727         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6728         CP_OPERATOR_LEN.
6729
6730 2017-07-17  Pedro Alves  <palves@redhat.com>
6731
6732         * cli/cli-cmds.c (complete_command): Use a completion tracker
6733         along with completion_find_completion_word for handle_brkchars
6734         phase.
6735         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6736         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6737         (struct gdb_rl_completion_word_info): New.
6738         (gdb_rl_find_completion_word): New.
6739         (completion_find_completion_word): New.
6740         * completer.h (completion_find_completion_word): Declare.
6741
6742 2017-07-17  Pedro Alves  <palves@redhat.com>
6743
6744         * ada-lang.c (symbol_completion_match): Adjust comments.
6745         (symbol_completion_add): Replace vector parameter with
6746         completion_tracker parameter.  Use it.
6747         (ada_make_symbol_completion_list): Rename to...
6748         (ada_collect_symbol_completion_matches): ... this.  Add
6749         completion_tracker parameter and use it.
6750         (ada_language_defn): Adjust.
6751         * break-catch-syscall.c (catch_syscall_completer): Adjust
6752         prototype and work with completion_tracker instead of VEC.
6753         * breakpoint.c (condition_completer): Adjust prototype and work
6754         with completion_tracker instead of VEC.
6755         * c-lang.c (c_language_defn, cplus_language_defn)
6756         (asm_language_defn, minimal_language_defn): Adjust to renames.
6757         * cli/cli-cmds.c (complete_command): Rework using
6758         completion_tracker.  Catch exceptions when completing.
6759         * cli/cli-decode.c (integer_unlimited_completer)
6760         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6761         with completion_tracker instead of VEC.
6762         * command.h (struct completion_tracker): Forward declare.
6763         (completer_ftype, completer_handle_brkchars_ftype): Change
6764         types.
6765         (complete_on_cmdlist, complete_on_enum): Adjust.
6766         * completer.c: Include <algorithm>.
6767         (struct gdb_completer_state): New.
6768         (current_completion): New global.
6769         (readline_line_completion_function): Delete.
6770         (noop_completer, filename_completer)
6771         (filename_completer_handle_brkchars, complete_files_symbols)
6772         (linespec_location_completer): Adjust to work with a
6773         completion_tracker instead of a VEC.
6774         (string_or_empty): New.
6775         (collect_explicit_location_matches): Adjust to work with a
6776         completion_tracker instead of a VEC.
6777         (explicit_location_completer): Rename to ...
6778         (complete_explicit_location): ... this and adjust to work with a
6779         completion_tracker instead of a VEC.
6780         (location_completer): Adjust to work with a completion_tracker
6781         instead of a VEC.
6782         (add_struct_fields): Adjust to work with a completion_list instead
6783         of VEC.
6784         (expression_completer): Rename to ...
6785         (complete_expression): ... this and adjust to work with a
6786         completion_tracker instead of a VEC.  Use complete_files_symbols.
6787         (expression_completer): Reimplement on top of complete_expression.
6788         (symbol_completer): Adjust to work with a completion_tracker
6789         instead of a VEC.
6790         (enum complete_line_internal_reason): Add describing comments.
6791         (complete_line_internal_normal_command): Adjust to work with a
6792         completion_tracker instead of a VEC.
6793         (complete_line_internal): Rename to ...
6794         (complete_line_internal_1): ... this and adjust to work with a
6795         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6796         handle_brkchars phase.
6797         (new_completion_tracker): Delete.
6798         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6799         complete_line_internal_1.
6800         (free_completion_tracker): Delete.
6801         (INITIAL_COMPLETION_HTAB_SIZE): New.
6802         (completion_tracker::completion_tracker)
6803         (completion_tracker::~completion_tracker): New.
6804         (maybe_add_completion): Delete.
6805         (completion_tracker::maybe_add_completion)
6806         (completion_tracker::add_completion)
6807         (completion_tracker::add_completions): New.
6808         (throw_max_completions_reached_error): Delete.
6809         (complete_line): Adjust to work with a completion_tracker instead
6810         of a VEC.  Don't create a completion_tracker_t or check for max
6811         completions here.
6812         (command_completer, command_completer_handle_brkchars)
6813         (signal_completer, reg_or_group_completer_1)
6814         (reg_or_group_completer, default_completer_handle_brkchars):
6815         Adjust to work with a completion_tracker.
6816         (gdb_completion_word_break_characters_throw): New.
6817         (gdb_completion_word_break_characters): Reimplement.
6818         (line_completion_function): Delete.
6819         (completion_tracker::recompute_lowest_common_denominator)
6820         (expand_preserving_ws)
6821         (completion_tracker::build_completion_result)
6822         (completion_result::completion_result)
6823         (completion_result::completion_result)
6824         (completion_result::~completion_result)
6825         (completion_result::completion_result)
6826         (completion_result::release_match_list, compare_cstrings)
6827         (completion_result::sort_match_list)
6828         (completion_result::reset_match_list)
6829         (gdb_rl_attempted_completion_function_throw)
6830         (gdb_rl_attempted_completion_function): New.
6831         * completer.h (completion_list, struct completion_result)
6832         (class completion_tracker): New.
6833         (complete_line): Add completion_tracker parameter.
6834         (readline_line_completion_function): Delete.
6835         (gdb_rl_attempted_completion_function): New.
6836         (noop_completer, filename_completer, expression_completer)
6837         (location_completer, symbol_completer, command_completer)
6838         (signal_completer, reg_or_group_completer): Update prototypes.
6839         (completion_tracker_t, new_completion_tracker)
6840         (make_cleanup_free_completion_tracker): Delete.
6841         (enum maybe_add_completion_enum): Delete.
6842         (maybe_add_completion): Delete.
6843         (throw_max_completions_reached_error): Delete.
6844         * corefile.c (complete_set_gnutarget): Adjust to work with a
6845         completion_tracker instead of a VEC.
6846         * cp-abi.c (cp_abi_completer): Adjust to work with a
6847         completion_tracker instead of a VEC.
6848         * d-lang.c (d_language_defn): Adjust.
6849         * disasm.c (disassembler_options_completer): Adjust to work with a
6850         completion_tracker instead of a VEC.
6851         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6852         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6853         with a completion_tracker instead of a VEC.
6854         (f_language_defn): Adjust.
6855         * go-lang.c (go_language_defn): Adjust.
6856         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6857         Adjust to work with a completion_tracker instead of a VEC.
6858         * infrun.c (handle_completer): Likewise.
6859         * interps.c (interpreter_completer): Likewise.
6860         * interps.h (interpreter_completer): Likewise.
6861         * language.c (unknown_language_defn, auto_language_defn)
6862         (local_language_defn): Adjust.
6863         * language.h (language_defn::la_make_symbol_completion_list):
6864         Rename to ...
6865         (language_defn::la_collect_symbol_completion_matches): ... this
6866         and adjust to work with a completion_tracker instead of a VEC.
6867         * m2-lang.c (m2_language_defn): Adjust.
6868         * objc-lang.c (objc_language_defn): Adjust.
6869         * opencl-lang.c (opencl_language_defn): Adjust.
6870         * p-lang.c (pascal_language_defn): Adjust.
6871         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6872         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6873         with a completion_tracker.
6874         * rust-lang.c (rust_language_defn): Adjust.
6875         * symtab.c (free_completion_list, do_free_completion_list)
6876         (return_val, completion_tracker): Delete.
6877         (completion_list_add_name, completion_list_add_symbol)
6878         (completion_list_add_msymbol, completion_list_objc_symbol)
6879         (completion_list_add_fields, add_symtab_completions): Add
6880         completion_tracker parameter and use it.
6881         (default_make_symbol_completion_list_break_on_1): Rename to...
6882         (default_collect_symbol_completion_matches_break_on): ... this.
6883         Add completion_tracker parameter and use it instead of allocating
6884         a completion tracker here.
6885         (default_make_symbol_completion_list_break_on): Delete old
6886         implementation.
6887         (default_make_symbol_completion_list): Delete.
6888         (default_collect_symbol_completion_matches): New.
6889         (make_symbol_completion_list): Delete.
6890         (collect_symbol_completion_matches): New.
6891         (make_symbol_completion_type): Rename to ...
6892         (collect_symbol_completion_matches_type): ... this.  Add
6893         completion_tracker parameter and use it instead of VEC.
6894         (make_file_symbol_completion_list_1): Rename to...
6895         (collect_file_symbol_completion_matches): ... this.  Add
6896         completion_tracker parameter and use it instead of VEC.
6897         (make_file_symbol_completion_list): Delete.
6898         (add_filename_to_list): Use completion_list instead of a VEC.
6899         (add_partial_filename_data::list): Now a completion_list.
6900         (make_source_files_completion_list): Work with a completion_list
6901         instead of a VEC.
6902         * symtab.h: Include "completer.h".
6903         (default_make_symbol_completion_list_break_on)
6904         (default_make_symbol_completion_list, make_symbol_completion_list)
6905         (make_symbol_completion_type, make_file_symbol_completion_list)
6906         (make_source_files_completion_list): Delete.
6907         (default_collect_symbol_completion_matches_break_on)
6908         (default_collect_symbol_completion_matches)
6909         (collect_symbol_completion_matches)
6910         (collect_symbol_completion_matches_type)
6911         (collect_file_symbol_completion_matches)
6912         (make_source_files_completion_list): New.
6913         * top.c (init_main): Don't install a rl_completion_entry_function
6914         hook.  Install a rl_attempted_completion_function hook instead.
6915         * tui/tui-layout.c (layout_completer): Adjust to work with a
6916         completion_tracker.
6917         * tui/tui-regs.c (tui_reggroup_completer):
6918         * tui/tui-win.c (window_name_completer, focus_completer)
6919         (winheight_completer): Adjust to work with a completion_tracker.
6920         * value.c: Include "completer.h".
6921         (complete_internalvar): Adjust to work with a completion_tracker.
6922         * value.h (complete_internalvar): Likewise.
6923
6924 2017-07-17  Pedro Alves  <palves@redhat.com>
6925
6926         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6927         renames.
6928         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6929         comments to completer_ftype's declaration.
6930         <completer_handle_brkchars>: Change type to
6931         completer_handle_brkchars_ftype.
6932         * command.h (completer_ftype): Add describing comment and give
6933         names to parameters.
6934         (completer_ftype_void): Rename to ...
6935         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6936         (set_cmd_completer_handle_brkchars): Adjust.
6937         * completer.c (filename_completer_handle_brkchars): New function.
6938         (complete_line_internal_normal_command): New function, factored
6939         out from ...
6940         (complete_line_internal): ... here.
6941         (command_completer_handle_brkchars)
6942         (default_completer_handle_brkchars)
6943         (completer_handle_brkchars_func_for_completer): New functions.
6944         * completer.h (set_gdb_completion_word_break_characters): Delete
6945         declaration.
6946         (completer_handle_brkchars_func_for_completer): New declaration.
6947         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6948         completer_handle_brkchars_func_for_completer.
6949
6950 2017-07-17  Pedro Alves  <palves@redhat.com>
6951
6952         * completer.c (symbol_completer): New function, based on
6953         make_symbol_completion_list_fn.
6954         * completer.h (symbol_completer): New declaration.
6955         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6956         * python/py-cmd.c (completers): Adjust.
6957         * symtab.c (make_symbol_completion_list_fn): Delete.
6958         * symtab.h (make_symbol_completion_list_fn): Delete.
6959         * cli/cli-decode.c (add_cmd): Adjust.
6960
6961 2017-07-17  Pedro Alves  <palves@redhat.com>
6962
6963         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6964         * dwarf2read.c: Include "filename-seen-cache.h".
6965         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6966         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6967         * filename-seen-cache.c: New file.
6968         * filename-seen-cache.h: New file.
6969         * symtab.c: Include "filename-seen-cache.h".
6970         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6971         (create_filename_seen_cache, clear_filename_seen_cache)
6972         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6973         to filename-seen-cache.h/filename-seen-cache.c.
6974         (output_source_filename, sources_info)
6975         (maybe_add_partial_symtab_filename)
6976         (make_source_files_completion_list): Adjust to use
6977         filename_seen_cache.
6978
6979 2017-07-17  Pedro Alves  <palves@redhat.com>
6980
6981         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6982         fields.
6983         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6984         dwarf2_debug_sections*)): New.
6985         (dwarf2_per_objfile::dwarf2_per_objfile(const
6986         dwarf2_per_objfile&)): Declare as deleted.
6987         (dwarf2_per_objfile::operator=): Declare as deleted.
6988         (dwarf2_per_objfile::dwarf2_per_objfile)
6989         (dwarf2_per_objfile::~dwarf2_per_objfile)
6990         (dwarf2_per_objfile::free_cached_comp_units): New.
6991         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6992         ctor.  Call dwarf2_per_objfile's ctor manually.
6993         (dwarf2_locate_sections): Deleted/refactored as ...
6994         (dwarf2_per_objfile::locate_sections): ... this new method.
6995         (free_cached_comp_units): Defer to
6996         dwarf2_per_objfile::free_cached_comp_units.
6997         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6998
6999 2017-07-14  Tom Tromey  <tom@tromey.com>
7000
7001         PR rust/21764:
7002         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7003         parameter.
7004         <UNOP_SIZEOF>: Split into separate case.
7005         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7006
7007 2017-07-14  Tom Tromey  <tom@tromey.com>
7008
7009         PR rust/21763:
7010         * symtab.c (symbol_matches_domain): Add language_rust to special
7011         case.
7012         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7013         treat LOC_TYPEDEF symbols as variables.
7014
7015 2017-07-14  Pedro Alves  <palves@redhat.com>
7016
7017         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7018         symtabs matching all symtabs with SRCFILE as file name instead of
7019         only considering the first hit, with lookup_symtab.
7020
7021 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7022
7023         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7024         operator_name parameters.
7025         (gen_expr): Update function call.
7026
7027 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7028
7029         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7030         parameter.
7031         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7032         Likewise.
7033         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7034         parameter, use agent_expr::gdbarch instead, update function
7035         calls.
7036         (locexpr_tracepoint_var_ref): Likewise.
7037         (loclist_tracepoint_var_ref): Likewise.
7038         * ax-gdb.c (gen_trace_static_fields): Likewise.
7039         (gen_traced_pop): Likewise.
7040         (gen_frame_args_address): Likewise.
7041         (gen_frame_locals_address): Likewise.
7042         (gen_var_ref): Likewise.
7043         (gen_struct_ref_recursive): Likewise.
7044         (gen_static_field): Likewise.
7045         (gen_maybe_namespace_elt): Likewise.
7046         (gen_expr): Likewise.
7047         (gen_trace_for_var): Likewise.
7048         (gen_trace_for_expr): Likewise.
7049         (gen_trace_for_return_address): Likewise.
7050
7051 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7052
7053         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7054         parameter.
7055         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7056
7057 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7058
7059         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7060         from ax, update calls.
7061         (gen_usual_arithmetic): Likewise.
7062         (gen_integral_promotions): Likewise.
7063         (gen_bitfield_ref): Likewise.
7064         (gen_primitive_field): Likewise.
7065         (gen_struct_ref_recursive): Likewise.
7066         (gen_struct_ref): Likewise.
7067         (gen_maybe_namespace_elt): Likewise.
7068         (gen_struct_elt_for_reference): Likewise.
7069         (gen_namespace_elt): Likewise.
7070         (gen_aggregate_elt_ref): Likewise.
7071         (gen_expr): Get gdbarch from ax, update calls.
7072         (gen_expr_binop_rest): Likewise.
7073
7074 2017-07-13  Pedro Alves  <palves@redhat.com>
7075
7076         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7077         as default tdesc.
7078         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7079         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7080         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7081         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7082         tdep.
7083         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7084         Get final tdesc from the tdep.
7085         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7086         default tdesc.
7087         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7088         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7089         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7090         Use it as default tdesc.
7091         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7092         down to amd_init_abi.  No longer handle fallback tdesc here.
7093         * amd64-tdep.h (tdesc_x32): Declare.
7094         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7095         parameter.
7096         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7097         as default tdesc.
7098
7099 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7100
7101         * s390-linux-tdep.c (s390_process_record): Add support for
7102         instructions new in arch12.
7103
7104 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7105
7106         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7107         PT_GETFSBASE and PT_GETGSBASE.
7108         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7109         PT_SETGSBASE.
7110
7111 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7112
7113         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7114         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7115         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7116         those rules.
7117         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7118         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7119         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7120         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7121         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7122         * features/i386/amd64.xml: Add 64bit-segments.xml.
7123         * features/i386/amd64-avx-avx512.c: Regenerated.
7124         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7125         * features/i386/amd64-avx-mpx.c: Regenerated.
7126         * features/i386/amd64-avx.c: Regenerated.
7127         * features/i386/amd64-mpx.c: Regenerated.
7128         * features/i386/amd64.c: Regenerated.
7129         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7130         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7131         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7132         * regformats/i386/amd64-avx.dat: Regenerated.
7133         * regformats/i386/amd64-mpx.dat: Regenerated.
7134         * regformats/i386/amd64.dat: Regenerated.
7135
7136 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7137
7138         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7139         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7140
7141 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7142
7143         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7144         unsetenv.
7145         * gnulib/aclocal.m4: Regenerate.
7146         * gnulib/config.in: Regenerate.
7147         * gnulib/configure: Regenerate.
7148         * gnulib/import/Makefile.am: Regenerate.
7149         * gnulib/import/Makefile.in: Regenerate.
7150         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7151         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7152         * gnulib/import/m4/environ.m4: New file.
7153         * gnulib/import/m4/setenv.m4: New file.
7154         * gnulib/import/setenv.c: New file.
7155         * gnulib/import/unsetenv.c: New file.
7156
7157 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7158
7159         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7160         address when op is DW_OP_addr.
7161
7162 2017-07-09  Tom Tromey  <tom@tromey.com>
7163
7164         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7165         check and apply to outer type.
7166
7167 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7168
7169         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7170         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7171         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7172         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7173
7174 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7175
7176         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7177
7178 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7179
7180         * corelow.c (get_core_siginfo): Remove.
7181         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7182         instead of get_core_siginfo.
7183         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7184         * gdbarch.h: Re-generate.
7185         * gdbarch.c: Re-generate.
7186         * linux-tdep.c (linux_core_xfer_siginfo): New.
7187         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7188
7189 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7190
7191         * corelow.c (thread_section_name): Move to ...
7192         * gdbcore.h (thread_section_name): ... here.
7193
7194 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7195
7196         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7197         (struct siginfo32): New.
7198         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7199         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7200         via ptrace(PT_LWPINFO).
7201
7202 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7203
7204         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7205         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7206         (fbsd_get_siginfo_type): New.
7207         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7208         (_initialize_fbsd_tdep): New.
7209
7210 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7211
7212         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7213         a singular dwo_unit*) to support multiple CUs in the same way that
7214         multiple TUs are supported.
7215         (create_cus_hash_table): Replace create_dwo_cu with a function for
7216         parsing multiple CUs from a DWO file.
7217         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7218         create_dwo_cu.
7219         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7220         htab_find, rather than comparing the signature to a singleton CU in
7221         the dwo_file.
7222
7223 2017-07-06  Pedro Alves  <palves@redhat.com>
7224
7225         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7226
7227 2017-07-04  Pedro Alves  <palves@redhat.com>
7228
7229         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7230         * gdbtypes.h (TYPE_STATIC): Delete.
7231         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7232         is_synchronized, is_native>: Delete.
7233         <dummy>: Bump.
7234         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7235         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7236         (TYPE_FN_FIELD_ABSTRACT): Delete.
7237
7238 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7239
7240         * buffer.h (buffer_finish): Fix spelling mistakes.
7241
7242 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7243
7244         * .dir-locals.el: Automatically switch to C-style comments in
7245         versions of Emacs that support the feature.
7246
7247 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7248             Pedro Alves  <palves@redhat.com>
7249
7250         PR cli/21688
7251         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7252         (process_next_line): New variable 'inline_cmd'.
7253         Adjust 'if' clauses for "python", "compile" and "guile" to use
7254         'command_name_equals' and check for '!inline_cmd'.
7255
7256 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7257
7258         PR cli/21688
7259         * cli/cli-script.c (command_name_equals_not_inline): New function.
7260         (process_next_line): Adjust 'if' clauses for "python", "compile"
7261         and "guile" to use command_name_equals_not_inline.
7262
7263 2017-06-29  Pedro Alves  <palves@redhat.com>
7264
7265         * completer.c (expression_completer): Call
7266         linespec_location_completer instead of location_completer.
7267
7268 2017-06-29  Pedro Alves  <palves@redhat.com>
7269
7270         * completer.c (expression_completer): Remove code that recomputes
7271         'text' from 'word'.
7272
7273 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7274
7275         * regformats/regdat.sh: Generate code with
7276         "ifndef IN_PROCESS_AGENT".
7277
7278 2017-06-28  Pedro Alves  <palves@redhat.com>
7279
7280         * command.h: Include "common/scoped_restore.h".
7281
7282 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7283
7284         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7285         instead of obstack_grow.
7286
7287 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7288
7289         PR gdb/21337
7290         * symfile.c (reread_symbols): Call objfiles_changed just before
7291         read_symbols.
7292
7293 2017-06-27  Pedro Alves  <palves@redhat.com>
7294
7295         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7296         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7297         (completion_list_add_symbol, completion_list_add_msymbol):
7298         ... these new functions.
7299         (add_symtab_completions)
7300         (default_make_symbol_completion_list_break_on_1): Adjust.
7301
7302 2017-06-27  Pedro Alves  <palves@redhat.com>
7303
7304         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7305         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7306         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7307         dtor.
7308         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7309         'storage_obstack' field an auto_obstack.  In-class initialize all
7310         non-bitfield fields.  Make minsyms_read bool.
7311         * symfile.c (read_symbols): Adjust.
7312
7313 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7314
7315         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7316         (gdbsim_store_register): Likewise.
7317
7318 2017-06-27  Pedro Alves  <palves@redhat.com>
7319
7320         * c-exp.y (name_obstack): Now an auto_obstack.
7321         (yylex): Use auto_obstack::clear.
7322         (c_parse): Use auto_obstack::clear instead of reinitializing and
7323         freeing the obstack.
7324         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7325         * d-exp.y (name_obstack): Now an auto_obstack.
7326         (yylex): Use auto_obstack::clear.
7327         (d_parse): Use auto_obstack::clear instead of reinitializing and
7328         freeing the obstack.
7329         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7330         auto_obstack.
7331         * dwarf2read.c (create_addrmap_from_index)
7332         (dwarf2_build_psymtabs_hard)
7333         (update_enumeration_type_from_children): Likewise.
7334         * gdb_obstack.h (auto_obstack): New type.
7335         * go-exp.y (name_obstack): Now an auto_obstack.
7336         (build_packaged_name): Use auto_obstack::clear.
7337         (go_parse): Use auto_obstack::clear instead of reinitializing and
7338         freeing the obstack.
7339         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7340         auto_obstack.
7341         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7342         * rust-exp.y (work_obstack): Now an auto_obstack.
7343         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7344         reinitializing and freeing the obstack.
7345         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7346         (host_char_to_target): Use auto_obstack.
7347         * utils.h (make_cleanup_obstack_free): Delete declaration.
7348         * valprint.c (generic_emit_char, generic_printstr): Use
7349         auto_obstack.
7350
7351 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7352
7353         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7354         thread.
7355         (darwin_init_thread_list): Don't update dummy thread.
7356         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7357
7358 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7359
7360         * record-full.c (netorder16): Remove.
7361
7362 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7363
7364         * common/diagnostics.h: Define macros for GCC.
7365         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7366         * common/vec.h: Include diagnostics.h.
7367         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7368         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7369         warning.
7370
7371 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7372
7373         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7374         New macro.
7375         * ada-lex.l: Ignore deprecated register warnings.
7376
7377 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7378
7379         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7380         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7381
7382 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7383
7384         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7385         its own line.
7386
7387 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7388
7389         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7390
7391 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7392
7393         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7394         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7395         (xtensa_register_read_masked): Likewise.
7396
7397 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7398
7399         * common/environ.c (gdb_environ::unset): Update comment.
7400
7401 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7402
7403         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7404         registers.
7405
7406 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7407
7408         * record-full.c (record_full_exec_insn): Use byte_vector.
7409
7410 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7411
7412         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7413         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7414
7415 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7416
7417         * remote.c (cached_reg): Move from here...
7418         * regcache.h (cached_reg): ...to here.
7419         * python/py-unwind.c (struct reg_info): Remove.
7420         (cached_frame_info): Use cached_reg_t.
7421         (pyuw_prev_register): Likewise.
7422         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7423         (pyuw_dealloc_cache): Free all registers.
7424
7425 2017-06-22  Pedro Alves  <palves@redhat.com>
7426             Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7429         warning.
7430         * common/diagnostics.h: New file.
7431
7432 2017-06-22  Pedro Alves  <palves@redhat.com>
7433
7434         * common/agent.h: Add include guards.
7435
7436 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7437
7438         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7439         talk about addressable units instead of bytes.
7440
7441 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7442
7443         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7444         of '::const_iterator'.
7445
7446 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7447
7448         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7449         'unittests/environ-selftests.c'.
7450         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7451         * charset.c (find_charset_names): Declare object 'iconv_env'.
7452         Update code to use 'iconv_env' object.  Remove call to
7453         'free_environ'.
7454         * common/environ.c: Include <utility>.
7455         (make_environ): Delete function.
7456         (free_environ): Delete function.
7457         (gdb_environ::clear): New function.
7458         (gdb_environ::operator=): New function.
7459         (gdb_environ::get): Likewise.
7460         (environ_vector): Delete function.
7461         (set_in_environ): Delete function.
7462         (gdb_environ::set): New function.
7463         (unset_in_environ): Delete function.
7464         (gdb_environ::unset): New function.
7465         (gdb_environ::envp): Likewise.
7466         * common/environ.h: Include <vector>.
7467         (struct gdb_environ): Delete; transform into...
7468         (class gdb_environ): ... this class.
7469         (free_environ): Delete prototype.
7470         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7471         environ_vector): Likewise.
7472         * infcmd.c (run_command_1): Update code to call
7473         'envp' from 'gdb_environ' class.
7474         (environment_info): Update code to call methods from 'gdb_environ'
7475         class.
7476         (unset_environment_command): Likewise.
7477         (path_info): Likewise.
7478         (path_command): Likewise.
7479         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7480         (inferior::inferior): Initialize 'environment' using the host's
7481         information.
7482         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7483         Include "environ.h".
7484         (class inferior) <environment>: Change type from 'struct
7485         gdb_environ' to 'gdb_environ'.
7486         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7487         methods from 'gdb_environ' class.
7488         * solib.c (solib_find_1): Likewise
7489         * unittests/environ-selftests.c: New file.
7490
7491 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7492
7493         * features/i386/i386-linux.xml: Exchange the order of including
7494         32bit-linux.xml and 32bit-sse.xml.
7495         * features/i386/i386-linux.c: Regenerated.
7496
7497 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7498
7499         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7500         Delete copy ctor and assignment operator.
7501         (tdesc_type): Likewise.
7502         (tdesc_feature): Likewise.
7503         (tdesc_free_reg): Remove.
7504         (tdesc_create_reg): Use new.
7505         (tdesc_free_type): Remove.
7506         (tdesc_create_vector): Use new.
7507         (tdesc_create_union): Likewise.
7508         (tdesc_create_flags): Likewise.
7509         (tdesc_create_enum): Likewise.
7510         (tdesc_free_feature): Delete.
7511         (free_target_description): Use delete.
7512
7513 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7514
7515         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7516         registers.
7517
7518 2017-06-19  Pedro Alves  <palves@redhat.com>
7519
7520         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7521         after gdb::unlinker.
7522
7523 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7524
7525         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7526         gdb_environ to access an environment variable.
7527
7528 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7529
7530         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7531         gdb_byte*.
7532
7533 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7534
7535         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7536
7537 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7538
7539         * configure: Re-generate.
7540         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7541
7542 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7543
7544         * configure: Re-generate.
7545         * warning.m4: Pass -Werror to compiler when checking for
7546         supported warning flags.
7547
7548 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7549
7550         * Makefile.in (COMPILE.pre): Add "-x c++".
7551
7552 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7553             Pedro Alves  <palves@redhat.com>
7554             Yao Qi  <yao.qi@linaro.org>
7555
7556         * defs.h (RequireLongest): New.
7557         (extract_integer): Declare function template.
7558         (extract_signed_integer): Remove the declaration, but define it
7559         static inline.
7560         (extract_unsigned_integer): Likewise.
7561         (store_integer): Declare function template.
7562         (store_signed_integer): Remove the declaration, but define it
7563         static inline.
7564         (store_unsigned_integer): Likewise.
7565         * findvar.c (extract_integer): New function template.
7566         (extract_signed_integer): Remove.
7567         (extract_unsigned_integer): Remove.
7568         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7569         instantiations.
7570         (store_integer): New function template.
7571         (store_signed_integer): Remove.
7572         (store_unsigned_integer): Remove.
7573         (store_integer): Explicit instantiations.
7574         * regcache.c (regcache_raw_read_signed): Update.
7575         (regcache::raw_read): New function.
7576         (regcache::raw_read_signed): Remove.
7577         (regcache::raw_read_unsigned): Remove.
7578         (regcache_raw_read_unsigned): Update.
7579         (regcache_raw_write_unsigned): Update.
7580         (regcache::raw_write_signed): Remove.
7581         (regcache::raw_write): New function.
7582         (regcache_cooked_read_signed): Update.
7583         (regcache::raw_write_unsigned): Remove.
7584         (regcache::cooked_read_signed): Remove.
7585         (regcache_cooked_read_unsigned): Update.
7586         (regcache::cooked_read_unsigned): Remove.
7587         (regcache_cooked_write_signed): Update.
7588         (regcache_cooked_write_unsigned): Update.
7589         * regcache.h (regcache) <raw_read_signed>: Remove.
7590         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7591         <raw_read, raw_write>: New.
7592         <cooked_read_signed, cooked_write_signed>: Remove.
7593         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7594         <cooked_read, cooked_write>: New.
7595         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7596         (sh64_pseudo_register_write): Update.
7597
7598 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7599
7600         * arc-tdep.c (arc_disassembler_options): New variable.
7601         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7602         of default_print_insn.
7603         (arc_delayed_print_insn): Set info->section when needed,
7604         use default_print_insn to retrieve a disassembler.
7605
7606 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7607
7608         PR gdb/21574
7609         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7610         to mention $SHELL and startup-with-shell.
7611
7612 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7613
7614         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7615
7616 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7617
7618         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7619         default_print_insn instead of print_insn_aarch64.
7620         * arm-tdep.c (gdb_print_insn_arm): Call
7621         default_print_insn instead of print_insn_big_arm
7622         and print_insn_little_arm.
7623         * i386-tdep.c (i386_print_insn): Call default_print_insn
7624         instead of print_insn_i386.
7625         * ia64-tdep.c (ia64_print_insn): Call
7626         default_print_insn instead of print_insn_ia64.
7627         * mips-tdep.c (gdb_print_insn_mips): Call
7628         default_print_insn instead of print_insn_big_mips
7629         and print_insn_little_mips.
7630         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7631         instead of print_insn_spu.
7632
7633 2017-06-14  Pedro Alves  <palves@redhat.com>
7634
7635         * ada-lang.c: Include "common/byte-vector.h".
7636         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7637         * charset.c (wchar_iterator::iterate): Resize the vector instead
7638         of reserving it.
7639         * common/byte-vector.h: Include "common/def-vector.h".
7640         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7641         * cli/cli-dump.c: Include "common/byte-vector.h".
7642         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7643         * common/byte-vector.h: New file.
7644         * common/def-vector.h: New file.
7645         * common/default-init-alloc.h: New file.
7646         * dwarf2loc.c: Include "common/byte-vector.h".
7647         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7648         instead of reserving it.
7649         * dwarf2read.c: Include "common/byte-vector.h".
7650         (data_buf::m_vec): Now a gdb::byte_vector.
7651         * gdb_regex.c: Include "common/def-vector.h".
7652         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7653         * mi/mi-main.c: Include "common/byte-vector.h".
7654         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7655         * printcmd.c: Include "common/byte-vector.h".
7656         (print_scalar_formatted): Use gdb::byte_vector.
7657         * valprint.c: Include "common/byte-vector.h".
7658         (maybe_negate_by_bytes, print_decimal_chars): Use
7659         gdb::byte_vector.
7660
7661 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7662
7663         * darwin-nat.c: Include "nat/fork-inferior.h".
7664
7665 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7666
7667         * configure.nat: Factor out Darwin bits that are not
7668         architecture-specific.  Add fork-inferior.o.
7669
7670 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7671
7672         * configure.nat: Factor out AIX bits that are not
7673         architecture-specific.  Add fork-inferior.o.
7674
7675 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7676
7677         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7678         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7679         wrappers that just call rw_pieced_value.
7680
7681 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7682
7683         * dwarf2loc.c (write_pieced_value): When writing the data for a
7684         memory piece, use write_memory_with_notification instead of
7685         write_memory.
7686
7687 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7688
7689         * valops.c (read_value_memory): Change embedded_offset to
7690         represent a bit offset instead of a byte offset.
7691         * value.h (read_value_memory): Adjust comment.
7692
7693 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7694
7695         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7696         dest_offset_bits and source_offset_bits.
7697         (write_pieced_value): Likewise.
7698
7699 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7700
7701         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7702         given by DW_OP_bit_piece.
7703         (write_pieced_value): Likewise.
7704
7705 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7706
7707         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7708         some other preparations to the places where sufficient information
7709         is available.
7710         (write_pieced_value): Likewise.
7711
7712 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7713
7714         * dwarf2loc.c (bits_to_bytes): New function.
7715         (read_pieced_value): Fix offset calculations for register pieces
7716         on big-endian targets.
7717         (write_pieced_value): Likewise.
7718
7719 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7720
7721         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7722         (write_pieced_value): Likewise.
7723
7724 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7725
7726         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7727         transfer the source value's least significant bits, instead of its
7728         lowest-addressed ones.  Rename type_len to max_offset.
7729         (read_pieced_value): Mirror above changes to write_pieced_value as
7730         applicable.
7731
7732 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7733
7734         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7735         truncate full bytes from dest_offset_bits before using it as an
7736         offset into the buffer.
7737
7738 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7739
7740         * dwarf2loc.c (write_pieced_value): Include transfer size in
7741         byte-wise check.
7742
7743 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7744
7745         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7746         calculation of this_size.
7747
7748 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7749
7750         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7751         when targeting a bit-field.
7752         (write_pieced_value): Likewise.
7753
7754 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7755
7756         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7757         (allocate_piece_closure): Drop addr_size parameter.
7758         (dwarf2_evaluate_loc_desc_full): Adjust call to
7759         allocate_piece_closure.
7760
7761 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7762
7763         PR gdb/21226
7764         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7765         the LSB end, independent of endianness.
7766
7767 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7768
7769         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7770         size capping.
7771
7772 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7773
7774         * mips-linux-nat.c: Move include features/mips*-linux.c to
7775         mips-linux-tdep.c.
7776         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7777         to mips-linux-tdep.c.
7778         * mips-linux-tdep.c: Include features/mips*-linux.c
7779         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7780         functions.
7781         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7782         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7783         (tdesc_mips64_dsp_linux): Declare.
7784
7785 2017-06-12  Tom Tromey  <tom@tromey.com>
7786
7787         * valprint.h (val_print_type_code_int): Remove.
7788         * valprint.c (generic_val_print_int): Always call
7789         val_print_scalar_formatted.
7790         (val_print_type_code_int): Remove.
7791         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7792         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7793         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7794         * ada-valprint.c (ada_val_print_num): Use
7795         val_print_scalar_formatted.
7796
7797 2017-06-12  Tom Tromey  <tom@tromey.com>
7798
7799         * printcmd.c (print_scalar_formatted): Unify the two switches.
7800         Don't convert scalars to LONGEST.
7801
7802 2017-06-12  Tom Tromey  <tom@tromey.com>
7803
7804         PR exp/16225:
7805         * valprint.h (print_decimal_chars): Update.
7806         * valprint.c (maybe_negate_by_bytes): New function.
7807         (print_decimal_chars): Add "is_signed" argument.
7808         * printcmd.c (print_scalar_formatted): Update.
7809
7810 2017-06-12  Tom Tromey  <tom@tromey.com>
7811
7812         PR exp/16225:
7813         * valprint.h (print_binary_chars, print_hex_chars): Update.
7814         * valprint.c (val_print_type_code_int): Update.
7815         (print_binary_chars): Add "zero_pad" argument.
7816         (emit_octal_digit): New function.
7817         (print_octal_chars): Don't zero-pad.
7818         (print_decimal_chars): Likewise.
7819         (print_hex_chars): Add "zero_pad" argument.
7820         * sh64-tdep.c (sh64_do_fp_register): Update.
7821         * regcache.c (regcache::dump): Update.
7822         * printcmd.c (print_scalar_formatted): Update.
7823         * infcmd.c (default_print_one_register_info): Update.
7824
7825 2017-06-12  Pedro Alves  <palves@redhat.com>
7826             Alan Hayward  <alan.hayward@arm.com>
7827
7828         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7829         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7830         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7831         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7832         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7833
7834 2017-06-12  Pedro Alves  <palves@redhat.com>
7835
7836         * dwarf2read.c (mapped_symtab::data): Now a vector of
7837         symtab_index_entry instead of vector of
7838         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7839         whether an element's name is NULL instead of checking whether the
7840         element itself is NULL.
7841         (find_slot): Change return type.  Adjust.
7842         (hash_expand, , add_index_entry, uniquify_cu_indices)
7843         (write_hash_table): Adjust.
7844
7845 2017-06-12  Pedro Alves  <palves@redhat.com>
7846
7847         * dwarf2read.c (recursively_count_psymbols): New function.
7848         (write_psymtabs_to_index): Call it to compute number of psyms and
7849         pass estimate size of psyms_seen to unordered_set's ctor.
7850
7851 2017-06-12  Pedro Alves  <palves@redhat.com>
7852
7853         * dwarf2read.c (write_hash_table): Check if key already exists
7854         before emplacing.
7855
7856 2017-06-12  Pedro Alves  <palves@redhat.com>
7857
7858         * dwarf2read.c (data_buf::append_space): Rename to...
7859         (data_buf::grow): ... this, and make private.  Adjust all callers.
7860         (data_buf::append_uint): New method.
7861         (add_address_entry, write_one_signatured_type)
7862         (write_psymtabs_to_index): Use it.
7863
7864 2017-06-12  Pedro Alves  <palves@redhat.com>
7865
7866         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7867         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7868         (data_buf::file_write): Call ::fwrite directly.
7869
7870 2017-06-12  Pedro Alves  <palves@redhat.com>
7871
7872         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7873         std::vector::erase.
7874
7875 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7876
7877         Code cleanup: C++ify .gdb_index producer.
7878         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7879         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7880         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7881         (create_strtab, add_string): Remove.
7882         (file_write, data_buf): New.
7883         (struct symtab_index_entry): Use std::vector for cu_indices.
7884         (struct mapped_symtab): Use std::vector for data.
7885         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7886         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7887         Remove.
7888         (find_slot): Change return type.  Update it to the new data structures.
7889         (hash_expand, add_index_entry): Update it to the new data structures.
7890         (offset_type_compare): Remove.
7891         (uniquify_cu_indices): Update it to the new data structures.
7892         (c_str_view, c_str_view_hasher, vector_hasher): New.
7893         (add_indices_to_cpool): Remove.
7894         (write_hash_table): Update it to the new data structures.
7895         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7896         (eq_psymtab_cu_index): Remove.
7897         (psym_index_map): New typedef.
7898         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7899         reference and std::unordered_map for cu_index_htab.
7900         (add_address_entry, add_address_entry_worker, write_address_map)
7901         (write_psymbols): Update it to the new data structures.
7902         (write_obstack): Remove.
7903         (struct signatured_type_index_data): Change types_list to a data_buf
7904         reference and psyms_seen to a std::unordered_set reference.
7905         (write_one_signatured_type, recursively_write_psymbols)
7906         (write_psymtabs_to_index): Update it to the new data structures.
7907
7908 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7909
7910         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7911         separate-debug-file commands.
7912         * symfile.h (separate_debug_file_debug): New global.
7913         * symfile.c (separate_debug_file_debug): New global.
7914         (separate_debug_file_exists, find_separate_debug_file): Add
7915         debug output.
7916         (_initialize_symfile): Add "set debug separate-debug-file"
7917         command.
7918         * build-id.c (build_id_to_debug_bfd,
7919         find_separate_debug_file_by_buildid): Add debug output.
7920
7921 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7922
7923         * gdbarch.sh (displaced_step_free_closure): Remove.
7924         * gdbarch.h, gdbarch.c: Re-generate.
7925         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7926         displaced_step_free_closure.
7927         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7928         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7929         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7930         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7931         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7932         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7933         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7934         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7935         * infrun.c (displaced_step_clear): Call xfree instead of
7936         gdbarch_displaced_step_free_closure.
7937
7938 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7939
7940         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7941         NULL".
7942
7943 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7944
7945         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7946         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7947         (mn10300_push_dummy_call): Likewise.
7948
7949 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7950
7951         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7952
7953 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7954
7955         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7956
7957 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7958
7959         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7960         able to start inferiors using a shell.
7961         (New remote packets): Announce new packet "QStartupWithShell".
7962         * remote.c: Add PACKET_QStartupWithShell.
7963         (extended_remote_create_inferior): Handle new
7964         PACKET_QStartupWithShell.
7965         (remote_protocol_features) <QStartupWithShell>: New entry for
7966         PACKET_QStartupWithShell.
7967         (_initialize_remote): Call "add_packet_config_cmd" for
7968         QStartupShell.
7969
7970 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7971             Pedro Alves  <palves@redhat.com>
7972
7973         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7974         and "nat/fork-inferior.h".
7975         * common/common-inferior.h: New file, with contents from
7976         "gdb/inferior.h".
7977         * commom/common-utils.c: Include "common-utils.h".
7978         (stringify_argv): New function.
7979         * common/common-utils.h (stringify_argv): New prototype.
7980         * configure.nat: Add "fork-inferior.o" as a dependency for
7981         "*linux*", "fbsd*" and "nbsd*" hosts.
7982         * corefile.c (get_exec_file): Update comment.
7983         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7984         instead of "startup_inferior".
7985         (darwin_create_inferior): Call "add_thread_silent" after
7986         "fork_inferior".
7987         * fork-child.c: Cleanup unnecessary includes.
7988         (SHELL_FILE): Move to "common/common-fork-child.c".
7989         (environ): Likewise.
7990         (exec_wrapper): Initialize.
7991         (get_exec_wrapper): New function.
7992         (breakup_args): Move to "common/common-fork-child.c"; rename to
7993         "breakup_args_for_exec".
7994         (escape_bang_in_quoted_argument): Move to
7995         "common/common-fork-child.c".
7996         (saved_ui): New variable.
7997         (prefork_hook): New function.
7998         (postfork_hook): Likewise.
7999         (postfork_child_hook): Likewise.
8000         (gdb_startup_inferior): Likewise.
8001         (fork_inferior): Move to "common/common-fork-child.c".  Update
8002         function to support gdbserver.
8003         (startup_inferior): Likewise.
8004         * gdbcore.h (get_exec_file): Remove declaration.
8005         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8006         instead of "startup_inferior".  Call "add_thread_silent" after
8007         "fork_inferior".
8008         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8009         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8010         instead of "startup_inferior".  Call "add_thread_silent" after
8011         "fork_inferior".
8012         * inferior.h: Include "common-inferior.h".
8013         (trace_start_error): Move to "common/common-utils.h".
8014         (trace_start_error_with_name): Likewise.
8015         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8016         (startup_inferior): Likewise.
8017         (gdb_startup_inferior): New prototype.
8018         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8019         * nat/fork-inferior.h: New file.
8020         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8021         instead of "startup_inferior".  Call "add_thread_silent" after
8022         "fork_inferior".
8023         * target.h (target_terminal_init): Move prototype to
8024         "target/target.h".
8025         (target_terminal_inferior): Likewise.
8026         (target_terminal_ours): Likewise.
8027         * target/target.h (target_terminal_init): New prototype, moved
8028         from "target.h".
8029         (target_terminal_inferior): Likewise.
8030         (target_terminal_ours): Likewise.
8031         * utils.c (gdb_flush_out_err): New function.
8032
8033 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8034
8035         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8036         * common/common-gdbthread.h: New file, with parts from
8037         "gdb/gdbthread.h".
8038         * gdbthread.h: Include "common-gdbthread.h".
8039         (switch_to_thread): Moved to "common/common-gdbthread.h".
8040
8041 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8042
8043         * Makefile.in (SFILES): Add "common/job-control.c".
8044         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8045         (COMMON_OBS): Add "job-control.o".
8046         * common/job-control.c: New file, with contents from
8047         "gdb/inflow.c".
8048         * common/job-control.h: New file, with contents from "terminal.h".
8049         * fork-child.c: Include "job-control.h".
8050         * inflow.c: Include "job-control.h".
8051         (gdb_setpgid): Move to "common/common-inflow.c".
8052         (_initialize_inflow): Move setting of "job_control" to
8053         "handle_job_control".
8054         * terminal.h (job_control): Moved to "common/common-terminal.h".
8055         (gdb_setpgid): Likewise.
8056         * top.c: Include "job_control.h".
8057         * utils.c: Likewise.
8058         (job_control): Moved to "job-control.c".
8059
8060 2017-06-07  Pedro Alves  <palves@redhat.com>
8061
8062         * Makefile.in (SFILES): Add gdb_regex.c.
8063         (COMMON_OBS): Add gdb_regex.o.
8064         * ada-lang.c (ada_add_standard_exceptions)
8065         (ada_add_exceptions_from_frame, name_matches_regex)
8066         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8067         parameter type to compiled_regex.  Adjust.
8068         (ada_exceptions_list): Use compiled_regex.
8069         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8070         std::unique_ptr<compiled_regex>.
8071         (exception_catchpoint::~exception_catchpoint): Remove regfree
8072         call.
8073         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8074         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8075         * breakpoint.c (solib_catchpoint::compiled): Now a
8076         std::unique_ptr<compiled_regex>.
8077         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8078         (check_status_catch_solib): Adjust to use compiled_regex.
8079         (add_solib_catchpoint): Adjust to use compiled_regex.
8080         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8081         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8082         compiled_regex reference.  Adjust to use it.
8083         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8084         declaration.  Include "gdb_regex.h".
8085         (apropos_cmd): Change regex parameter to compiled_regex reference.
8086         * gdb_regex.c: New file.
8087         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8088         declarations.
8089         (class compiled_regex): New.
8090         * linux-tdep.c: Include "common/gdb_optional.h".
8091         (struct mapping_regexes): New, factored out from
8092         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8093         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8094         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8095         * probe.c: Include "common/gdb_optional.h".
8096         (collect_probes): Use compiled_regex and gdb::optional and remove
8097         cleanups.
8098         * skip.c: Include "common/gdb_optional.h".
8099         (skiplist_entry::compiled_function_regexp): Now a
8100         gdb::optional<compiled_regex>.
8101         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8102         (free_skiplist_entry): Remove regfree call.
8103         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8104         compiled_regex and gdb::optional.
8105         * symtab.c: Include "common/gdb_optional.h".
8106         (search_symbols): Use compiled_regex and gdb::optional.
8107         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8108         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8109         to gdb_regex.c.
8110
8111 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8112
8113         * regcache.c (regcache::save): Avoid buffer use.
8114         (regcache::dump): Likewise.
8115
8116 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8117
8118         * sh-tdep.c (sh_pseudo_register_read): Remove
8119         MAX_REGISTER_SIZE.
8120         (sh_pseudo_register_write): Likewise.
8121         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8122         (sh64_pseudo_register_write): Likewise
8123
8124 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8125
8126         * aarch64-tdep.c (aarch64_store_return_value): Use
8127         V_REGISTER_SIZE.
8128         (aarch64_pseudo_read_value): Likewise.
8129         (aarch64_pseudo_write): Likewise.
8130
8131 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8132
8133         * regformats/regdef.h (set_register_cache): Remove the
8134         declaration.
8135
8136 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8137
8138         * frame.c (frame_unwind_register_signed): Use
8139         frame_unwind_register_value.
8140
8141 2017-06-06  Pedro Alves  <palves@redhat.com>
8142
8143         PR breakpoints/21553
8144         * breakpoint.c (create_breakpoints_sal_default)
8145         (init_breakpoint_sal, create_breakpoint_sal): Use
8146         gdb::unique_xmalloc_ptr for string parameters.
8147         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8148         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8149         (base_breakpoint_create_breakpoints_sal)
8150         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8151         (strace_marker_create_breakpoints_sal)
8152         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8153         string parameters.
8154         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8155         gdb::unique_xmalloc_ptr for string parameters.
8156         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8157         parameters.
8158
8159 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8160
8161         * alpha-tdep.c (alpha_register_to_value): Use
8162         get_frame_register_value.
8163         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8164
8165 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8166
8167         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8168         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8169         (ia64_value_to_register): Likewise.
8170         (ia64_extract_return_value): Likewise.
8171         (ia64_store_return_value): Likewise.
8172         (ia64_push_dummy_call): Likewise.
8173
8174 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8175
8176         GDB 8.0 released.
8177
8178 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8179
8180         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8181
8182 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8183
8184         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8185         parameter.
8186         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8187
8188 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8189
8190         * event-loop.c (poll_timers): Unallocate timer using delete
8191         instead of xfree.
8192
8193 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8194
8195         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8196         (struct breakpoint) <~breakpoint>: New.
8197         (struct watchpoint): Inherit from breakpoint.
8198         <~watchpoint>: New.
8199         <base>: Remove.
8200         (struct tracepoint): Inherit from breakpoint.
8201         <base>: Remove.
8202         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8203         (struct longjmp_breakpoint): Inherit from breakpoint.
8204         <~longjmp_breakpoint>: New.
8205         <base>: Remove.
8206         (new_breakpoint_from_type): Remove casts.
8207         (watchpoint_in_thread_scope): Remove reference to base field.
8208         (watchpoint_del_at_next_stop): Likewise.
8209         (update_watchpoint): Likewise.
8210         (watchpoint_check): Likewise.
8211         (bpstat_check_watchpoint): Likewise.
8212         (set_longjmp_breakpoint): Likewise.
8213         (struct fork_catchpoint): Inherit from breakpoint.
8214         <base>: Remove.
8215         (struct solib_catchpoint): Inherit from breakpoint.
8216         <~solib_catchpoint>: New.
8217         <base>: Remove.
8218         (dtor_catch_solib): Change to ...
8219         (solib_catchpoint::~solib_catchpoint): ... this.
8220         (breakpoint_hit_catch_solib): Remove reference to base field.
8221         (add_solib_catchpoint): Likewise.
8222         (create_fork_vfork_event_catchpoint): Likewise.
8223         (struct exec_catchpoint): Inherit from breakpoint.
8224         <~exec_catchpoint>: New.
8225         <base>: Remove.
8226         (dtor_catch_exec): Change to ...
8227         (exec_catchpoint::~exec_catchpoint): ... this.
8228         (dtor_watchpoint): Change to ...
8229         (watchpoint::~watchpoint): ... this.
8230         (watch_command_1): Remove reference to base field.
8231         (catch_exec_command_1): Likewise.
8232         (base_breakpoint_dtor): Change to ...
8233         (breakpoint::~breakpoint): ... this.
8234         (base_breakpoint_ops): Remove dtor field value.
8235         (longjmp_bkpt_dtor): Change to ...
8236         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8237         (strace_marker_create_breakpoints_sal): Remove reference to base
8238         field.
8239         (delete_breakpoint): Don't manually call breakpoint destructor.
8240         (create_tracepoint_from_upload): Remove reference to base field.
8241         (trace_pass_set_count): Likewise.
8242         (initialize_breakpoint_ops): Don't initialize
8243         momentary_breakpoint_ops, don't set dtors.
8244         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8245         <~ada_catchpoint>: New.
8246         <base>: Remove.
8247         (create_excep_cond_exprs): Remove reference to base field.
8248         (dtor_exception): Change to ...
8249         (ada_catchpoint::~ada_catchpoint): ... this.
8250         (dtor_catch_exception): Remove.
8251         (dtor_catch_exception_unhandled): Remove.
8252         (dtor_catch_assert): Remove.
8253         (create_ada_exception_catchpoint): Remove reference to base
8254         field.
8255         (initialize_ada_catchpoint_ops): Don't set dtors.
8256         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8257         breakpoint.
8258         <~signal_catchpoint>: New.
8259         <base>: Remove.
8260         (signal_catchpoint_dtor): Change to ...
8261         (signal_catchpoint::~signal_catchpoint): ... this.
8262         (create_signal_catchpoint): Remove reference to base field.
8263         (initialize_signal_catchpoint_ops): Don't set dtor.
8264         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8265         from breakpoint.
8266         <~syscall_catchpoint>: New.
8267         <base>: Remove.
8268         (dtor_catch_syscall): Change to ...
8269         (syscall_catchpoint::~syscall_catchpoint): ... this.
8270         (create_syscall_event_catchpoint): Remove reference to base
8271         field.
8272         (initialize_syscall_catchpoint_ops): Don't set dtor.
8273         * break-catch-throw.c (struct exception_catchpoint): Inherit
8274         from breakpoint.
8275         <~exception_catchpoint>: New.
8276         <base>: Remove.
8277         (dtor_exception_catchpoint): Change to ...
8278         (exception_catchpoint::~exception_catchpoint): ... this.
8279         (handle_gnu_v3_exceptions): Remove reference to base field.
8280         (initialize_throw_catchpoint_ops): Don't set dtor.
8281         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8282         field.
8283         * remote.c (remote_get_tracepoint_status): Likewise.
8284         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8285         * tracefile.c (tracefile_fetch_registers): Likewise.
8286         * tracepoint.c (actions_command): Likewise.
8287         (validate_actionline): Likewise.
8288         (tfind_1): Likewise.
8289         (get_traceframe_location): Likewise.
8290         (find_matching_tracepoint_location): Likewise.
8291         (parse_tracepoint_status): Likewise.
8292         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8293
8294 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8295
8296         * breakpoint.c (struct longjmp_breakpoint): New struct.
8297         (is_tracepoint_type): Change return type to bool.
8298         (is_longjmp_type): New function.
8299         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8300         (set_raw_breakpoint_without_location): Use
8301         new_breakpoint_from_type.
8302         (set_raw_breakpoint): Likewise.
8303
8304 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8305
8306         * breakpoint.c (new_breakpoint_from_type): New function.
8307         (create_breakpoint_sal): Use new_breakpoint_from_type and
8308         unique_ptr.
8309         (create_breakpoint): Likewise.
8310
8311 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8312
8313         * memattr.c (mem_info_command): Rename to ...
8314         (info_mem_command): ... this.
8315         (mem_enable_command): Rename to ...
8316         (enable_mem_command): ... this.
8317         (mem_disable_command): Rename to ...
8318         (disable_mem_command): ... this.
8319         (mem_delete_command): Rename to ...
8320         (delete_mem_command): ... this.
8321         (_initialize_mem): Adjust function names.
8322
8323 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8324
8325         * btrace.c (handle_pt_insn_events): New.
8326         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8327         STATUS.  Split into this and ...
8328         (handle_pt_insn_event_flags): ... this.
8329
8330 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8331
8332         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8333         and struct pt_insn.resynced.
8334         * configure: Regenerated.
8335         * config.in: Regenerated.
8336
8337 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8338
8339         * btrace.c (ftrace_find_call_by_number): New function.
8340         (ftrace_new_function): Store objects, not pointers.
8341         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8342         ftrace_new_gap, ftrace_update_function,
8343         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8344         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8345         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8346         btrace_ends_with_single_insn, btrace_call_get): Account for
8347         btrace_thread_info::functions now storing objects.
8348         * btrace.h (struct btrace_thread_info): Add constructor.
8349         (struct btrace_thread_info) <functions>: Make std::vector.
8350         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8351         Initialize with default values.
8352         * record-btrace.c (record_btrace_frame_sniffer): Account for
8353         btrace_thread_info::functions now storing objects.
8354
8355 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8356
8357         * btrace.c: Remove typedef bfun_s.
8358         (ftrace_new_gap): Directly add gaps to the list of gaps.
8359         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8360         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8361         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8362         instead of gdb VEC.
8363
8364 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8365
8366         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8367         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8368         with btrace_thread_info::next_segment and
8369         btrace_thread_info::prev_segment.
8370         * btrace.h: Remove struct btrace_func_link.
8371         (struct btrace_function): Replace pair of function segment pointers
8372         with pair of indices.
8373         * python/py-record-btrace.c (btpy_call_prev_sibling,
8374         btpy_call_next_sibling): Replace references to
8375         btrace_thread_info::segment with btrace_thread_info::next_segment and
8376         btrace_thread_info::prev_segment.
8377         * record-btrace.c (record_btrace_frame_this_id): Use
8378         btrace_find_call_by_number.
8379
8380 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8381
8382         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8383         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8384         btrace_insn_next, btrace_insn_prev): Remove references to
8385         btrace_thread_info::flow.
8386         * btrace.h (struct btrace_function): Remove FLOW.
8387
8388 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8389
8390         * btrace.c (ftrace_find_call_by_number): New function.
8391         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8392         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8393         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8394         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8395         index.
8396         * btrace.h (struct btrace_function): Turn UP into an index.
8397         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8398         as an index.
8399         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8400         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8401         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8402
8403 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8404
8405         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8406         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8407         ftrace_update_function, ftrace_compute_global_level_offset,
8408         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8409         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8410         btrace_insn_end, btrace_is_empty): Remove references to
8411         btrace_thread_info::begin and btrace_thread_info::end.
8412         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8413         (struct btrace_thread_info) <functions>: Adjust comment.
8414         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8415         btrace_thread_info::begin.
8416
8417 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8418
8419         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8420         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8421         ftrace_update_function): Remove arguments that implicitly were always
8422         BTINFO->END.
8423         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8424         Don't pass BTINFO->END.
8425
8426 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8427
8428         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8429         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8430         btrace_find_insn_by_number): Replace function segment pointer with
8431         index.
8432         (btrace_insn_cmp): Simplify.
8433         * btrace.h: (struct btrace_insn_iterator) Rename index to
8434         insn_index.  Replace function segment pointer with index into function
8435         segment vector.
8436         * record-btrace.c (record_btrace_call_history): Replace function
8437         segment pointer use with index.
8438         (record_btrace_frame_sniffer): Retrieve function call segment through
8439         vector.
8440         (record_btrace_set_replay): Remove defunc't safety check.
8441
8442 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8443
8444         * btrace.c (btrace_ends_with_single_insn): New function.
8445         (btrace_call_get, btrace_call_number, btrace_call_begin,
8446         btrace_call_end, btrace_call_next, btrace_call_prev,
8447         btrace_find_call_by_number): Use index into call segment vector
8448         instead of pointer.
8449         (btrace_call_cmp): Simplify.
8450         * btrace.h (struct btrace_call_iterator): Replace function call segment
8451         pointer with index into vector.
8452         * record-btrace.c (record_btrace_call_history): Use index instead of
8453         pointer.
8454
8455 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8456
8457         * btrace.c (btrace_insn_begin, btrace_insn_end,
8458         btrace_find_insn_by_number): Add btinfo to iterator.
8459         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8460
8461 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8462
8463         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8464         and save pointers directly.
8465         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8466         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8467         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8468         changed signature of functions.
8469         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8470         (btrace_fetch): Remove code that adds btrace_function pointers to
8471         vector of btrace_functions.
8472         (btrace_clear): Simplify freeing vector of btrace_functions.
8473
8474 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8475
8476         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8477         Replace VEC_* with std::vector functions.
8478         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8479         (struct btrace_thread_info)<functions>: Change type to std::vector.
8480
8481 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8482
8483         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8484         "Removed targets and native configurations" up.  Merge duplicate
8485         "New commands" sub-sections.  Add "New options" sub-sections.
8486
8487 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8488
8489         * defs.h (copy_integer_to_size): New declaration.
8490         * findvar.c (copy_integer_to_size): New function.
8491         (do_cint_test): New selftest function.
8492         (copy_integer_to_size_test): Likewise.
8493         (_initialize_findvar): Likewise.
8494         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8495         (mips_fbsd_collect_reg): Use raw_collect_integer.
8496         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8497         (mips64_fill_gregset): Use raw_collect_integer
8498         (mips64_fill_fpregset): Use raw_supply_integer.
8499         * regcache.c (regcache::raw_supply_integer): New function.
8500         (regcache::raw_collect_integer): Likewise.
8501         * regcache.h: (regcache::raw_supply_integer): New declaration.
8502         (regcache::raw_collect_integer): Likewise.
8503
8504 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8505
8506         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8507         (COMMON_OBS): Add gdbarch-selftests.o.
8508         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8509         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8510         * gdbarch-selftests.c: New file.
8511         * regcache.h (regcache) <~regcache>: Mark it virtual if
8512         GDB_SELF_TEST.
8513         <raw_write>: Likewise.
8514
8515 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8516
8517         * regcache.c (current_regcache): Change it to
8518         regcache::current_regcache.
8519         (regcache_observer_target_changed): Update.
8520         (regcache_thread_ptid_changed): Make it a regcache static
8521         method.
8522         (regcache_thread_ptid_changed): Update.
8523         (class regcache_access): New.
8524         (current_regcache_test): Update.
8525         (_initialize_regcache): Update.
8526         * regcache.h: Include forward_list.
8527         (regcache): Declare regcache_thread_ptid_changed and declare
8528         registers_changed_ptid as friend.
8529
8530 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8531
8532         * i387-tdep.c (i387_register_to_value): Use register_size
8533         instead of TYPE_LENGTH.
8534         * m68k-tdep.c (m68k_register_to_value): Likewise.
8535
8536 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8537
8538         * i387-tdep.c (i387_convert_register_p): Return false if type
8539         code isn't TYPE_CODE_FLT.
8540
8541 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8542
8543         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8544         length is 4.
8545         (alpha_register_to_value): Remove type length check.
8546         (alpha_value_to_register): Likewise.
8547
8548 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8549
8550         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8551         TYPE_CODE_FLT.
8552
8553 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8554
8555         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8556         TYPE_CODE_FLT or not.
8557
8558 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8559
8560         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8561         * avr-tdep.c (avr_gdbarch_init): Likewise.
8562         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8563         * cris-tdep.c (cris_gdbarch_init): Likewise.
8564         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8565         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8566         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8567         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8568         * mep-tdep.c (mep_gdbarch_init): Likewise.
8569         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8570         * mips-tdep.c (mips_gdbarch_init): Likewise.
8571         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8572         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8573         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8574         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8575         * v850-tdep.c (v850_gdbarch_init): Likewise.
8576
8577 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8578
8579         * selftest-arch.c (tests_with_arch): Call registers_changed
8580         and reinit_frame_cache.
8581         * selftest.c (run_self_tests): Likewise.
8582
8583 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8584
8585         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8586         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8587
8588 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8589
8590         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8591         set_gdbarch_print_insn.
8592
8593 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8594
8595         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8596         set_gdbarch_print_insn.
8597
8598 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8599
8600         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8601         set_gdbarch_print_insn.
8602         * arc-tdep.c (arc_gdbarch_init): Likewise.
8603         * arch-utils.c: include dis-asm.h.
8604         (default_print_insn): New function.
8605         * arch-utils.h (default_print_insn): Declare.
8606         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8607         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8608         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8609         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8610         * frv-tdep.c (frv_gdbarch_init): Likewise.
8611         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8612         * gdbarch.sh (print_insn): Use default_print_insn.
8613         * gdbarch.c: Regenerated.
8614         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8615         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8616         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8617         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8618         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8619         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8620         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8621         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8622         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8623         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8624         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8625         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8626         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8627         * mt-tdep.c (mt_gdbarch_init): Likewise.
8628         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8629         * nios2-tdep.c (nios2_print_insn): Remove.
8630         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8631         * rx-tdep.c (rx_gdbarch_init): Likewise.
8632         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8633         * score-tdep.c (score_print_insn): Remove.
8634         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8635         * sh-tdep.c (sh_gdbarch_init): Likewise.
8636         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8637         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8638         * tic6x-tdep.c (tic6x_print_insn): Remove.
8639         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8640         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8641         * v850-tdep.c (v850_gdbarch_init): Likewise.
8642         * vax-tdep.c (vax_gdbarch_init): Likewise.
8643         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8644         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8645
8646 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8647
8648         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8649         (MIPS_FP0_REGNUM): Remove.
8650         (MIPS_FSR_REGNUM): Remove.
8651         (mips_fbsd_supply_fpregs): Use mips_regnum.
8652         (mips_fbsd_supply_gregs): Likewise.
8653         (mips_fbsd_collect_fpregs): Likewise.
8654         (mips_fbsd_collect_gregs): Likewise.
8655
8656 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8657
8658         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8659         (getpfpregs_supplies): New function.
8660         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8661         getfpregs_supplies.
8662         (mips_fbsd_store_inferior_registers): Likewise.
8663
8664 2017-05-22  Pedro Alves <palves@redhat.com>
8665
8666         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8667         maintainer.
8668
8669 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8670
8671         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8672         (store_register): Likewise.
8673         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8674         (get_decimal_float_return_value): Likewise.
8675         (do_ppc_sysv_return_value): Likewise.
8676         (ppc64_sysv_abi_push_integer): Likewise.
8677         (ppc64_sysv_abi_push_freg): Likewise.
8678         (ppc64_sysv_abi_return_value_base): Likewise.
8679         (ppc64_sysv_abi_return_value): Likewise.
8680         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8681         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8682         * rs6000-nat.c: Likewise.
8683         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8684         (rs6000_value_to_register): Likewise.
8685         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8686
8687 2017-05-21  Tom Tromey  <tom@tromey.com>
8688
8689         PR rust/21466:
8690         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8691         arrays as "[T]", not "[T; ]".
8692
8693 2017-05-19  Tom Tromey  <tom@tromey.com>
8694
8695         PR rust/21484:
8696         * rust-lang.c (exp_descriptor_rust): New function.
8697         (rust_language_defn): Use it.
8698         * p-lang.c (pascal_language_defn): Update.
8699         * opencl-lang.c (opencl_language_defn): Update.
8700         * objc-lang.c (objc_language_defn): Update.
8701         * m2-lang.c (m2_language_defn): Update.
8702         * language.h (struct language_defn)
8703         <la_watch_location_expression>: New member.
8704         * language.c (unknown_language_defn, auto_language_defn)
8705         (local_language_defn): Update.
8706         * go-lang.c (go_language_defn): Update.
8707         * f-lang.c (f_language_defn): Update.
8708         * d-lang.c (d_language_defn): Update.
8709         * c-lang.h (c_watch_location_expression): Declare.
8710         * c-lang.c (c_watch_location_expression): New function.
8711         (c_language_defn, cplus_language_defn, asm_language_defn)
8712         (minimal_language_defn): Use it.
8713         * breakpoint.c (watch_command_1): Call
8714         la_watch_location_expression.
8715         * ada-lang.c (ada_language_defn): Update.
8716
8717 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8718
8719         PR tui/21482
8720         * gdb_curses.h (NOMACROS): Define.
8721         (NCURSES_NOMACROS): Define.
8722
8723 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8724
8725         PR tui/21482
8726         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8727         arg to char *.
8728         * tui/tui-wingeneral.c (box_win): Likewise.
8729         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8730         (tui_show_source_line): Likewise.
8731         (tui_show_exec_info_content): Likewise.
8732
8733 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8734
8735         * sparc-tdep.c (sparc_structure_return_p)
8736         (sparc_arg_on_registers_p): New functions.
8737         (sparc32_store_arguments): Use them.
8738         * sparc64-tdep.c (sparc64_16_byte_align_p)
8739         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8740         Handle TYPE_CODE_ARRAY.
8741
8742 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8743
8744         * cli/cli-decode.c (add_alias_cmd): New function.
8745         * command.h (add_alias_cmd): Declare.
8746         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8747         instead call add_alias_cmd.
8748
8749 2017-05-17  Pedro Alves  <palves@redhat.com>
8750
8751         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8752         (nat_makefile_frag): ... this.  All references updated.
8753         * configure.ac: Likewise.
8754         * configure.nat: Likewise.  Enhance comments.
8755         * configure: Regenerate.
8756
8757 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8758
8759         * procfs.c (procfs_create_inferior): Change prototype to match
8760         definition.
8761
8762 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8763
8764         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8765         C++ compiler warning.
8766
8767 2017-05-12  Tom Tromey  <tom@tromey.com>
8768
8769         PR rust/21483:
8770         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8771         recurse, just call value_struct_elt directly.
8772
8773 2017-05-12  Tom Tromey  <tom@tromey.com>
8774
8775         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8776         OP_RUST_ARRAY>: Fix.
8777
8778 2017-05-12  Tom Tromey  <tom@tromey.com>
8779
8780         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8781
8782 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8783
8784         * regcache.c: Include <forward_list>.
8785         (struct regcache_list): Remove.
8786         (current_regcache): Update.
8787         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8788         (regcache_thread_ptid_changed): Likewise.
8789         (registers_changed_ptid): Likewise.
8790         (current_regcache_size): Likewise.
8791
8792 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8793
8794         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8795         (current_regcache_size): New function.
8796         (current_regcache_test): New function.
8797         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8798
8799 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8800
8801         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8802         (print_gp_register_row): Use get_frame_register_value.
8803
8804 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8805
8806         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8807         (mips_supply_fpregset): Likewise.
8808         (mips64_supply_gregset): Likewise.
8809
8810 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8811
8812         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8813         regcache->raw_supply_zeroed.
8814
8815 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8816
8817         * configure.nat: Rearrange 'case' statements to match
8818         host before cpu.
8819
8820 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8821
8822         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8823         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8824         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8825         "@nat_extra_makefile_frag@".
8826         (Makefile): Remove dependency on "@frags@".
8827         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8828         (data-directory/Makefile): Likewise.
8829         * config/aarch64/linux.mh: Deleted; moved contents to
8830         "gdb/configure.nat".
8831         * config/alpha/alpha-linux.mh: Likewise.
8832         * config/alpha/nbsd.mh: Likewise.
8833         * config/arm/linux.mh: Likewise.
8834         * config/arm/nbsdelf.mh: Likewise.
8835         * config/i386/cygwin.mh: Likewise.
8836         * config/i386/cygwin64.mh: Likewise.
8837         * config/i386/darwin.mh: Likewise.
8838         * config/i386/fbsd.mh: Likewise.
8839         * config/i386/fbsd64.mh: Likewise.
8840         * config/i386/go32.mh: Likewise.
8841         * config/i386/i386gnu.mh: Likewise.
8842         * config/i386/i386sol2.mh: Likewise.
8843         * config/i386/linux.mh: Likewise.
8844         * config/i386/linux64.mh: Likewise.
8845         * config/i386/mingw.mh: Likewise.
8846         * config/i386/mingw64.mh: Likewise.
8847         * config/i386/nbsd64.mh: Likewise.
8848         * config/i386/nbsdelf.mh: Likewise.
8849         * config/i386/nto.mh: Likewise.
8850         * config/i386/obsd.mh: Likewise.
8851         * config/i386/obsd64.mh: Likewise.
8852         * config/i386/sol2-64.mh: Likewise.
8853         * config/ia64/linux.mh: Likewise.
8854         * config/m32r/linux.mh: Likewise.
8855         * config/m68k/linux.mh: Likewise.
8856         * config/m68k/nbsdelf.mh: Likewise.
8857         * config/m68k/obsd.mh: Likewise.
8858         * config/m88k/obsd.mh: Likewise.
8859         * config/mips/fbsd.mh: Likewise.
8860         * config/mips/linux.mh: Likewise.
8861         * config/mips/nbsd.mh: Likewise.
8862         * config/mips/obsd64.mh: Likewise.
8863         * config/pa/linux.mh: Likewise.
8864         * config/pa/nbsd.mh: Likewise.
8865         * config/pa/obsd.mh: Likewise.
8866         * config/powerpc/aix.mh: Likewise.
8867         * config/powerpc/fbsd.mh: Likewise.
8868         * config/powerpc/linux.mh: Likewise.
8869         * config/powerpc/nbsd.mh: Likewise.
8870         * config/powerpc/obsd.mh: Likewise.
8871         * config/powerpc/ppc64-linux.mh: Likewise.
8872         * config/powerpc/spu-linux.mh: Likewise.
8873         * config/s390/linux.mh: Likewise.
8874         * config/sh/nbsd.mh: Likewise.
8875         * config/sparc/fbsd.mh: Likewise.
8876         * config/sparc/linux.mh: Likewise.
8877         * config/sparc/linux64.mh: Likewise.
8878         * config/sparc/nbsd64.mh: Likewise.
8879         * config/sparc/nbsdelf.mh: Likewise.
8880         * config/sparc/obsd64.mh: Likewise.
8881         * config/sparc/sol2.mh: Likewise.
8882         * config/tilegx/linux.mh: Likewise.
8883         * config/vax/nbsdelf.mh: Likewise.
8884         * config/vax/obsd.mh: Likewise.
8885         * config/xtensa/linux.mh: Likewise.
8886         * config/i386/i386gnu.mn: New file, with excerpts from
8887         "config/i386/i386gnu.mh".
8888         * configure: Regenerate.
8889         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8890         *.mh files under "gdb/config".
8891         * configure.nat: New file, with contents from the
8892         "gdb/config/*/*.mh" files.
8893
8894 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8895
8896         * btrace.c (btrace_clear): Free insn vector.
8897
8898 2017-05-05  Pedro Alves  <palves@redhat.com>
8899
8900         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8901         * configure: Regenerate.
8902
8903 2017-05-04  Pedro Alves  <palves@redhat.com>
8904
8905         * Makefile.in (SFILES): Add progspace-and-thread.c.
8906         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8907         (COMMON_OBS): Add progspace-and-thread.o.
8908         * breakpoint.c: Include "progspace-and-thread.h".
8909         (update_inserted_breakpoint_locations)
8910         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8911         Use scoped_restore_current_pspace_and_thread.
8912         (create_std_terminate_master_breakpoint): Use
8913         scoped_restore_current_program_space.
8914         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8915         (print_breakpoint_location): Use
8916         scoped_restore_current_program_space.
8917         (bp_loc_is_permanent): Use
8918         scoped_restore_current_pspace_and_thread.
8919         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8920         (download_tracepoint_locations): Use
8921         scoped_restore_current_pspace_and_thread.
8922         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8923         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8924         (enum step_over_calls_kind): Moved from inferior.h.
8925         (class scoped_restore_current_thread): New class.
8926         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8927         declaration.
8928         (scoped_restore_current_thread): New class.
8929         * infcmd.c: Include "common/gdb_optional.h".
8930         (continue_1, proceed_after_attach): Use
8931         scoped_restore_current_thread.
8932         (notice_new_inferior): Use scoped_restore_current_thread.
8933         * inferior.c: Include "progspace-and-thread.h".
8934         (restore_inferior, save_current_inferior): Delete.
8935         (add_inferior_command, clone_inferior_command): Use
8936         scoped_restore_current_pspace_and_thread.
8937         * inferior.h (scoped_restore_current_inferior): New class.
8938         * infrun.c: Include "progspace-and-thread.h" and
8939         "common/gdb_optional.h".
8940         (follow_fork_inferior): Use
8941         scoped_restore_current_pspace_and_thread.
8942         (scoped_restore_exited_inferior): New class.
8943         (handle_vfork_child_exec_or_exit): Use
8944         scoped_restore_exited_inferior,
8945         scoped_restore_current_pspace_and_thread,
8946         scoped_restore_current_thread and scoped_restore.
8947         (fetch_inferior_event): Use scoped_restore_current_thread.
8948         * linespec.c (decode_line_full, decode_line_1): Use
8949         scoped_restore_current_program_space.
8950         * mi/mi-main.c: Include "progspace-and-thread.h".
8951         (exec_continue): Use scoped_restore_current_thread.
8952         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8953         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8954         * proc-service.c (ps_pglobal_lookup): Use
8955         scoped_restore_current_program_space.
8956         * progspace-and-thread.c: New file.
8957         * progspace-and-thread.h: New file.
8958         * progspace.c (release_program_space, clone_program_space): Use
8959         scoped_restore_current_program_space.
8960         (restore_program_space, save_current_program_space)
8961         (save_current_space_and_thread): Delete.
8962         (switch_to_program_space_and_thread): Moved to
8963         progspace-and-thread.c.
8964         * progspace.h (save_current_program_space)
8965         (save_current_space_and_thread): Delete declarations.
8966         (scoped_restore_current_program_space): New class.
8967         * remote.c (remote_btrace_maybe_reopen): Use
8968         scoped_restore_current_thread.
8969         * symtab.c: Include "progspace-and-thread.h".
8970         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8971         * thread.c (print_thread_info_1): Use
8972         scoped_restore_current_thread.
8973         (struct current_thread_cleanup): Delete.
8974         (do_restore_current_thread_cleanup)
8975         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8976         (scoped_restore_current_thread::~scoped_restore_current_thread):
8977         ... this new dtor.
8978         (make_cleanup_restore_current_thread): Rename/convert to ...
8979         (scoped_restore_current_thread::scoped_restore_current_thread):
8980         ... this new ctor.
8981         (thread_apply_all_command): Use scoped_restore_current_thread.
8982         (thread_apply_command): Use scoped_restore_current_thread.
8983         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8984         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8985
8986 2017-05-04  Pedro Alves  <palves@redhat.com>
8987
8988         * thread.c (make_cleanup_restore_current_thread): Move
8989         find_thread_ptid call before the is_stopped call.  Assert that the
8990         thread is found.  Replace is_stopped call by checking the thread's
8991         state directly.  Remove unnecessary NULL-thread check.
8992
8993 2017-05-04  Pedro Alves  <palves@redhat.com>
8994
8995         * corelow.c (thread_section_name): New class.
8996         (get_core_register_section, get_core_siginfo): Use it.
8997
8998 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8999
9000         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9001         (get_core_register_section): Remove xfree of NULL pointer.
9002
9003 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9004
9005         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9006         * regcache.c (regcache::raw_supply_zeroed): New function.
9007         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9008
9009 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9010
9011         * gdbarch.sh: Remove commented out definition of
9012         TARGET_CHAR_BIT.
9013         * gdbarch.h: Re-generate.
9014
9015 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9016
9017         * configure: Regenerate.
9018
9019 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9020
9021         * solib-target.c (solib_target_relocate_section_addresses):
9022         Remove num_section_bases, num_bases, segment_bases variables.
9023
9024 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9025
9026         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9027
9028 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9029
9030         * solib-target.c: Include <vector>
9031         (struct lm_info_target) <~lm_info_target>: Remove.
9032         <segment_bases, section_bases>: Change type to
9033         std::vector<CORE_ADDR>.
9034         (library_list_start_segment, library_list_start_section,
9035         library_list_end_library,
9036         solib_target_relocate_section_addresses): Adjust.
9037
9038 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9039
9040         * gdbarch.sh (software_single_step): Change return type to
9041         std::vector<CORE_ADDR>.
9042         * gdbarch.c, gdbarch.h: Re-generate.
9043         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9044         Adjust.
9045         (arm_deal_with_atomic_sequence_raw): Adjust.
9046         (thumb_get_next_pcs_raw): Adjust.
9047         (arm_get_next_pcs_raw): Adjust.
9048         (arm_get_next_pcs): Adjust.
9049         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9050         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9051         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9052         (alpha_software_single_step): Adjust.
9053         * alpha-tdep.h (alpha_software_single_step): Adjust.
9054         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9055         * arm-tdep.c (arm_software_single_step): Adjust.
9056         (arm_breakpoint_kind_from_current_state): Adjust.
9057         * arm-tdep.h (arm_software_single_step): Adjust.
9058         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9059         * cris-tdep.c (cris_software_single_step): Adjust.
9060         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9061         (micromips_deal_with_atomic_sequence): Adjust.
9062         (deal_with_atomic_sequence): Adjust.
9063         (mips_software_single_step): Adjust.
9064         * mips-tdep.h (mips_software_single_step): Adjust.
9065         * moxie-tdep.c (moxie_software_single_step): Adjust.
9066         * nios2-tdep.c (nios2_software_single_step): Adjust.
9067         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9068         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9069         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9070         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9071         * sparc-tdep.c (sparc_software_single_step): Adjust.
9072         * spu-tdep.c (spu_software_single_step): Adjust.
9073         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9074
9075 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9076
9077         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9078         * gdbarch.h: Re-generate.
9079
9080 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9081
9082         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9083         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9084         * python/py-instruction.c, python/py-instruction.h: New file.
9085         * python/py-record.c: Add py-instruction.h include.
9086         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9087         gdb.RecordInstruction.
9088         * python/python-internal.h: Add gdbpy_initialize_instruction
9089         declaration.
9090         * python/python.c (do_start_initialization): Add
9091         gdbpy_initialize_instruction.
9092
9093 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9094
9095         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9096         Remove.
9097         (btrace_func_from_recpy_func): New function.
9098         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9099         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9100         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9101         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9102         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9103         Also, use new helper functions.
9104         (btpy_list_item): Use new helper functions.
9105         (recpy_bt_function_call_history): Use new type name.
9106         (btpy_call_getset): Remove.
9107         (gdbpy_initialize_btrace): Remove code to initialize
9108         gdb.BtraceFunctionCall.
9109         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9110         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9111         recpy_bt_func_prev, recpy_bt_func_next): New export.
9112         * python/py-record.c (recpy_func_type): New static object.
9113         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9114         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9115         recpy_func_next): New function.
9116         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9117         (recpy_func_getset): New static object.
9118         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9119         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9120
9121 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9122
9123         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9124         (btpy_object, btpy_insn_type, btpy_new): Remove.
9125         (btpy_list_object): Use gdb.RecordInstruction type instead of
9126         gdb.BtraceInstruction type.
9127         (btrace_insn_from_recpy_insn): New function.
9128         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9129         btpy_new.
9130         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9131         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9132         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9133         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9134         instead of btpy_object.
9135         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9136         btpy_insn_data, btpy_insn_decode): Rename to ...
9137         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9138         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9139         recpy_bt_insn_decode): This.  Also, use new helper functions.
9140         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9141         recpy_insn_type.
9142         (btpy_insn_getset): Remove.
9143         (gdbpy_initialize_btrace): Remove code to initialize
9144         gdb.BtraceInstruction.  Use recpy_element_object.
9145         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9146         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9147         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9148         * python/py-record.c (recpy_insn_type): New static object.
9149         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9150         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9151         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9152         New function.
9153         (recpy_insn_getset): New static object.
9154         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9155         * python/py-record.h (recpy_element_object): New typedef.
9156         (recpy_insn_type, recpy_insn_new): New export.
9157
9158 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9159
9160         * py-record-btrace.c (btpy_insn_new): Removed.
9161         (btpy_insn_or_gap_new): New function.
9162         (btpy_insn_error): Removed.
9163         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9164         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9165         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9166         btpy_insn_or_gap_new instead of btpy_insn_new.
9167         (btpy_insn_getset): Remove btpy_insn_error.
9168         * py-record.c (recpy_gap_type): New static object.
9169         (recpy_gap_object): New typedef.
9170         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9171         recpy_gap_reason_string): New function.
9172         (recpy_gap_getset): New static object.
9173         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9174         * py-record.h (recpy_gap_new): New export.
9175
9176 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9177
9178         * python/py-record.c (recpy_ptid): Remove.
9179         (recpy_record_getset): Remove recpy_ptid.
9180
9181 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9182
9183         * btrace.c (btrace_fetch): Set inferior_ptid.
9184         * python/py-record-btrace.c: Add "py-record.h" include.
9185         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9186         recpy_bt_end, recpy_bt_instruction_history,
9187         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9188         in gdb.Record object instead of current ptid.
9189         * python/py-record.c: Include new "py-record.h" file.
9190         (recpy_record_object): Moved to py-record.h.
9191         * python/py-record.h: New file.
9192
9193 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9194
9195         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9196         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9197         indentation.
9198
9199 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9200
9201         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9202         the past maintainers section.
9203
9204 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9205
9206         * infcmd.c (get_return_value): Use regcache ctor, and remove
9207         cleanup.
9208
9209 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9210             Pedro Alves  <palves@redhat.com>
9211
9212         * regcache.c (regcache::regcache): New tag dispatch ctor.
9213         (do_cooked_read): Moved above.
9214         (regcache_dup): Use the tag dispatch ctor..
9215         * regcache.h (regcache): Declare ctor, delete copy ctor and
9216         assignment operator, remove friend regcache_dup.
9217
9218 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9219
9220         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9221         call method save instead of regcache_cpy.
9222         * regcache.h (struct regcache): Make regcache_dup a friend.
9223
9224 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9225
9226         * regcache.c (struct regcache): Move to regcache.h
9227         (regcache::arch): New method.
9228         (regcache_get_ptid): Update.
9229         (get_regcache_arch): Call arch method.
9230         (get_regcache_aspace): Call method aspace.
9231         (register_buffer): Change it to method.
9232         (regcache_save): Change it to regcache::save.
9233         (regcache_restore): Likewise.
9234         (regcache_cpy_no_passthrough): Remove the declaration.
9235         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9236         (regcache_cpy_no_passthrough): Change it to method
9237         cpy_no_passthrough.
9238         (regcache_register_status): Change it to method
9239         get_register_status.
9240         (regcache_invalidate): Change it to method invalidate.
9241         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9242         (regcache_raw_update): Change it to method raw_update.
9243         (regcache_raw_read): Likewise.
9244         (regcache_raw_read_signed): Likewise.
9245         (regcache_raw_read_unsigned): Likewise.
9246         (regcache_raw_write_signed): Likewise.
9247         (regcache_raw_write_unsigned): Likewise.
9248         (regcache_cooked_read): Likewise.
9249         (regcache_cooked_read_value): Likewise.
9250         (regcache_cooked_read_signed): Likewise.
9251         (regcache_cooked_read_unsigned): Likewise.
9252         (regcache_cooked_write_signed): Likewise.
9253         (regcache_cooked_write_unsigned): Likewise.
9254         (regcache_raw_set_cached_value): Likewise.
9255         (regcache_raw_write): Likewise.
9256         (regcache_cooked_write): Likewise.
9257         (regcache_xfer_part): Likewise.
9258         (regcache_raw_read_part): Likewise.
9259         (regcache_raw_write_part): Likewise.
9260         (regcache_cooked_read_part): Likewise.
9261         (regcache_cooked_write_part): Likewise.
9262         (regcache_raw_supply): Likewise.
9263         (regcache_raw_collect): Likewise.
9264         (regcache_transfer_regset): Likewise.
9265         (regcache_supply_regset): Likewise.
9266         (regcache_collect_regset): Likewise.
9267         (regcache_debug_print_register): Likewise.
9268         (enum regcache_dump_what): Move it to regcache.h.
9269         (regcache_dump): Change it to method dump.
9270         * regcache.h (enum regcache_dump_what): New.
9271         (class regcache): New.
9272         * target.c (target_fetch_registers): Call method
9273         debug_print_register.
9274         (target_store_registers): Likewise.
9275
9276 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9277
9278         * windows-nat.c (struct lm_info_windows): Initialize field.
9279         (windows_make_so): Allocate lm_info_windows with new.
9280         (windows_free_so): Free lm_info_windows with delete.
9281
9282 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9283
9284         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9285         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9286         cleanup.
9287         (darwin_free_so): Free lm_info_darwin with delete.
9288
9289 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9290
9291         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9292         <l_addr_p>: Change type to bool.
9293         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9294         (svr4_free_so): Free lm_info_svr4 with delete.
9295         (svr4_copy_library_list): Replace memcpy with call to copy
9296         constructor.
9297         (library_list_start_library, svr4_default_sos): Allocate
9298         lm_info_svr4 with new.
9299
9300 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9301
9302         * solib-target.c (struct lm_info_target): Add destructor,
9303         initialize fields.
9304         <name>: Change type to std::string.
9305         (library_list_start_library): Allocate lm_info_target with new.
9306         (solib_target_free_library_list): Free lm_info_target with
9307         delete.
9308         (solib_target_current_sos): Adapt to std::string.
9309         (solib_target_free_so): Free lm_info_target with delete.
9310
9311 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9312
9313         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9314         fields.
9315         (frv_current_sos): Allocate lm_info_frv with new.
9316         (frv_relocate_main_executable): Free lm_info_frv with delete,
9317         allocate with new.
9318         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9319
9320 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9321
9322         * solib-frv.c (struct lm_info_frv): Fix indentation.
9323
9324 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9325
9326         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9327         map field.
9328         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9329         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9330         and allocate with new.
9331         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9332
9333 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9334
9335         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9336         <filename, member_name>: Change type to std::string.
9337         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9338         (library_list_start_library): Allocate lm_info_aix with new.
9339         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9340         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9341         with copy constructor.
9342
9343 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9344
9345         * solist.h (struct lm_info): Remove.
9346         (struct lm_info_base): New class.
9347         (struct so_list) <lm_info>: Change type to lm_info_base *.
9348         * nto-tdep.c (struct lm_info): Remove.
9349         (lm_addr): Adjust.
9350         * solib-aix.c (struct lm_info): Rename to ...
9351         (struct lm_info_aix): ... this.  Extend lm_info_base.
9352         (lm_info_p): Rename to ...
9353         (lm_info_aix_p): ... this, and adjust.
9354         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9355         solib_aix_parse_libraries, library_list_start_library,
9356         solib_aix_free_library_list, solib_aix_parse_libraries,
9357         solib_aix_get_library_list,
9358         solib_aix_relocate_section_addresses, solib_aix_free_so,
9359         solib_aix_get_section_offsets,
9360         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9361         Adjust.
9362         (struct solib_aix_inferior_data) <library_list>: Adjust.
9363         * solib-darwin.c (struct lm_info): Rename to ...
9364         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9365         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9366         * solib-dsbt.c (struct lm_info): Rename to ...
9367         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9368         (struct dsbt_info) <main_executable_lm_info): Adjust.
9369         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9370         dsbt_relocate_section_addresses): Adjust.
9371         * solib-frv.c (struct lm_info): Rename to ...
9372         (struct lm_info_frv): ... this.  Extend lm_info_base.
9373         (main_executable_lm_info): Adjust.
9374         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9375         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9376         find_canonical_descriptor_in_load_object,
9377         frv_fdpic_find_canonical_descriptor): Adjust.
9378         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9379         to lm_info_svr4.
9380         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9381         svr4_clear_so, svr4_copy_library_list,
9382         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9383         svr4_current_sos, svr4_fetch_objfile_link_map,
9384         solist_update_incremental): Adjust.
9385         * solib-svr4.h (struct lm_info_svr4): Move here from
9386         solib-svr4.c.
9387         * solib-target.c (struct lm_info): Rename to ...
9388         (struct lm_info_target): ... this.  Extend lm_info_base.
9389         (lm_info_p): Rename to ...
9390         (lm_info_target_p): ... this.
9391         (solib_target_parse_libraries, library_list_start_segment,
9392         library_list_start_section, library_list_start_library,
9393         library_list_end_library, solib_target_free_library_list,
9394         solib_target_current_sos, solib_target_free_so,
9395         solib_target_relocate_section_addresses): Adjust.
9396         * windows-nat.c (struct lm_info): Rename to ...
9397         (struct lm_info_windows): ... this.  Extend lm_info_base.
9398         (windows_make_so, handle_load_dll, handle_unload_dll,
9399         windows_xfer_shared_libraries): Adjust.
9400
9401 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9402
9403         * solib-darwin.c (struct darwin_so_list): Remove.
9404         (darwin_current_sos): Allocate an so_list object instead of a
9405         darwin_so_list, separately allocate an lm_info object.
9406         (darwin_free_so): Free lm_info.
9407
9408 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9409
9410         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9411         with fprintf_filtered.
9412
9413 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9414
9415         * regcache.c (regcache::regcache): New function.
9416         (regcache::~regcache): New function.
9417         (regcache_xmalloc_1): Remove.
9418         (regcache_xmalloc): Call new regcache.
9419         (regcache_xfree): Call delete regcache.
9420         (get_thread_arch_aspace_regcache): Call new regcache.
9421
9422 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9423
9424         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9425         lwp instead of ptid_get_lwp.
9426
9427 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9428
9429         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9430         lwp_info instead of getting from inferior_ptid.
9431
9432 2017-04-27  Keith Seitz  <keiths@redhat.com>
9433
9434         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9435         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9436         (CV_CONVERSION_BADNESS): Define.
9437         (rank_one_type): Remove overly restrictive rvalue reference
9438         rank checks.
9439         Add cv-qualifier checks and subranks for type equality.
9440         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9441         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9442         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9443
9444 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9445
9446         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9447         count when creating the object.
9448
9449 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9450             Ulrich Weigand  <uweigand@de.ibm.com>
9451
9452         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9453         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9454         is used in AIX.
9455         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9456         (process_xcoff_symbol): Likewise.
9457         (scan_xcoff_symtab): Likewise.
9458
9459 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9460
9461         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9462         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9463         (ia64_access_reg): Use get_frame_register_unsigned.
9464         (ia64_access_rse_reg): Likewise.
9465         (ia64_libunwind_frame_prev_register): Likewise.
9466
9467 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9468
9469         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9470         * gdbarch.c: Regenerated.
9471         * gdbarch.h: Regenerated.
9472         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9473         visibility external.
9474         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9475         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9476         (enum cfa_how_kind): Move to ...
9477         (struct dwarf2_frame_state_reg_info): Likewise.
9478         (struct dwarf2_frame_state): Likewise.
9479         * dwarf2-frame.h: ... here.
9480         (dwarf2_frame_state_alloc_regs): New declaration.
9481         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9482         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9483
9484 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9485
9486         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9487         regcache_raw_read_unsigned.
9488         (xtensa_pseudo_register_write): Likewise.
9489
9490 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9491
9492         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9493         (nds32_pseudo_register_write): Likewise.
9494
9495 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9496
9497         * regcache.c (struct regcache) <readonly_p>: Change its type
9498         to bool.
9499         (regcache_xmalloc_1): Update parameter type and callers update.
9500
9501 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9502
9503         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9504         set_gdbarch_wchar_bit.
9505         * arm-tdep.c (arm_gdbarch_init): Likewise.
9506
9507 2017-04-25  Pedro Alves  <palves@redhat.com>
9508
9509         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9510         (BothAreRelocatable, memcopy, memmove): Don't define.
9511         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9512         macros.
9513
9514 2017-04-25  Pedro Alves  <palves@redhat.com>
9515
9516         * common/common-defs.h: Include "common/poison.h".
9517         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9518         and adjust.
9519         * common/poison.h: New file.
9520         * common/traits.h: Include <type_traits>.
9521         (Not, Or, Requires): New, moved from common/function-view.h.
9522
9523 2017-04-25  Pedro Alves  <palves@redhat.com>
9524
9525         * breakpoint.h (struct breakpoint): In-class initialize all
9526         fields.  Make boolean fields "bool".
9527         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9528         memset call and initializations no longer necessary.
9529
9530 2017-04-25  Pedro Alves  <palves@redhat.com>
9531
9532         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9533         reference.
9534         (pt_btrace_insn): New function.
9535         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9536
9537 2017-04-25  Pedro Alves  <palves@redhat.com>
9538
9539         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9540         "base" field and inherit from "bp_location" instead.  Add
9541         non-default ctor.
9542         (allocate_location_exception): Use new non-default ctor.
9543         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9544         (init_bp_location): Convert to ...
9545         (bp_location::bp_location): ... this new ctor, and remove memset
9546         call.
9547         (base_breakpoint_allocate_location): Use the new non-default ctor.
9548         * breakpoint.h (bp_location): Now a class.  Declare default and
9549         non-default ctors.  In-class initialize all members.
9550         (init_bp_location): Remove declaration.
9551
9552 2017-04-25  Pedro Alves  <palves@redhat.com>
9553
9554         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9555         assignment operator.
9556
9557 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9558
9559         * doublest.c (convert_doublest_to_floatformat): Call
9560         floatformat_totalsize_bytes.
9561
9562 2017-04-22  Tom Tromey  <tom@tromey.com>
9563
9564         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9565         ui_out_emit_list.
9566         * stack.c (print_frame): Use ui_out_emit_list.
9567         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9568         ui_out_emit_list.
9569         * mi/mi-main.c (print_one_inferior)
9570         (mi_cmd_data_list_register_names)
9571         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9572         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9573         ui_out_emit_list.
9574         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9575         (mi_output_solib_attribs): Use ui_out_emit_list,
9576         ui_out_emit_tuple.
9577         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9578         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9579         (mi_cmd_stack_list_args, list_args_or_locals): Use
9580         ui_out_emit_list.
9581         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9582         * breakpoint.c (print_solib_event, output_thread_groups): Use
9583         ui_out_emit_list.
9584
9585 2017-04-22  Tom Tromey  <tom@tromey.com>
9586
9587         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9588         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9589         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9590
9591 2017-04-22  Tom Tromey  <tom@tromey.com>
9592
9593         * tracepoint.c (tvariables_info_1)
9594         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9595
9596 2017-04-22  Tom Tromey  <tom@tromey.com>
9597
9598         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9599         annotate_arg_emitter.
9600         * breakpoint.c (print_mention_watchpoint)
9601         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9602         * annotate.h (struct annotate_arg_emitter): New.
9603
9604 2017-04-22  Tom Tromey  <tom@tromey.com>
9605
9606         * record-btrace.c (record_btrace_insn_history)
9607         (record_btrace_insn_history_range, record_btrace_call_history)
9608         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9609         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9610         ui_out_emit_tuple.
9611         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9612         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9613         * skip.c (skip_info): Use ui_out_emit_tuple.
9614         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9615         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9616         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9617         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9618         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9619         ui_out_emit_tuple.
9620         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9621         (output_register, mi_cmd_data_read_memory)
9622         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9623         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9624         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9625         Use ui_out_emit_tuple.
9626         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9627         ui_out_emit_tuple.
9628         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9629         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9630         * linux-thread-db.c (info_auto_load_libthread_db): Use
9631         ui_out_emit_tuple.
9632         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9633         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9634         * disasm.c (do_mixed_source_and_assembly_deprecated)
9635         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9636         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9637         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9638         * breakpoint.c (print_one_breakpoint_location)
9639         (print_one_breakpoint): Use ui_out_emit_tuple.
9640         * auto-load.c (print_script, info_auto_load_cmd): Use
9641         ui_out_emit_tuple.
9642         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9643
9644 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9645
9646         * thread.c (print_thread_info_1): Remove dead code.
9647
9648 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9649
9650         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9651         GDB_SELF_TEST.
9652         * arm-tdep.c (selftests::arm_record_test): Likewise.
9653
9654 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9655
9656         * regcache.c (regcache_restore): Remove argument 2.  Replace
9657         argument 3 with regcache.  Get register status from
9658         src->register_status and get register contents from
9659         register_buffer (src, regnum).
9660         (regcache_cpy): Update.
9661
9662 2017-04-19  Pedro Alves  <palves@redhat.com>
9663
9664         * gdbthread.h (thread): Add missing closing parenthesis in
9665         comment.
9666
9667 2017-04-19  Pedro Alves  <palves@redhat.com>
9668
9669         * common/refcounted-object.h: New file.
9670         * gdbthread.h: Include "common/refcounted-object.h".
9671         (thread_info): Inherit from refcounted_object and add comments.
9672         (thread_info::incref, thread_info::decref)
9673         (thread_info::m_refcount): Delete.
9674         (thread_info::deletable): Use the refcounted_object::refcount()
9675         method.
9676         * inferior.c (current_inferior_): Add comment.
9677         (set_current_inferior): Increment/decrement refcounts.
9678         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9679         not-deletable instead of comparing with the current inferior.
9680         (initialize_inferiors): Increment the initial inferior's refcount.
9681         * inferior.h (struct inferior): Forward declare.
9682         Include "common/refcounted-object.h".
9683         (current_inferior, set_current_inferior): Move declaration to
9684         before struct inferior's definition, and fix comment.
9685         (inferior): Inherit from refcounted_object.  Add comments.
9686         * thread.c (switch_to_thread_no_regs): Reference the thread's
9687         inferior pointer directly instead of doing a ptid lookup.
9688         (switch_to_no_thread): New function.
9689         (switch_to_thread(thread_info *)): New function, factored out
9690         from ...
9691         (switch_to_thread(ptid_t)): ... this.
9692         (restore_current_thread): Delete.
9693         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9694         fields, and add 'inf' field.
9695         (do_restore_current_thread_cleanup): Check whether old->inf is
9696         alive instead of looking up an inferior by ptid.  Use
9697         switch_to_thread and switch_to_no_thread.
9698         (restore_current_thread_cleanup_dtor): Use old->inf directly
9699         instead of lookup up an inferior by id.  Decref the inferior.
9700         Don't restore 'removable'.
9701         (make_cleanup_restore_current_thread): Same the inferior pointer
9702         in old, instead of the inferior number.  Incref the inferior.
9703         Don't save/clear 'removable'.
9704
9705 2017-04-19  Pedro Alves  <palves@redhat.com>
9706
9707         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9708         unittests/scoped_restore-selftests.c.
9709         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9710         * common/scoped_restore.h (scoped_restore_base): Make "class".
9711         (scoped_restore_base::release): New public method.
9712         (scoped_restore_base::scoped_restore_base): New protected ctor.
9713         (scoped_restore_base::m_saved_var): New protected field.
9714         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9715         scoped_restore_base base class instead of m_saved_var directly.
9716         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9717         (scoped_restore_tmpl::scoped_restore_tmpl(const
9718         scoped_restore_tmpl<T>&)): Likewise.
9719         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9720         method.
9721         (scoped_restore_tmpl::saved_var): New method.
9722         (scoped_restore_tmpl::m_saved_var): Delete.
9723         * inferior.h (inferior::detaching): Now a bool.
9724         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9725         cleanup.
9726         * unittests/scoped_restore-selftests.c: New file.
9727
9728 2017-04-19  Pedro Alves  <palves@redhat.com>
9729
9730         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9731         Re-sort in alphabetic order.
9732
9733 2017-04-18  Pedro Alves  <palves@redhat.com>
9734
9735         * xml-support.c (obstack_xml_printf): Delete.
9736         * xml-support.h (obstack_xml_printf): Delete.
9737
9738 2017-04-18  Pedro Alves  <palves@redhat.com>
9739
9740         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9741         vdebug, verror, body_text, start_element, end_element, name,
9742         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9743         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9744         is_xinclude>: Make private and add m_ prefix.
9745         (gdb_xml_parser::body_text): New method, based on ...
9746         (gdb_xml_body_text): ... this.  Adjust.
9747         (gdb_xml_parser::vdebug): New method, based on ...
9748         (gdb_xml_debug): ... this.  Adjust.
9749         (gdb_xml_parser::verror): New method, based on ...
9750         (gdb_xml_error): ... this.  Adjust.
9751         (gdb_xml_parser::start_element): New method, based on ...
9752         (gdb_xml_start_element): ... this.  Adjust.
9753         (gdb_xml_start_element_wrapper): Defer to
9754         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9755         (gdb_xml_parser::end_element): New method, based on ...
9756         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9757         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9758         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9759         (gdb_xml_parser::use_dtd): New method, based on ...
9760         (gdb_xml_use_dtd): ... this.  Adjust.
9761         (gdb_xml_parser::parse): New method, based on ...
9762         (gdb_xml_parse): ... this.  Adjust.
9763         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9764         (xinclude_start_include): Adjust to call the parser's name method.
9765         (xml_xinclude_default, xml_xinclude_start_doctype)
9766         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9767         method.
9768         (xml_process_xincludes): Adjust to call parser methods.
9769         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9770         declarations.
9771
9772 2017-04-18  Pedro Alves  <palves@redhat.com>
9773
9774         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9775         gdb::optional<std::string>.
9776         * xml-support.c: Include <string>.
9777         (scope_level::scope_level(scope_level &&))
9778         (scope_level::~scope_level): Delete.
9779         (scope_level::body): Now a std::string.
9780         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9781         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9782         parameter.
9783         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9784         (xinclude_parsing_data::output): Now a std::string reference.
9785         (xinclude_start_include): Adjust.
9786         (xml_xinclude_default): Adjust.
9787         (xml_process_xincludes): Add 'output' parameter, and return bool.
9788         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9789         and return bool.
9790         * xml-tdesc.c: Include <unordered_map> and <string>.
9791         (tdesc_xml_cache): Delete.
9792         (tdesc_xml_cache_s): Delete.
9793         (xml_cache): Now an std::unordered_map.
9794         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9795         (target_fetch_description_xml): Change return type to
9796         gdb::optional<std::string>, and adjust.
9797         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9798         (target_fetch_description_xml): Change return type to
9799         gdb::optional<std::string>.
9800
9801 2017-04-18  Pedro Alves  <palves@redhat.com>
9802
9803         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9804         unittests/optional-selftests.c.
9805         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9806         * unittests/optional-selftests.c: New file.
9807         * unittests/optional/assignment/1.cc: New file.
9808         * unittests/optional/assignment/2.cc: New file.
9809         * unittests/optional/assignment/3.cc: New file.
9810         * unittests/optional/assignment/4.cc: New file.
9811         * unittests/optional/assignment/5.cc: New file.
9812         * unittests/optional/assignment/6.cc: New file.
9813         * unittests/optional/assignment/7.cc: New file.
9814         * unittests/optional/cons/copy.cc: New file.
9815         * unittests/optional/cons/default.cc: New file.
9816         * unittests/optional/cons/move.cc: New file.
9817         * unittests/optional/cons/value.cc: New file.
9818         * unittests/optional/in_place.cc: New file.
9819         * unittests/optional/observers/1.cc: New file.
9820         * unittests/optional/observers/2.cc: New file.
9821
9822 2017-04-18  Pedro Alves  <palves@redhat.com>
9823
9824         * common/gdb_optional.h: Include common/traits.h.
9825         (in_place_t): New type.
9826         (in_place): New constexpr variable.
9827         (optional::optional): Remove member initialization of
9828         m_instantiated.
9829         (optional::optional(in_place_t...)): New constructor.
9830         (optional::~optional): Use reset.
9831         (optional::optional(const optional&)): New.
9832         (optional::optional(const optional&&)): New.
9833         (optional::optional(T &)): New.
9834         (optional::optional(T &&)): New.
9835         (operator::operator=(const optional &)): New.
9836         (operator::operator=(optional &&)): New.
9837         (operator::operator= (const T &))
9838         (operator::operator= (T &&))
9839         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9840         (operator::reset): New.
9841         (operator::m_instantiated):: Add in-class initializer.
9842         * common/traits.h: Include <type_traits>.
9843         (struct And): New types.
9844
9845 2017-04-18  Pedro Alves  <palves@redhat.com>
9846
9847         * xml-support.c: Include <vector>.
9848         (scope_level::scope_level(const gdb_xml_element *))
9849         (scope_level::scope_level(scope_level&&)): New.
9850         (scope_level::~scope_level): New.
9851         (scope_level_s): Delete.
9852         (gdb_xml_parser::scopes): Now a std::vector.
9853         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9854         Use std::vector.
9855         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9856         scope cleanup code.
9857         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9858         of the scopes member.  Use std::vector::emplace_back.
9859
9860 2017-04-18  Pedro Alves  <palves@redhat.com>
9861
9862         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9863         a bool.
9864         (gdb_xml_end_element): Change type of first parameter.
9865         (gdb_xml_cleanup): Rename to ...
9866         (gdb_xml_parser::~gdb_xml_parser): ... this.
9867         (gdb_xml_create_parser_and_cleanup): Delete with ...
9868         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9869         to this new ctor.
9870         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9871         using gdb_xml_create_parser_and_cleanup.
9872         (xinclude_parsing_data): Add ctor/dtor.
9873         (xml_xinclude_cleanup): Delete.
9874         (xml_process_xincludes): Create a local xinclude_parsing_data
9875         instead of heap-allocating one.  Create a local gdb_xml_parser
9876         instead of heap-allocating one with
9877         gdb_xml_create_parser_and_cleanup.
9878
9879 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9880
9881         PR threads/20743
9882         * fbsd-nat.c (resume_one_thread_cb): Remove.
9883         (resume_all_threads_cb): Remove.
9884         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9885         iterate_over_threads.
9886
9887 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9888
9889         * NEWS: Create a new section for the next release branch.
9890         Rename the section of the current branch, now that it has
9891         been cut.
9892
9893 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9894
9895         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9896         * version.in: Bump version to 8.0.50.DATE-git.
9897
9898 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9899
9900         PR gdb/21385
9901         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9902         independently of the host, and fix build breakage on Cygwin.
9903
9904 2017-04-13  Pedro Alves  <palves@redhat.com>
9905
9906         * inferior.c (free_inferior): Convert to ...
9907         (inferior::~inferior): ... this dtor.
9908         (inferior::inferior): New ctor, factored out from ...
9909         (add_inferior_silent): ... here.  Allocate the inferior with a new
9910         expression.
9911         (delete_inferior): Call delete instead of free_inferior.
9912         * inferior.h (gdb_environ, continuation): Forward declare.
9913         (inferior): Now a class.  Add in-class initialization to all
9914         members.  Make boolean fields bool, except 'detaching'.
9915         (inferior::inferior): New explicit ctor.
9916         (inferior::~inferior): New.
9917
9918 2017-04-13  Pedro Alves  <palves@redhat.com>
9919
9920         * inferior.c (init_inferior_list): Delete.
9921         * inferior.h (init_inferior_list): Delete.
9922
9923 2017-04-13  Pedro Alves  <palves@redhat.com>
9924
9925         PR threads/13217
9926         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9927         (top level): Call it twice, with different thread sets.
9928
9929 2017-04-13  Pedro Alves  <palves@redhat.com>
9930
9931         * thread.c: Include <algorithm>.
9932         (thread_array_cleanup): Delete.
9933         (scoped_inc_dec_ref): New class.
9934         (live_threads_count): New function.
9935         (set_thread_refcount): Delete.
9936         (tp_array_compar_ascending): Now a bool.
9937         (tp_array_compar): Convert to a std::sort comparison function.
9938         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9939         and live_threads_count.
9940
9941 2017-04-13  Pedro Alves  <palves@redhat.com>
9942
9943         * infrun.c (follow_fork_inferior): Also switch the current
9944         inferior.
9945
9946 2017-04-13  Pedro Alves  <palves@redhat.com>
9947
9948         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9949         before calling create_internal_breakpoint.
9950
9951 2017-04-13  Pedro Alves  <palves@redhat.com>
9952
9953         * fork-child.c (execv_argv): New class.
9954         (breakup_args): Refactored as ...
9955         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9956         Copy arguments to storage and replace separators with NULL
9957         terminators in place.
9958         (escape_bang_in_quoted_argument): Adjust to return bool.
9959         (execv_argv::execv_argv): New ctor.
9960         (execv_argv::init_for_shell): New method, factored out from
9961         fork_inferior.  Don't strdup strings into the vector.
9962         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9963         Remove free_vector_argv call.
9964
9965 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9966
9967         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9968         tdep->rx_psw_type.
9969
9970 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9971
9972         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9973         * rx-tdep.c (rx_gdbarch_init): Likewise.
9974
9975 2017-04-13  Pedro Alves  <palves@redhat.com>
9976
9977         * breakpoint.h (struct breakpoint): Reindent.
9978
9979 2017-04-13  Pedro Alves  <palves@redhat.com>
9980
9981         * breakpoint.c (bp_location): Rename to ...
9982         (bp_locations): ... this.  All references updated.
9983         (bp_location_count): Rename to ...
9984         (bp_locations_count): ... this.  All references updated.
9985         (bp_location_placed_address_before_address_max): Rename to ...
9986         (bp_locations_placed_address_before_address_max): ... this.  All
9987         references updated.
9988         (bp_location_shadow_len_after_address_max): Rename to ...
9989         (bp_locations_shadow_len_after_address_max): ... this.  All
9990         references updated.
9991         (bp_location_compare_addrs): Rename to ...
9992         (bp_locations_compare_addrs): ... this.  All references updated.
9993         (bp_location_compare):Rename to ...
9994         (bp_locations_compare): ... this.  All references updated.
9995         (bp_location_target_extensions_update): Rename to ...
9996         (bp_locations_target_extensions_update): ... this.  All references
9997         updated.
9998
9999 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10000
10001         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10002         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10003         'sgtty.h'.
10004         * common/gdb_termios.h: New file, with parts of "terminal.h".
10005         * inflow.c: Include "gdb_termios.h".
10006         * ser-unix.c: Include "gdb_termios.h".
10007         * terminal.h: Move terminal-related defines to
10008         "common/gdb_termios.h".
10009
10010 2017-04-12  Tom Tromey  <tom@tromey.com>
10011
10012         * probe.c (parse_probes): Update.
10013         * location.h (delete_event_location): Don't declare.
10014         (event_location_deleter::operator()): Update.
10015         * location.c (event_location_deleter::operator()): Rename from
10016         delete_event_location.
10017         * linespec.h (linespec_result) <location>: Change type to
10018         event_location_up.
10019         * linespec.c (canonicalize_linespec, event_location_to_sals)
10020         (decode_objc): Update.
10021         (linespec_result): Don't call delete_event_location.
10022         * breakpoint.c (create_breakpoints_sal)
10023         (bkpt_probe_create_sals_from_location)
10024         (strace_marker_create_sals_from_location): Update.
10025
10026 2017-04-12  Tom Tromey  <tom@tromey.com>
10027
10028         * linespec.h (struct linespec_result): Add constructor and
10029         destructor.
10030         (init_linespec_result, destroy_linespec_result)
10031         (make_cleanup_destroy_linespec_result): Don't declare.
10032         * linespec.c (init_linespec_result): Remove.
10033         (linespec_result::~linespec_result): Rename from
10034         destroy_linespec_result.  Update.
10035         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10036         Remove.
10037         * breakpoint.c (create_breakpoint, break_range_command)
10038         (decode_location_default): Update.
10039         * ax-gdb.c (agent_command_1): Update.
10040
10041 2017-04-12  Tom Tromey  <tom@tromey.com>
10042
10043         * remote.c (remote_download_tracepoint): Update.
10044         * python/py-breakpoint.c (bppy_get_location): Update.
10045         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10046         (gdbscm_breakpoint_location): Update.
10047         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10048         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10049         Change type to event_location_up.
10050         * breakpoint.c (create_overlay_event_breakpoint)
10051         (create_longjmp_master_breakpoint)
10052         (create_std_terminate_master_breakpoint)
10053         (create_exception_master_breakpoint)
10054         (breakpoint_event_location_empty_p, print_breakpoint_location)
10055         (print_one_breakpoint_location, create_thread_event_breakpoint)
10056         (init_breakpoint_sal, create_breakpoint)
10057         (print_recreate_ranged_breakpoint, break_range_command)
10058         (init_ada_exception_breakpoint, say_where): Update.
10059         (base_breakpoint_dtor): Don't call delete_event_location.
10060         (bkpt_print_recreate, tracepoint_print_recreate)
10061         (dprintf_print_recreate, update_static_tracepoint)
10062         (breakpoint_re_set_default): Update.
10063
10064 2017-04-12  Tom Tromey  <tom@tromey.com>
10065
10066         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10067         type of "to_do".  Update.
10068         (compute_stack_depth): Use std::vector.
10069
10070 2017-04-12  Tom Tromey  <tom@tromey.com>
10071
10072         * printcmd.c (find_instruction_backward): Use std::vector.
10073
10074 2017-04-12  Tom Tromey  <tom@tromey.com>
10075
10076         * symfile.c (objfilep): Remove typedef.
10077         (reread_symbols): Use a std::vector.
10078
10079 2017-04-12  Tom Tromey  <tom@tromey.com>
10080
10081         * mi/mi-main.c (exec_direction_forward): Remove.
10082         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10083         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10084         scoped_restore.
10085         * guile/guile.c (guile_repl_command, guile_command)
10086         (gdbscm_execute_gdb_command): Use scoped_restore.
10087         * go-exp.y (go_parse): Use scoped_restore.
10088         * d-exp.y (d_parse): Use scoped_restore.
10089         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10090         * c-exp.y (c_parse): Use scoped_restore.
10091
10092 2017-04-12  Tom Tromey  <tom@tromey.com>
10093
10094         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10095         (mi_parse): Update return type.
10096         (mi_parse_free): Remove.
10097         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10098         (mi_parse::~mi_parse): Rename from mi_parse_free.
10099         (mi_parse_cleanup): Remove.
10100         (mi_parse): Return a unique_ptr.  Use new.
10101         * mi/mi-main.c (mi_execute_command): Update.
10102
10103 2017-04-12  Tom Tromey  <tom@tromey.com>
10104
10105         * location.c (explicit_location_lex_one): Return a
10106         unique_xmalloc_ptr.
10107         (string_to_explicit_location): Update.  Remove cleanups.
10108
10109 2017-04-12  Tom Tromey  <tom@tromey.com>
10110
10111         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10112         (compare_value_and_voffset): Change type.  Update.
10113         (compute_vtable_size): Change type of "offset_vec".
10114         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10115         (gnuv3_get_typeid): Remove extraneous declaration.
10116
10117 2017-04-12  Tom Tromey  <tom@tromey.com>
10118
10119         * charset.h (wchar_iterator): Fix comment.
10120
10121 2017-04-12  Tom Tromey  <tom@tromey.com>
10122
10123         * charset.c (iconv_wrapper): New class.
10124         (cleanup_iconv): Remove.
10125         (convert_between_encodings): Use it.
10126
10127 2017-04-12  Tom Tromey  <tom@tromey.com>
10128
10129         * symfile.h (increment_reading_symtab): Update type.
10130         * symfile.c (decrement_reading_symtab): Remove.
10131         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10132         * psymtab.c (psymtab_to_symtab): Update.
10133         * dwarf2read.c (dw2_instantiate_symtab): Update.
10134
10135 2017-04-12  Tom Tromey  <tom@tromey.com>
10136
10137         * jit.c (struct jit_reader): Declare separately.  Add constructor
10138         and destructor.  Change type of "handle".
10139         (loaded_jit_reader): Define separately.
10140         (jit_reader_load): Update.  New "new".
10141         (jit_reader_unload_command): Use "delete".
10142         * gdb-dlfcn.h (struct dlclose_deleter): New.
10143         (gdb_dlhandle_up): New typedef.
10144         (gdb_dlopen, gdb_dlsym): Update types.
10145         (gdb_dlclose): Remove.
10146         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10147         (gdb_dlsym): Change type of "handle".
10148         (make_cleanup_dlclose): Remove.
10149         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10150         * compile/compile-c-support.c (load_libcc): Update.
10151
10152 2017-04-12  Tom Tromey  <tom@tromey.com>
10153
10154         * symtab.h (find_pcs_for_symtab_line): Change return type.
10155         * symtab.c (find_pcs_for_symtab_line): Change return type.
10156         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10157         type of "vec".  Update.
10158         (ltpy_get_pcs_for_line): Update.
10159         * linespec.c (decode_digits_ordinary): Update.
10160
10161 2017-04-12  Tom Tromey  <tom@tromey.com>
10162
10163         * tracepoint.c (actions_command): Update.
10164         * python/python.c (python_command, python_interactive_command):
10165         Update.
10166         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10167         * guile/guile.c (guile_command): Update.
10168         * defs.h (read_command_lines, read_command_lines_1): Return
10169         command_line_up.
10170         (command_lines_deleter): New struct.
10171         (command_line_up): New typedef.
10172         * compile/compile.c (compile_code_command)
10173         (compile_print_command): Update.
10174         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10175         command_line_up.
10176         (make_cleanup_free_command_lines): Remove.
10177         * cli/cli-script.c (get_command_line, read_command_lines_1)
10178         (copy_command_lines): Return command_line_up.
10179         (while_command, if_command, read_command_lines, define_command)
10180         (document_command): Update.
10181         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10182         Remove.
10183         * breakpoint.h (breakpoint_set_commands): Change type of
10184         "commands".
10185         * breakpoint.c (breakpoint_set_commands): Change type of
10186         "commands".  Update.
10187         (do_map_commands_command, update_dprintf_command_list)
10188         (create_tracepoint_from_upload): Update.
10189
10190 2017-04-12  Tom Tromey  <tom@tromey.com>
10191
10192         * tracepoint.c (scope_info): Update.
10193         * spu-tdep.c (spu_catch_start): Update.
10194         * python/python.c (gdbpy_decode_line): Update.
10195         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10196         * python/py-breakpoint.c (bppy_init): Update.
10197         * probe.c (parse_probes): Update.
10198         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10199         * location.h (event_location_deleter): New struct.
10200         (event_location_up): New typedef.
10201         (new_linespec_location, new_address_location, new_probe_location)
10202         (new_explicit_location, copy_event_location)
10203         (string_to_event_location, string_to_event_location_basic)
10204         (string_to_explicit_location): Update return type.
10205         (make_cleanup_delete_event_location): Remove.
10206         * location.c (new_linespec_location, new_address_location)
10207         (new_probe_location, new_explicit_location, copy_event_location):
10208         Return event_location_up.
10209         (delete_event_location_cleanup)
10210         (make_cleanup_delete_event_location): Remove.
10211         (string_to_explicit_location, string_to_event_location_basic)
10212         (string_to_event_location): Return event_location_up.
10213         * linespec.c (canonicalize_linespec, event_location_to_sals)
10214         (decode_line_with_current_source)
10215         (decode_line_with_last_displayed, decode_objc): Update.
10216         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10217         * completer.c (location_completer): Update.
10218         * cli/cli-cmds.c (edit_command, list_command): Update.
10219         * breakpoint.c (create_overlay_event_breakpoint)
10220         (create_longjmp_master_breakpoint)
10221         (create_std_terminate_master_breakpoint)
10222         (create_exception_master_breakpoint)
10223         (create_thread_event_breakpoint): Update.
10224         (init_breakpoint_sal): Update.  Remove some dead code.
10225         (create_breakpoint_sal): Change type of "location".  Update.
10226         (create_breakpoints_sal, create_breakpoint, break_command_1)
10227         (dprintf_command, break_range_command, until_break_command)
10228         (init_ada_exception_breakpoint)
10229         (strace_marker_create_sals_from_location)
10230         (update_static_tracepoint, trace_command, ftrace_command)
10231         (strace_command, create_tracepoint_from_upload): Update.
10232         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10233         * ax-gdb.c (agent_command_1): Update.
10234
10235 2017-04-12  Pedro Alves  <palves@redhat.com>
10236
10237         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10238         * configure.tgt: Handle i[34567]86-*-go32* and
10239         i[34567]86-*-msdosdjgpp*.
10240         * i386-tdep.c (i386_svr4_reg_to_regnum):
10241         Make extern.
10242         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10243         i386-go32-tdep.c.
10244         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10245         * i386-go32-tdep.c: New file.
10246         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10247         declarations.
10248
10249 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10250
10251         * aix-thread.c (pd_status2str): Change return type to const char *.
10252
10253 2017-04-12  Pedro Alves  <palves@redhat.com>
10254
10255         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10256         calls to set_gdbarch_gnu_triplet_regexp.
10257
10258 2017-04-12  Pedro Alves  <palves@redhat.com>
10259
10260         PR gdb/21323
10261         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10262         New enum value.
10263         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10264         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10265         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10266         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10267         * gdbarch.h, gdbarch.c: Regenerate.
10268         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10269         gdbarch_wchar_bit and gdbarch_wchar_signed.
10270         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10271         * arm-tdep.c (arm_gdbarch_init): Likewise.
10272         * avr-tdep.c (avr_gdbarch_init): Likewise.
10273         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10274         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10275         * i386-tdep.c (i386_go32_init_abi): Likewise.
10276         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10277         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10278         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10279         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10280         * sh-tdep.c (sh_gdbarch_init): Likewise.
10281         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10282         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10283         * windows-tdep.c (windows_init_abi): Likewise.
10284         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10285
10286 2017-04-12  Pedro Alves  <palves@redhat.com>
10287
10288         PR c++/21323
10289         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10290         cplus_primitive_type_char32_t>: New enum values.
10291         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10292         and cplus_primitive_type_char32_t.
10293         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10294         32, use the archtecture's built-in type for char16_t and char32_t,
10295         respectively.  Otherwise, fallback to init_integer_type as before,
10296         but make the type unsigned, and issue a complaint.
10297         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10298
10299 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10300
10301         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10302         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10303
10304 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10305
10306         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10307         'const char *'.
10308
10309 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10310
10311         * common/common-utils.c (free_vector_argv): New function.
10312         * common/common-utils.h: Include <vector>.
10313         (free_vector_argv): New prototype.
10314         * darwin-nat.c (darwin_create_inferior): Rewrite function
10315         prototype in order to constify "exec_file" and accept a
10316         "std::string" for "allargs".
10317         * fork-child.c: Include <vector>.
10318         (breakup_args): Rewrite function, using C++.
10319         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10320         and accept "std::string" for "allargs".  Update the code to
10321         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10322         and "execvp".
10323         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10324         order to constify "exec_file" and accept a "std::string" for
10325         "allargs".
10326         * go32-nat.c (go32_create_inferior): Likewise.
10327         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10328         * infcmd.c (run_command_1): Constify "exec_file".  Use
10329         "std::string" for inferior arguments.
10330         * inferior.h (fork_inferior): Update prototype.
10331         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10332         prototype in order to constify "exec_file" and accept a
10333         "std::string" for "allargs".
10334         * nto-procfs.c (procfs_create_inferior): Likewise.
10335         * procfs.c (procfs_create_inferior): Likewise.
10336         * remote-sim.c (gdbsim_create_inferior): Likewise.
10337         * remote.c (extended_remote_run): Update code to accept
10338         "std::string" as argument.
10339         (extended_remote_create_inferior): Rewrite function prototype in
10340         order to constify "exec_file" and accept a "std::string" for
10341         "allargs".
10342         * rs6000-nat.c (super_create_inferior): Likewise.
10343         (rs6000_create_inferior): Likewise.
10344         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10345         * windows-nat.c (windows_create_inferior): Likewise.
10346
10347 2017-04-11  Pedro Alves  <palves@redhat.com>
10348
10349         * thread.c: Fix whitespace throughout.
10350
10351 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10352
10353         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10354
10355 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10356
10357         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10358
10359 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10360
10361         PR gdb/21364
10362         * osdata.c (info_osdata): Check if 'type' is an empty string
10363         instead of NULL.
10364
10365 2017-04-10  Pedro Alves  <palves@redhat.com>
10366
10367         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10368         (ptid_to_global_thread_id, in_thread_list)
10369         (do_captured_list_thread_ids, set_resumed, set_running)
10370         (set_executing, set_stop_requested, finish_thread_state)
10371         (validate_registers_access, can_access_registers_ptid)
10372         (print_thread_info_1, switch_to_thread)
10373         (do_restore_current_thread_cleanup)
10374         (make_cleanup_restore_current_thread, thread_command)
10375         (thread_name_command): Use operator== instead of ptid_equal.
10376
10377 2017-04-10  Pedro Alves  <palves@redhat.com>
10378
10379         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10380         (current_thread_cleanup_chain): Delete.
10381         (restore_current_thread_cleanup_dtor)
10382         (make_cleanup_restore_current_thread): Remove references to
10383         current_thread_cleanup_chain.
10384
10385 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10386
10387         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10388         REG_UNKNOWN.
10389
10390 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10391
10392         PR gdb/19942
10393         * gdbthread.h (thread_info::deletable): New method.
10394         (thread_info::incref): New method.
10395         (thread_info::decref): New method.
10396         (thread_info::refcount): Move it to private.
10397         * infrun.c (save_stop_context): Call inc_refcount.
10398         (release_stop_context_cleanup): Likewise.
10399         * thread.c (set_thread_exited): New function.
10400         (init_thread_list): Delete "tp" only it is deletable, otherwise
10401         call set_thread_exited.
10402         (delete_thread_1): Call set_thread_exited.
10403         (current_thread_cleanup) <inferior_pid>: Remove.
10404         <thread>: New field.
10405         (restore_current_thread_ptid_changed): Removed.
10406         (do_restore_current_thread_cleanup): Adjust.
10407         (restore_current_thread_cleanup_dtor): Don't call
10408         find_thread_ptid.
10409         (set_thread_refcount): Use dec_refcount.
10410         (make_cleanup_restore_current_thread): Adjust.
10411         (thread_apply_all_command): Call inc_refcount.
10412         (_initialize_thread): Don't call
10413         observer_attach_thread_ptid_changed.
10414
10415 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10416
10417         * thread.c (delete_thread_1): Hoist code on marking thread as
10418         exited.
10419
10420 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10421
10422         * windows-nat.c (windows_detach): Initialize ptid with
10423         minus_one_ptid.
10424
10425 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10426
10427         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10428
10429 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10430
10431         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10432         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10433         (bfin_pseudo_register_write): Likewise
10434
10435 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10436
10437         * common/ptid.h (struct ptid): Change to...
10438         (class ptid_t): ... this.
10439         <ptid_t>: New constructors.
10440         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10441         matches>: New methods.
10442         <make_null, make_minus_one>: New static methods.
10443         <pid>: Rename to...
10444         <m_pid>: ...this.
10445         <lwp>: Rename to...
10446         <m_lwp>: ...this.
10447         <tid>: Rename to...
10448         <m_tid>: ...this.
10449         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10450         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10451         as references, move comment to class ptid_t.
10452         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10453         ptid_t static methods.
10454         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10455         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10456         Take ptid arguments as references, implement using ptid_t methods.
10457         * unittests/ptid-selftests.c: New file.
10458         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10459         unittests/ptid-selftests.c.
10460         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10461
10462 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10463
10464         * python/python.c (python_run_simple_file): Cast mode literal to
10465         non-const char pointer as expected by PyFile_FromString.
10466
10467 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10468
10469         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10470         minus_one_ptid and null_ptid.
10471
10472 2017-04-05  Pedro Alves  <palves@redhat.com>
10473
10474         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10475         * configure: Regenerate.
10476
10477 2017-04-05  Pedro Alves  <palves@redhat.com>
10478
10479         * ada-exp.y (yyerror): Constify.
10480         * ada-lang.c (bound_name, get_selections)
10481         (ada_variant_discrim_type)
10482         (ada_variant_discrim_name, ada_value_struct_elt)
10483         (ada_lookup_struct_elt_type, is_unchecked_variant)
10484         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10485         (catch_ada_exception_command_split)
10486         (catch_ada_assert_command_split, catch_assert_command)
10487         (ada_op_name): Constify.
10488         * ada-lang.h (ada_yyerror, get_selections)
10489         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10490         * arc-tdep.c (arc_print_frame_cache): Constify.
10491         * arm-tdep.c (arm_skip_stub): Constify.
10492         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10493         (gen_aggregate_elt_ref): Constify.
10494         * bcache.c (print_bcache_statistics): Constify.
10495         * bcache.h (print_bcache_statistics): Constify.
10496         * break-catch-throw.c (catch_exception_command_1):
10497         * breakpoint.c (struct ep_type_description::description):
10498         Constify.
10499         (add_solib_catchpoint): Constify.
10500         (catch_fork_command_1): Add cast.
10501         (add_catch_command): Constify.
10502         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10503         Constify.
10504         * bsd-uthread.c (bsd_uthread_state): Constify.
10505         * buildsym.c (patch_subfile_names): Constify.
10506         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10507         Constify.
10508         * c-exp.y (yyerror): Constify.
10509         (token::oper): Constify.
10510         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10511         * c-varobj.c (cplus_describe_child): Constify.
10512         * charset.c (find_charset_names): Add cast.
10513         (find_charset_names): Constify array and add const_cast.
10514         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10515         (edit_command): Constify.
10516         * cli/cli-decode.c (lookup_cmd): Constify.
10517         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10518         Constify.
10519         (struct dump_context): Constify.
10520         (add_dump_command, restore_command): Constify.
10521         * cli/cli-script.c (get_command_line): Constify.
10522         * cli/cli-script.h (get_command_line): Constify.
10523         * cli/cli-utils.c (check_for_argument): Constify.
10524         * cli/cli-utils.h (check_for_argument): Constify.
10525         * coff-pe-read.c (struct read_pe_section_data): Constify.
10526         * command.h (lookup_cmd): Constify.
10527         * common/print-utils.c (decimal2str): Constify.
10528         * completer.c (gdb_print_filename): Constify.
10529         * corefile.c (set_gnutarget): Constify.
10530         * cp-name-parser.y (yyerror): Constify.
10531         * cp-valprint.c (cp_print_class_member): Constify.
10532         * cris-tdep.c (cris_register_name, crisv32_register_name):
10533         Constify.
10534         * d-exp.y (yyerror): Constify.
10535         (struct token::oper): Constify.
10536         * d-lang.h (d_yyerror): Constify.
10537         * dbxread.c (struct header_file_location::name): Constify.
10538         (add_old_header_file, add_new_header_file, last_function_name)
10539         (dbx_next_symbol_text, add_bincl_to_list)
10540         (find_corresponding_bincl_psymtab, set_namestring)
10541         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10542         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10543         * defs.h (command_line_input, print_address_symbolic)
10544         (deprecated_readline_begin_hook): Constify.
10545         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10546         Constify.
10547         * event-top.c (handle_line_of_input): Constify and add cast.
10548         * exceptions.c (catch_errors): Constify.
10549         * exceptions.h (catch_errors): Constify.
10550         * expprint.c (print_subexp_standard, op_string, op_name)
10551         (op_name_standard, dump_raw_expression, dump_raw_expression):
10552         * expression.h (op_name, op_string, dump_raw_expression):
10553         Constify.
10554         * f-exp.y (yyerror): Constify.
10555         (struct token::oper): Constify.
10556         (struct f77_boolean_val::name): Constify.
10557         * f-lang.c (f_word_break_characters): Constify.
10558         * f-lang.h (f_yyerror): Constify.
10559         * fork-child.c (fork_inferior): Add cast.
10560         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10561         (new_variant): Constify.
10562         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10563         * gdbarch.c: Regenerate.
10564         * gdbcore.h (set_gnutarget): Constify.
10565         * go-exp.y (yyerror): Constify.
10566         (token::oper): Constify.
10567         * go-lang.h (go_yyerror): Constify.
10568         * go32-nat.c (go32_sysinfo): Constify.
10569         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10570         * guile/scm-cmd.c (cmdscm_function): Constify.
10571         * guile/scm-param.c (pascm_param_value): Constify.
10572         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10573         (h8300sx_register_name): Constify.
10574         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10575         Constify.
10576         * ia64-tdep.c (ia64_register_names): Constify.
10577         * infcmd.c (construct_inferior_arguments): Constify.
10578         (path_command, attach_post_wait): Constify.
10579         * language.c (show_range_command, show_case_command)
10580         (unk_lang_error): Constify.
10581         * language.h (language_defn::la_error)
10582         (language_defn::la_name_of_this): Constify.
10583         * linespec.c (decode_line_2): Constify.
10584         * linux-thread-db.c (thread_db_err_str): Constify.
10585         * lm32-tdep.c (lm32_register_name): Constify.
10586         * m2-exp.y (yyerror): Constify.
10587         * m2-lang.h (m2_yyerror): Constify.
10588         * m32r-tdep.c (m32r_register_names): Constify and make static.
10589         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10590         * m88k-tdep.c (m88k_register_name): Constify.
10591         * macroexp.c (appendmem): Constify.
10592         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10593         (upgrade_type, parse_external, parse_partial_symbols)
10594         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10595         (new_symbol): Constify.
10596         * memattr.c (mem_info_command): Constify.
10597         * mep-tdep.c (register_name_from_keyword): Constify.
10598         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10599         Constify.
10600         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10601         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10602         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10603         cast.
10604         (mi_execute_async_cli_command): Constify.
10605         * mips-tdep.c (mips_register_name): Constify.
10606         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10607         (am33_register_name, am33_2_register_name)
10608         * moxie-tdep.c (moxie_register_names): Constify.
10609         * nat/linux-osdata.c (osdata_type): Constify fields.
10610         * nto-tdep.c (nto_parse_redirection): Constify.
10611         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10612         (lookup_child_selector): Constify.
10613         (objc_methcall::name): Constify.
10614         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10615         (lookup_struct_typedef): Constify.
10616         * objfiles.c (pc_in_section): Constify.
10617         * objfiles.h (pc_in_section): Constify.
10618         * p-exp.y (struct token::oper): Constify.
10619         (yyerror): Constify.
10620         * p-lang.h (pascal_yyerror): Constify.
10621         * parser-defs.h (op_name_standard): Constify.
10622         (op_print::string): Constify.
10623         (exp_descriptor::op_name): Constify.
10624         * printcmd.c (print_address_symbolic): Constify.
10625         * psymtab.c (print_partial_symbols): Constify.
10626         * python/py-breakpoint.c (stop_func): Constify.
10627         (bppy_get_expression): Constify.
10628         * python/py-cmd.c (cmdpy_completer::name): Constify.
10629         (cmdpy_function): Constify.
10630         * python/py-event.c (evpy_add_attribute)
10631         (gdbpy_initialize_event_generic): Constify.
10632         * python/py-event.h (evpy_add_attribute)
10633         (gdbpy_initialize_event_generic): Constify.
10634         * python/py-evts.c (add_new_registry): Constify.
10635         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10636         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10637         * python/py-inferior.c (get_buffer): Add cast.
10638         * python/py-param.c (parm_constant::name): Constify.
10639         * python/py-unwind.c (fprint_frame_id): Constify.
10640         * python/python.c (gdbpy_parameter_value): Constify.
10641         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10642         * remote.c (memory_packet_config::name): Constify.
10643         (show_packet_config_cmd, remote_write_bytes)
10644         (remote_buffer_add_string):
10645         * reverse.c (exec_reverse_once): Constify.
10646         * rs6000-tdep.c (variant::name, variant::description): Constify.
10647         * rust-exp.y (rustyyerror): Constify.
10648         * rust-lang.c (rust_op_name): Constify.
10649         * rust-lang.h (rustyyerror): Constify.
10650         * serial.h (serial_ops::name): Constify.
10651         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10652         (sh_sh3e_register_name, sh_sh2e_register_name)
10653         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10654         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10655         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10656         (sh_sh4al_dsp_register_name): Constify.
10657         * sh64-tdep.c (sh64_register_name): Constify.
10658         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10659         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10660         * stabsread.c (patch_block_stabs, read_type_number)
10661         (ref_map::stabs, ref_add, process_reference)
10662         (symbol_reference_defined, define_symbol, define_symbol)
10663         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10664         (read_one_struct_field, read_struct_fields, read_baseclasses)
10665         (read_tilde_fields, read_struct_type, read_array_type)
10666         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10667         (read_huge_number, read_range_type, read_args, common_block_start)
10668         (find_name_end): Constify.
10669         * stabsread.h (common_block_start, define_symbol)
10670         (process_one_symbol, symbol_reference_defined, ref_add):
10671         * symfile.c (get_section_index, add_symbol_file_command):
10672         * symfile.h (get_section_index): Constify.
10673         * target-descriptions.c (tdesc_type::name): Constify.
10674         (tdesc_free_type): Add cast.
10675         * target.c (find_default_run_target):
10676         (add_deprecated_target_alias, find_default_run_target)
10677         (target_announce_detach): Constify.
10678         (do_option): Constify.
10679         * target.h (add_deprecated_target_alias): Constify.
10680         * thread.c (print_thread_info_1): Constify.
10681         * top.c (deprecated_readline_begin_hook, command_line_input):
10682         Constify.
10683         (init_main): Add casts.
10684         * top.h (handle_line_of_input): Constify.
10685         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10686         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10687         (tfind_command): Rename to ...
10688         (tfind_command_1): ... this and constify.
10689         (tfind_command): New function.
10690         (tfind_end_command, tfind_start_command): Adjust.
10691         (encode_source_string): Constify.
10692         * tracepoint.h (encode_source_string): Constify.
10693         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10694         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10695         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10696         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10697         * tui/tui-win.c (parse_scrolling_args): Constify.
10698         * tui/tui-windata.c (tui_erase_data_content): Constify.
10699         * tui/tui-windata.h (tui_erase_data_content): Constify.
10700         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10701         * tui/tui.c (tui_enable): Add cast.
10702         * utils.c (defaulted_query): Constify.
10703         (init_page_info): Add cast.
10704         (puts_debug, subset_compare): Constify.
10705         * utils.h (subset_compare): Constify.
10706         * varobj.c (varobj_format_string): Constify.
10707         * varobj.h (varobj_format_string): Constify.
10708         * vax-tdep.c (vax_register_name): Constify.
10709         * windows-nat.c (windows_detach): Constify.
10710         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10711         * xml-support.c (gdb_xml_end_element): Constify.
10712         * xml-tdesc.c (tdesc_start_reg): Constify.
10713         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10714         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10715         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10716
10717 2017-04-05  Pedro Alves  <palves@redhat.com>
10718
10719         * proc-api.c (struct trans): Constify.
10720         (procfs_note): Constify.
10721         * proc-events.c (struct trans, syscall_table):
10722         * proc-flags.c (struct trans): Constify.
10723         * proc-utils.h (procfs_note): Constify.
10724         * proc-why.c (struct trans): Constify.
10725         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10726         (procfs_detach): Constify.
10727         * sol-thread.c (struct string_map): Constify.
10728         (td_err_string, td_state_string): Constify.
10729
10730 2017-04-05  Pedro Alves  <palves@redhat.com>
10731
10732         * proc-api.c (procfs_filename): Don't initialize
10733         procfs_filename.
10734         (prepare_to_trace): Assume procfs_filename is non-NULL.
10735         (_initialize_proc_api): Give procfs_filename a default value here.
10736
10737 2017-04-05  Pedro Alves  <palves@redhat.com>
10738
10739         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10740         'cond_string' parameter.
10741         (extract_exception_regexp): Constify 'string' parameter.
10742         (catch_exception_command_1): Constify.
10743         * breakpoint.c (init_catchpoint)
10744         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10745         parameter.
10746         (ep_parse_optional_if_clause, catch_fork_command_1)
10747         (catch_exec_command_1): Constify.
10748         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10749         parameter.
10750         (ep_parse_optional_if_clause): Constify.
10751         * cli/cli-utils.c (remove_trailing_whitespace)
10752         (check_for_argument): Constify.
10753         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10754         non-const overload.
10755         (check_for_argument): Likewise.
10756
10757 2017-04-05  Pedro Alves  <palves@redhat.com>
10758
10759         * event-top.c (command_line_handler): Add cast to execute_command
10760         call.
10761         * record-btrace.c (cmd_record_btrace_bts_start)
10762         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10763         (cmd_record_btrace_start): Add cast to execute_command call.
10764         * record-full.c (record_full_goto_insn):
10765         * record.c (record_start, record_stop): Add cast to
10766         execute_command_to_string calls.
10767         (cmd_record_start): Add cast to execute_command calls.
10768
10769 2017-04-05  Pedro Alves  <palves@redhat.com>
10770
10771         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10772         static inline function.
10773         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10774         array and use gdb_PyArg_ParseTupleAndKeywords.
10775         * python/py-cmd.c (cmdpy_init): Likewise.
10776         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10777         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10778         (infpy_search_memory): Likewise.
10779         * python/py-objfile.c (objfpy_add_separate_debug_file)
10780         (gdbpy_lookup_objfile): Likewise.
10781         * python/py-symbol.c (gdbpy_lookup_symbol)
10782         (gdbpy_lookup_global_symbol): Likewise.
10783         * python/py-type.c (gdbpy_lookup_type): Likewise.
10784         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10785         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10786         Likewise.
10787
10788 2017-04-05  Pedro Alves  <palves@redhat.com>
10789
10790         * python/python-internal.h (gdb_PyGetSetDef): New type.
10791         * python/py-block.c (block_object_getset)
10792         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10793         * python/py-event.c (event_object_getset)
10794         (finish_breakpoint_object_getset): Likewise.
10795         * python/py-inferior.c (inferior_object_getset): Likewise.
10796         * python/py-infthread.c (thread_object_getset): Likewise.
10797         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10798         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10799         * python/py-objfile.c (objfile_getset): Likewise.
10800         * python/py-progspace.c (pspace_getset): Likewise.
10801         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10802         Likewise.
10803         * python/py-record.c (recpy_record_getset): Likewise.
10804         * python/py-symbol.c (symbol_object_getset): Likewise.
10805         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10806         Likewise.
10807         * python/py-type.c (type_object_getset, field_object_getset):
10808         Likewise.
10809         * python/py-value.c (value_object_getset): Likewise.
10810
10811 2017-04-05  Pedro Alves  <palves@redhat.com>
10812
10813         * python/python-internal.h (gdb_PyObject_CallMethod)
10814         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10815         New functions.
10816         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10817         (PySys_GetObject, PySys_SetPath): New macros.
10818
10819 2017-04-05  Pedro Alves  <palves@redhat.com>
10820
10821         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10822         info_osdata_command.
10823         * osdata.c (info_osdata_command): Rename to ...
10824         (info_osdata): ... this.  Constify 'type' parameter, and remove
10825         the 'from_tty' parameter.  Accept NULL TYPE.
10826         (info_osdata_command): New function.
10827         * osdata.h (info_osdata_command): Remove declaration.
10828         (info_osdata): New declaration.
10829
10830 2017-04-05  Pedro Alves  <palves@redhat.com>
10831
10832         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10833         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10834         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10835         parameter.
10836         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10837         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10838         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10839         parameter.
10840         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10841         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10842         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10843         (mi_cmd_file_list_exec_source_files)
10844         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10845         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10846         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10847         parameter.
10848         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10849         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10850         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10851         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10852         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10853         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10854         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10855         'command' parameter.
10856         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10857         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10858         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10859         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10860         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10861         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10862         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10863         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10864         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10865         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10866         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10867         parameter.
10868         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10869         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10870         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10871         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10872         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10873         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10874         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10875         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10876         (mi_cmd_data_list_changed_registers)
10877         (mi_cmd_data_write_register_values)
10878         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10879         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10880         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10881         (mi_cmd_list_features, mi_cmd_list_target_features)
10882         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10883         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10884         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10885         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10886         (mi_cmd_trace_frame_collected): Constify 'command'
10887         parameter.
10888         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10889         'command' parameter.
10890
10891 2017-04-05  Pedro Alves  <palves@redhat.com>
10892
10893         * ada-lang.c (ada_completer_word_break_characters): Now a const
10894         array.
10895         (ada_get_gdb_completer_word_break_characters): Constify.
10896         * completer.c (gdb_completer_command_word_break_characters)
10897         (gdb_completer_file_name_break_characters)
10898         (gdb_completer_quote_characters): Now const arrays.
10899         (get_gdb_completer_quote_characters): Constify.
10900         (set_rl_completer_word_break_characters): New function.
10901         (set_gdb_completion_word_break_characters)
10902         (complete_line_internal): Use it.
10903         * completer.h (get_gdb_completer_quote_characters): Constify.
10904         (set_rl_completer_word_break_characters): Declare.
10905         * f-lang.c (f_word_break_characters): Constify.
10906         * language.c (default_word_break_characters): Constify.
10907         * language.h (language_defn::la_word_break_characters): Constify.
10908         (default_word_break_characters): Constify.
10909         * top.c (init_main): Use set_rl_completer_word_break_characters.
10910
10911 2017-04-05  Pedro Alves  <palves@redhat.com>
10912
10913         * aix-thread.c (aix_thread_pid_to_str)
10914         (aix_thread_extra_thread_info): Constify.
10915         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10916         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10917         (bsd_uthread_pid_to_str): Constify.
10918         * corelow.c (core_pid_to_str): Constify.
10919         * darwin-nat.c (darwin_pid_to_str): Constify.
10920         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10921         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10922         Constify.
10923         * gnu-nat.c (gnu_pid_to_str): Constify.
10924         * go32-nat.c (go32_pid_to_str): Constify.
10925         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10926         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10927         * inferior.c (inferior_pid_to_str): Constify.
10928         * linux-nat.c (linux_nat_pid_to_str): Constify.
10929         * linux-tdep.c (linux_core_pid_to_str): Constify.
10930         * linux-thread-db.c (thread_db_pid_to_str)
10931         (thread_db_extra_thread_info): Constify.
10932         * nto-tdep.c (nto_extra_thread_info): Constify.
10933         * nto-tdep.h (nto_extra_thread_info): Constify.
10934         * obsd-nat.c (obsd_pid_to_str): Constify.
10935         * procfs.c (procfs_pid_to_str): Constify.
10936         * ravenscar-thread.c (ravenscar_extra_thread_info)
10937         (ravenscar_pid_to_str): Constify.
10938         * remote-sim.c (gdbsim_pid_to_str): Constify.
10939         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10940         Constify.
10941         * sol-thread.c (solaris_pid_to_str): Constify.
10942         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10943         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10944         * target.c (default_pid_to_str, target_pid_to_str)
10945         (normal_pid_to_str, default_pid_to_str): Constify.
10946         * target.h (target_ops::to_pid_to_str)
10947         (target_ops::to_extra_thread_info): Constify.
10948         (target_pid_to_str, normal_pid_to_str): Constify.
10949         * windows-nat.c (windows_pid_to_str): Constify.
10950         * gdbarch.sh (core_pid_to_str): Constify.
10951         * target-delegates.c: Regenerate.
10952         * gdbarch.h, gdbarch.c: Regenerate.
10953
10954 2017-04-05  Pedro Alves  <palves@redhat.com>
10955
10956         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10957         the memory of the temporary warning_pre_print override.
10958         * utils.c (warning_pre_print): Constify.
10959         * utils.h (warning_pre_print): Constify.
10960
10961 2017-04-05  Pedro Alves  <palves@redhat.com>
10962
10963         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10964         (shell_command): New function.
10965         (make_command): Use std::string.
10966         (init_cli_cmds): Register shell_command instead of shell_escape.
10967
10968 2017-04-05  Pedro Alves  <palves@redhat.com>
10969
10970         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10971         * tracepoint.c (default_collect): Don't initialize.
10972
10973 2017-04-05  Pedro Alves  <palves@redhat.com>
10974
10975         * macroexp.c (macro_buffer::shared): Now a bool.
10976         (init_buffer): Update.
10977         (init_shared_buffer): Constify 'addr' parameter.
10978         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10979         casts.
10980
10981 2017-04-05  Pedro Alves  <palves@redhat.com>
10982
10983         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10984         * disasm.c (set_disassembler_options): Constify local.
10985         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10986
10987 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10988
10989         PR gdb/21352
10990         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10991         option.
10992
10993 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10994
10995         * frame.c (frame_unwind_register_unsigned): Call
10996         frame_unwind_register_value.
10997
10998 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10999
11000         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11001         Use gdb_test_multiple, and don't match anchor.
11002
11003 2017-04-05  Pedro Alves  <palves@redhat.com>
11004
11005         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11006         (Write After Approval): Remove Simon Marchi.
11007
11008 2017-04-05  Pedro Alves  <palves@redhat.com>
11009
11010         * common/gdb_optional.h (optional::optional): Make constexpr and
11011         initialize m_dummy.
11012
11013 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11014
11015         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11016         (amd64fbsd_jmp_buf_reg_offset): Remove.
11017         (amd64fbsd_supply_uthread): Remove function.
11018         (amd64fbsd_collect_uthread): Remove function.
11019         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11020         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11021         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11022         (fbsd-nat.c): Update comment.
11023         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11024         (i386fbsd_jmp_buf_reg_offset): Remove.
11025         (i386fbsd_supply_uthread): Remove function.
11026         (i386fbsd_collect_uthread): Remove function.
11027         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11028
11029 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11030
11031         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11032         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11033         * NEWS: Mention that support for FreeBSD/alpha was removed.
11034         * alpha-fbsd-tdep.c: Delete file.
11035         * config/alpha/fbsd.mh: Delete file.
11036         * configure.host: Delete alpha*-*-freebsd* and
11037         alpha*-*-kfreebsd*-gnu.
11038         * configure.tgt: Delete alpha*-*-freebsd* and
11039         alpha*-*-kfreebsd*-gnu.
11040
11041 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11042
11043         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11044         amd64bsd_store_inferior_registers): Use ptid from regcache.
11045
11046 2017-04-04  Pedro Alves  <palves@redhat.com>
11047
11048         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11049         data fields, make them private and add "m_" prefixes.
11050         (lnp_state_machine::lnp_state_machine): New ctor.
11051         (record_line, check_line_address, handle_set_discriminator)
11052         (handle_set_address, handle_advance_pc, handle_special_opcode)
11053         (handle_advance_line, handle_set_file, handle_negate_stmt)
11054         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11055         (end_sequence, advance_line): New methods.
11056         (m_gdbarch, m_record_lines_p): New fields.
11057         (lnp_reader_state): Delete.
11058         (dwarf_record_line): Rename to ...
11059         (lnp_state_machine::record_line): ... adjust.
11060         (init_lnp_state_machine): Delete.
11061         (lnp_state_machine::lnp_state_machine): New.
11062         (check_line_address): Rename to ...
11063         (lnp_state_machine::check_line_address): This.
11064         (dwarf_decode_lines_1): Remove reference to "reader_state".
11065         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11066         State machine internal state manipulation moved to
11067         lnp_state_machine methods.
11068
11069 2017-04-04  Pedro Alves  <palves@redhat.com>
11070
11071         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11072         unittests/offset-type-selftests.c.
11073         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11074         * common/offset-type.h: New file.
11075         * common/preprocessor.h: New file.
11076         * common/traits.h: New file.
11077         * common/valid-expr.h: New file.
11078         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11079         sect_offset and cu_offset strong typedefs throughout.
11080         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11081         typedefs throughout.
11082         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11083         sect_offset and cu_offset strong typedefs throughout.
11084         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11085         typedefs throughout.
11086         * gdbtypes.h: Include "common/offset-type.h".
11087         (cu_offset): Now an offset type (strong typedef) instead of a
11088         struct.
11089         (sect_offset): Likewise.
11090         (union call_site_parameter_u): Rename "param_offset" field to
11091         "param_cu_off".
11092         * unittests/offset-type-selftests.c: New file.
11093
11094 2017-04-04  Pedro Alves  <palves@redhat.com>
11095
11096         * common/underlying.h: New file.
11097         * dwarf2read.c: Include "common/gdb_optional.h" and
11098         "common/underlying.h".
11099         (dir_index, file_name_index): New types.
11100         (file_entry): Use them.
11101         (file_entry::include): Use to_underlying.
11102         (line_header::add_file_name): Use dir_index.
11103         (read_formatted_entries): Use gdb::optional.  Read form before
11104         writting to file_entry.
11105         (dwarf_decode_line_header): Use dir_index.
11106         (lnp_state_machine::current_file): Use to_underlying.
11107         (lnp_state_machine::file): Change type to file_name_index.
11108         (dwarf_record_line): Use to_underlying.
11109         (init_lnp_state_machine): Use file_name_index.
11110         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11111
11112 2017-04-04  Pedro Alves  <palves@redhat.com>
11113
11114         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11115         operator bool, has_value and get methods.
11116
11117 2017-04-04  Pedro Alves  <palves@redhat.com>
11118
11119         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11120         fields.
11121         (line_header): Initialize all data fields.  Change type of
11122         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11123         Change type of include_dirs to std::vector<const char *>.  Remove
11124         num_include_dirs, include_dirs_size.  Change type of file_names to
11125         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11126         (line_header::line_header): New.
11127         (line_header::add_include_dir, line_header::add_file_name): New
11128         methods.
11129         (line_header::include_dir_at): Remove NULL check.
11130         (line_header::file_name_at): Add const overload.
11131         (line_header_up): New unique_ptr typedef.
11132         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11133         std::vector.  Remove free_line_header call.
11134         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11135         free_line_header call.
11136         (free_cu_line_header): Delete.
11137         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11138         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11139         Adjust to use std::vector.
11140         (free_line_header): Delete.
11141         (free_line_header_voidp): Use delete.
11142         (add_include_dir): Replace with ...
11143         (line_header::add_include_dir): ... this method.  Use std::vector.
11144         (add_file_name): Replace with ...
11145         (line_header::add_file_name): ... this method.  Use std::vector.
11146         (add_include_dir_stub): Delete.
11147         (read_formatted_entries): Remove memset.
11148         (dwarf_decode_line_header): Return a line_header_up instead of a
11149         raw pointer.  Remove cleanup handling.  Pass lambdas to
11150         read_formatted_entries.  Adjust to use line_header methods.
11151         (dwarf_decode_lines_1): Adjust to use line_header methods.
11152         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11153         use std::vector.
11154
11155 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11156
11157         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11158         instead of struct ptid.
11159
11160 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11161
11162         * frame.c (get_frame_register_bytes): Unwind using value.
11163         (put_frame_register_bytes): Likewise.
11164
11165 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11166
11167         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11168         aggregate-like.
11169
11170 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11171
11172         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11173
11174 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11175
11176         * gdbthread.h (struct thread_info): Declare constructor and
11177         destructor.  Add some in-class member initializers.
11178         * thread.c (free_thread): Remove.
11179         (init_thread_list): Call delete instead of free_thread.
11180         (new_thread): Call thread_info constructor.
11181         (thread_info::thread_info): New function.
11182         (thread_info::~thread_info): New function.
11183         (delete_thread_1): Call delete instead of free_thread.
11184         (make_cleanup_restore_current_thread): Move tp and frame to
11185         inner block.
11186
11187 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11188
11189         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11190         (arc_skip_prologue): Likewise.
11191         (arc_make_frame_cache): Likewise.
11192         (arc_pv_get_operand): New function.
11193         (arc_is_in_prologue): Likewise.
11194         (arc_analyze_prologue): Likewise.
11195         (arc_print_frame_cache): Likewise.
11196         (MAX_PROLOGUE_LENGTH): New constant.
11197
11198 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11199
11200         * configure.tgt: Add arc-insn.o.
11201         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11202         (dump_arc_instruction_command): New function.
11203         (arc_fprintf_disasm): Likewise.
11204         (arc_disassemble_info): Likewise.
11205         (arc_insn_get_operand_value): Likewise.
11206         (arc_insn_get_operand_value_signed): Likewise.
11207         (arc_insn_get_memory_base_reg): Likewise.
11208         (arc_insn_get_memory_offset): Likewise.
11209         (arc_insn_get_branch_target): Likewise.
11210         (arc_insn_dump): Likewise.
11211         (arc_insn_get_linear_next_pc): Likewise.
11212         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11213         (arc_disassemble_info): Likewise.
11214         (arc_insn_get_branch_target): Likewise.
11215         (arc_insn_get_linear_next_pc): Likewise.
11216         * NEWS: Mention new "maint print arc arc-instruction".
11217
11218 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11219
11220         * arc-tdep (maintenance_print_arc_list): New variable.
11221         (maintenance_print_arc_command): New function.
11222
11223 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11224
11225         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11226         Add "limm" and "reserved".
11227         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11228         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11229         * arc-tdep.h (arc_regnum): Likewise.
11230
11231 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11232
11233         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11234         for THREADPTR register.
11235         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11236         register.
11237         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11238         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11239         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11240
11241 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11242
11243         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11244         registers above gdbarch_num_regs (gdbarch) as privileged in
11245         call0 ABI.
11246
11247 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11248
11249         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11250         for a single specified register or for all registers in
11251         a0_base..a0_base + C0_NREGS range.
11252         (supply_gregset_reg): Call regcache_raw_supply for a single
11253         specified register or for all registers in a0_base..a0_base +
11254         C0_NREGS range.
11255
11256 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11257
11258         * arch/xtensa.h (C0_NREGS): Add definition.
11259         * xtensa-tdep.c (C0_NREGS): Remove definition.
11260
11261 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11262
11263         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11264         Drop xtensa_default_isa initialization.
11265         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11266
11267 2017-03-27  Pedro Alves  <palves@redhat.com>
11268
11269         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11270         (file_entry::include_dir): New method.
11271         (line_header::include_dir_at, line_header::file_name_at): New
11272         methods.
11273         (setup_type_unit_groups, setup_type_unit_groups)
11274         (psymtab_include_file_name): Simplify using the new methods.
11275         (lnp_state_machine) <the_line_header>: New field.
11276         <file>: Add comment.
11277         (lnp_state_machine::current_file): New method.
11278         (dwarf_record_line): Simplify using the new methods.
11279         (init_lnp_state_machine): Initialize the "the_line_header" field.
11280         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11281         Simplify using the new methods.
11282
11283 2017-03-27  Pedro Alves  <palves@redhat.com>
11284
11285         * cp-name-parser.y (make_empty): Delete.
11286         (demangler_special, nested_name, ptr_operator, array_indicator)
11287         (direct_declarator, declarator_1): Use fill_comp instead of
11288         make_empty.
11289
11290 2017-03-27  Pedro Alves  <palves@redhat.com>
11291
11292         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11293         to ATTRIBUTE_PRINTF.
11294         * solib-target.c (library_list_start_list): Print "string" not
11295         "version".
11296         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11297         gdb_xml_error call.
11298
11299 2017-03-27  Pedro Alves  <palves@redhat.com>
11300
11301         * dwarf2read.c (struct file_and_directory): New.
11302         (dwarf2_get_dwz_file): Adjust to use std::string.
11303         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11304         (find_file_and_directory): Adjust to return a file_and_directory
11305         object.
11306         (read_file_scope): Adjust to use file_and_directory.  Remove
11307         make_cleanup/do_cleanups calls.
11308         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11309         make_cleanup/do_cleanups calls.
11310         * python/python.c (do_start_initialization): Adjust to ldirname
11311         returning a std::string.
11312         * utils.c (ldirname): Now returns a std::string.
11313         * utils.h (ldirname): Change return type to std::string.
11314         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11315         returning a std::string.
11316         * xml-tdesc.c (file_read_description_xml): Likewise.
11317
11318 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11319
11320         * regcache.c (regcache_debug_print_register): New function.
11321         * regcache.h (regcache_debug_print_register): New declaration.
11322         * target.c (debug_print_register): Remove.
11323         (target_fetch_registers): Call regcache_debug_print_register.
11324         (target_store_registers): Likewise.
11325
11326 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11327
11328         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11329         reference beyond the 'lh->include_dirs' array before accessing to
11330         it.
11331         (psymtab_include_file_name): Likewise.
11332         (dwarf_decode_lines_1): Likewise.
11333         (dwarf_decode_lines): Likewise.
11334         (file_file_name): Likewise.
11335
11336 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11337
11338         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11339         inferior_ptid.
11340         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11341         ps_lsetfpregs): Likewise.
11342         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11343         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11344         ps_lsetfpregs): Likewise.
11345         * target.c (target_fetch_registers, target_store_registers):
11346         Remove asserts.
11347
11348 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11349
11350         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11351
11352 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11353
11354         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11355         (_initialize_aarch64_tdep): Register it.
11356         (aarch64_record_load_store): Handle PRFM instruction.
11357         (aarch64_process_record_test): New function.
11358
11359 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11360
11361         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11362         indentation.
11363
11364 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11365
11366         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11367
11368 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11369
11370         python/python.c (do_start_initialization): Fix memory leak.
11371
11372 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11373
11374         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11375         using get_ptrace_pid.
11376         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11377         inferior_ptid.
11378         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11379         inferior_ptid instead of pid.
11380
11381 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11382
11383         * aarch64-tdep.c: Wrap locally used classes in anonymous
11384         namespace.
11385         * arm-tdep.c: Likewise.
11386         * linespec.c: Likewise.
11387         * ui-out.c: Likewise.
11388
11389 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11390
11391         PR gdb/19637
11392         * python/lib/gdb/printer/bound_registers.py: Import sys.
11393
11394 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11395
11396         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11397         windows_thread_info parameter and use it instead of
11398         current_thread.
11399         (windows_fetch_inferior_registers): Don't set current_thread,
11400         pass the thread to do_windows_fetch_inferior_registers.  Use
11401         ptid from regcache instead of inferior_ptid.
11402         (do_windows_store_inferior_registers): Add windows_thread_info
11403         parameter and use it instead of current_thread.
11404         (windows_store_inferior_registers): Don't set current_thread,
11405         pass the thread to do_windows_store_inferior_registers.  Use
11406         ptid from regcache instead of inferior_ptid.
11407
11408 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11409
11410         * ser-mingw.c (ser_windows_raw): Remove reference to
11411         struct serial::current_timeout.
11412
11413 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11414
11415         PR tdep/20928
11416         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11417         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11418         (sparc64_fsr_type): Fix %fsr decoding.
11419
11420 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11421
11422         * python/py-record-btrace.c (btpy_insn_data): Change return type
11423         for Python 2.
11424
11425 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11426
11427         * spu-linux-nat.c (spu_fetch_inferior_registers,
11428         spu_store_inferior_registers): Use ptid from regcache, set and
11429         restore inferior_ptid.
11430         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11431         Likewise.
11432
11433 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11434
11435         * i386-linux-nat.c (fetch_register, store_register,
11436         i386_linux_fetch_inferior_registers,
11437         i386_linux_store_inferior_registers): Use ptid from regcache.
11438         * ia64-linux-nat.c (ia64_linux_fetch_register,
11439         ia64_linux_store_register): Likewise.
11440         * inf-ptrace.c (inf_ptrace_fetch_register,
11441         inf_ptrace_store_register): Likewise.
11442         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11443         m32r_linux_store_inferior_registers): Likewise.
11444         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11445         m68kbsd_store_inferior_registers): Likewise.
11446         * m68k-linux-nat.c (fetch_register, store_register,
11447         m68k_linux_fetch_inferior_registers,
11448         m68k_linux_store_inferior_registers): Likewise.
11449         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11450         m88kbsd_store_inferior_registers): Likewise.
11451         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11452         mips_fbsd_store_inferior_registers): Likewise.
11453         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11454         mips64_linux_regsets_store_registers): Likewise.
11455         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11456         mipsnbsd_store_inferior_registers): Likewise.
11457         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11458         mips64obsd_store_inferior_registers): Likewise.
11459         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11460         Likewise.
11461         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11462         ppcfbsd_store_inferior_registers): Likewise.
11463         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11464         ppc_linux_store_inferior_registers): Likewise.
11465         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11466         ppcnbsd_store_inferior_registers): Likewise.
11467         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11468         ppcobsd_store_registers): Likewise.
11469         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11470         Likewise.
11471         * ravenscar-thread.c (ravenscar_fetch_registers,
11472         ravenscar_store_registers, ravenscar_prepare_to_store):
11473         Likewise.
11474         * record-btrace.c (record_btrace_fetch_registers,
11475         record_btrace_store_registers, record_btrace_prepare_to_store):
11476         Likewise.
11477         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11478         Lookup inferior using ptid from regcache, instead of
11479         current_inferior.
11480         * remote.c (remote_fetch_registers, remote_store_registers): Use
11481         ptid from regcache.
11482         * rs6000-nat.c (fetch_register, store_register): Likewise.
11483         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11484         s390_linux_store_inferior_registers): Likewise.
11485         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11486         shnbsd_store_inferior_registers): Likewise.
11487         * sol-thread.c (sol_thread_fetch_registers,
11488         sol_thread_store_registers): Likewise.
11489         * sparc-nat.c (sparc_fetch_inferior_registers,
11490         sparc_store_inferior_registers): Likewise.
11491         * tilegx-linux-nat.c (fetch_inferior_registers,
11492         store_inferior_registers): Likewise.
11493         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11494         vaxbsd_store_inferior_registers): Likewise.
11495         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11496         store_xtregs): Likewise.
11497
11498 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11499
11500         PR gdb/14441
11501         * NEWS: Mention support for rvalue references in GDB and python.
11502         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11503         supports both lvalue and rvalue references.
11504
11505 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11506
11507         PR gdb/14441
11508         * gdbtypes.c (rank_one_type): Implement overloading
11509         resolution rules regarding rvalue references.
11510
11511 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11512
11513         PR gdb/14441
11514         * aarch64-tdep.c (aarch64_type_align)
11515         (aarch64_extract_return_value, aarch64_store_return_value): Change
11516         lvalue reference type checks to general reference type checks.
11517         * amd64-tdep.c (amd64_classify): Likewise.
11518         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11519         Likewise.
11520         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11521         (arm_store_return_value): Likewise.
11522         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11523         * c-typeprint.c (c_print_type): Likewise.
11524         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11525         (cplus_number_of_children, cplus_describe_child): Likewise.
11526         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11527         * completer.c (expression_completer): Likewise.
11528         * cp-support.c (make_symbol_overload_list_adl_namespace):
11529         Likewise.
11530         * darwin-nat-info.c (info_mach_region_command): Likewise.
11531         * dwarf2loc.c (entry_data_value_coerce_ref)
11532         (value_of_dwarf_reg_entry): Likewise.
11533         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11534         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11535         Likewise.
11536         * findvar.c (extract_typed_address, store_typed_address):
11537         Likewise.
11538         * gdbtypes.c (rank_one_type): Likewise.
11539         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11540         * infcall.c (value_arg_coerce): Likewise.
11541         * language.c (pointer_type): Likewise.
11542         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11543         Likewise.
11544         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11545         * mn10300-tdep.c (mn10300_type_align): Likewise.
11546         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11547         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11548         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11549         Likewise.
11550         * printcmd.c (print_formatted, x_command): Likewise.
11551         * python/py-type.c (typy_get_composite, typy_template_argument):
11552         Likewise.
11553         * python/py-value.c (valpy_referenced_value)
11554         (valpy_get_dynamic_type, value_has_field): Likewise.
11555         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11556         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11557         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11558         * spu-tdep.c (spu_scalar_value_p): Likewise.
11559         * symtab.c (lookup_symbol_aux): Likewise.
11560         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11561         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11562         Likewise.
11563         * valops.c (value_cast_pointers, value_cast)
11564         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11565         (value_struct_elt, value_struct_elt_bitpos)
11566         (value_find_oload_method_list, find_overload_match)
11567         (value_rtti_indirect_type): Likewise.
11568         * valprint.c (val_print_scalar_type_p, generic_val_print):
11569         Likewise.
11570         * value.c (value_actual_type, value_as_address, unpack_long)
11571         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11572         (coerce_ref): Likewise.
11573         * varobj.c (varobj_get_value_type): Likewise.
11574
11575 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11576
11577         PR gdb/14441
11578         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11579         table of constants.
11580         * python/lib/gdb/command/explore.py: Support exploring values
11581         of rvalue reference types.
11582         * python/lib/gdb/types.py: Implement get_basic_type() for
11583         rvalue reference types.
11584         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11585         constant.
11586         * python/py-value.c (valpy_getitem): Add an rvalue reference
11587         check.
11588         (valpy_reference_value): Add new parameter "refcode".
11589         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11590         New wrappers for valpy_reference_value().
11591         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11592         (gdbpy_invoke_xmethod): Likewise.
11593
11594 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11595
11596         PR gdb/14441
11597         * dwarf2read.c (process_die, read_type_die_1): Handle the
11598         DW_TAG_rvalue_reference_type DIE.
11599         (read_tag_reference_type): Add new parameter "refcode".
11600
11601 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11602
11603         PR gdb/14441
11604         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11605         (c_type_print_modifier, c_type_print_varspec_suffix)
11606         (c_type_print_base): Support printing rvalue reference types.
11607         * c-valprint.c (c_val_print, c_value_print): Support printing
11608         rvalue reference values.
11609
11610 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11611
11612         PR gdb/14441
11613         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11614         typename.
11615         * cp-support.c (replace_typedefs): Handle
11616         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11617         * python/py-type.c (typy_lookup_type): Likewise.
11618
11619 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11620
11621         PR gdb/14441
11622         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11623         * parse.c (insert_type): Change assert statement.
11624         (follow_types): Handle rvalue reference types.
11625         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11626         constant.
11627
11628 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11629
11630         PR gdb/14441
11631         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11632         value_ref() interface.
11633         * c-valprint.c (c_value_print): Likewise.
11634         * infcall.c (value_arg_coerce): Likewise.
11635         * python/py-value.c (valpy_reference_value): Likewise.
11636         * valops.c (value_cast, value_reinterpret_cast)
11637         (value_dynamic_cast, typecmp): Likewise.
11638         (value_ref): Parameterize by kind of return value reference type.
11639         * value.h (value_ref): Add new parameter "refcode".
11640
11641 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11642
11643         PR gdb/14441
11644         * dwarf2read.c (read_tag_reference_type): Use
11645         lookup_lvalue_reference_type() instead of lookup_reference_type().
11646         * eval.c (evaluate_subexp_standard): Likewise.
11647         * f-exp.y: Likewise.
11648         * gdbtypes.c (make_reference_type, lookup_reference_type):
11649         Generalize with rvalue reference types.
11650         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11651         convenience wrappers for lookup_reference_type().
11652         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11653         reference kind parameter.
11654         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11655         wrappers for lookup_reference_type().
11656         * guile/scm-type.c (gdbscm_type_reference): Use
11657         lookup_lvalue_reference_type() instead of lookup_reference_type().
11658         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11659         * parse.c (follow_types): Likewise.
11660         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11661         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11662         Likewise.
11663         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11664         (gdbpy_invoke_xmethod): Likewise.
11665         * stabsread.c: Provide extra argument to make_reference_type()
11666         call.
11667         * valops.c (value_ref, value_rtti_indirect_type): Use
11668         lookup_lvalue_reference_type() instead of lookup_reference_type().
11669
11670 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11671
11672         PR gdb/14441
11673         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11674         (TYPE_IS_REFERENCE): New macro.
11675         (struct type): Add rvalue_reference_type field.
11676         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11677
11678 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11679
11680         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11681         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11682         New function definition.
11683         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11684         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11685         New function declaration.
11686         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11687         * mi/mi-interp.h: New file.
11688         * solib.c (info_sharedlibrary_command): Replace for loop with
11689         ALL_SO_LIBS macro
11690         * solib.h (update_solib_list): New function declaration.
11691         (so_list_head): Move macro.
11692         * solist.h (ALL_SO_LIBS): New macro.
11693
11694 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11695
11696         * infcmd.c (post_create_inferior): Remove unused argument in
11697         call to solib_add.
11698         * remote.c (remote_start_remote): Likewise.
11699         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11700         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11701         (enable_break): Likewise.
11702         * solib.c (update_solib_list): Remove unused target argument
11703         and its documentation.
11704         (solib_add): Remove unused target argument.  Remove unused
11705         argument in call to update_solib_list.
11706         (info_sharedlibrary_command): Remove unused argument in call
11707         to update_solib_list.
11708         (sharedlibrary_command): Remove unused argument in call to
11709         solib_add.
11710         (handle_solib_event): Likewise.
11711         (reload_shared_libraries): Likewise.
11712         * solib.h (solib_add): Remove unused target argument.
11713
11714 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11715
11716         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11717         (s390_displaced_step_fixup): Cover relative branches with the
11718         default fixup handling.  This fixes lack of support for some
11719         relative branch instructions.
11720
11721 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11722
11723         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11724         ptid from regcache.
11725
11726 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11727
11728         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11729         i386_darwin_store_inferior_registers): Use ptid from regcache.
11730
11731 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11732
11733         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11734         i386bsd_store_inferior_registers): Use ptid from regcache.
11735
11736 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11737
11738         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11739         hppaobsd_store_registers): Use ptid from regcache.
11740
11741 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11742
11743         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11744         hppanbsd_store_registers): Use ptid from regcache.
11745
11746 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11747
11748         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11749         from regcache.  Use get_ptrace_pid.
11750
11751 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11752
11753         * corelow.c (get_core_register_section): Use ptid from regcache,
11754         update doc.
11755
11756 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11757
11758         * bsd-uthread.c (bsd_uthread_fetch_registers,
11759         bsd_uthread_store_registers): Use ptid from regcache, set and
11760         restore inferior_ptid.
11761
11762 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11763
11764         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11765         fetch_fp_regs, store_register, store_regs, store_fp_register,
11766         store_fp_regs): Use ptid from regcache.
11767
11768 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11769
11770         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11771         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11772         store_vfp_regs): Use ptid from regcache.
11773
11774 2017-03-17  Pedro Alves  <palves@redhat.com>
11775
11776         PR remote/21188
11777         * ser-base.c (ser_base_wait_for): Add comment.
11778         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11779         version.
11780         * ser-unix.c (hardwire_raw): Remove reference to
11781         scb->current_timeout.
11782         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11783         (hardwire_ops): Install ser_base_readchar instead of
11784         hardwire_readchar.
11785         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11786         Remove fields.
11787
11788 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11789
11790         PR gdb/19637
11791         * python/lib/gdb/printer/bound_registers.py: Add support for
11792         Python 3.
11793
11794 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11795
11796         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11797         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11798         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11799         byte_offset to subobj_byte_offset.  Fix the handling of
11800         DWARF_VALUE_STACK on big-endian targets when coming via an
11801         implicit pointer.
11802         (dwarf2_evaluate_loc_desc): Adjust call to
11803         dwarf2_evaluate_loc_desc_full.
11804         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11805         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11806
11807 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11808
11809         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11810         and REVSH instructions.
11811
11812 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11813
11814         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11815         (arm_record_test): Declare.
11816         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11817         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11818         align with the manual.
11819         (thumb_record_misc): Adjust the code order to align with the
11820         manual.
11821         (thumb2_record_decode_insn_handler): Fix instruction matching.
11822         (instruction_reader_thumb): New class.
11823         (arm_record_test): New function.
11824
11825 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11826
11827         * arm-tdep.c (abstract_memory_reader): New class.
11828         (instruction_reader): New class.
11829         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11830         (decode_insn): Likewise.
11831
11832 2017-03-16  Doug Evans  <dje@google.com>
11833
11834         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11835         member.  Change type of TYPE member to SCM.  All uses updated.
11836         (lsscm_make_lazy_string_smob): Add assert.
11837         (lsscm_make_lazy_string): Flag bad length values.
11838         (lsscm_elt_type): New function.
11839         (gdbscm_lazy_string_to_value): Rewrite to use
11840         lsscm_safe_lazy_string_to_value.
11841         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11842         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11843         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11844         in incoming type.
11845         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11846         * guile/scm-type.c (tyscm_scm_to_type): New function.
11847
11848 2017-03-15  Doug Evans  <dje@google.com>
11849
11850         PR python/17728, python/18439, python/18779
11851         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11852         member.  Change type of TYPE member to PyObject *.  All uses updated.
11853         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11854         (gdbpy_create_lazy_string_object): Flag bad length values.
11855         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11856         Handle typedefs in incoming type.
11857         (stpy_lazy_string_elt_type): New function.
11858         (gdbpy_extract_lazy_string): Call it.
11859         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11860         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11861         typedefs in incoming type.
11862
11863 2017-03-16  Doug Evans  <dje@google.com>
11864
11865         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11866         * guile/scm-type.c (tyscm_scm_to_type): New function.
11867
11868 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11869
11870         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11871         "ULONGEST" for "skip".
11872
11873 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11874
11875         PR gdb/21220
11876         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11877         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11878         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11879         over ptrace peek/poke until end of buffer or error.
11880
11881 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11882
11883         * parse.c (length_of_subexp): Make static.
11884         * parser-defs.h (length_of_subexp): Remove.
11885
11886 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11887
11888         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11889         as well.
11890
11891 2017-03-14  Pedro Alves  <palves@redhat.com>
11892
11893         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11894         (main): Use std::unique_ptr.  Remove calls to
11895         cp_demangled_name_parse_free.
11896
11897 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11898
11899         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11900         alphabsd_store_inferior_registers): Use regcache->ptid instead
11901         of inferior_ptid.
11902
11903 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11904
11905         * aix-thread.c (aix_thread_fetch_registers,
11906         aix_thread_store_registers): Use regcache->ptid instead of
11907         inferior_ptid.
11908
11909 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11910
11911         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11912         store_gregs_to_thread, fetch_fpregs_from_thread,
11913         store_fpregs_to_thread): Use regcache->ptid instead of
11914         inferior_ptid.
11915
11916 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11917
11918         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11919         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11920         instead of inferior_ptid.
11921
11922 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11923
11924         * target.c (target_fetch_registers, target_store_registers): Add
11925         assert.
11926
11927 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11928
11929         * regcache.h (regcache_get_ptid): New function.
11930         * regcache.c (regcache_get_ptid): New function.
11931
11932 2017-03-13  Mark Wielaard  <mark@klomp.org>
11933
11934         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11935
11936 2017-03-10  Keith Seitz  <keiths@redhat.com>
11937
11938         PR c++/8218
11939         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11940
11941 2017-03-08  Pedro Alves  <palves@redhat.com>
11942
11943         PR gdb/18360
11944         * infrun.c (start_step_over, do_target_resume, resume)
11945         (restart_threads): Assert we're not resuming a thread that is
11946         meant to be stopped.
11947         (infrun_thread_stop_requested_callback): Delete.
11948         (infrun_thread_stop_requested): If the thread is internally
11949         stopped, queue a pending stop event and clear the thread's
11950         inline-frame state.
11951         (handle_stop_requested): New function.
11952         (handle_syscall_event, handle_inferior_event_1): Use
11953         handle_stop_requested.
11954         (handle_stop_requested): New function.
11955         (handle_signal_stop): Set the thread's stop_signal here instead of
11956         at caller.
11957         (finish_step_over): Clear step over info unconditionally.
11958         (handle_signal_stop): If the user had interrupted the event
11959         thread, consider the stop a random signal.
11960         (handle_signal_stop) <signal arrived while stepping over
11961         breakpoint>: Don't restart threads here.
11962         (stop_waiting): Don't clear step-over info here.
11963
11964 2017-03-08  Pedro Alves  <palves@redhat.com>
11965
11966         PR 21206
11967         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11968         goes to argument 2, not 1.
11969
11970 2017-03-08  Pedro Alves  <palves@redhat.com>
11971
11972         PR cli/21218
11973         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11974         display_gdb_prompt.
11975         (command_line_input): Add comment.
11976
11977 2017-03-08  Pedro Alves  <palves@redhat.com>
11978
11979         PR tui/21216
11980         * tui/tui-file.c (tui_file::write): New.
11981         * tui/tui-file.h (tui_file): Override "write".
11982         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11983         factored out from ...
11984         (tui_puts): ... here.
11985         (tui_putc): Use them.
11986         (tui_write): New function.
11987         * tui/tui-io.h (tui_write): Declare.
11988
11989 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11990
11991         * Makefile.in (SFILES): Replace "environ.c" with
11992         "common/environ.c".
11993         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11994         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11995         to...
11996         * common/environ.c: ... here.
11997         * environ.h: Moved to...
11998         * common/environ.h: ... here.
11999
12000 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12001
12002         * gdbarch.sh (pstring_ptr): New static function.
12003         (gdbarch_disassembler_options): Use it.
12004         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12005         not valid_disassembler_option->name.
12006         * gdbarch.c: Regenerate.
12007
12008 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12009
12010         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12011
12012 2017-03-07  Pedro Alves  <palves@redhat.com>
12013
12014         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12015
12016 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12017
12018         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12019         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12020         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12021         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12022
12023 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12024
12025         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12026
12027 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12028
12029         * remote.c (remote_add_target_side_commands): Use range-based
12030         for loop.
12031
12032 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12033
12034         PR gdb/21165
12035         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12036         value is lazy.
12037         * valprint.c (common_val_print): Likewise.
12038
12039 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12040
12041         * NEWS: Mention new set/show disassembler-options commands.
12042         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12043         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12044         (prospective_options): New static variable.
12045         (gdb_disassembler::gdb_disassembler): Initialize
12046         m_di.disassembler_options.
12047         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12048         (get_disassembler_options): New function.
12049         (set_disassembler_options): Likewise.
12050         (set_disassembler_options_sfunc): Likewise.
12051         (show_disassembler_options_sfunc): Likewise.
12052         (disassembler_options_completer): Likewise.
12053         (_initialize_disasm): Likewise.
12054         * disasm.h (get_disassembler_options): New prototype.
12055         (set_disassembler_options): Likewise.
12056         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12057         (gdbarch_verify_disassembler_options): Likewise.
12058         * gdbarch.c: Regenerate.
12059         * gdbarch.h: Likewise.
12060         * arm-tdep.c (num_disassembly_options): Delete.
12061         (set_disassembly_style): Likewise.
12062         (arm_disassembler_options): New static variable.
12063         (set_disassembly_style_sfunc): Convert short style name into long
12064         option name.  Call set_disassembler_options.
12065         (show_disassembly_style_sfunc): New function.
12066         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12067         set_gdbarch_verify_disassembler_options.
12068         (_initialize_arm_tdep): Delete regnames variable and update callers.
12069         (arm_disassembler_options): Initialize.
12070         (disasm_options): New variable.
12071         (num_disassembly_options): Rename from this...
12072         (num_disassembly_styles): ...to this.  Compute by scanning through
12073         disasm_options.
12074         (valid_disassembly_styles): Initialize using disasm_options.
12075         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12076         set_arm_regname_option.
12077         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12078         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12079         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12080         set_gdbarch_verify_disassembler_options.
12081         * s390-tdep.c (s390_disassembler_options): New static variable.
12082         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12083         set_gdbarch_verify_disassembler_options.
12084
12085 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12086
12087         * remote.c (remote_add_target_side_condition): Remove "struct"
12088         keyword from range-based for loop.
12089
12090 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12091
12092         * remote.c (remote_add_target_side_condition): Use range-based
12093         for loop.  Update comment.
12094
12095 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12096
12097         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12098
12099 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12100
12101         * regcache.c (regcache_raw_update): New function.
12102         (regcache_raw_read): Move code to regcache_raw_update.
12103         * regcache.h (regcache_raw_update): New declaration.
12104         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12105
12106 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12107
12108         * dwarf2read.c (create_debug_type_hash_table): Initialize
12109         header.signature and header.type_offset_in_tu.
12110
12111 2017-02-24  Pedro Alves  <palves@redhat.com>
12112
12113         * symtab.c (make_file_symbol_completion_list_1): Use
12114         add_symtab_completions.
12115
12116 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12117
12118         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12119
12120 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12121
12122         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12123         I386_MAX_REGISTER_SIZE.
12124         (i386_pseudo_register_write): Likewise.
12125         (i386_process_record): Likewise.
12126         * i387-tdep.c (i387_supply_xsave): Likewise.
12127         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12128         (store_register): Likewise.
12129
12130 2017-02-23  Pedro Alves  <palves@redhat.com>
12131
12132         * ada-lang.c: Include "common/function-view.h".
12133         (ada_iterate_over_symbols): Adjust to use function_view as
12134         callback type.
12135         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12136         (ada_make_symbol_completion_list): Use a lambda.
12137         (ada_exc_search_name_matches): Delete.
12138         (name_matches_regex): New.
12139         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12140         * compile/compile-c-support.c: Include "common/function-view.h".
12141         (print_one_macro): Change prototype to accept a ui_file pointer.
12142         (write_macro_definitions): Use a lambda.
12143         * dwarf2read.c: Include "common/function-view.h".
12144         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12145         (dw2_expand_symtabs_matching): Adjust to use function_view as
12146         callback type.
12147         * language.h: Include "common/function-view.h".
12148         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12149         function_view as callback type.
12150         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12151         * linespec.c: Include "common/function-view.h".
12152         (collect_info::add_symbol): New method.
12153         (struct symbol_and_data_callback, iterate_inline_only, struct
12154         symbol_matcher_data, iterate_name_matcher): Delete.
12155         (iterate_over_all_matching_symtabs): Adjust to use function_view
12156         as callback type and lambdas.
12157         (iterate_over_file_blocks): Adjust to use function_view as
12158         callback type.
12159         (decode_compound_collector): Now a class with private fields.
12160         (decode_compound_collector::release_symbols): New method.
12161         (collect_one_symbol): Rename to...
12162         (decode_compound_collector::operator()): ... this and adjust.
12163         (lookup_prefix_sym): decode_compound_collector construction bits
12164         move to decode_compound_collector ctor.  Pass the
12165         decode_compound_collector object directly as callback.  Remove
12166         cleanups and use decode_compound_collector::release_symbols
12167         instead.
12168         (symtab_collector): Now a class with private fields.
12169         (symtab_collector::release_symtabs): New method.
12170         (add_symtabs_to_list): Rename to...
12171         (symtab_collector::operator()): ... this and adjust.
12172         (collect_symtabs_from_filename): symtab_collector construction
12173         bits move to symtab_collector ctor.  Pass the symtab_collector
12174         object directly as callback.  Remove cleanups and use
12175         symtab_collector::release_symtabs instead.
12176         (collect_symbols): Delete.
12177         (add_matching_symbols_to_info): Use lambdas.
12178         * macrocmd.c (print_macro_callback): Delete.
12179         (info_macro_command): Use a lambda.
12180         (info_macros_command): Pass print_macro_definition as callable
12181         directly.
12182         (print_one_macro): Remove 'ignore' parameter.
12183         (macro_list_command): Adjust.
12184         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12185         (macro_for_each_data::user_data): Delete field.
12186         (foreach_macro): Adjust to call the function_view.
12187         (macro_for_each): Adjust to use function_view as callback type.
12188         (foreach_macro_in_scope): Adjust to call the function_view.
12189         (macro_for_each_in_scope): Adjust to use function_view as callback
12190         type.
12191         * macrotab.h: Include "common/function-view.h".
12192         (macro_callback_fn): Declare a prototype instead of a pointer.
12193         Remove "user_data" parameter.
12194         (macro_for_each, macro_for_each_in_scope): Adjust to use
12195         function_view as callback type.
12196         * psymtab.c (partial_map_expand_apply)
12197         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12198         Adjust to use function_view as callback type and to return bool.
12199         (psym_expand_symtabs_matching): Adjust to use function_view as
12200         callback types.
12201         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12202         to use function_view as callback type and to return bool.
12203         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12204         callback types.
12205         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12206         as callback types.
12207         * symfile.h: Include "common/function-view.h".
12208         (expand_symtabs_file_matcher_ftype)
12209         (expand_symtabs_symbol_matcher_ftype)
12210         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12211         return bool.
12212         (quick_symbol_functions::map_symtabs_matching_filename)
12213         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12214         function_view as callback type and return bool.
12215         (expand_symtabs_matching): Adjust to use function_view as callback
12216         type.
12217         (maintenance_expand_name_matcher)
12218         (maintenance_expand_file_matcher): Delete.
12219         (maintenance_expand_symtabs): Use lambdas.
12220         * symtab.c (iterate_over_some_symtabs): Adjust to use
12221         function_view as callback types and return bool.
12222         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12223         of a cleanup.
12224         (lookup_symtab_callback): Delete.
12225         (lookup_symtab): Use a lambda.
12226         (iterate_over_symbols): Adjust to use function_view as callback
12227         type.
12228         (struct search_symbols_data, search_symbols_file_matches)
12229         (search_symbols_name_matches): Delete.
12230         (search_symbols): Use a pair of lambdas.
12231         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12232         (symtab_expansion_callback): Delete.
12233         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12234         * symtab.h: Include "common/function-view.h".
12235         (iterate_over_some_symtabs): Adjust to use function_view as
12236         callback type and return bool.
12237         (iterate_over_symtabs): Adjust to use function_view as callback
12238         type.
12239         (symbol_found_callback_ftype): Remove 'data' parameter and return
12240         bool.
12241         (iterate_over_symbols): Adjust to use function_view as callback
12242         type.
12243
12244 2017-02-23  Pedro Alves  <palves@redhat.com>
12245
12246         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12247         (%.o) <unittests/%.c>: New pattern.
12248         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12249         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12250         * common/function-view.h: New file.
12251         * unittests/function-view-selftests.c: New file.
12252         * configure: Regenerate.
12253
12254 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12255
12256         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12257         inferior_ptid.
12258         * go32-nat.c (go32_thread_alive): Likewise.
12259
12260 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12261
12262         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12263         delete.
12264
12265 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12266
12267         * varobj.c (varobj_clear_saved_item): Use delete instead of
12268         xfree.
12269         (update_dynamic_varobj_children): Likewise.
12270
12271 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12272
12273         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12274
12275 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12276
12277         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12278         m_enum_value to 0 in default constructor.
12279
12280 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12281
12282         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12283         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12284         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12285         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12286         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12287         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12288         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12289         IS_STORE_CONDITIONAL_INSN.
12290
12291 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12292
12293         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12294
12295 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12296
12297         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12298
12299 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12300
12301         * dwarf2read.c (skip_one_die, read_attribute_value)
12302         (dwarf2_const_value_attr, dump_die_shallow)
12303         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12304         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12305
12306 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12307
12308         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12309         (dwarf_parse_macro_header): Accept DWARF version 5.
12310         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12311
12312 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12313
12314         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12315         DW_AT_GNU_*.
12316         * common/common-exceptions.h (enum errors): Likewise.
12317         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12318         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12319         (dwarf_expr_context::execute_stack_op): Likewise.
12320         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12321         Likewise.
12322         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12323         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12324         (show_entry_values_debug, call_site_to_target_addr)
12325         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12326         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12327         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12328         (value_of_dwarf_block_entry, indirect_pieced_value)
12329         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12330         (disassemble_dwarf_expression): Likewise.
12331         * dwarf2read.c (process_die, inherit_abstract_dies)
12332         (read_call_site_scope): Likewise.
12333         * gdbtypes.h (struct func_type, struct call_site_parameter)
12334         (struct call_site): Likewise.
12335         * stack.c (read_frame_arg): Likewise.
12336         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12337
12338 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12339
12340         * defs.h (read_unsigned_leb128): New declaration.
12341         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12342         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12343         (dwarf2_find_location_expression): Call also
12344         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12345         * dwarf2loc.h (dwarf2_version): New declaration.
12346         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12347         rnglists.
12348         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12349         .debug_rnglists.
12350         (struct dwop_section_names): Add loclists_dwo.
12351         (dwop_section_names): Add .debug_loclists.dwo.
12352         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12353         (struct dwarf2_per_cu_data): Add dwarf_version.
12354         (struct dwo_sections): Add loclists.
12355         (struct attr_abbrev): Add implicit_const.
12356         (read_indirect_line_string): New declaration.
12357         (read_unsigned_leb128): Delete declaration.
12358         (rcuh_kind): New definition.
12359         (read_and_check_comp_unit_head): Change parameter
12360         is_debug_types_section to section_kind.
12361         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12362         (read_comp_unit_head): Change parameter abfd to section, add parameter
12363         section_kind.  Handle DWARF-5.
12364         (error_check_comp_unit_head): Accept also DWARF version 5.
12365         (read_and_check_comp_unit_head): Change parameter
12366         is_debug_types_section to section_kind.
12367         (read_and_check_type_unit_head): Delete function.
12368         (read_abbrev_offset): Handle DWARF-5.
12369         (create_debug_type_hash_table): Add parameter section_kind.  Process
12370         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12371         comp_unit_head.
12372         (create_debug_types_hash_table): Update create_debug_type_hash_table
12373         caller.
12374         (create_all_type_units): Call create_debug_type_hash_table.
12375         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12376         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12377         caller.
12378         (skip_one_die): Handle DW_FORM_implicit_const.
12379         (dwarf2_rnglists_process): New function.
12380         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12381         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12382         (read_attribute_value): Handle DW_FORM_implicit_const,
12383         DW_FORM_line_strp.
12384         (read_attribute): Handle DW_FORM_implicit_const.
12385         (read_indirect_string_at_offset_from): New function from
12386         read_indirect_string_at_offset.
12387         (read_indirect_string_at_offset): Call
12388         read_indirect_string_at_offset_from.
12389         (read_indirect_line_string_at_offset): New function.
12390         (read_indirect_string): New function comment.
12391         (read_indirect_line_string): New function.
12392         (read_unsigned_leb128): Make it global.
12393         (dwarf2_string_attr): Handle DWARF-5.
12394         (add_include_dir_stub, read_formatted_entries): New functions.
12395         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12396         Handle DWARF-5.
12397         (per_cu_header_read_in): Update read_comp_unit_head caller.
12398         (dwarf2_version): New function.
12399         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12400         rnglists.
12401         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12402         fields.
12403
12404 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12405
12406         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12407
12408 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12409
12410         * dwarf2read.c (dwarf2_ranges_process): New function from
12411         dwarf2_ranges_read.
12412         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12413         dwarf2_ranges_process.
12414
12415 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12416
12417         * dwarf2read.c (create_debug_type_hash_table): New function from
12418         create_debug_types_hash_table.
12419         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12420         (create_all_type_units, open_and_init_dwo_file): Update
12421         create_debug_types_hash_table callers.
12422
12423 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12424
12425         PR gdb/16188
12426         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12427         refer to 'ap', not 'args'.
12428
12429 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12430             Pedro Alves  <palves@redhat.com>
12431
12432         PR gdb/16188
12433         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12434         calls succeeded.
12435         * fork-child.c (trace_start_error): New function.
12436         (trace_start_error_with_name): Likewise.
12437         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12438         * inf-ptrace.c (inf_ptrace_me): Likewise.
12439         * inferior.h (trace_start_error): New prototype.
12440         (trace_start_error_with_name): Likewise.
12441
12442 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12443
12444         PR gdb/21164
12445         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12446         NULL before using it.
12447         * symmisc.c (maintenance_print_symbols): Likewise.
12448         (maintenance_print_msymbols): Likewise.
12449
12450 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12451
12452         * NEWS: Add record Python bindings entry.
12453
12454 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12455
12456         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12457         py-record-full.o.
12458         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12459         * python/py-record-btrace.c, python/py-record-btrace.h,
12460         python/py-record-full.c, python/py-record-full.h: New file.
12461         * python/py-record.c: Add include for py-record-btrace.h and
12462         py-record-full.h.
12463         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12464         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12465         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12466         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12467         New definition.
12468         (gdbpy_initialize_btrace): New export.
12469         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12470
12471 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12472
12473         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12474         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12475         * python/py-record.c: New file.
12476         * python/python-internal.h (gdbpy_start_recording,
12477         gdbpy_current_recording, gdpy_stop_recording,
12478         gdbpy_initialize_record): New export.
12479         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12480         (python_GdbMethods): Add gdbpy_start_recording,
12481         gdbpy_current_recording and gdbpy_stop_recording.
12482
12483 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12484
12485         * record-btrace.c (record_btrace_record_method): New function.
12486         (init_record_btrace_ops): Initialize to_record_method.
12487         * record-full.c (record_full_record_method): New function.
12488         (init_record_full_ops, init_record_full_core_ops): Add
12489         record_full_record_method.
12490         * record.h (enum record_method): New enum.
12491         * target-debug.h (target_debug_print_enum_record_method: New define.
12492         * target-delegates.c: Regenerate.
12493         * target.c (target_record_method): New function.
12494         * target.h: Include record.h.
12495         (struct target_ops) <to_record_method>: New field.
12496         (target_record_method): New export.
12497
12498 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12499
12500         * record.h (record_start, record_stop): New export.
12501         * record.c (record_start, record_stop): New function.
12502
12503 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12504
12505         * btrace.c (btrace_fetch): Copy function call segments pointer
12506         into a vector.
12507         (btrace_clear): Clear the vector.
12508         (btrace_find_insn_by_number): Use binary search to find the correct
12509         function call segment.
12510         * btrace.h (brace_fun_p): New typedef.
12511         (struct btrace_thread_info) <functions>: New field.
12512
12513 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12514
12515         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12516         * btrace.c (btrace_decode_error): ... here.  New function.
12517         * btrace.h (btrace_decode_error): New export.
12518
12519 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12520
12521         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12522         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12523         btrace_find_insn_by_number): Remove special case for gaps.
12524         * btrace.h (btrace_insn_get_error): New export.
12525         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12526         * record-btrace.c (btrace_insn_history): Print number for gaps.
12527         (record_btrace_info, record_btrace_goto): Handle gaps.
12528
12529 2017-02-14  Tom Tromey  <tom@tromey.com>
12530
12531         PR python/13598:
12532         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12533         event.
12534         * python/py-evts.c (gdbpy_initialize_py_events): Add
12535         before_prompt registry.
12536         * python/py-events.h (events_object) <before_prompt>: New field.
12537
12538 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12539
12540         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12541
12542 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12543
12544         * symfile (_initialize_symfile): Add usage text to the load command's
12545         help text.
12546
12547 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12548
12549         * utils.c (defaulted_query): Don't query on secondary UIs.
12550
12551 2017-02-10  Tom Tromey  <tom@tromey.com>
12552
12553         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12554
12555 2017-02-10  Tom Tromey  <tom@tromey.com>
12556
12557         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12558         "cleanup" local.
12559         * python/py-type.c (typy_legacy_template_argument): Remove
12560         unnecessary "cleanup" local.
12561
12562 2017-02-10  Tom Tromey  <tom@tromey.com>
12563
12564         * python/python.c (do_start_initialization): New function, from
12565         _initialize_python.
12566         (_initialize_python): Call do_start_initialization.
12567         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12568         goto.
12569
12570 2017-02-10  Tom Tromey  <tom@tromey.com>
12571
12572         * python/py-prettyprint.c (pretty_print_one_value): Use
12573         gdbpy_ref.
12574
12575 2017-02-10  Tom Tromey  <tom@tromey.com>
12576
12577         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12578         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12579         gdbpy_ref.
12580         * python/py-type.c (field_new): Use gdbpy_ref.
12581         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12582         gdbpy_ref.
12583         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12584         (py_free_pspace): Likewise.
12585         (pspace_to_pspace_object): Likewise.
12586         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12587         (py_free_objfile): Likewise.
12588         (objfile_to_objfile_object): Likewise.
12589         * python/py-inferior.c (delete_thread_object): Use
12590         gdbpy_ref.
12591         (infpy_read_memory): Likewise.
12592         (py_free_inferior): Likewise.
12593         * python/py-evtregistry.c (create_eventregistry_object): Use
12594         gdbpy_ref.
12595         * python/py-event.c (create_event_object): Use gdbpy_ref.
12596
12597 2017-02-10  Tom Tromey  <tom@tromey.com>
12598
12599         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12600         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12601         used.
12602         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12603         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12604         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12605         python/py-framefilter.c, python/py-function.c,
12606         python/py-inferior.c, python/py-infevents.c,
12607         python/py-linetable.c, python/py-newobjfileevent.c,
12608         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12609         python/py-signalevent.c, python/py-stopevent.c,
12610         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12611         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12612         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12613         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12614
12615 2017-02-10  Tom Tromey  <tom@tromey.com>
12616
12617         * ui-out.h (ui_out_emit_type): New class.
12618         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12619         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12620         and ui_out_emit_tuple.
12621         (enumerate_locals): Likewise.
12622         (py_mi_print_variables, py_print_locals, py_print_args): Use
12623         ui_out_emit_list.
12624         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12625         ui_out_emit_list.
12626         * common/gdb_optional.h: New file.
12627
12628 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12629
12630         * MAINTAINERS (Write After Approval): Update my e-mail address.
12631
12632 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12633
12634         PR gdb/21122
12635         * breakpoint.c (_initialize_breakpoint): Update the help description
12636         of the 'commands' command to indicate that it takes a list argument.
12637
12638 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12639
12640         * interps.c (current_interp_set_logging): Remove "return".
12641
12642 2017-02-09  Gary Benson  <gbenson@redhat.com>
12643
12644         * symtab.c (add_symtab_completions): Prevent NULL pointer
12645         dereference.
12646
12647 2017-02-08  Pedro Alves  <palves@redhat.com>
12648
12649         * interps.c (interp::interp): Remove reference to quiet_p.
12650         (interp_set): Make static.  Remove dead "Switching to" output
12651         code.
12652         (interp_quiet_p, interp_set_quiet): Delete.
12653         (interpreter_exec_cmd): Don't set the interpreter quiet.
12654         * interps.h (interp_quiet_p): Make static.
12655         (class interp) <quiet_p>: Remove field
12656
12657 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12658
12659         * cli/cli-decode.c (find_command_name_length): Make it extern.
12660         * cli/cli-decode.h (find_command_name_length): Declare.
12661         * cli/cli-script.c (command_name_equals, line_first_arg):
12662         New functions.
12663         (process_next_line): Use cli-decode to parse command names.
12664         (build_command_line): Make args a constant pointer.
12665
12666 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12667
12668         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12669         Remove case-insensitive search.
12670
12671 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12672
12673         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12674         at the end of the line.  Avoids an ARI warning.
12675
12676 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12677
12678         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12679         rdseed instructions.
12680         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12681
12682 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12683
12684         PR tdep/20936
12685         Provide and use sparc32 and sparc64 target description XML files.
12686         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12687         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12688         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12689         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12690         * features/sparc/sparc32-solaris.xml: New file.
12691         * features/sparc/sparc64-solaris.xml: New file.
12692         * features/sparc/sparc32-solaris.c: Generated.
12693         * features/sparc/sparc64-solaris.c: Generated.
12694         * sparc-tdep.h: Account for differences in target descriptions.
12695         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12696         (sparc32_register_type): Use target provided registers.
12697         (validate_tdesc_registers): New function.
12698         (sparc32_gdbarch_init): Use tdesc_has_registers.
12699         Set pseudoregister functions.
12700         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12701         (sparc64_register_type): Use target provided registers.
12702         (sparc64_init_abi): Set pseudoregister functions.
12703
12704 2017-02-03  Tom Tromey  <tom@tromey.com>
12705
12706         PR rust/21097:
12707         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12708         with a single member.
12709
12710 2017-02-03  Pedro Alves  <palves@redhat.com>
12711
12712         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12713         (cli_interp_base::~cli_interp_base): New.
12714         (cli_interp): New struct.
12715         (as_cli_interp): Cast the interp itself to cli_interp.
12716         (cli_interpreter_pre_command_loop): Rename to ...
12717         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12718         parameter.
12719         (cli_interpreter_init): Rename to ...
12720         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12721         boolean.  Make extern.
12722         (cli_interpreter_resume): Rename to ...
12723         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12724         extern.
12725         (cli_interpreter_suspend): Rename to ...
12726         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12727         extern.
12728         (cli_interpreter_exec): Rename to ...
12729         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12730         extern.
12731         (cli_interpreter_supports_command_editing): Rename to ...
12732         (cli_interp_base::supports_command_editing): ... this.  Remove
12733         'interp' parameter.  Make extern.
12734         (cli_ui_out): Rename to ...
12735         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12736         Make extern.
12737         (cli_set_logging): Rename to ...
12738         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12739         parameter.  Make extern.
12740         (cli_interp_procs): Delete.
12741         (cli_interp_factory): Adjust to use "new".
12742         * cli/cli-interp.h: Include "interps.h".
12743         (struct cli_interp_base): New struct.
12744         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12745         (interp_new): Delete.
12746         (interp::interp, interp::~interp): New.
12747         (interp_set): Use bool, and return void.  Assume the interpreter
12748         has suspend, init and resume methods, and that the all return
12749         void.
12750         (set_top_level_interpreter): interp_set returns void.
12751         (interp_ui_out): Adapt.
12752         (current_interp_set_logging): Adapt.
12753         (interp_data): Delete.
12754         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12755         (interp_exec): Adapt.
12756         (top_level_interpreter_data): Delete.
12757         * interps.h (interp_init_ftype, interp_resume_ftype)
12758         (interp_suspend_ftype, interp_exec_ftype)
12759         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12760         (class interp): New.
12761         (interp_new): Delete.
12762         (interp_set): Now returns void.  Use bool.
12763         (interp_data, top_level_interpreter_data): Delete.
12764         * mi/mi-common.h: Include interps.h.
12765         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12766         init, resume, suspect, exec, interp_ui_out, set_logging and
12767         pre_command_loop methods.
12768         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12769         (mi_interpreter_init): Rename to ...
12770         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12771         bool, return void and make extern.  Adjust.
12772         (mi_interpreter_resume): ... Rename to ...
12773         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12774         return void and make extern.  Adjust.
12775         (mi_interpreter_suspend): ... Rename to ...
12776         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12777         return void and make extern.  Adjust.
12778         (mi_interpreter_exec): ... Rename to ...
12779         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12780         extern.  Adjust.
12781         (mi_interpreter_pre_command_loop): ... Rename to ...
12782         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12783         parameter and make extern.
12784         (mi_on_normal_stop_1): Adjust.
12785         (mi_ui_out): Rename to ...
12786         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12787         parameter and make extern.  Adjust.
12788         (mi_set_logging): Rename to ...
12789         (mi_interp::set_logging): ... this.  Remove the 'interp'
12790         parameter and make extern.  Adjust.
12791         (mi_interp_procs): Delete.
12792         (mi_interp_factory): Adjust to use 'new'.
12793         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12794         (mi_print_exception, mi_execute_command, mi_load_progress):
12795         Adjust.
12796         * tui/tui-interp.c (tui_interp): New class.
12797         (as_tui_interp): Return a tui_interp pointer.
12798         (tui_on_normal_stop, tui_on_signal_received)
12799         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12800         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12801         to use interp::interp_ui_out.
12802         (tui_init): Rename to ...
12803         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12804         bool, return void and make extern.  Adjust.
12805         (tui_resume): Rename to ...
12806         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12807         return void and make extern.  Adjust.
12808         (tui_suspend): Rename to ...
12809         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12810         return void and make extern.  Adjust.
12811         (tui_ui_out): Rename to ...
12812         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12813         parameter, and make extern.  Adjust.
12814         (tui_exec): Rename to ...
12815         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12816         make extern.
12817         (tui_interp_procs): Delete.
12818         (tui_interp_factory): Use "new".
12819
12820 2017-02-02  Tom Tromey  <tom@tromey.com>
12821
12822         * rust-exp.y (ends_raw_string, space_then_number)
12823         (rust_identifier_start_p): Return bool.
12824         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12825         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12826         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12827         (rust_chartype_p): Return bool.
12828         (val_print_struct, rust_print_struct_def, rust_print_type):
12829         Update.
12830         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12831         Return bool.
12832
12833 2017-02-02  Tom Tromey  <tom@tromey.com>
12834
12835         * rust-lang.c: Reindent.
12836
12837 2017-02-02  Tom Tromey  <tom@tromey.com>
12838
12839         * rust-lang.h (rust_crate_for_block): Update.
12840         * rust-lang.c (rust_crate_for_block): Return std::string.
12841         (rust_get_disr_info): Use std:;string, not
12842         gdb::unique_xmalloc_ptr.
12843         * rust-exp.y (crate_name): Update.
12844
12845 2017-02-02  Pedro Alves  <palves@redhat.com>
12846
12847         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12848         field out of gdb_disassembler_test and make it static.
12849
12850 2017-02-02  Pedro Alves  <palves@redhat.com>
12851
12852         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12853         mi1_interp and mi_interp fields.
12854
12855 2017-02-02  Pedro Alves  <palves@redhat.com>
12856
12857         * cli/cli-interp.c (struct saved_output_files, saved_output):
12858         Moved from cli/cli-logging.c.
12859         (cli_set_logging): New function.
12860         (cli_interp_procs): Install cli_set_logging.
12861         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12862         Declare.
12863         * cli/cli-logging.c (struct saved_output_files, saved_output):
12864         Moved to cli/cli-interp.c.
12865         (pop_output_files): Don't save outputs here.
12866         (make_logging_output): New function.
12867         (handle_redirections): Don't build tee nor save previous outputs
12868         here.
12869         * interps.c (current_interp_set_logging): Change prototype.
12870         Assume there's always a set_logging_proc method installed.
12871         * interps.h (interp_set_logging_ftype): Change prototype.
12872         (current_interp_set_logging): Change prototype and adjust comment.
12873         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12874         use make_logging_output.
12875         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12876 2017-02-02  Pedro Alves  <palves@redhat.com>
12877
12878         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12879         from ...
12880         (set_logging_overwrite): ... here.
12881         (logging_no_redirect_file): Delete.
12882         (set_logging_redirect): Don't handle redirection on the fly.
12883         Instead warn that "logging off" / "logging on" is necessary.
12884         (pop_output_files): Delete references to logging_no_redirect_file.
12885         (show_logging_command): Always speak in terms of what will happen
12886         once logging is reenabled.
12887
12888 2017-02-02  Pedro Alves  <palves@redhat.com>
12889
12890         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12891
12892 2017-02-02  Pedro Alves  <palves@redhat.com>
12893
12894         * disasm.c (gdb_pretty_print_insn): Rename to ...
12895         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12896         Remove gdbarch parameter.  Adapt to clear the object's buffers
12897         instead of allocating new buffers, and to print using the object's
12898         gdb_disassembler instead of calling gdb_print_insn.
12899         (dump_insns): Use gdb_pretty_print_disassembler.
12900         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12901         (gdb_pretty_print_disassembler): New class.
12902         * record-btrace.c (btrace_insn_history): Use
12903         gdb_pretty_print_disassembler.
12904
12905 2017-02-02  Pedro Alves  <palves@redhat.com>
12906
12907         * ada-lang.c (type_as_string): Use string_file.
12908         * ada-valprint.c (ada_print_floating): Use string_file.
12909         * ada-varobj.c (ada_varobj_scalar_image)
12910         (ada_varobj_get_value_image): Use string_file.
12911         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12912         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12913         * breakpoint.c (update_inserted_breakpoint_locations)
12914         (insert_breakpoint_locations, reattach_breakpoints)
12915         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12916         (print_it_watchpoint): Use string_file.
12917         (save_breakpoints): Use stdio_file.
12918         * c-exp.y (oper): Use string_file.
12919         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12920         tee_file.
12921         (pop_output_files): Use delete.
12922         (handle_redirections): Use stdio_file and tee_file.
12923         * cli/cli-setshow.c (do_show_command): Use string_file.
12924         * compile/compile-c-support.c (c_compute_program): Use
12925         string_file.
12926         * compile/compile-c-symbols.c (generate_vla_size): Take a
12927         'string_file &' instead of a 'ui_file *'.
12928         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12929         of a 'ui_file *'.  Use string_file.
12930         (generate_c_for_variable_locations): Take a 'string_file &'
12931         instead of a 'ui_file *'.
12932         * compile/compile-internal.h (generate_c_for_for_one_variable):
12933         Take a 'string_file &' instead of a 'ui_file *'.
12934         * compile/compile-loc2c.c (push, pushf, unary, binary)
12935         (print_label, pushf_register_address, pushf_register)
12936         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12937         'ui_file *'.  Adjust.
12938         * compile/compile.c (compile_to_object): Use string_file.
12939         * compile/compile.h (compile_dwarf_expr_to_c)
12940         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12941         'ui_file *'.
12942         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12943         (replace_typedefs_qualified_name): Use string_file and
12944         obstack_copy0.
12945         * disasm.c (gdb_pretty_print_insn): Use string_file.
12946         (gdb_disassembly): Adjust reference the null_stream global.
12947         (do_ui_file_delete): Delete.
12948         (gdb_insn_length): Use null_stream.
12949         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12950         * dwarf2loc.c (dwarf2_compile_property_to_c)
12951         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12952         'string_file &' instead of a 'ui_file *'.
12953         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12954         * dwarf2read.c (do_ui_file_peek_last): Delete.
12955         (dwarf2_compute_name): Use string_file.
12956         * event-top.c (gdb_setup_readline): Use stdio_file.
12957         * gdbarch.sh (verify_gdbarch): Use string_file.
12958         * gdbtypes.c (safe_parse_type): Use null_stream.
12959         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12960         string_file.
12961         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12962         'string_file *' instead of a 'ui_file *'.
12963         (gdbscm_arch_disassemble): Use string_file.
12964         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12965         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12966         inherits from ui_file.
12967         (ioscm_file_port_delete, ioscm_file_port_rewind)
12968         (ioscm_file_port_put): Delete.
12969         (ioscm_file_port_write): Rename to ...
12970         (ioscm_file_port::write): ... this.  Remove file_port_magic
12971         checks.
12972         (ioscm_file_port_new): Delete.
12973         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12974         ui_file_up.
12975         * guile/scm-type.c (tyscm_type_name): Use string_file.
12976         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12977         Use string_file.
12978         * infcmd.c (print_return_value_1): Use string_file.
12979         * infrun.c (print_target_wait_results): Use string_file.
12980         * language.c (add_language): Use string_file.
12981         * location.c (explicit_to_string_internal): Use string_file.
12982         * main.c (captured_main_1): Use null_file.
12983         * maint.c (maintenance_print_architecture): Use stdio_file.
12984         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12985         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12986         event_channel>: Change type to mi_console_file pointer.
12987         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12988         (mi_console_file_delete): Delete.
12989         (struct mi_console_file): Delete.
12990         (mi_console_file_magic): Delete.
12991         (mi_console_file_new): Delete.
12992         (mi_console_file::mi_console_file): New.
12993         (mi_console_file_delete): Delete.
12994         (mi_console_file_fputs): Delete.
12995         (mi_console_file::write): New.
12996         (mi_console_raw_packet): Delete.
12997         (mi_console_file::flush): New.
12998         (mi_console_file_flush): Delete.
12999         (mi_console_set_raw): Rename to ...
13000         (mi_console_file::set_raw): ... this.
13001         * mi/mi-console.h (class mi_console_file): New class.
13002         (mi_console_file_new, mi_console_set_raw): Delete.
13003         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13004         (mi_set_logging): Use delete and tee_file.  Adjust.
13005         * mi/mi-main.c (output_register): Use string_file.
13006         (mi_cmd_data_evaluate_expression): Use string_file.
13007         (mi_cmd_data_read_memory): Use string_file.
13008         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13009         * mi/mi-out.c (mi_ui_out::main_stream): New.
13010         (mi_ui_out::rewind): Use main_stream and
13011         string_file.
13012         (mi_ui_out::put): Use main_stream and string_file.
13013         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13014         Allocate a 'string_file' instead.
13015         (mi_out_new): Don't allocate a mem_fileopen stream here.
13016         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13017         (mi_ui_out::main_stream): Declare method.
13018         * printcmd.c (eval_command): Use string_file.
13019         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13020         * python/py-arch.c (archpy_disassemble): Use string_file.
13021         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13022         * python/py-frame.c (frapy_str): Use string_file.
13023         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13024         Use string_file.
13025         * python/py-type.c (typy_str): Use string_file.
13026         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13027         * python/py-value.c (valpy_str): Use string_file.
13028         * record-btrace.c (btrace_insn_history): Use string_file.
13029         * regcache.c (regcache_print): Use stdio_file.
13030         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13031         * remote.c (escape_buffer): Use string_file.
13032         * rust-lang.c (rust_get_disr_info): Use string_file.
13033         * serial.c (serial_open_ops_1): Use stdio_file.
13034         (do_serial_close): Use delete.
13035         * stack.c (print_frame_arg): Use string_file.
13036         (print_frame_args): Remove local mem_fileopen stream, not used.
13037         (print_frame): Use string_file.
13038         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13039         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13040         Take a 'string_file *' instead of a 'ui_file *'.
13041         * top.c (new_ui): Use stdio_file and stderr_file.
13042         (free_ui): Use delete.
13043         (execute_command_to_string): Use string_file.
13044         (quit_confirm): Use string_file.
13045         * tracepoint.c (collection_list::append_exp): Use string_file.
13046         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13047         * tui/tui-file.c: Don't include "ui-file.h".
13048         (enum streamtype, struct tui_stream): Delete.
13049         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13050         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13051         (tui_file::tui_file): New method.
13052         (tui_file_fputs): Delete.
13053         (tui_file_get_strbuf): Delete.
13054         (tui_file::puts): New method.
13055         (tui_file_adjust_strbuf): Delete.
13056         (tui_file_flush): Delete.
13057         (tui_file::flush): New method.
13058         * tui/tui-file.h: Tweak intro comment.
13059         Include ui-file.h.
13060         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13061         (tui_file_adjust_strbuf): Delete declarations.
13062         (class tui_file): New class.
13063         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13064         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13065         (tui_register_format): Use string_stream.
13066         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13067         (tui_get_function_from_frame): Use string_file.
13068         * typeprint.c (type_to_string): Use string_file.
13069         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13070         (null_stream): New global.
13071         (ui_file_delete): Delete.
13072         (ui_file::ui_file): New.
13073         (null_file_isatty): Delete.
13074         (ui_file::~ui_file): New.
13075         (null_file_rewind): Delete.
13076         (ui_file::printf): New.
13077         (null_file_put): Delete.
13078         (null_file_flush): Delete.
13079         (ui_file::putstr): New.
13080         (null_file_write): Delete.
13081         (ui_file::putstrn): New.
13082         (null_file_read): Delete.
13083         (ui_file::putc): New.
13084         (null_file_fputs): Delete.
13085         (null_file_write_async_safe): Delete.
13086         (ui_file::vprintf): New.
13087         (null_file_delete): Delete.
13088         (null_file::write): New.
13089         (null_file_fseek): Delete.
13090         (null_file::puts): New.
13091         (ui_file_data): Delete.
13092         (null_file::write_async_safe): New.
13093         (gdb_flush, ui_file_isatty): Adjust.
13094         (ui_file_put, ui_file_rewind): Delete.
13095         (ui_file_write): Adjust.
13096         (ui_file_write_for_put): Delete.
13097         (ui_file_write_async_safe, ui_file_read): Adjust.
13098         (ui_file_fseek): Delete.
13099         (fputs_unfiltered): Adjust.
13100         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13101         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13102         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13103         (set_ui_file_data): Delete.
13104         (string_file::~string_file, string_file::write)
13105         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13106         (do_ui_file_as_string, ui_file_as_string): Delete.
13107         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13108         (struct mem_file): Delete.
13109         (mem_file_new): Delete.
13110         (stdio_file::stdio_file): New.
13111         (mem_file_delete): Delete.
13112         (stdio_file::stdio_file): New.
13113         (mem_fileopen): Delete.
13114         (stdio_file::~stdio_file): New.
13115         (mem_file_rewind): Delete.
13116         (stdio_file::set_stream): New.
13117         (mem_file_put): Delete.
13118         (stdio_file::open): New.
13119         (mem_file_write): Delete.
13120         (stdio_file_magic, struct stdio_file): Delete.
13121         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13122         (stdio_file::flush): New.
13123         (stdio_file_read): Rename to ...
13124         (stdio_file::read): ... this.  Adjust.
13125         (stdio_file_write): Rename to ...
13126         (stdio_file::write): ... this.  Adjust.
13127         (stdio_file_write_async_safe): Rename to ...
13128         (stdio_file::write_async_safe) ... this.  Adjust.
13129         (stdio_file_fputs): Rename to ...
13130         (stdio_file::puts) ... this.  Adjust.
13131         (stdio_file_isatty): Delete.
13132         (stdio_file_fseek): Delete.
13133         (stdio_file::isatty): New.
13134         (stderr_file_write): Rename to ...
13135         (stderr_file::write) ... this.  Adjust.
13136         (stderr_file_fputs): Rename to ...
13137         (stderr_file::puts) ... this.  Adjust.
13138         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13139         (stderr_file::stderr_file): New.
13140         (tee_file_magic): Delete.
13141         (struct tee_file): Delete.
13142         (tee_file::tee_file): New.
13143         (tee_file_new): Delete.
13144         (tee_file::~tee_file): New.
13145         (tee_file_delete): Delete.
13146         (tee_file_flush): Rename to ...
13147         (tee_file::flush): ... this.  Adjust.
13148         (tee_file_write): Rename to ...
13149         (tee_file::write): ... this.  Adjust.
13150         (tee_file::write_async_safe): New.
13151         (tee_file_fputs): Rename to ...
13152         (tee_file::puts): ... this.  Adjust.
13153         (tee_file_isatty): Rename to ...
13154         (tee_file::isatty): ... this.  Adjust.
13155         * ui-file.h (struct obstack, struct ui_file): Don't
13156         forward-declare.
13157         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13158         (ui_file_write_ftype)
13159         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13160         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13161         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13162         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13163         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13164         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13165         (set_ui_file_fseek): Delete.
13166         (ui_file_data, ui_file_delete, ui_file_rewind)
13167         (struct ui_file): New.
13168         (ui_file_up): New.
13169         (class null_file): New.
13170         (null_stream): Declare.
13171         (ui_file_write_for_put, ui_file_put): Delete.
13172         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13173         Delete.
13174         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13175         (gdb_fopen, tee_file_new): Delete.
13176         (struct string_file): New.
13177         (struct stdio_file): New.
13178         (stdio_file_up): New.
13179         (struct stderr_file): New.
13180         (class tee_file): New.
13181         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13182         of a 'ui_file *'.  Adjust.
13183         * ui-out.h (class ui_out) <field_stream>: Likewise.
13184         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13185         (null_stream): Delete.
13186         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13187         Adjust.
13188         * utils.h (struct ui_file): Delete forward declaration..
13189         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13190         (error_stream): Take a 'string_file &' instead of a
13191         'ui_file *'.
13192         * varobj.c (varobj_value_get_print_value): Use string_file.
13193         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13194         * gdbarch.c: Regenerate.
13195
13196 2017-02-02  Pedro Alves  <palves@redhat.com>
13197
13198         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13199         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13200         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13201         Adjust to call gdb_print_insn instead of
13202         gdb_disassembler::print_insn.
13203         (dump_insns, do_mixed_source_and_assembly_deprecated)
13204         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13205         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13206         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13207         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13208         declaration.
13209         (gdb_pretty_print_insn): Re-add declaration.
13210         * record-btrace.c (btrace_insn_history): Don't allocate a
13211         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13212
13213 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13214
13215         * disasm.h (gdb_disassembly): Remove file_string parameter.
13216         * disasm.c (gdb_disassembly): Likewise.
13217         * cli/cli-cmds.c (print_disassembly): Adapt.
13218         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13219         * stack.c (do_gdb_disassembly): Likewise.
13220
13221 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13222
13223         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13224         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13225         targets.  And if the implicit value is longer than needed, extract
13226         the first bytes instead of the "least significant" ones.
13227
13228 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13229
13230         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13231         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13232         (btrace_fetch): Assert can_access_registers_ptid.
13233         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13234         validate_registers_access.
13235
13236 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13237
13238         * gdbthread.h (can_access_registers_ptid): New.
13239         * thread.c (can_access_registers_ptid): New.
13240
13241 2017-02-01  Pedro Alves  <palves@redhat.com>
13242
13243         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13244
13245 2017-01-31  Pedro Alves  <palves@redhat.com>
13246
13247         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13248         Fix typos.
13249
13250 2017-01-31  Pedro Alves  <palves@redhat.com>
13251
13252         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13253         not used.
13254
13255 2017-01-31  Pedro Alves  <palves@redhat.com>
13256
13257         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13258
13259 2017-01-31  Pedro Alves  <palves@redhat.com>
13260
13261         * common/scoped_restore.h
13262         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13263         change the value's parameter type to T2.
13264         (make_scoped_restore): Likewise.
13265
13266 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13267             Richard Henderson  <rth@redhat.com>
13268
13269         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13270         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13271         GS_BASE for older kernels.
13272         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13273         GS_BASE for older kernels.
13274         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13275         and GS_BASE to the offset table.
13276         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13277         system register group.
13278         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13279         for older kernels.
13280         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13281         amd64 ABI.
13282         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13283         AMD64_GSBASE_REGNUM.
13284         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13285         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13286         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13287         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13288         i386/64bit-segments.xml in those rules.
13289         * features/i386/64bit-segments.xml: New file.
13290         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13291         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13292         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13293         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13294         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13295         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13296         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13297         * features/i386/amd64-avx-linux.c: Regenerated.
13298         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13299         * features/i386/amd64-avx-mpx.c: Regenerated.
13300         * features/i386/amd64-avx512-linux.c: Regenerated.
13301         * features/i386/amd64-linux.c: Regenerated.
13302         * features/i386/amd64-mpx-linux.c: Regenerated.
13303         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13304         * features/i386/i386-avx-mpx.c: Regenerated.
13305         * features/i386/x32-avx-linux.c: Regenerated.
13306         * features/i386/x32-avx512-linux.c: Regenerated.
13307         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13308         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13309         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13310         * regformats/i386/amd64-linux.dat: Regenerated.
13311         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13312         * regformats/i386/x32-avx-linux.dat: Regenerated.
13313         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13314         * regformats/i386/x32-linux.dat: Regenerated.
13315
13316 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13317
13318         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13319         Set to AMD64_NUM_REGS.
13320
13321 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13322
13323         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13324         that checks validity of a register number.
13325
13326 2017-01-27  Kees Cook  <keescook@google.com>
13327
13328         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13329         fetch_fpregs if target has fpa registers.
13330         (arm_linux_store_inferior_registers): Call store_fpregs if target
13331         has fpa registers.
13332
13333 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13334
13335         * cris-tdep.c (cris_gdbarch_init): Remove check for
13336         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13337
13338 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13339
13340         * corelow.c (get_core_register_section): Check for regset
13341         existence before checking for REGSET_VARIABLE_SIZE.
13342
13343 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13344             Pedro Alves  <palves@redhat.com>
13345
13346         PR gdb/20939
13347         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13348         call memory_error, save memaddr instead.
13349         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13350         negative, cal memory_error.
13351         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13352
13353 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13354
13355         * disasm-selftests.c (memory_error_test): New function.
13356         (_initialize_disasm_selftests): Register memory_error_test.
13357
13358 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13359
13360         * Makefile.in (SFILES): Add disasm-selftests.c and
13361         selftest-arch.c.
13362         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13363         * disasm-selftests.c: New file.
13364         * selftest-arch.c: New file.
13365         * selftest-arch.h: New file.
13366
13367 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13368
13369         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13370         to bfd_arch_mep.  Don't return 0 if section is not
13371         found.  Call print_insn_mep.
13372
13373 2017-01-26  Pedro Alves  <palves@redhat.com>
13374             Yao Qi  <yao.qi@linaro.org>
13375
13376         * arm-tdep.c: Include "disasm.h".
13377         (gdb_print_insn_arm): Update code to get gdbarch.
13378         * disasm.c (dis_asm_read_memory): Change it to
13379         gdb_disassembler::dis_asm_read_memory.
13380         (dis_asm_memory_error): Likewise.
13381         (dis_asm_print_address): Likewise.
13382         (gdb_pretty_print_insn): Change it to
13383         gdb_disassembler::pretty_print_insn.
13384         (dump_insns): Add one argument gdb_disassemlber.  All
13385         callers updated.
13386         (do_mixed_source_and_assembly_deprecated): Likewise.
13387         (do_mixed_source_and_assembly): Likewise.
13388         (do_assembly_only): Likewise.
13389         (gdb_disassembler::gdb_disassembler): New.
13390         (gdb_disassembler::print_insn): New.
13391         * disasm.h (class gdb_disassembler): New.
13392         (gdb_pretty_print_insn): Remove declaration.
13393         (gdb_disassemble_info): Likewise.
13394         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13395         (gdbscm_disasm_read_memory_worker): Update.
13396         (gdbscm_disasm_read_memory): Update.
13397         (gdbscm_disasm_memory_error): Remove.
13398         (gdbscm_disasm_print_address): Remove.
13399         (gdbscm_disassembler::gdbscm_disassembler): New.
13400         (gdbscm_print_insn_from_port): Update.
13401         * mips-tdep.c: Include disasm.h.
13402         (gdb_print_insn_mips): Update code to get gdbarch.
13403         * record-btrace.c (btrace_insn_history): Update.
13404         * spu-tdep.c: Include disasm.h.
13405         (struct spu_dis_asm_data): Remove.
13406         (struct spu_dis_asm_info): New.
13407         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13408         SPU id.
13409         (gdb_print_insn_spu): Cast disassemble_info to
13410         spu_dis_asm_info.
13411
13412 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13413
13414         * disasm.c (do_ui_file_delete): Delete.
13415         (gdb_insn_length): Move code creating stream to ...
13416         * utils.c (null_stream): ... here.  New function.
13417         * utils.h (null_stream): Declare.
13418
13419 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13420
13421         * python/py-inferior.c (find_thread_object): Return directly
13422         from the loop.  Remove "found" variable.
13423
13424 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13425
13426         GDB 7.12.1 released.
13427
13428 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13429
13430         * python/py-function.c (fnpy_call): Reorder declarations to have
13431         the gdbpy_enter object declared first.
13432         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13433
13434 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13435
13436         PR python/21068
13437         * python/python-internal.h (PyMem_RawMalloc): Define for
13438         Python < 3.4.
13439         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13440         PyMem_RawMalloc instead of PyMem_Malloc.
13441
13442 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13443             Luis Machado  <lgustavo@codesourcery.com>
13444
13445         * NEWS (New commands): Mention flash-erase.
13446         (New MI commands): Mention target-flash-erase.
13447         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13448         command.
13449         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13450         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13451         * target.c (flash_erase_command): New function.
13452         (initialize_targets): Add new flash-erase command.
13453         * target.h (flash_erase_command): New declaration.
13454
13455 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13456
13457         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13458         HAVE_SYS_PROCFS_H is defined.
13459
13460 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13461
13462         * remote.c (struct cached_reg): Change data into a pointer.
13463         * (stop_reply_dtr): Free data pointers before deleting vector.
13464         (process_stop_reply): Likewise.
13465         (remote_parse_stop_reply): Allocate space for data
13466
13467 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13468
13469         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13470         MAX_REGISTER_SIZE.
13471         (amd64_pseudo_register_read_value): Likewise.
13472         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13473         (store_register_using_P): Likewise.
13474         * regcache.c (regcache_xfer_part): Likewise.
13475
13476 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13477
13478         Split real and pseudo registers.
13479         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13480         (sparc32_pseudo_regnum): New enum.
13481         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13482         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13483         (SPARC32_CP0_REGISTERS): New macro.
13484         (sparc32_pseudo_register_name): New function.
13485         (sparc32_register_name): Use sparc32_pseudo_register_name.
13486         (sparc32_pseudo_register_type): New function.
13487         (sparc32_register_type): Use sparc32_pseudo_register_type.
13488         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13489         pseudo register numbers.
13490         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13491         (SPARC64_CP0_REGISTERS): New macro.
13492         (sparc64_pseudo_register_name): New function.
13493         (sparc64_register_name): Use sparc64_pseudo_register_name.
13494         (sparc64_pseudo_register_type): New function.
13495         (sparc64_register_type): Use sparc64_pseudo_register_type.
13496         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13497         pseudo register numbers.
13498         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13499         sparc64_store_arguments): Handle pseudo register numbers.
13500
13501 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13502
13503         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13504         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13505         output.
13506         (getpkt_or_notif_sane_1): Likewise.
13507
13508 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13509
13510         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13511         of CC.  Pass "-x c++-header" instead of "-x c".
13512
13513 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13514
13515         * remote.c (remote_can_async_p): Update comment.
13516
13517 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13518
13519         * linux-nat.c (linux_nat_can_async_p): Update comment.
13520
13521 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13522
13523         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13524
13525 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13526
13527         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13528
13529 2017-01-10  Tom Tromey  <tom@tromey.com>
13530
13531         * python/py-type.c (typy_legacy_template_argument): Update.
13532         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13533         ~demangle_parse_info): Declare new members.
13534         (cp_demangled_name_to_comp): Return unique_ptr.
13535         (cp_demangled_name_parse_free)
13536         (make_cleanup_cp_demangled_name_parse_free)
13537         (cp_new_demangle_parse_info): Remove.
13538         * cp-support.c (do_demangled_name_parse_free_cleanup)
13539         (make_cleanup_cp_demangled_name_parse_free): Remove.
13540         (inspect_type, cp_canonicalize_string_full)
13541         (cp_canonicalize_string): Update.
13542         (mangled_name_to_comp): Change return type.
13543         (cp_class_name_from_physname, method_name_from_physname)
13544         (cp_func_name, cp_remove_params): Update.
13545         * cp-name-parser.y (demangle_parse_info): New constructor, from
13546         cp_new_demangle_parse_info.
13547         (~demangle_parse_info): New destructor, from
13548         cp_demangled_name_parse_free.
13549         (cp_merge_demangle_parse_infos): Update.
13550         (cp_demangled_name_to_comp): Change return type.
13551
13552 2017-01-10  Tom Tromey  <tom@tromey.com>
13553
13554         * top.c (prevent_dont_repeat): Change return type.
13555         * python/python.c (execute_gdb_command): Use std::string.
13556         Update.
13557         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13558         * command.h (prevent_dont_repeat): Change return type.
13559         * breakpoint.c (bpstat_do_actions_1): Update.
13560
13561 2017-01-10  Tom Tromey  <tom@tromey.com>
13562
13563         * value.h (scoped_value_mark::~scoped_value_mark): Call
13564         free_to_mark.
13565         (scoped_value_mark::free_to_mark): New method.
13566         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13567         scoped_value_mark.
13568
13569 2017-01-10  Tom Tromey  <tom@tromey.com>
13570
13571         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13572         (valpy_reference_value, valpy_const_value, valpy_get_address)
13573         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13574         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13575         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13576         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13577         scoped_value_mark.
13578         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13579         * value.h (scoped_value_mark): New class.
13580
13581 2017-01-10  Tom Tromey  <tom@tromey.com>
13582
13583         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13584         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13585         * psymtab.c (discard_psymtabs_upto): Remove.
13586         (make_cleanup_discard_psymtabs): Remove.
13587         (struct psymtab_state): Remove.
13588
13589 2017-01-10  Tom Tromey  <tom@tromey.com>
13590
13591         * record-full.c (record_full_save_cleanups): Remove.
13592         (record_full_save): Use gdb::unlinker.
13593         * gcore.c (do_bfd_delete_cleanup): Remove.
13594         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13595         cleanups.
13596         * dwarf2read.c (unlink_if_set): Remove.
13597         (write_psymtabs_to_index): Use gdb::unlinker.
13598         * common/gdb_unlinker.h: New file.
13599
13600 2017-01-10  Tom Tromey  <tom@tromey.com>
13601
13602         * windows-tdep.c (windows_xfer_shared_library): Update.
13603         * windows-nat.c (windows_make_so): Update.
13604         * utils.h (make_cleanup_bfd_unref): Remove.
13605         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13606         * symfile.h (symfile_bfd_open)
13607         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13608         * symfile.c (read_symbols, symbol_file_add)
13609         (separate_debug_file_exists): Update.
13610         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13611         (generic_load, reread_symbols): Update.
13612         * symfile-mem.c (symbol_file_add_from_memory): Update.
13613         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13614         (spu_symbol_file_add_from_memory): Update.
13615         * solist.h (struct target_so_ops) <bfd_open>: Return
13616         gdb_bfd_ref_ptr.
13617         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13618         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13619         gdb_bfd_ref_ptr.
13620         (solib_map_sections, reload_shared_libraries_1): Update.
13621         * solib-svr4.c (enable_break): Update.
13622         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13623         * solib-frv.c (enable_break2): Update.
13624         * solib-dsbt.c (enable_break): Update.
13625         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13626         gdb_bfd_ref_ptr.
13627         (darwin_solib_get_all_image_info_addr_at_init): Update.
13628         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13629         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13630         * record-full.c (record_full_save): Update.
13631         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13632         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13633         * minidebug.c (find_separate_debug_file_in_section): Return
13634         gdb_bfd_ref_ptr.
13635         * machoread.c (macho_add_oso_symfile): Change abfd to
13636         gdb_bfd_ref_ptr.
13637         (macho_symfile_read_all_oso): Update.
13638         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13639         (macho_symfile_read): Update.
13640         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13641         (jit_bfd_try_read_symtab): Update.
13642         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13643         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13644         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13645         gdb_bfd_ref_ptr.
13646         (gdb_bfd_ref_policy): New struct.
13647         (gdb_bfd_ref_ptr): New typedef.
13648         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13649         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13650         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13651         gdb_bfd_ref_ptr.
13652         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13653         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13654         (gcore_command): Update.
13655         * exec.c (exec_file_attach): Update.
13656         * elfread.c (elf_symfile_read): Update.
13657         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13658         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13659         (open_and_init_dwo_file): Update.
13660         (open_dwp_file): Return gdb_bfd_ref_ptr.
13661         (open_and_init_dwp_file): Update.
13662         * corelow.c (core_open): Update.
13663         * compile/compile-object-load.c (compile_object_load): Update.
13664         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13665         * coffread.c (coff_symfile_read): Update.
13666         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13667         gdb_bfd_ref_ptr.  Rename.
13668         (dump_bfd_file, restore_command): Update.
13669         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13670         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13671         (find_separate_debug_file_by_buildid): Update.
13672
13673 2017-01-10  Tom Tromey  <tom@tromey.com>
13674
13675         * common/gdb_ref_ptr.h: New file.
13676         * python/py-ref.h (struct gdbpy_ref_policy): New.
13677         (gdbpy_ref): Now a typedef.
13678
13679 2017-01-10  Tom Tromey  <tom@tromey.com>
13680
13681         * utils.h (make_cleanup_htab_delete): Don't declare.
13682         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13683         Remove.
13684         * linespec.c (decode_compound_collector): Add constructor,
13685         destructor.
13686         (lookup_prefix_sym): Remove cleanup.
13687         (symtab_collector): Add constructor, destructor.
13688         (collect_symtabs_from_filename): Remove cleanup.
13689         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13690         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13691         Use htab_up.
13692         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13693         * dwarf2read.c (dw2_expand_symtabs_matching)
13694         (dw2_map_symbol_filenames, dwarf_decode_macros)
13695         (write_psymtabs_to_index): Use htab_up.
13696         * dwarf2loc.c (func_verify_no_selftailcall)
13697         (call_site_find_chain_1, func_verify_no_selftailcall)
13698         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13699         std::vector, gdb::unique_xmalloc_ptr.
13700         (call_sitep): Remove typedef.
13701         (dwarf2_locexpr_baton_eval): Remove unused variable.
13702
13703 2017-01-10  Tom Tromey  <tom@tromey.com>
13704
13705         * python/python-internal.h (make_cleanup_py_decref)
13706         (make_cleanup_py_xdecref): Don't declare.
13707         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13708         (py_xdecref, make_cleanup_py_xdecref): Remove.
13709
13710 2017-01-10  Tom Tromey  <tom@tromey.com>
13711
13712         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13713         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13714
13715 2017-01-10  Tom Tromey  <tom@tromey.com>
13716
13717         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13718
13719 2017-01-10  Tom Tromey  <tom@tromey.com>
13720
13721         * python/py-utils.c (unicode_to_encoded_string)
13722         (python_string_to_target_string)
13723         (python_string_to_target_python_string)
13724         (python_string_to_host_string, gdbpy_obj_to_string)
13725         (get_addr_from_python): Use gdbpy_ref.
13726
13727 2017-01-10  Tom Tromey  <tom@tromey.com>
13728
13729         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13730         gdbpy_ref.
13731
13732 2017-01-10  Tom Tromey  <tom@tromey.com>
13733
13734         * python/python.c (eval_python_command, gdbpy_decode_line)
13735         (gdbpy_run_events, gdbpy_start_type_printers)
13736         (gdbpy_apply_type_printers): Use gdbpy_ref.
13737
13738 2017-01-10  Tom Tromey  <tom@tromey.com>
13739
13740         * python/py-param.c (get_doc_string, compute_enum_values): Use
13741         gdbpy_ref.
13742
13743 2017-01-10  Tom Tromey  <tom@tromey.com>
13744
13745         * python/py-inferior.c (find_thread_object, build_inferior_list):
13746         Use gdbpy_ref.
13747
13748 2017-01-10  Tom Tromey  <tom@tromey.com>
13749
13750         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13751
13752 2017-01-10  Tom Tromey  <tom@tromey.com>
13753
13754         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13755         gdbpy_ref.
13756
13757 2017-01-10  Tom Tromey  <tom@tromey.com>
13758
13759         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13760         extra incref.
13761         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13762         Use gdbpy_ref.
13763
13764 2017-01-10  Tom Tromey  <tom@tromey.com>
13765
13766         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13767         gdbpy_ref.
13768
13769 2017-01-10  Tom Tromey  <tom@tromey.com>
13770
13771         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13772         decref results of PyArg_ParseTupleAndKeywords.
13773
13774 2017-01-10  Tom Tromey  <tom@tromey.com>
13775
13776         * python/python.c (python_run_simple_file): Use
13777         unique_xmalloc_ptr, gdbpy_ref.
13778
13779 2017-01-10  Tom Tromey  <tom@tromey.com>
13780
13781         * python/py-prettyprint.c (print_stack_unless_memory_error)
13782         (print_string_repr, print_children): Use gdbpy_ref.
13783         (dummy_python_frame): New class.
13784         (dummy_python_frame::dummy_python_frame): Rename from
13785         push_dummy_python_frame.
13786         (py_restore_tstate): Remove.
13787
13788 2017-01-10  Tom Tromey  <tom@tromey.com>
13789
13790         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13791
13792 2017-01-10  Tom Tromey  <tom@tromey.com>
13793
13794         * python/python.c (ensure_python_env, restore_python_env):
13795         Remove.
13796         * python/python-internal.h (ensure_python_env): Don't declare.
13797         * varobj.h (varobj_ensure_python_env): Don't declare.
13798         * varobj.c (varobj_ensure_python_env): Remove.
13799
13800 2017-01-10  Tom Tromey  <tom@tromey.com>
13801
13802         * varobj.c (varobj_value_get_print_value): Use
13803         gdbpy_enter_varobj.
13804
13805 2017-01-10  Tom Tromey  <tom@tromey.com>
13806
13807         * python/py-prettyprint.c (print_string_repr, print_children):
13808         Update.
13809         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13810         of "encoding".
13811         * varobj.c (varobj_value_get_print_value): Update.
13812         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13813
13814 2017-01-10  Tom Tromey  <tom@tromey.com>
13815
13816         * varobj.c (varobj_get_display_hint)
13817         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13818         (varobj_set_visualizer, free_variable): Use
13819         gdbpy_enter_varobj.
13820
13821 2017-01-10  Tom Tromey  <tom@tromey.com>
13822
13823         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13824         (do_finish_initialization): New function.  Use gdbpy_ref.
13825         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13826         do_finish_initialization.
13827
13828 2017-01-10  Tom Tromey  <tom@tromey.com>
13829
13830         * python/py-param.c (get_set_value, get_show_value): Use
13831         gdbpy_enter, gdbpy_ref.
13832
13833 2017-01-10  Tom Tromey  <tom@tromey.com>
13834
13835         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13836
13837 2017-01-10  Tom Tromey  <tom@tromey.com>
13838
13839         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13840
13841 2017-01-10  Tom Tromey  <tom@tromey.com>
13842
13843         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13844         Use gdbpy_enter_varobj.
13845
13846 2017-01-10  Tom Tromey  <tom@tromey.com>
13847
13848         * varobj.c (gdbpy_enter_varobj): New constructor.
13849         * python/python-internal.h (gdbpy_enter_varobj): New class.
13850         * python/py-varobj.c (py_varobj_get_iterator): Use
13851         gdbpy_enter_varobj.
13852
13853 2017-01-10  Tom Tromey  <tom@tromey.com>
13854
13855         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13856         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13857         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13858         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13859         unique_xmalloc_ptr.
13860         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13861
13862 2017-01-10  Tom Tromey  <tom@tromey.com>
13863
13864         * python/py-xmethods.c (invoke_match_method): Use
13865         gdbpy_ref.
13866
13867 2017-01-10  Tom Tromey  <tom@tromey.com>
13868
13869         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13870         gdbpy_enter, gdbpy_ref.
13871
13872 2017-01-10  Tom Tromey  <tom@tromey.com>
13873
13874         * python/python.c (python_interactive_command): Use gdbpy_enter.
13875
13876 2017-01-10  Tom Tromey  <tom@tromey.com>
13877
13878         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13879         gdbpy_ref.
13880
13881 2017-01-10  Tom Tromey  <tom@tromey.com>
13882
13883         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13884         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13885
13886 2017-01-10  Tom Tromey  <tom@tromey.com>
13887
13888         * utils.h (htab_deleter): New struct.
13889         (htab_up): New typedef.
13890         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13891         gdbpy_enter, gdbpy_ref, htab_up.
13892
13893 2017-01-10  Tom Tromey  <tom@tromey.com>
13894
13895         * python/py-unwind.c (pending_frame_invalidate): Remove.
13896         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13897
13898 2017-01-10  Tom Tromey  <tom@tromey.com>
13899
13900         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13901         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13902
13903 2017-01-10  Tom Tromey  <tom@tromey.com>
13904
13905         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13906
13907 2017-01-10  Tom Tromey  <tom@tromey.com>
13908
13909         * python/python.c (gdbpy_eval_from_control_command)
13910         (gdbpy_source_script, gdbpy_run_events)
13911         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13912         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13913         gdbpy_enter.
13914
13915 2017-01-10  Tom Tromey  <tom@tromey.com>
13916
13917         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13918
13919 2017-01-10  Tom Tromey  <tom@tromey.com>
13920
13921         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13922
13923 2017-01-10  Tom Tromey  <tom@tromey.com>
13924
13925         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13926         (python_on_inferior_call_pre, python_on_inferior_call_post)
13927         (python_on_memory_change, python_on_register_change)
13928         (python_inferior_exit, python_new_objfile, add_thread_object)
13929         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13930
13931 2017-01-10  Tom Tromey  <tom@tromey.com>
13932
13933         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13934         (bpfinishpy_handle_exit): Use gdbpy_enter.
13935
13936 2017-01-10  Tom Tromey  <tom@tromey.com>
13937
13938         * python/py-cmd.c (cmdpy_destroyer)
13939         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13940         gdbpy_enter.
13941
13942 2017-01-10  Tom Tromey  <tom@tromey.com>
13943
13944         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13945         gdbpy_enter.
13946         (gdbpy_breakpoint_has_cond): Likewise.
13947
13948 2017-01-10  Tom Tromey  <tom@tromey.com>
13949
13950         * python/python.c (gdbpy_enter): New constructor.
13951         (~gdbpy_enter): New destructor.
13952         (restore_python_env, ensure_python_env): Rewrite.
13953         * python/python-internal.h (gdbpy_enter): New class.
13954
13955 2017-01-10  Tom Tromey  <tom@tromey.com>
13956
13957         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13958
13959 2017-01-10  Tom Tromey  <tom@tromey.com>
13960
13961         * python/py-value.c (value_has_field, get_field_flag)
13962         (get_field_type, valpy_getitem, convert_value_from_python): Use
13963         gdbpy_ref.
13964
13965 2017-01-10  Tom Tromey  <tom@tromey.com>
13966
13967         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13968         gdbpy_ref.
13969
13970 2017-01-10  Tom Tromey  <tom@tromey.com>
13971
13972         * python/py-prettyprint.c (search_pp_list)
13973         (find_pretty_printer_from_objfiles)
13974         (find_pretty_printer_from_progspace)
13975         (find_pretty_printer_from_gdb, find_pretty_printer)
13976         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13977         gdbpy_ref.
13978
13979 2017-01-10  Tom Tromey  <tom@tromey.com>
13980
13981         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13982
13983 2017-01-10  Tom Tromey  <tom@tromey.com>
13984
13985         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13986         (ltpy_get_all_source_lines): Use gdbpy_ref.
13987
13988 2017-01-10  Tom Tromey  <tom@tromey.com>
13989
13990         * python/py-framefilter.c (extract_sym, extract_value)
13991         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13992         gdbpy_ref.
13993
13994 2017-01-10  Tom Tromey  <tom@tromey.com>
13995
13996         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13997
13998 2017-01-10  Tom Tromey  <tom@tromey.com>
13999
14000         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14001
14002 2017-01-10  Tom Tromey  <tom@tromey.com>
14003
14004         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14005         gdbpy_ref.
14006
14007 2017-01-10  Tom Tromey  <tom@tromey.com>
14008
14009         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14010
14011 2017-01-10  Tom Tromey  <tom@tromey.com>
14012
14013         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14014         (typy_range): Use gdbpy_ref.
14015
14016 2017-01-10  Tom Tromey  <tom@tromey.com>
14017
14018         * python/py-threadevent.c (create_thread_event_object): Use
14019         gdbpy_ref.
14020         * python/py-stopevent.c (create_stop_event_object): Simplify.
14021         (emit_stop_event): Use gdbpy_ref.
14022         * python/py-signalevent.c (create_signal_event_object): Use
14023         gdbpy_ref.
14024         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14025         (emit_new_objfile_event, create_clear_objfiles_event_object)
14026         (emit_clear_objfiles_event): Use gdbpy_ref.
14027         * python/py-infevents.c (create_inferior_call_event_object)
14028         (create_register_changed_event_object)
14029         (create_memory_changed_event_object, emit_inferior_call_event)
14030         (emit_memory_changed_event, emit_register_changed_event): Use
14031         gdbpy_ref.
14032         * python/py-exitedevent.c (create_exited_event_object)
14033         (emit_exited_event): Use gdbpy_ref.
14034         * python/py-event.h (evpy_emit_event): Remove
14035         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14036         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14037         * python/py-continueevent.c (emit_continue_event): Use
14038         gdbpy_ref.
14039         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14040         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14041         gdbpy_ref.
14042         * python/py-bpevent.c (create_breakpoint_event_object): Use
14043         gdbpy_ref.
14044
14045 2017-01-10  Tom Tromey  <tom@tromey.com>
14046
14047         * python/py-ref.h: New file.
14048
14049 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14050
14051         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14052         void.
14053         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14054         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14055         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14056         * ui-out.c (ui_out::redirect): Likewise.
14057         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14058         * cli/cli-logging.c (set_logging_redirect): Update call site of
14059         ui_out::redirect.
14060         (handle_redirections): Likewise.
14061         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14062         * top.c (execute_command_to_string): Likewise.
14063         * utils.c (do_ui_out_redirect_pop): Likewise.
14064
14065 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14066
14067         * stack.c (_initialize_stack): Update "frame" command help message.
14068
14069 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14070
14071         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14072
14073 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14074
14075         * x86-linux-nat.h: Include gdb_proc_service.h.
14076
14077 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14078
14079         * ser-base.h: Include serial.h.
14080
14081 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14082
14083         * ppc-linux-tdep.h: Include ppc-tdep.h.
14084
14085 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14086
14087         * nat/amd64-linux-siginfo.h: Include signal.h.
14088
14089 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14090
14091         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14092
14093 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14094
14095         * mi/mi-parse.h: Include mi-cmds.h.
14096
14097 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14098
14099         * inf-loop.c: Don't include "target.h".
14100         * inf-loop.h: Include it here.
14101
14102 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14103
14104         * dfp.h: Include "dboulest.h" and "expression.h".
14105
14106 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14107
14108         * ax-gdb.h: Include "ax.h".
14109
14110 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14111
14112         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14113         with nat/gdb_ptrace.h.
14114
14115 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14116
14117         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14118         new line.
14119         (mips64_fbsd_sigframe_init): Likewise.
14120
14121 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14122
14123         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14124         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14125
14126 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14127
14128         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14129         * NEWS: Mention new FreeBSD/mips native configuration.
14130         * config/mips/fbsd.mh: New file.
14131         * configure.host: Add mips*-*-freebsd*.
14132         * mips-fbsd-nat.c: New file.
14133
14134 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14135
14136         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14137         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14138         * NEWS: Mention new FreeBSD/mips target.
14139         * configure.tgt: Add mips*-*-freebsd*.
14140         * mips-fbsd-tdep.c: New file.
14141         * mips-fbsd-tdep.h: New file.
14142
14143 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14144
14145         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14146         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14147
14148 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14149
14150         Update copyright year range in all GDB files.
14151
14152 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14153
14154         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14155
14156 For older changes see ChangeLog-2016.
14157 \f
14158 Local Variables:
14159 mode: change-log
14160 left-margin: 8
14161 fill-column: 74
14162 version-control: never
14163 coding: utf-8
14164 End: