Get rid of VEC(loaded_script_ptr)
[external/binutils.git] / gdb / ChangeLog
1 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4         (loaded_script_ptr): Remove typedef.
5         (DEF_VEC_P (loaded_script_ptr)): Remove.
6         (struct collect_matching_scripts_data): Add constructor.
7         <scripts_p>: Change type to (pointer to) std::vector.
8         (collect_matching_scripts_data): Adjust.
9         (sort_scripts_by_name): Make suitable for std::sort.
10         (print_scripts): Don't sort vector, adjust to std::vector.
11         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
12
13 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
14
15         * symfile.c (filename_language): Make struct, not typedef.  Add
16         constructor.
17         <ext>: Change type to std::string.
18         (DEF_VEC_O (filename_language)): Remove.
19         (filename_language_table): Change type to std::vector.
20         (add_filename_language): Adjust.
21         (set_ext_lang_command): Adjust.
22         (info_ext_lang_command): Adjust.
23         (deduce_language_from_filename): Adjust.
24         (class scoped_restore_filename_language_table): Remove.
25         (test_filename_language): Use scoped_restore.
26         (test_set_ext_lang_command): Use scoped_restore, adjust to
27         std::vector change.
28
29 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
30
31         * symfile.c: Include selftest.h.
32         (class scoped_restore_filename_language_table): New.
33         (test_filename_language): New test.
34         (test_set_ext_lang_command): New test.
35         (_initialize_symfile): Register tests.
36
37 2017-10-27  Keith Seitz  <keiths@redhat.com>
38
39         * breakpoint.c (print_breakpoint_location): Use the symbol saved
40         in the bp_location, falling back to find_pc_sect_function when
41         needed.
42         (add_location_to_breakpoint): Save sal->symbol.
43         * breakpoint.h (struct bp_location) <symbol>: New field.
44         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
45         * symtab.h (struct symtab_and_line) <symbol>: New field.
46
47 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
48
49         PR gdb/13669
50         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
51         to rewind obstack.
52
53 2017-10-26  Pedro Alves  <palves@redhat.com>
54
55         * remote.c (remote_async_terminal_ours_p): Delete.
56         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
57         Remove references to 'remote_async_terminal_ours_p'.
58
59 2017-10-26  Yao Qi  <yao.qi@linaro.org>
60
61         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
62
63 2017-10-26  Yao Qi  <yao.qi@linaro.org>
64
65         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
66         aspace const.
67         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
68         Likewise.
69         * breakpoint.c (bpstat_check_location): Remove cast.
70         (breakpoint_hit_catch_fork): Make aspce const.
71         (breakpoint_hit_catch_solib): Likewise.
72         (breakpoint_hit_catch_exec): Likewise.
73         (breakpoint_hit_ranged_breakpoint): Likewise.
74         (breakpoint_hit_watchpoint): Likewise.
75         (base_breakpoint_breakpoint_hit): Likewise.
76         (bkpt_breakpoint_hit): Likewise.
77         (dprintf_breakpoint_hit): Likewise.
78         (tracepoint_breakpoint_hit): Likewise.
79         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
80
81 2017-10-26  Yao Qi  <yao.qi@linaro.org>
82
83         * breakpoint.c (breakpoint_location_address_match): Change
84         "struct address_space *" to "const address_space".
85         (breakpoint_location_address_range_overlap): Likewise.
86         (breakpoint_here_p): Likewise.
87         (breakpoint_in_range_p): Likewise.
88         (moribund_breakpoint_here_p): Likewise.
89         (bp_location_inserted_here_p): Likewise.
90         (software_breakpoint_inserted_here_p): Likewise.
91         (hardware_breakpoint_inserted_here_p): Likewise.
92         (hardware_watchpoint_inserted_in_range): Likewise.
93         (bpstat_check_location): Likewise.
94         (bpstat_stop_status): Likewise.
95         (breakpoint_address_match): Likewise.
96         (breakpoint_address_match_range): Likewise.
97         (breakpoint_location_address_match): Likewise.
98         (breakpoint_location_address_range_overlap): Likewise.
99         (insert_single_step_breakpoint): Likewise.
100         (breakpoint_has_location_inserted_here): Likewise.
101         (single_step_breakpoint_inserted_here_p): Likewise.
102         (pc_at_non_inline_function): Likewise.
103         * breakpoint.h (bpstat_stop_status): Update declaration.
104         (breakpoint_here_p): Likewise.
105         (breakpoint_in_range_p): Likewise.
106         (moribund_breakpoint_here_p): Likewise.
107         (breakpoint_inserted_here_p): Likewise.
108         (software_breakpoint_inserted_here_p): Likewise.
109         (hardware_breakpoint_inserted_here_p): Likewise.
110         (breakpoint_has_location_inserted_here): Likewise.
111         (single_step_breakpoint_inserted_here_p): Likewise.
112         (hardware_watchpoint_inserted_in_range): Likewise.
113         (breakpoint_address_match): Likewise.
114         (insert_single_step_breakpoint): Likewise.
115         (pc_at_non_inline_function): Likewise.
116         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
117         * record.c (record_check_stopped_by_breakpoint): Likewise.
118         * record.h (record_check_stopped_by_breakpoint): Likewise.
119         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
120
121 2017-10-25  Yao Qi  <yao.qi@linaro.org>
122
123         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
124         regcache->arch () instead get_regcache_arch.
125         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
126         Likewise.
127         (aarch64_fbsd_store_inferior_registers): Likewise.
128         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
129         (store_gregs_to_thread): Likewise.
130         (fetch_fpregs_from_thread): Likewise.
131         (store_fpregs_to_thread): Likewise.
132         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
133         (aarch64_store_return_value): Likewise.
134         (aarch64_software_single_step): Likewise.
135         * aix-thread.c (aix_thread_wait): Likewise.
136         (supply_reg32): Likewise.
137         (supply_sprs64): Likewise.
138         (supply_sprs32): Likewise.
139         (fill_gprs64): Likewise.
140         (fill_gprs32): Likewise.
141         (fill_sprs64): Likewise.
142         (fill_sprs32): Likewise.
143         (store_regs_user_thread): Likewise.
144         (store_regs_kernel_thread): Likewise.
145         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
146         (alphabsd_store_inferior_registers): Likewise.
147         * alpha-tdep.c (alpha_extract_return_value): Likewise.
148         (alpha_store_return_value): Likewise.
149         (alpha_deal_with_atomic_sequence): Likewise.
150         (alpha_next_pc): Likewise.
151         (alpha_software_single_step): Likewise.
152         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
153         (amd64bsd_store_inferior_registers): Likewise.
154         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
155         Likewise.
156         (amd64_linux_store_inferior_registers): Likewise.
157         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
158         (amd64_collect_native_gregset): Likewise.
159         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
160         (amd64obsd_collect_uthread): Likewise.
161         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
162         (amd64_collect_fpregset): Likewise.
163         (amd64_supply_fxsave): Likewise.
164         (amd64_supply_xsave): Likewise.
165         (amd64_collect_fxsave): Likewise.
166         (amd64_collect_xsave): Likewise.
167         * arc-tdep.c (arc_write_pc): Likewise.
168         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
169         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
170         (arm_fbsd_store_inferior_registers): Likewise.
171         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
172         (store_vfp_regs): Likewise.
173         (arm_linux_fetch_inferior_registers): Likewise.
174         (arm_linux_store_inferior_registers): Likewise.
175         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
176         (arm_linux_sigreturn_next_pc): Likewise.
177         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
178         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
179         (fetch_register): Likewise.
180         (store_register): Likewise.
181         * arm-tdep.c (arm_is_thumb): Likewise.
182         (displaced_in_arm_mode): Likewise.
183         (bx_write_pc): Likewise.
184         (arm_get_next_pcs_addr_bits_remove): Likewise.
185         (arm_software_single_step): Likewise.
186         (arm_extract_return_value): Likewise.
187         (arm_store_return_value): Likewise.
188         (arm_write_pc): Likewise.
189         * bfin-tdep.c (bfin_extract_return_value): Likewise.
190         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
191         (bsd_uthread_store_registers): Likewise.
192         * core-regset.c (fetch_core_registers): Likewise.
193         * corelow.c (get_core_registers): Likewise.
194         * cris-tdep.c (cris_store_return_value): Likewise.
195         (cris_extract_return_value): Likewise.
196         (find_step_target): Likewise.
197         (find_step_target): Likewise.
198         (cris_software_single_step): Likewise.
199         * ctf.c (ctf_fetch_registers): Likewise.
200         * darwin-nat.c (cancel_breakpoint): Likewise.
201         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
202         * frv-tdep.c (frv_extract_return_value): Likewise.
203         * ft32-tdep.c (ft32_store_return_value): Likewise.
204         (ft32_extract_return_value): Likewise.
205         * go32-nat.c (fetch_register): Likewise.
206         (go32_fetch_registers): Likewise.
207         (go32_store_registers): Likewise.
208         (store_register): Likewise.
209         * h8300-tdep.c (h8300_extract_return_value): Likewise.
210         (h8300_store_return_value): Likewise.
211         * hppa-linux-nat.c (fetch_register): Likewise.
212         (store_register): Likewise.
213         (hppa_linux_fetch_inferior_registers): Likewise.
214         (hppa_linux_store_inferior_registers): Likewise.
215         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
216         (i386_darwin_store_inferior_registers): Likewise.
217         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
218         (gnu_store_registers): Likewise.
219         * i386-linux-nat.c (fetch_register): Likewise.
220         (store_register): Likewise.
221         (supply_gregset): Likewise.
222         (fill_gregset): Likewise.
223         (i386_linux_fetch_inferior_registers): Likewise.
224         (i386_linux_store_inferior_registers): Likewise.
225         (i386_linux_resume): Likewise.
226         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
227         Likewise.
228         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
229         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
230         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
231         (i386obsd_collect_uthread): Likewise.
232         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
233         (i386_supply_gregset): Likewise.
234         (i386_collect_gregset): Likewise.
235         (i386_supply_fpregset): Likewise.
236         (i386_collect_fpregset): Likewise.
237         (i386_mpx_bd_base): Likewise.
238         * i386-v4-nat.c (supply_fpregset): Likewise.
239         (fill_fpregset): Likewise.
240         * i387-tdep.c (i387_supply_fsave): Likewise.
241         (i387_collect_fsave): Likewise.
242         (i387_supply_fxsave): Likewise.
243         (i387_collect_fxsave): Likewise.
244         (i387_supply_xsave): Likewise.
245         (i387_collect_xsave): Likewise.
246         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
247         (ia64_linux_store_registers): Likewise.
248         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
249         (ia64_extract_return_value): Likewise.
250         (ia64_store_return_value): Likewise.
251         (find_func_descr): Likewise.
252         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
253         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
254         (inf_ptrace_store_registers): Likewise.
255         * infrun.c (use_displaced_stepping): Likewise.
256         (displaced_step_prepare_throw): Likewise.
257         (resume): Likewise.
258         (proceed): Likewise.
259         (do_target_wait): Likewise.
260         (adjust_pc_after_break): Likewise.
261         (handle_inferior_event_1): Likewise.
262         (handle_signal_stop): Likewise.
263         (save_infcall_suspend_state): Likewise.
264         (restore_infcall_suspend_state): Likewise.
265         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
266         * jit.c (jit_frame_prev_register): Likewise.
267         * linux-nat.c (save_stop_reason): Likewise.
268         (linux_nat_wait_1): Likewise.
269         (resume_stopped_resumed_lwps): Likewise.
270         * linux-record.c (record_linux_sockaddr): Likewise.
271         (record_linux_msghdr): Likewise.
272         (record_linux_system_call): Likewise.
273         * linux-tdep.c (linux_collect_thread_registers): Likewise.
274         * lm32-tdep.c (lm32_extract_return_value): Likewise.
275         (lm32_store_return_value): Likewise.
276         * m32c-tdep.c (m32c_read_flg): Likewise.
277         (m32c_pseudo_register_read): Likewise.
278         (m32c_pseudo_register_write): Likewise.
279         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
280         (m32r_linux_collect_gregset): Likewise.
281         * m32r-tdep.c (m32r_store_return_value): Likewise.
282         (m32r_extract_return_value): Likewise.
283         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
284         (m68kbsd_collect_fpregset): Likewise.
285         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
286         * m68k-linux-nat.c (fetch_register): Likewise.
287         (old_fetch_inferior_registers): Likewise.
288         (old_store_inferior_registers): Likewise.
289         (store_regs): Likewise.
290         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
291         (m68k_svr4_store_return_value): Likewise.
292         * m88k-tdep.c (m88k_store_arguments): Likewise.
293         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
294         (mi_cmd_data_write_register_values): Likewise.
295         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
296         (mips_fbsd_store_inferior_registers): Likewise.
297         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
298         (mips_fbsd_supply_gregs): Likewise.
299         (mips_fbsd_collect_fpregs): Likewise.
300         (mips_fbsd_collect_gregs): Likewise.
301         (mips_fbsd_supply_fpregset): Likewise.
302         (mips_fbsd_collect_fpregset): Likewise.
303         (mips_fbsd_supply_gregset): Likewise.
304         (mips_fbsd_collect_gregset): Likewise.
305         * mips-linux-nat.c (supply_gregset): Likewise.
306         (fill_gregset): Likewise.
307         (supply_fpregset): Likewise.
308         (fill_fpregset): Likewise.
309         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
310         (mips_fill_gregset): Likewise.
311         (mips_supply_fpregset): Likewise.
312         (mips_fill_fpregset): Likewise.
313         (mips64_supply_gregset): Likewise.
314         (micromips_linux_sigframe_validate): Likewise.
315         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
316         (mipsnbsd_fetch_inferior_registers): Likewise.
317         (mipsnbsd_store_inferior_registers): Likewise.
318         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
319         (mipsnbsd_supply_gregset): Likewise.
320         (mipsnbsd_iterate_over_regset_sections): Likewise.
321         (mipsnbsd_supply_reg): Likewise.
322         (mipsnbsd_supply_fpreg): Likewise.
323         * mips-tdep.c (mips_in_frame_stub): Likewise.
324         (mips_dummy_id): Likewise.
325         (is_octeon_bbit_op): Likewise.
326         (micromips_bc1_pc): Likewise.
327         (extended_mips16_next_pc): Likewise.
328         (mips16_next_pc): Likewise.
329         (deal_with_atomic_sequence): Likewise.
330         * moxie-tdep.c (moxie_process_readu): Likewise.
331         * nios2-tdep.c (nios2_get_next_pc): Likewise.
332         * nto-procfs.c (procfs_store_registers): Likewise.
333         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
334         (ppcfbsd_store_inferior_registers): Likewise.
335         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
336         (fetch_altivec_register): Likewise.
337         (get_spe_registers): Likewise.
338         (fetch_spe_register): Likewise.
339         (fetch_altivec_registers): Likewise.
340         (fetch_all_gp_regs): Likewise.
341         (fetch_all_fp_regs): Likewise.
342         (store_vsx_register): Likewise.
343         (store_altivec_register): Likewise.
344         (set_spe_registers): Likewise.
345         (store_spe_register): Likewise.
346         (store_altivec_registers): Likewise.
347         (store_all_gp_regs): Likewise.
348         (store_all_fp_regs): Likewise.
349         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
350         (ppc_linux_collect_gregset): Likewise.
351         (ppc_canonicalize_syscall): Likewise.
352         (ppc_linux_record_signal): Likewise.
353         (ppu2spu_prev_register): Likewise.
354         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
355         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
356         (ppcobsd_store_registers): Likewise.
357         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
358         Likewise.
359         (ppc_ravenscar_generic_store_registers): Likewise.
360         * procfs.c (procfs_fetch_registers): Likewise.
361         (procfs_store_registers): Likewise.
362         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
363         (ravenscar_store_registers): Likewise.
364         (ravenscar_prepare_to_store): Likewise.
365         * record-btrace.c (record_btrace_fetch_registers): Likewise.
366         * record-full.c (record_full_wait_1): Likewise.
367         (record_full_registers_change): Likewise.
368         (record_full_store_registers): Likewise.
369         (record_full_core_fetch_registers): Likewise.
370         (record_full_save): Likewise.
371         (record_full_goto_insn): Likewise.
372         * regcache.c (regcache_register_size): Likewise.
373         (get_regcache_arch): Remove.
374         (regcache_read_pc): Likewise.
375         * regcache.h (get_regcache_arch): Remove.
376         * remote-sim.c (gdbsim_fetch_register): Likewise.
377         (gdbsim_store_register): Likewise.
378         * remote.c (fetch_register_using_p): Likewise.
379         (send_g_packet): Likewise.
380         (remote_prepare_to_store): Likewise.
381         (store_registers_using_G): Likewise.
382         * reverse.c (save_bookmark_command): Likewise.
383         (goto_bookmark_command): Likewise.
384         * rs6000-aix-tdep.c (branch_dest): Likewise.
385         * rs6000-nat.c (rs6000_ptrace64): Likewise.
386         (fetch_register): Likewise.
387         * rs6000-tdep.c (ppc_supply_reg): Likewise.
388         (ppc_collect_reg): Likewise.
389         (ppc_collect_gregset): Likewise.
390         (ppc_collect_fpregset): Likewise.
391         (ppc_collect_vsxregset): Likewise.
392         (ppc_collect_vrregset): Likewise.
393         (ppc_displaced_step_hw_singlestep): Likewise.
394         (rs6000_pseudo_register_read): Likewise.
395         (rs6000_pseudo_register_write): Likewise.
396         * s390-linux-nat.c (supply_gregset): Likewise.
397         (fill_gregset): Likewise.
398         (s390_linux_fetch_inferior_registers): Likewise.
399         * s390-linux-tdep.c (s390_write_pc): Likewise.
400         (s390_software_single_step): Likewise.
401         (s390_all_but_pc_registers_record): Likewise.
402         (s390_linux_syscall_record): Likewise.
403         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
404         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
405         (shnbsd_store_inferior_registers): Likewise.
406         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
407         (sh_extract_return_value_fpu): Likewise.
408         (sh_store_return_value_nofpu): Likewise.
409         (sh_corefile_supply_regset): Likewise.
410         (sh_corefile_collect_regset): Likewise.
411         * sh64-tdep.c (sh64_extract_return_value): Likewise.
412         (sh64_store_return_value): Likewise.
413         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
414         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
415         (sparc_store_inferior_registers): Likewise.
416         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
417         (sparc_ravenscar_prepare_to_store): Likewise.
418         * sparc-tdep.c (sparc32_store_arguments): Likewise.
419         (sparc_analyze_control_transfer): Likewise.
420         (sparc_step_trap): Likewise.
421         (sparc_software_single_step): Likewise.
422         (sparc32_gdbarch_init): Likewise.
423         (sparc_supply_rwindow): Likewise.
424         (sparc_collect_rwindow): Likewise.
425         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
426         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
427         (sparc64nbsd_collect_gregset): Likewise.
428         (sparc64nbsd_supply_fpregset): Likewise.
429         (sparc64nbsd_collect_fpregset): Likewise.
430         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
431         (sparc64_supply_gregset): Likewise.
432         (sparc64_collect_gregset): Likewise.
433         (sparc64_supply_fpregset): Likewise.
434         (sparc64_collect_fpregset): Likewise.
435         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
436         * spu-tdep.c (spu_unwind_sp): Likewise.
437         (spu2ppu_prev_register): Likewise.
438         (spu_memory_remove_breakpoint): Likewise.
439         * stack.c (return_command): Likewise.
440         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
441         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
442         * tracefile.c (trace_save_ctf): Likewise.
443         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
444         (do_windows_store_inferior_registers): Likewise.
445         (windows_resume): Likewise.
446         * xtensa-linux-nat.c (fill_gregset): Likewise.
447         (supply_gregset_reg): Likewise.
448         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
449         (xtensa_register_read_masked): Likewise.
450         (xtensa_supply_gregset): Likewise.
451         (xtensa_extract_return_value): Likewise.
452         (xtensa_store_return_value): Likewise.
453
454 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
455
456         * doublest.c (floatformat_from_string): New function.
457         * doublest.h (floatformat_from_string): Add prototype.
458
459         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
460         (OP_FLOAT): ... this.
461         * expression.h: Do not include "doublest.h".
462         (union exp_element): Replace doubleconst and decfloatconst by
463         new element floatconst.
464         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
465         (ada_evaluate_subexp): Likewise.
466         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
467         OP_DOUBLE and OP_DECFLOAT.
468         * expprint.c (print_subexp_standard): Likewise.
469         (dump_subexp_body_standard): Likewise.
470         * breakpoint.c (watchpoint_exp_is_const): Likewise.
471
472         * parse.c: Include "dfp.h".
473         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
474         (write_exp_elt_floatcst): New function.
475         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
476         and OP_DECFLOAT.
477         (operator_check_standard): Likewise.
478         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
479         Return target format buffer instead of host DOUBLEST.
480         Use floatformat_from_string and decimal_from_string to parse
481         either binary or decimal floating-point types.
482         (parse_c_float): Remove.
483         * parser-defs.h: Do not include "doublest.h".
484         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
485         (write_exp_elt_floatcst): Add prototype.
486         (parse_float): Update prototype.
487         (parse_c_float): Remove.
488
489         * c-exp.y: Do not include "dfp.h".
490         (typed_val_float): Use byte buffer instead of DOUBLEST.
491         (typed_val_decfloat): Remove.
492         (DECFLOAT): Remove.
493         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
494         (parse_number): Update to new parse_float interface.
495         Parse suffixes and determine type before calling parse_float.
496         Handle decimal and binary FP types the same way.
497
498         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
499         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
500         (parse_number): Update to new parse_float interface.
501         Parse suffixes and determine type before calling parse_float.
502
503         * f-exp.y: Replace dval by typed_val_float.
504         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
505         (parse_number): Use parse_float instead of atof.
506
507         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
508         (parse_go_float): Remove.
509         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
510         (parse_number): Call parse_float instead of parse_go_float.
511         Parse suffixes and determine type before calling parse_float.
512
513         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
514         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
515         (parse_number): Update to new parse_float interface.
516         Parse suffixes and determine type before calling parse_float.
517
518         * m2-exp.y: Replace dval by byte buffer val.
519         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
520         (parse_number): Call parse_float instead of atof.
521
522         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
523         (lex_number): Call parse_float instead of strtod.
524         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
525         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
526         Use write_exp_elt_floatcst.
527         (unit_testing): Remove static variable.
528         (rust_type): Do not check unit_testing.
529         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
530
531         * ada-exp.y (type_float, type_double): Remove.
532         (typed_val_float): Use byte buffer instead of DOUBLEST.
533         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
534         * ada-lex.l (processReal): Use parse_float instead of sscanf.
535
536 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
537
538         * aarch64-tdep.h (enum aarch64_regnum): Remove.
539         * arch/aarch64.h: New file.
540
541 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
542
543         * dfp.h (decimal_from_string): Use const reference for argument.
544         * dfp.c (decimal_from_string): Likewise.
545
546 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
547
548         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
549         * sh64-tdep.c (sh64_do_fp_register): Likewise.
550         * mips-tdep.c (mips_print_fp_register): Likewise.
551
552 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
553
554         * common/format.h (enum argclass): Replace decfloat_arg by
555         dec32float_arg, dec64float_arg, and dec128float_arg.
556         * common/format.c (parse_format_string): Update to return
557         new decimal float argument classes.
558
559         * printcmd.c (printf_decfloat): Rename to ...
560         (printf_floating): ... this.  Add argclass argument, and use it
561         instead of parsing the format string again.  Add support for
562         binary floating-point values, using floatformat_to_string.
563         Convert value to the target format if it doesn't already match.
564         (ui_printf): Call printf_floating instead of printf_decfloat,
565         also for double_arg / long_double_arg.  Pass argclass.
566
567         * dfp.c (decimal_to_string): Add format string argument.
568         * dfp.h (decimal_to_string): Likewise.
569
570         * doublest.c (floatformat_to_string): Add format string argument.
571         * doublest.h (floatformat_to_string): Likewise.
572
573 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
574
575         * doublest.c (floatformat_precision): New routine.
576         (floatformat_to_string): Likewise.
577         * doublest.c (floatformat_to_string): Add prototype.
578
579         * printcmd.c (print_scalar_formatted): Only call print_floating
580         on floating-point types.
581         * valprint.c: Do not include "floatformat.h".
582         (generic_val_print_decfloat): Remove.
583         (generic_val_print): Call generic_val_print_float for both
584         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
585         (print_floating): Use floatformat_to_string.  Handle decimal float.
586         (print_decimal_floating): Remove, merge into floatformat_to_string.
587         * value.h (print_decimal_floating): Remove.
588
589         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
590
591 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
592
593         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
594
595 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
596
597         * memattr.h: Don't include vec.h.
598         (struct mem_attrib): Initialize fields.
599         <unknown>: New static method.
600         (struct mem_region): Add constructors, operator<, initialize
601         fields.
602         * memattr.c: Include algorithm.
603         (default_mem_attrib, unknown_mem_attrib): Remove.
604         (user_mem_region_list): New global.
605         (target_mem_region_list, mem_region_list): Change type to
606         std::vector<mem_region>.
607         (mem_use_target): Now a function.
608         (target_mem_regions_valid): Change type to bool.
609         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
610         (require_user_regions): Adjust.
611         (require_target_regions): Adjust.
612         (create_mem_region): Adjust.
613         (lookup_mem_region): Adjust.
614         (invalidate_target_mem_regions): Adjust.
615         (mem_clear): Rename to...
616         (user_mem_clear): ... this, and adjust.
617         (mem_command): Adjust.
618         (info_mem_command): Adjust.
619         (mem_enable, enable_mem_command, mem_disable,
620         disable_mem_command): Adjust.
621         (mem_delete): Adjust.
622         (delete_mem_command): Adjust.
623         * memory-map.h (parse_memory_map): Return an std::vector.
624         * memory-map.c (parse_memory_map): Likewise.
625         (struct memory_map_parsing_data): Add constructor.
626         <memory_map>: Point to std::vector.
627         (memory_map_start_memory): Adjust.
628         (memory_map_end_memory): Adjust.
629         (memory_map_end_property): Adjust.
630         (clear_result): Remove.
631         * remote.c (remote_memory_map): Return an std::vector.
632         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
633         Remove.
634         (target_debug_print_mem_region_vector): New.
635         * target-delegates.c: Regenerate.
636         * target.h (mem_region_vector): New typedef.
637         (to_memory_map): Return mem_region_vector.
638         (target_memory_map): Return an std::vector.
639         * target.c (target_memory_map): Return an std::vector.
640         (flash_erase_command): Adjust.
641
642 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
643
644         * memory-map.c (struct memory_map_parsing_data) <property_name>:
645         Change type to std::string.
646         (memory_map_start_property): Adjust.
647         (memory_map_end_property): Adjust.
648
649 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
650
651         * infrun.h: Include common/byte-vector.h.
652         (struct displaced_step_closure): New struct.
653         (struct buf_displaced_step_closure): New struct.
654         * infrun.c (displaced_step_closure::~displaced_step_closure):
655         Provide default implementation.
656         (displaced_step_clear): Deallocate step closure with delete.
657         * aarch64-tdep.c (displaced_step_closure): Rename to ...
658         (aarch64_displaced_step_closure): ... this, extend
659         displaced_step_closure.
660         (aarch64_displaced_step_data) <dsc>: Change type to
661         aarch64_displaced_step_closure.
662         (aarch64_displaced_step_copy_insn): Adjust to type change, use
663         unique_ptr.
664         (aarch64_displaced_step_fixup): Add cast for displaced step
665         closure.
666         * amd64-tdep.c (displaced_step_closure): Rename to ...
667         (amd64_displaced_step_closure): ... this, extend
668         displaced_step_closure.
669         <insn_buf>: Change type to std::vector<gdb_byte>.
670         <max_len>: Remove.
671         (fixup_riprel): Change type of DSC parameter, adjust to type
672         change of insn_buf.
673         (fixup_displaced_copy): Change type of DSC parameter.
674         (amd64_displaced_step_copy_insn): Instantiate
675         amd64_displaced_step_closure.
676         (amd64_displaced_step_fixup): Add cast for closure type, adjust
677         to type change of insn_buf.
678         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
679         parameter DSC.
680         (arm_linux_copy_svc): Likewise.
681         (cleanup_kernel_helper_return): Likewise.
682         (arm_catch_kernel_helper_return): Likewise.
683         (arm_linux_displaced_step_copy_insn): Instantiate
684         arm_displaced_step_closure.
685         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
686         (displaced_read_reg): Change type of parameter DSC.
687         (branch_write_pc): Likewise.
688         (load_write_pc): Likewise.
689         (alu_write_pc): Likewise.
690         (displaced_write_reg): Likewise.
691         (arm_copy_unmodified): Likewise.
692         (thumb_copy_unmodified_32bit): Likewise.
693         (thumb_copy_unmodified_16bit): Likewise.
694         (cleanup_preload): Likewise.
695         (install_preload): Likewise.
696         (arm_copy_preload): Likewise.
697         (thumb2_copy_preload): Likewise.
698         (install_preload_reg): Likewise.
699         (arm_copy_preload_reg): Likewise.
700         (cleanup_copro_load_store): Likewise.
701         (install_copro_load_store): Likewise.
702         (arm_copy_copro_load_store) Likewise.
703         (thumb2_copy_copro_load_store): Likewise.
704         (cleanup_branch): Likewise.
705         (install_b_bl_blx): Likewise.
706         (arm_copy_b_bl_blx): Likewise.
707         (thumb2_copy_b_bl_blx): Likewise.
708         (thumb_copy_b): Likewise.
709         (install_bx_blx_reg): Likewise.
710         (arm_copy_bx_blx_reg): Likewise.
711         (thumb_copy_bx_blx_reg): Likewise.
712         (cleanup_alu_imm): Likewise.
713         (arm_copy_alu_imm): Likewise.
714         (thumb2_copy_alu_imm): Likewise.
715         (cleanup_alu_reg): Likewise.
716         (install_alu_reg): Likewise.
717         (arm_copy_alu_reg): Likewise.
718         (thumb_copy_alu_reg): Likewise.
719         (cleanup_alu_shifted_reg): Likewise.
720         (install_alu_shifted_reg): Likewise.
721         (arm_copy_alu_shifted_reg): Likewise.
722         (cleanup_load): Likewise.
723         (cleanup_store): Likewise.
724         (arm_copy_extra_ld_st): Likewise.
725         (install_load_store): Likewise.
726         (thumb2_copy_load_literal): Likewise.
727         (thumb2_copy_load_reg_imm): Likewise.
728         (arm_copy_ldr_str_ldrb_strb): Likewise.
729         (cleanup_block_load_all): Likewise.
730         (cleanup_block_store_pc): Likewise.
731         (cleanup_block_load_pc): Likewise.
732         (arm_copy_block_xfer): Likewise.
733         (thumb2_copy_block_xfer): Likewise.
734         (cleanup_svc): Likewise.
735         (install_svc): Likewise.
736         (arm_copy_svc): Likewise.
737         (thumb_copy_svc): Likewise.
738         (arm_copy_undef): Likewise.
739         (thumb_32bit_copy_undef): Likewise.
740         (arm_copy_unpred): Likewise.
741         (arm_decode_misc_memhint_neon): Likewise.
742         (arm_decode_unconditional): Likewise.
743         (arm_decode_miscellaneous): Likewise.
744         (arm_decode_dp_misc): Likewise.
745         (arm_decode_ld_st_word_ubyte): Likewise.
746         (arm_decode_media): Likewise.
747         (arm_decode_b_bl_ldmstm): Likewise.
748         (arm_decode_ext_reg_ld_st): Likewise.
749         (thumb2_decode_dp_shift_reg): Likewise.
750         (thumb2_decode_ext_reg_ld_st): Likewise.
751         (arm_decode_svc_copro): Likewise.
752         (thumb2_decode_svc_copro): Likewise.
753         (install_pc_relative): Likewise.
754         (thumb_copy_pc_relative_16bit): Likewise.
755         (thumb_decode_pc_relative_16bit): Likewise.
756         (thumb_copy_pc_relative_32bit): Likewise.
757         (thumb_copy_16bit_ldr_literal): Likewise.
758         (thumb_copy_cbnz_cbz): Likewise.
759         (thumb2_copy_table_branch): Likewise.
760         (cleanup_pop_pc_16bit_all): Likewise.
761         (thumb_copy_pop_pc_16bit): Likewise.
762         (thumb_process_displaced_16bit_insn): Likewise.
763         (decode_thumb_32bit_ld_mem_hints): Likewise.
764         (thumb_process_displaced_32bit_insn): Likewise.
765         (thumb_process_displaced_insn): Likewise.
766         (arm_process_displaced_insn): Likewise.
767         (arm_displaced_init_closure): Likewise.
768         (arm_displaced_step_fixup): Add cast for closure.
769         * arm-tdep.h: Include infrun.h.
770         (displaced_step_closure): Rename to ...
771         (arm_displaced_step_closure): ... this, extend
772         displaced_step_closure.
773         <u::svc::copy_svc_os>: Change type of parameter DSC.
774         <cleanup>: Likewise.
775         (arm_process_displaced_insn): Likewise.
776         (arm_displaced_init_closure): Likewise.
777         (displaced_read_reg): Likewise.
778         (displaced_write_reg): Likewise.
779         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
780         Adjust.
781         * i386-tdep.h: Include infrun.h.
782         (i386_displaced_step_closure): New typedef.
783         * i386-tdep.c (i386_displaced_step_copy_insn): Use
784         i386_displaced_step_closure.
785         (i386_displaced_step_fixup): Adjust.
786         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
787         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
788         and unique_ptr.
789         (ppc_displaced_step_fixup): Adjust.
790         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
791         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
792         and unique_ptr.
793         (s390_displaced_step_fixup): Adjust.
794
795 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
796
797         * interps.h (interp_resume, interp_suspend, interp_set_temp):
798         Remove declarations.
799
800 2017-10-20  Tom Tromey  <tom@tromey.com>
801
802         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
803         std::vector.
804         (gdb_bfd_record_inclusion): Update.
805         (bfdp): Remove typedef.
806
807 2017-10-20  Tom Tromey  <tom@tromey.com>
808
809         * gdb_bfd.c (gdb_bfd_ref): Use new.
810         (struct gdb_bfd_data): Add constructor, destructor, and member
811         initializers.
812         (gdb_bfd_unref): Use delete.
813
814 2017-10-20  Tom Tromey  <tom@tromey.com>
815
816         * exec.c (exec_file_attach): Use new_bfd_ref.
817         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
818         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
819         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
820         new_bfd_ref.
821         * gdb_bfd.h (new_bfd_ref): New function.
822
823 2017-10-20  Pedro Alves  <palves@redhat.com>
824
825         * main.c (captured_command_loop): Add attribute noinline.
826
827 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
828
829         * interps.c (struct interp_factory): Add constructor.
830         (interp_factory_p): Remove typedef.
831         (DEF_VEC_P(interp_factory_p)): Remove.
832         (interpreter_factories): Change type to std::vector.
833         (interp_factory_register): Adjust.
834         (interp_lookup): Adjust.
835         (interpreter_completer): Adjust.
836
837 2017-10-19  Tom Tromey  <tom@tromey.com>
838
839         * break-catch-syscall.c (catch_syscall_completer): Use
840         std::string, gdb::unique_xmalloc_ptr.
841
842 2017-10-19  Tom Tromey  <tom@tromey.com>
843
844         * infcall.c (call_function_by_hand_dummy): Use std::string.
845
846 2017-10-19  Tom Tromey  <tom@tromey.com>
847
848         * mi/mi-main.c (mi_cmd_execute): Update.
849         * top.h (prepare_execute_command): Return scoped_value_mark.
850         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
851         Add move constructor.
852         * top.c (prepare_execute_command): Return scoped_value_mark.
853         (execute_command): Update.
854
855 2017-10-19  Pedro Alves  <palves@redhat.com>
856
857         * xml-support.c (xml_fetch_content_from_file): Check fread's
858         return.
859
860 2017-10-19  Pedro Alves  <palves@redhat.com>
861
862         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
863         async.
864         (handle_error_fd): New function.
865         (ser_base_async): Add/delete an event loop file handler for
866         error_fd.
867
868 2017-10-19  Pedro Alves  <palves@redhat.com>
869
870         * xml-support.c (xml_fetch_content_from_file): Don't read in
871         chunks.  Instead use fseek to determine the file's size, and read
872         it in one go.
873
874 2017-11-18  Keith Seitz  <keiths@redhat.com>
875
876         * c-exp.y (oper): Canonicalize conversion operators of user-defined
877         types.
878         Add whitespace to front of type name.
879
880 2017-10-18  Keith Seitz  <keiths@redhat.com>
881
882         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
883         DW_AT_accessibility.
884
885 2017-10-18  Yao Qi  <yao.qi@linaro.org>
886
887         * features/tic6x-c62x-linux.c: Remove.
888
889 2017-10-17  Tom Tromey  <tom@tromey.com>
890
891         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
892         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
893         (do_mixed_source_and_assembly): Likewise.
894
895 2017-10-17  Tom Tromey  <tom@tromey.com>
896
897         * regcache.c (regcache::xfer_part): Remove assertion.
898
899 2017-10-17  Pedro Alves  <palves@redhat.com>
900
901         * xml-support.c (xml_fetch_content_from_file): Call
902         unique_ptr::release() instead unique_ptr::get() when passing
903         through xrealloc.
904
905 2017-10-17  Yao Qi  <yao.qi@linaro.org>
906
907         * regcache.c (regcache::xfer_part): Remove parameters read and
908         write, add parameter is_raw.  All callers are updated.
909
910 2017-10-16  Keith Seitz  <keiths@redhat.com>
911
912         * c-typeprint.c (enum access_specifier): Moved here from
913         c_type_print_base.
914         (output_access_specifier): New function.
915         (c_type_print_base): Consider typedefs when assessing
916         whether access labels are needed.
917         Use output_access_specifier as needed.
918         Output access specifier for typedefs, if needed.
919         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
920         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
921         fields.
922         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
923         accessor macros.
924
925 2017-10-16  Tom Tromey  <tom@tromey.com>
926
927         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
928         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
929         * target.c (target_fileio_read_stralloc): Update.
930         * sparc64-tdep.c (adi_is_addr_mapped): Update.
931         * target.h (target_fileio_read_stralloc): Return
932         unique_xmalloc_ptr.
933
934 2017-10-16  Tom Tromey  <tom@tromey.com>
935
936         * xml-syscall.c (xml_init_syscalls_info): Update.
937         * xml-support.c (xinclude_start_include): Update.
938         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
939         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
940         (xml_fetch_content_from_file): Likewise.
941         * osdata.c (get_osdata): Update.
942         * target.h (target_read_stralloc, target_get_osdata): Return
943         unique_xmalloc_ptr.
944         * solib-aix.c (solib_aix_get_library_list): Update.
945         * solib-target.c (solib_target_current_sos): Update.
946         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
947         * xml-tdesc.c (fetch_available_features_from_target): Update.
948         (target_fetch_description_xml): Update.
949         (file_read_description_xml): Update.
950         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
951         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
952         (remote_pid_to_exec_file): Update.
953         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
954         (target_get_osdata): Likewise.
955
956 2017-10-16  Tom Tromey  <tom@tromey.com>
957
958         * remote.c (remote_register_number_and_offset): Use std::vector.
959         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
960         (putpkt_binary): Use gdb::def_vector.
961         (compare_sections_command): Use gdb::byte_vector.
962
963 2017-10-16  Tom Tromey  <tom@tromey.com>
964
965         * ppc-linux-nat.c (hwdebug_insert_point): Use
966         gdb::unique_xmalloc_ptr, XDUP.
967
968 2017-10-16  Tom Tromey  <tom@tromey.com>
969
970         * probe.c (parse_probes): Use std::string.
971         (info_probes_for_ops, enable_probes_command)
972         (disable_probes_command): Remove cleanups.
973
974 2017-10-16  Tom Tromey  <tom@tromey.com>
975
976         * buildsym.c (block_compar): Remove.
977         (end_symtab_get_static_block): Use std::vector.
978
979 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
980
981         * memrange.h (struct mem_range): Define operator< and operator==.
982         (mem_range_s): Remove.
983         (DEF_VEC_O (mem_range_s)): Remove.
984         (normalize_mem_ranges): Change parameter type to std::vector.
985         * memrange.c (compare_mem_ranges): Remove.
986         (normalize_mem_ranges): Change parameter type to std::vector,
987         adjust to vector change.
988         * exec.c (section_table_available_memory): Return vector, remove
989         parameter.
990         (section_table_read_available_memory): Adjust to std::vector
991         change.
992         * remote.c (remote_read_bytes): Adjust to std::vector
993         change.
994         * tracepoint.h (traceframe_available_memory): Change parameter
995         type to std::vector.
996         * tracepoint.c (traceframe_available_memory): Change parameter
997         type to std::vector, adjust.
998         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
999         std::vector change.
1000         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1001         unittests/memrange-selftests.c.
1002         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1003         * gdb/unittests/memrange-selftests.c: New file.
1004
1005 2017-10-16  Pedro Alves  <palves@redhat.com>
1006
1007         * elfread.c (probe_key_free): Rename range-for variable.
1008         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1009         (find_probe_by_pc, collect_probes): Rename range-for variable.
1010
1011 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1012
1013         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1014         * features/tic6x-c62x.c: Remove.
1015         * features/tic6x-c64x-linux.c: Remove.
1016         * features/tic6x-c64x.c: Remove.
1017         * features/tic6x-c64xp-linux.c: Remove.
1018         * features/tic6x-c64xp.c: Remove.
1019         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1020         initialize_tdesc_tic6x_*_linux functions.
1021         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1022         initialize_tdesc_tic6x_* functions.
1023
1024 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1025
1026         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1027         tic6x-c62x.
1028         * regformats/tic6x-c62x.dat: Remove.
1029         * regformats/tic6x-c64x.dat: Remove.
1030         * regformats/tic6x-c64xp.dat: Remove.
1031
1032 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1035         (the !HAVE_LIBEXPAT version).
1036
1037 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1038
1039         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1040         const.
1041
1042 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1043
1044         * target.h: Include tracepoint.h.
1045         (enum trace_find_type): Move to tracepoint.h.
1046         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1047         * tracepoint.h: Don't include target.h
1048         (enum trace_find_type): Move from target.h.
1049         (parse_traceframe_info): Return a unique ptr.
1050         * tracepoint.c (current_traceframe_info): Change type to unique
1051         ptr.
1052         (free_traceframe_info): Remove.
1053         (clear_traceframe_info): Don't manually free
1054         current_traceframe_info.
1055         (free_result): Remove.
1056         (parse_traceframe_info): Return a unique ptr.
1057         (get_traceframe_info): Adjust to unique ptr.
1058         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1059         * remote.c (remote_traceframe_info): Return a unique ptr.
1060         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1061         ptr.
1062         * target-debug.h (target_debug_print_traceframe_info_up): New
1063         macro.
1064         * target-delegates.c: Regenerate.
1065
1066 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1067
1068         * memrange.h (struct mem_range): Add constructors.
1069         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1070         std::vector<mem_range>.
1071         * tracepoint.c (free_traceframe_info): Don't manually free
1072         vector.
1073         (traceframe_info_start_memory): Adjust to vector change.
1074         (traceframe_available_memory): Likewise.
1075         * tracefile-tfile.c (build_traceframe_info): Likewise.
1076         * ctf.c (ctf_traceframe_info): Likewise.
1077
1078 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1079
1080         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1081         std::vector<int>.
1082         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1083         (traceframe_info_start_tvar): Adjust to vector change.
1084         (parse_traceframe_info): Allocate with new.
1085         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1086         vector change.
1087         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1088         change.
1089         tfile_traceframe_info): Allocate with new.
1090         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1091         change.
1092
1093 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1094
1095         * tracepoint.c (traceframe_info): Rename to...
1096         (current_traceframe_info): ...this.
1097         (clear_traceframe_info): Adjust.
1098         (get_traceframe_info): Adjust.
1099
1100 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1101
1102         * nat/linux-osdata.c: Include algorithm.
1103         (compare_processes): Remove.
1104         (struct pid_pgid_entry): New struct.
1105         (linux_xfer_osdata_processgroups): Use std::vector instead of
1106         XNEWVEC.
1107
1108 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1109
1110         * objfiles.h: Don't include symfile.h.
1111         (struct partial_symbol): Remove forward-declaration.
1112         (struct objfile) <global_psymbols, static_psymbols>: Change type
1113         to std::vector<partial_symbol *>.
1114         * objfiles.c (objfile::objfile): Don't memset those fields.
1115         (objfile::~objfile): Don't free those fields.
1116         * psympriv.h (struct psymbol_allocation_list): Remove
1117         forward-declaration.
1118         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1119         to std::vector.
1120         (start_psymtab_common): Change parameters to std::vector.
1121         * psymtab.c: Include algorithm.
1122         (require_partial_symbols): Call shrink_to_fit.
1123         (find_pc_sect_psymbol): Adjust to vector change.
1124         (match_partial_symbol): Likewise.
1125         (lookup_partial_symbol): Likewise.
1126         (psym_relocate): Likewise.
1127         (dump_psymtab): Likewise.
1128         (recursively_search_psymtabs): Likewise.
1129         (compare_psymbols): Remove.
1130         (sort_pst_symbols): Adjust to vector change.
1131         (start_psymtab_common): Likewise.
1132         (end_psymtab_common): Likewise.
1133         (psymbol_bcache_full): De-constify return value.
1134         (add_psymbol_to_bcache): Likewise.
1135         (extend_psymbol_list): Remove.
1136         (append_psymbol_to_list): Adjust to vector change.
1137         (add_psymbol_to_list): Likewise.
1138         (init_psymbol_list): Likewise.
1139         (maintenance_info_psymtabs): Likewise.
1140         (maintenance_check_psymtabs): Likewise.
1141         * symfile.h (struct psymbol_allocation_list): Remove.
1142         * symfile.c (reread_symbols): Adjust to vector change.
1143         * dbxread.c (start_psymtab): Change type of parameters.
1144         (dbx_symfile_read): Adjust to vector change.
1145         (read_dbx_symtab): Likewise.
1146         (start_psymtab): Change type of parameters.
1147         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1148         (create_partial_symtab): Likewise.
1149         (add_partial_symbol): Likewise.
1150         (write_one_signatured_type): Likewise.
1151         (recursively_write_psymbols): Likewise.
1152         * mdebugread.c (parse_partial_symbols): Likewise.
1153         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1154         (scan_xcoff_symtab): Adjust to vector change.
1155         (xcoff_initial_scan): Likewise.
1156
1157 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1158
1159         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1160
1161 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1162
1163         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1164         Remove s390x-*-expedite, add s390x-expedite.
1165
1166 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1167
1168         * features/s390-gs-linux64.c: Regenerated.
1169         * features/s390x-gs-linux64.c: Regenerated.
1170
1171 2017-10-13  Tom Tromey  <tom@tromey.com>
1172
1173         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1174         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1175         delete.
1176         * symfile.c (symbol_file_add_with_addrs): Use new.
1177         (symbol_file_add_separate): Update comment.
1178         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1179         * jit.c (jit_object_close_impl): Use new.
1180         (jit_unregister_code): Use delete.
1181         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1182         (~objfile): Rename from free_objfile.
1183         (free_objfile_separate_debug, do_free_objfile_cleanup)
1184         (free_all_objfiles, objfile_purge_solibs): Use delete.
1185         * objfiles.h (struct objfile): Add constructor and destructor.
1186         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1187         (allocate_objfile, free_objfile): Don't declare.
1188         (struct objstats): Add initializers.
1189
1190 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1191
1192         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1193         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1194         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1195         * gdbarch.h: Regenerate.
1196         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1197         Adjust comment.
1198         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1199         (i386_displaced_step_fixup): Adjust comment.
1200         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1201
1202 2017-10-12  Tom Tromey  <tom@tromey.com>
1203
1204         * prologue-value.h (pv_area::store_would_trash): Return bool.
1205         (pv_area::find_reg): Likewise.
1206         * prologue-value.c (pv_area::store_would_trash): Return bool.
1207         (pv_area::find_reg): Likewise.
1208
1209 2017-10-12  Tom Tromey  <tom@tromey.com>
1210
1211         * s390-linux-tdep.c (s390_store, s390_load)
1212         (s390_check_for_saved, s390_analyze_prologue): Update.
1213         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1214         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1215         * prologue-value.h (class pv_area): Move from prologue-value.c.
1216         Change names of members.  Add constructor, destructor, member
1217         functions.
1218         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1219         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1220         (pv_area_fetch, pv_area_scan): Don't declare.
1221         * prologue-value.c (struct pv_area::area_entry): Now member of
1222         pv_area.
1223         (struct pv_area): Move to prologue-value.h.
1224         (pv_area::pv_area): Rename from make_pv_area.
1225         (pv_area::~pv_area): Rename from free_pv_area.
1226         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1227         (clear_entries, find_entry, overlaps, store_would_trash, store)
1228         (fetch, find_reg, scan): Now member of pv_area.
1229         Remove "area" argument.  Update.
1230         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1231         Update.
1232         * mn10300-tdep.c (push_reg, check_for_saved)
1233         (mn10300_analyze_prologue): Update.
1234         * mep-tdep.c (is_arg_spill, check_for_saved)
1235         (mep_analyze_prologue): Update.
1236         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1237         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1238         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1239         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1240         Update.
1241         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1242         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1243
1244 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1245
1246         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1247         * linux-nat.c (linux_nat_delete_thread): New variable.
1248         (lwp_free): Invoke linux_nat_delete_thread if set.
1249         (linux_nat_set_delete_thread): New function.
1250         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1251         thread delete callback.
1252         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1253         (_initialize_arm_linux_nat): Assign thread delete callback.
1254         * s390-linux-nat.c (s390_delete_thread): New function.
1255         (_initialize_s390_nat): Assign thread delete callback.
1256         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1257         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1258         function.
1259         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1260         declaration.
1261         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1262         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1263
1264 2017-10-09  Tom Tromey  <tom@tromey.com>
1265
1266         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1267         std::string.
1268         * tui/tui-layout.c (enum tui_status): Use std::string.
1269
1270 2017-10-11  Tom Tromey  <tom@tromey.com>
1271
1272         * gdbthread.h (thread_command): Constify.
1273         * inferior.h (detach_command): Constify.
1274         * top.h (set_history, show_history): Constify.
1275         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1276         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1277         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1278         * printcmd.c (set_command): Constify.
1279         (non_const_set_command): New function.
1280         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1281         * breakpoint.c (enable_command, disable_command, delete_command)
1282         (catch_command, tcatch_command, set_breakpoint_cmd)
1283         (show_breakpoint_cmd): Constify.
1284         * macrocmd.c (macro_command): Constify.
1285         * infcmd.c (unset_command, kill_command, detach_command)
1286         (info_proc_cmd): Constify.
1287         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1288         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1289         (info_auto_load_cmd): Constify.
1290         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1291         (unset_tdesc_cmd): Constify.
1292         * ada-lang.c (set_ada_command, show_ada_command)
1293         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1294         * guile/guile.c (set_guile_command, show_guile_command)
1295         (info_guile_command): Constify.
1296         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1297         Constify.
1298         * skip.c (skip_command): Constify.
1299         * compile/compile.c (_initialize_compile): Constify.
1300         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1301         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1302         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1303         (maint_btrace_pt_show_cmd): Constify.
1304         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1305         Constify.
1306         * python/python.c (user_show_python, user_set_python): Constify.
1307         * mips-tdep.c (set_mips_command, show_mips_command)
1308         (set_mipsfpu_command): Constify.
1309         * record-btrace.c (cmd_record_btrace_start)
1310         (cmd_set_record_btrace, cmd_show_record_btrace)
1311         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1312         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1313         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1314         Constify.
1315         * symfile.c (overlay_command): Constify.
1316         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1317         * cli/cli-logging.c (set_logging_command, show_logging_command):
1318         Constify.
1319         * cli/cli-dump.c (dump_command, append_command)
1320         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1321         (tekhex_dump_command, binary_dump_command)
1322         (binary_append_command): Constify.
1323         * cli/cli-decode.c (struct cmd_list_element): Change type of
1324         "fun".
1325         * cli/cli-cmds.c (info_command, show_command, set_debug)
1326         (show_debug): Constify.
1327         (show_command): Add non-const overload.
1328         * top.c (set_history, show_history): Constify.
1329         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1330         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1331         * target.c (target_command): Constify.
1332         * sparc64-tdep.c (info_adi_command): Constify.
1333         * record-full.c (cmd_record_full_start): Constify.
1334         (set_record_full_command): Constify.  Fix typo.
1335         (show_record_full_command): Constify.
1336         * thread.c (thread_command, thread_apply_command): Constify.
1337         * memattr.c (dummy_cmd): Constify.
1338         * value.c (function_command): Constify.
1339         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1340         * probe.c (info_probes_command): Constify.
1341         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1342         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1343         (show_thread_cmd, set_thread_default_cmd)
1344         (show_thread_default_cmd): Constify.
1345         (check_empty): Constify.
1346         * tracepoint.c (tfind_command): Constify.
1347         * cp-support.c (maint_cplus_command): Constify.
1348         * windows-tdep.c (info_w32_command): Constify.
1349         * record.c (cmd_record_start, set_record_command)
1350         (show_record_command, info_record_command, cmd_record_goto):
1351         Constify.
1352         * ravenscar-thread.c (set_ravenscar_command)
1353         (show_ravenscar_command): Constify.
1354         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1355         Constify.
1356         (add_internal_problem_command): Remove casts.
1357         * arc-tdep.c (maintenance_print_arc_command): Constify.
1358         * valprint.c (set_print, show_print, set_print_raw)
1359         (show_print_raw): Constify.
1360         * maint.c (maintenance_command, maintenance_info_command)
1361         (maintenance_print_command, maintenance_set_cmd)
1362         (maintenance_show_cmd, set_per_command_cmd)
1363         (show_per_command_cmd, maintenance_check_command): Constify.
1364         * language.c (set_check, show_check): Constify.
1365         * typeprint.c (show_print_type, set_print_type): Constify.
1366         * go32-nat.c (go32_info_dos_command): Constify.
1367
1368 2017-10-11  Tom Tromey  <tom@tromey.com>
1369
1370         * breakpoint.c (prepare_re_set_context): Remove.
1371         (breakpoint_re_set_one): Update.  Don't use cleanups.
1372         (breakpoint_re_set): Use scoped_restore, std::string, and
1373         scoped_restore_current_language.
1374
1375 2017-10-11  Tom Tromey  <tom@tromey.com>
1376
1377         * breakpoint.c (commands_command_1): Use std::string.
1378         (cleanup_executing_breakpoints): Remove.
1379         (bpstat_do_actions_1): Use scoped_restore.
1380         (bpstat_check_watchpoint): Use std::string.
1381         (decode_static_tracepoint_spec): Likewise.
1382         (break_range_command): Likewise.
1383         (watch_command_1): Likewise.
1384         (compare_breakpoints): Change argument types.
1385         (clear_command): Use std::vector.
1386         (cleanup_executing_breakpoints): Remove.
1387         (update_global_location_list): Use unique_xmalloc_ptr.
1388         (strace_command): Remove unused declaration.
1389
1390 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1391
1392         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1393         * NEWS: Mention new FreeBSD/arm native configuration.
1394         * configure.host: Add arm*-*-freebsd*.
1395         * configure.nat: Likewise.
1396         * arm-fbsd-nat.c: New file.
1397
1398 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1399
1400         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1401         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1402         * NEWS: Mention new FreeBSD/arm target.
1403         * configure.tgt: Add arm*-*-freebsd*.
1404         * arm-fbsd-tdep.c: New file.
1405         * arm-fbsd-tdep.h: New file.
1406
1407 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1408
1409         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1410         `gdbarch_elfcore_write_linux_prpsinfo'.
1411         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1412         method.
1413         (elf_internal_linux_prpsinfo): Remove declaration.
1414         * gdbarch.h: Regenerate.
1415         * gdbarch.c: Regenerate.
1416
1417 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1418
1419         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1420         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1421
1422 2017-10-11  Pedro Alves  <palves@redhat.com>
1423
1424         * breakpoint.c (reattach_breakpoints): Delete.
1425         * breakpoint.h (reattach_breakpoints): Delete.
1426
1427 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1428
1429         * symfile.c (registered_sym_fns): Make struct, not typedef.
1430         (DEF_VEC_O (registered_sym_fns)): Remove.
1431         (symtab_fns): Change type to std::vector.
1432         (add_symtab_fns): Adjust.
1433         (find_sym_fns): Adjust.
1434
1435 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1436
1437         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1438         * arc-tdep.h (arc_arch_is_em): New function.
1439         (arc_arch_is_hs): Likewise.
1440
1441 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1442
1443         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1444         parentheses in the declaration.
1445         (macro_lookup_inclusion): Likewise.
1446         (macro_lookup_definition): Likewise.
1447         * p-lang.h (pascal_builtin_types): Likewise.
1448         * tui/tui-data.c (tui_win_list): Likewise.
1449         * tui/tui-data.h (tui_win_list): Likewise.
1450         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1451
1452 2017-10-11  Mark Rages  <markrages@gmail.com>
1453
1454         * target-memory.c (block_boundaries): Fix for block address not
1455         aligned on block size.
1456
1457 2017-10-10  Pedro Alves <palves@redhat.com>
1458             Tom Tromey  <tom@tromey.com>
1459
1460         * breakpoint.c (struct captured_breakpoint_query_args)
1461         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1462         (print_breakpoint): New.
1463         * breakpoint.h (print_breakpoint): Declare.
1464         * common/common-exceptions.h (enum return_reason): Remove
1465         references to catch_exceptions.
1466         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1467         Delete.
1468         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1469         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1470         * gdb.h: Delete.
1471         * gdbthread.h (thread_select): Declare.
1472         * mi/mi-cmd-break.c: Don't include gdb.h.
1473         (breakpoint_notify): Use print_breakpoint.
1474         * mi/mi-cmd-catch.c: Don't include gdb.h.
1475         * mi/mi-interp.c: Don't include gdb.h.
1476         (mi_print_breakpoint_for_event): New.
1477         (mi_breakpoint_created, mi_breakpoint_modified): Use
1478         mi_print_breakpoint_for_event.
1479         * mi/mi-main.c: Don't include gdb.h.
1480         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1481         thread_select instead of gdb_thread_select.
1482         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1483         of using gdb_list_thread_ids.
1484         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1485         FILEIO_ENOSYS here.
1486         (remote_fileio_request): Use TRY/CATCH instead of
1487         catch_exceptions.
1488         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1489         (symbol_file_add_from_memory_wrapper): Delete.
1490         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1491         * thread.c: Don't include gdb.h.
1492         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1493         (thread_alive): Use thread_select.
1494         (do_captured_thread_select): Delete, parts salvaged as ...
1495         (thread_select): ... this new function.
1496         (gdb_thread_select): Delete.
1497
1498 2017-10-10  Pedro Alves  <palves@redhat.com>
1499             Tom Tromey  <tom@tromey.com>
1500
1501         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1502         and reverse logic.
1503         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1504         No longer macros.  Instead ...
1505         (enum wp_check_result): They're now values of this new
1506         enumeration.
1507         (watchpoint_check): Change return type to wp_check_result and
1508         parameter type to bpstat.
1509         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1510         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1511         catch_errors.  Reverse logic of watchpoint_check call.
1512         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1513         pointer as parameter.
1514         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1515         * common/common-exceptions.c (throw_exception_sjlj): Update
1516         comments to avoid mentioning catch_errors.
1517         * exceptions.c (catch_errors): Delete.
1518         * exceptions.h: Update comments to avoid mentioning catch_errors.
1519         (catch_errors_ftype, catch_errors): Delete.
1520         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1521         (hook_stop_stub): Delete.
1522         (restore_selected_frame): Change return type to void, and
1523         parameter type to const frame_id &.
1524         (restore_infcall_control_state): Use TRY/CATCH instead of
1525         catch_errors.
1526         * main.c (captured_command_loop): Return void and remove
1527         parameter.  Remove references to catch_errors.
1528         (captured_main): Use TRY/CATCH instead of catch_errors.
1529         * objc-lang.c (objc_submethod_helper_data)
1530         (find_objc_msgcall_submethod_helper): Delete.
1531         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1532         catch_errors.
1533         * record-full.c (record_full_message): Return void.
1534         (record_full_message_args, record_full_message_wrapper): Delete.
1535         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1536         instead of catch_errors.
1537         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1538         parameter type to int.
1539         * solib-darwin.c (open_symbol_file_object): Ditto.
1540         * solib-dsbt.c (open_symbol_file_object): Ditto.
1541         * solib-frv.c (open_symbol_file_object): Ditto.
1542         * solib-svr4.c (open_symbol_file_object): Ditto.
1543         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1544         * solib.c (update_solib_list): Use TRY/CATCH instead of
1545         catch_errors.
1546         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1547         Change type.
1548         * symmisc.c (struct print_symbol_args): Remove.
1549         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1550         (print_symbol): Change type.
1551         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1552         and remove parameters.
1553         (catch_errors): New.
1554         (get_windows_debug_event): Adjust.
1555
1556 2017-10-09  Tom Tromey  <tom@tromey.com>
1557
1558         * mi/mi-main.c (free_splay_tree): Remove.
1559         (list_available_thread_groups): Use splay_tree_up.
1560         * common/gdb_splay_tree.h: New file.
1561
1562 2017-10-09  Tom Tromey  <tom@tromey.com>
1563
1564         * mi/mi-main.c (do_nothing): Remove.
1565         (list_available_thread_groups): Update.
1566
1567 2017-10-09  Pedro Alves  <palves@redhat.com>
1568
1569         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1570         reading registers when switching context.
1571
1572 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1573
1574         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1575         (fbsd_convert_siginfo): Likewise.
1576         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1577
1578 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1579
1580         * configure.ac (try_guile_versions): Remove guile-2.2.
1581         * configure: Regenerate.
1582
1583 2017-10-09  Tom Tromey  <tom@tromey.com>
1584
1585         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1586         (COMPILE.pre): Use $(CXX).
1587
1588 2017-10-09  Pedro Alves  <palves@redhat.com>
1589
1590         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1591         Use bool.
1592         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1593         * cp-support.h (cp_remove_params): Now returns a
1594         gdb::unique_xmalloc_ptr.
1595         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1596         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1597         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1598         returning a gdb::unique_xmalloc_ptr.
1599         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1600         * stack.c (find_frame_funname): Adjust to cp_remove_params
1601         returning a gdb::unique_xmalloc_ptr.
1602
1603 2017-10-08  Tom Tromey  <tom@tromey.com>
1604
1605         * dwarf2read.c (dwarf2_get_dwz_file): Use
1606         gdb::unique_xmalloc_ptr.
1607         (find_slot_in_mapped_hash): Likewise.
1608         (dwarf2_physname): Likewise.
1609         (create_dwo_unit_in_dwp_v1): Use std::string.
1610         (create_dwo_unit_in_dwp_v2): Likewise.
1611         (lookup_dwo_cutu): Likewise.
1612         (inherit_abstract_dies): Use std::vector.
1613         (read_array_type): Likewise.
1614         (dwarf_decode_macros): Remove unused declaration.
1615         (unsigned_int_compar): Remove.
1616         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1617         (psymtabs_addrmap_cleanup): Remove.
1618
1619 2017-10-08  Tom Tromey  <tom@tromey.com>
1620
1621         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1622         * frame.h (frame_cleanup_after_sniffer): Declare.
1623         (frame_prepare_for_sniffer): Return void.
1624         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1625         type of argument.
1626         (frame_prepare_for_sniffer): Return void.
1627
1628 2017-10-08  Tom Tromey  <tom@tromey.com>
1629
1630         * utils.h (make_cleanup_value_free): Remove.
1631         * utils.c (do_value_free, struct cleanup): Remove.
1632         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1633         Use gdb_value_up.
1634         * value.h (struct value_deleter): New.
1635         (gdb_value_up): New typedef.
1636
1637 2017-10-08  Tom Tromey  <tom@tromey.com>
1638
1639         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1640         (make_cleanup_free_search_symbols): Remove.
1641         (search_symbols): Return std::vector.
1642         (symbol_search::compare_search_syms): Now member of
1643         symbol_search.  Change arguments.
1644         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1645         (symtab_symbol_info, rbreak_command): Update.
1646         * symtab.h (struct symbol_search) <next>: Remove.
1647         Add constructors.
1648         (symbol_search::operator<): New function.
1649         (symbol_search::operator==): New function.
1650         (search_symbols): Remove std::vector.
1651         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1652         (symbol_search::compare_search_syms): Declare.
1653
1654 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1655
1656         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1657         arch/aarch64-insn.o.
1658         Remove one rule.
1659         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1660
1661 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1662
1663         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1664         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1665         arch/arm-linux.o respectively.
1666         * configure.tgt: Likewise.
1667
1668 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1669
1670         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1671         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1672
1673 2017-10-06  Pedro Alves  <palves@redhat.com>
1674
1675         * windows-nat.c: Include <algorithm>.
1676
1677 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1678
1679         * configure.tgt (i386_tobjs): New variable.
1680         (amd64_tobjs): New variable.
1681         Set $cpu_obs and $os_obs.
1682
1683 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1684
1685         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1686         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1687         (clean): Remove object files and dependency files.
1688         (distclean): Remove the directory.
1689         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1690         * configure: Re-generated.
1691         * configure.tgt: Replace amd64.o with arch/amd64.o.
1692
1693 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1694
1695         PR build/22188
1696         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1697         and SETEND.
1698
1699 2017-10-05  Pedro Alves  <palves@redhat.com>
1700
1701         * linux-nat.c (linux_child_follow_fork): When following the parent
1702         and detaching the child, consult the parent thread's architecture
1703         instead of the child's.
1704
1705 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1706
1707         * ax.h: Do not include "doublest.h".
1708         (union agent_val): Remove.
1709
1710 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1711
1712         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1713         (decimal_to_string): Return std::string object.
1714         (decimal_from_string): Accept std::string object.  Return bool.
1715         (decimal_from_integral, decimal_from_doublest): Remove.
1716         (decimal_from_longest): Add prototype.
1717         (decimal_from_ulongest): Likewise.
1718         (decimal_to_longest): Likewise.
1719         (decimal_from_doublest): Likewise.
1720         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1721         (MAX_DECIMAL_STRING): Move here.
1722         (decimal_to_string): Return std::string object.
1723         (decimal_from_string): Accept std::string object.  Return bool.
1724         (decimal_from_integral): Remove, replace by ...
1725         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1726         (decimal_to_longest): New function.
1727         (decimal_from_floating): Remove, replace by ...
1728         (decimal_from_doublest): ... this new function.
1729         (decimal_to_doublest): Update to new decimal_to_string interface.
1730
1731         * value.c (unpack_long): Use decimal_to_longest.
1732         * valops.c (value_cast): Use decimal_from_doublest instead of
1733         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1734         decimal_from_integral.
1735         * valarith.c (value_args_as_decimal): Likewise.
1736         * valprint.c (print_decimal_floating): Update to new
1737         decimal_to_string interface.
1738         * printcmd.c (printf_decfloat): Likewise.
1739         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1740
1741 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1742
1743         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1744         * gdbtypes.c: Include "floatformat.h".
1745         * value.c: Likewise.
1746         * m68k-tdep.c: Likewise.
1747
1748         * findvar.c: Do not include "floatformat.h".
1749         * amd64-darwin-tdep.c: Likewise.
1750         * arm-linux-tdep.c: Likewise.
1751         * i386-darwin-tdep.c: Likewise.
1752         * i387-tdep.c: Likewise.
1753         * m68k-linux-tdep.c: Likewise.
1754         * mep-tdep.c: Likewise.
1755         * mips-tdep.c: Likewise.
1756         * nios2-tdep.c: Likewise.
1757         * s390-linux-tdep.c: Likewise.
1758         * sparc-obsd-tdep.c: Likewise.
1759         * sparc-tdep.c: Likewise.
1760         * sparc64-tdep.c: Likewise.
1761         * spu-tdep.c: Likewise.
1762         * tic6x-tdep.c: Likewise.
1763         * tilegx-tdep.c: Likewise.
1764         * vax-tdep.c: Likewise.
1765         * xstormy16-tdep.c: Likewise.
1766         * xtensa-tdep.c: Likewise.
1767
1768         * top.c: Do not include "doublest.h".
1769         * aarch64-tdep.c: Likewise.
1770         * alpha-tdep.c: Likewise.
1771         * arm-linux-tdep.c: Likewise.
1772         * m68k-linux-tdep.c: Likewise.
1773         * tilegx-tdep.c: Likewise.
1774         * xstormy16-tdep.c: Likewise.
1775
1776 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1777
1778         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1779         (mipsn32_fbsd_sigframe): Define.
1780         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1781         for FreeBSD/mipsn32.
1782
1783 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1784
1785         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1786         AT_HWCAP.
1787
1788 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1789
1790         * MAINTAINERS (Misc): Update my email address.
1791
1792 2017-10-04  Pedro Alves  <palves@redhat.com>
1793
1794         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1795         it instead of target_gdbarch.
1796         (get_remote_state, get_remote_packet_size): Adjust
1797         get_remote_arch_state calls, passing down target_gdbarch
1798         explicitly.
1799         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1800         'gdbarch' and use it instead of target_gdbarch.
1801         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1802         passing down target_gdbarch explicitly.
1803         (struct stop_reply) <arch>: New field.
1804         (remote_parse_stop_reply): Use the stopped thread's architecture,
1805         not the current inferior's.  Save the architecture in the
1806         stop_reply.
1807         (process_stop_reply): Use the stop reply's architecture.
1808         (process_g_packet, remote_fetch_registers)
1809         (remote_prepare_to_store, store_registers_using_G)
1810         (remote_store_registers): Adjust get_remote_arch_state calls,
1811         using the regcache's architecture.
1812         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1813         passing down target_gdbarch explicitly.
1814         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1815         beneath instead of calling target_gdbarch.
1816         * target.c (default_thread_architecture): Use the specified
1817         inferior's architecture, instead of the current inferior's
1818         architecture (via target_gdbarch).
1819
1820 2017-10-04  Pedro Alves  <palves@redhat.com>
1821
1822         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1823         case.
1824         (regcache_print): Handle !target_has_registers here instead.
1825
1826 2017-10-04  Pedro Alves  <palves@redhat.com>
1827
1828         * frame.c (create_test_frame): Delete.
1829         * frame.h (create_test_frame): Delete.
1830         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1831         (class regcache_test): Delete.
1832         (test_target_has_registers, test_target_has_stack)
1833         (test_target_has_memory, test_target_prepare_to_store)
1834         (test_target_store_registers): New functions.
1835         (test_target_ops): New class.
1836         (register_to_value_test): Error out if there's already a
1837         process_stratum (or higher) target pushed.  Create a fuller mock
1838         environment, with mock target_ops, inferior, address space, thread
1839         and inferior_ptid.
1840         * progspace.c (struct address_space): Move to ...
1841         * progspace.h (struct address_space): ... here.
1842         * regcache.h (regcache::~regcache, regcache::raw_write)
1843         [GDB_SELF_TEST]: No longer virtual.
1844
1845 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1846
1847         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1848
1849 2017-10-04  Pedro Alves  <palves@redhat.com>
1850
1851         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1852         out of 'between TRY and CATCH'.
1853
1854 2017-10-04  Pedro Alves  <palves@redhat.com>
1855
1856         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1857         * common/common-exceptions.h (TRY): Open an outermost scope.
1858         Expand intro comment.
1859         (CATCH): Reindent.
1860         (END_CATCH): Close the outermost scope.
1861         * completer.c (complete_line_internal): Add missing END_CATCH.
1862
1863 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1864
1865         * NEWS (Changes since GDB 8.0): Add entry about new
1866         'set-cwd-on-gdbserver' feature.
1867         (New remote packets): Add entry for QSetWorkingDir.
1868         * common/common-inferior.h (set_inferior_cwd): New prototype.
1869         * infcmd.c (set_inferior_cwd): Remove "static".
1870         (show_cwd_command): Expand text to include remote debugging.
1871         * remote.c: Add PACKET_QSetWorkingDir.
1872         (remote_protocol_features) <QSetWorkingDir>: New entry for
1873         PACKET_QSetWorkingDir.
1874         (extended_remote_set_inferior_cwd): New function.
1875         (extended_remote_create_inferior): Call
1876         "extended_remote_set_inferior_cwd".
1877         (_initialize_remote): Call "add_packet_config_cmd" for
1878         QSetWorkingDir.
1879
1880 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1881
1882         * NEWS (New commands): Mention "set/show cwd".
1883         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1884         "cd" command's help text.
1885         * common/common-inferior.h (get_inferior_cwd): New prototype.
1886         * infcmd.c (inferior_cwd_scratch): New global variable.
1887         (set_inferior_cwd): New function.
1888         (get_inferior_cwd): Likewise.
1889         (set_cwd_command): Likewise.
1890         (show_cwd_command): Likewise.
1891         (_initialize_infcmd): Add "set/show cwd" commands.
1892         * inferior.h (class inferior) <cwd>: New field.
1893         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1894         (fork_inferior): Change inferior's cwd before its execution.
1895         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1896         to CreateProcess.
1897
1898 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1899
1900         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1901         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1902         (COMMON_OBS): Add gdb_tilde_expand.o.
1903         * common/gdb_tilde_expand.c: New file.
1904         * common/gdb_tilde_expand.h: Likewise.
1905
1906 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1907
1908         * gdbarch.sh (objfile): Remove duplicate declaration.
1909         * gdbarch.h: Regenerate.
1910
1911 2017-10-03  Tom Tromey  <tom@tromey.com>
1912
1913         * utils.c (internal_vproblem): Use string_vprintf.
1914
1915 2017-10-03  Tom Tromey  <tom@tromey.com>
1916
1917         * printcmd.c (info_symbol_command): Use std::string.
1918
1919 2017-10-03  Tom Tromey  <tom@tromey.com>
1920
1921         * top.c (gdb_safe_append_history): Use std::string.
1922
1923 2017-10-03  Tom Tromey  <tom@tromey.com>
1924
1925         * event-top.c (stdin_event_handler): Update.
1926         * main.c (captured_main_1): Update.
1927         * top.h (make_delete_ui_cleanup): Remove.
1928         (struct ui): Add constructor and destructor.
1929         (new_ui, delete_ui): Remove.
1930         * top.c (make_delete_ui_cleanup): Remove.
1931         (new_ui_command): Use std::unique_ptr.
1932         (delete_ui_cleanup): Remove.
1933         (ui::ui): Rename from new_ui.  Update.
1934         (free_ui): Remove.
1935         (ui::~ui): Rename from delete_ui.  Update.
1936
1937 2017-10-03  Tom Tromey  <tom@tromey.com>
1938
1939         * symfile.c (load_progress): Use gdb::byte_vector.
1940
1941 2017-10-03  Tom Tromey  <tom@tromey.com>
1942
1943         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1944         declaration.
1945         * printcmd.c (x_command): Remove unused declaration.
1946         * symfile.c (symbol_file_command): Remove unused declaration.
1947
1948 2017-10-03  Tom Tromey  <tom@tromey.com>
1949
1950         * utils.c (internal_vproblem): Use std::string.
1951         (defaulted_query): Likewise.
1952
1953 2017-10-03  Tom Tromey  <tom@tromey.com>
1954
1955         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1956         * top.c (execute_command_to_string): Update.
1957         * utils.c (make_cleanup_restore_page_info): Remove.
1958         (do_restore_page_info_cleanup): Remove.
1959         (set_batch_flag_and_restore_page_info):
1960         New.
1961         (make_cleanup_restore_page_info): Remove.
1962         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1963         (~set_batch_flag_and_restore_page_info): New
1964         (make_cleanup_restore_uinteger): Remove.
1965         (make_cleanup_restore_integer): Remove.
1966         (struct restore_integer_closure): Remove.
1967         (restore_integer): Remove.
1968         * utils.h (struct set_batch_flag_and_restore_page_info): New
1969         class.
1970         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1971         (make_cleanup_restore_page_info): Remove.
1972         (make_cleanup_restore_uinteger) Remove.
1973         (make_cleanup_restore_integer) Remove.
1974
1975 2017-10-03  Tom Tromey  <tom@tromey.com>
1976
1977         * record-full.h (record_full_gdb_operation_disable_set): Return
1978         scoped_restore_tmpl<int>.
1979         * infrun.c (adjust_pc_after_break): Update.
1980         (handle_signal_stop): Update.
1981         * record-full.c (record_full_gdb_operation_disable_set): Return
1982         scoped_restore_tmpl<int>.
1983         (record_full_wait_1, record_full_insert_breakpoint)
1984         (record_full_remove_breakpoint, record_full_save)
1985         (record_full_goto_insn): Update.
1986
1987 2017-10-02  Tom Tromey  <tom@tromey.com>
1988
1989         PR rust/22236:
1990         * rust-lang.c (rust_val_print_str): New function.
1991         (val_print_struct): Call it.
1992         (rust_subscript): Preserve name of slice type.
1993
1994 2017-10-02  Tom Tromey  <tom@tromey.com>
1995
1996         * rust-lang.c (rust_subscript): Handle slices in
1997         EVAL_AVOID_SIDE_EFFECTS case.
1998
1999 2017-10-02  Tom Tromey  <tom@tromey.com>
2000
2001         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2002
2003 2017-10-02  Tom Tromey  <tom@tromey.com>
2004
2005         * rust-lang.h (rust_slice_type): Add "extern".
2006
2007 2017-10-02  Tom Tromey  <tom@tromey.com>
2008             Pedro Alves  <palves@redhat.com>
2009
2010         * ada-lang.h (ada_exc_info::operator<): Make const.
2011         (ada_exc_info::operator==): Make const.
2012         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2013         Make const.
2014
2015 2017-09-29  Tom Tromey  <tom@tromey.com>
2016
2017         * target.c (read_whatever_is_readable): Change type of "result".
2018         Update.
2019         (free_memory_read_result_vector): Remove.
2020         (read_memory_robust): Change return type.  Update.
2021         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2022         bin2hex, std::string.
2023         * target.h (memory_read_result_s): Remove typedef.
2024         (free_memory_read_result_vector): Remove.
2025         (read_memory_robust): Return std::vector.
2026
2027 2017-09-29  Tom Tromey  <tom@tromey.com>
2028
2029         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2030
2031 2017-09-29  Tom Tromey  <tom@tromey.com>
2032
2033         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2034         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2035         operator< and operator==.
2036         (ada_exceptions_list): Return a std::vector.
2037         * ada-lang.c (ada_exc_info::operator<): Rename from
2038         compare_ada_exception_info.
2039         (ada_exc_info::operator==): New.
2040         (sort_remove_dups_ada_exceptions_list): Change type of
2041         "exceptions".
2042         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2043         (ada_add_global_exceptions): Likewise.
2044         (ada_exceptions_list_1): Return a std::vector.
2045         (ada_exceptions_list): Likewise.
2046
2047 2017-09-29  Tom Tromey  <tom@tromey.com>
2048
2049         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2050         'std::set *'.
2051         (print_one_inferior): Update.
2052         (free_vector_of_ints): Remove.
2053         (list_available_thread_groups): Change "ids" to std::set.
2054         (mi_cmd_list_thread_groups): Update.
2055         (struct collect_cores_data) <core>: Now a std::set.
2056         (collect_cores): Update.
2057         (unique): Remove.
2058         (print_one_inferior): Update.
2059
2060 2017-09-29  Tom Tromey  <tom@tromey.com>
2061
2062         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2063         (mi_execute_async_cli_command): Likewise.
2064         (mi_cmd_trace_frame_collected): Use field_fmt.
2065
2066 2017-09-29  Tom Tromey  <tom@tromey.com>
2067
2068         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2069         gdb::byte_vector.
2070
2071 2017-09-29  Tom Tromey  <tom@tromey.com>
2072
2073         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2074
2075 2017-09-29  Tom Tromey  <tom@tromey.com>
2076
2077         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2078
2079 2017-09-29  Tom Tromey  <tom@tromey.com>
2080
2081         * varobj.h (varobj_gen_name): Return std::string.
2082         * varobj.c (varobj_gen_name): Return std::string.
2083         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2084         (mi_cmd_var_delete): Don't copy "name".
2085
2086 2017-09-29  Tom Tromey  <tom@tromey.com>
2087
2088         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2089         (mi_cmd_break_insert_1): Update.
2090
2091 2017-09-29  Tom Tromey  <tom@tromey.com>
2092
2093         * target.h (make_scoped_defer_target_commit_resume): Update.
2094         * target.c (make_scoped_defer_target_commit_resume): Rename from
2095         make_cleanup_defer_target_commit_resume.  Return a
2096         scoped_restore.
2097         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2098
2099 2017-09-29  Tom Tromey  <tom@tromey.com>
2100
2101         * main.c (captured_main_1): Remove unused declaration.
2102         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2103
2104 2017-09-29  Tom Tromey  <tom@tromey.com>
2105
2106         * symtab.c (search_symbols): Remove unused outer cleanup.
2107         (make_source_files_completion_list): Remove unused declaration.
2108
2109 2017-09-29  Tom Tromey  <tom@tromey.com>
2110
2111         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2112
2113 2017-09-29  Tom Tromey  <tom@tromey.com>
2114
2115         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2116         gdb::byte_vector.
2117
2118 2017-09-29  Tom Tromey  <tom@tromey.com>
2119
2120         * complaints.c (vcomplaint): Use std::string.
2121
2122 2017-09-29  Tom Tromey  <tom@tromey.com>
2123
2124         * tracepoint.c (trace_variable_command): Use std::string.
2125         (encode_actions_1): Remove unused declarations.
2126         (create_tsv_from_upload): Use std::string.
2127
2128 2017-09-29  Tom Tromey  <tom@tromey.com>
2129
2130         * cp-support.c (gdb_demangle): Use std::string.
2131
2132 2017-09-29  Tom Tromey  <tom@tromey.com>
2133
2134         * stack.c (parse_frame_specification): Use std::string
2135         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2136
2137 2017-09-29  Tom Tromey  <tom@tromey.com>
2138
2139         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2140
2141 2017-09-29  Tom Tromey  <tom@tromey.com>
2142
2143         * utils.c (vfprintf_maybe_filtered): Use std::string.
2144         (vfprintf_unfiltered): Likewise.
2145
2146 2017-09-29  Tom Tromey  <tom@tromey.com>
2147
2148         * event-top.c (top_level_prompt): Return std::string.
2149         (display_gdb_prompt): Update.
2150
2151 2017-09-29  Tom Tromey  <tom@tromey.com>
2152
2153         * unittests/common-utils-selftests.c (format): New function.
2154         (string_vprintf_tests): New function.
2155         (_initialize_common_utils_selftests): Register new tests.
2156         * common/common-utils.c (string_vprintf): New function.
2157         * common/common-utils.h (string_vprintf): Declare.
2158
2159 2017-09-29  Pedro Alves  <palves@redhat.com>
2160
2161         * common/rsp-low.c (unpack_varlen_hex): Constify.
2162         * common/rsp-low.h (unpack_varlen_hex): Constify.
2163         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2164         Constify.
2165         * remote.c (remote_set_permissions, read_ptid)
2166         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2167         (remote_static_tracepoint_marker_at)
2168         (remote_static_tracepoint_markers_by_strid)
2169         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2170         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2171         (parse_tracepoint_definition, parse_tsv_definition)
2172         (parse_static_tracepoint_marker_definition): Constify.
2173         * tracepoint.h (parse_static_tracepoint_marker_definition)
2174         (parse_trace_status, parse_tracepoint_status)
2175         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2176
2177 2017-09-29  Pedro Alves  <palves@redhat.com>
2178
2179         * remote.c (target_buf, target_buf_size): Delete.
2180         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2181         Use the connection's packet buffer instead.
2182         All callers adjusted.
2183         (_initialize_remote): Remove references to target_buf and
2184         target_buf_size.
2185
2186 2017-09-28  Pedro Alves  <palves@redhat.com>
2187
2188         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2189         unittests/common-utils-selftests.c.
2190         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2191         (COMMON_OBS): Remove utils-selftests.o.
2192         * utils-selftests.c: Move to ...
2193         * unittests/common-utils-selftests.c: ... here and rename self
2194         test to "string_printf".
2195
2196 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2197
2198         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2199         having NULL cus or tus.
2200
2201 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2202
2203         * arm-tdep.c: (convert_from_extended): Remove.
2204         (convert_to_extended): Likewise.
2205         (arm_extract_return_value): Use convert_typed_floating.
2206         (arm_store_return_value): Likewise.
2207
2208         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2209         * sh-tdep.c: Do not include "floatformat.h".
2210         (sh_littlebyte_bigword_type): New function.
2211         (sh_register_convert_to_virtual): Use convert_typed_floating.
2212         (sh_register_convert_to_raw): Likewise.
2213         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2214         (sh64_littlebyte_bigword_type): New function.
2215         (sh64_extract_return_value): Use convert_typed_floating.
2216         (sh64_register_convert_to_virtual): Likewise.
2217         (sh64_register_convert_to_raw): Likewise.
2218
2219 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2220
2221         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2222         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2223
2224         * gdbtypes.h (union type_specific): Make field floatformat hold
2225         just a single struct floatformat, not an array.
2226         (floatformat_from_type): Move here.
2227         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2228         changed TYPE_FLOATFORMAT definition.
2229         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2230         (recursive_dump_type): Likewise.
2231         (init_float_type): Install correct floatformat for byte order.
2232         (arch_float_type): Likewise.
2233
2234 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2235
2236         * gdbtypes.c (init_type): Change incoming argument from
2237         length-in-bytes to length-in-bits.  Assert length is a
2238         multiple of TARGET_CHAR_BITS.
2239         (arch_type, arch_flags_type): Likewise.
2240         (init_integer_type): Update call to init_type.
2241         (init_character_type): Likewise.
2242         (init_boolean_type): Likewise.
2243         (init_float_type): Likewise.
2244         (init_decfloat_type): Likewise.
2245         (init_complex_type): Likewise.
2246         (init_pointer_type): Likewise.
2247         (objfile_type): Likewise.
2248         (arch_integer_type): Update call to arch_type.
2249         (arch_character_type): Likewise.
2250         (arch_boolean_type): Likewise.
2251         (arch_float_type): Likewise.
2252         (arch_decfloat_type): Likewise.
2253         (arch_complex_type): Likewise.
2254         (arch_pointer_type): Likewise.
2255         (gdbtypes_post_init): Likewise.
2256
2257         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2258         (read_base_type): Likewise.
2259         * mdebugread.c (basic_type): Likewise.
2260         * stabsread.c (dbx_init_float_type): Likewise.
2261         (rs6000_builtin_type): Likewise.
2262         (read_range_type): Likewise.  Also, fix call to init_integer_type
2263         with erroneous length argument.
2264
2265         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2266         * d-lang.c (build_d_types): Likewise.
2267         * f-lang.c (build_fortran_types): Likewise.
2268         * go-lang.c (build_go_types): Likewise.
2269         * opencl-lang.c (build_opencl_types): Likewise.
2270         * jit.c (finalize_symtab): Likewise.
2271         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2272         (build_std_type_info_type): Likewise.
2273         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2274         update call to arch_flags_type.
2275
2276         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2277         arch_type.
2278         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2279         * windows-tdep.c (windows_get_tlb_type): Likewise.
2280
2281         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2282         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2283         * m32c-tdep.c (make_types): Likewise.
2284         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2285         (rl78_psw_type): Update call to arch_flags_type.
2286         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2287         * rx-tdep.c (rx_psw_type): Likewise.
2288         (rx_fpsw_type): Likewise.
2289         * sparc-tdep.c (sparc_psr_type): Likewise.
2290         (sparc_fsr_type): Likewise.
2291         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2292         (sparc64_ccr_type): Likewise.
2293         (sparc64_fsr_type): Likewise.
2294         (sparc64_fprs_type): Likewise.
2295
2296 2017-09-27  Tom Tromey  <tom@tromey.com>
2297
2298         * findcmd.c (find_command): Constify.
2299
2300 2017-09-27  Tom Tromey  <tom@tromey.com>
2301
2302         * ada-tasks.c (task_command_1, task_command): Constify.
2303
2304 2017-09-27  Tom Tromey  <tom@tromey.com>
2305
2306         * symtab.c (maintenance_print_symbol_cache)
2307         (maintenance_flush_symbol_cache)
2308         (maintenance_print_symbol_cache_statistics): Constify.
2309
2310 2017-09-27  Tom Tromey  <tom@tromey.com>
2311
2312         * inferior.c (detach_inferior_command, kill_inferior_command)
2313         (inferior_command): Constify.
2314
2315 2017-09-27  Tom Tromey  <tom@tromey.com>
2316
2317         * regcache.c (regcache_print, maintenance_print_registers)
2318         (maintenance_print_raw_registers)
2319         (maintenance_print_cooked_registers)
2320         (maintenance_print_register_groups)
2321         (maintenance_print_remote_registers): Constify.
2322
2323 2017-09-27  Tom Tromey  <tom@tromey.com>
2324
2325         * printcmd.c (map_display_numbers, undisplay_command)
2326         (enable_disable_display_command, enable_display_command)
2327         (disable_display_command): Constify.
2328
2329 2017-09-27  Tom Tromey  <tom@tromey.com>
2330
2331         * breakpoint.h (delete_command): Don't declare.
2332         * breakpoint.c (delete_command, enable_once_command)
2333         (enable_count_command, enable_delete_command, breakpoint_1)
2334         (maintenance_info_breakpoints, stopin_command, stopat_command)
2335         (delete_command, delete_trace_command, save_breakpoints)
2336         (save_breakpoints_command, save_tracepoints_command): Constify.
2337
2338 2017-09-27  Tom Tromey  <tom@tromey.com>
2339
2340         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2341         (skip_ws, extract_identifier, macro_define_command)
2342         (macro_undef_command, macro_list_command): Constify.
2343
2344 2017-09-27  Tom Tromey  <tom@tromey.com>
2345
2346         * infcmd.c (environment_info, set_environment_command)
2347         (unset_environment_command, path_info, info_proc_cmd_1)
2348         (info_proc_cmd_mappings, info_proc_cmd_stat)
2349         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2350         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2351
2352 2017-09-27  Tom Tromey  <tom@tromey.com>
2353
2354         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2355         Constify.
2356
2357 2017-09-27  Tom Tromey  <tom@tromey.com>
2358
2359         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2360
2361 2017-09-27  Tom Tromey  <tom@tromey.com>
2362
2363         * demangle.c (demangle_command): Constify.
2364
2365 2017-09-27  Tom Tromey  <tom@tromey.com>
2366
2367         * progspace.c (maintenance_info_program_spaces_command):
2368         Constify.
2369
2370 2017-09-27  Tom Tromey  <tom@tromey.com>
2371
2372         * compile/compile.c (check_raw_argument, compile_file_command)
2373         (compile_code_command, compile_print_command): Constify.
2374
2375 2017-09-27  Tom Tromey  <tom@tromey.com>
2376
2377         * reggroups.c (maintenance_print_reggroups): Constify.
2378
2379 2017-09-27  Tom Tromey  <tom@tromey.com>
2380
2381         * dwarf2read.c (save_gdb_index_command): Constify.
2382
2383 2017-09-27  Tom Tromey  <tom@tromey.com>
2384
2385         * stap-probe.c (info_probes_stap_command): Constify.
2386
2387 2017-09-27  Tom Tromey  <tom@tromey.com>
2388
2389         * fork-child.c (unset_exec_wrapper_command): Constify.
2390
2391 2017-09-27  Tom Tromey  <tom@tromey.com>
2392
2393         * btrace.c (get_uint, get_context_size, no_chunk)
2394         (maint_btrace_packet_history_cmd)
2395         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2396         (maint_info_btrace_cmd): Constify.
2397
2398 2017-09-27  Tom Tromey  <tom@tromey.com>
2399
2400         * reverse.c (delete_bookmark_command): Constify.
2401
2402 2017-09-27  Tom Tromey  <tom@tromey.com>
2403
2404         * remote.c (set_memory_packet_size)
2405         (set_memory_write_packet_size, show_memory_write_packet_size)
2406         (set_memory_read_packet_size, show_memory_read_packet_size)
2407         (compare_sections_command, packet_command, remote_put_command)
2408         (remote_get_command, remote_delete_command): Constify.
2409
2410 2017-09-27  Tom Tromey  <tom@tromey.com>
2411
2412         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2413         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2414         (set_mipsfpu_auto_command): Constify.
2415
2416 2017-09-27  Tom Tromey  <tom@tromey.com>
2417
2418         * cli/cli-cmds.h (cd_command): Constify.
2419         * cli/cli-cmds.c (cd_command): Constify.
2420
2421 2017-09-27  Tom Tromey  <tom@tromey.com>
2422
2423         * thread.c (thread_name_command, thread_find_command): Constify.
2424
2425 2017-09-27  Tom Tromey  <tom@tromey.com>
2426
2427         * probe.c (enable_probes_command, disable_probes_command):
2428         Constify.
2429
2430 2017-09-27  Tom Tromey  <tom@tromey.com>
2431
2432         * symfile.c (symbol_file_command): Constify.
2433         * gdbcore.h (deprecated_file_changed_hook): Constify.
2434         * exec.c (deprecated_file_changed_hook, exec_file_command)
2435         (file_command): Constify.
2436         * defs.h (symbol_file_command): Constify.
2437
2438 2017-09-27  Tom Tromey  <tom@tromey.com>
2439
2440         * remote-fileio.c (set_system_call_allowed)
2441         (show_system_call_allowed): Constify.
2442
2443 2017-09-27  Tom Tromey  <tom@tromey.com>
2444
2445         * tracepoint.c (delete_trace_variable_command)
2446         (tfind_end_command, tfind_start_command, tfind_pc_command)
2447         (tfind_tracepoint_command, tfind_line_command)
2448         (tfind_range_command, tfind_outside_command): Constify.
2449
2450 2017-09-27  Tom Tromey  <tom@tromey.com>
2451
2452         * ax-gdb.c (maint_agent_printf_command, agent_command)
2453         (agent_eval_command): Constify.
2454
2455 2017-09-27  Tom Tromey  <tom@tromey.com>
2456
2457         * tracepoint.c (info_scope_command): Constify.
2458         * python/python.c (gdbpy_decode_line): Constify.
2459         * python/py-breakpoint.c (bppy_init): Constify.
2460         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2461         * location.h: (new_linespec_location)
2462         (string_to_event_location_basic, string_to_event_location):
2463         Constify.
2464         * location.c (new_linespec_location)
2465         (string_to_event_location_basic, string_to_event_location):
2466         Constify.
2467         * linespec.h (decode_line_with_current_source)
2468         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2469         * linespec.c (linespec_lex_to_end)
2470         (decode_line_with_current_source)
2471         (decode_line_with_last_displayed): Constify.
2472         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2473         Constify.
2474         * cli/cli-cmds.c (edit_command, list_command): Constify.
2475         * breakpoint.h (until_break_command, watch_command_wrapper)
2476         (awatch_command_wrapper, rwatch_command_wrapper)
2477         (init_ada_exception_breakpoint): Constify.
2478         * breakpoint.c (break_command_1, dprintf_command)
2479         (break_range_command, watch_command_wrapper)
2480         (rwatch_command_wrapper, awatch_command_wrapper)
2481         (until_break_command, init_ada_exception_breakpoint)
2482         (strace_marker_create_sals_from_location, trace_command)
2483         (ftrace_command, strace_command, struct tracepoint): Constify.
2484         * ax-gdb.c (agent_command_1): Constify.
2485         * ada-lang.c (ada_exception_sal): Constify.
2486
2487 2017-09-27  Tom Tromey  <tom@tromey.com>
2488
2489         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2490         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2491         (get_context_size, no_chunk, get_insn_history_modifiers)
2492         (cmd_record_insn_history, get_call_history_modifiers)
2493         (cmd_record_call_history): Constify.
2494
2495 2017-09-27  Tom Tromey  <tom@tromey.com>
2496
2497         * source.c (show_substitute_path_command)
2498         (unset_substitute_path_command, set_substitute_path_command):
2499         Constify.
2500
2501 2017-09-27  Tom Tromey  <tom@tromey.com>
2502
2503         * typeprint.c (maintenance_print_type): Constify.
2504         * maint.c (maintenance_dump_me, maintenance_demangle)
2505         (maintenance_time_display, maintenance_info_sections)
2506         (maintenance_print_statistics, maintenance_deprecate)
2507         (maintenance_undeprecate): Constify.
2508         (maintenance_do_deprecate): Constify.  Use std::string.
2509         (maintenance_selftest): Constify.
2510         * gdbtypes.h (maintenance_print_type): Constify.
2511
2512 2017-09-27  Tom Tromey  <tom@tromey.com>
2513
2514         * hppa-tdep.c (unwind_command): Constify.
2515
2516 2017-09-27  Tom Tromey  <tom@tromey.com>
2517
2518         * target-descriptions.c (unset_tdesc_filename_cmd)
2519         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2520         Constify.
2521
2522 2017-09-27  Tom Tromey  <tom@tromey.com>
2523
2524         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2525
2526 2017-09-27  Tom Tromey  <tom@tromey.com>
2527
2528         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2529
2530 2017-09-27  Tom Tromey  <tom@tromey.com>
2531
2532         * tui/tui-regs.c (tui_reg_command): Constify.
2533
2534 2017-09-27  Tom Tromey  <tom@tromey.com>
2535
2536         * skip.c (skip_file_command, skip_function_command)
2537         (skip_enable_command, skip_disable_command, skip_delete_command):
2538         Constify.
2539
2540 2017-09-27  Tom Tromey  <tom@tromey.com>
2541
2542         * record-btrace.c (cmd_record_btrace_bts_start)
2543         (cmd_record_btrace_pt_start): Constify.
2544
2545 2017-09-27  Tom Tromey  <tom@tromey.com>
2546
2547         * symmisc.c (maintenance_print_symbols)
2548         (maintenance_print_msymbols, maintenance_print_objfiles)
2549         (maintenance_info_symtabs, maintenance_check_symtabs)
2550         (maintenance_expand_symtabs, maintenance_info_line_tables):
2551         Constify.
2552
2553 2017-09-27  Tom Tromey  <tom@tromey.com>
2554
2555         * top.c (new_ui_command): Constify.
2556
2557 2017-09-27  Tom Tromey  <tom@tromey.com>
2558
2559         * symfile.c (add_symbol_file_command)
2560         (remove_symbol_file_command, list_overlays_command)
2561         (map_overlay_command, unmap_overlay_command)
2562         (overlay_auto_command, overlay_manual_command)
2563         (overlay_off_command, overlay_load_command): Constify.
2564
2565 2017-09-27  Tom Tromey  <tom@tromey.com>
2566
2567         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2568         (info_spu_mailbox_command, info_spu_dma_command)
2569         (info_spu_proxydma_command): Constify.
2570
2571 2017-09-27  Tom Tromey  <tom@tromey.com>
2572
2573         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2574
2575 2017-09-27  Tom Tromey  <tom@tromey.com>
2576
2577         * cli/cli-script.c (user_defined_command): Constify.
2578
2579 2017-09-27  Tom Tromey  <tom@tromey.com>
2580
2581         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2582         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2583         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2584         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2585         (dump_binary_value, append_binary_memory, append_binary_value):
2586         Constify.
2587         (struct dump_context) <func>: Constify.
2588         (add_dump_command): Update.
2589
2590 2017-09-27  Tom Tromey  <tom@tromey.com>
2591
2592         * cli/cli-cmds.c (show_version, show_configuration)
2593         (source_command, show_user): Constify.
2594
2595 2017-09-27  Tom Tromey  <tom@tromey.com>
2596
2597         * target.c (maintenance_print_target_stack): Constify.
2598
2599 2017-09-27  Tom Tromey  <tom@tromey.com>
2600
2601         * interps.c (interpreter_exec_cmd): Constify.
2602
2603 2017-09-27  Tom Tromey  <tom@tromey.com>
2604
2605         * record-full.c (cmd_record_full_restore): Constify.
2606
2607 2017-09-27  Tom Tromey  <tom@tromey.com>
2608
2609         * memattr.c (enable_mem_command, disable_mem_command)
2610         (delete_mem_command): Constify.
2611
2612 2017-09-27  Tom Tromey  <tom@tromey.com>
2613
2614         * value.c (show_convenience): Constify.
2615
2616 2017-09-27  Tom Tromey  <tom@tromey.com>
2617
2618         * gdbcore.h (core_file_command): Update.
2619         * corefile.c (core_file_command): Constify.
2620
2621 2017-09-27  Tom Tromey  <tom@tromey.com>
2622
2623         * user-regs.c (maintenance_print_user_registers): Constify.
2624
2625 2017-09-27  Tom Tromey  <tom@tromey.com>
2626
2627         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2628
2629 2017-09-27  Tom Tromey  <tom@tromey.com>
2630
2631         * cp-support.c (first_component_command): Constify.
2632
2633 2017-09-27  Tom Tromey  <tom@tromey.com>
2634
2635         * psymtab.c (maintenance_print_psymbols)
2636         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2637         Constify.
2638
2639 2017-09-27  Tom Tromey  <tom@tromey.com>
2640
2641         * windows-tdep.c (display_tib): Constify.
2642
2643 2017-09-27  Tom Tromey  <tom@tromey.com>
2644
2645         * linux-fork.c (delete_checkpoint_command)
2646         (detach_checkpoint_command): Constify.
2647
2648 2017-09-27  Tom Tromey  <tom@tromey.com>
2649
2650         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2651
2652 2017-09-27  Tom Tromey  <tom@tromey.com>
2653
2654         * arc-tdep.c (dump_arc_instruction_command): Constify.
2655
2656 2017-09-27  Tom Tromey  <tom@tromey.com>
2657
2658         * valprint.c (set_radix, show_radix): Constify.
2659
2660 2017-09-27  Tom Tromey  <tom@tromey.com>
2661
2662         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2663
2664 2017-09-27  Tom Tromey  <tom@tromey.com>
2665
2666         * command.h (not_just_help_class_command): Update.
2667         * cli/cli-decode.h (not_just_help_class_command): Update.
2668         * cli/cli-decode.c (not_just_help_class_command): Constify.
2669
2670 2017-09-27  Tom Tromey  <tom@tromey.com>
2671
2672         * gdb_bfd.c (maintenance_info_bfds): Constify.
2673
2674 2017-09-27  Tom Tromey  <tom@tromey.com>
2675
2676         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2677         overloads.
2678         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2679         (do_const_cfunc): New function.
2680         (cmd_cfunc_eq): New overload.
2681         (cli_user_command_p): Check do_const_cfunc.
2682         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2683         const_cfunc.
2684         * command.h (add_cmd): Add const overload and no-function
2685         overload.
2686         (set_cmd_cfunc): Add const overload.
2687         (cmd_const_cfunc_ftype): Declare.
2688         (cmd_cfunc_eq): Add const overload.
2689         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2690         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2691         overload.
2692
2693 2017-09-27  Tom Tromey  <tom@tromey.com>
2694
2695         * macroexp.c (get_next_token_for_substitution): New function.
2696         (substitute_args): Call it.  Check for __VA_OPT__.
2697
2698 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2699             Pedro Alves <palves@redhat.com>
2700
2701         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2702         producer_is_icc_lt_14.
2703         (producer_is_icc_lt_14): New function.
2704         (check_producer): Add code for checking version of ICC.
2705         (producer_is_icc): Move to producer.c.
2706         (read_structure_type): Restrict ICC workaround to ICC<14.
2707         * producer.c: Include selftest.h.
2708         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2709         New functions.
2710         * producer.h (producer_is_icc): New declaration.
2711
2712 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2713
2714         * Makefile.in (SFILES): Add producer.c.
2715         (COMMON_OBS): Add producer.o
2716         * amd64-tdep.c (producer.h): Add new include.
2717         * dwarf2read.c (producer.h): Add new include.
2718         * producer.c: New file.
2719         * producer.h: New file.
2720         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2721         producer.c.
2722         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2723         producer.h.
2724
2725 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2726
2727         * configure.ac: Search ncursesw before ncurses.
2728         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2729         * gdb_curses.h: Include <ncursesw/ncurses.h>
2730         * config.in, configure: Regenerate.
2731
2732 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2733
2734         PR gdb/22185
2735         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2736         obsolete.
2737         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2738         Remove i386sol2 support.
2739         * configure.nat <i386sol2>: Remove.
2740         <sol2-64>: Fold into ...
2741         <sol2>: ... this.
2742         Move common settings to default section.
2743         Add sol-thread.o.
2744         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2745         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2746         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2747         <i[34567]86-*-solaris*>: Remove.
2748         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2749
2750         * configure.ac: Remove wctype in libw check.
2751         (_MSE_INT_H): Don't define on Solaris 7-9.
2752         <solaris*>: Remove libthread_db.so.1 check.
2753         * configure: Regenerate.
2754         * config.in: Regenerate.
2755
2756         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2757         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2758         (gdb_ps_size_t): Remove.
2759         Use base types in users.
2760         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2761
2762         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2763
2764 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2765
2766         PR build/22206
2767         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2768         (adi_is_addr_mapped): Likewise.
2769         (PSR_ICC): Don't redefine.
2770         (PSR_IMPL): Likewise.
2771
2772 2017-09-25  Tom Tromey  <tom@tromey.com>
2773
2774         * regcache.c (regcache::dump): Use string_printf.
2775
2776 2017-09-25  Tom Tromey  <tom@tromey.com>
2777
2778         * regcache.c (class regcache_invalidator): New.
2779         (struct register_to_invalidate): Remove.
2780         (make_cleanup_regcache_invalidate): Remove.
2781         (regcache::raw_write): Use regcache_invalidator.
2782
2783 2017-09-25  Tom Tromey  <tom@tromey.com>
2784
2785         * spu-tdep.c (spu2ppu_sniffer): Update.
2786         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2787         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2788         Remove.
2789         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2790         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2791         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2792         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2793         (frame_pop): Update.
2794
2795 2017-09-25  Tom Tromey  <tom@tromey.com>
2796
2797         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2798         * regcache.h (regcache_xfree): Don't declare.
2799         * regcache.c (regcache_xfree): Remove.
2800         (do_regcache_xfree): Use delete.
2801         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2802         * linux-fork.c (free_fork): Use delete.
2803         (fork_save_infrun_state): Likewise.
2804         * jit.c (jit_dealloc_cache): Use delete.
2805         * infrun.c (discard_infcall_suspend_state): Use delete.
2806
2807 2017-09-25  Tom Tromey  <tom@tromey.com>
2808
2809         * regcache.h (regcache_xmalloc): Don't declare.
2810         (regcache_raw_set_cached_value): Update comment.
2811         * regcache.c (regcache_xmalloc): Remove.
2812         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2813         * jit.c (jit_frame_sniffer): Use new.
2814         * frame.c (frame_save_as_regcache): Use new.
2815
2816 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2817
2818         * NEWS: Advertise support for guarded-storage registers on IBM z.
2819
2820 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2821
2822         * s390-linux-nat.c (have_regset_gs): New static variable.
2823         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2824         control block and guarded-storage broadcast control regsets.
2825         (s390_read_description): Detect whether the target has
2826         guarded-storage support, return appropriate tdesc.
2827         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2828         (features/s390x-gs-linux64.c): Likewise.
2829         (struct gdbarch_tdep) <have_gs>: New field.
2830         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2831         (s390_gsbc_regset): New variables.
2832         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2833         and s390_gsbc_regset, if applicable.
2834         (s390_core_read_description): Check whether core file was from a
2835         target with guarded-storage support; include appropriate regsets.
2836         (s390_gdbarch_init): Add registers for guarded-storage support.
2837         (_initialize_s390_tdep): Initialize new target descriptions that
2838         include registers for guarded-storage support.
2839         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2840         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2841         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2842         (S390_NUM_REGS): Adjust macro definition.
2843         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2844         (tdesc_s390x_gs_linux64): New declarations.
2845
2846 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2847
2848         * features/s390-gs-linux64.xml: New file.
2849         * features/s390-gs.xml: New file.
2850         * features/s390-gsbc.xml: New file.
2851         * features/s390x-gs-linux64.xml: New file.
2852         * features/Makefile (WHICH): Add s390-gs-linux64 and
2853         s390x-gs-linux64.
2854         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2855         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2856         * features/s390-gs-linux64.c: New generated file.
2857         * features/s390x-gs-linux64.c: New file.
2858         * regformats/s390-gs-linux64.dat: New file.
2859         * regformats/s390x-gs-linux64.dat: New file.
2860
2861 2017-09-23  Tom Tromey  <tom@tromey.com>
2862
2863         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2864
2865 2017-09-22  Tom Tromey  <tom@tromey.com>
2866
2867         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2868         type to scoped_restore_tmpl.
2869         <scoped_input_handler>: Initialize m_quit_handler directly.
2870
2871 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2872
2873         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2874         (cd_command): Likewise.  Free "current_directory" before
2875         assigning to it.
2876         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2877         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2878         * top.c (gdb_dirbuf): Remove global declaration.
2879         * top.h (gdb_dirbuf): Likewise.
2880
2881 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2882
2883         * gnulib/aclocal.m4: Regenerate.
2884         * gnulib/config.in: Regenerate.
2885         * gnulib/configure: Regenerate.
2886         * gnulib/import/Makefile.am: Regenerate.
2887         * gnulib/import/Makefile.in: Regenerate.
2888         * gnulib/import/assure.h: New file.
2889         * gnulib/import/at-func.c: Likewise
2890         * gnulib/import/chdir-long.c: New file.
2891         * gnulib/import/chdir-long.h: New file.
2892         * gnulib/import/cloexec.c: New file.
2893         * gnulib/import/cloexec.h: New file.
2894         * gnulib/import/close.c: New file.
2895         * gnulib/import/closedir.c: New file.
2896         * gnulib/import/dirent-private.h: New file.
2897         * gnulib/import/dup-safer.c: New file.
2898         * gnulib/import/dup.c: New file.
2899         * gnulib/import/dup2.c: New file.
2900         * gnulib/import/error.c: New file.
2901         * gnulib/import/error.h: New file.
2902         * gnulib/import/exitfail.c: New file.
2903         * gnulib/import/exitfail.h: New file.
2904         * gnulib/import/fchdir.c: New file.
2905         * gnulib/import/fcntl.c: New file.
2906         * gnulib/import/fcntl.in.h: New file.
2907         * gnulib/import/fd-hook.c: New file.
2908         * gnulib/import/fd-hook.h: New file.
2909         * gnulib/import/fd-safer.c: New file.
2910         * gnulib/import/fdopendir.c: New file.
2911         * gnulib/import/filename.h: New file.
2912         * gnulib/import/filenamecat-lgpl.c: New file.
2913         * gnulib/import/filenamecat.h: New file.
2914         * gnulib/import/fstat.c: New file.
2915         * gnulib/import/fstatat.c: New file.
2916         * gnulib/import/getcwd-lgpl.c: New file.
2917         * gnulib/import/getcwd.c: New file.
2918         * gnulib/import/getdtablesize.c: New file.
2919         * gnulib/import/getlogin_r.c: New file.
2920         * gnulib/import/getprogname.c: New file.
2921         * gnulib/import/getprogname.h: New file.
2922         * gnulib/import/gettext.h: New file.
2923         * gnulib/import/glob-libc.h: New file.
2924         * gnulib/import/glob.c: New file.
2925         * gnulib/import/glob.in.h: New file.
2926         * gnulib/import/intprops.h: New file.
2927         * gnulib/import/m4/chdir-long.m4: New file.
2928         * gnulib/import/m4/close.m4: New file.
2929         * gnulib/import/m4/closedir.m4: New file.
2930         * gnulib/import/m4/d-ino.m4: New file.
2931         * gnulib/import/m4/d-type.m4: New file.
2932         * gnulib/import/m4/dup.m4: New file.
2933         * gnulib/import/m4/dup2.m4: New file.
2934         * gnulib/import/m4/error.m4: New file.
2935         * gnulib/import/m4/fchdir.m4: New file.
2936         * gnulib/import/m4/fcntl.m4: New file.
2937         * gnulib/import/m4/fcntl_h.m4: New file.
2938         * gnulib/import/m4/fdopendir.m4: New file.
2939         * gnulib/import/m4/filenamecat.m4: New file.
2940         * gnulib/import/m4/fstat.m4: New file.
2941         * gnulib/import/m4/fstatat.m4: New file.
2942         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2943         * gnulib/import/m4/getcwd-path-max.m4: New file.
2944         * gnulib/import/m4/getcwd.m4: New file.
2945         * gnulib/import/m4/getdtablesize.m4: New file.
2946         * gnulib/import/m4/getlogin_r.m4: New file.
2947         * gnulib/import/m4/getprogname.m4: New file.
2948         * gnulib/import/m4/glob.m4: New file.
2949         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2950         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2951         * gnulib/import/m4/mempcpy.m4: New file.
2952         * gnulib/import/m4/memrchr.m4: New file.
2953         * gnulib/import/m4/mode_t.m4: New file.
2954         * gnulib/import/m4/msvc-inval.m4: New file.
2955         * gnulib/import/m4/msvc-nothrow.m4: New file.
2956         * gnulib/import/m4/open.m4: New file.
2957         * gnulib/import/m4/openat.m4: New file.
2958         * gnulib/import/m4/opendir.m4: New file.
2959         * gnulib/import/m4/readdir.m4: New file.
2960         * gnulib/import/m4/realloc.m4: New file.
2961         * gnulib/import/m4/rewinddir.m4: New file.
2962         * gnulib/import/m4/save-cwd.m4: New file.
2963         * gnulib/import/m4/strdup.m4: New file.
2964         * gnulib/import/m4/strerror.m4: New file.
2965         * gnulib/import/m4/unistd-safer.m4: New file.
2966         * gnulib/import/mempcpy.c: New file.
2967         * gnulib/import/memrchr.c: New file.
2968         * gnulib/import/msvc-inval.c: New file.
2969         * gnulib/import/msvc-inval.h: New file.
2970         * gnulib/import/msvc-nothrow.c: New file.
2971         * gnulib/import/msvc-nothrow.h: New file.
2972         * gnulib/import/open.c: New file.
2973         * gnulib/import/openat-die.c: New file.
2974         * gnulib/import/openat-priv.h: New file.
2975         * gnulib/import/openat-proc.c: New file.
2976         * gnulib/import/openat.c: New file.
2977         * gnulib/import/openat.h: New file.
2978         * gnulib/import/opendir.c: New file.
2979         * gnulib/import/pipe-safer.c: New file.
2980         * gnulib/import/readdir.c: New file.
2981         * gnulib/import/realloc.c: New file.
2982         * gnulib/import/rewinddir.c: New file.
2983         * gnulib/import/save-cwd.c: New file.
2984         * gnulib/import/save-cwd.h: New file.
2985         * gnulib/import/strdup.c: New file.
2986         * gnulib/import/strerror-override.c: New file.
2987         * gnulib/import/strerror-override.h: New file.
2988         * gnulib/import/strerror.c: New file.
2989         * gnulib/import/unistd--.h: New file.
2990         * gnulib/import/unistd-safer.h: New file.
2991         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2992         "getcwd" and "glob".
2993         * ser-tcp.c: Undefine "close" before redefining it.
2994
2995 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2996
2997         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2998         get rid of res_val.
2999
3000 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3001
3002         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3003         <sol2,sparc>: Likewise.
3004         <sol2-64,i386>: Likewise.
3005
3006         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3007         -Wdeprecated-declarations on *-*-solaris*.
3008         * configure: Regenerate.
3009
3010         * procfs.c: Include "nat/inferior.h".
3011         (procfs_info_proc): Fix typo.
3012
3013 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3014
3015         * remote.c (vector): Include.
3016         (struct private_thread_info): Add field, thread_handle.
3017         (free_private_thread_info): Deallocate storage associated with
3018         thread handle.
3019         (get_private_info_thread): Initialize `thread_handle' field.
3020         (struct thread_item): Add field, thread_handle.
3021         (clear_threads_listing_context): Deallocate storage associated
3022         with thread handle.
3023         (start_thread): Add support for "handle" attribute.
3024         (thread_attributes): Add "handle".
3025         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3026         field.
3027         (remote_update_thread_list): Update thread_handle.
3028         (remote_thread_handle_to_thread_info): New function.
3029         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3030
3031 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3032
3033         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3034         function.
3035         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3036         * python/python-internal.h (thread_object_type): Declare.
3037
3038 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3039
3040         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3041         (target_thread_handle_to_thread_info): Declare.
3042         * target.c (target_thread_handle_to_thread_info): New function.
3043         * target-delegates.c: Regenerate.
3044         * gdbthread.h (find_thread_by_handle): Declare.
3045         * thread.c (find_thread_by_handle): New function.
3046         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3047         function.
3048         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3049
3050 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3051
3052         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3053
3054 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3055
3056         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3057
3058 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3059
3060         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3061         to gdb_target_obs.
3062
3063 2017-09-20  Tom Tromey  <tom@tromey.com>
3064
3065         * breakpoint.c (struct counted_command_line): Remove.
3066         (breakpoint_commands): Update.
3067         (alloc_counted_command_line, incref_counted_command_line)
3068         (decref_counted_command_line, do_cleanup_counted_command_line)
3069         (make_cleanup_decref_counted_command_line): Remove.
3070         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3071         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3072         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3073         (save_breakpoints): Update.
3074         * breakpoint.h (counted_command_line): Now a typedef to
3075         shared_ptr.
3076         (struct breakpoint) <commands>: Now a counted_command_line.
3077         (struct bpstats) <command>: Likewise.
3078
3079 2017-09-20  Tom Tromey  <tom@tromey.com>
3080
3081         * breakpoint.c (struct commands_info, do_map_commands_command):
3082         Remove.
3083         (commands_command_1): Update.
3084         (iterate_over_related_breakpoints): Take a function_view.
3085         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3086         (delete_command): Update.
3087         (map_breakpoint_numbers): Take a function_view.
3088         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3089         (disable_command): Update.
3090         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3091         (enable_command): Update.
3092         (struct disp_data, do_enable_breakpoint_disp)
3093         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3094         (do_map_enable_delete_breakpoint): Remove.
3095         (enable_once_command, enable_count_command, enable_delete_command)
3096         (delete_trace_variable_command): Update.
3097
3098 2017-09-20  Tom Tromey  <tom@tromey.com>
3099
3100         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3101         (bpstat_clear): Use delete.
3102         (bpstats): New constructors.
3103         (bpstat_copy, bpstat_stop_status): Use new.
3104         (dprintf_after_condition_true): Update.
3105         * breakpoint.h (bpstats::bpstats): Add constructors.
3106         (bpstats::~bpstats): Add destructor.
3107
3108 2017-09-20  Pedro Alves  <palves@redhat.com>
3109
3110         * eval.c (make_params): Delete, refactored as ...
3111         (class fake_method): ... this new type's ctor.
3112         (fake_method::~fake_method): New.
3113         (evaluate_subexp_standard): Use 'fake_method'.
3114
3115 2017-09-20  Tom Tromey  <tom@tromey.com>
3116
3117         * windows-nat.c (get_windows_debug_event, windows_wait)
3118         (do_initial_windows_stuff, windows_attach): Update.
3119         * utils.c (vwarning, internal_vproblem): Update.
3120         (ui_unregister_input_event_handler_cleanup)
3121         (prepare_to_handle_input): Remove.
3122         (class scoped_input_handler): New.
3123         (defaulted_query, prompt_for_continue): Update.
3124         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3125         Update.
3126         * top.c (undo_terminal_modifications_before_exit): Update.
3127         * target/target.h (target_terminal_init, target_terminal_inferior)
3128         (target_terminal_ours): Don't declare.
3129         (class target_terminal): New.
3130         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3131         (target_terminal_ours_for_output)
3132         (make_cleanup_restore_target_terminal): Don't declare.
3133         (target_terminal_info): Remove.
3134         * target.c (enum terminal_state, terminal_state): Remove.
3135         (target_terminal::terminal_state): Define.
3136         (target_terminal::init): Rename from target_terminal_init.
3137         (target_terminal::inferior): Rename from
3138         target_terminal_inferior.
3139         (target_terminal::ours): Rename from target_terminal_ours.
3140         (target_terminal::ours_for_output): Rename from
3141         target_terminal_ours_for_output.
3142         (target_terminal::info): New method.
3143         (cleanup_restore_target_terminal)
3144         (make_cleanup_restore_target_terminal): Remove.
3145         * solib.c (handle_solib_event): Update.
3146         * remote.c (remote_serial_quit_handler): Update.
3147         (remote_terminal_inferior, remote_wait_as): Update.
3148         * record-full.c (record_full_wait_1): Update.
3149         * nto-procfs.c (procfs_create_inferior): Update.
3150         * nat/fork-inferior.c (startup_inferior): Update.
3151         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3152         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3153         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3154         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3155         (mi_breakpoint_created, mi_breakpoint_deleted)
3156         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3157         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3158         (mi_user_selected_context_changed, report_initial_inferior):
3159         Update.
3160         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3161         (linux_nat_terminal_inferior): Update.
3162         * infrun.c (follow_fork_inferior)
3163         (handle_vfork_child_exec_or_exit, do_target_resume)
3164         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3165         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3166         Update.
3167         * inflow.c (child_terminal_init, info_terminal_command): Update.
3168         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3169         (attach_command): Update.
3170         * infcall.c (call_thread_fsm_should_stop): Update.
3171         * gnu-nat.c (gnu_attach): Update.
3172         * extension.c (struct active_ext_lang_state)
3173         (restore_active_ext_lang): Update.
3174         * exceptions.c (print_flush): Update.
3175         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3176         (struct quit_handler_cleanup_data, restore_quit_handler)
3177         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3178         Remove.
3179         * cp-support.c (gdb_demangle): Update.
3180         * breakpoint.c (update_inserted_breakpoint_locations)
3181         (insert_breakpoint_locations, handle_jit_event)
3182         (disable_breakpoints_in_unloaded_shlib): Update.
3183         * annotate.c (annotate_breakpoints_invalid)
3184         (annotate_frames_invalid): Update.
3185
3186 2017-09-20  Tom Tromey  <tom@tromey.com>
3187
3188         * main.c (catch_command_errors): Rename from
3189         catch_command_errors_const.
3190         (captured_main_1): Update.
3191
3192 2017-09-20  Pedro Alves  <palves@redhat.com>
3193
3194         * cli/cli-cmds.c (list_command): Use print_sal_location.
3195         (print_sal_location): New function.
3196         (ambiguous_line_spec): Use print_sal_location.
3197         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3198         * symtab.c (find_function_start_sal): Likewise.
3199         * symtab.h (symtab_and_line::symbol): New field.
3200
3201 2017-09-20  Pedro Alves  <palves@redhat.com>
3202
3203         * linespec.c (minsym_found): Handle non-text minsyms.
3204         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3205
3206 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3207
3208         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3209         backslash.
3210
3211 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3212
3213         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3214         vmovups instead vmovaps.
3215         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3216
3217 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3218
3219         * NEWS (Changes since GDB 8.0): Add starti.
3220         * infcmd.c (enum run_break): New.
3221         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3222         case.
3223         (run_command): Use enum run_how.
3224         (start_command): Likewise.
3225         (starti_command): New function.
3226         (RUN_ARGS_HELP): New macro.
3227         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3228         commands.  Add starti command.
3229
3230 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3231
3232         * Makefile.in (monitor.o): Remove the rule.
3233
3234 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3235
3236         * annotate.h (struct annotate_arg_emitter): Use
3237         DISABLE_COPY_AND_ASSIGN.
3238         * common/refcounted-object.h (refcounted_object): Likewise.
3239         * completer.h (struct completion_result): Likewise.
3240         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3241         * filename-seen-cache.h (filename_seen_cache): Likewise.
3242         * gdbcore.h (thread_section_name): Likewise.
3243         * gdb_regex.h (compiled_regex): Likewise.
3244         * gdbthread.h (scoped_restore_current_thread): Likewise.
3245         * inferior.h (scoped_restore_current_inferior): Likewise.
3246         * jit.c (jit_reader): Likewise.
3247         * linespec.h (struct linespec_result): Likewise.
3248         * mi/mi-parse.h (struct mi_parse): Likewise.
3249         * nat/fork-inferior.c (execv_argv): Likewise.
3250         * progspace.h (scoped_restore_current_program_space): Likewise.
3251         * python/python-internal.h (class gdbpy_enter): Likewise.
3252         * regcache.h (regcache): Likewise.
3253         * target-descriptions.c (struct tdesc_reg): Likewise.
3254         (struct tdesc_type): Likewise.
3255         (struct tdesc_feature): Likewise.
3256         * ui-out.h (ui_out_emit_type): Likewise.
3257
3258 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3259
3260         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3261         label abort_expression.
3262
3263 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3264
3265         * common/buffer.c (buffer_xml_printf): Adjust.
3266         * common/xml-utils.c (xml_escape_text): Change return type to
3267         std::string, update code accordingly.
3268         * common/xml-utils.h (xml_escape_text): Change return type to
3269         std::string.
3270         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3271         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3272         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3273         Adjust.
3274
3275 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3276
3277         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3278         (SUBDIR_UNITTESTS_OBS): Add new object file.
3279         * unittests/xml-utils-selftests.c: New file.
3280
3281 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3282
3283         * common/selftest.h (selftest): New struct/interface.
3284         (register_test): Add name parameter, add new overload.
3285         (run_tests): Add filter parameter.
3286         (for_each_selftest_ftype): New typedef.
3287         (for_each_selftest): New declaration.
3288         * common/selftest.c (tests): Change type to
3289         map<string, unique_ptr<selftest>>.
3290         (simple_selftest): New struct.
3291         (register_test): New function.
3292         (register_test): Add name parameter and use it.
3293         (run_tests): Add filter parameter and use it.  Add prints.
3294         Adjust to vector -> map change.
3295         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3296         registering selftests.
3297         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3298         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3299         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3300         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3301         * findvar.c (_initialize_findvar): Likewise.
3302         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3303         * maint.c (maintenance_selftest): Update call to run_tests.
3304         (maintenance_info_selftests): New function.
3305         (_initialize_maint_cmds): Register "maintenance info selftests"
3306         command.  Update "maintenance selftest" doc.
3307         * regcache.c (_initialize_regcache): Add names when registering
3308         selftests.
3309         * rust-exp.y (_initialize_rust_exp): Likewise.
3310         * selftest-arch.c (gdbarch_selftest): New struct.
3311         (gdbarch_tests): Remove.
3312         (register_test_foreach_arch): Add name parameter.  Call
3313         register_test.
3314         (tests_with_arch): Remove, move most content to
3315         gdbarch_selftest::operator().
3316         (_initialize_selftests_foreach_arch): Remove.
3317         * selftest-arch.h (register_test_foreach_arch): Add name
3318         parameter.
3319         (run_tests_with_arch): New declaration.
3320         * utils-selftests.c (_initialize_utils_selftests): Add names
3321         when registering selftests.
3322         * utils.c (_initialize_utils): Likewise.
3323         * unittests/array-view-selftests.c
3324         (_initialize_array_view_selftests): Likewise.
3325         * unittests/environ-selftests.c (_initialize_environ_selftests):
3326         Likewise.
3327         * unittests/function-view-selftests.c
3328         (_initialize_function_view_selftests): Likewise.
3329         * unittests/offset-type-selftests.c
3330         (_initialize_offset_type_selftests): Likewise.
3331         * unittests/optional-selftests.c
3332         (_initialize_optional_selftests): Likewise.
3333         * unittests/scoped_restore-selftests.c
3334         (_initialize_scoped_restore_selftests): Likewise.
3335         * NEWS: Document "maintenance selftest" and "maint info
3336         selftests".
3337
3338 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3339
3340         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3341         scoped_restore.
3342
3343 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3344
3345         * mi/mi-main.c (mi_load_progress): Make uiout variable
3346         a unique_ptr.
3347
3348 2017-09-15  Pedro Alves  <palves@redhat.com>
3349
3350         * compile/compile-c-types.c (convert_enum, convert_int)
3351         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3352
3353 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3354
3355         * dwarf2read.c (copy_string): Remove.
3356         (parse_macro_definition): Replace copy_string with savestring.
3357
3358 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3359
3360         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3361         gdb_target_obs.
3362         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3363         Likewise.
3364         (i[34567]86-*-linux*): Likewise.
3365
3366 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3367
3368         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3369         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3370         <stack>: Change type to std::vector.
3371         <stack_len, stack_allocated>: Remove.
3372         <grow_stack>: Remove.
3373         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3374         (dwarf_expr_context::~dwarf_expr_context): Remove.
3375         (dwarf_expr_context::grow_stack): Remove.
3376         (dwarf_expr_context::push): Adjust.
3377         (dwarf_expr_context::pop): Adjust.
3378         (dwarf_expr_context::fetch): Adjust.
3379         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3380         (dwarf_expr_context::stack_empty_p): Adjust.
3381         (dwarf_expr_context::execute_stack_op): Adjust.
3382
3383 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3384
3385         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3386         return type to bool.
3387         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3388
3389 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3392         Change type to bool.
3393         (dwarf_stack_value) <in_stack_memory>: Likewise.
3394         (dwarf_expr_context) <push_address>: Change parameter type to
3395         bool.
3396         <fetch_in_stack_memory>: Change return type to bool.
3397         <push>: Change parameter type to bool.
3398         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3399         to bool.
3400         (dwarf_expr_context::push_address): Likewise.
3401         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3402         to bool.
3403         (dwarf_expr_context::execute_stack_op): Adjust.
3404         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3405
3406 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3407
3408         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3409         (struct dwarf_expr_context) <n_pieces>: Remove.
3410         <pieces>: Change type to std::vector.
3411         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3412         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3413         pieces.
3414         (dwarf_expr_context::add_piece): Adjust.
3415         * dwarf2loc.c (struct piece_closure): Initialize fields.
3416         <n_pieces>: Remove.
3417         <pieces>: Change type to std::vector.
3418         (allocate_piece_closure): Adjust, change parameter to
3419         std::vector rvalue and std::move it to piece_closure.
3420         (rw_pieced_value): Adjust.
3421         (check_pieced_synthetic_pointer): Adjust.
3422         (indirect_synthetic_pointer): Adjust.
3423         (coerce_pieced_ref): Adjust.
3424         (free_pieced_value_closure):  Adjust.  Use delete to free
3425         piece_closure.
3426         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3427         to allocate_piece_closure.
3428         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3429
3430 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3431
3432         * probe.h (probe_ops_cp): Remove typedef.
3433         (DEF_VEC_P (probe_ops_cp)): Remove.
3434         (all_probe_ops): Change type to std::vector.
3435         * probe.c (info_probes_for_ops): Adjust to vector change.
3436         (probe_linespec_to_ops): Likewise.
3437         (all_probe_ops): Change type to std::vector.
3438         (_initialize_probe): Adjust to vector change.
3439         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3440         * elfread.c (elf_get_probes): Likewise.
3441         * stap-probe.c (_initialize_stap_probe): Likewise.
3442
3443 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3444
3445         * probe.h (struct bound_probe): Define constructors.
3446         * probe.c (bound_probe_s): Remove typedef.
3447         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3448         (collect_probes): Change return type to std::vector, remove
3449         cleanup.
3450         (compare_probes): Return bool, change parameter type.  Change
3451         semantic to "less than".
3452         (gen_ui_out_table_header_info): Change parameter to std::vector
3453         and update.
3454         (exists_probe_with_pops): Likewise.
3455         (info_probes_for_ops): Update to std::vector change.
3456         (enable_probes_command): Likewise.
3457         (disable_probes_command): Likewise.
3458
3459 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3460
3461         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3462         vec to std::vector.
3463         * probe.c (parse_probes_in_pspace): Update.
3464         (find_probes_in_objfile): Update.
3465         (find_probe_by_pc): Update.
3466         (collect_probes): Update.
3467         (probe_any_get_probes): Update.
3468         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3469         return type to reference to std::vector.
3470         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3471         std::vector and update.
3472         (dtrace_process_dof): Likewise.
3473         (dtrace_get_probes): Likewise.
3474         * elfread.c (elf_get_probes): Change return type to std::vector,
3475         store an std::vector in bfd_data.
3476         (probe_key_free): Update to std::vector.
3477         * stap-probe.c (handle_stap_probe): Change parameter to
3478         std::vector and update.
3479         (stap_get_probes): Likewise.
3480         * symfile-debug.c (debug_sym_get_probes): Change return type to
3481         std::vector and update.
3482
3483 2017-09-11  Tom Tromey  <tom@tromey.com>
3484
3485         * breakpoint.c (program_breakpoint_here_p): Update.
3486         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3487         from make_show_memory_breakpoints_cleanup.  Return a
3488         scoped_restore_tmpl<int>.
3489         (restore_show_memory_breakpoints): Remove.
3490         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3491         * mem-break.c (memory_validate_breakpoint): Update.
3492         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3493         (ia64_memory_remove_breakpoint): Update.
3494         (ia64_breakpoint_from_pc): Update.
3495         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3496         from make_show_memory_breakpoints_cleanup.
3497
3498 2017-09-11  Tom Tromey  <tom@tromey.com>
3499
3500         * d-namespace.c (d_lookup_symbol): Use std::string.
3501         (find_symbol_in_baseclass): Likewise.
3502
3503 2017-09-11  Tom Tromey  <tom@tromey.com>
3504
3505         * ctf.c (ctf_start): Use std::string.
3506
3507 2017-09-11  Tom Tromey  <tom@tromey.com>
3508
3509         * ada-lang.c (is_known_support_routine): Update.
3510         (ada_unhandled_exception_name_addr_from_raise): Update.
3511         * guile/scm-frame.c (gdbscm_frame_name): Update.
3512         * python/py-frame.c (frapy_name): Update.
3513         (frapy_function): Update.
3514         * stack.h (find_frame_funname): Update.
3515         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3516         (print_frame): Update.
3517
3518 2017-09-11  Tom Tromey  <tom@tromey.com>
3519
3520         * findcmd.c (put_bits): Take a gdb::byte_vector.
3521         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3522         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3523         cleanups.
3524         (find_command): Update.
3525
3526 2017-09-11  Tom Tromey  <tom@tromey.com>
3527
3528         * cli/cli-script.c (class scoped_restore_hook_in): New.
3529         (clear_hook_in_cleanup): Remove.
3530         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3531         scoped_restore_hook_in.
3532
3533 2017-09-11  Tom Tromey  <tom@tromey.com>
3534
3535         * cli/cli-script.c (restore_interp): Remove.
3536         (read_command_lines): Use scoped_restore_interp.
3537         * interps.c (scoped_restore_interp::set_temp): Rename from
3538         interp_set_temp.
3539         * interps.h (class scoped_restore_interp): New.
3540         (interp_set_temp): Remove.
3541
3542 2017-09-11  Tom Tromey  <tom@tromey.com>
3543
3544         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3545         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3546         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3547         scoped_restore.
3548         (mi_cmd_break_insert_1): Update.
3549         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3550         scoped_restore.
3551
3552 2017-09-11  Tom Tromey  <tom@tromey.com>
3553
3554         * demangle.c (demangle_command): Update.
3555         * breakpoint.c (disable_command): Update.
3556         (enable_command): Update.
3557         (find_location_by_number): Make "number" const.  Use
3558         get_number_trailer.
3559         * cli/cli-utils.c (extract_arg): Return std::string.
3560         * probe.c (parse_probe_linespec): Update.  Change types.
3561         (collect_probes): Take string arguments.
3562         (parse_probe_linespec): Likewise.
3563         (info_probes_for_ops): Update.
3564         (enable_probes_command): Update.
3565         (disable_probes_command): Update.
3566         * break-catch-sig.c (catch_signal_split_args): Update.
3567         * mi/mi-parse.c (mi_parse): Update.
3568
3569 2017-09-11  Tom Tromey  <tom@tromey.com>
3570
3571         * language.h (language_enum): Make argument const.
3572         * language.c (language_enum): Make argument const.
3573
3574 2017-09-11  Tom Tromey  <tom@tromey.com>
3575
3576         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3577         as function.
3578         (skip_to_space): Rename from skip_to_space_const.
3579         * common/common-utils.c (skip_to_space): New function.
3580         (skip_to_space): Rename from skip_to_space_const.
3581         * cli/cli-utils.h (get_number): Rename from get_number_const.
3582         (extract_arg): Rename from extract_arg_const.
3583         * cli/cli-utils.c (get_number): Rename from get_number_const.
3584         (extract_arg): Rename from extract_arg_const.
3585         (number_or_range_parser::get_number): Use ::get_number.
3586         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3587         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3588         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3589         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3590         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3591         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3592         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3593         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3594
3595 2017-09-11  Tom Tromey  <tom@tromey.com>
3596
3597         * python/python.c (do_start_initialization): Use
3598         py-event-types.def to initialize types.
3599         Define all object type structures.
3600         * python/python-internal.h: Don't declare event initialization
3601         functions.
3602         * python/py-threadevent.c (thread_event_object_type): Don't
3603         define.
3604         * python/py-stopevent.c (stop_event_object_type): Don't define.
3605         * python/py-signalevent.c (signal_event_object_type): Don't
3606         declare or define.
3607         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3608         (clear_objfiles_event_object_type): Don't declare or define.
3609         * python/py-infevents.c (inferior_call_pre_event_object_type)
3610         (inferior_call_post_event_object_type)
3611         (register_changed_event_object_type)
3612         (memory_changed_event_object_type): Don't declare or define.
3613         * python/py-inferior.c (new_thread_event_object_type)
3614         (new_inferior_event_object_type)
3615         (inferior_deleted_event_object_type): Don't declare or define.
3616         * python/py-exitedevent.c (exited_event_object_type): Don't
3617         declare or define.
3618         * python/py-evts.c (gdbpy_initialize_py_events): Use
3619         py-all-events.def.
3620         * python/py-events.h (thread_event_object_type): Don't declare.
3621         (events_object): Use py-all-events.def.
3622         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3623         py-event-types.def.
3624         * python/py-event-types.def: New file.
3625         * python/py-continueevent.c (create_continue_event_object): Don't
3626         declare or define.
3627         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3628         declare or define.
3629         * python/py-all-events.def: New file.
3630
3631 2017-09-11  Tom Tromey  <tom@tromey.com>
3632
3633         * python/py-threadevent.c (create_thread_event_object): Return
3634         gdbpy_ref.
3635         * python/py-stopevent.h (create_stop_event_object)
3636         (create_breakpoint_event_object, create_signal_event_object):
3637         Update.
3638         * python/py-stopevent.c (create_stop_event_object): Return
3639         gdbpy_ref.
3640         (emit_stop_event): Update.
3641         * python/py-signalevent.c (create_signal_event_object): Return
3642         gdbpy_ref.
3643         * python/py-infevents.c (create_inferior_call_event_object):
3644         Update.
3645         * python/py-event.h (create_event_object)
3646         (create_thread_event_object): Update.
3647         * python/py-event.c (create_event_object): Return gdbpy_ref.
3648         * python/py-continueevent.c: Return gdbpy_ref.
3649         * python/py-bpevent.c (create_breakpoint_event_object): Return
3650         gdbpy_ref.
3651
3652 2017-09-11  Tom Tromey  <tom@tromey.com>
3653
3654         PR python/15622:
3655         * NEWS: Add entry.
3656         * python/python.c (do_start_initialization): Initialize new event
3657         types.
3658         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3659         (gdbpy_initialize_inferior_deleted_event)
3660         (gdbpy_initialize_new_thread_event): Declare.
3661         * python/py-threadevent.c (create_thread_event_object): Add option
3662         "thread" parameter.
3663         * python/py-inferior.c (new_thread_event_object_type)
3664         (new_inferior_event_object_type)
3665         (inferior_deleted_event_object_type): Declare.
3666         (python_new_inferior, python_inferior_deleted): New functions.
3667         (add_thread_object): Emit new_thread event.
3668         (gdbpy_initialize_inferior): Attach new functions to corresponding
3669         observers.
3670         (new_thread, new_inferior, inferior_deleted): Define new event
3671         types.
3672         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3673         registries.
3674         * python/py-events.h (events_object) <new_inferior,
3675         inferior_deleted, new_thread>: New fields.
3676         * python/py-event.h (create_thread_event_breakpoint): Add optional
3677         "thread" parameter.
3678
3679 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3680
3681         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3682         check current_ui instead.
3683         (internal_vproblem): Likewise.
3684
3685 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3686
3687         * thread.c (print_thread_info_1): Remove unnecessary calls to
3688         uiout->is_mi_like_p.
3689
3690 2017-09-09  Tom Tromey  <tom@tromey.com>
3691
3692         * namespace.h (add_using_directive): Update.
3693         * namespace.c (add_using_directive): Change type of excludes to
3694         std::vector.
3695         * dwarf2read.c (read_import_statement): Use std::vector.
3696         (read_namespace): Update.
3697         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3698
3699 2017-09-09  Tom Tromey  <tom@tromey.com>
3700
3701         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3702
3703 2017-09-09  Tom Tromey  <tom@tromey.com>
3704
3705         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3706
3707 2017-09-09  Tom Tromey  <tom@tromey.com>
3708
3709         * stack.c (func_command): Use gdb::def_vector.
3710
3711 2017-09-09  Tom Tromey  <tom@tromey.com>
3712
3713         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3714         ui_out_emit_list, ui_out_emit_tuple.
3715         (mi_cmd_var_update): Likewise.
3716
3717 2017-09-09  Tom Tromey  <tom@tromey.com>
3718
3719         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3720         ui_out_redirect_pop.
3721         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3722         ui_out_redirect_pop.
3723         * utils.c (do_ui_out_redirect_pop)
3724         (make_cleanup_ui_out_redirect_pop): Remove.
3725         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3726         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3727         * ui-out.h (ui_out_redirect_pop): New class.
3728
3729 2017-09-09  Tom Tromey  <tom@tromey.com>
3730
3731         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3732         (list_available_thread_groups, mi_cmd_list_thread_groups)
3733         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3734         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3735         Likewise.
3736
3737 2017-09-09  Tom Tromey  <tom@tromey.com>
3738
3739         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3740         ui_out_emit_tuple.
3741
3742 2017-09-09  Tom Tromey  <tom@tromey.com>
3743
3744         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3745         * stack.c (print_frame): Use ui_out_emit_tuple.
3746         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3747         (info_spu_mailbox_command, info_spu_dma_command)
3748         (info_spu_proxydma_command): Likewise.
3749         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3750         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3751         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3752         ui_out_emit_tuple.
3753         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3754
3755 2017-09-09  Tom Tromey  <tom@tromey.com>
3756
3757         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3758         (class ui_out_emit_table): Update comment.
3759         * ui-out.c (do_cleanup_table_end)
3760         (make_cleanup_ui_out_table_begin_end): Remove.
3761         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3762         (info_spu_dma_cmdlist): Likewise.
3763         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3764         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3765         ui_out_emit_table.
3766
3767 2017-09-09  Tom Tromey  <tom@tromey.com>
3768
3769         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3770         ui_out_emit_list, gdb::optional.
3771
3772 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3773
3774         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3775         prototype.
3776         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3777         prototype.
3778         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3779         prototype.
3780         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3781         * ada-exp.y: Remove _initialize_ada_exp prototype.
3782         * ada-lang.c: Remove _initialize_ada_language prototype.
3783         * ada-tasks.c: Remove _initialize_tasks prototype.
3784         * addrmap.c: Remove _initialize_addrmap prototype.
3785         * agent.c: Remove _initialize_agent prototype.
3786         * aix-thread.c: Remove _initialize_aix_thread prototype.
3787         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3788         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3789         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3790         prototype.
3791         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3792         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3793         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3794         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3795         prototype.
3796         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3797         prototype.
3798         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3799         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3800         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3801         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3802         prototype.
3803         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3804         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3805         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3806         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3807         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3808         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3809         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3810         prototype.
3811         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3812         prototype.
3813         * annotate.c: Remove _initialize_annotate prototype.
3814         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3815         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3816         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3817         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3818         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3819         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3820         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3821         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3822         prototype.
3823         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3824         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3825         * auto-load.c: Remove _initialize_auto_load prototype.
3826         * auxv.c: Remove _initialize_auxv prototype.
3827         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3828         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3829         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3830         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3831         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3832         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3833         prototype.
3834         * break-catch-throw.c: Remove _initialize_break_catch_throw
3835         prototype.
3836         * breakpoint.c: Remove _initialize_breakpoint prototype.
3837         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3838         * btrace.c: Remove _initialize_btrace prototype.
3839         * charset.c: Remove _initialize_charset prototype.
3840         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3841         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3842         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3843         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3844         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3845         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3846         * coffread.c: Remove _initialize_coffread prototype.
3847         * compile/compile.c: Remove _initialize_compile prototype.
3848         * complaints.c: Remove _initialize_complaints prototype.
3849         * completer.c: Remove _initialize_completer prototype.
3850         * copying.awk: Remove _initialize_copying prototype.
3851         * copying.c: Regenerate.
3852         * core-regset.c: Remove _initialize_core_regset prototype.
3853         * corefile.c: Remove _initialize_core prototype.
3854         * corelow.c: Remove _initialize_corelow prototype.
3855         * cp-abi.c: Remove _initialize_cp_abi prototype.
3856         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3857         * cp-support.c: Remove _initialize_cp_support prototype.
3858         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3859         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3860         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3861         * ctf.c: Remove _initialize_ctf prototype.
3862         * d-lang.c: Remove _initialize_d_language prototype.
3863         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3864         prototype.
3865         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3866         * dbxread.c: Remove _initialize_dbxread prototype.
3867         * dcache.c: Remove _initialize_dcache prototype.
3868         * demangle.c: Remove _initialize_demangler prototype.
3869         * disasm-selftests.c: Remove _initialize_disasm_selftests
3870         prototype.
3871         * disasm.c: Remove _initialize_disasm prototype.
3872         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3873         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3874         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3875         prototype.
3876         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3877         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3878         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3879         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3880         * elfread.c: Remove _initialize_elfread prototype.
3881         * exec.c: Remove _initialize_exec prototype.
3882         * extension.c: Remove _initialize_extension prototype.
3883         * f-lang.c: Remove _initialize_f_language prototype.
3884         * f-valprint.c: Remove _initialize_f_valprint prototype.
3885         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3886         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3887         * filesystem.c: Remove _initialize_filesystem prototype.
3888         * findcmd.c: Remove _initialize_mem_search prototype.
3889         * fork-child.c: Remove _initialize_fork_child prototype.
3890         * frame-base.c: Remove _initialize_frame_base prototype.
3891         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3892         * frame.c: Remove _initialize_frame prototype.
3893         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3894         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3895         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3896         * gcore.c: Remove _initialize_gcore prototype.
3897         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3898         * gdbarch.c: Regenerate.
3899         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3900         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3901         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3902         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3903         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3904         * go-lang.c: Remove _initialize_go_language prototype.
3905         * go32-nat.c: Remove _initialize_go32_nat prototype.
3906         * guile/guile.c: Remove _initialize_guile prototype.
3907         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3908         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3909         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3910         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3911         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3912         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3913         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3914         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3915         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3916         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3917         prototype.
3918         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3919         prototype.
3920         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3921         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3922         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3923         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3924         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3925         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3926         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3927         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3928         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3929         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3930         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3931         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3932         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3933         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3934         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3935         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3936         prototype.
3937         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3938         prototype.
3939         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3940         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3941         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3942         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3943         * infcall.c: Remove _initialize_infcall prototype.
3944         * infcmd.c: Remove _initialize_infcmd prototype.
3945         * inferior.c: Remove _initialize_inferiors prototype.
3946         * inflow.c: Remove _initialize_inflow prototype.
3947         * infrun.c: Remove _initialize_infrun prototype.
3948         * interps.c: Remove _initialize_interpreter prototype.
3949         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3950         * jit.c: Remove _initialize_jit prototype.
3951         * language.c: Remove _initialize_language prototype.
3952         * linux-fork.c: Remove _initialize_linux_fork prototype.
3953         * linux-nat.c: Remove _initialize_linux_nat prototype.
3954         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3955         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3956         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3957         * m2-lang.c: Remove _initialize_m2_language prototype.
3958         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3959         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3960         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3961         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3962         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3963         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3964         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3965         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3966         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3967         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3968         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3969         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3970         * machoread.c: Remove _initialize_machoread prototype.
3971         * macrocmd.c: Remove _initialize_macrocmd prototype.
3972         * macroscope.c: Remove _initialize_macroscope prototype.
3973         * maint.c: Remove _initialize_maint_cmds prototype.
3974         * mdebugread.c: Remove _initialize_mdebugread prototype.
3975         * memattr.c: Remove _initialize_mem prototype.
3976         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3977         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3978         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3979         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3980         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3981         * microblaze-linux-tdep.c: Remove
3982         _initialize_microblaze_linux_tdep prototype.
3983         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3984         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3985         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3986         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3987         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3988         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3989         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3990         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3991         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3992         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3993         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3994         prototype.
3995         * mipsread.c: Remove _initialize_mipsread prototype.
3996         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3997         prototype.
3998         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3999         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4000         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4001         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4002         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4003         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4004         prototype.
4005         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4006         * nto-procfs.c: Remove _initialize_procfs prototype.
4007         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4008         * objc-lang.c: Remove _initialize_objc_language prototype.
4009         * objfiles.c: Remove _initialize_objfiles prototype.
4010         * observer.c: Remove observer_test_first_notification_function,
4011         observer_test_second_notification_function,
4012         observer_test_third_notification_function, and
4013         _initialize_observer prototypes.
4014         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4015         * osabi.c: Remove _initialize_gdb_osabi prototype.
4016         * osdata.c: Remove _initialize_osdata prototype.
4017         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4018         * parse.c: Remove _initialize_parse prototype.
4019         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4020         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4021         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4022         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4023         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4024         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4025         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4026         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4027         * printcmd.c: Remove _initialize_printcmd prototype.
4028         * probe.c: Remove _initialize_probe prototype.
4029         * proc-api.c: Remove _initialize_proc_api prototype.
4030         * proc-events.c: Remove _initialize_proc_events prototype.
4031         * proc-service.c: Remove _initialize_proc_service prototype.
4032         * procfs.c: Remove _initialize_procfs prototype.
4033         * psymtab.c: Remove _initialize_psymtab prototype.
4034         * python/python.c: Remove _initialize_python prototype.
4035         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4036         * record-btrace.c: Remove _initialize_record_btrace prototype.
4037         * record-full.c: Remove _initialize_record_full prototype.
4038         * record.c: Remove _initialize_record prototype.
4039         * regcache.c: Remove _initialize_regcache prototype.
4040         * reggroups.c: Remove _initialize_reggroup prototype.
4041         * remote-notif.c: Remove _initialize_notif prototype.
4042         * remote-sim.c: Remove _initialize_remote_sim prototype.
4043         * remote.c: Remove _initialize_remote prototype.
4044         * reverse.c: Remove _initialize_reverse prototype.
4045         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4046         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4047         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4048         prototype.
4049         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4050         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4051         * rust-exp.y: Remove _initialize_rust_exp prototype.
4052         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4053         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4054         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4055         * score-tdep.c: Remove _initialize_score_tdep prototype.
4056         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4057         prototype.
4058         * ser-go32.c: Remove _initialize_ser_dos prototype.
4059         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4060         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4061         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4062         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4063         * serial.c: Remove _initialize_serial prototype.
4064         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4065         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4066         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4067         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4068         * skip.c: Remove _initialize_step_skip prototype.
4069         * sol-thread.c: Remove _initialize_sol_thread prototype.
4070         * solib-aix.c: Remove _initialize_solib_aix prototype.
4071         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4072         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4073         * solib-frv.c: Remove _initialize_frv_solib prototype.
4074         * solib-spu.c: Remove _initialize_spu_solib prototype.
4075         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4076         * solib-target.c: Remove _initialize_solib_target prototype.
4077         * solib.c: Remove _initialize_solib prototype.
4078         * source.c: Remove _initialize_source prototype.
4079         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4080         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4081         prototype.
4082         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4083         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4084         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4085         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4086         prototype.
4087         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4088         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4089         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4090         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4091         prototype.
4092         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4093         prototype.
4094         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4095         prototype.
4096         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4097         prototype.
4098         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4099         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4100         prototype.
4101         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4102         prototype.
4103         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4104         prototype.
4105         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4106         prototype.
4107         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4108         prototype.
4109         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4110         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4111         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4112         * stabsread.c: Remove _initialize_stabsread prototype.
4113         * stack.c: Remove _initialize_stack prototype.
4114         * stap-probe.c: Remove _initialize_stap_probe prototype.
4115         * std-regs.c: Remove _initialize_frame_reg prototype.
4116         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4117         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4118         * symfile.c: Remove _initialize_symfile prototype.
4119         * symmisc.c: Remove _initialize_symmisc prototype.
4120         * symtab.c: Remove _initialize_symtab prototype.
4121         * target-dcache.c: Remove _initialize_target_dcache prototype.
4122         * target-descriptions.c: Remove _initialize_target_descriptions
4123         prototype.
4124         * thread.c: Remove _initialize_thread prototype.
4125         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4126         prototype.
4127         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4128         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4129         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4130         prototype.
4131         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4132         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4133         * tracefile.c: Remove _initialize_tracefile prototype.
4134         * tracepoint.c: Remove _initialize_tracepoint prototype.
4135         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4136         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4137         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4138         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4139         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4140         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4141         * tui/tui.c: Remove _initialize_tui prototype.
4142         * typeprint.c: Remove _initialize_typeprint prototype.
4143         * user-regs.c: Remove _initialize_user_regs prototype.
4144         * utils.c: Remove _initialize_utils prototype.
4145         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4146         * valarith.c: Remove _initialize_valarith prototype.
4147         * valops.c: Remove _initialize_valops prototype.
4148         * valprint.c: Remove _initialize_valprint prototype.
4149         * value.c: Remove _initialize_values prototype.
4150         * varobj.c: Remove _initialize_varobj prototype.
4151         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4152         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4153         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4154         * windows-nat.c: Remove _initialize_windows_nat,
4155         _initialize_check_for_gdb_ini, and _initialize_loadable
4156         prototypes.
4157         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4158         * xcoffread.c: Remove _initialize_xcoffread prototype.
4159         * xml-support.c: Remove _initialize_xml_support prototype.
4160         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4161         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4162         prototype.
4163         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4164         prototype.
4165         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4166
4167 2017-09-08  Keith Seitz  <keiths@redhat.com>
4168
4169         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4170         field.
4171
4172 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4173
4174         * f-valprint.c (f_val_print): Remove check for one byte
4175         sized integers. Remove printing of character type.
4176
4177 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4178             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4179             Bernhard Heckel  <bernhard.heckel@intel.com>
4180
4181         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4182         to maintain proper indentation when printing pointers/refs.
4183
4184 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4185
4186         GDB 8.0.1 released.
4187
4188 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4189
4190         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4191
4192 2017-09-05  Tom Tromey  <tom@tromey.com>
4193
4194         * parse.c (funcall_chain): Now a std::vector.
4195         (start_arglist, end_arglist): Simplify.
4196         (free_funcalls): Remove.
4197         (parse_exp_in_context_1): Remove cleanup.
4198
4199 2017-09-05  Tom Tromey  <tom@tromey.com>
4200
4201         * go-exp.y (go_parse): Don't create a cleanup.
4202
4203 2017-09-05  Tom Tromey  <tom@tromey.com>
4204
4205         * d-exp.y (PrimaryExpression): Use std::string.
4206         (d_parse): Don't create a cleanup.
4207
4208 2017-09-05  Tom Tromey  <tom@tromey.com>
4209
4210         * utils.c (do_clear_parser_state): Remove.
4211         (make_cleanup_clear_parser_state): Remove.
4212         * p-exp.y (pascal_parse): Use scoped_restore.
4213         * m2-exp.y (m2_parse): Use scoped_restore.
4214         * f-exp.y (f_parse): Use scoped_restore.
4215         * d-exp.y (d_parse): Use scoped_restore.
4216         * c-exp.y (c_parse): Use scoped_restore.
4217         * ada-exp.y (ada_parse): Use scoped_restore.
4218         * utils.h (make_cleanup_clear_parser_state): Remove.
4219
4220 2017-09-06  Keith Seitz  <keiths@redhat.com>
4221
4222         * dwarf2read.c (dw2_linkage_name_attr): New function.
4223         (dw2_linkage_name): New function.
4224         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4225         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4226         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4227
4228 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4229
4230         * config/djgpp/djconfig.sh: Correct shell portability issue.
4231
4232 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4233
4234         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4235
4236 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4237
4238         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4239         * NEWS: Mention new FreeBSD/mips native configuration.
4240         * configure.host: Add aarch64*-*-freebsd*.
4241         * configure.nat: Likewise.
4242         * aarch64-fbsd-nat.c: New file.
4243
4244 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4245
4246         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4247         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4248         * NEWS: Mention new FreeBSD/aarch64 target.
4249         * configure.tgt: Add aarch64*-*-freebsd*.
4250         * aarch64-fbsd-tdep.c: New file.
4251         * aarch64-fbsd-tdep.h: New file.
4252
4253 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4254
4255         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4256
4257 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4258
4259         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4260         of TLS symbols.
4261
4262 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4263
4264         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4265         call.
4266
4267 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4268
4269         * infrun.c (follow_exec): Call add_thread after
4270         target_find_description.
4271
4272 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4273
4274         * infrun.c (handle_inferior_event_1): When exec'ing, read
4275         stop_pc after follow_exec.
4276
4277 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4278
4279         * remote.c (process_g_packet): Update error message.
4280
4281 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4282
4283         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4284         targets.
4285
4286 2017-09-05  Pedro Alves  <palves@redhat.com>
4287
4288         * eval.c (eval_call, evaluate_funcall): New functions, factored
4289         out from ...
4290         (evaluate_subexp_standard): ... this.
4291
4292 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4293
4294         * amd64-tdep.c (amd64_target_description): Create target
4295         descriptions.
4296         (_initialize_amd64_tdep): Don't call functions
4297         initialize_tdesc_amd64_*.  Add self tests.
4298         * arch/amd64.c (amd64_create_target_description): Add parameter
4299         is_linux.  Call set_tdesc_osabi if is_linux is true.
4300         * arch/amd64.h (amd64_create_target_description): Update the
4301         declaration.
4302         * arch/i386.c (i386_create_target_description): Add parameter
4303         is_linux.  Call set_tdesc_osabi if is_linux is true.
4304         * arch/i386.h (i386_create_target_description): Update
4305         declaration.
4306         * configure.tgt: Add i386.o to gdb_target_obs.
4307         * features/Makefile (XMLTOC): Remove i386/*.xml.
4308         * features/i386/amd64-avx-avx512.c: Remove.
4309         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4310         * features/i386/amd64-avx-mpx.c: Remove.
4311         * features/i386/amd64-avx.c: Remove.
4312         * features/i386/amd64-mpx.c: Remove.
4313         * features/i386/amd64.c: Remove.
4314         * features/i386/i386-avx-avx512.c: Remove.
4315         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4316         * features/i386/i386-avx-mpx.c: Remove.
4317         * features/i386/i386-avx.c: Remove.
4318         * features/i386/i386-mmx.c: Remove.
4319         * features/i386/i386-mpx.c: Remove.
4320         * features/i386/i386.c: Remove.
4321         * i386-tdep.c: Don't include features/i386/i386*.c., include
4322         target-descriptions.h and arch/i386.h.
4323         (i386_target_description): Create target descriptions.
4324         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4325         functions.  Do self tests.
4326
4327 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4328
4329         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4330         * features/i386/amd64-avx-avx512-linux.c: Removed.
4331         * features/i386/amd64-avx-linux.c: Removed.
4332         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4333         * features/i386/amd64-avx-mpx-linux.c: Removed.
4334         * features/i386/amd64-linux.c: Removed.
4335         * features/i386/amd64-mpx-linux.c: Removed.
4336         * features/i386/x32-avx-avx512-linux.c: Removed.
4337         * features/i386/x32-avx-linux.c: Removed.
4338         * features/i386/x32-linux.c: Removed.
4339
4340 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4341
4342         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4343         features/i386/*.c.
4344         (amd64_linux_read_description): Call
4345         amd64_create_target_description.
4346         * arch/amd64.c: New file.
4347         * arch/amd64.h: New file.
4348         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4349         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4350
4351 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4352
4353         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4354         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4355         (amd64_linux_read_description): Create target descriptions.
4356         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4357         functions.  Add unit tests.
4358         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4359         x32-core.xml.
4360         * features/i386/64bit-avx.c: Generated.
4361         * features/i386/64bit-avx512.c: Generated.
4362         * features/i386/64bit-core.c: Generated.
4363         * features/i386/64bit-linux.c: Generated.
4364         * features/i386/64bit-mpx.c: Generated.
4365         * features/i386/64bit-pkeys.c: Generated.
4366         * features/i386/64bit-segments.c: Generated.
4367         * features/i386/64bit-sse.c: Generated.
4368         * features/i386/x32-core.c: Generated.
4369         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4370         c files for amd64-linux and x32-linux.
4371
4372 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4373
4374         * amd64-linux-tdep.c (amd64_linux_read_description): New
4375         function.
4376         (amd64_linux_core_read_description): Call
4377         amd64_linux_read_description.
4378         (amd64_linux_init_abi): Likewise.
4379         (amd64_x32_linux_init_abi): Likewise.
4380         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4381         * x86-linux-nat.c (x86_linux_read_description): Call
4382         amd64_linux_read_description.
4383
4384 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4385
4386         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4387         comments.
4388
4389 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4390
4391         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4392         * features/i386/i386-avx-avx512-linux.c: Remove.
4393         * features/i386/i386-avx-linux.c: Remove.
4394         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4395         * features/i386/i386-avx-mpx-linux.c: Remove.
4396         * features/i386/i386-linux.c: Remove.
4397         * features/i386/i386-mmx-linux.c: Remove.
4398         * features/i386/i386-mpx-linux.c: Remove.
4399
4400 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4401
4402         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4403         (SFILES): Add arch/i386.c.
4404         (HFILES_NO_SRCDIR): Add arch/i386.h.
4405         * arch/i386.c: New file.
4406         * arch/i386.h: New file.
4407         * arch/tdesc.h (allocate_target_description): Declare.
4408         (set_tdesc_architecture): Declare.
4409         (set_tdesc_osabi): Declare.
4410         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4411         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4412         include arch/i386.h.
4413         (i386_linux_read_description): Remove code and call
4414         i386_create_target_description.
4415         (set_tdesc_architecture): New function.
4416         (set_tdesc_osabi): New function.
4417         * target-descriptions.h (allocate_target_description): Remove.
4418
4419 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4420
4421         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4422         * target-descriptions.c (tdesc_create_feature): Likewise, and
4423         adjust code.
4424         * features/i386/32bit-avx.c: Re-generated.
4425         * features/i386/32bit-avx512.c: Re-generated.
4426         * features/i386/32bit-core.c: Re-generated.
4427         * features/i386/32bit-linux.c: Re-generated.
4428         * features/i386/32bit-mpx.c: Re-generated.
4429         * features/i386/32bit-pkeys.c: Re-generated.
4430         * features/i386/32bit-sse.c: Re-generated.
4431
4432 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4433
4434         * regformats/regdef.h (struct reg): Override operator == and !=.
4435
4436 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4437
4438         * arch/tdesc.h: New file.
4439         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4440         * target-descriptions.c: Update comments.
4441         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4442         declarations.
4443         * features/i386/32bit-avx.c: Re-generated.
4444         * features/i386/32bit-avx512.c: Re-generated.
4445         * features/i386/32bit-core.c: Re-generated.
4446         * features/i386/32bit-linux.c: Re-generated.
4447         * features/i386/32bit-mpx.c: Re-generated.
4448         * features/i386/32bit-pkeys.c: Re-generated.
4449         * features/i386/32bit-sse.c: Re-generated.
4450
4451 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4452
4453         * regformats/regdat.sh: Update generated code.
4454
4455 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4456
4457         * regformats/regdat.sh: Adjust code order.
4458
4459 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4460
4461         * expprint.c (dump_subexp_body_standard): Use constant format
4462         string in fprintf_filtered call.
4463
4464 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4465
4466         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4467         NetBSD/i386.
4468         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4469
4470 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4471
4472         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4473
4474 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4475
4476         * bsd-kvm.o: Define _KMEMUSER.
4477         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4478         * configure: Regenerate.
4479
4480 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4481
4482         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4483         * i386-fbsd-nat.c: Likewise.
4484
4485 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4486
4487         * unittests/array-view-selftests.c: Add include of <array>.
4488
4489 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4490
4491         * spu-tdep.c (flush_ea_cache): Add missing argument to
4492         call_function_by_hand.
4493
4494 2017-09-04  Pedro Alves  <palves@redhat.com>
4495
4496         * NEWS (Safer support for debugging with no debug info): New.
4497
4498 2017-09-04  Pedro Alves  <palves@redhat.com>
4499
4500         * c-exp.y (function_method, function_method_void): Add current
4501         instance flags to TYPE_INSTANCE.
4502         * dwarf2read.c (check_modifier): New.
4503         (compute_delayed_physnames): Assert that only C++ adds delayed
4504         physnames.  Mark fn_fields as const/volatile depending on
4505         physname.
4506         * eval.c (make_params): New type_instance_flags parameter.  Use
4507         it as the new type's instance flags.
4508         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4509         flags element and pass it to make_params.
4510         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4511         instance flags element.
4512         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4513         * gdbtypes.h: Include "enum-flags.h".
4514         (type_instance_flags): New enum-flags type.
4515         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4516         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4517         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4518         (follow_type_instance_flags): New function.
4519         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4520         * parser-defs.h (follow_type_instance_flags): Declare.
4521         * valops.c (value_struct_elt_for_reference): const/volatile must
4522         match too.
4523
4524 2017-09-04  Pedro Alves  <palves@redhat.com>
4525
4526         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4527         function/method scopes; lookup the nested name as a function local
4528         static variable.
4529
4530 2017-09-04  Pedro Alves  <palves@redhat.com>
4531
4532         (%type <voidval>): Add function_method.
4533         * c-exp.y (exp): New production for calls with no arguments.
4534         (function_method, function_method_void_or_typelist): New
4535         productions.
4536         (exp): New production for "method()::static_var".
4537         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4538         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4539         Handle OP_FUNC_STATIC_VAR.
4540         * parse.c (operator_length_standard):
4541         Handle OP_FUNC_STATIC_VAR.
4542
4543 2017-09-04  Pedro Alves  <palves@redhat.com>
4544
4545         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4546         handling.
4547         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4548         Ditto.
4549         * parse.c (operator_length_standard, operator_check_standard):
4550         Ditto.
4551         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4552
4553 2017-09-04  Pedro Alves  <palves@redhat.com>
4554
4555         * ax-gdb.c: Include "typeprint.h".
4556         (gen_expr_for_cast): New function.
4557         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4558         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4559         type is unknown.
4560         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4561         nodebug_data_symbol.
4562         * eval.c: Include "typeprint.h".
4563         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4564         Error out if symbol has unknown type.
4565         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4566         evaluate_subexp_for_cast.
4567         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4568         OP_VAR_MSYM_VALUE.
4569         (evaluate_subexp_for_cast): New function.
4570         * gdbtypes.c (init_nodebug_var_type): New function.
4571         (objfile_type): Use it to initialize types of variables with no
4572         debug info.
4573         * typeprint.c (error_unknown_type): New.
4574         * typeprint.h (error_unknown_type): New declaration.
4575         * compile/compile-c-types.c (convert_type_basic): Handle
4576         TYPE_CODE_ERROR; warn and fallback to int for variables with
4577         unknown type.
4578
4579 2017-09-04  Pedro Alves  <palves@redhat.com>
4580
4581         * eval.c (evaluate_var_value): New function, factored out from ...
4582         (evaluate_subexp_standard): ... here.
4583
4584 2017-09-04  Pedro Alves  <palves@redhat.com>
4585
4586         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4587         Remove useless assignments to 'op'.
4588
4589 2017-09-04  Pedro Alves  <palves@redhat.com>
4590
4591         * eval.c (eval_skip_value): New function.
4592         (evaluate_subexp_standard): Use it.
4593
4594 2017-09-04  Pedro Alves  <palves@redhat.com>
4595
4596         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4597         function name from symbol/minsym and pass it to
4598         error_call_unknown_return_type.
4599
4600 2017-09-04  Pedro Alves  <palves@redhat.com>
4601
4602         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4603         * ax-gdb.c (gen_msym_var_ref): New function.
4604         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4605         * eval.c (evaluate_var_msym_value): New function.
4606         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4607         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4608         to call_function_by_hand.
4609         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4610         Handle OP_VAR_MSYM_VALUE.
4611         (union exp_element) <msymbol>: New field.
4612         * minsyms.h (struct type): Forward declare.
4613         (find_minsym_type_and_address): Declare.
4614         * parse.c (write_exp_elt_msym): New function.
4615         (write_exp_msymbol): Delete, refactored as ...
4616         (find_minsym_type_and_address): ... this new function.
4617         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4618         (operator_length_standard, operator_check_standard): Handle
4619         OP_VAR_MSYM_VALUE.
4620         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4621
4622 2017-09-04  Pedro Alves  <palves@redhat.com>
4623
4624         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4625         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4626         unknown.
4627         * ada-typeprint.c (print_func_type): Handle functions with unknown
4628         return type.
4629         * c-typeprint.c (c_type_print_base): Handle functions and methods
4630         with unknown return type.
4631         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4632         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4633         * compile/compile-c-types.c: Include "objfiles.h".
4634         (convert_func): For functions with unknown return type, warn and
4635         default to int.
4636         * compile/compile-object-run.c (compile_object_run): Adjust call
4637         to call_function_by_hand_dummy.
4638         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4639         call_function_by_hand.
4640         * eval.c (evaluate_subexp_standard): Adjust calls to
4641         call_function_by_hand.  Handle functions and methods with unknown
4642         return type.  Pass expect_type to call_function_by_hand.
4643         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4644         return type.
4645         * gcore.c (call_target_sbrk): Adjust call to
4646         call_function_by_hand.
4647         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4648         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4649         an integer address type instead of nodebug.
4650         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4651         call_function_by_hand.
4652         * infcall.c (error_call_unknown_return_type): New function.
4653         (call_function_by_hand): New "default_return_type" parameter.
4654         Pass it down.
4655         (call_function_by_hand_dummy): New "default_return_type"
4656         parameter.  Use it instead of defaulting to int.  If there's no
4657         default and the return type is unknown, throw an error.  If
4658         there's a default return type, and the called function has no
4659         debug info, then assume the function is prototyped.
4660         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4661         New "default_return_type" parameter.
4662         (error_call_unknown_return_type): New declaration.
4663         * linux-fork.c (call_lseek): Cast return type of lseek.
4664         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4665         call_function_by_hand.
4666         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4667         calls to call_function_by_hand.
4668         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4669         return type.
4670         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4671         (value_nsstring, print_object_command): Adjust calls to
4672         call_function_by_hand.
4673         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4674         functions with unknown return type.
4675         (pascal_type_print_func_varspec_suffix): New function.
4676         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4677         TYPE_CODE_METHOD>: Use it.
4678         * python/py-value.c (valpy_call): Adjust call to
4679         call_function_by_hand.
4680         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4681         call_function_by_hand.
4682         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4683         call_function_by_hand.
4684         * valops.c (value_allocate_space_in_inferior): Adjust call to
4685         call_function_by_hand.
4686         * typeprint.c (type_print_unknown_return_type): New function.
4687         * typeprint.h (type_print_unknown_return_type): New declaration.
4688
4689 2017-09-04  Pedro Alves  <palves@redhat.com>
4690
4691         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4692         types with more than one parameter as prototyped.
4693
4694 2017-09-04  Pedro Alves  <palves@redhat.com>
4695
4696         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4697         (disassemble_command): Use gdb_disassembly_flags instead of bare
4698         int.
4699         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4700         (dump_insns, do_mixed_source_and_assembly_deprecated)
4701         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4702         Use gdb_disassembly_flags instead of bare int.
4703         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4704         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4705         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4706         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4707         (enum gdb_disassembly_flag): ... values of this new enumeration.
4708         (gdb_disassembly_flags): Define.
4709         (gdb_disassembly)
4710         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4711         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4712         gdb_disassembly_flags instead of bare int.
4713         * record-btrace.c (btrace_insn_history)
4714         (record_btrace_insn_history, record_btrace_insn_history_range)
4715         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4716         instead of bare int.
4717         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4718         Use gdb_disassembly_flags instead of bare int.
4719         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4720         Define.
4721         * target-delegates.c: Regenerate.
4722         * target.c (target_insn_history, target_insn_history_from)
4723         (target_insn_history_range): Use gdb_disassembly_flags instead of
4724         bare int.
4725         * target.h: Include "disasm.h".
4726         (struct target_ops) <to_insn_history, to_insn_history_from,
4727         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4728         int.
4729         (target_insn_history, target_insn_history_from)
4730         (target_insn_history_range): Use gdb_disassembly_flags instead of
4731         bare int.
4732
4733 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4734
4735         * cli/cli-script.c (build_command_line): For if/while commands,
4736         check whether args is empty.
4737
4738 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4739
4740         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4741         (enum command_control_type): Likewise.
4742         (struct command_line): Likewise.
4743         (free_command_lines): Likewise.
4744         (struct command_lines_deleter): Likewise.
4745         (command_line_up): Likewise.
4746         (read_command_lines): Likewise.
4747         (read_command_lines_1): Likewise.
4748         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4749         (enum command_control_type): Likewise.
4750         (struct command_line): Likewise.
4751         (free_command_lines): Likewise.
4752         (struct command_lines_deleter): Likewise.
4753         (command_line_up): Likewise.
4754         (read_command_lines): Likewise.
4755         (read_command_lines_1): Likewise.
4756         * breakpoint.h: Include cli/cli-script.h.
4757         * extension-priv.h: Likewise.
4758         * gdbcmd.h: Likewise.
4759
4760 2017-09-04  Pedro Alves  <palves@redhat.com>
4761
4762         * ada-lang.c (is_known_support_routine): Move sal declaration to
4763         where it is initialized.
4764         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4765         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4766         (clear_command, update_static_tracepoint): Remove init_sal
4767         references.  Move declarations closer to initializations.
4768         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4769         initializations.
4770         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4771         references.  Move sal declarations closer to initializations.
4772         * frame.c (find_frame_sal): Return a symtab_and_line via function
4773         return instead of output parameter.  Remove init_sal references.
4774         * frame.h (find_frame_sal): Return a symtab_and_line via function
4775         return instead of output parameter.
4776         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4777         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4778         instead of memset.
4779         (gdbscm_find_pc_line): Remove init_sal reference.
4780         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4781         references.  Move declarations closer to initializations.
4782         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4783         initializations.
4784         (finish_backward): Remove init_sal references.  Move declarations
4785         closer to initializations.
4786         * infrun.c (process_event_stop_test, handle_step_into_function)
4787         (insert_hp_step_resume_breakpoint_at_frame)
4788         (insert_step_resume_breakpoint_at_caller): Likewise.
4789         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4790         (symbol_to_sal): Likewise.
4791         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4792         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4793         to its initialization.
4794         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4795         init_sal references.  Move declarations closer to initializations.
4796         * source.c (get_current_source_symtab_and_line): Remove brace
4797         initialization.
4798         (set_current_source_symtab_and_line): Now takes the sal by const
4799         reference.  Remove brace initialization.
4800         (line_info): Remove init_sal reference.
4801         * source.h (set_current_source_symtab_and_line): Now takes a
4802         symtab_and_line via const reference.
4803         * stack.c (set_current_sal_from_frame): Adjust.
4804         (print_frame_info): Adjust.
4805         (get_last_displayed_sal): Return the sal via function return
4806         instead of via output parameter.  Simplify.
4807         (frame_info): Adjust.
4808         * stack.h (get_last_displayed_sal): Return the sal via function
4809         return instead of via output parameter.
4810         * symtab.c (init_sal): Delete.
4811         (find_pc_sect_line): Remove init_sal references.  Move
4812         declarations closer to initializations.
4813         (find_function_start_sal): Remove init_sal references.  Move
4814         declarations closer to initializations.
4815         * symtab.h (struct symtab_and_line): In-class initialize all
4816         fields.
4817         * tracepoint.c (set_traceframe_context)
4818         (print_one_static_tracepoint_marker): Remove init_sal references.
4819         Move declarations closer to initializations.
4820         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4821         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4822         declarations closer to initializations.
4823         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4824         init_sal references.  Adjust.
4825
4826 2017-09-04  Pedro Alves  <palves@redhat.com>
4827
4828         * ax-gdb.c (agent_command_1): Use range-for.
4829         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4830         * breakpoint.c: Include "common/array-view.h".
4831         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4832         parameter from struct symtabs_and_lines to
4833         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4834         (breakpoint_sals_to_pc): Change sals parameter from struct
4835         symtabs_and_lines to std::vector reference.
4836         (check_fast_tracepoint_sals): Change sals parameter from struct
4837         symtabs_and_lines to std::array_view.  Use range-for.
4838         (decode_static_tracepoint_spec): Return a std::vector instead of
4839         symtabs_and_lines.  Update.
4840         (create_breakpoint): Update.
4841         (break_range_command, until_break_command, clear_command): Update.
4842         (base_breakpoint_decode_location, bkpt_decode_location)
4843         (bkpt_probe_create_sals_from_location)
4844         (bkpt_probe_decode_location, tracepoint_decode_location)
4845         (tracepoint_probe_decode_location)
4846         (strace_marker_create_sals_from_location): Return a std::vector
4847         instead of symtabs_and_lines.
4848         (strace_marker_create_breakpoints_sal): Update.
4849         (strace_marker_decode_location): Return a std::vector instead of
4850         symtabs_and_lines.  Update.
4851         (update_breakpoint_locations): Change struct symtabs_and_lines
4852         parameters to gdb::array_view.  Adjust.
4853         (location_to_sals): Return a std::vector instead of
4854         symtabs_and_lines.  Update.
4855         (breakpoint_re_set_default): Use std::vector instead of struct
4856         symtabs_and_lines.
4857         (decode_location_default): Return a std::vector instead of
4858         symtabs_and_lines.  Update.
4859         * breakpoint.h: Include "common/array-view.h".
4860         (struct breakpoint_ops) <decode_location>: Now returns a
4861         std::vector instead of returning a symtabs_and_lines via output
4862         parameter.
4863         (update_breakpoint_locations): Change sals parameters to use
4864         gdb::array_view.
4865         * cli/cli-cmds.c (edit_command, list_command): Update to use
4866         std::vector and gdb::array_view.
4867         (ambiguous_line_spec): Adjust to use gdb::array_view and
4868         range-for.
4869         (compare_symtabs): Rename to ...
4870         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4871         const reference and adjust.
4872         (filter_sals): Rewrite using std::vector and standard algorithms.
4873         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4874         (jump_command): Update to use std::vector.
4875         * linespec.c (struct linespec_state) <canonical_names>: Update
4876         comment.
4877         (add_sal_to_sals_basic): Delete.
4878         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4879         (decode_line_2, create_sals_line_offset)
4880         (convert_address_location_to_sals, convert_linespec_to_sals)
4881         (convert_explicit_location_to_sals, parse_linespec)
4882         (event_location_to_sals, decode_line_full, decode_line_1)
4883         (decode_line_with_current_source)
4884         (decode_line_with_last_displayed, decode_objc)
4885         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4886         (linespec_result::~linespec_result): Adjust to use std::vector
4887         instead of symtabs_and_lines.
4888         * linespec.h (linespec_sals::sals): Now a std::vector.
4889         (struct linespec_result): Use std::vector, bool, and in-class
4890         initialization.
4891         (decode_line_1, decode_line_with_current_source)
4892         (decode_line_with_last_displayed): Return std::vector.
4893         * macrocmd.c (info_macros_command): Use std::vector.
4894         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4895         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4896         std::vector.
4897         * probe.h (parse_probes): Return a std::vector.
4898         * python/python.c (gdbpy_decode_line): Use std::vector and
4899         gdb::array_view.
4900         * source.c (select_source_symtab, line_info): Use std::vector.
4901         * stack.c (func_command): Use std::vector.
4902         * symtab.h (struct symtabs_and_lines): Delete.
4903         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4904
4905 2017-09-04  Pedro Alves  <palves@redhat.com>
4906
4907         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4908         unittests/array-view-selftests.c.
4909         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4910         * common/array-view.h: New file.
4911         * unittests/array-view-selftests.c: New file.
4912
4913 2017-09-04  Pedro Alves  <palves@redhat.com>
4914
4915         * cli/cli-cmds.c (edit_command): Pass message to
4916         ambiguous_line_spec.
4917         (list_command): Pass message to ambiguous_line_spec.  Say
4918         "first"/"last" instead of "start" and "end" to be consistent with
4919         the manual.
4920         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4921         them to print formatted message.
4922
4923 2017-09-04  Pedro Alves  <palves@redhat.com>
4924
4925         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4926         ftrace_update_insns by reference instead of pointer.
4927
4928 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4929
4930         * i386-go32-tdep.c: Include x86-xstate.h.
4931         (i386_go32_init_abi): Call i386_target_description.
4932         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4933         if xcr0 is X86_XSTATE_X87_MASK.
4934         * i386-tdep.h (tdesc_i386): Remove the declaration.
4935         (tdesc_i386_mmx): Likewise.
4936
4937 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4938
4939         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4940         X86_XSTATE_SSE_MASK instead of 0.
4941
4942 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4943
4944         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4945         i386_target_description.
4946         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4947         i386_target_description.
4948         * i386-tdep.c (i386_gdbarch_init): Likewise.
4949
4950 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4951
4952         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4953         (x86_darwin_init_abi_64): Call amd64_target_description.
4954         * amd64-dicos-tdep.c: Likewise.
4955         * amd64-fbsd-nat.c: Likewise.
4956         * amd64-fbsd-tdep.c: Likewise.
4957         * amd64-nbsd-tdep.c: Likewise.
4958         * amd64-obsd-tdep.c: Likewise.
4959         * amd64-sol2-tdep.c: Likewise.
4960         * amd64-windows-tdep.c: Likewise.
4961         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4962
4963 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4964
4965         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4966         (btrace_function) <insn>: Change type to use std::vector.
4967         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4968         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4969         ftrace_update_insns, ftrace_compute_global_level_offset,
4970         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4971         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4972         change to std::vector.
4973         (ftrace_update_insns): Adjust to change to std::vector, change
4974         type of INSN parameter.
4975         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4976         * record-btrace.c (btrace_call_history_insn_range,
4977         btrace_compute_src_line_range,
4978         record_btrace_frame_prev_register): Adjust to change to
4979         std::vector.
4980         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4981         to change to std::vector.
4982
4983 2017-09-03  Tom Tromey  <tom@tromey.com>
4984
4985         * corefile.c (reopen_exec_file): Use std::string.
4986
4987 2017-09-03  Tom Tromey  <tom@tromey.com>
4988
4989         * compile/compile.c (compile_register_name_mangled): Return
4990         std::string.
4991         * compile/compile-loc2c.c (pushf_register_address): Update.
4992         (pushf_register): Update.
4993         * compile/compile-c-types.c (convert_array): Update.
4994         * compile/compile-c-symbols.c (generate_vla_size): Update.
4995         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4996         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4997         (convert_one_symbol): Update.
4998         (generate_c_for_for_one_variable): Update.
4999         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5000         std::string.
5001         (generate_register_struct): Update.
5002         * compile/compile-internal.h (c_get_range_decl_name): Return a
5003         std::string.
5004         (compile_register_name_mangled): Return std::string.
5005
5006 2017-09-03  Tom Tromey  <tom@tromey.com>
5007
5008         * utils.c (perror_string): Return a std::string.
5009         (throw_perror_with_name, perror_warning_with_name): Update.
5010
5011 2017-09-03  Tom Tromey  <tom@tromey.com>
5012
5013         * demangle.c (demangle_command): Use std::string,
5014         unique_xmalloc_ptr.
5015
5016 2017-09-03  Tom Tromey  <tom@tromey.com>
5017
5018         * cli/cli-setshow.c (do_set_command): Use std::string.
5019
5020 2017-09-03  Tom Tromey  <tom@tromey.com>
5021
5022         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5023
5024 2017-09-03  Tom Tromey  <tom@tromey.com>
5025
5026         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5027
5028 2017-09-03  Tom Tromey  <tom@tromey.com>
5029
5030         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5031         gdb::unique_xmalloc_ptr.
5032
5033 2017-09-03  Tom Tromey  <tom@tromey.com>
5034
5035         * thread.c (print_thread_info_1): Use string_printf.
5036         (thread_apply_command, thread_apply_all_command): Use
5037         std::string.
5038
5039 2017-09-03  Tom Tromey  <tom@tromey.com>
5040
5041         * valprint.c (val_print_string): Update.
5042         * gdbcore.h (memory_error_message): Return std::string.
5043         * corefile.c (memory_error_message): Return std::string.
5044         (memory_error): Update.
5045         * breakpoint.c (insert_bp_location): Update.
5046
5047 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5048
5049         * target/waitstatus.h (target_waitstatus_to_string): Change
5050         return type to std::string.
5051         * target/waitstatus.c (target_waitstatus_to_string): Return
5052         std::string.
5053         * target.h (target_waitstatus_to_string): Remove declaration.
5054         * infrun.c (resume, clear_proceed_status_thread,
5055         print_target_wait_results, do_target_wait, save_waitstatus,
5056         stop_all_threads): Adjust.
5057         * record-btrace.c (record_btrace_wait): Adjust.
5058         * target-debug.h
5059         (target_debug_print_struct_target_waitstatus_p): Adjust.
5060
5061 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5062
5063         PR gdb/22046
5064         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5065         detection.
5066
5067 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5068
5069         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5070         for setting/unsetting environment variables on the remote target.
5071         (New remote packets): Add entries for QEnvironmentHexEncoded,
5072         QEnvironmentUnset and QEnvironmentReset.
5073         * common/environ.c (gdb_environ::operator=): Extend method to
5074         handle m_user_set_env_list and m_user_unset_env_list.
5075         (gdb_environ::clear): Likewise.
5076         (match_var_in_string): Change type of first parameter from 'char
5077         *' to 'const char *'.
5078         (gdb_environ::set): Extend method to handle
5079         m_user_set_env_list and m_user_unset_env_list.
5080         (gdb_environ::unset): Likewise.
5081         (gdb_environ::clear_user_set_env): New method.
5082         (gdb_environ::user_set_envp): Likewise.
5083         (gdb_environ::user_unset_envp): Likewise.
5084         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5085         m_user_unset_env_list on move constructor/assignment.
5086         (unset): Add new default parameter 'update_unset_list = true'.
5087         (clear_user_set_env): New method.
5088         (user_set_envp): Likewise.
5089         (user_unset_envp): Likewise.
5090         (m_user_set_env_list): New std::set.
5091         (m_user_unset_env_list): Likewise.
5092         * common/rsp-low.c (hex2str): New function.
5093         (bin2hex): New overload for bin2hex function.
5094         * common/rsp-low.c (hex2str): New prototype.
5095         (str2hex): New overload prototype.
5096         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5097         QEnvironmentUnset and QEnvironmentReset.
5098         (remote_protocol_features): Add QEnvironmentHexEncoded,
5099         QEnvironmentUnset and QEnvironmentReset packets.
5100         (send_environment_packet): New function.
5101         (extended_remote_environment_support): Likewise.
5102         (extended_remote_create_inferior): Call
5103         extended_remote_environment_support.
5104         (_initialize_remote): Add QEnvironmentHexEncoded,
5105         QEnvironmentUnset and QEnvironmentReset packet configs.
5106         * unittests/environ-selftests.c (gdb_selftest_env_var):
5107         New variable.
5108         (test_vector_initialization): New function.
5109         (test_init_from_host_environ): Likewise.
5110         (test_reinit_from_host_environ): Likewise.
5111         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5112         Likewise.
5113         (test_unset_set_empty_vector): Likewise.
5114         (test_vector_clear): Likewise.
5115         (test_std_move): Likewise.
5116         (test_move_constructor):
5117         (test_self_move): Likewise.
5118         (test_set_unset_reset): Likewise.
5119         (run_tests): Rewrite in terms of the functions above.
5120
5121 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5122
5123         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5124         (adi_available): Use a temp variable of type CORE_ADDR as argument
5125         3 when calling target_auxv_search.
5126         (adi_normalize_address): Use masks and xor operators to calculate
5127         normalized address.
5128         (adi_read_versions, adi_write_versions, adi_print_versions)
5129         (do_examine, do_assign): Use paddress.
5130
5131 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5132
5133         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5134         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5135         out of loop and add supply of FIR.
5136         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5137         add collect of FIR.
5138
5139 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5140
5141         PR gdb/21827
5142         * cli/cli-script.c (define_command): Don't convert command name
5143         to lower case.
5144
5145 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5146
5147         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5148         Update all callers accordingly. Remove all code blocks handling
5149         the case where DISPP is not NULL.
5150
5151 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5152
5153         PR symtab/22003
5154         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5155         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5156         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5157
5158 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5159
5160         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5161         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5162         (read_comp_units_from_section): New parameter abbrev_section, use
5163         read_and_check_comp_unit_head, allocate signatured_type if needed.
5164         (create_all_comp_units): Update read_comp_units_from_section caller.
5165
5166 2017-08-23  Pedro Alves  <palves@redhat.com>
5167
5168         PR remote/21852
5169         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5170         to null_ptid and switch to thread without reading the registers
5171         after adding the inferior.
5172
5173 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5174
5175         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5176         compile-gcc.
5177         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5178         (compile_to_object): Implement compile_gcc.
5179         (_initialize_compile): Install "set compile-gcc".  Initialize
5180         compile_gcc.
5181
5182 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5183
5184         * compile/compile.c (compile_to_object): Conditionally call
5185         set_verbose.  Conditionally call compile or compile_v0.
5186
5187 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5188
5189         * sparc64-tdep.h: (adi_normalize_address): New export.
5190         * sparc-nat.h: (open_adi_tag_fd): New export.
5191         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5192         * sparc64-linux-tdep.c:
5193         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5194         (sparc64_linux_handle_segmentation_fault): New function.
5195         (sparc64_linux_init_abi): Register
5196         sparc64_linux_handle_segmentation_fault
5197         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5198         (sparc64_addr_bits_remove): New function.
5199         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5200         (MAX_PROC_NAME_SIZE): New macro.
5201         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5202         (sparc64adilist): New variable.
5203         (adi_proc_list): New variable.
5204         (find_adi_info): New function.
5205         (add_adi_info): New function.
5206         (get_adi_info_proc): New function.
5207         (get_adi_info): New function.
5208         (info_adi_command): New function.
5209         (read_maps_entry): New function.
5210         (adi_available): New function.
5211         (adi_normalize_address): New function.
5212         (adi_align_address): New function.
5213         (adi_convert_byte_count): New function.
5214         (adi_tag_fd): New function.
5215         (adi_is_addr_mapped): New function.
5216         (adi_read_versions): New function.
5217         (adi_write_versions): New function.
5218         (adi_print_versions): New function.
5219         (do_examine): New function.
5220         (do_assign): New function.
5221         (adi_examine_command): New function.
5222         (adi_assign_command): New function.
5223         (_initialize_sparc64_adi_tdep): New function.
5224
5225 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5226
5227         * breakpoint.c (breakpoints_info): Rename to ...
5228         (info_breakpoints_command): ... this.
5229         (watchpoints_info): Rename to ...
5230         (info_watchpoints_command): ... this.
5231         (tracepoints_info): Rename to ...
5232         (info_tracepoints_command): ... this.
5233         (_initialize_breakpoint): Adjust.
5234         * dcache.c (dcache_info): Rename to ...
5235         (info_display_command): ... this.
5236         (_initialize_dcache): Adjust.
5237         * frame.h (args_info): Rename to ...
5238         (info_args_command): ... this.
5239         (locals_info): Rename to ...
5240         (info_locals_command): ... this.
5241         * infcmd.c (nofp_registers_info): Rename to ...
5242         (info_registers_command): ... this.
5243         (float_info): Rename to ...
5244         (info_float_command): ... this.
5245         (program_info): Rename to ...
5246         (info_program_command): ... this.
5247         (all_registers_info): Rename to ...
5248         (info_all_registers_command): ... this.
5249         (vector_info): Rename to ...
5250         (info_vector_command): ... this.
5251         (float_info): Rename to ...
5252         (info_float_command): ... this.
5253         (_initialize_infcmd): Adjust.
5254         * inferior.h (term_info): Rename to ...
5255         (info_terminal_command): ... this.
5256         * inflow.c (term_info): Rename to ...
5257         (info_terminal_command): ... this.
5258         (_initialize_inflow): Adjust.
5259         * infrun.c (signals_info): Rename to ...
5260         (info_signals_command): ... this.
5261         (_initialize_infrun): Adjust.
5262         * objc-lang.c (classes_info): Rename to ...
5263         (info_classes_command): ... this.
5264         (selectors_info): Rename to ...
5265         (info_selectors_command): ... this.
5266         (_initialize_objc_language): Adjust.
5267         * printcmd.c (sym_info): Rename to ...
5268         (info_symbol_command): ... this.
5269         (address_info): Rename to ...
5270         (info_address_command): ... this.
5271         (display_info): Rename to ...
5272         (info_display_command): ... this.
5273         (_initialize_printcmd): Adjust.
5274         * reverse.c (bookmarks_info): Rename to ...
5275         (info_breakpoints_command): ... this.
5276         (_initialize_reverse): Adjust.
5277         * ser-go32.c (dos_info): Rename to ...
5278         (info_serial_command): ... this.
5279         (_initialize_ser_dos): Adjust.
5280         * skip.c (skip_info): Rename to ...
5281         (info_skip_command): ... this.
5282         (_initialize_step_skip): Adjust.
5283         * source.c (line_info): Rename to ...
5284         (info_line_command): ... this.
5285         (source_info): Rename to ...
5286         (info_source_command)
5287         * stack.c (frame_info): Rename to ...
5288         (info_frame_command): ... this.
5289         (locals_info): Rename to ...
5290         (info_locals_command): ... this.
5291         (args_info): Rename to ...
5292         (info_args_command): ... this.
5293         (_initialize_stack): Adjust.
5294         * symtab.c (sources_info): Rename to ...
5295         (info_sources_command): ... this.
5296         (variables_info): Rename to ...
5297         (info_variables_command): ... this.
5298         (functions_info): Rename to ...
5299         (info_functions_command): ... this.
5300         (types_info): Rename to ...
5301         (info_types_command): ... this.
5302         (_initialize_symtab): Adjust.
5303         * target.c (target_info): Rename to ...
5304         (info_target_command): ... this.
5305         (initialize_targets): Adjust.
5306         * tracepoint.c (tvariables_info): Rename to ...
5307         (info_tvariables_command): ... this.
5308         (scope_info): Rename to ...
5309         (info_scope_command): ... this.
5310         (trace_dump_actions): Adjust.
5311         (_initialize_tracepoint): Adjust.
5312
5313 2017-08-22  Tom Tromey  <tom@tromey.com>
5314
5315         * breakpoint.h (install_breakpoint): Update.
5316         * breakpoint.c (add_solib_catchpoint): Update.
5317         (install_breakpoint): Change argument to a std::unique_ptr.
5318         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5319         (create_breakpoint_sal, create_breakpoint): Update.
5320         (watch_command_1, catch_exec_command_1)
5321         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5322         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5323         Return the breakpoint.
5324         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5325         (new_single_step_breakpoint): Update.
5326         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5327         std::unique_ptr.
5328         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5329         std::unique_ptr.
5330         * break-catch-sig.c (create_signal_catchpoint): Use
5331         std::unique_ptr.
5332         * ada-lang.c (create_ada_exception_catchpoint): Use
5333         std::unique_ptr.
5334
5335 2017-08-22  Tom Tromey  <tom@tromey.com>
5336
5337         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5338
5339 2017-08-22  Tom Tromey  <tom@tromey.com>
5340
5341         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5342         (lookup_partial_symbol): Update.
5343
5344 2017-08-22  Tom Tromey  <tom@tromey.com>
5345
5346         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5347         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5348         (find_and_open_source, symtab_to_fullname): Update.
5349         * psymtab.c (psymtab_to_fullname): Update.
5350
5351 2017-08-22  Tom Tromey  <tom@tromey.com>
5352
5353         * exec.c (exec_file_attach): Update.
5354         * linux-thread-db.c (try_thread_db_load): Update.
5355         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5356         * utils.c (gdb_realpath): Change return type.
5357         (gdb_realpath_keepfile): Update.
5358         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5359         (_initialize_utils): Register the new self test.
5360         * source.c (openp): Update.
5361         (find_and_open_source): Update.
5362         * nto-tdep.c (nto_find_and_open_solib): Update.
5363         * main.c (set_gdb_data_directory): Update.
5364         (captured_main_1): Update.
5365         * dwarf2read.c (dwarf2_get_dwz_file): Update
5366         (dw2_map_symbol_filenames): Update.
5367         * auto-load.c (auto_load_safe_path_vec_update): Update.
5368         (filename_is_in_auto_load_safe_path_vec): Change type of
5369         "filename_realp".
5370         (auto_load_objfile_script): Update.
5371         (file_is_auto_load_safe): Update.  Use std::string.
5372         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5373
5374 2017-08-22  Tom Tromey  <tom@tromey.com>
5375
5376         * utils.c (gdb_realpath_keepfile): Return a
5377         gdb::unique_xmalloc_ptr.
5378         * exec.c (exec_file_attach): Update.
5379         * utils.h (gdb_realpath_keepfile): Return a
5380         gdb::unique_xmalloc_ptr.
5381
5382 2017-08-22  Tom Tromey  <tom@tromey.com>
5383
5384         * compile/compile.c (compile_file_command): Use
5385         gdb::unique_xmalloc_ptr, std::string.
5386         * utils.c (gdb_abspath): Change return type.
5387         * source.c (openp): Update.
5388         * objfiles.c (allocate_objfile): Update.
5389         * main.c (set_gdb_data_directory): Update.
5390         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5391
5392 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5393
5394         * cli-cmds.c (list_commands): List actual code around more than
5395         one location.
5396
5397 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5398
5399         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5400
5401 2017-08-21  Pedro Alves  <palves@redhat.com>
5402
5403         PR gdb/19487
5404         * c-exp.y (variable production): Handle function aliases.
5405         * minsyms.c (msymbol_is_text): New function.
5406         * minsyms.h (msymbol_is_text): Declare.
5407         * symtab.c (find_function_alias_target): New function.
5408         * symtab.h (find_function_alias_target): Declare.
5409
5410 2017-08-21  Pedro Alves  <palves@redhat.com>
5411
5412         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5413         typedefs.
5414         * typeprint.c (whatis_exp): If handling "whatis", and expression
5415         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5416         typedefs here.
5417         * valops.c (value_cast): Save "to" type before resolving
5418         stubs/typedefs.  Use that type as resulting value's type.
5419
5420 2017-08-18  Tom Tromey  <tom@tromey.com>
5421             Pedro Alves  <palves@redhat.com>
5422
5423         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5424         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5425         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5426         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5427         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5428         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5429         (linux_get_siginfo_data): Add "thread" argument.  Use
5430         scoped_restore.
5431         * linux-nat.c (linux_child_follow_fork)
5432         (check_stopped_by_watchpoint): Use scoped_restore.
5433         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5434         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5435         (restore_inferior_ptid, save_inferior_ptid): Remove.
5436         * btrace.c (btrace_fetch): Use scoped_restore.
5437         * bsd-uthread.c (bsd_uthread_fetch_registers)
5438         (bsd_uthread_store_registers): Use scoped_restore.
5439         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5440         scoped_restore.
5441         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5442         (aix_thread_xfer_partial): Use scoped_restore.
5443         * inferior.h (save_inferior_ptid): Remove.
5444
5445 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5446
5447         PR tdep/21818
5448         * arm-tdep.c (gdb_print_insn_arm): Mark
5449         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5450
5451 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5452
5453         * NEWS: Mention GDBserver's new option "--selftest".
5454         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5455         * selftest.c: Move it to common/selftest.c.
5456         * selftest.h: Move it to common/selftest.h.
5457         * selftest-arch.c (reset): New function.
5458         (tests_with_arch): Call reset.
5459
5460 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5461
5462         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5463         instead of exception_fprintf and printf_filtered.
5464
5465 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5466
5467         * selftest.c (register_self_test): Rename it to
5468         selftests::register_test.
5469         (run_self_tests): selftest::run_tests.
5470         * selftest.h: Update declarations.
5471         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5472         selftests::register_test_foreach_arch.
5473         * selftest-arch.h: Update declaration.
5474         * aarch64-tdep.c: Update.
5475         * arm-tdep.c: Likewise.
5476         * disasm-selftests.c: Likewise.
5477         * dwarf2loc.c: Likewise.
5478         * dwarf2-frame.c: Likewise.
5479         * findvar.c: Likewise.
5480         * gdbarch-selftests.c: Likewise.
5481         * maint.c (maintenance_selftest): Likewise.
5482         * regcache.c: Likewise.
5483         * rust-exp.y: Likewise.
5484         * selftest-arch.c: Likewise.
5485         * unittests/environ-selftests.c: Likewise.
5486         * unittests/function-view-selftests.c: Likewise.
5487         * unittests/offset-type-selftests.c: Likewise.
5488         * unittests/optional-selftests.c: Likewise.
5489         * unittests/scoped_restore-selftests.c: Likewise.
5490         * utils-selftests.c: Likewise.
5491
5492 2017-08-17  Pedro Alves  <palves@redhat.com>
5493
5494         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5495         local.
5496
5497 2017-08-17  Pedro Alves  <palves@redhat.com>
5498
5499         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5500         field.
5501         (reset_die_in_process): Delete, replaced by ...
5502         (process_die_scope): ... this new class.  Make it responsible for
5503         freeing cu->line_header too.
5504         (process_die): Use process_die_scope.
5505         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5506         cu->line_header_die_owner.  Don't release the line header if it's
5507         owned by the CU.
5508         (setup_type_unit_groups): Make the CU/DIE own the line header.
5509         Don't release the line header here.
5510
5511 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5512
5513         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5514
5515 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5516
5517         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5518         Single-Key mode
5519
5520 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5521
5522         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5523         mode command list.
5524
5525 2017-08-15  Stafford Horne  <shorne@gmail.com>
5526
5527         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5528
5529 2017-08-15  Stafford Horne  <shorne@gmail.com>
5530
5531         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5532
5533 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5534
5535         PR gdb/21954
5536         * infcmd.c (unset_environment_command): Use the 'clear' method on
5537         the environment instead of resetting it.
5538
5539 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5540
5541         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5542         platforms.
5543
5544 2017-08-14  Tom Tromey  <tom@tromey.com>
5545
5546         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5547         (print_binary_chars): Likewise.
5548         (BITS_IN_BYTES): Remove.
5549
5550 2017-08-14  Tom Tromey  <tom@tromey.com>
5551
5552         PR gdb/21675
5553         * valprint.c (LOW_ZERO): Change value to 034.
5554         (print_octal_chars): Add static_asserts for octal constants.
5555         * printcmd.c (print_scalar_formatted): Add 'd' case.
5556
5557 2017-08-11  Tom Tromey  <tom@tromey.com>
5558
5559         * symfile.c (add_symbol_file_command): Use std::vector.
5560
5561 2017-08-14  Tom Tromey  <tom@tromey.com>
5562
5563         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5564         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5565         std::move.
5566         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5567
5568 2017-08-11  Pedro Alves  <palves@redhat.com>
5569
5570         * infrun.c (process_event_stop_test): Adjust
5571         function_name_is_marked_for_skip call.
5572         * skip.c: Include <list>.
5573         (skiplist_entry): Make it a class with private fields, and
5574         getters/setters.
5575         (skiplist_entry_chain): Delete.
5576         (skiplist_entries): New.
5577         (skiplist_entry_count): Delete.
5578         (highest_skiplist_entry_num): New.
5579         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5580         (add_skiplist_entry): Delete.
5581         (skiplist_entry::skiplist_entry): New.
5582         (skiplist_entry::add_entry): New.
5583         (skip_file_command, skip_function): Adjust.
5584         (compile_skip_regexp): Delete.
5585         (skip_command): Don't compile regexp here.  Adjust to use
5586         skiplist_entry::add_entry.
5587         (skip_info): Adjust to use range-for and getters.
5588         (skip_enable_command, skip_disable_command): Adjust to use
5589         range-for and setters.
5590         (skip_delete_command): Adjust to use std::list.
5591         (add_skiplist_entry): Delete.
5592         (skip_file_p): Delete, refactored as ...
5593         (skiplist_entry::do_skip_file_p): ... this new method.
5594         (skip_gfile_p): Delete, refactored as ...
5595         (skiplist_entry::do_gskip_file_p): ... this new method.
5596         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5597         (skiplist_entry::skip_function_p): ... this new method.
5598         (function_name_is_marked_for_skip): Now returns bool, and takes
5599         the function sal by const reference.  Adjust to use range-for and
5600         skiplist_entry methods.
5601         (_initialize_step_skip): Remove references to
5602         skiplist_entry_chain, skiplist_entry_count.
5603         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5604         takes the function sal by const reference.
5605
5606 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5607
5608         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5609         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5610         (dwarf2_frame_cache):
5611         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5612         RETURN_MASK_ALL and set *this_case to NULL.
5613         * frame-unwind.h: Update comments.
5614
5615 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5616
5617         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5618         (dwarf2_frame_state_copy_regs): Remove.
5619         (dwarf2_frame_state_free_regs): Remove.
5620         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5621         (dwarf2_restore_rule): Call method .alloc_regs instead of
5622         dwarf2_frame_state_alloc_regs.
5623         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5624         constructor.  Call std::move.
5625         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5626         (dwarf2_frame_cache): Likewise.
5627
5628         [GDB_SELF_TEST]: Include selftest.h and
5629         selftest-arch.h.
5630         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5631         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5632         execute_cfa_program_test.
5633
5634         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5635         copy ctor, assignment operator, move assignment.
5636         <alloc_regs>: New method.
5637         <swap>: New method.
5638         (struct dwarf2_frame_state): Delete dtor.
5639         (dwarf2_frame_state_alloc_regs): Remove declaration.
5640         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5641         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5642
5643 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5644
5645         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5646         (dwarf2_frame_state::dwarf2_frame_state): New.
5647         (dwarf2_frame_state::~dwarf2_frame_state): New.
5648         (dwarf2_fetch_cfa_info): Update.
5649         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5650         rather than a pointer.  Update code.
5651         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5652         dtor.
5653         <data_align, code_align, retaddr_column>: Change them to const.
5654         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5655         to bool.
5656
5657 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5658
5659         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5660         <loc.exp>: New field.
5661         * dwarf2-frame.c (execute_cfa_program): Update.
5662         (dwarf2_frame_prev_register): Update.
5663
5664 2017-08-10  Pedro Alves  <palves@redhat.com>
5665
5666         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5667
5668 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5669
5670         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5671         (fbsd_pending_children): Use std::list.
5672         (fbsd_remember_child): Likewise.
5673         (fbsd_is_child_pending): Likewise.
5674         (fbsd_pending_vfork_done): Use std::forward_list.
5675         (fbsd_add_vfork_done): Likewise.
5676         (fbsd_is_vfork_done_pending): Likewise.
5677         (fbsd_next_vfork_done): Likewise.
5678
5679 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5680
5681         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5682         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5683         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5684         for `mapfilename'.
5685         (fbsd_xfer_partial): Use gdb::byte_vector.
5686         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5687
5688 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5689
5690         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5691         "filestuff.h".
5692         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5693
5694 2017-08-09  Tom Tromey  <tom@tromey.com>
5695
5696         * skip.c (skiplist_entry): New constructor.
5697         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5698         (skiplist_entry::file_is_glob): Now bool.
5699         (skiplist_entry::file, skiplist_entry::function): Now
5700         std::string.
5701         (make_skip_entry): Return a unique_ptr.  Use new.
5702         (free_skiplist_entry, free_skiplist_entry_cleanup)
5703         (make_free_skiplist_entry_cleanup): Remove.
5704         (skip_command, skip_disable_command, add_skiplist_entry)
5705         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5706         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5707         (function_name_is_marked_for_skip): Update.
5708         (skip_delete_command): Update.  Use delete.
5709
5710 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5711
5712         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5713         (aarch64_linux_core_read_description): New function.
5714         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5715
5716 2017-08-09  Pedro Alves  <palves@redhat.com>
5717
5718         * cp-name-parser.y (cp_comp_to_string): Return a
5719         gdb::unique_xmalloc_ptr<char>.
5720         * cp-support.c (replace_typedefs_qualified_name)
5721         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5722         (cp_canonicalize_string_full): Use op= instead of explicit
5723         convertion.
5724         (cp_class_name_from_physname, method_name_from_physname)
5725         (cp_func_name, cp_remove_params): Adjust to use
5726         gdb::unique_xmalloc_ptr<char>.
5727         * cp-support.h (cp_comp_to_string): Return a
5728         gdb::unique_xmalloc_ptr<char>.
5729         * python/py-type.c (typy_lookup_type): Adjust to use
5730         gdb::unique_xmalloc_ptr<char>.
5731
5732 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5733
5734         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5735
5736 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5737             Yao Qi  <yao.qi@linaro.org>
5738
5739         * cp-support.c (cp_canonicalize_string_full): Use
5740         gdb::unique_xmalloc_ptr<char>.
5741         (cp_canonicalize_string): Likewise.
5742
5743 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5744
5745         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5746         * regformats/i386/amd64-avx-avx512.dat: Remove.
5747         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5748         * regformats/i386/amd64-avx-mpx.dat:Remove.
5749         * regformats/i386/amd64-avx.dat: Remove.
5750         * regformats/i386/amd64-mpx.dat: Remove.
5751         * regformats/i386/i386-avx-avx512.dat: Remove.
5752         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5753         * regformats/i386/i386-avx-mpx.dat: Remove.
5754         * regformats/i386/i386-mmx.dat: Remove.
5755         * regformats/i386/i386-mpx.dat: Remove.
5756
5757 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5758
5759         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5760         * amd64-tdep.c: Don't include features/i386/x32*.c.
5761         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5762         functions.
5763         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5764         and i386/x32-avx-avx512.
5765         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5766         and i386/x32.xml.
5767         * features/i386/x32-avx-avx512.c: Removed.
5768         * features/i386/x32-avx-avx512.xml: Removed.
5769         * features/i386/x32-avx.c: Removed.
5770         * features/i386/x32-avx.xml: Removed.
5771         * features/i386/x32.c: Removed.
5772         * features/i386/x32.xml: Removed.
5773         * regformats/i386/x32-avx-avx512.dat: Removed.
5774         * regformats/i386/x32-avx.dat: Removed.
5775         * regformats/i386/x32.dat: Removed.
5776
5777 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5778
5779         PR breakpoints/21886
5780         * mem-break.c (default_memory_insert_breakpoint): Use
5781         `->placed_address' rather than `->reqstd_address' for the
5782         breakpoint location.
5783
5784 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5785
5786         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5787         assertions.
5788
5789 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5790
5791         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5792         a union of `tdep_info', `tdesc_data' and `id'.
5793         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5794         rather than `info.tdep_info'.
5795         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5796         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5797         * i386-tdep.c (i386_gdbarch_init): Likewise.
5798         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5799         * mips-tdep.c (mips_gdbarch_init): Likewise.
5800         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5801         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5802         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5803         `info.tdep_info'.
5804         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5805         `info.tdep_info'.
5806         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5807         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5808         `info.tdep_info'.
5809         * spu-tdep.c (spu_gdbarch_init): Likewise.
5810         * gdbarch.h: Regenerate.
5811
5812 2017-08-07  Leszek Swirski  <leszeks@google.com>
5813
5814         PR symtab/20899
5815         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5816
5817 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5818
5819         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5820         (gdbsim_open): Rename gdb_argv args object to argv.
5821
5822 2017-08-05  Tom Tromey  <tom@tromey.com>
5823
5824         * compile/compile-object-load.c (compile_object_load): Use
5825         gdb::unique_xmalloc_ptr.
5826         * cli/cli-dump.c (scan_filename): Rename from
5827         scan_filename_with_cleanup.  Change return type.
5828         (scan_expression): Rename from scan_expression_with_cleanup.
5829         Change return type.
5830         (dump_memory_to_file, dump_value_to_file, restore_command):
5831         Use gdb::unique_xmalloc_ptr.  Update.
5832         * cli/cli-cmds.c (find_and_open_script): Use
5833         gdb::unique_xmalloc_ptr.
5834         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5835         * symmisc.c (maintenance_print_symbols)
5836         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5837         * symfile.c (symfile_bfd_open, generic_load)
5838         (add_symbol_file_command, remove_symbol_file_command): Use
5839         gdb::unique_xmalloc_ptr.
5840         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5841         * psymtab.c (maintenance_print_psymbols): Use
5842         gdb::unique_xmalloc_ptr.
5843         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5844         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5845         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5846         (reload_shared_libraries_1): Likewise.
5847
5848 2017-08-05  Tom Tromey  <tom@tromey.com>
5849
5850         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5851         (rust_op_vector, rust_set_vector): New typedefs.
5852         (current_parser): New global.
5853         (work_obstack): Change to pointer type.  Update all users.
5854         (rust_ast, pstate): Remove globals.
5855         (struct rust_parser): New.
5856         (%union) <params, field_inits>: Change type.
5857         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5858         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5859         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5860         (convert_params_to_types, convert_params_to_expression): Change
5861         type of "params".
5862         (ast_string): Change type of "fields".
5863         (rust_parse): Make a rust_parser.  Remove cleanups.
5864         (rust_lex_tests): Make and install an auto_obstack.
5865
5866 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5867
5868         * configure.srv (ipa_x32_linux_regobj): New.
5869         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5870         instead of X86_TDESC_AVX512.
5871         (initialize_low_tracepoint): Call
5872         init_registers_x32_avx_avx512_linux.
5873
5874 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5875
5876         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5877
5878 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5879
5880         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5881
5882 2017-08-03  Tom Tromey  <tom@tromey.com>
5883
5884         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5885         Remove.
5886         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5887
5888 2017-08-03  Tom Tromey  <tom@tromey.com>
5889
5890         * python/py-param.c (compute_enum_values): Use gdb_argv.
5891
5892 2017-08-03  Tom Tromey  <tom@tromey.com>
5893
5894         * utils.h (struct gdb_argv_deleter): New.
5895         (gdb_argv): New class.
5896         * utils.c (gdb_argv::reset): New method.
5897         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5898         * tracefile.c (tsave_command): Use gdb_argv.
5899         * top.c (new_ui_command): Use gdb_argv.
5900         * symmisc.c (maintenance_print_symbols)
5901         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5902         * symfile.c (symbol_file_command, generic_load)
5903         (remove_symbol_file_command): Use gdb_argv.
5904         * stack.c (backtrace_command): Use gdb_argv.
5905         * source.c (add_path, show_substitute_path_command)
5906         (unset_substitute_path_command, set_substitute_path_command):
5907         Use gdb_argv.
5908         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5909         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5910         * remote.c (extended_remote_run, remote_put_command)
5911         (remote_get_command, remote_delete_command): Use gdb_argv.
5912         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5913         (gdbsim_open): Use gdb_argv.
5914         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5915         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5916         * procfs.c (procfs_info_proc): Use gdb_argv.
5917         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5918         * infrun.c (handle_command): Use gdb_argv.
5919         * inferior.c (add_inferior_command, clone_inferior_command):
5920         Use gdb_argv.
5921         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5922         * exec.c (exec_file_command): Use gdb_argv.
5923         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5924         * compile/compile.c (build_argc_argv): Use gdb_argv.
5925
5926 2017-08-03  Tom Tromey  <tom@tromey.com>
5927
5928         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5929
5930 2017-08-03  Tom Tromey  <tom@tromey.com>
5931
5932         * python/python.c (compute_python_string): Return std::string.
5933         (gdbpy_eval_from_control_command): Update.
5934         (do_start_initialization): Use std::string.
5935         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5936         xstrprintf.
5937         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5938         xstrprintf.
5939
5940 2017-08-03  Tom Tromey  <tom@tromey.com>
5941
5942         * top.h (do_restore_instream_cleanup): Remove.
5943         * top.c (do_restore_instream_cleanup): Remove.
5944         (read_command_file): Use scoped_restore.
5945         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5946
5947 2017-08-03  Tom Tromey  <tom@tromey.com>
5948
5949         * cli/cli-script.c (execute_user_command)
5950         (execute_control_command): Use scoped_restore.
5951
5952 2017-08-03  Tom Tromey  <tom@tromey.com>
5953
5954         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5955         (execute_user_command): Remove user_call_depth; use
5956         user_args_stack's size instead.
5957
5958 2017-08-03  Tom Tromey  <tom@tromey.com>
5959
5960         * top.h (in_user_command): Remove.
5961         * top.c (in_user_command): Remove.
5962         * cli/cli-script.c (do_restore_user_call_depth)
5963         (execute_user_command): Update.
5964
5965 2017-08-03  Tom Tromey  <tom@tromey.com>
5966
5967         * valops.c (search_struct_method): Use gdb::byte_vector.
5968         * valarith.c (value_concat): Use std::vector.
5969         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5970         (simple_search_memory): Likewise.
5971         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5972         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5973         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5974         * elfread.c (elf_rel_plt_read): Use std::string.
5975         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5976         * cli/cli-dump.c (restore_section_callback): Use
5977         gdb::byte_vector.
5978
5979 2017-08-03  Tom Tromey  <tom@tromey.com>
5980
5981         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5982
5983 2017-08-03  Tom Tromey  <tom@tromey.com>
5984
5985         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5986         (tui_register_format): Use scoped_restore.
5987
5988 2017-08-03  Tom Tromey  <tom@tromey.com>
5989
5990         * reverse.c (exec_direction_default): Remove.
5991         (exec_reverse_once): Use scoped_restore.
5992         * remote.c (restore_remote_timeout): Remove.
5993         (remote_flash_erase, remote_flash_write, remote_flash_done)
5994         (readchar, remote_serial_write): Use scoped_restore.
5995         * cli/cli-script.c (struct source_cleanup_lines_args)
5996         (source_cleanup_lines): Remove.
5997         (script_from_file): Use scoped_restore.
5998         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5999         (source_command): Use scoped_restore.
6000
6001 2017-08-03  Tom Tromey  <tom@tromey.com>
6002
6003         * utils.h (make_cleanup_free_so): Remove.
6004         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6005         * solist.h (struct so_deleter): New.
6006         (so_list_up): New typedef.
6007         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6008
6009 2017-08-03  Tom Tromey  <tom@tromey.com>
6010
6011         * utils.h (make_cleanup_restore_current_language): Remove.
6012         * utils.c (do_restore_current_language)
6013         (make_cleanup_restore_current_language): Remove.
6014         * parse.c (parse_exp_in_context_1)
6015         (parse_expression_with_language): Use
6016         scoped_restore_current_language.
6017         * mi/mi-main.c (mi_cmd_execute): Use
6018         scoped_restore_current_language.
6019         * language.h (scoped_restore_current_language): New class.
6020
6021 2017-08-03  Tom Tromey  <tom@tromey.com>
6022
6023         * compile/compile.c (cleanup_unlink_file): Remove.
6024         (compile_to_object): Use gdb::unlinker.
6025         (eval_compile_command): Likewise.
6026
6027 2017-08-03  Tom Tromey  <tom@tromey.com>
6028
6029         * utils.h (make_cleanup_fclose): Remove.
6030         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6031
6032 2017-08-03  Tom Tromey  <tom@tromey.com>
6033
6034         * top.c (open_terminal_stream): Return gdb_file_up.
6035         (new_ui_command): Update.
6036
6037 2017-08-03  Tom Tromey  <tom@tromey.com>
6038
6039         * source.c (print_source_lines_base, forward_search_command)
6040         (reverse_search_command): Use gdb_file_up.
6041
6042 2017-08-03  Tom Tromey  <tom@tromey.com>
6043
6044         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6045
6046 2017-08-03  Tom Tromey  <tom@tromey.com>
6047
6048         * cli/cli-cmds.c (find_and_open_script): Change return type.
6049         Remove "streamp" and "full_path" parameters.
6050         (source_script_with_search): Update.
6051         * auto-load.c (source_script_file): Update.
6052         * cli/cli-cmds.h (find_and_open_script): Change type.
6053         (open_script): New struct.
6054
6055 2017-08-03  Tom Tromey  <tom@tromey.com>
6056
6057         * xml-support.c (xml_fetch_content_from_file): Update.
6058         * ui-file.c (stdio_file::open): Update.
6059         * tracefile-tfile.c (tfile_start): Update.
6060         * remote.c (remote_file_put, remote_file_get): Update.
6061         * nat/linux-procfs.c (linux_proc_get_int)
6062         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6063         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6064         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6065         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6066         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6067         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6068         * linux-nat.c (linux_proc_pending_signals): Update.
6069         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6070         (file_closer): Remove.
6071         * compile/compile.c (compile_to_object): Update.
6072         * common/filestuff.h (struct gdb_file_deleter): New.
6073         (gdb_file_up): New typedef.
6074         (gdb_fopen_cloexec): Change return type.
6075         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6076         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6077         (dump_binary_file, restore_binary_file): Update.
6078         * auto-load.c (auto_load_objfile_script_1): Update.
6079
6080 2017-08-03  Tom Tromey  <tom@tromey.com>
6081
6082         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6083         (info_static_tracepoint_markers_command): Likewise.
6084         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6085         * skip.c (skip_info): Use ui_out_emit_table.
6086         * progspace.c (print_program_space): Use ui_out_emit_table.
6087         * osdata.c (info_osdata): Use ui_out_emit_table.
6088         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6089         ui_out_emit_table.
6090         * linux-thread-db.c (info_auto_load_libthread_db): Use
6091         ui_out_emit_table.
6092         * inferior.c (print_inferior): Use ui_out_emit_table.
6093         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6094         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6095         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6096         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6097         * ui-out.h (class ui_out_emit_table): New.
6098
6099 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6100
6101         * mips-tdep.c (mips_fpu_type_str): New function.
6102         (mips_dump_tdep): Call it.
6103
6104 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6105
6106         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6107         `->mips_fpu_type'.
6108
6109 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6110
6111         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6112
6113 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6114
6115         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6116
6117 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6118
6119         * cli/cli-cmds.c (maintenancechecklist): New variable.
6120         * gdbcmd.h (maintenancechecklist): Declare it.
6121         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6122         Call i386_linux_read_description with different masks.
6123         * maint.c (maintenance_check_command): New function.
6124         (_initialize_maint_cmds): Call add_prefix_cmd.
6125         * target-descriptions.c (tdesc_reg): override operator != and ==.
6126         (tdesc_type): Likewise.
6127         (tdesc_feature): Likewise.
6128         (target_desc): Likewise.
6129         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6130         (maintenance_check_xml_descriptions): New function.
6131         (_initialize_target_descriptions) Add command "xml-descriptions".
6132         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6133
6134 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6135
6136         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6137         Include features/i386/32bit-*.c.
6138         (i386_linux_read_description): Generate target description if it
6139         doesn't exist.
6140         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6141         functions.
6142         * features/i386/32bit-linux.c: Re-generated.
6143         * features/i386/32bit-sse.c: Likewise.
6144         * target-descriptions.c (print_c_feature::visit): Print code to
6145         set register number if needed.
6146         (print_c_feature) <m_next_regnum>: New field.
6147
6148 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6149
6150         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6151         (FEATURE_XMLFILES): New.
6152         (FEATURE_CFILES): New.
6153         New rules.
6154         (clean-cfiles): Remove generated c files.
6155         * features/i386/32bit-avx.c: Generated.
6156         * features/i386/32bit-avx512.c: Generated.
6157         * features/i386/32bit-core.c: Generated.
6158         * features/i386/32bit-linux.c: Generated.
6159         * features/i386/32bit-mpx.c: Generated.
6160         * features/i386/32bit-pkeys.c: Generated.
6161         * features/i386/32bit-sse.c: Generated.
6162         * target-descriptions.c: Include algorithm.
6163         (tdesc_element_visitor): Add method visit_end.
6164         (print_c_tdesc): Implement visit_end.
6165         (print_c_tdesc:: m_filename_after_features): Move it to
6166         protected.
6167         (print_c_feature): New class.
6168         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6169         name starts with "i386/32bit-".
6170
6171 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6172
6173         * target-descriptions.c (tdesc_element_visitor): New class.
6174         (tdesc_element): New class.
6175         (tdesc_reg): Inherit from tdesc_element.
6176         (tdesc_reg::accept): New function.
6177         (tdesc_type): Inherit from tdesc_element.
6178         (tdesc_type::accept): New function.
6179         (tdesc_feature): Inherit from tdesc_element.
6180         (tdesc_feature::accept): New function.
6181         (target_desc): Inherit from tdesc_element.
6182         (target_desc::target_desc): New.
6183         (target_desc::~target_desc): New.
6184         (target_desc::accept): New.
6185         (allocate_target_description): Use new.
6186         (free_target_description): Use delete.
6187         (print_c_tdesc): New class.
6188         (maint_print_c_tdesc_cmd): Adjust.
6189
6190         * features/aarch64.c: Re-generated.
6191         * features/arc-arcompact.c: Re-generated.
6192         * features/arc-v2.c: Re-generated.
6193         * features/arm/arm-with-iwmmxt.c: Re-generated.
6194         * features/arm/arm-with-m.c: Re-generated.
6195         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6196         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6197         * features/arm/arm-with-neon.c: Re-generated.
6198         * features/arm/arm-with-vfpv2.c: Re-generated.
6199         * features/arm/arm-with-vfpv3.c: Re-generated.
6200         * features/i386/amd64-avx-avx512.c: Re-generated.
6201         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6202         * features/i386/amd64-avx.c: Re-generated.
6203         * features/i386/amd64-avx-linux.c: Re-generated.
6204         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6205         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6206         * features/i386/amd64-avx-mpx.c: Re-generated.
6207         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6208         * features/i386/amd64.c: Re-generated.
6209         * features/i386/amd64-linux.c: Re-generated.
6210         * features/i386/amd64-mpx.c: Re-generated.
6211         * features/i386/amd64-mpx-linux.c: Re-generated.
6212         * features/i386/i386-avx-avx512.c: Re-generated.
6213         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6214         * features/i386/i386-avx.c: Re-generated.
6215         * features/i386/i386-avx-linux.c: Re-generated.
6216         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6217         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6218         * features/i386/i386-avx-mpx.c: Re-generated.
6219         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6220         * features/i386/i386.c: Re-generated.
6221         * features/i386/i386-linux.c: Re-generated.
6222         * features/i386/i386-mmx.c: Re-generated.
6223         * features/i386/i386-mmx-linux.c: Re-generated.
6224         * features/i386/i386-mpx.c: Re-generated.
6225         * features/i386/i386-mpx-linux.c: Re-generated.
6226         * features/i386/x32-avx-avx512.c: Re-generated.
6227         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6228         * features/i386/x32-avx.c: Re-generated.
6229         * features/i386/x32-avx-linux.c: Re-generated.
6230         * features/i386/x32.c: Re-generated.
6231         * features/i386/x32-linux.c: Re-generated.
6232         * features/microblaze.c: Re-generated.
6233         * features/microblaze-with-stack-protect.c: Re-generated.
6234         * features/mips64-dsp-linux.c: Re-generated.
6235         * features/mips64-linux.c: Re-generated.
6236         * features/mips-dsp-linux.c: Re-generated.
6237         * features/mips-linux.c: Re-generated.
6238         * features/nds32.c: Re-generated.
6239         * features/nios2.c: Re-generated.
6240         * features/nios2-linux.c: Re-generated.
6241         * features/rs6000/powerpc-32.c: Re-generated.
6242         * features/rs6000/powerpc-32l.c: Re-generated.
6243         * features/rs6000/powerpc-403.c: Re-generated.
6244         * features/rs6000/powerpc-403gc.c : Re-generated.
6245         * features/rs6000/powerpc-405.c: Re-generated.
6246         * features/rs6000/powerpc-505.c: Re-generated.
6247         * features/rs6000/powerpc-601.c: Re-generated.
6248         * features/rs6000/powerpc-602.c: Re-generated.
6249         * features/rs6000/powerpc-603.c: Re-generated.
6250         * features/rs6000/powerpc-604.c: Re-generated.
6251         * features/rs6000/powerpc-64.c: Re-generated.
6252         * features/rs6000/powerpc-64l.c: Re-generated.
6253         * features/rs6000/powerpc-7400.c: Re-generated.
6254         * features/rs6000/powerpc-750.c: Re-generated.
6255         * features/rs6000/powerpc-860.c: Re-generated.
6256         * features/rs6000/powerpc-altivec32.c: Re-generated.
6257         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6258         * features/rs6000/powerpc-altivec64.c: Re-generated.
6259         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6260         * features/rs6000/powerpc-cell32l.c: Re-generated.
6261         * features/rs6000/powerpc-cell64l.c: Re-generated.
6262         * features/rs6000/powerpc-e500.c: Re-generated.
6263         * features/rs6000/powerpc-e500l.c: Re-generated.
6264         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6265         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6266         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6267         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6268         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6269         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6270         * features/rs6000/powerpc-vsx32.c: Re-generated.
6271         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6272         * features/rs6000/powerpc-vsx64.c: Re-generated.
6273         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6274         * features/rs6000/rs6000.c: Re-generated.
6275         * features/s390-linux32.c: Re-generated.
6276         * features/s390-linux32v1.c: Re-generated.
6277         * features/s390-linux32v2.c: Re-generated.
6278         * features/s390-linux64.c: Re-generated.
6279         * features/s390-linux64v1.c: Re-generated.
6280         * features/s390-linux64v2.c: Re-generated.
6281         * features/s390-te-linux64.c: Re-generated.
6282         * features/s390-tevx-linux64.c: Re-generated.
6283         * features/s390-vx-linux64.c: Re-generated.
6284         * features/s390x-linux64.c: Re-generated.
6285         * features/s390x-linux64v1.c: Re-generated.
6286         * features/s390x-linux64v2.c: Re-generated.
6287         * features/s390x-te-linux64.c: Re-generated.
6288         * features/s390x-tevx-linux64.c: Re-generated.
6289         * features/s390x-vx-linux64.c: Re-generated.
6290         * features/sparc/sparc32-solaris.c: Re-generated.
6291         * features/sparc/sparc64-solaris.c: Re-generated.
6292         * features/tic6x-c62x.c: Re-generated.
6293         * features/tic6x-c62x-linux.c: Re-generated.
6294         * features/tic6x-c64x.c: Re-generated.
6295         * features/tic6x-c64x-linux.c: Re-generated.
6296         * features/tic6x-c64xp.c: Re-generated.
6297         * features/tic6x-c64xp-linux.c: Re-generated.
6298
6299 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6300
6301         * i386-linux-tdep.c (i386_linux_read_description): New function.
6302         (i386_linux_core_read_description): Call
6303         i386_linux_read_description.
6304         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6305         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6306         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6307         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6308         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6309         * x86-linux-nat.c (x86_linux_read_description): Call
6310         i386_linux_read_description.
6311
6312 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6313
6314         * NEWS: Mention it.
6315         * features/Makefile (%.c: %.xml): Pass the xml file name to
6316         command "maint print c-tdesc".
6317         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6318         name from 'arg'.
6319
6320 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6321
6322         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6323         in-class initialization.
6324         (tdesc_create_feature): Call new instead of XCNEW.
6325         (free_target_description): Ue delete.
6326
6327 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6328
6329         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6330
6331 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6332
6333         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6334         constant.
6335         (amd64_x32_init_abi): Likewise.
6336         * amd64-tdep.h (amd64_init_abi): Update declaration.
6337         (amd64_x32_init_abi): Likewise.
6338
6339 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6340
6341         PR tdep/21717
6342         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6343         condition for FPSCR.
6344         (arm_linux_store_inferior_registers): Likewise.
6345
6346 2017-07-22  Tom Tromey  <tom@tromey.com>
6347
6348         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6349         <syscalls_counts>: Now a std::vector.
6350         (get_catch_syscall_inferior_data): Use "new".
6351         (catch_syscall_inferior_data_cleanup): Use "delete".
6352         (insert_catch_syscall, remove_catch_syscall)
6353         (clear_syscall_counts): Update.
6354
6355 2017-07-22  Tom Tromey  <tom@tromey.com>
6356
6357         * break-catch-syscall.c (syscall_catchpoint)
6358         <syscalls_to_be_caught>: Now a std::vector<int>
6359         (~syscall_catchpoint): Remove.
6360         (insert_catch_syscall, remove_catch_syscall)
6361         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6362         (print_mention_catch_syscall, print_recreate_catch_syscall):
6363         Update.
6364         (create_syscall_event_catchpoint): Change type of "filter"
6365         parameter.
6366         (catch_syscall_split_args): Return a std::vector.
6367         (catch_syscall_command_1, catching_syscall_number_1): Update.
6368
6369 2017-07-22  Tom Tromey  <tom@tromey.com>
6370
6371         * break-catch-throw.c (struct exception_catchpoint)
6372         <exception_rx>: Now a std::string.
6373         (~exception_catchpoint): Remove.
6374         (print_one_detail_exception_catchpoint): Update.
6375         (handle_gnu_v3_exceptions): Change type of except_rx.
6376         (extract_exception_regexp): Return a std::string.
6377         (catch_exception_command_1): Update.
6378
6379 2017-07-22  Tom Tromey  <tom@tromey.com>
6380
6381         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6382         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6383         std::vector.
6384         <catch_all>: Now a bool.
6385         (~signal_catchpoint): Remove.
6386         (signal_catchpoint_insert_location)
6387         (signal_catchpoint_remove_location)
6388         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6389         (signal_catchpoint_print_mention)
6390         (signal_catchpoint_print_recreate)
6391         (signal_catchpoint_explains_signal): Update.
6392         (create_signal_catchpoint): Change type of "filter" and
6393         "catch_all".
6394         (catch_signal_split_args): Return a std::vector.  Change type of
6395         "catch_all".
6396         (catch_signal_command): Update.
6397
6398 2017-07-20  Pedro Alves  <palves@redhat.com>
6399
6400         * ada-lang.c (ada_language_defn): Make extern.
6401         (_initialize_ada_language): Remove add_language call.
6402         * c-lang.c (c_language_defn, cplus_language_defn)
6403         (asm_language_defn, minimal_language_defn): Make extern.
6404         (_initialize_c_language): Delete.
6405         * completer.c (compare_cstrings): Delete, moved to utils.h.
6406         * d-lang.c (d_language_defn): Make extern.
6407         (_initialize_d_language): Remove add_language calls.
6408         * defs.h (enum language): Add comment.
6409         * f-lang.c (f_language_defn): Make extern.
6410         (_initialize_f_language): Remove add_language call.
6411         * go-lang.c (go_language_defn): Make extern.
6412         (_initialize_go_language): Remove add_language call.
6413         * language.c: Include <algorithm>.
6414         (languages): Redefine as const array.
6415         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6416         (set_language_command): Handle "local".  Use for-range loop.
6417         (set_language): Remove loop.
6418         (language_enum): Rewrite.
6419         (language_def, language_str): Remove loops.
6420         (add_language): Delete.
6421         (add_set_language_command): New, based on add_languages.
6422         (skip_language_trampoline): Adjust.
6423         (local_language_defn): Delete.
6424         (language_gdbarch_post_init): Adjust.
6425         (_initialize_language): Remove add_language calls.  Call
6426         add_set_language_command.
6427         * language.h (add_language): Delete.
6428         (auto_language_defn)
6429         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6430         (asm_language_defn, c_language_defn, cplus_language_defn)
6431         (d_language_defn, f_language_defn, go_language_defn)
6432         (m2_language_defn, objc_language_defn, opencl_language_defn)
6433         (pascal_language_defn, rust_language_defn): Declare.
6434         * m2-lang.c (m2_language_defn): Make extern.
6435         (_initialize_m2_language): Remove add_language call.
6436         * objc-lang.c (objc_language_defn): Make extern.
6437         (_initialize_objc_language): Remove add_language call.
6438         * opencl-lang.c (opencl_language_defn): Make extern.
6439         (_initialize_opencl_language): Remove add_language call.
6440         * p-lang.c (pascal_language_defn): Make extern.
6441         (_initialize_pascal_language): Delete.
6442         * rust-lang.c (rust_language_defn): Make extern.
6443         (_initialize_rust_language): Delete.
6444         * utils.h (compare_cstrings): New static inline function.
6445
6446 2017-07-20  Pedro Alves  <palves@redhat.com>
6447
6448         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6449         (get_var_value): Constify parameters.
6450         (get_int_var_value): Change prototype.
6451         (to_fixed_range_type): Adjust.
6452         * ada-lang.h (get_int_var_value): Change prototype.
6453
6454 2017-07-20  Pedro Alves  <palves@redhat.com>
6455
6456         * dwarf2read.c (dw2_lookup_symbol): Use
6457         SYMBOL_MATCHES_SEARCH_NAME.
6458         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6459
6460 2017-07-20  Pedro Alves  <palves@redhat.com>
6461
6462         * block.c (block_iter_name_step, block_iter_name_first)
6463         (block_iter_name_next): Delete.
6464         (block_lookup_symbol_primary): Adjust to use
6465         dict_iter_match_first/dict_iter_match_next.
6466         * block.h (block_iter_name_first, block_iter_name_next): Delete
6467         declarations.
6468         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6469         dict_iter_match_first/dict_iter_match_next.
6470
6471 2017-07-20  Pedro Alves  <palves@redhat.com>
6472
6473         * cp-support.c (cp_find_first_component_aux): Add missing case for
6474         end of string.
6475
6476 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6477
6478         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6479         of dwo_cu's dwo_file.
6480
6481 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6482
6483         * remote.c (store_registers_using_G): Remove one line comment.
6484
6485 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6486
6487         * regcache.c (regcache_cpy): Simplify it.
6488         (regcache::cpy_no_passthrough): Remove it.
6489         * regcache.h (cpy_no_passthrough): Remove it.
6490         (regcache_dup, regcache_cpy): Update comments.
6491
6492 2017-07-18  Pedro Alves  <palves@redhat.com>
6493
6494         * remote-sim.c (sim_command_completer): Adjust to work with a
6495         completion_tracker instead of a VEC.
6496
6497 2017-07-17  Pedro Alves  <palves@redhat.com>
6498
6499         * completer.c (complete_source_filenames): New function.
6500         (complete_address_and_linespec_locations): New function.
6501         (location_completer): Use complete_address_and_linespec_locations.
6502         (completion_tracker::build_completion_result): Honor the tracker's
6503         request to suppress append.
6504         * completer.h (completion_tracker::suppress_append_ws)
6505         (completion_tracker::set_suppress_append_ws): New methods.
6506         (completion_tracker::m_suppress_append_ws): New field.
6507         (complete_source_filenames): New declaration.
6508         * linespec.c (linespec_complete_what): New.
6509         (struct ls_parser) <complete_what, completion_word,
6510         completion_quote_char, completion_quote_end, completion_tracker>:
6511         New fields.
6512         (string_find_incomplete_keyword_at_end): New.
6513         (linespec_lexer_lex_string): Record quote char.  If in completion
6514         mode, don't throw.
6515         (linespec_lexer_consume_token): Advance the completion word point.
6516         (linespec_lexer_peek_token): Save/restore completion info.
6517         (save_stream_and_consume_token): New.
6518         (set_completion_after_number): New.
6519         (linespec_parse_basic): Set what to complete next depending on
6520         token.  Handle function and label completions specially.
6521         (parse_linespec): Disable objc shortcut in completion mode.  Set
6522         what to complete next depending on token type.  Skip keyword if in
6523         completion mode.
6524         (complete_linespec_component, linespec_complete): New.
6525         * linespec.h (linespec_complete): Declare.
6526
6527 2017-07-17  Pedro Alves  <palves@redhat.com>
6528
6529         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6530         Handle 'operator<' / 'operator<<'.
6531
6532 2017-07-17  Pedro Alves  <palves@redhat.com>
6533
6534         * completer.c (collect_explicit_location_matches): Handle
6535         MATCH_LABEL.
6536         (convert_explicit_location_to_linespec): New, factored out from
6537         ...
6538         (convert_explicit_location_to_sals): ... this.
6539         (complete_label): New.
6540         (linespec_complete_label, find_label_symbols_in_block): New.
6541         (find_label_symbols): Add completion_mode parameter and adjust to
6542         call find_label_symbols_in_block.
6543         * linespec.h (linespec_complete_label): Declare.
6544
6545 2017-07-17  Pedro Alves  <palves@redhat.com>
6546
6547         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6548         complete_symbol_mode parameter.
6549         * cli/cli-cmds.c (complete_command): Get the completion result out
6550         of the handle_brkchars tracker if used a custom word point.
6551         * completer.c: Include "linespec.h".
6552         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6553         (advance_to_expression_complete_word_point): New.
6554         (completion_tracker::completes_to_completion_word): New.
6555         (complete_files_symbols): Pass down
6556         complete_symbol_mode::EXPRESSION.
6557         (explicit_options, probe_options): New.
6558         (collect_explicit_location_matches): Complete on the
6559         explictit_loc->foo instead of word.  Use
6560         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6561         keyword and options completions.
6562         (backup_text_ptr): Delete.
6563         (skip_keyword): New.
6564         (complete_explicit_location): Remove 'word' parameter.  Add
6565         language, quoted_arg_start and quoted_arg_end parameters.
6566         Rewrite, parsing left to right.
6567         (location_completer): Rewrite.
6568         (location_completer_handle_brkchars): New function.
6569         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6570         (enum complete_line_internal_reason): Adjust comments.
6571         (completion_tracker::discard_completions): New.
6572         (completer_handle_brkchars_func_for_completer): Handle
6573         location_completer.
6574         (gdb_custom_word_point_brkchars)
6575         (gdb_org_rl_basic_quote_characters): New.
6576         (gdb_completion_word_break_characters_throw)
6577         (completion_find_completion_word): Handle trackers that use a
6578         custom word point.
6579         (completion_tracker::advance_custom_word_point_by): New.
6580         (completion_tracker::build_completion_result): Don't rely on
6581         readline appending the quote char.
6582         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6583         use a custom word point.
6584         (gdb_rl_attempted_completion_function): Restore
6585         rl_basic_quote_characters.
6586         * completer.h (class completion_tracker): Extend intro comment.
6587         (completion_tracker::set_quote_char)
6588         (completion_tracker::quote_char)
6589         (completion_tracker::set_use_custom_word_point)
6590         (completion_tracker::use_custom_word_point)
6591         (completion_tracker::custom_word_point)
6592         (completion_tracker::set_custom_word_point)
6593         (completion_tracker::advance_custom_word_point_by)
6594         (completion_tracker::completes_to_completion_word)
6595         (completion_tracker::discard_completions): New methods.
6596         (completion_tracker::m_quote_char)
6597         (completion_tracker::m_use_custom_word_point)
6598         (completion_tracker::m_custom_word_point): New fields.
6599         (advance_to_expression_complete_word_point): Declare.
6600         * f-lang.c (f_collect_symbol_completion_matches): Add
6601         complete_symbol_mode parameter.
6602         * language.h (struct language_defn)
6603         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6604         parameter.
6605         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6606         (linespec_complete_function): New function.
6607         (linespec_lexer_lex_keyword): Adjust.
6608         * linespec.h (linespec_keywords, linespec_complete_function): New
6609         declarations.
6610         * location.c (find_end_quote): New function.
6611         (explicit_location_lex_one): Add explicit_completion_info
6612         parameter.  Save quoting info.  Don't throw if being called for
6613         completion.  Don't handle Ada operators here.
6614         (is_cp_operator, skip_op_false_positives, first_of)
6615         (explicit_location_lex_one_function): New function.
6616         (string_to_explicit_location): Replace 'dont_throw' parameter with
6617         an explicit_completion_info pointer parameter.  Handle it.  Don't
6618         use explicit_location_lex_one to lex function names.  Use
6619         explicit_location_lex_one_function instead.
6620         * location.h (struct explicit_completion_info): New.
6621         (string_to_explicit_location): Replace 'dont_throw' parameter with
6622         an explicit_completion_info pointer parameter.
6623         * symtab.c (default_collect_symbol_completion_matches_break_on):
6624         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6625         (default_collect_symbol_completion_matches)
6626         (collect_symbol_completion_matches): Add complete_symbol_mode
6627         parameter.
6628         (collect_symbol_completion_matches_type): Pass down
6629         complete_symbol_mode::EXPRESSION.
6630         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6631         parameter.  Handle LINESPEC mode.
6632         * symtab.h (complete_symbol_mode): New.
6633         (default_collect_symbol_completion_matches_break_on)
6634         (default_collect_symbol_completion_matches)
6635         (collect_symbol_completion_matches)
6636         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6637         parameter.
6638
6639 2017-07-17  Pedro Alves  <palves@redhat.com>
6640
6641         * utils.c (enum class strncmp_iw_mode): New.
6642         (strcmp_iw): Rename to ...
6643         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6644         parameters.  Handle them.
6645         (strncmp_iw): New.
6646         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6647         * utils.h (strncmp_iw): Declare.
6648         (strcmp_iw): Move describing comments here.
6649
6650 2017-07-17  Pedro Alves  <palves@redhat.com>
6651
6652         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6653         CP_OPERATOR_STR.
6654         * c-typeprint.c (is_type_conversion_operator): Use
6655         CP_OPERATOR_STR.
6656         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6657         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6658         CP_OPERATOR_LEN.
6659         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6660         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6661         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6662         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6663         CP_OPERATOR_STR.
6664         * location.c: Include "cp-support.h".
6665         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6666         CP_OPERATOR_STR.
6667         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6668         CP_OPERATOR_LEN.
6669
6670 2017-07-17  Pedro Alves  <palves@redhat.com>
6671
6672         * cli/cli-cmds.c (complete_command): Use a completion tracker
6673         along with completion_find_completion_word for handle_brkchars
6674         phase.
6675         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6676         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6677         (struct gdb_rl_completion_word_info): New.
6678         (gdb_rl_find_completion_word): New.
6679         (completion_find_completion_word): New.
6680         * completer.h (completion_find_completion_word): Declare.
6681
6682 2017-07-17  Pedro Alves  <palves@redhat.com>
6683
6684         * ada-lang.c (symbol_completion_match): Adjust comments.
6685         (symbol_completion_add): Replace vector parameter with
6686         completion_tracker parameter.  Use it.
6687         (ada_make_symbol_completion_list): Rename to...
6688         (ada_collect_symbol_completion_matches): ... this.  Add
6689         completion_tracker parameter and use it.
6690         (ada_language_defn): Adjust.
6691         * break-catch-syscall.c (catch_syscall_completer): Adjust
6692         prototype and work with completion_tracker instead of VEC.
6693         * breakpoint.c (condition_completer): Adjust prototype and work
6694         with completion_tracker instead of VEC.
6695         * c-lang.c (c_language_defn, cplus_language_defn)
6696         (asm_language_defn, minimal_language_defn): Adjust to renames.
6697         * cli/cli-cmds.c (complete_command): Rework using
6698         completion_tracker.  Catch exceptions when completing.
6699         * cli/cli-decode.c (integer_unlimited_completer)
6700         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6701         with completion_tracker instead of VEC.
6702         * command.h (struct completion_tracker): Forward declare.
6703         (completer_ftype, completer_handle_brkchars_ftype): Change
6704         types.
6705         (complete_on_cmdlist, complete_on_enum): Adjust.
6706         * completer.c: Include <algorithm>.
6707         (struct gdb_completer_state): New.
6708         (current_completion): New global.
6709         (readline_line_completion_function): Delete.
6710         (noop_completer, filename_completer)
6711         (filename_completer_handle_brkchars, complete_files_symbols)
6712         (linespec_location_completer): Adjust to work with a
6713         completion_tracker instead of a VEC.
6714         (string_or_empty): New.
6715         (collect_explicit_location_matches): Adjust to work with a
6716         completion_tracker instead of a VEC.
6717         (explicit_location_completer): Rename to ...
6718         (complete_explicit_location): ... this and adjust to work with a
6719         completion_tracker instead of a VEC.
6720         (location_completer): Adjust to work with a completion_tracker
6721         instead of a VEC.
6722         (add_struct_fields): Adjust to work with a completion_list instead
6723         of VEC.
6724         (expression_completer): Rename to ...
6725         (complete_expression): ... this and adjust to work with a
6726         completion_tracker instead of a VEC.  Use complete_files_symbols.
6727         (expression_completer): Reimplement on top of complete_expression.
6728         (symbol_completer): Adjust to work with a completion_tracker
6729         instead of a VEC.
6730         (enum complete_line_internal_reason): Add describing comments.
6731         (complete_line_internal_normal_command): Adjust to work with a
6732         completion_tracker instead of a VEC.
6733         (complete_line_internal): Rename to ...
6734         (complete_line_internal_1): ... this and adjust to work with a
6735         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6736         handle_brkchars phase.
6737         (new_completion_tracker): Delete.
6738         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6739         complete_line_internal_1.
6740         (free_completion_tracker): Delete.
6741         (INITIAL_COMPLETION_HTAB_SIZE): New.
6742         (completion_tracker::completion_tracker)
6743         (completion_tracker::~completion_tracker): New.
6744         (maybe_add_completion): Delete.
6745         (completion_tracker::maybe_add_completion)
6746         (completion_tracker::add_completion)
6747         (completion_tracker::add_completions): New.
6748         (throw_max_completions_reached_error): Delete.
6749         (complete_line): Adjust to work with a completion_tracker instead
6750         of a VEC.  Don't create a completion_tracker_t or check for max
6751         completions here.
6752         (command_completer, command_completer_handle_brkchars)
6753         (signal_completer, reg_or_group_completer_1)
6754         (reg_or_group_completer, default_completer_handle_brkchars):
6755         Adjust to work with a completion_tracker.
6756         (gdb_completion_word_break_characters_throw): New.
6757         (gdb_completion_word_break_characters): Reimplement.
6758         (line_completion_function): Delete.
6759         (completion_tracker::recompute_lowest_common_denominator)
6760         (expand_preserving_ws)
6761         (completion_tracker::build_completion_result)
6762         (completion_result::completion_result)
6763         (completion_result::completion_result)
6764         (completion_result::~completion_result)
6765         (completion_result::completion_result)
6766         (completion_result::release_match_list, compare_cstrings)
6767         (completion_result::sort_match_list)
6768         (completion_result::reset_match_list)
6769         (gdb_rl_attempted_completion_function_throw)
6770         (gdb_rl_attempted_completion_function): New.
6771         * completer.h (completion_list, struct completion_result)
6772         (class completion_tracker): New.
6773         (complete_line): Add completion_tracker parameter.
6774         (readline_line_completion_function): Delete.
6775         (gdb_rl_attempted_completion_function): New.
6776         (noop_completer, filename_completer, expression_completer)
6777         (location_completer, symbol_completer, command_completer)
6778         (signal_completer, reg_or_group_completer): Update prototypes.
6779         (completion_tracker_t, new_completion_tracker)
6780         (make_cleanup_free_completion_tracker): Delete.
6781         (enum maybe_add_completion_enum): Delete.
6782         (maybe_add_completion): Delete.
6783         (throw_max_completions_reached_error): Delete.
6784         * corefile.c (complete_set_gnutarget): Adjust to work with a
6785         completion_tracker instead of a VEC.
6786         * cp-abi.c (cp_abi_completer): Adjust to work with a
6787         completion_tracker instead of a VEC.
6788         * d-lang.c (d_language_defn): Adjust.
6789         * disasm.c (disassembler_options_completer): Adjust to work with a
6790         completion_tracker instead of a VEC.
6791         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6792         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6793         with a completion_tracker instead of a VEC.
6794         (f_language_defn): Adjust.
6795         * go-lang.c (go_language_defn): Adjust.
6796         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6797         Adjust to work with a completion_tracker instead of a VEC.
6798         * infrun.c (handle_completer): Likewise.
6799         * interps.c (interpreter_completer): Likewise.
6800         * interps.h (interpreter_completer): Likewise.
6801         * language.c (unknown_language_defn, auto_language_defn)
6802         (local_language_defn): Adjust.
6803         * language.h (language_defn::la_make_symbol_completion_list):
6804         Rename to ...
6805         (language_defn::la_collect_symbol_completion_matches): ... this
6806         and adjust to work with a completion_tracker instead of a VEC.
6807         * m2-lang.c (m2_language_defn): Adjust.
6808         * objc-lang.c (objc_language_defn): Adjust.
6809         * opencl-lang.c (opencl_language_defn): Adjust.
6810         * p-lang.c (pascal_language_defn): Adjust.
6811         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6812         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6813         with a completion_tracker.
6814         * rust-lang.c (rust_language_defn): Adjust.
6815         * symtab.c (free_completion_list, do_free_completion_list)
6816         (return_val, completion_tracker): Delete.
6817         (completion_list_add_name, completion_list_add_symbol)
6818         (completion_list_add_msymbol, completion_list_objc_symbol)
6819         (completion_list_add_fields, add_symtab_completions): Add
6820         completion_tracker parameter and use it.
6821         (default_make_symbol_completion_list_break_on_1): Rename to...
6822         (default_collect_symbol_completion_matches_break_on): ... this.
6823         Add completion_tracker parameter and use it instead of allocating
6824         a completion tracker here.
6825         (default_make_symbol_completion_list_break_on): Delete old
6826         implementation.
6827         (default_make_symbol_completion_list): Delete.
6828         (default_collect_symbol_completion_matches): New.
6829         (make_symbol_completion_list): Delete.
6830         (collect_symbol_completion_matches): New.
6831         (make_symbol_completion_type): Rename to ...
6832         (collect_symbol_completion_matches_type): ... this.  Add
6833         completion_tracker parameter and use it instead of VEC.
6834         (make_file_symbol_completion_list_1): Rename to...
6835         (collect_file_symbol_completion_matches): ... this.  Add
6836         completion_tracker parameter and use it instead of VEC.
6837         (make_file_symbol_completion_list): Delete.
6838         (add_filename_to_list): Use completion_list instead of a VEC.
6839         (add_partial_filename_data::list): Now a completion_list.
6840         (make_source_files_completion_list): Work with a completion_list
6841         instead of a VEC.
6842         * symtab.h: Include "completer.h".
6843         (default_make_symbol_completion_list_break_on)
6844         (default_make_symbol_completion_list, make_symbol_completion_list)
6845         (make_symbol_completion_type, make_file_symbol_completion_list)
6846         (make_source_files_completion_list): Delete.
6847         (default_collect_symbol_completion_matches_break_on)
6848         (default_collect_symbol_completion_matches)
6849         (collect_symbol_completion_matches)
6850         (collect_symbol_completion_matches_type)
6851         (collect_file_symbol_completion_matches)
6852         (make_source_files_completion_list): New.
6853         * top.c (init_main): Don't install a rl_completion_entry_function
6854         hook.  Install a rl_attempted_completion_function hook instead.
6855         * tui/tui-layout.c (layout_completer): Adjust to work with a
6856         completion_tracker.
6857         * tui/tui-regs.c (tui_reggroup_completer):
6858         * tui/tui-win.c (window_name_completer, focus_completer)
6859         (winheight_completer): Adjust to work with a completion_tracker.
6860         * value.c: Include "completer.h".
6861         (complete_internalvar): Adjust to work with a completion_tracker.
6862         * value.h (complete_internalvar): Likewise.
6863
6864 2017-07-17  Pedro Alves  <palves@redhat.com>
6865
6866         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6867         renames.
6868         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6869         comments to completer_ftype's declaration.
6870         <completer_handle_brkchars>: Change type to
6871         completer_handle_brkchars_ftype.
6872         * command.h (completer_ftype): Add describing comment and give
6873         names to parameters.
6874         (completer_ftype_void): Rename to ...
6875         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6876         (set_cmd_completer_handle_brkchars): Adjust.
6877         * completer.c (filename_completer_handle_brkchars): New function.
6878         (complete_line_internal_normal_command): New function, factored
6879         out from ...
6880         (complete_line_internal): ... here.
6881         (command_completer_handle_brkchars)
6882         (default_completer_handle_brkchars)
6883         (completer_handle_brkchars_func_for_completer): New functions.
6884         * completer.h (set_gdb_completion_word_break_characters): Delete
6885         declaration.
6886         (completer_handle_brkchars_func_for_completer): New declaration.
6887         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6888         completer_handle_brkchars_func_for_completer.
6889
6890 2017-07-17  Pedro Alves  <palves@redhat.com>
6891
6892         * completer.c (symbol_completer): New function, based on
6893         make_symbol_completion_list_fn.
6894         * completer.h (symbol_completer): New declaration.
6895         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6896         * python/py-cmd.c (completers): Adjust.
6897         * symtab.c (make_symbol_completion_list_fn): Delete.
6898         * symtab.h (make_symbol_completion_list_fn): Delete.
6899         * cli/cli-decode.c (add_cmd): Adjust.
6900
6901 2017-07-17  Pedro Alves  <palves@redhat.com>
6902
6903         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6904         * dwarf2read.c: Include "filename-seen-cache.h".
6905         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6906         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6907         * filename-seen-cache.c: New file.
6908         * filename-seen-cache.h: New file.
6909         * symtab.c: Include "filename-seen-cache.h".
6910         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6911         (create_filename_seen_cache, clear_filename_seen_cache)
6912         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6913         to filename-seen-cache.h/filename-seen-cache.c.
6914         (output_source_filename, sources_info)
6915         (maybe_add_partial_symtab_filename)
6916         (make_source_files_completion_list): Adjust to use
6917         filename_seen_cache.
6918
6919 2017-07-17  Pedro Alves  <palves@redhat.com>
6920
6921         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6922         fields.
6923         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6924         dwarf2_debug_sections*)): New.
6925         (dwarf2_per_objfile::dwarf2_per_objfile(const
6926         dwarf2_per_objfile&)): Declare as deleted.
6927         (dwarf2_per_objfile::operator=): Declare as deleted.
6928         (dwarf2_per_objfile::dwarf2_per_objfile)
6929         (dwarf2_per_objfile::~dwarf2_per_objfile)
6930         (dwarf2_per_objfile::free_cached_comp_units): New.
6931         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6932         ctor.  Call dwarf2_per_objfile's ctor manually.
6933         (dwarf2_locate_sections): Deleted/refactored as ...
6934         (dwarf2_per_objfile::locate_sections): ... this new method.
6935         (free_cached_comp_units): Defer to
6936         dwarf2_per_objfile::free_cached_comp_units.
6937         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6938
6939 2017-07-14  Tom Tromey  <tom@tromey.com>
6940
6941         PR rust/21764:
6942         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6943         parameter.
6944         <UNOP_SIZEOF>: Split into separate case.
6945         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6946
6947 2017-07-14  Tom Tromey  <tom@tromey.com>
6948
6949         PR rust/21763:
6950         * symtab.c (symbol_matches_domain): Add language_rust to special
6951         case.
6952         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6953         treat LOC_TYPEDEF symbols as variables.
6954
6955 2017-07-14  Pedro Alves  <palves@redhat.com>
6956
6957         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6958         symtabs matching all symtabs with SRCFILE as file name instead of
6959         only considering the first hit, with lookup_symtab.
6960
6961 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6962
6963         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6964         operator_name parameters.
6965         (gen_expr): Update function call.
6966
6967 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6968
6969         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6970         parameter.
6971         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6972         Likewise.
6973         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6974         parameter, use agent_expr::gdbarch instead, update function
6975         calls.
6976         (locexpr_tracepoint_var_ref): Likewise.
6977         (loclist_tracepoint_var_ref): Likewise.
6978         * ax-gdb.c (gen_trace_static_fields): Likewise.
6979         (gen_traced_pop): Likewise.
6980         (gen_frame_args_address): Likewise.
6981         (gen_frame_locals_address): Likewise.
6982         (gen_var_ref): Likewise.
6983         (gen_struct_ref_recursive): Likewise.
6984         (gen_static_field): Likewise.
6985         (gen_maybe_namespace_elt): Likewise.
6986         (gen_expr): Likewise.
6987         (gen_trace_for_var): Likewise.
6988         (gen_trace_for_expr): Likewise.
6989         (gen_trace_for_return_address): Likewise.
6990
6991 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6992
6993         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6994         parameter.
6995         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6996
6997 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6998
6999         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7000         from ax, update calls.
7001         (gen_usual_arithmetic): Likewise.
7002         (gen_integral_promotions): Likewise.
7003         (gen_bitfield_ref): Likewise.
7004         (gen_primitive_field): Likewise.
7005         (gen_struct_ref_recursive): Likewise.
7006         (gen_struct_ref): Likewise.
7007         (gen_maybe_namespace_elt): Likewise.
7008         (gen_struct_elt_for_reference): Likewise.
7009         (gen_namespace_elt): Likewise.
7010         (gen_aggregate_elt_ref): Likewise.
7011         (gen_expr): Get gdbarch from ax, update calls.
7012         (gen_expr_binop_rest): Likewise.
7013
7014 2017-07-13  Pedro Alves  <palves@redhat.com>
7015
7016         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7017         as default tdesc.
7018         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7019         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7020         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7021         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7022         tdep.
7023         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7024         Get final tdesc from the tdep.
7025         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7026         default tdesc.
7027         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7028         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7029         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7030         Use it as default tdesc.
7031         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7032         down to amd_init_abi.  No longer handle fallback tdesc here.
7033         * amd64-tdep.h (tdesc_x32): Declare.
7034         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7035         parameter.
7036         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7037         as default tdesc.
7038
7039 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7040
7041         * s390-linux-tdep.c (s390_process_record): Add support for
7042         instructions new in arch12.
7043
7044 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7045
7046         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7047         PT_GETFSBASE and PT_GETGSBASE.
7048         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7049         PT_SETGSBASE.
7050
7051 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7052
7053         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7054         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7055         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7056         those rules.
7057         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7058         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7059         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7060         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7061         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7062         * features/i386/amd64.xml: Add 64bit-segments.xml.
7063         * features/i386/amd64-avx-avx512.c: Regenerated.
7064         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7065         * features/i386/amd64-avx-mpx.c: Regenerated.
7066         * features/i386/amd64-avx.c: Regenerated.
7067         * features/i386/amd64-mpx.c: Regenerated.
7068         * features/i386/amd64.c: Regenerated.
7069         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7070         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7071         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7072         * regformats/i386/amd64-avx.dat: Regenerated.
7073         * regformats/i386/amd64-mpx.dat: Regenerated.
7074         * regformats/i386/amd64.dat: Regenerated.
7075
7076 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7077
7078         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7079         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7080
7081 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7082
7083         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7084         unsetenv.
7085         * gnulib/aclocal.m4: Regenerate.
7086         * gnulib/config.in: Regenerate.
7087         * gnulib/configure: Regenerate.
7088         * gnulib/import/Makefile.am: Regenerate.
7089         * gnulib/import/Makefile.in: Regenerate.
7090         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7091         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7092         * gnulib/import/m4/environ.m4: New file.
7093         * gnulib/import/m4/setenv.m4: New file.
7094         * gnulib/import/setenv.c: New file.
7095         * gnulib/import/unsetenv.c: New file.
7096
7097 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7098
7099         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7100         address when op is DW_OP_addr.
7101
7102 2017-07-09  Tom Tromey  <tom@tromey.com>
7103
7104         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7105         check and apply to outer type.
7106
7107 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7108
7109         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7110         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7111         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7112         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7113
7114 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7115
7116         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7117
7118 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7119
7120         * corelow.c (get_core_siginfo): Remove.
7121         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7122         instead of get_core_siginfo.
7123         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7124         * gdbarch.h: Re-generate.
7125         * gdbarch.c: Re-generate.
7126         * linux-tdep.c (linux_core_xfer_siginfo): New.
7127         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7128
7129 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7130
7131         * corelow.c (thread_section_name): Move to ...
7132         * gdbcore.h (thread_section_name): ... here.
7133
7134 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7135
7136         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7137         (struct siginfo32): New.
7138         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7139         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7140         via ptrace(PT_LWPINFO).
7141
7142 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7143
7144         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7145         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7146         (fbsd_get_siginfo_type): New.
7147         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7148         (_initialize_fbsd_tdep): New.
7149
7150 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7151
7152         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7153         a singular dwo_unit*) to support multiple CUs in the same way that
7154         multiple TUs are supported.
7155         (create_cus_hash_table): Replace create_dwo_cu with a function for
7156         parsing multiple CUs from a DWO file.
7157         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7158         create_dwo_cu.
7159         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7160         htab_find, rather than comparing the signature to a singleton CU in
7161         the dwo_file.
7162
7163 2017-07-06  Pedro Alves  <palves@redhat.com>
7164
7165         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7166
7167 2017-07-04  Pedro Alves  <palves@redhat.com>
7168
7169         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7170         * gdbtypes.h (TYPE_STATIC): Delete.
7171         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7172         is_synchronized, is_native>: Delete.
7173         <dummy>: Bump.
7174         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7175         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7176         (TYPE_FN_FIELD_ABSTRACT): Delete.
7177
7178 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7179
7180         * buffer.h (buffer_finish): Fix spelling mistakes.
7181
7182 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7183
7184         * .dir-locals.el: Automatically switch to C-style comments in
7185         versions of Emacs that support the feature.
7186
7187 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7188             Pedro Alves  <palves@redhat.com>
7189
7190         PR cli/21688
7191         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7192         (process_next_line): New variable 'inline_cmd'.
7193         Adjust 'if' clauses for "python", "compile" and "guile" to use
7194         'command_name_equals' and check for '!inline_cmd'.
7195
7196 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7197
7198         PR cli/21688
7199         * cli/cli-script.c (command_name_equals_not_inline): New function.
7200         (process_next_line): Adjust 'if' clauses for "python", "compile"
7201         and "guile" to use command_name_equals_not_inline.
7202
7203 2017-06-29  Pedro Alves  <palves@redhat.com>
7204
7205         * completer.c (expression_completer): Call
7206         linespec_location_completer instead of location_completer.
7207
7208 2017-06-29  Pedro Alves  <palves@redhat.com>
7209
7210         * completer.c (expression_completer): Remove code that recomputes
7211         'text' from 'word'.
7212
7213 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7214
7215         * regformats/regdat.sh: Generate code with
7216         "ifndef IN_PROCESS_AGENT".
7217
7218 2017-06-28  Pedro Alves  <palves@redhat.com>
7219
7220         * command.h: Include "common/scoped_restore.h".
7221
7222 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7223
7224         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7225         instead of obstack_grow.
7226
7227 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7228
7229         PR gdb/21337
7230         * symfile.c (reread_symbols): Call objfiles_changed just before
7231         read_symbols.
7232
7233 2017-06-27  Pedro Alves  <palves@redhat.com>
7234
7235         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7236         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7237         (completion_list_add_symbol, completion_list_add_msymbol):
7238         ... these new functions.
7239         (add_symtab_completions)
7240         (default_make_symbol_completion_list_break_on_1): Adjust.
7241
7242 2017-06-27  Pedro Alves  <palves@redhat.com>
7243
7244         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7245         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7246         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7247         dtor.
7248         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7249         'storage_obstack' field an auto_obstack.  In-class initialize all
7250         non-bitfield fields.  Make minsyms_read bool.
7251         * symfile.c (read_symbols): Adjust.
7252
7253 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7254
7255         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7256         (gdbsim_store_register): Likewise.
7257
7258 2017-06-27  Pedro Alves  <palves@redhat.com>
7259
7260         * c-exp.y (name_obstack): Now an auto_obstack.
7261         (yylex): Use auto_obstack::clear.
7262         (c_parse): Use auto_obstack::clear instead of reinitializing and
7263         freeing the obstack.
7264         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7265         * d-exp.y (name_obstack): Now an auto_obstack.
7266         (yylex): Use auto_obstack::clear.
7267         (d_parse): Use auto_obstack::clear instead of reinitializing and
7268         freeing the obstack.
7269         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7270         auto_obstack.
7271         * dwarf2read.c (create_addrmap_from_index)
7272         (dwarf2_build_psymtabs_hard)
7273         (update_enumeration_type_from_children): Likewise.
7274         * gdb_obstack.h (auto_obstack): New type.
7275         * go-exp.y (name_obstack): Now an auto_obstack.
7276         (build_packaged_name): Use auto_obstack::clear.
7277         (go_parse): Use auto_obstack::clear instead of reinitializing and
7278         freeing the obstack.
7279         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7280         auto_obstack.
7281         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7282         * rust-exp.y (work_obstack): Now an auto_obstack.
7283         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7284         reinitializing and freeing the obstack.
7285         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7286         (host_char_to_target): Use auto_obstack.
7287         * utils.h (make_cleanup_obstack_free): Delete declaration.
7288         * valprint.c (generic_emit_char, generic_printstr): Use
7289         auto_obstack.
7290
7291 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7292
7293         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7294         thread.
7295         (darwin_init_thread_list): Don't update dummy thread.
7296         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7297
7298 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7299
7300         * record-full.c (netorder16): Remove.
7301
7302 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7303
7304         * common/diagnostics.h: Define macros for GCC.
7305         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7306         * common/vec.h: Include diagnostics.h.
7307         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7308         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7309         warning.
7310
7311 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7312
7313         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7314         New macro.
7315         * ada-lex.l: Ignore deprecated register warnings.
7316
7317 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7318
7319         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7320         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7321
7322 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7323
7324         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7325         its own line.
7326
7327 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7328
7329         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7330
7331 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7332
7333         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7334         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7335         (xtensa_register_read_masked): Likewise.
7336
7337 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7338
7339         * common/environ.c (gdb_environ::unset): Update comment.
7340
7341 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7342
7343         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7344         registers.
7345
7346 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7347
7348         * record-full.c (record_full_exec_insn): Use byte_vector.
7349
7350 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7351
7352         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7353         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7354
7355 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7356
7357         * remote.c (cached_reg): Move from here...
7358         * regcache.h (cached_reg): ...to here.
7359         * python/py-unwind.c (struct reg_info): Remove.
7360         (cached_frame_info): Use cached_reg_t.
7361         (pyuw_prev_register): Likewise.
7362         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7363         (pyuw_dealloc_cache): Free all registers.
7364
7365 2017-06-22  Pedro Alves  <palves@redhat.com>
7366             Simon Marchi  <simon.marchi@ericsson.com>
7367
7368         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7369         warning.
7370         * common/diagnostics.h: New file.
7371
7372 2017-06-22  Pedro Alves  <palves@redhat.com>
7373
7374         * common/agent.h: Add include guards.
7375
7376 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7377
7378         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7379         talk about addressable units instead of bytes.
7380
7381 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7382
7383         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7384         of '::const_iterator'.
7385
7386 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7387
7388         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7389         'unittests/environ-selftests.c'.
7390         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7391         * charset.c (find_charset_names): Declare object 'iconv_env'.
7392         Update code to use 'iconv_env' object.  Remove call to
7393         'free_environ'.
7394         * common/environ.c: Include <utility>.
7395         (make_environ): Delete function.
7396         (free_environ): Delete function.
7397         (gdb_environ::clear): New function.
7398         (gdb_environ::operator=): New function.
7399         (gdb_environ::get): Likewise.
7400         (environ_vector): Delete function.
7401         (set_in_environ): Delete function.
7402         (gdb_environ::set): New function.
7403         (unset_in_environ): Delete function.
7404         (gdb_environ::unset): New function.
7405         (gdb_environ::envp): Likewise.
7406         * common/environ.h: Include <vector>.
7407         (struct gdb_environ): Delete; transform into...
7408         (class gdb_environ): ... this class.
7409         (free_environ): Delete prototype.
7410         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7411         environ_vector): Likewise.
7412         * infcmd.c (run_command_1): Update code to call
7413         'envp' from 'gdb_environ' class.
7414         (environment_info): Update code to call methods from 'gdb_environ'
7415         class.
7416         (unset_environment_command): Likewise.
7417         (path_info): Likewise.
7418         (path_command): Likewise.
7419         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7420         (inferior::inferior): Initialize 'environment' using the host's
7421         information.
7422         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7423         Include "environ.h".
7424         (class inferior) <environment>: Change type from 'struct
7425         gdb_environ' to 'gdb_environ'.
7426         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7427         methods from 'gdb_environ' class.
7428         * solib.c (solib_find_1): Likewise
7429         * unittests/environ-selftests.c: New file.
7430
7431 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7432
7433         * features/i386/i386-linux.xml: Exchange the order of including
7434         32bit-linux.xml and 32bit-sse.xml.
7435         * features/i386/i386-linux.c: Regenerated.
7436
7437 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7438
7439         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7440         Delete copy ctor and assignment operator.
7441         (tdesc_type): Likewise.
7442         (tdesc_feature): Likewise.
7443         (tdesc_free_reg): Remove.
7444         (tdesc_create_reg): Use new.
7445         (tdesc_free_type): Remove.
7446         (tdesc_create_vector): Use new.
7447         (tdesc_create_union): Likewise.
7448         (tdesc_create_flags): Likewise.
7449         (tdesc_create_enum): Likewise.
7450         (tdesc_free_feature): Delete.
7451         (free_target_description): Use delete.
7452
7453 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7454
7455         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7456         registers.
7457
7458 2017-06-19  Pedro Alves  <palves@redhat.com>
7459
7460         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7461         after gdb::unlinker.
7462
7463 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7464
7465         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7466         gdb_environ to access an environment variable.
7467
7468 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7469
7470         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7471         gdb_byte*.
7472
7473 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7474
7475         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7476
7477 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7478
7479         * configure: Re-generate.
7480         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7481
7482 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7483
7484         * configure: Re-generate.
7485         * warning.m4: Pass -Werror to compiler when checking for
7486         supported warning flags.
7487
7488 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7489
7490         * Makefile.in (COMPILE.pre): Add "-x c++".
7491
7492 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7493             Pedro Alves  <palves@redhat.com>
7494             Yao Qi  <yao.qi@linaro.org>
7495
7496         * defs.h (RequireLongest): New.
7497         (extract_integer): Declare function template.
7498         (extract_signed_integer): Remove the declaration, but define it
7499         static inline.
7500         (extract_unsigned_integer): Likewise.
7501         (store_integer): Declare function template.
7502         (store_signed_integer): Remove the declaration, but define it
7503         static inline.
7504         (store_unsigned_integer): Likewise.
7505         * findvar.c (extract_integer): New function template.
7506         (extract_signed_integer): Remove.
7507         (extract_unsigned_integer): Remove.
7508         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7509         instantiations.
7510         (store_integer): New function template.
7511         (store_signed_integer): Remove.
7512         (store_unsigned_integer): Remove.
7513         (store_integer): Explicit instantiations.
7514         * regcache.c (regcache_raw_read_signed): Update.
7515         (regcache::raw_read): New function.
7516         (regcache::raw_read_signed): Remove.
7517         (regcache::raw_read_unsigned): Remove.
7518         (regcache_raw_read_unsigned): Update.
7519         (regcache_raw_write_unsigned): Update.
7520         (regcache::raw_write_signed): Remove.
7521         (regcache::raw_write): New function.
7522         (regcache_cooked_read_signed): Update.
7523         (regcache::raw_write_unsigned): Remove.
7524         (regcache::cooked_read_signed): Remove.
7525         (regcache_cooked_read_unsigned): Update.
7526         (regcache::cooked_read_unsigned): Remove.
7527         (regcache_cooked_write_signed): Update.
7528         (regcache_cooked_write_unsigned): Update.
7529         * regcache.h (regcache) <raw_read_signed>: Remove.
7530         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7531         <raw_read, raw_write>: New.
7532         <cooked_read_signed, cooked_write_signed>: Remove.
7533         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7534         <cooked_read, cooked_write>: New.
7535         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7536         (sh64_pseudo_register_write): Update.
7537
7538 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7539
7540         * arc-tdep.c (arc_disassembler_options): New variable.
7541         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7542         of default_print_insn.
7543         (arc_delayed_print_insn): Set info->section when needed,
7544         use default_print_insn to retrieve a disassembler.
7545
7546 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7547
7548         PR gdb/21574
7549         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7550         to mention $SHELL and startup-with-shell.
7551
7552 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7553
7554         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7555
7556 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7557
7558         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7559         default_print_insn instead of print_insn_aarch64.
7560         * arm-tdep.c (gdb_print_insn_arm): Call
7561         default_print_insn instead of print_insn_big_arm
7562         and print_insn_little_arm.
7563         * i386-tdep.c (i386_print_insn): Call default_print_insn
7564         instead of print_insn_i386.
7565         * ia64-tdep.c (ia64_print_insn): Call
7566         default_print_insn instead of print_insn_ia64.
7567         * mips-tdep.c (gdb_print_insn_mips): Call
7568         default_print_insn instead of print_insn_big_mips
7569         and print_insn_little_mips.
7570         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7571         instead of print_insn_spu.
7572
7573 2017-06-14  Pedro Alves  <palves@redhat.com>
7574
7575         * ada-lang.c: Include "common/byte-vector.h".
7576         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7577         * charset.c (wchar_iterator::iterate): Resize the vector instead
7578         of reserving it.
7579         * common/byte-vector.h: Include "common/def-vector.h".
7580         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7581         * cli/cli-dump.c: Include "common/byte-vector.h".
7582         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7583         * common/byte-vector.h: New file.
7584         * common/def-vector.h: New file.
7585         * common/default-init-alloc.h: New file.
7586         * dwarf2loc.c: Include "common/byte-vector.h".
7587         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7588         instead of reserving it.
7589         * dwarf2read.c: Include "common/byte-vector.h".
7590         (data_buf::m_vec): Now a gdb::byte_vector.
7591         * gdb_regex.c: Include "common/def-vector.h".
7592         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7593         * mi/mi-main.c: Include "common/byte-vector.h".
7594         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7595         * printcmd.c: Include "common/byte-vector.h".
7596         (print_scalar_formatted): Use gdb::byte_vector.
7597         * valprint.c: Include "common/byte-vector.h".
7598         (maybe_negate_by_bytes, print_decimal_chars): Use
7599         gdb::byte_vector.
7600
7601 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7602
7603         * darwin-nat.c: Include "nat/fork-inferior.h".
7604
7605 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7606
7607         * configure.nat: Factor out Darwin bits that are not
7608         architecture-specific.  Add fork-inferior.o.
7609
7610 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7611
7612         * configure.nat: Factor out AIX bits that are not
7613         architecture-specific.  Add fork-inferior.o.
7614
7615 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7616
7617         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7618         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7619         wrappers that just call rw_pieced_value.
7620
7621 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7622
7623         * dwarf2loc.c (write_pieced_value): When writing the data for a
7624         memory piece, use write_memory_with_notification instead of
7625         write_memory.
7626
7627 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7628
7629         * valops.c (read_value_memory): Change embedded_offset to
7630         represent a bit offset instead of a byte offset.
7631         * value.h (read_value_memory): Adjust comment.
7632
7633 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7634
7635         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7636         dest_offset_bits and source_offset_bits.
7637         (write_pieced_value): Likewise.
7638
7639 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7640
7641         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7642         given by DW_OP_bit_piece.
7643         (write_pieced_value): Likewise.
7644
7645 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7646
7647         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7648         some other preparations to the places where sufficient information
7649         is available.
7650         (write_pieced_value): Likewise.
7651
7652 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7653
7654         * dwarf2loc.c (bits_to_bytes): New function.
7655         (read_pieced_value): Fix offset calculations for register pieces
7656         on big-endian targets.
7657         (write_pieced_value): Likewise.
7658
7659 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7660
7661         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7662         (write_pieced_value): Likewise.
7663
7664 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7665
7666         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7667         transfer the source value's least significant bits, instead of its
7668         lowest-addressed ones.  Rename type_len to max_offset.
7669         (read_pieced_value): Mirror above changes to write_pieced_value as
7670         applicable.
7671
7672 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7673
7674         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7675         truncate full bytes from dest_offset_bits before using it as an
7676         offset into the buffer.
7677
7678 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7679
7680         * dwarf2loc.c (write_pieced_value): Include transfer size in
7681         byte-wise check.
7682
7683 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7684
7685         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7686         calculation of this_size.
7687
7688 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7689
7690         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7691         when targeting a bit-field.
7692         (write_pieced_value): Likewise.
7693
7694 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7695
7696         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7697         (allocate_piece_closure): Drop addr_size parameter.
7698         (dwarf2_evaluate_loc_desc_full): Adjust call to
7699         allocate_piece_closure.
7700
7701 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7702
7703         PR gdb/21226
7704         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7705         the LSB end, independent of endianness.
7706
7707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7708
7709         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7710         size capping.
7711
7712 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7713
7714         * mips-linux-nat.c: Move include features/mips*-linux.c to
7715         mips-linux-tdep.c.
7716         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7717         to mips-linux-tdep.c.
7718         * mips-linux-tdep.c: Include features/mips*-linux.c
7719         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7720         functions.
7721         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7722         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7723         (tdesc_mips64_dsp_linux): Declare.
7724
7725 2017-06-12  Tom Tromey  <tom@tromey.com>
7726
7727         * valprint.h (val_print_type_code_int): Remove.
7728         * valprint.c (generic_val_print_int): Always call
7729         val_print_scalar_formatted.
7730         (val_print_type_code_int): Remove.
7731         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7732         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7733         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7734         * ada-valprint.c (ada_val_print_num): Use
7735         val_print_scalar_formatted.
7736
7737 2017-06-12  Tom Tromey  <tom@tromey.com>
7738
7739         * printcmd.c (print_scalar_formatted): Unify the two switches.
7740         Don't convert scalars to LONGEST.
7741
7742 2017-06-12  Tom Tromey  <tom@tromey.com>
7743
7744         PR exp/16225:
7745         * valprint.h (print_decimal_chars): Update.
7746         * valprint.c (maybe_negate_by_bytes): New function.
7747         (print_decimal_chars): Add "is_signed" argument.
7748         * printcmd.c (print_scalar_formatted): Update.
7749
7750 2017-06-12  Tom Tromey  <tom@tromey.com>
7751
7752         PR exp/16225:
7753         * valprint.h (print_binary_chars, print_hex_chars): Update.
7754         * valprint.c (val_print_type_code_int): Update.
7755         (print_binary_chars): Add "zero_pad" argument.
7756         (emit_octal_digit): New function.
7757         (print_octal_chars): Don't zero-pad.
7758         (print_decimal_chars): Likewise.
7759         (print_hex_chars): Add "zero_pad" argument.
7760         * sh64-tdep.c (sh64_do_fp_register): Update.
7761         * regcache.c (regcache::dump): Update.
7762         * printcmd.c (print_scalar_formatted): Update.
7763         * infcmd.c (default_print_one_register_info): Update.
7764
7765 2017-06-12  Pedro Alves  <palves@redhat.com>
7766             Alan Hayward  <alan.hayward@arm.com>
7767
7768         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7769         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7770         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7771         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7772         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7773
7774 2017-06-12  Pedro Alves  <palves@redhat.com>
7775
7776         * dwarf2read.c (mapped_symtab::data): Now a vector of
7777         symtab_index_entry instead of vector of
7778         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7779         whether an element's name is NULL instead of checking whether the
7780         element itself is NULL.
7781         (find_slot): Change return type.  Adjust.
7782         (hash_expand, , add_index_entry, uniquify_cu_indices)
7783         (write_hash_table): Adjust.
7784
7785 2017-06-12  Pedro Alves  <palves@redhat.com>
7786
7787         * dwarf2read.c (recursively_count_psymbols): New function.
7788         (write_psymtabs_to_index): Call it to compute number of psyms and
7789         pass estimate size of psyms_seen to unordered_set's ctor.
7790
7791 2017-06-12  Pedro Alves  <palves@redhat.com>
7792
7793         * dwarf2read.c (write_hash_table): Check if key already exists
7794         before emplacing.
7795
7796 2017-06-12  Pedro Alves  <palves@redhat.com>
7797
7798         * dwarf2read.c (data_buf::append_space): Rename to...
7799         (data_buf::grow): ... this, and make private.  Adjust all callers.
7800         (data_buf::append_uint): New method.
7801         (add_address_entry, write_one_signatured_type)
7802         (write_psymtabs_to_index): Use it.
7803
7804 2017-06-12  Pedro Alves  <palves@redhat.com>
7805
7806         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7807         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7808         (data_buf::file_write): Call ::fwrite directly.
7809
7810 2017-06-12  Pedro Alves  <palves@redhat.com>
7811
7812         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7813         std::vector::erase.
7814
7815 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7816
7817         Code cleanup: C++ify .gdb_index producer.
7818         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7819         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7820         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7821         (create_strtab, add_string): Remove.
7822         (file_write, data_buf): New.
7823         (struct symtab_index_entry): Use std::vector for cu_indices.
7824         (struct mapped_symtab): Use std::vector for data.
7825         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7826         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7827         Remove.
7828         (find_slot): Change return type.  Update it to the new data structures.
7829         (hash_expand, add_index_entry): Update it to the new data structures.
7830         (offset_type_compare): Remove.
7831         (uniquify_cu_indices): Update it to the new data structures.
7832         (c_str_view, c_str_view_hasher, vector_hasher): New.
7833         (add_indices_to_cpool): Remove.
7834         (write_hash_table): Update it to the new data structures.
7835         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7836         (eq_psymtab_cu_index): Remove.
7837         (psym_index_map): New typedef.
7838         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7839         reference and std::unordered_map for cu_index_htab.
7840         (add_address_entry, add_address_entry_worker, write_address_map)
7841         (write_psymbols): Update it to the new data structures.
7842         (write_obstack): Remove.
7843         (struct signatured_type_index_data): Change types_list to a data_buf
7844         reference and psyms_seen to a std::unordered_set reference.
7845         (write_one_signatured_type, recursively_write_psymbols)
7846         (write_psymtabs_to_index): Update it to the new data structures.
7847
7848 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7849
7850         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7851         separate-debug-file commands.
7852         * symfile.h (separate_debug_file_debug): New global.
7853         * symfile.c (separate_debug_file_debug): New global.
7854         (separate_debug_file_exists, find_separate_debug_file): Add
7855         debug output.
7856         (_initialize_symfile): Add "set debug separate-debug-file"
7857         command.
7858         * build-id.c (build_id_to_debug_bfd,
7859         find_separate_debug_file_by_buildid): Add debug output.
7860
7861 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7862
7863         * gdbarch.sh (displaced_step_free_closure): Remove.
7864         * gdbarch.h, gdbarch.c: Re-generate.
7865         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7866         displaced_step_free_closure.
7867         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7868         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7869         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7870         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7871         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7872         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7873         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7874         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7875         * infrun.c (displaced_step_clear): Call xfree instead of
7876         gdbarch_displaced_step_free_closure.
7877
7878 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7879
7880         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7881         NULL".
7882
7883 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7884
7885         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7886         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7887         (mn10300_push_dummy_call): Likewise.
7888
7889 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7890
7891         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7892
7893 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7894
7895         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7896
7897 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7898
7899         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7900         able to start inferiors using a shell.
7901         (New remote packets): Announce new packet "QStartupWithShell".
7902         * remote.c: Add PACKET_QStartupWithShell.
7903         (extended_remote_create_inferior): Handle new
7904         PACKET_QStartupWithShell.
7905         (remote_protocol_features) <QStartupWithShell>: New entry for
7906         PACKET_QStartupWithShell.
7907         (_initialize_remote): Call "add_packet_config_cmd" for
7908         QStartupShell.
7909
7910 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7911             Pedro Alves  <palves@redhat.com>
7912
7913         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7914         and "nat/fork-inferior.h".
7915         * common/common-inferior.h: New file, with contents from
7916         "gdb/inferior.h".
7917         * commom/common-utils.c: Include "common-utils.h".
7918         (stringify_argv): New function.
7919         * common/common-utils.h (stringify_argv): New prototype.
7920         * configure.nat: Add "fork-inferior.o" as a dependency for
7921         "*linux*", "fbsd*" and "nbsd*" hosts.
7922         * corefile.c (get_exec_file): Update comment.
7923         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7924         instead of "startup_inferior".
7925         (darwin_create_inferior): Call "add_thread_silent" after
7926         "fork_inferior".
7927         * fork-child.c: Cleanup unnecessary includes.
7928         (SHELL_FILE): Move to "common/common-fork-child.c".
7929         (environ): Likewise.
7930         (exec_wrapper): Initialize.
7931         (get_exec_wrapper): New function.
7932         (breakup_args): Move to "common/common-fork-child.c"; rename to
7933         "breakup_args_for_exec".
7934         (escape_bang_in_quoted_argument): Move to
7935         "common/common-fork-child.c".
7936         (saved_ui): New variable.
7937         (prefork_hook): New function.
7938         (postfork_hook): Likewise.
7939         (postfork_child_hook): Likewise.
7940         (gdb_startup_inferior): Likewise.
7941         (fork_inferior): Move to "common/common-fork-child.c".  Update
7942         function to support gdbserver.
7943         (startup_inferior): Likewise.
7944         * gdbcore.h (get_exec_file): Remove declaration.
7945         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7946         instead of "startup_inferior".  Call "add_thread_silent" after
7947         "fork_inferior".
7948         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7949         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7950         instead of "startup_inferior".  Call "add_thread_silent" after
7951         "fork_inferior".
7952         * inferior.h: Include "common-inferior.h".
7953         (trace_start_error): Move to "common/common-utils.h".
7954         (trace_start_error_with_name): Likewise.
7955         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7956         (startup_inferior): Likewise.
7957         (gdb_startup_inferior): New prototype.
7958         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7959         * nat/fork-inferior.h: New file.
7960         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7961         instead of "startup_inferior".  Call "add_thread_silent" after
7962         "fork_inferior".
7963         * target.h (target_terminal_init): Move prototype to
7964         "target/target.h".
7965         (target_terminal_inferior): Likewise.
7966         (target_terminal_ours): Likewise.
7967         * target/target.h (target_terminal_init): New prototype, moved
7968         from "target.h".
7969         (target_terminal_inferior): Likewise.
7970         (target_terminal_ours): Likewise.
7971         * utils.c (gdb_flush_out_err): New function.
7972
7973 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7974
7975         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7976         * common/common-gdbthread.h: New file, with parts from
7977         "gdb/gdbthread.h".
7978         * gdbthread.h: Include "common-gdbthread.h".
7979         (switch_to_thread): Moved to "common/common-gdbthread.h".
7980
7981 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7982
7983         * Makefile.in (SFILES): Add "common/job-control.c".
7984         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7985         (COMMON_OBS): Add "job-control.o".
7986         * common/job-control.c: New file, with contents from
7987         "gdb/inflow.c".
7988         * common/job-control.h: New file, with contents from "terminal.h".
7989         * fork-child.c: Include "job-control.h".
7990         * inflow.c: Include "job-control.h".
7991         (gdb_setpgid): Move to "common/common-inflow.c".
7992         (_initialize_inflow): Move setting of "job_control" to
7993         "handle_job_control".
7994         * terminal.h (job_control): Moved to "common/common-terminal.h".
7995         (gdb_setpgid): Likewise.
7996         * top.c: Include "job_control.h".
7997         * utils.c: Likewise.
7998         (job_control): Moved to "job-control.c".
7999
8000 2017-06-07  Pedro Alves  <palves@redhat.com>
8001
8002         * Makefile.in (SFILES): Add gdb_regex.c.
8003         (COMMON_OBS): Add gdb_regex.o.
8004         * ada-lang.c (ada_add_standard_exceptions)
8005         (ada_add_exceptions_from_frame, name_matches_regex)
8006         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8007         parameter type to compiled_regex.  Adjust.
8008         (ada_exceptions_list): Use compiled_regex.
8009         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8010         std::unique_ptr<compiled_regex>.
8011         (exception_catchpoint::~exception_catchpoint): Remove regfree
8012         call.
8013         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8014         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8015         * breakpoint.c (solib_catchpoint::compiled): Now a
8016         std::unique_ptr<compiled_regex>.
8017         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8018         (check_status_catch_solib): Adjust to use compiled_regex.
8019         (add_solib_catchpoint): Adjust to use compiled_regex.
8020         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8021         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8022         compiled_regex reference.  Adjust to use it.
8023         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8024         declaration.  Include "gdb_regex.h".
8025         (apropos_cmd): Change regex parameter to compiled_regex reference.
8026         * gdb_regex.c: New file.
8027         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8028         declarations.
8029         (class compiled_regex): New.
8030         * linux-tdep.c: Include "common/gdb_optional.h".
8031         (struct mapping_regexes): New, factored out from
8032         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8033         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8034         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8035         * probe.c: Include "common/gdb_optional.h".
8036         (collect_probes): Use compiled_regex and gdb::optional and remove
8037         cleanups.
8038         * skip.c: Include "common/gdb_optional.h".
8039         (skiplist_entry::compiled_function_regexp): Now a
8040         gdb::optional<compiled_regex>.
8041         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8042         (free_skiplist_entry): Remove regfree call.
8043         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8044         compiled_regex and gdb::optional.
8045         * symtab.c: Include "common/gdb_optional.h".
8046         (search_symbols): Use compiled_regex and gdb::optional.
8047         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8048         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8049         to gdb_regex.c.
8050
8051 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8052
8053         * regcache.c (regcache::save): Avoid buffer use.
8054         (regcache::dump): Likewise.
8055
8056 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8057
8058         * sh-tdep.c (sh_pseudo_register_read): Remove
8059         MAX_REGISTER_SIZE.
8060         (sh_pseudo_register_write): Likewise.
8061         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8062         (sh64_pseudo_register_write): Likewise
8063
8064 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8065
8066         * aarch64-tdep.c (aarch64_store_return_value): Use
8067         V_REGISTER_SIZE.
8068         (aarch64_pseudo_read_value): Likewise.
8069         (aarch64_pseudo_write): Likewise.
8070
8071 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8072
8073         * regformats/regdef.h (set_register_cache): Remove the
8074         declaration.
8075
8076 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8077
8078         * frame.c (frame_unwind_register_signed): Use
8079         frame_unwind_register_value.
8080
8081 2017-06-06  Pedro Alves  <palves@redhat.com>
8082
8083         PR breakpoints/21553
8084         * breakpoint.c (create_breakpoints_sal_default)
8085         (init_breakpoint_sal, create_breakpoint_sal): Use
8086         gdb::unique_xmalloc_ptr for string parameters.
8087         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8088         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8089         (base_breakpoint_create_breakpoints_sal)
8090         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8091         (strace_marker_create_breakpoints_sal)
8092         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8093         string parameters.
8094         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8095         gdb::unique_xmalloc_ptr for string parameters.
8096         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8097         parameters.
8098
8099 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8100
8101         * alpha-tdep.c (alpha_register_to_value): Use
8102         get_frame_register_value.
8103         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8104
8105 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8106
8107         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8108         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8109         (ia64_value_to_register): Likewise.
8110         (ia64_extract_return_value): Likewise.
8111         (ia64_store_return_value): Likewise.
8112         (ia64_push_dummy_call): Likewise.
8113
8114 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8115
8116         GDB 8.0 released.
8117
8118 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8119
8120         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8121
8122 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8123
8124         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8125         parameter.
8126         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8127
8128 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8129
8130         * event-loop.c (poll_timers): Unallocate timer using delete
8131         instead of xfree.
8132
8133 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8134
8135         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8136         (struct breakpoint) <~breakpoint>: New.
8137         (struct watchpoint): Inherit from breakpoint.
8138         <~watchpoint>: New.
8139         <base>: Remove.
8140         (struct tracepoint): Inherit from breakpoint.
8141         <base>: Remove.
8142         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8143         (struct longjmp_breakpoint): Inherit from breakpoint.
8144         <~longjmp_breakpoint>: New.
8145         <base>: Remove.
8146         (new_breakpoint_from_type): Remove casts.
8147         (watchpoint_in_thread_scope): Remove reference to base field.
8148         (watchpoint_del_at_next_stop): Likewise.
8149         (update_watchpoint): Likewise.
8150         (watchpoint_check): Likewise.
8151         (bpstat_check_watchpoint): Likewise.
8152         (set_longjmp_breakpoint): Likewise.
8153         (struct fork_catchpoint): Inherit from breakpoint.
8154         <base>: Remove.
8155         (struct solib_catchpoint): Inherit from breakpoint.
8156         <~solib_catchpoint>: New.
8157         <base>: Remove.
8158         (dtor_catch_solib): Change to ...
8159         (solib_catchpoint::~solib_catchpoint): ... this.
8160         (breakpoint_hit_catch_solib): Remove reference to base field.
8161         (add_solib_catchpoint): Likewise.
8162         (create_fork_vfork_event_catchpoint): Likewise.
8163         (struct exec_catchpoint): Inherit from breakpoint.
8164         <~exec_catchpoint>: New.
8165         <base>: Remove.
8166         (dtor_catch_exec): Change to ...
8167         (exec_catchpoint::~exec_catchpoint): ... this.
8168         (dtor_watchpoint): Change to ...
8169         (watchpoint::~watchpoint): ... this.
8170         (watch_command_1): Remove reference to base field.
8171         (catch_exec_command_1): Likewise.
8172         (base_breakpoint_dtor): Change to ...
8173         (breakpoint::~breakpoint): ... this.
8174         (base_breakpoint_ops): Remove dtor field value.
8175         (longjmp_bkpt_dtor): Change to ...
8176         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8177         (strace_marker_create_breakpoints_sal): Remove reference to base
8178         field.
8179         (delete_breakpoint): Don't manually call breakpoint destructor.
8180         (create_tracepoint_from_upload): Remove reference to base field.
8181         (trace_pass_set_count): Likewise.
8182         (initialize_breakpoint_ops): Don't initialize
8183         momentary_breakpoint_ops, don't set dtors.
8184         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8185         <~ada_catchpoint>: New.
8186         <base>: Remove.
8187         (create_excep_cond_exprs): Remove reference to base field.
8188         (dtor_exception): Change to ...
8189         (ada_catchpoint::~ada_catchpoint): ... this.
8190         (dtor_catch_exception): Remove.
8191         (dtor_catch_exception_unhandled): Remove.
8192         (dtor_catch_assert): Remove.
8193         (create_ada_exception_catchpoint): Remove reference to base
8194         field.
8195         (initialize_ada_catchpoint_ops): Don't set dtors.
8196         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8197         breakpoint.
8198         <~signal_catchpoint>: New.
8199         <base>: Remove.
8200         (signal_catchpoint_dtor): Change to ...
8201         (signal_catchpoint::~signal_catchpoint): ... this.
8202         (create_signal_catchpoint): Remove reference to base field.
8203         (initialize_signal_catchpoint_ops): Don't set dtor.
8204         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8205         from breakpoint.
8206         <~syscall_catchpoint>: New.
8207         <base>: Remove.
8208         (dtor_catch_syscall): Change to ...
8209         (syscall_catchpoint::~syscall_catchpoint): ... this.
8210         (create_syscall_event_catchpoint): Remove reference to base
8211         field.
8212         (initialize_syscall_catchpoint_ops): Don't set dtor.
8213         * break-catch-throw.c (struct exception_catchpoint): Inherit
8214         from breakpoint.
8215         <~exception_catchpoint>: New.
8216         <base>: Remove.
8217         (dtor_exception_catchpoint): Change to ...
8218         (exception_catchpoint::~exception_catchpoint): ... this.
8219         (handle_gnu_v3_exceptions): Remove reference to base field.
8220         (initialize_throw_catchpoint_ops): Don't set dtor.
8221         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8222         field.
8223         * remote.c (remote_get_tracepoint_status): Likewise.
8224         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8225         * tracefile.c (tracefile_fetch_registers): Likewise.
8226         * tracepoint.c (actions_command): Likewise.
8227         (validate_actionline): Likewise.
8228         (tfind_1): Likewise.
8229         (get_traceframe_location): Likewise.
8230         (find_matching_tracepoint_location): Likewise.
8231         (parse_tracepoint_status): Likewise.
8232         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8233
8234 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8235
8236         * breakpoint.c (struct longjmp_breakpoint): New struct.
8237         (is_tracepoint_type): Change return type to bool.
8238         (is_longjmp_type): New function.
8239         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8240         (set_raw_breakpoint_without_location): Use
8241         new_breakpoint_from_type.
8242         (set_raw_breakpoint): Likewise.
8243
8244 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8245
8246         * breakpoint.c (new_breakpoint_from_type): New function.
8247         (create_breakpoint_sal): Use new_breakpoint_from_type and
8248         unique_ptr.
8249         (create_breakpoint): Likewise.
8250
8251 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8252
8253         * memattr.c (mem_info_command): Rename to ...
8254         (info_mem_command): ... this.
8255         (mem_enable_command): Rename to ...
8256         (enable_mem_command): ... this.
8257         (mem_disable_command): Rename to ...
8258         (disable_mem_command): ... this.
8259         (mem_delete_command): Rename to ...
8260         (delete_mem_command): ... this.
8261         (_initialize_mem): Adjust function names.
8262
8263 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8264
8265         * btrace.c (handle_pt_insn_events): New.
8266         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8267         STATUS.  Split into this and ...
8268         (handle_pt_insn_event_flags): ... this.
8269
8270 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8271
8272         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8273         and struct pt_insn.resynced.
8274         * configure: Regenerated.
8275         * config.in: Regenerated.
8276
8277 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8278
8279         * btrace.c (ftrace_find_call_by_number): New function.
8280         (ftrace_new_function): Store objects, not pointers.
8281         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8282         ftrace_new_gap, ftrace_update_function,
8283         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8284         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8285         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8286         btrace_ends_with_single_insn, btrace_call_get): Account for
8287         btrace_thread_info::functions now storing objects.
8288         * btrace.h (struct btrace_thread_info): Add constructor.
8289         (struct btrace_thread_info) <functions>: Make std::vector.
8290         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8291         Initialize with default values.
8292         * record-btrace.c (record_btrace_frame_sniffer): Account for
8293         btrace_thread_info::functions now storing objects.
8294
8295 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8296
8297         * btrace.c: Remove typedef bfun_s.
8298         (ftrace_new_gap): Directly add gaps to the list of gaps.
8299         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8300         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8301         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8302         instead of gdb VEC.
8303
8304 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8305
8306         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8307         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8308         with btrace_thread_info::next_segment and
8309         btrace_thread_info::prev_segment.
8310         * btrace.h: Remove struct btrace_func_link.
8311         (struct btrace_function): Replace pair of function segment pointers
8312         with pair of indices.
8313         * python/py-record-btrace.c (btpy_call_prev_sibling,
8314         btpy_call_next_sibling): Replace references to
8315         btrace_thread_info::segment with btrace_thread_info::next_segment and
8316         btrace_thread_info::prev_segment.
8317         * record-btrace.c (record_btrace_frame_this_id): Use
8318         btrace_find_call_by_number.
8319
8320 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8321
8322         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8323         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8324         btrace_insn_next, btrace_insn_prev): Remove references to
8325         btrace_thread_info::flow.
8326         * btrace.h (struct btrace_function): Remove FLOW.
8327
8328 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8329
8330         * btrace.c (ftrace_find_call_by_number): New function.
8331         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8332         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8333         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8334         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8335         index.
8336         * btrace.h (struct btrace_function): Turn UP into an index.
8337         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8338         as an index.
8339         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8340         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8341         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8342
8343 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8344
8345         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8346         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8347         ftrace_update_function, ftrace_compute_global_level_offset,
8348         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8349         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8350         btrace_insn_end, btrace_is_empty): Remove references to
8351         btrace_thread_info::begin and btrace_thread_info::end.
8352         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8353         (struct btrace_thread_info) <functions>: Adjust comment.
8354         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8355         btrace_thread_info::begin.
8356
8357 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8358
8359         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8360         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8361         ftrace_update_function): Remove arguments that implicitly were always
8362         BTINFO->END.
8363         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8364         Don't pass BTINFO->END.
8365
8366 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8367
8368         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8369         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8370         btrace_find_insn_by_number): Replace function segment pointer with
8371         index.
8372         (btrace_insn_cmp): Simplify.
8373         * btrace.h: (struct btrace_insn_iterator) Rename index to
8374         insn_index.  Replace function segment pointer with index into function
8375         segment vector.
8376         * record-btrace.c (record_btrace_call_history): Replace function
8377         segment pointer use with index.
8378         (record_btrace_frame_sniffer): Retrieve function call segment through
8379         vector.
8380         (record_btrace_set_replay): Remove defunc't safety check.
8381
8382 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8383
8384         * btrace.c (btrace_ends_with_single_insn): New function.
8385         (btrace_call_get, btrace_call_number, btrace_call_begin,
8386         btrace_call_end, btrace_call_next, btrace_call_prev,
8387         btrace_find_call_by_number): Use index into call segment vector
8388         instead of pointer.
8389         (btrace_call_cmp): Simplify.
8390         * btrace.h (struct btrace_call_iterator): Replace function call segment
8391         pointer with index into vector.
8392         * record-btrace.c (record_btrace_call_history): Use index instead of
8393         pointer.
8394
8395 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8396
8397         * btrace.c (btrace_insn_begin, btrace_insn_end,
8398         btrace_find_insn_by_number): Add btinfo to iterator.
8399         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8400
8401 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8402
8403         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8404         and save pointers directly.
8405         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8406         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8407         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8408         changed signature of functions.
8409         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8410         (btrace_fetch): Remove code that adds btrace_function pointers to
8411         vector of btrace_functions.
8412         (btrace_clear): Simplify freeing vector of btrace_functions.
8413
8414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8415
8416         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8417         Replace VEC_* with std::vector functions.
8418         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8419         (struct btrace_thread_info)<functions>: Change type to std::vector.
8420
8421 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8422
8423         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8424         "Removed targets and native configurations" up.  Merge duplicate
8425         "New commands" sub-sections.  Add "New options" sub-sections.
8426
8427 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8428
8429         * defs.h (copy_integer_to_size): New declaration.
8430         * findvar.c (copy_integer_to_size): New function.
8431         (do_cint_test): New selftest function.
8432         (copy_integer_to_size_test): Likewise.
8433         (_initialize_findvar): Likewise.
8434         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8435         (mips_fbsd_collect_reg): Use raw_collect_integer.
8436         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8437         (mips64_fill_gregset): Use raw_collect_integer
8438         (mips64_fill_fpregset): Use raw_supply_integer.
8439         * regcache.c (regcache::raw_supply_integer): New function.
8440         (regcache::raw_collect_integer): Likewise.
8441         * regcache.h: (regcache::raw_supply_integer): New declaration.
8442         (regcache::raw_collect_integer): Likewise.
8443
8444 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8445
8446         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8447         (COMMON_OBS): Add gdbarch-selftests.o.
8448         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8449         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8450         * gdbarch-selftests.c: New file.
8451         * regcache.h (regcache) <~regcache>: Mark it virtual if
8452         GDB_SELF_TEST.
8453         <raw_write>: Likewise.
8454
8455 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8456
8457         * regcache.c (current_regcache): Change it to
8458         regcache::current_regcache.
8459         (regcache_observer_target_changed): Update.
8460         (regcache_thread_ptid_changed): Make it a regcache static
8461         method.
8462         (regcache_thread_ptid_changed): Update.
8463         (class regcache_access): New.
8464         (current_regcache_test): Update.
8465         (_initialize_regcache): Update.
8466         * regcache.h: Include forward_list.
8467         (regcache): Declare regcache_thread_ptid_changed and declare
8468         registers_changed_ptid as friend.
8469
8470 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8471
8472         * i387-tdep.c (i387_register_to_value): Use register_size
8473         instead of TYPE_LENGTH.
8474         * m68k-tdep.c (m68k_register_to_value): Likewise.
8475
8476 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8477
8478         * i387-tdep.c (i387_convert_register_p): Return false if type
8479         code isn't TYPE_CODE_FLT.
8480
8481 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8482
8483         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8484         length is 4.
8485         (alpha_register_to_value): Remove type length check.
8486         (alpha_value_to_register): Likewise.
8487
8488 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8489
8490         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8491         TYPE_CODE_FLT.
8492
8493 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8494
8495         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8496         TYPE_CODE_FLT or not.
8497
8498 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8499
8500         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8501         * avr-tdep.c (avr_gdbarch_init): Likewise.
8502         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8503         * cris-tdep.c (cris_gdbarch_init): Likewise.
8504         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8505         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8506         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8507         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8508         * mep-tdep.c (mep_gdbarch_init): Likewise.
8509         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8510         * mips-tdep.c (mips_gdbarch_init): Likewise.
8511         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8512         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8513         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8514         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8515         * v850-tdep.c (v850_gdbarch_init): Likewise.
8516
8517 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8518
8519         * selftest-arch.c (tests_with_arch): Call registers_changed
8520         and reinit_frame_cache.
8521         * selftest.c (run_self_tests): Likewise.
8522
8523 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8524
8525         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8526         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8527
8528 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8529
8530         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8531         set_gdbarch_print_insn.
8532
8533 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8534
8535         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8536         set_gdbarch_print_insn.
8537
8538 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8539
8540         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8541         set_gdbarch_print_insn.
8542         * arc-tdep.c (arc_gdbarch_init): Likewise.
8543         * arch-utils.c: include dis-asm.h.
8544         (default_print_insn): New function.
8545         * arch-utils.h (default_print_insn): Declare.
8546         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8547         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8548         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8549         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8550         * frv-tdep.c (frv_gdbarch_init): Likewise.
8551         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8552         * gdbarch.sh (print_insn): Use default_print_insn.
8553         * gdbarch.c: Regenerated.
8554         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8555         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8556         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8557         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8558         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8559         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8560         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8561         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8562         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8563         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8564         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8565         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8566         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8567         * mt-tdep.c (mt_gdbarch_init): Likewise.
8568         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8569         * nios2-tdep.c (nios2_print_insn): Remove.
8570         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8571         * rx-tdep.c (rx_gdbarch_init): Likewise.
8572         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8573         * score-tdep.c (score_print_insn): Remove.
8574         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8575         * sh-tdep.c (sh_gdbarch_init): Likewise.
8576         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8577         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8578         * tic6x-tdep.c (tic6x_print_insn): Remove.
8579         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8580         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8581         * v850-tdep.c (v850_gdbarch_init): Likewise.
8582         * vax-tdep.c (vax_gdbarch_init): Likewise.
8583         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8584         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8585
8586 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8587
8588         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8589         (MIPS_FP0_REGNUM): Remove.
8590         (MIPS_FSR_REGNUM): Remove.
8591         (mips_fbsd_supply_fpregs): Use mips_regnum.
8592         (mips_fbsd_supply_gregs): Likewise.
8593         (mips_fbsd_collect_fpregs): Likewise.
8594         (mips_fbsd_collect_gregs): Likewise.
8595
8596 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8597
8598         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8599         (getpfpregs_supplies): New function.
8600         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8601         getfpregs_supplies.
8602         (mips_fbsd_store_inferior_registers): Likewise.
8603
8604 2017-05-22  Pedro Alves <palves@redhat.com>
8605
8606         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8607         maintainer.
8608
8609 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8610
8611         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8612         (store_register): Likewise.
8613         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8614         (get_decimal_float_return_value): Likewise.
8615         (do_ppc_sysv_return_value): Likewise.
8616         (ppc64_sysv_abi_push_integer): Likewise.
8617         (ppc64_sysv_abi_push_freg): Likewise.
8618         (ppc64_sysv_abi_return_value_base): Likewise.
8619         (ppc64_sysv_abi_return_value): Likewise.
8620         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8621         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8622         * rs6000-nat.c: Likewise.
8623         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8624         (rs6000_value_to_register): Likewise.
8625         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8626
8627 2017-05-21  Tom Tromey  <tom@tromey.com>
8628
8629         PR rust/21466:
8630         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8631         arrays as "[T]", not "[T; ]".
8632
8633 2017-05-19  Tom Tromey  <tom@tromey.com>
8634
8635         PR rust/21484:
8636         * rust-lang.c (exp_descriptor_rust): New function.
8637         (rust_language_defn): Use it.
8638         * p-lang.c (pascal_language_defn): Update.
8639         * opencl-lang.c (opencl_language_defn): Update.
8640         * objc-lang.c (objc_language_defn): Update.
8641         * m2-lang.c (m2_language_defn): Update.
8642         * language.h (struct language_defn)
8643         <la_watch_location_expression>: New member.
8644         * language.c (unknown_language_defn, auto_language_defn)
8645         (local_language_defn): Update.
8646         * go-lang.c (go_language_defn): Update.
8647         * f-lang.c (f_language_defn): Update.
8648         * d-lang.c (d_language_defn): Update.
8649         * c-lang.h (c_watch_location_expression): Declare.
8650         * c-lang.c (c_watch_location_expression): New function.
8651         (c_language_defn, cplus_language_defn, asm_language_defn)
8652         (minimal_language_defn): Use it.
8653         * breakpoint.c (watch_command_1): Call
8654         la_watch_location_expression.
8655         * ada-lang.c (ada_language_defn): Update.
8656
8657 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8658
8659         PR tui/21482
8660         * gdb_curses.h (NOMACROS): Define.
8661         (NCURSES_NOMACROS): Define.
8662
8663 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8664
8665         PR tui/21482
8666         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8667         arg to char *.
8668         * tui/tui-wingeneral.c (box_win): Likewise.
8669         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8670         (tui_show_source_line): Likewise.
8671         (tui_show_exec_info_content): Likewise.
8672
8673 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8674
8675         * sparc-tdep.c (sparc_structure_return_p)
8676         (sparc_arg_on_registers_p): New functions.
8677         (sparc32_store_arguments): Use them.
8678         * sparc64-tdep.c (sparc64_16_byte_align_p)
8679         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8680         Handle TYPE_CODE_ARRAY.
8681
8682 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8683
8684         * cli/cli-decode.c (add_alias_cmd): New function.
8685         * command.h (add_alias_cmd): Declare.
8686         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8687         instead call add_alias_cmd.
8688
8689 2017-05-17  Pedro Alves  <palves@redhat.com>
8690
8691         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8692         (nat_makefile_frag): ... this.  All references updated.
8693         * configure.ac: Likewise.
8694         * configure.nat: Likewise.  Enhance comments.
8695         * configure: Regenerate.
8696
8697 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8698
8699         * procfs.c (procfs_create_inferior): Change prototype to match
8700         definition.
8701
8702 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8703
8704         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8705         C++ compiler warning.
8706
8707 2017-05-12  Tom Tromey  <tom@tromey.com>
8708
8709         PR rust/21483:
8710         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8711         recurse, just call value_struct_elt directly.
8712
8713 2017-05-12  Tom Tromey  <tom@tromey.com>
8714
8715         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8716         OP_RUST_ARRAY>: Fix.
8717
8718 2017-05-12  Tom Tromey  <tom@tromey.com>
8719
8720         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8721
8722 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8723
8724         * regcache.c: Include <forward_list>.
8725         (struct regcache_list): Remove.
8726         (current_regcache): Update.
8727         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8728         (regcache_thread_ptid_changed): Likewise.
8729         (registers_changed_ptid): Likewise.
8730         (current_regcache_size): Likewise.
8731
8732 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8733
8734         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8735         (current_regcache_size): New function.
8736         (current_regcache_test): New function.
8737         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8738
8739 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8740
8741         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8742         (print_gp_register_row): Use get_frame_register_value.
8743
8744 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8745
8746         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8747         (mips_supply_fpregset): Likewise.
8748         (mips64_supply_gregset): Likewise.
8749
8750 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8751
8752         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8753         regcache->raw_supply_zeroed.
8754
8755 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8756
8757         * configure.nat: Rearrange 'case' statements to match
8758         host before cpu.
8759
8760 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8761
8762         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8763         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8764         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8765         "@nat_extra_makefile_frag@".
8766         (Makefile): Remove dependency on "@frags@".
8767         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8768         (data-directory/Makefile): Likewise.
8769         * config/aarch64/linux.mh: Deleted; moved contents to
8770         "gdb/configure.nat".
8771         * config/alpha/alpha-linux.mh: Likewise.
8772         * config/alpha/nbsd.mh: Likewise.
8773         * config/arm/linux.mh: Likewise.
8774         * config/arm/nbsdelf.mh: Likewise.
8775         * config/i386/cygwin.mh: Likewise.
8776         * config/i386/cygwin64.mh: Likewise.
8777         * config/i386/darwin.mh: Likewise.
8778         * config/i386/fbsd.mh: Likewise.
8779         * config/i386/fbsd64.mh: Likewise.
8780         * config/i386/go32.mh: Likewise.
8781         * config/i386/i386gnu.mh: Likewise.
8782         * config/i386/i386sol2.mh: Likewise.
8783         * config/i386/linux.mh: Likewise.
8784         * config/i386/linux64.mh: Likewise.
8785         * config/i386/mingw.mh: Likewise.
8786         * config/i386/mingw64.mh: Likewise.
8787         * config/i386/nbsd64.mh: Likewise.
8788         * config/i386/nbsdelf.mh: Likewise.
8789         * config/i386/nto.mh: Likewise.
8790         * config/i386/obsd.mh: Likewise.
8791         * config/i386/obsd64.mh: Likewise.
8792         * config/i386/sol2-64.mh: Likewise.
8793         * config/ia64/linux.mh: Likewise.
8794         * config/m32r/linux.mh: Likewise.
8795         * config/m68k/linux.mh: Likewise.
8796         * config/m68k/nbsdelf.mh: Likewise.
8797         * config/m68k/obsd.mh: Likewise.
8798         * config/m88k/obsd.mh: Likewise.
8799         * config/mips/fbsd.mh: Likewise.
8800         * config/mips/linux.mh: Likewise.
8801         * config/mips/nbsd.mh: Likewise.
8802         * config/mips/obsd64.mh: Likewise.
8803         * config/pa/linux.mh: Likewise.
8804         * config/pa/nbsd.mh: Likewise.
8805         * config/pa/obsd.mh: Likewise.
8806         * config/powerpc/aix.mh: Likewise.
8807         * config/powerpc/fbsd.mh: Likewise.
8808         * config/powerpc/linux.mh: Likewise.
8809         * config/powerpc/nbsd.mh: Likewise.
8810         * config/powerpc/obsd.mh: Likewise.
8811         * config/powerpc/ppc64-linux.mh: Likewise.
8812         * config/powerpc/spu-linux.mh: Likewise.
8813         * config/s390/linux.mh: Likewise.
8814         * config/sh/nbsd.mh: Likewise.
8815         * config/sparc/fbsd.mh: Likewise.
8816         * config/sparc/linux.mh: Likewise.
8817         * config/sparc/linux64.mh: Likewise.
8818         * config/sparc/nbsd64.mh: Likewise.
8819         * config/sparc/nbsdelf.mh: Likewise.
8820         * config/sparc/obsd64.mh: Likewise.
8821         * config/sparc/sol2.mh: Likewise.
8822         * config/tilegx/linux.mh: Likewise.
8823         * config/vax/nbsdelf.mh: Likewise.
8824         * config/vax/obsd.mh: Likewise.
8825         * config/xtensa/linux.mh: Likewise.
8826         * config/i386/i386gnu.mn: New file, with excerpts from
8827         "config/i386/i386gnu.mh".
8828         * configure: Regenerate.
8829         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8830         *.mh files under "gdb/config".
8831         * configure.nat: New file, with contents from the
8832         "gdb/config/*/*.mh" files.
8833
8834 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8835
8836         * btrace.c (btrace_clear): Free insn vector.
8837
8838 2017-05-05  Pedro Alves  <palves@redhat.com>
8839
8840         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8841         * configure: Regenerate.
8842
8843 2017-05-04  Pedro Alves  <palves@redhat.com>
8844
8845         * Makefile.in (SFILES): Add progspace-and-thread.c.
8846         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8847         (COMMON_OBS): Add progspace-and-thread.o.
8848         * breakpoint.c: Include "progspace-and-thread.h".
8849         (update_inserted_breakpoint_locations)
8850         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8851         Use scoped_restore_current_pspace_and_thread.
8852         (create_std_terminate_master_breakpoint): Use
8853         scoped_restore_current_program_space.
8854         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8855         (print_breakpoint_location): Use
8856         scoped_restore_current_program_space.
8857         (bp_loc_is_permanent): Use
8858         scoped_restore_current_pspace_and_thread.
8859         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8860         (download_tracepoint_locations): Use
8861         scoped_restore_current_pspace_and_thread.
8862         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8863         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8864         (enum step_over_calls_kind): Moved from inferior.h.
8865         (class scoped_restore_current_thread): New class.
8866         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8867         declaration.
8868         (scoped_restore_current_thread): New class.
8869         * infcmd.c: Include "common/gdb_optional.h".
8870         (continue_1, proceed_after_attach): Use
8871         scoped_restore_current_thread.
8872         (notice_new_inferior): Use scoped_restore_current_thread.
8873         * inferior.c: Include "progspace-and-thread.h".
8874         (restore_inferior, save_current_inferior): Delete.
8875         (add_inferior_command, clone_inferior_command): Use
8876         scoped_restore_current_pspace_and_thread.
8877         * inferior.h (scoped_restore_current_inferior): New class.
8878         * infrun.c: Include "progspace-and-thread.h" and
8879         "common/gdb_optional.h".
8880         (follow_fork_inferior): Use
8881         scoped_restore_current_pspace_and_thread.
8882         (scoped_restore_exited_inferior): New class.
8883         (handle_vfork_child_exec_or_exit): Use
8884         scoped_restore_exited_inferior,
8885         scoped_restore_current_pspace_and_thread,
8886         scoped_restore_current_thread and scoped_restore.
8887         (fetch_inferior_event): Use scoped_restore_current_thread.
8888         * linespec.c (decode_line_full, decode_line_1): Use
8889         scoped_restore_current_program_space.
8890         * mi/mi-main.c: Include "progspace-and-thread.h".
8891         (exec_continue): Use scoped_restore_current_thread.
8892         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8893         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8894         * proc-service.c (ps_pglobal_lookup): Use
8895         scoped_restore_current_program_space.
8896         * progspace-and-thread.c: New file.
8897         * progspace-and-thread.h: New file.
8898         * progspace.c (release_program_space, clone_program_space): Use
8899         scoped_restore_current_program_space.
8900         (restore_program_space, save_current_program_space)
8901         (save_current_space_and_thread): Delete.
8902         (switch_to_program_space_and_thread): Moved to
8903         progspace-and-thread.c.
8904         * progspace.h (save_current_program_space)
8905         (save_current_space_and_thread): Delete declarations.
8906         (scoped_restore_current_program_space): New class.
8907         * remote.c (remote_btrace_maybe_reopen): Use
8908         scoped_restore_current_thread.
8909         * symtab.c: Include "progspace-and-thread.h".
8910         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8911         * thread.c (print_thread_info_1): Use
8912         scoped_restore_current_thread.
8913         (struct current_thread_cleanup): Delete.
8914         (do_restore_current_thread_cleanup)
8915         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8916         (scoped_restore_current_thread::~scoped_restore_current_thread):
8917         ... this new dtor.
8918         (make_cleanup_restore_current_thread): Rename/convert to ...
8919         (scoped_restore_current_thread::scoped_restore_current_thread):
8920         ... this new ctor.
8921         (thread_apply_all_command): Use scoped_restore_current_thread.
8922         (thread_apply_command): Use scoped_restore_current_thread.
8923         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8924         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8925
8926 2017-05-04  Pedro Alves  <palves@redhat.com>
8927
8928         * thread.c (make_cleanup_restore_current_thread): Move
8929         find_thread_ptid call before the is_stopped call.  Assert that the
8930         thread is found.  Replace is_stopped call by checking the thread's
8931         state directly.  Remove unnecessary NULL-thread check.
8932
8933 2017-05-04  Pedro Alves  <palves@redhat.com>
8934
8935         * corelow.c (thread_section_name): New class.
8936         (get_core_register_section, get_core_siginfo): Use it.
8937
8938 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8939
8940         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8941         (get_core_register_section): Remove xfree of NULL pointer.
8942
8943 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8944
8945         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8946         * regcache.c (regcache::raw_supply_zeroed): New function.
8947         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8948
8949 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8950
8951         * gdbarch.sh: Remove commented out definition of
8952         TARGET_CHAR_BIT.
8953         * gdbarch.h: Re-generate.
8954
8955 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8956
8957         * configure: Regenerate.
8958
8959 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8960
8961         * solib-target.c (solib_target_relocate_section_addresses):
8962         Remove num_section_bases, num_bases, segment_bases variables.
8963
8964 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8965
8966         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8967
8968 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8969
8970         * solib-target.c: Include <vector>
8971         (struct lm_info_target) <~lm_info_target>: Remove.
8972         <segment_bases, section_bases>: Change type to
8973         std::vector<CORE_ADDR>.
8974         (library_list_start_segment, library_list_start_section,
8975         library_list_end_library,
8976         solib_target_relocate_section_addresses): Adjust.
8977
8978 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8979
8980         * gdbarch.sh (software_single_step): Change return type to
8981         std::vector<CORE_ADDR>.
8982         * gdbarch.c, gdbarch.h: Re-generate.
8983         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8984         Adjust.
8985         (arm_deal_with_atomic_sequence_raw): Adjust.
8986         (thumb_get_next_pcs_raw): Adjust.
8987         (arm_get_next_pcs_raw): Adjust.
8988         (arm_get_next_pcs): Adjust.
8989         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8990         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8991         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8992         (alpha_software_single_step): Adjust.
8993         * alpha-tdep.h (alpha_software_single_step): Adjust.
8994         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8995         * arm-tdep.c (arm_software_single_step): Adjust.
8996         (arm_breakpoint_kind_from_current_state): Adjust.
8997         * arm-tdep.h (arm_software_single_step): Adjust.
8998         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8999         * cris-tdep.c (cris_software_single_step): Adjust.
9000         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9001         (micromips_deal_with_atomic_sequence): Adjust.
9002         (deal_with_atomic_sequence): Adjust.
9003         (mips_software_single_step): Adjust.
9004         * mips-tdep.h (mips_software_single_step): Adjust.
9005         * moxie-tdep.c (moxie_software_single_step): Adjust.
9006         * nios2-tdep.c (nios2_software_single_step): Adjust.
9007         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9008         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9009         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9010         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9011         * sparc-tdep.c (sparc_software_single_step): Adjust.
9012         * spu-tdep.c (spu_software_single_step): Adjust.
9013         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9014
9015 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9016
9017         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9018         * gdbarch.h: Re-generate.
9019
9020 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9021
9022         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9023         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9024         * python/py-instruction.c, python/py-instruction.h: New file.
9025         * python/py-record.c: Add py-instruction.h include.
9026         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9027         gdb.RecordInstruction.
9028         * python/python-internal.h: Add gdbpy_initialize_instruction
9029         declaration.
9030         * python/python.c (do_start_initialization): Add
9031         gdbpy_initialize_instruction.
9032
9033 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9034
9035         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9036         Remove.
9037         (btrace_func_from_recpy_func): New function.
9038         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9039         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9040         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9041         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9042         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9043         Also, use new helper functions.
9044         (btpy_list_item): Use new helper functions.
9045         (recpy_bt_function_call_history): Use new type name.
9046         (btpy_call_getset): Remove.
9047         (gdbpy_initialize_btrace): Remove code to initialize
9048         gdb.BtraceFunctionCall.
9049         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9050         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9051         recpy_bt_func_prev, recpy_bt_func_next): New export.
9052         * python/py-record.c (recpy_func_type): New static object.
9053         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9054         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9055         recpy_func_next): New function.
9056         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9057         (recpy_func_getset): New static object.
9058         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9059         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9060
9061 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9062
9063         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9064         (btpy_object, btpy_insn_type, btpy_new): Remove.
9065         (btpy_list_object): Use gdb.RecordInstruction type instead of
9066         gdb.BtraceInstruction type.
9067         (btrace_insn_from_recpy_insn): New function.
9068         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9069         btpy_new.
9070         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9071         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9072         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9073         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9074         instead of btpy_object.
9075         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9076         btpy_insn_data, btpy_insn_decode): Rename to ...
9077         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9078         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9079         recpy_bt_insn_decode): This.  Also, use new helper functions.
9080         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9081         recpy_insn_type.
9082         (btpy_insn_getset): Remove.
9083         (gdbpy_initialize_btrace): Remove code to initialize
9084         gdb.BtraceInstruction.  Use recpy_element_object.
9085         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9086         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9087         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9088         * python/py-record.c (recpy_insn_type): New static object.
9089         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9090         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9091         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9092         New function.
9093         (recpy_insn_getset): New static object.
9094         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9095         * python/py-record.h (recpy_element_object): New typedef.
9096         (recpy_insn_type, recpy_insn_new): New export.
9097
9098 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9099
9100         * py-record-btrace.c (btpy_insn_new): Removed.
9101         (btpy_insn_or_gap_new): New function.
9102         (btpy_insn_error): Removed.
9103         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9104         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9105         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9106         btpy_insn_or_gap_new instead of btpy_insn_new.
9107         (btpy_insn_getset): Remove btpy_insn_error.
9108         * py-record.c (recpy_gap_type): New static object.
9109         (recpy_gap_object): New typedef.
9110         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9111         recpy_gap_reason_string): New function.
9112         (recpy_gap_getset): New static object.
9113         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9114         * py-record.h (recpy_gap_new): New export.
9115
9116 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9117
9118         * python/py-record.c (recpy_ptid): Remove.
9119         (recpy_record_getset): Remove recpy_ptid.
9120
9121 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9122
9123         * btrace.c (btrace_fetch): Set inferior_ptid.
9124         * python/py-record-btrace.c: Add "py-record.h" include.
9125         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9126         recpy_bt_end, recpy_bt_instruction_history,
9127         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9128         in gdb.Record object instead of current ptid.
9129         * python/py-record.c: Include new "py-record.h" file.
9130         (recpy_record_object): Moved to py-record.h.
9131         * python/py-record.h: New file.
9132
9133 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9134
9135         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9136         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9137         indentation.
9138
9139 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9140
9141         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9142         the past maintainers section.
9143
9144 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9145
9146         * infcmd.c (get_return_value): Use regcache ctor, and remove
9147         cleanup.
9148
9149 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9150             Pedro Alves  <palves@redhat.com>
9151
9152         * regcache.c (regcache::regcache): New tag dispatch ctor.
9153         (do_cooked_read): Moved above.
9154         (regcache_dup): Use the tag dispatch ctor..
9155         * regcache.h (regcache): Declare ctor, delete copy ctor and
9156         assignment operator, remove friend regcache_dup.
9157
9158 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9159
9160         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9161         call method save instead of regcache_cpy.
9162         * regcache.h (struct regcache): Make regcache_dup a friend.
9163
9164 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9165
9166         * regcache.c (struct regcache): Move to regcache.h
9167         (regcache::arch): New method.
9168         (regcache_get_ptid): Update.
9169         (get_regcache_arch): Call arch method.
9170         (get_regcache_aspace): Call method aspace.
9171         (register_buffer): Change it to method.
9172         (regcache_save): Change it to regcache::save.
9173         (regcache_restore): Likewise.
9174         (regcache_cpy_no_passthrough): Remove the declaration.
9175         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9176         (regcache_cpy_no_passthrough): Change it to method
9177         cpy_no_passthrough.
9178         (regcache_register_status): Change it to method
9179         get_register_status.
9180         (regcache_invalidate): Change it to method invalidate.
9181         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9182         (regcache_raw_update): Change it to method raw_update.
9183         (regcache_raw_read): Likewise.
9184         (regcache_raw_read_signed): Likewise.
9185         (regcache_raw_read_unsigned): Likewise.
9186         (regcache_raw_write_signed): Likewise.
9187         (regcache_raw_write_unsigned): Likewise.
9188         (regcache_cooked_read): Likewise.
9189         (regcache_cooked_read_value): Likewise.
9190         (regcache_cooked_read_signed): Likewise.
9191         (regcache_cooked_read_unsigned): Likewise.
9192         (regcache_cooked_write_signed): Likewise.
9193         (regcache_cooked_write_unsigned): Likewise.
9194         (regcache_raw_set_cached_value): Likewise.
9195         (regcache_raw_write): Likewise.
9196         (regcache_cooked_write): Likewise.
9197         (regcache_xfer_part): Likewise.
9198         (regcache_raw_read_part): Likewise.
9199         (regcache_raw_write_part): Likewise.
9200         (regcache_cooked_read_part): Likewise.
9201         (regcache_cooked_write_part): Likewise.
9202         (regcache_raw_supply): Likewise.
9203         (regcache_raw_collect): Likewise.
9204         (regcache_transfer_regset): Likewise.
9205         (regcache_supply_regset): Likewise.
9206         (regcache_collect_regset): Likewise.
9207         (regcache_debug_print_register): Likewise.
9208         (enum regcache_dump_what): Move it to regcache.h.
9209         (regcache_dump): Change it to method dump.
9210         * regcache.h (enum regcache_dump_what): New.
9211         (class regcache): New.
9212         * target.c (target_fetch_registers): Call method
9213         debug_print_register.
9214         (target_store_registers): Likewise.
9215
9216 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9217
9218         * windows-nat.c (struct lm_info_windows): Initialize field.
9219         (windows_make_so): Allocate lm_info_windows with new.
9220         (windows_free_so): Free lm_info_windows with delete.
9221
9222 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9223
9224         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9225         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9226         cleanup.
9227         (darwin_free_so): Free lm_info_darwin with delete.
9228
9229 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9230
9231         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9232         <l_addr_p>: Change type to bool.
9233         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9234         (svr4_free_so): Free lm_info_svr4 with delete.
9235         (svr4_copy_library_list): Replace memcpy with call to copy
9236         constructor.
9237         (library_list_start_library, svr4_default_sos): Allocate
9238         lm_info_svr4 with new.
9239
9240 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9241
9242         * solib-target.c (struct lm_info_target): Add destructor,
9243         initialize fields.
9244         <name>: Change type to std::string.
9245         (library_list_start_library): Allocate lm_info_target with new.
9246         (solib_target_free_library_list): Free lm_info_target with
9247         delete.
9248         (solib_target_current_sos): Adapt to std::string.
9249         (solib_target_free_so): Free lm_info_target with delete.
9250
9251 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9252
9253         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9254         fields.
9255         (frv_current_sos): Allocate lm_info_frv with new.
9256         (frv_relocate_main_executable): Free lm_info_frv with delete,
9257         allocate with new.
9258         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9259
9260 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9261
9262         * solib-frv.c (struct lm_info_frv): Fix indentation.
9263
9264 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9265
9266         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9267         map field.
9268         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9269         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9270         and allocate with new.
9271         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9272
9273 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9274
9275         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9276         <filename, member_name>: Change type to std::string.
9277         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9278         (library_list_start_library): Allocate lm_info_aix with new.
9279         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9280         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9281         with copy constructor.
9282
9283 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9284
9285         * solist.h (struct lm_info): Remove.
9286         (struct lm_info_base): New class.
9287         (struct so_list) <lm_info>: Change type to lm_info_base *.
9288         * nto-tdep.c (struct lm_info): Remove.
9289         (lm_addr): Adjust.
9290         * solib-aix.c (struct lm_info): Rename to ...
9291         (struct lm_info_aix): ... this.  Extend lm_info_base.
9292         (lm_info_p): Rename to ...
9293         (lm_info_aix_p): ... this, and adjust.
9294         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9295         solib_aix_parse_libraries, library_list_start_library,
9296         solib_aix_free_library_list, solib_aix_parse_libraries,
9297         solib_aix_get_library_list,
9298         solib_aix_relocate_section_addresses, solib_aix_free_so,
9299         solib_aix_get_section_offsets,
9300         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9301         Adjust.
9302         (struct solib_aix_inferior_data) <library_list>: Adjust.
9303         * solib-darwin.c (struct lm_info): Rename to ...
9304         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9305         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9306         * solib-dsbt.c (struct lm_info): Rename to ...
9307         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9308         (struct dsbt_info) <main_executable_lm_info): Adjust.
9309         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9310         dsbt_relocate_section_addresses): Adjust.
9311         * solib-frv.c (struct lm_info): Rename to ...
9312         (struct lm_info_frv): ... this.  Extend lm_info_base.
9313         (main_executable_lm_info): Adjust.
9314         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9315         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9316         find_canonical_descriptor_in_load_object,
9317         frv_fdpic_find_canonical_descriptor): Adjust.
9318         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9319         to lm_info_svr4.
9320         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9321         svr4_clear_so, svr4_copy_library_list,
9322         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9323         svr4_current_sos, svr4_fetch_objfile_link_map,
9324         solist_update_incremental): Adjust.
9325         * solib-svr4.h (struct lm_info_svr4): Move here from
9326         solib-svr4.c.
9327         * solib-target.c (struct lm_info): Rename to ...
9328         (struct lm_info_target): ... this.  Extend lm_info_base.
9329         (lm_info_p): Rename to ...
9330         (lm_info_target_p): ... this.
9331         (solib_target_parse_libraries, library_list_start_segment,
9332         library_list_start_section, library_list_start_library,
9333         library_list_end_library, solib_target_free_library_list,
9334         solib_target_current_sos, solib_target_free_so,
9335         solib_target_relocate_section_addresses): Adjust.
9336         * windows-nat.c (struct lm_info): Rename to ...
9337         (struct lm_info_windows): ... this.  Extend lm_info_base.
9338         (windows_make_so, handle_load_dll, handle_unload_dll,
9339         windows_xfer_shared_libraries): Adjust.
9340
9341 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9342
9343         * solib-darwin.c (struct darwin_so_list): Remove.
9344         (darwin_current_sos): Allocate an so_list object instead of a
9345         darwin_so_list, separately allocate an lm_info object.
9346         (darwin_free_so): Free lm_info.
9347
9348 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9349
9350         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9351         with fprintf_filtered.
9352
9353 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9354
9355         * regcache.c (regcache::regcache): New function.
9356         (regcache::~regcache): New function.
9357         (regcache_xmalloc_1): Remove.
9358         (regcache_xmalloc): Call new regcache.
9359         (regcache_xfree): Call delete regcache.
9360         (get_thread_arch_aspace_regcache): Call new regcache.
9361
9362 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9363
9364         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9365         lwp instead of ptid_get_lwp.
9366
9367 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9368
9369         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9370         lwp_info instead of getting from inferior_ptid.
9371
9372 2017-04-27  Keith Seitz  <keiths@redhat.com>
9373
9374         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9375         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9376         (CV_CONVERSION_BADNESS): Define.
9377         (rank_one_type): Remove overly restrictive rvalue reference
9378         rank checks.
9379         Add cv-qualifier checks and subranks for type equality.
9380         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9381         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9382         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9383
9384 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9385
9386         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9387         count when creating the object.
9388
9389 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9390             Ulrich Weigand  <uweigand@de.ibm.com>
9391
9392         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9393         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9394         is used in AIX.
9395         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9396         (process_xcoff_symbol): Likewise.
9397         (scan_xcoff_symtab): Likewise.
9398
9399 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9400
9401         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9402         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9403         (ia64_access_reg): Use get_frame_register_unsigned.
9404         (ia64_access_rse_reg): Likewise.
9405         (ia64_libunwind_frame_prev_register): Likewise.
9406
9407 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9408
9409         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9410         * gdbarch.c: Regenerated.
9411         * gdbarch.h: Regenerated.
9412         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9413         visibility external.
9414         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9415         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9416         (enum cfa_how_kind): Move to ...
9417         (struct dwarf2_frame_state_reg_info): Likewise.
9418         (struct dwarf2_frame_state): Likewise.
9419         * dwarf2-frame.h: ... here.
9420         (dwarf2_frame_state_alloc_regs): New declaration.
9421         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9422         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9423
9424 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9425
9426         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9427         regcache_raw_read_unsigned.
9428         (xtensa_pseudo_register_write): Likewise.
9429
9430 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9431
9432         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9433         (nds32_pseudo_register_write): Likewise.
9434
9435 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9436
9437         * regcache.c (struct regcache) <readonly_p>: Change its type
9438         to bool.
9439         (regcache_xmalloc_1): Update parameter type and callers update.
9440
9441 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9442
9443         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9444         set_gdbarch_wchar_bit.
9445         * arm-tdep.c (arm_gdbarch_init): Likewise.
9446
9447 2017-04-25  Pedro Alves  <palves@redhat.com>
9448
9449         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9450         (BothAreRelocatable, memcopy, memmove): Don't define.
9451         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9452         macros.
9453
9454 2017-04-25  Pedro Alves  <palves@redhat.com>
9455
9456         * common/common-defs.h: Include "common/poison.h".
9457         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9458         and adjust.
9459         * common/poison.h: New file.
9460         * common/traits.h: Include <type_traits>.
9461         (Not, Or, Requires): New, moved from common/function-view.h.
9462
9463 2017-04-25  Pedro Alves  <palves@redhat.com>
9464
9465         * breakpoint.h (struct breakpoint): In-class initialize all
9466         fields.  Make boolean fields "bool".
9467         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9468         memset call and initializations no longer necessary.
9469
9470 2017-04-25  Pedro Alves  <palves@redhat.com>
9471
9472         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9473         reference.
9474         (pt_btrace_insn): New function.
9475         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9476
9477 2017-04-25  Pedro Alves  <palves@redhat.com>
9478
9479         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9480         "base" field and inherit from "bp_location" instead.  Add
9481         non-default ctor.
9482         (allocate_location_exception): Use new non-default ctor.
9483         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9484         (init_bp_location): Convert to ...
9485         (bp_location::bp_location): ... this new ctor, and remove memset
9486         call.
9487         (base_breakpoint_allocate_location): Use the new non-default ctor.
9488         * breakpoint.h (bp_location): Now a class.  Declare default and
9489         non-default ctors.  In-class initialize all members.
9490         (init_bp_location): Remove declaration.
9491
9492 2017-04-25  Pedro Alves  <palves@redhat.com>
9493
9494         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9495         assignment operator.
9496
9497 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9498
9499         * doublest.c (convert_doublest_to_floatformat): Call
9500         floatformat_totalsize_bytes.
9501
9502 2017-04-22  Tom Tromey  <tom@tromey.com>
9503
9504         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9505         ui_out_emit_list.
9506         * stack.c (print_frame): Use ui_out_emit_list.
9507         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9508         ui_out_emit_list.
9509         * mi/mi-main.c (print_one_inferior)
9510         (mi_cmd_data_list_register_names)
9511         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9512         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9513         ui_out_emit_list.
9514         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9515         (mi_output_solib_attribs): Use ui_out_emit_list,
9516         ui_out_emit_tuple.
9517         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9518         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9519         (mi_cmd_stack_list_args, list_args_or_locals): Use
9520         ui_out_emit_list.
9521         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9522         * breakpoint.c (print_solib_event, output_thread_groups): Use
9523         ui_out_emit_list.
9524
9525 2017-04-22  Tom Tromey  <tom@tromey.com>
9526
9527         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9528         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9529         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9530
9531 2017-04-22  Tom Tromey  <tom@tromey.com>
9532
9533         * tracepoint.c (tvariables_info_1)
9534         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9535
9536 2017-04-22  Tom Tromey  <tom@tromey.com>
9537
9538         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9539         annotate_arg_emitter.
9540         * breakpoint.c (print_mention_watchpoint)
9541         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9542         * annotate.h (struct annotate_arg_emitter): New.
9543
9544 2017-04-22  Tom Tromey  <tom@tromey.com>
9545
9546         * record-btrace.c (record_btrace_insn_history)
9547         (record_btrace_insn_history_range, record_btrace_call_history)
9548         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9549         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9550         ui_out_emit_tuple.
9551         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9552         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9553         * skip.c (skip_info): Use ui_out_emit_tuple.
9554         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9555         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9556         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9557         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9558         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9559         ui_out_emit_tuple.
9560         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9561         (output_register, mi_cmd_data_read_memory)
9562         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9563         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9564         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9565         Use ui_out_emit_tuple.
9566         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9567         ui_out_emit_tuple.
9568         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9569         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9570         * linux-thread-db.c (info_auto_load_libthread_db): Use
9571         ui_out_emit_tuple.
9572         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9573         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9574         * disasm.c (do_mixed_source_and_assembly_deprecated)
9575         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9576         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9577         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9578         * breakpoint.c (print_one_breakpoint_location)
9579         (print_one_breakpoint): Use ui_out_emit_tuple.
9580         * auto-load.c (print_script, info_auto_load_cmd): Use
9581         ui_out_emit_tuple.
9582         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9583
9584 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9585
9586         * thread.c (print_thread_info_1): Remove dead code.
9587
9588 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9589
9590         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9591         GDB_SELF_TEST.
9592         * arm-tdep.c (selftests::arm_record_test): Likewise.
9593
9594 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9595
9596         * regcache.c (regcache_restore): Remove argument 2.  Replace
9597         argument 3 with regcache.  Get register status from
9598         src->register_status and get register contents from
9599         register_buffer (src, regnum).
9600         (regcache_cpy): Update.
9601
9602 2017-04-19  Pedro Alves  <palves@redhat.com>
9603
9604         * gdbthread.h (thread): Add missing closing parenthesis in
9605         comment.
9606
9607 2017-04-19  Pedro Alves  <palves@redhat.com>
9608
9609         * common/refcounted-object.h: New file.
9610         * gdbthread.h: Include "common/refcounted-object.h".
9611         (thread_info): Inherit from refcounted_object and add comments.
9612         (thread_info::incref, thread_info::decref)
9613         (thread_info::m_refcount): Delete.
9614         (thread_info::deletable): Use the refcounted_object::refcount()
9615         method.
9616         * inferior.c (current_inferior_): Add comment.
9617         (set_current_inferior): Increment/decrement refcounts.
9618         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9619         not-deletable instead of comparing with the current inferior.
9620         (initialize_inferiors): Increment the initial inferior's refcount.
9621         * inferior.h (struct inferior): Forward declare.
9622         Include "common/refcounted-object.h".
9623         (current_inferior, set_current_inferior): Move declaration to
9624         before struct inferior's definition, and fix comment.
9625         (inferior): Inherit from refcounted_object.  Add comments.
9626         * thread.c (switch_to_thread_no_regs): Reference the thread's
9627         inferior pointer directly instead of doing a ptid lookup.
9628         (switch_to_no_thread): New function.
9629         (switch_to_thread(thread_info *)): New function, factored out
9630         from ...
9631         (switch_to_thread(ptid_t)): ... this.
9632         (restore_current_thread): Delete.
9633         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9634         fields, and add 'inf' field.
9635         (do_restore_current_thread_cleanup): Check whether old->inf is
9636         alive instead of looking up an inferior by ptid.  Use
9637         switch_to_thread and switch_to_no_thread.
9638         (restore_current_thread_cleanup_dtor): Use old->inf directly
9639         instead of lookup up an inferior by id.  Decref the inferior.
9640         Don't restore 'removable'.
9641         (make_cleanup_restore_current_thread): Same the inferior pointer
9642         in old, instead of the inferior number.  Incref the inferior.
9643         Don't save/clear 'removable'.
9644
9645 2017-04-19  Pedro Alves  <palves@redhat.com>
9646
9647         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9648         unittests/scoped_restore-selftests.c.
9649         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9650         * common/scoped_restore.h (scoped_restore_base): Make "class".
9651         (scoped_restore_base::release): New public method.
9652         (scoped_restore_base::scoped_restore_base): New protected ctor.
9653         (scoped_restore_base::m_saved_var): New protected field.
9654         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9655         scoped_restore_base base class instead of m_saved_var directly.
9656         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9657         (scoped_restore_tmpl::scoped_restore_tmpl(const
9658         scoped_restore_tmpl<T>&)): Likewise.
9659         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9660         method.
9661         (scoped_restore_tmpl::saved_var): New method.
9662         (scoped_restore_tmpl::m_saved_var): Delete.
9663         * inferior.h (inferior::detaching): Now a bool.
9664         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9665         cleanup.
9666         * unittests/scoped_restore-selftests.c: New file.
9667
9668 2017-04-19  Pedro Alves  <palves@redhat.com>
9669
9670         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9671         Re-sort in alphabetic order.
9672
9673 2017-04-18  Pedro Alves  <palves@redhat.com>
9674
9675         * xml-support.c (obstack_xml_printf): Delete.
9676         * xml-support.h (obstack_xml_printf): Delete.
9677
9678 2017-04-18  Pedro Alves  <palves@redhat.com>
9679
9680         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9681         vdebug, verror, body_text, start_element, end_element, name,
9682         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9683         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9684         is_xinclude>: Make private and add m_ prefix.
9685         (gdb_xml_parser::body_text): New method, based on ...
9686         (gdb_xml_body_text): ... this.  Adjust.
9687         (gdb_xml_parser::vdebug): New method, based on ...
9688         (gdb_xml_debug): ... this.  Adjust.
9689         (gdb_xml_parser::verror): New method, based on ...
9690         (gdb_xml_error): ... this.  Adjust.
9691         (gdb_xml_parser::start_element): New method, based on ...
9692         (gdb_xml_start_element): ... this.  Adjust.
9693         (gdb_xml_start_element_wrapper): Defer to
9694         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9695         (gdb_xml_parser::end_element): New method, based on ...
9696         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9697         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9698         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9699         (gdb_xml_parser::use_dtd): New method, based on ...
9700         (gdb_xml_use_dtd): ... this.  Adjust.
9701         (gdb_xml_parser::parse): New method, based on ...
9702         (gdb_xml_parse): ... this.  Adjust.
9703         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9704         (xinclude_start_include): Adjust to call the parser's name method.
9705         (xml_xinclude_default, xml_xinclude_start_doctype)
9706         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9707         method.
9708         (xml_process_xincludes): Adjust to call parser methods.
9709         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9710         declarations.
9711
9712 2017-04-18  Pedro Alves  <palves@redhat.com>
9713
9714         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9715         gdb::optional<std::string>.
9716         * xml-support.c: Include <string>.
9717         (scope_level::scope_level(scope_level &&))
9718         (scope_level::~scope_level): Delete.
9719         (scope_level::body): Now a std::string.
9720         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9721         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9722         parameter.
9723         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9724         (xinclude_parsing_data::output): Now a std::string reference.
9725         (xinclude_start_include): Adjust.
9726         (xml_xinclude_default): Adjust.
9727         (xml_process_xincludes): Add 'output' parameter, and return bool.
9728         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9729         and return bool.
9730         * xml-tdesc.c: Include <unordered_map> and <string>.
9731         (tdesc_xml_cache): Delete.
9732         (tdesc_xml_cache_s): Delete.
9733         (xml_cache): Now an std::unordered_map.
9734         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9735         (target_fetch_description_xml): Change return type to
9736         gdb::optional<std::string>, and adjust.
9737         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9738         (target_fetch_description_xml): Change return type to
9739         gdb::optional<std::string>.
9740
9741 2017-04-18  Pedro Alves  <palves@redhat.com>
9742
9743         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9744         unittests/optional-selftests.c.
9745         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9746         * unittests/optional-selftests.c: New file.
9747         * unittests/optional/assignment/1.cc: New file.
9748         * unittests/optional/assignment/2.cc: New file.
9749         * unittests/optional/assignment/3.cc: New file.
9750         * unittests/optional/assignment/4.cc: New file.
9751         * unittests/optional/assignment/5.cc: New file.
9752         * unittests/optional/assignment/6.cc: New file.
9753         * unittests/optional/assignment/7.cc: New file.
9754         * unittests/optional/cons/copy.cc: New file.
9755         * unittests/optional/cons/default.cc: New file.
9756         * unittests/optional/cons/move.cc: New file.
9757         * unittests/optional/cons/value.cc: New file.
9758         * unittests/optional/in_place.cc: New file.
9759         * unittests/optional/observers/1.cc: New file.
9760         * unittests/optional/observers/2.cc: New file.
9761
9762 2017-04-18  Pedro Alves  <palves@redhat.com>
9763
9764         * common/gdb_optional.h: Include common/traits.h.
9765         (in_place_t): New type.
9766         (in_place): New constexpr variable.
9767         (optional::optional): Remove member initialization of
9768         m_instantiated.
9769         (optional::optional(in_place_t...)): New constructor.
9770         (optional::~optional): Use reset.
9771         (optional::optional(const optional&)): New.
9772         (optional::optional(const optional&&)): New.
9773         (optional::optional(T &)): New.
9774         (optional::optional(T &&)): New.
9775         (operator::operator=(const optional &)): New.
9776         (operator::operator=(optional &&)): New.
9777         (operator::operator= (const T &))
9778         (operator::operator= (T &&))
9779         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9780         (operator::reset): New.
9781         (operator::m_instantiated):: Add in-class initializer.
9782         * common/traits.h: Include <type_traits>.
9783         (struct And): New types.
9784
9785 2017-04-18  Pedro Alves  <palves@redhat.com>
9786
9787         * xml-support.c: Include <vector>.
9788         (scope_level::scope_level(const gdb_xml_element *))
9789         (scope_level::scope_level(scope_level&&)): New.
9790         (scope_level::~scope_level): New.
9791         (scope_level_s): Delete.
9792         (gdb_xml_parser::scopes): Now a std::vector.
9793         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9794         Use std::vector.
9795         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9796         scope cleanup code.
9797         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9798         of the scopes member.  Use std::vector::emplace_back.
9799
9800 2017-04-18  Pedro Alves  <palves@redhat.com>
9801
9802         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9803         a bool.
9804         (gdb_xml_end_element): Change type of first parameter.
9805         (gdb_xml_cleanup): Rename to ...
9806         (gdb_xml_parser::~gdb_xml_parser): ... this.
9807         (gdb_xml_create_parser_and_cleanup): Delete with ...
9808         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9809         to this new ctor.
9810         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9811         using gdb_xml_create_parser_and_cleanup.
9812         (xinclude_parsing_data): Add ctor/dtor.
9813         (xml_xinclude_cleanup): Delete.
9814         (xml_process_xincludes): Create a local xinclude_parsing_data
9815         instead of heap-allocating one.  Create a local gdb_xml_parser
9816         instead of heap-allocating one with
9817         gdb_xml_create_parser_and_cleanup.
9818
9819 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9820
9821         PR threads/20743
9822         * fbsd-nat.c (resume_one_thread_cb): Remove.
9823         (resume_all_threads_cb): Remove.
9824         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9825         iterate_over_threads.
9826
9827 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9828
9829         * NEWS: Create a new section for the next release branch.
9830         Rename the section of the current branch, now that it has
9831         been cut.
9832
9833 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9834
9835         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9836         * version.in: Bump version to 8.0.50.DATE-git.
9837
9838 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9839
9840         PR gdb/21385
9841         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9842         independently of the host, and fix build breakage on Cygwin.
9843
9844 2017-04-13  Pedro Alves  <palves@redhat.com>
9845
9846         * inferior.c (free_inferior): Convert to ...
9847         (inferior::~inferior): ... this dtor.
9848         (inferior::inferior): New ctor, factored out from ...
9849         (add_inferior_silent): ... here.  Allocate the inferior with a new
9850         expression.
9851         (delete_inferior): Call delete instead of free_inferior.
9852         * inferior.h (gdb_environ, continuation): Forward declare.
9853         (inferior): Now a class.  Add in-class initialization to all
9854         members.  Make boolean fields bool, except 'detaching'.
9855         (inferior::inferior): New explicit ctor.
9856         (inferior::~inferior): New.
9857
9858 2017-04-13  Pedro Alves  <palves@redhat.com>
9859
9860         * inferior.c (init_inferior_list): Delete.
9861         * inferior.h (init_inferior_list): Delete.
9862
9863 2017-04-13  Pedro Alves  <palves@redhat.com>
9864
9865         PR threads/13217
9866         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9867         (top level): Call it twice, with different thread sets.
9868
9869 2017-04-13  Pedro Alves  <palves@redhat.com>
9870
9871         * thread.c: Include <algorithm>.
9872         (thread_array_cleanup): Delete.
9873         (scoped_inc_dec_ref): New class.
9874         (live_threads_count): New function.
9875         (set_thread_refcount): Delete.
9876         (tp_array_compar_ascending): Now a bool.
9877         (tp_array_compar): Convert to a std::sort comparison function.
9878         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9879         and live_threads_count.
9880
9881 2017-04-13  Pedro Alves  <palves@redhat.com>
9882
9883         * infrun.c (follow_fork_inferior): Also switch the current
9884         inferior.
9885
9886 2017-04-13  Pedro Alves  <palves@redhat.com>
9887
9888         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9889         before calling create_internal_breakpoint.
9890
9891 2017-04-13  Pedro Alves  <palves@redhat.com>
9892
9893         * fork-child.c (execv_argv): New class.
9894         (breakup_args): Refactored as ...
9895         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9896         Copy arguments to storage and replace separators with NULL
9897         terminators in place.
9898         (escape_bang_in_quoted_argument): Adjust to return bool.
9899         (execv_argv::execv_argv): New ctor.
9900         (execv_argv::init_for_shell): New method, factored out from
9901         fork_inferior.  Don't strdup strings into the vector.
9902         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9903         Remove free_vector_argv call.
9904
9905 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9906
9907         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9908         tdep->rx_psw_type.
9909
9910 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9911
9912         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9913         * rx-tdep.c (rx_gdbarch_init): Likewise.
9914
9915 2017-04-13  Pedro Alves  <palves@redhat.com>
9916
9917         * breakpoint.h (struct breakpoint): Reindent.
9918
9919 2017-04-13  Pedro Alves  <palves@redhat.com>
9920
9921         * breakpoint.c (bp_location): Rename to ...
9922         (bp_locations): ... this.  All references updated.
9923         (bp_location_count): Rename to ...
9924         (bp_locations_count): ... this.  All references updated.
9925         (bp_location_placed_address_before_address_max): Rename to ...
9926         (bp_locations_placed_address_before_address_max): ... this.  All
9927         references updated.
9928         (bp_location_shadow_len_after_address_max): Rename to ...
9929         (bp_locations_shadow_len_after_address_max): ... this.  All
9930         references updated.
9931         (bp_location_compare_addrs): Rename to ...
9932         (bp_locations_compare_addrs): ... this.  All references updated.
9933         (bp_location_compare):Rename to ...
9934         (bp_locations_compare): ... this.  All references updated.
9935         (bp_location_target_extensions_update): Rename to ...
9936         (bp_locations_target_extensions_update): ... this.  All references
9937         updated.
9938
9939 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9940
9941         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9942         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9943         'sgtty.h'.
9944         * common/gdb_termios.h: New file, with parts of "terminal.h".
9945         * inflow.c: Include "gdb_termios.h".
9946         * ser-unix.c: Include "gdb_termios.h".
9947         * terminal.h: Move terminal-related defines to
9948         "common/gdb_termios.h".
9949
9950 2017-04-12  Tom Tromey  <tom@tromey.com>
9951
9952         * probe.c (parse_probes): Update.
9953         * location.h (delete_event_location): Don't declare.
9954         (event_location_deleter::operator()): Update.
9955         * location.c (event_location_deleter::operator()): Rename from
9956         delete_event_location.
9957         * linespec.h (linespec_result) <location>: Change type to
9958         event_location_up.
9959         * linespec.c (canonicalize_linespec, event_location_to_sals)
9960         (decode_objc): Update.
9961         (linespec_result): Don't call delete_event_location.
9962         * breakpoint.c (create_breakpoints_sal)
9963         (bkpt_probe_create_sals_from_location)
9964         (strace_marker_create_sals_from_location): Update.
9965
9966 2017-04-12  Tom Tromey  <tom@tromey.com>
9967
9968         * linespec.h (struct linespec_result): Add constructor and
9969         destructor.
9970         (init_linespec_result, destroy_linespec_result)
9971         (make_cleanup_destroy_linespec_result): Don't declare.
9972         * linespec.c (init_linespec_result): Remove.
9973         (linespec_result::~linespec_result): Rename from
9974         destroy_linespec_result.  Update.
9975         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9976         Remove.
9977         * breakpoint.c (create_breakpoint, break_range_command)
9978         (decode_location_default): Update.
9979         * ax-gdb.c (agent_command_1): Update.
9980
9981 2017-04-12  Tom Tromey  <tom@tromey.com>
9982
9983         * remote.c (remote_download_tracepoint): Update.
9984         * python/py-breakpoint.c (bppy_get_location): Update.
9985         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9986         (gdbscm_breakpoint_location): Update.
9987         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9988         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9989         Change type to event_location_up.
9990         * breakpoint.c (create_overlay_event_breakpoint)
9991         (create_longjmp_master_breakpoint)
9992         (create_std_terminate_master_breakpoint)
9993         (create_exception_master_breakpoint)
9994         (breakpoint_event_location_empty_p, print_breakpoint_location)
9995         (print_one_breakpoint_location, create_thread_event_breakpoint)
9996         (init_breakpoint_sal, create_breakpoint)
9997         (print_recreate_ranged_breakpoint, break_range_command)
9998         (init_ada_exception_breakpoint, say_where): Update.
9999         (base_breakpoint_dtor): Don't call delete_event_location.
10000         (bkpt_print_recreate, tracepoint_print_recreate)
10001         (dprintf_print_recreate, update_static_tracepoint)
10002         (breakpoint_re_set_default): Update.
10003
10004 2017-04-12  Tom Tromey  <tom@tromey.com>
10005
10006         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10007         type of "to_do".  Update.
10008         (compute_stack_depth): Use std::vector.
10009
10010 2017-04-12  Tom Tromey  <tom@tromey.com>
10011
10012         * printcmd.c (find_instruction_backward): Use std::vector.
10013
10014 2017-04-12  Tom Tromey  <tom@tromey.com>
10015
10016         * symfile.c (objfilep): Remove typedef.
10017         (reread_symbols): Use a std::vector.
10018
10019 2017-04-12  Tom Tromey  <tom@tromey.com>
10020
10021         * mi/mi-main.c (exec_direction_forward): Remove.
10022         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10023         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10024         scoped_restore.
10025         * guile/guile.c (guile_repl_command, guile_command)
10026         (gdbscm_execute_gdb_command): Use scoped_restore.
10027         * go-exp.y (go_parse): Use scoped_restore.
10028         * d-exp.y (d_parse): Use scoped_restore.
10029         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10030         * c-exp.y (c_parse): Use scoped_restore.
10031
10032 2017-04-12  Tom Tromey  <tom@tromey.com>
10033
10034         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10035         (mi_parse): Update return type.
10036         (mi_parse_free): Remove.
10037         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10038         (mi_parse::~mi_parse): Rename from mi_parse_free.
10039         (mi_parse_cleanup): Remove.
10040         (mi_parse): Return a unique_ptr.  Use new.
10041         * mi/mi-main.c (mi_execute_command): Update.
10042
10043 2017-04-12  Tom Tromey  <tom@tromey.com>
10044
10045         * location.c (explicit_location_lex_one): Return a
10046         unique_xmalloc_ptr.
10047         (string_to_explicit_location): Update.  Remove cleanups.
10048
10049 2017-04-12  Tom Tromey  <tom@tromey.com>
10050
10051         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10052         (compare_value_and_voffset): Change type.  Update.
10053         (compute_vtable_size): Change type of "offset_vec".
10054         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10055         (gnuv3_get_typeid): Remove extraneous declaration.
10056
10057 2017-04-12  Tom Tromey  <tom@tromey.com>
10058
10059         * charset.h (wchar_iterator): Fix comment.
10060
10061 2017-04-12  Tom Tromey  <tom@tromey.com>
10062
10063         * charset.c (iconv_wrapper): New class.
10064         (cleanup_iconv): Remove.
10065         (convert_between_encodings): Use it.
10066
10067 2017-04-12  Tom Tromey  <tom@tromey.com>
10068
10069         * symfile.h (increment_reading_symtab): Update type.
10070         * symfile.c (decrement_reading_symtab): Remove.
10071         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10072         * psymtab.c (psymtab_to_symtab): Update.
10073         * dwarf2read.c (dw2_instantiate_symtab): Update.
10074
10075 2017-04-12  Tom Tromey  <tom@tromey.com>
10076
10077         * jit.c (struct jit_reader): Declare separately.  Add constructor
10078         and destructor.  Change type of "handle".
10079         (loaded_jit_reader): Define separately.
10080         (jit_reader_load): Update.  New "new".
10081         (jit_reader_unload_command): Use "delete".
10082         * gdb-dlfcn.h (struct dlclose_deleter): New.
10083         (gdb_dlhandle_up): New typedef.
10084         (gdb_dlopen, gdb_dlsym): Update types.
10085         (gdb_dlclose): Remove.
10086         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10087         (gdb_dlsym): Change type of "handle".
10088         (make_cleanup_dlclose): Remove.
10089         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10090         * compile/compile-c-support.c (load_libcc): Update.
10091
10092 2017-04-12  Tom Tromey  <tom@tromey.com>
10093
10094         * symtab.h (find_pcs_for_symtab_line): Change return type.
10095         * symtab.c (find_pcs_for_symtab_line): Change return type.
10096         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10097         type of "vec".  Update.
10098         (ltpy_get_pcs_for_line): Update.
10099         * linespec.c (decode_digits_ordinary): Update.
10100
10101 2017-04-12  Tom Tromey  <tom@tromey.com>
10102
10103         * tracepoint.c (actions_command): Update.
10104         * python/python.c (python_command, python_interactive_command):
10105         Update.
10106         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10107         * guile/guile.c (guile_command): Update.
10108         * defs.h (read_command_lines, read_command_lines_1): Return
10109         command_line_up.
10110         (command_lines_deleter): New struct.
10111         (command_line_up): New typedef.
10112         * compile/compile.c (compile_code_command)
10113         (compile_print_command): Update.
10114         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10115         command_line_up.
10116         (make_cleanup_free_command_lines): Remove.
10117         * cli/cli-script.c (get_command_line, read_command_lines_1)
10118         (copy_command_lines): Return command_line_up.
10119         (while_command, if_command, read_command_lines, define_command)
10120         (document_command): Update.
10121         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10122         Remove.
10123         * breakpoint.h (breakpoint_set_commands): Change type of
10124         "commands".
10125         * breakpoint.c (breakpoint_set_commands): Change type of
10126         "commands".  Update.
10127         (do_map_commands_command, update_dprintf_command_list)
10128         (create_tracepoint_from_upload): Update.
10129
10130 2017-04-12  Tom Tromey  <tom@tromey.com>
10131
10132         * tracepoint.c (scope_info): Update.
10133         * spu-tdep.c (spu_catch_start): Update.
10134         * python/python.c (gdbpy_decode_line): Update.
10135         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10136         * python/py-breakpoint.c (bppy_init): Update.
10137         * probe.c (parse_probes): Update.
10138         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10139         * location.h (event_location_deleter): New struct.
10140         (event_location_up): New typedef.
10141         (new_linespec_location, new_address_location, new_probe_location)
10142         (new_explicit_location, copy_event_location)
10143         (string_to_event_location, string_to_event_location_basic)
10144         (string_to_explicit_location): Update return type.
10145         (make_cleanup_delete_event_location): Remove.
10146         * location.c (new_linespec_location, new_address_location)
10147         (new_probe_location, new_explicit_location, copy_event_location):
10148         Return event_location_up.
10149         (delete_event_location_cleanup)
10150         (make_cleanup_delete_event_location): Remove.
10151         (string_to_explicit_location, string_to_event_location_basic)
10152         (string_to_event_location): Return event_location_up.
10153         * linespec.c (canonicalize_linespec, event_location_to_sals)
10154         (decode_line_with_current_source)
10155         (decode_line_with_last_displayed, decode_objc): Update.
10156         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10157         * completer.c (location_completer): Update.
10158         * cli/cli-cmds.c (edit_command, list_command): Update.
10159         * breakpoint.c (create_overlay_event_breakpoint)
10160         (create_longjmp_master_breakpoint)
10161         (create_std_terminate_master_breakpoint)
10162         (create_exception_master_breakpoint)
10163         (create_thread_event_breakpoint): Update.
10164         (init_breakpoint_sal): Update.  Remove some dead code.
10165         (create_breakpoint_sal): Change type of "location".  Update.
10166         (create_breakpoints_sal, create_breakpoint, break_command_1)
10167         (dprintf_command, break_range_command, until_break_command)
10168         (init_ada_exception_breakpoint)
10169         (strace_marker_create_sals_from_location)
10170         (update_static_tracepoint, trace_command, ftrace_command)
10171         (strace_command, create_tracepoint_from_upload): Update.
10172         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10173         * ax-gdb.c (agent_command_1): Update.
10174
10175 2017-04-12  Pedro Alves  <palves@redhat.com>
10176
10177         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10178         * configure.tgt: Handle i[34567]86-*-go32* and
10179         i[34567]86-*-msdosdjgpp*.
10180         * i386-tdep.c (i386_svr4_reg_to_regnum):
10181         Make extern.
10182         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10183         i386-go32-tdep.c.
10184         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10185         * i386-go32-tdep.c: New file.
10186         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10187         declarations.
10188
10189 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10190
10191         * aix-thread.c (pd_status2str): Change return type to const char *.
10192
10193 2017-04-12  Pedro Alves  <palves@redhat.com>
10194
10195         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10196         calls to set_gdbarch_gnu_triplet_regexp.
10197
10198 2017-04-12  Pedro Alves  <palves@redhat.com>
10199
10200         PR gdb/21323
10201         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10202         New enum value.
10203         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10204         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10205         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10206         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10207         * gdbarch.h, gdbarch.c: Regenerate.
10208         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10209         gdbarch_wchar_bit and gdbarch_wchar_signed.
10210         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10211         * arm-tdep.c (arm_gdbarch_init): Likewise.
10212         * avr-tdep.c (avr_gdbarch_init): Likewise.
10213         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10214         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10215         * i386-tdep.c (i386_go32_init_abi): Likewise.
10216         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10217         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10218         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10219         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10220         * sh-tdep.c (sh_gdbarch_init): Likewise.
10221         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10222         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10223         * windows-tdep.c (windows_init_abi): Likewise.
10224         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10225
10226 2017-04-12  Pedro Alves  <palves@redhat.com>
10227
10228         PR c++/21323
10229         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10230         cplus_primitive_type_char32_t>: New enum values.
10231         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10232         and cplus_primitive_type_char32_t.
10233         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10234         32, use the archtecture's built-in type for char16_t and char32_t,
10235         respectively.  Otherwise, fallback to init_integer_type as before,
10236         but make the type unsigned, and issue a complaint.
10237         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10238
10239 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10240
10241         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10242         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10243
10244 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10245
10246         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10247         'const char *'.
10248
10249 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10250
10251         * common/common-utils.c (free_vector_argv): New function.
10252         * common/common-utils.h: Include <vector>.
10253         (free_vector_argv): New prototype.
10254         * darwin-nat.c (darwin_create_inferior): Rewrite function
10255         prototype in order to constify "exec_file" and accept a
10256         "std::string" for "allargs".
10257         * fork-child.c: Include <vector>.
10258         (breakup_args): Rewrite function, using C++.
10259         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10260         and accept "std::string" for "allargs".  Update the code to
10261         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10262         and "execvp".
10263         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10264         order to constify "exec_file" and accept a "std::string" for
10265         "allargs".
10266         * go32-nat.c (go32_create_inferior): Likewise.
10267         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10268         * infcmd.c (run_command_1): Constify "exec_file".  Use
10269         "std::string" for inferior arguments.
10270         * inferior.h (fork_inferior): Update prototype.
10271         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10272         prototype in order to constify "exec_file" and accept a
10273         "std::string" for "allargs".
10274         * nto-procfs.c (procfs_create_inferior): Likewise.
10275         * procfs.c (procfs_create_inferior): Likewise.
10276         * remote-sim.c (gdbsim_create_inferior): Likewise.
10277         * remote.c (extended_remote_run): Update code to accept
10278         "std::string" as argument.
10279         (extended_remote_create_inferior): Rewrite function prototype in
10280         order to constify "exec_file" and accept a "std::string" for
10281         "allargs".
10282         * rs6000-nat.c (super_create_inferior): Likewise.
10283         (rs6000_create_inferior): Likewise.
10284         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10285         * windows-nat.c (windows_create_inferior): Likewise.
10286
10287 2017-04-11  Pedro Alves  <palves@redhat.com>
10288
10289         * thread.c: Fix whitespace throughout.
10290
10291 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10292
10293         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10294
10295 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10296
10297         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10298
10299 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10300
10301         PR gdb/21364
10302         * osdata.c (info_osdata): Check if 'type' is an empty string
10303         instead of NULL.
10304
10305 2017-04-10  Pedro Alves  <palves@redhat.com>
10306
10307         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10308         (ptid_to_global_thread_id, in_thread_list)
10309         (do_captured_list_thread_ids, set_resumed, set_running)
10310         (set_executing, set_stop_requested, finish_thread_state)
10311         (validate_registers_access, can_access_registers_ptid)
10312         (print_thread_info_1, switch_to_thread)
10313         (do_restore_current_thread_cleanup)
10314         (make_cleanup_restore_current_thread, thread_command)
10315         (thread_name_command): Use operator== instead of ptid_equal.
10316
10317 2017-04-10  Pedro Alves  <palves@redhat.com>
10318
10319         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10320         (current_thread_cleanup_chain): Delete.
10321         (restore_current_thread_cleanup_dtor)
10322         (make_cleanup_restore_current_thread): Remove references to
10323         current_thread_cleanup_chain.
10324
10325 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10326
10327         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10328         REG_UNKNOWN.
10329
10330 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10331
10332         PR gdb/19942
10333         * gdbthread.h (thread_info::deletable): New method.
10334         (thread_info::incref): New method.
10335         (thread_info::decref): New method.
10336         (thread_info::refcount): Move it to private.
10337         * infrun.c (save_stop_context): Call inc_refcount.
10338         (release_stop_context_cleanup): Likewise.
10339         * thread.c (set_thread_exited): New function.
10340         (init_thread_list): Delete "tp" only it is deletable, otherwise
10341         call set_thread_exited.
10342         (delete_thread_1): Call set_thread_exited.
10343         (current_thread_cleanup) <inferior_pid>: Remove.
10344         <thread>: New field.
10345         (restore_current_thread_ptid_changed): Removed.
10346         (do_restore_current_thread_cleanup): Adjust.
10347         (restore_current_thread_cleanup_dtor): Don't call
10348         find_thread_ptid.
10349         (set_thread_refcount): Use dec_refcount.
10350         (make_cleanup_restore_current_thread): Adjust.
10351         (thread_apply_all_command): Call inc_refcount.
10352         (_initialize_thread): Don't call
10353         observer_attach_thread_ptid_changed.
10354
10355 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10356
10357         * thread.c (delete_thread_1): Hoist code on marking thread as
10358         exited.
10359
10360 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10361
10362         * windows-nat.c (windows_detach): Initialize ptid with
10363         minus_one_ptid.
10364
10365 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10366
10367         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10368
10369 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10370
10371         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10372         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10373         (bfin_pseudo_register_write): Likewise
10374
10375 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10376
10377         * common/ptid.h (struct ptid): Change to...
10378         (class ptid_t): ... this.
10379         <ptid_t>: New constructors.
10380         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10381         matches>: New methods.
10382         <make_null, make_minus_one>: New static methods.
10383         <pid>: Rename to...
10384         <m_pid>: ...this.
10385         <lwp>: Rename to...
10386         <m_lwp>: ...this.
10387         <tid>: Rename to...
10388         <m_tid>: ...this.
10389         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10390         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10391         as references, move comment to class ptid_t.
10392         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10393         ptid_t static methods.
10394         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10395         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10396         Take ptid arguments as references, implement using ptid_t methods.
10397         * unittests/ptid-selftests.c: New file.
10398         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10399         unittests/ptid-selftests.c.
10400         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10401
10402 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10403
10404         * python/python.c (python_run_simple_file): Cast mode literal to
10405         non-const char pointer as expected by PyFile_FromString.
10406
10407 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10408
10409         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10410         minus_one_ptid and null_ptid.
10411
10412 2017-04-05  Pedro Alves  <palves@redhat.com>
10413
10414         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10415         * configure: Regenerate.
10416
10417 2017-04-05  Pedro Alves  <palves@redhat.com>
10418
10419         * ada-exp.y (yyerror): Constify.
10420         * ada-lang.c (bound_name, get_selections)
10421         (ada_variant_discrim_type)
10422         (ada_variant_discrim_name, ada_value_struct_elt)
10423         (ada_lookup_struct_elt_type, is_unchecked_variant)
10424         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10425         (catch_ada_exception_command_split)
10426         (catch_ada_assert_command_split, catch_assert_command)
10427         (ada_op_name): Constify.
10428         * ada-lang.h (ada_yyerror, get_selections)
10429         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10430         * arc-tdep.c (arc_print_frame_cache): Constify.
10431         * arm-tdep.c (arm_skip_stub): Constify.
10432         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10433         (gen_aggregate_elt_ref): Constify.
10434         * bcache.c (print_bcache_statistics): Constify.
10435         * bcache.h (print_bcache_statistics): Constify.
10436         * break-catch-throw.c (catch_exception_command_1):
10437         * breakpoint.c (struct ep_type_description::description):
10438         Constify.
10439         (add_solib_catchpoint): Constify.
10440         (catch_fork_command_1): Add cast.
10441         (add_catch_command): Constify.
10442         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10443         Constify.
10444         * bsd-uthread.c (bsd_uthread_state): Constify.
10445         * buildsym.c (patch_subfile_names): Constify.
10446         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10447         Constify.
10448         * c-exp.y (yyerror): Constify.
10449         (token::oper): Constify.
10450         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10451         * c-varobj.c (cplus_describe_child): Constify.
10452         * charset.c (find_charset_names): Add cast.
10453         (find_charset_names): Constify array and add const_cast.
10454         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10455         (edit_command): Constify.
10456         * cli/cli-decode.c (lookup_cmd): Constify.
10457         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10458         Constify.
10459         (struct dump_context): Constify.
10460         (add_dump_command, restore_command): Constify.
10461         * cli/cli-script.c (get_command_line): Constify.
10462         * cli/cli-script.h (get_command_line): Constify.
10463         * cli/cli-utils.c (check_for_argument): Constify.
10464         * cli/cli-utils.h (check_for_argument): Constify.
10465         * coff-pe-read.c (struct read_pe_section_data): Constify.
10466         * command.h (lookup_cmd): Constify.
10467         * common/print-utils.c (decimal2str): Constify.
10468         * completer.c (gdb_print_filename): Constify.
10469         * corefile.c (set_gnutarget): Constify.
10470         * cp-name-parser.y (yyerror): Constify.
10471         * cp-valprint.c (cp_print_class_member): Constify.
10472         * cris-tdep.c (cris_register_name, crisv32_register_name):
10473         Constify.
10474         * d-exp.y (yyerror): Constify.
10475         (struct token::oper): Constify.
10476         * d-lang.h (d_yyerror): Constify.
10477         * dbxread.c (struct header_file_location::name): Constify.
10478         (add_old_header_file, add_new_header_file, last_function_name)
10479         (dbx_next_symbol_text, add_bincl_to_list)
10480         (find_corresponding_bincl_psymtab, set_namestring)
10481         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10482         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10483         * defs.h (command_line_input, print_address_symbolic)
10484         (deprecated_readline_begin_hook): Constify.
10485         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10486         Constify.
10487         * event-top.c (handle_line_of_input): Constify and add cast.
10488         * exceptions.c (catch_errors): Constify.
10489         * exceptions.h (catch_errors): Constify.
10490         * expprint.c (print_subexp_standard, op_string, op_name)
10491         (op_name_standard, dump_raw_expression, dump_raw_expression):
10492         * expression.h (op_name, op_string, dump_raw_expression):
10493         Constify.
10494         * f-exp.y (yyerror): Constify.
10495         (struct token::oper): Constify.
10496         (struct f77_boolean_val::name): Constify.
10497         * f-lang.c (f_word_break_characters): Constify.
10498         * f-lang.h (f_yyerror): Constify.
10499         * fork-child.c (fork_inferior): Add cast.
10500         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10501         (new_variant): Constify.
10502         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10503         * gdbarch.c: Regenerate.
10504         * gdbcore.h (set_gnutarget): Constify.
10505         * go-exp.y (yyerror): Constify.
10506         (token::oper): Constify.
10507         * go-lang.h (go_yyerror): Constify.
10508         * go32-nat.c (go32_sysinfo): Constify.
10509         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10510         * guile/scm-cmd.c (cmdscm_function): Constify.
10511         * guile/scm-param.c (pascm_param_value): Constify.
10512         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10513         (h8300sx_register_name): Constify.
10514         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10515         Constify.
10516         * ia64-tdep.c (ia64_register_names): Constify.
10517         * infcmd.c (construct_inferior_arguments): Constify.
10518         (path_command, attach_post_wait): Constify.
10519         * language.c (show_range_command, show_case_command)
10520         (unk_lang_error): Constify.
10521         * language.h (language_defn::la_error)
10522         (language_defn::la_name_of_this): Constify.
10523         * linespec.c (decode_line_2): Constify.
10524         * linux-thread-db.c (thread_db_err_str): Constify.
10525         * lm32-tdep.c (lm32_register_name): Constify.
10526         * m2-exp.y (yyerror): Constify.
10527         * m2-lang.h (m2_yyerror): Constify.
10528         * m32r-tdep.c (m32r_register_names): Constify and make static.
10529         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10530         * m88k-tdep.c (m88k_register_name): Constify.
10531         * macroexp.c (appendmem): Constify.
10532         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10533         (upgrade_type, parse_external, parse_partial_symbols)
10534         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10535         (new_symbol): Constify.
10536         * memattr.c (mem_info_command): Constify.
10537         * mep-tdep.c (register_name_from_keyword): Constify.
10538         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10539         Constify.
10540         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10541         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10542         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10543         cast.
10544         (mi_execute_async_cli_command): Constify.
10545         * mips-tdep.c (mips_register_name): Constify.
10546         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10547         (am33_register_name, am33_2_register_name)
10548         * moxie-tdep.c (moxie_register_names): Constify.
10549         * nat/linux-osdata.c (osdata_type): Constify fields.
10550         * nto-tdep.c (nto_parse_redirection): Constify.
10551         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10552         (lookup_child_selector): Constify.
10553         (objc_methcall::name): Constify.
10554         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10555         (lookup_struct_typedef): Constify.
10556         * objfiles.c (pc_in_section): Constify.
10557         * objfiles.h (pc_in_section): Constify.
10558         * p-exp.y (struct token::oper): Constify.
10559         (yyerror): Constify.
10560         * p-lang.h (pascal_yyerror): Constify.
10561         * parser-defs.h (op_name_standard): Constify.
10562         (op_print::string): Constify.
10563         (exp_descriptor::op_name): Constify.
10564         * printcmd.c (print_address_symbolic): Constify.
10565         * psymtab.c (print_partial_symbols): Constify.
10566         * python/py-breakpoint.c (stop_func): Constify.
10567         (bppy_get_expression): Constify.
10568         * python/py-cmd.c (cmdpy_completer::name): Constify.
10569         (cmdpy_function): Constify.
10570         * python/py-event.c (evpy_add_attribute)
10571         (gdbpy_initialize_event_generic): Constify.
10572         * python/py-event.h (evpy_add_attribute)
10573         (gdbpy_initialize_event_generic): Constify.
10574         * python/py-evts.c (add_new_registry): Constify.
10575         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10576         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10577         * python/py-inferior.c (get_buffer): Add cast.
10578         * python/py-param.c (parm_constant::name): Constify.
10579         * python/py-unwind.c (fprint_frame_id): Constify.
10580         * python/python.c (gdbpy_parameter_value): Constify.
10581         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10582         * remote.c (memory_packet_config::name): Constify.
10583         (show_packet_config_cmd, remote_write_bytes)
10584         (remote_buffer_add_string):
10585         * reverse.c (exec_reverse_once): Constify.
10586         * rs6000-tdep.c (variant::name, variant::description): Constify.
10587         * rust-exp.y (rustyyerror): Constify.
10588         * rust-lang.c (rust_op_name): Constify.
10589         * rust-lang.h (rustyyerror): Constify.
10590         * serial.h (serial_ops::name): Constify.
10591         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10592         (sh_sh3e_register_name, sh_sh2e_register_name)
10593         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10594         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10595         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10596         (sh_sh4al_dsp_register_name): Constify.
10597         * sh64-tdep.c (sh64_register_name): Constify.
10598         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10599         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10600         * stabsread.c (patch_block_stabs, read_type_number)
10601         (ref_map::stabs, ref_add, process_reference)
10602         (symbol_reference_defined, define_symbol, define_symbol)
10603         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10604         (read_one_struct_field, read_struct_fields, read_baseclasses)
10605         (read_tilde_fields, read_struct_type, read_array_type)
10606         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10607         (read_huge_number, read_range_type, read_args, common_block_start)
10608         (find_name_end): Constify.
10609         * stabsread.h (common_block_start, define_symbol)
10610         (process_one_symbol, symbol_reference_defined, ref_add):
10611         * symfile.c (get_section_index, add_symbol_file_command):
10612         * symfile.h (get_section_index): Constify.
10613         * target-descriptions.c (tdesc_type::name): Constify.
10614         (tdesc_free_type): Add cast.
10615         * target.c (find_default_run_target):
10616         (add_deprecated_target_alias, find_default_run_target)
10617         (target_announce_detach): Constify.
10618         (do_option): Constify.
10619         * target.h (add_deprecated_target_alias): Constify.
10620         * thread.c (print_thread_info_1): Constify.
10621         * top.c (deprecated_readline_begin_hook, command_line_input):
10622         Constify.
10623         (init_main): Add casts.
10624         * top.h (handle_line_of_input): Constify.
10625         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10626         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10627         (tfind_command): Rename to ...
10628         (tfind_command_1): ... this and constify.
10629         (tfind_command): New function.
10630         (tfind_end_command, tfind_start_command): Adjust.
10631         (encode_source_string): Constify.
10632         * tracepoint.h (encode_source_string): Constify.
10633         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10634         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10635         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10636         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10637         * tui/tui-win.c (parse_scrolling_args): Constify.
10638         * tui/tui-windata.c (tui_erase_data_content): Constify.
10639         * tui/tui-windata.h (tui_erase_data_content): Constify.
10640         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10641         * tui/tui.c (tui_enable): Add cast.
10642         * utils.c (defaulted_query): Constify.
10643         (init_page_info): Add cast.
10644         (puts_debug, subset_compare): Constify.
10645         * utils.h (subset_compare): Constify.
10646         * varobj.c (varobj_format_string): Constify.
10647         * varobj.h (varobj_format_string): Constify.
10648         * vax-tdep.c (vax_register_name): Constify.
10649         * windows-nat.c (windows_detach): Constify.
10650         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10651         * xml-support.c (gdb_xml_end_element): Constify.
10652         * xml-tdesc.c (tdesc_start_reg): Constify.
10653         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10654         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10655         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10656
10657 2017-04-05  Pedro Alves  <palves@redhat.com>
10658
10659         * proc-api.c (struct trans): Constify.
10660         (procfs_note): Constify.
10661         * proc-events.c (struct trans, syscall_table):
10662         * proc-flags.c (struct trans): Constify.
10663         * proc-utils.h (procfs_note): Constify.
10664         * proc-why.c (struct trans): Constify.
10665         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10666         (procfs_detach): Constify.
10667         * sol-thread.c (struct string_map): Constify.
10668         (td_err_string, td_state_string): Constify.
10669
10670 2017-04-05  Pedro Alves  <palves@redhat.com>
10671
10672         * proc-api.c (procfs_filename): Don't initialize
10673         procfs_filename.
10674         (prepare_to_trace): Assume procfs_filename is non-NULL.
10675         (_initialize_proc_api): Give procfs_filename a default value here.
10676
10677 2017-04-05  Pedro Alves  <palves@redhat.com>
10678
10679         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10680         'cond_string' parameter.
10681         (extract_exception_regexp): Constify 'string' parameter.
10682         (catch_exception_command_1): Constify.
10683         * breakpoint.c (init_catchpoint)
10684         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10685         parameter.
10686         (ep_parse_optional_if_clause, catch_fork_command_1)
10687         (catch_exec_command_1): Constify.
10688         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10689         parameter.
10690         (ep_parse_optional_if_clause): Constify.
10691         * cli/cli-utils.c (remove_trailing_whitespace)
10692         (check_for_argument): Constify.
10693         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10694         non-const overload.
10695         (check_for_argument): Likewise.
10696
10697 2017-04-05  Pedro Alves  <palves@redhat.com>
10698
10699         * event-top.c (command_line_handler): Add cast to execute_command
10700         call.
10701         * record-btrace.c (cmd_record_btrace_bts_start)
10702         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10703         (cmd_record_btrace_start): Add cast to execute_command call.
10704         * record-full.c (record_full_goto_insn):
10705         * record.c (record_start, record_stop): Add cast to
10706         execute_command_to_string calls.
10707         (cmd_record_start): Add cast to execute_command calls.
10708
10709 2017-04-05  Pedro Alves  <palves@redhat.com>
10710
10711         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10712         static inline function.
10713         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10714         array and use gdb_PyArg_ParseTupleAndKeywords.
10715         * python/py-cmd.c (cmdpy_init): Likewise.
10716         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10717         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10718         (infpy_search_memory): Likewise.
10719         * python/py-objfile.c (objfpy_add_separate_debug_file)
10720         (gdbpy_lookup_objfile): Likewise.
10721         * python/py-symbol.c (gdbpy_lookup_symbol)
10722         (gdbpy_lookup_global_symbol): Likewise.
10723         * python/py-type.c (gdbpy_lookup_type): Likewise.
10724         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10725         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10726         Likewise.
10727
10728 2017-04-05  Pedro Alves  <palves@redhat.com>
10729
10730         * python/python-internal.h (gdb_PyGetSetDef): New type.
10731         * python/py-block.c (block_object_getset)
10732         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10733         * python/py-event.c (event_object_getset)
10734         (finish_breakpoint_object_getset): Likewise.
10735         * python/py-inferior.c (inferior_object_getset): Likewise.
10736         * python/py-infthread.c (thread_object_getset): Likewise.
10737         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10738         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10739         * python/py-objfile.c (objfile_getset): Likewise.
10740         * python/py-progspace.c (pspace_getset): Likewise.
10741         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10742         Likewise.
10743         * python/py-record.c (recpy_record_getset): Likewise.
10744         * python/py-symbol.c (symbol_object_getset): Likewise.
10745         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10746         Likewise.
10747         * python/py-type.c (type_object_getset, field_object_getset):
10748         Likewise.
10749         * python/py-value.c (value_object_getset): Likewise.
10750
10751 2017-04-05  Pedro Alves  <palves@redhat.com>
10752
10753         * python/python-internal.h (gdb_PyObject_CallMethod)
10754         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10755         New functions.
10756         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10757         (PySys_GetObject, PySys_SetPath): New macros.
10758
10759 2017-04-05  Pedro Alves  <palves@redhat.com>
10760
10761         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10762         info_osdata_command.
10763         * osdata.c (info_osdata_command): Rename to ...
10764         (info_osdata): ... this.  Constify 'type' parameter, and remove
10765         the 'from_tty' parameter.  Accept NULL TYPE.
10766         (info_osdata_command): New function.
10767         * osdata.h (info_osdata_command): Remove declaration.
10768         (info_osdata): New declaration.
10769
10770 2017-04-05  Pedro Alves  <palves@redhat.com>
10771
10772         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10773         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10774         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10775         parameter.
10776         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10777         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10778         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10779         parameter.
10780         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10781         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10782         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10783         (mi_cmd_file_list_exec_source_files)
10784         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10785         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10786         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10787         parameter.
10788         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10789         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10790         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10791         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10792         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10793         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10794         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10795         'command' parameter.
10796         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10797         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10798         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10799         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10800         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10801         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10802         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10803         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10804         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10805         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10806         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10807         parameter.
10808         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10809         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10810         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10811         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10812         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10813         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10814         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10815         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10816         (mi_cmd_data_list_changed_registers)
10817         (mi_cmd_data_write_register_values)
10818         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10819         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10820         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10821         (mi_cmd_list_features, mi_cmd_list_target_features)
10822         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10823         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10824         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10825         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10826         (mi_cmd_trace_frame_collected): Constify 'command'
10827         parameter.
10828         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10829         'command' parameter.
10830
10831 2017-04-05  Pedro Alves  <palves@redhat.com>
10832
10833         * ada-lang.c (ada_completer_word_break_characters): Now a const
10834         array.
10835         (ada_get_gdb_completer_word_break_characters): Constify.
10836         * completer.c (gdb_completer_command_word_break_characters)
10837         (gdb_completer_file_name_break_characters)
10838         (gdb_completer_quote_characters): Now const arrays.
10839         (get_gdb_completer_quote_characters): Constify.
10840         (set_rl_completer_word_break_characters): New function.
10841         (set_gdb_completion_word_break_characters)
10842         (complete_line_internal): Use it.
10843         * completer.h (get_gdb_completer_quote_characters): Constify.
10844         (set_rl_completer_word_break_characters): Declare.
10845         * f-lang.c (f_word_break_characters): Constify.
10846         * language.c (default_word_break_characters): Constify.
10847         * language.h (language_defn::la_word_break_characters): Constify.
10848         (default_word_break_characters): Constify.
10849         * top.c (init_main): Use set_rl_completer_word_break_characters.
10850
10851 2017-04-05  Pedro Alves  <palves@redhat.com>
10852
10853         * aix-thread.c (aix_thread_pid_to_str)
10854         (aix_thread_extra_thread_info): Constify.
10855         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10856         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10857         (bsd_uthread_pid_to_str): Constify.
10858         * corelow.c (core_pid_to_str): Constify.
10859         * darwin-nat.c (darwin_pid_to_str): Constify.
10860         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10861         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10862         Constify.
10863         * gnu-nat.c (gnu_pid_to_str): Constify.
10864         * go32-nat.c (go32_pid_to_str): Constify.
10865         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10866         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10867         * inferior.c (inferior_pid_to_str): Constify.
10868         * linux-nat.c (linux_nat_pid_to_str): Constify.
10869         * linux-tdep.c (linux_core_pid_to_str): Constify.
10870         * linux-thread-db.c (thread_db_pid_to_str)
10871         (thread_db_extra_thread_info): Constify.
10872         * nto-tdep.c (nto_extra_thread_info): Constify.
10873         * nto-tdep.h (nto_extra_thread_info): Constify.
10874         * obsd-nat.c (obsd_pid_to_str): Constify.
10875         * procfs.c (procfs_pid_to_str): Constify.
10876         * ravenscar-thread.c (ravenscar_extra_thread_info)
10877         (ravenscar_pid_to_str): Constify.
10878         * remote-sim.c (gdbsim_pid_to_str): Constify.
10879         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10880         Constify.
10881         * sol-thread.c (solaris_pid_to_str): Constify.
10882         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10883         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10884         * target.c (default_pid_to_str, target_pid_to_str)
10885         (normal_pid_to_str, default_pid_to_str): Constify.
10886         * target.h (target_ops::to_pid_to_str)
10887         (target_ops::to_extra_thread_info): Constify.
10888         (target_pid_to_str, normal_pid_to_str): Constify.
10889         * windows-nat.c (windows_pid_to_str): Constify.
10890         * gdbarch.sh (core_pid_to_str): Constify.
10891         * target-delegates.c: Regenerate.
10892         * gdbarch.h, gdbarch.c: Regenerate.
10893
10894 2017-04-05  Pedro Alves  <palves@redhat.com>
10895
10896         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10897         the memory of the temporary warning_pre_print override.
10898         * utils.c (warning_pre_print): Constify.
10899         * utils.h (warning_pre_print): Constify.
10900
10901 2017-04-05  Pedro Alves  <palves@redhat.com>
10902
10903         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10904         (shell_command): New function.
10905         (make_command): Use std::string.
10906         (init_cli_cmds): Register shell_command instead of shell_escape.
10907
10908 2017-04-05  Pedro Alves  <palves@redhat.com>
10909
10910         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10911         * tracepoint.c (default_collect): Don't initialize.
10912
10913 2017-04-05  Pedro Alves  <palves@redhat.com>
10914
10915         * macroexp.c (macro_buffer::shared): Now a bool.
10916         (init_buffer): Update.
10917         (init_shared_buffer): Constify 'addr' parameter.
10918         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10919         casts.
10920
10921 2017-04-05  Pedro Alves  <palves@redhat.com>
10922
10923         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10924         * disasm.c (set_disassembler_options): Constify local.
10925         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10926
10927 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10928
10929         PR gdb/21352
10930         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10931         option.
10932
10933 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10934
10935         * frame.c (frame_unwind_register_unsigned): Call
10936         frame_unwind_register_value.
10937
10938 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10939
10940         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10941         Use gdb_test_multiple, and don't match anchor.
10942
10943 2017-04-05  Pedro Alves  <palves@redhat.com>
10944
10945         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10946         (Write After Approval): Remove Simon Marchi.
10947
10948 2017-04-05  Pedro Alves  <palves@redhat.com>
10949
10950         * common/gdb_optional.h (optional::optional): Make constexpr and
10951         initialize m_dummy.
10952
10953 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10954
10955         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10956         (amd64fbsd_jmp_buf_reg_offset): Remove.
10957         (amd64fbsd_supply_uthread): Remove function.
10958         (amd64fbsd_collect_uthread): Remove function.
10959         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10960         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10961         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10962         (fbsd-nat.c): Update comment.
10963         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10964         (i386fbsd_jmp_buf_reg_offset): Remove.
10965         (i386fbsd_supply_uthread): Remove function.
10966         (i386fbsd_collect_uthread): Remove function.
10967         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10968
10969 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10970
10971         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10972         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10973         * NEWS: Mention that support for FreeBSD/alpha was removed.
10974         * alpha-fbsd-tdep.c: Delete file.
10975         * config/alpha/fbsd.mh: Delete file.
10976         * configure.host: Delete alpha*-*-freebsd* and
10977         alpha*-*-kfreebsd*-gnu.
10978         * configure.tgt: Delete alpha*-*-freebsd* and
10979         alpha*-*-kfreebsd*-gnu.
10980
10981 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10982
10983         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10984         amd64bsd_store_inferior_registers): Use ptid from regcache.
10985
10986 2017-04-04  Pedro Alves  <palves@redhat.com>
10987
10988         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10989         data fields, make them private and add "m_" prefixes.
10990         (lnp_state_machine::lnp_state_machine): New ctor.
10991         (record_line, check_line_address, handle_set_discriminator)
10992         (handle_set_address, handle_advance_pc, handle_special_opcode)
10993         (handle_advance_line, handle_set_file, handle_negate_stmt)
10994         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10995         (end_sequence, advance_line): New methods.
10996         (m_gdbarch, m_record_lines_p): New fields.
10997         (lnp_reader_state): Delete.
10998         (dwarf_record_line): Rename to ...
10999         (lnp_state_machine::record_line): ... adjust.
11000         (init_lnp_state_machine): Delete.
11001         (lnp_state_machine::lnp_state_machine): New.
11002         (check_line_address): Rename to ...
11003         (lnp_state_machine::check_line_address): This.
11004         (dwarf_decode_lines_1): Remove reference to "reader_state".
11005         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11006         State machine internal state manipulation moved to
11007         lnp_state_machine methods.
11008
11009 2017-04-04  Pedro Alves  <palves@redhat.com>
11010
11011         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11012         unittests/offset-type-selftests.c.
11013         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11014         * common/offset-type.h: New file.
11015         * common/preprocessor.h: New file.
11016         * common/traits.h: New file.
11017         * common/valid-expr.h: New file.
11018         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11019         sect_offset and cu_offset strong typedefs throughout.
11020         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11021         typedefs throughout.
11022         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11023         sect_offset and cu_offset strong typedefs throughout.
11024         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11025         typedefs throughout.
11026         * gdbtypes.h: Include "common/offset-type.h".
11027         (cu_offset): Now an offset type (strong typedef) instead of a
11028         struct.
11029         (sect_offset): Likewise.
11030         (union call_site_parameter_u): Rename "param_offset" field to
11031         "param_cu_off".
11032         * unittests/offset-type-selftests.c: New file.
11033
11034 2017-04-04  Pedro Alves  <palves@redhat.com>
11035
11036         * common/underlying.h: New file.
11037         * dwarf2read.c: Include "common/gdb_optional.h" and
11038         "common/underlying.h".
11039         (dir_index, file_name_index): New types.
11040         (file_entry): Use them.
11041         (file_entry::include): Use to_underlying.
11042         (line_header::add_file_name): Use dir_index.
11043         (read_formatted_entries): Use gdb::optional.  Read form before
11044         writting to file_entry.
11045         (dwarf_decode_line_header): Use dir_index.
11046         (lnp_state_machine::current_file): Use to_underlying.
11047         (lnp_state_machine::file): Change type to file_name_index.
11048         (dwarf_record_line): Use to_underlying.
11049         (init_lnp_state_machine): Use file_name_index.
11050         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11051
11052 2017-04-04  Pedro Alves  <palves@redhat.com>
11053
11054         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11055         operator bool, has_value and get methods.
11056
11057 2017-04-04  Pedro Alves  <palves@redhat.com>
11058
11059         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11060         fields.
11061         (line_header): Initialize all data fields.  Change type of
11062         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11063         Change type of include_dirs to std::vector<const char *>.  Remove
11064         num_include_dirs, include_dirs_size.  Change type of file_names to
11065         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11066         (line_header::line_header): New.
11067         (line_header::add_include_dir, line_header::add_file_name): New
11068         methods.
11069         (line_header::include_dir_at): Remove NULL check.
11070         (line_header::file_name_at): Add const overload.
11071         (line_header_up): New unique_ptr typedef.
11072         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11073         std::vector.  Remove free_line_header call.
11074         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11075         free_line_header call.
11076         (free_cu_line_header): Delete.
11077         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11078         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11079         Adjust to use std::vector.
11080         (free_line_header): Delete.
11081         (free_line_header_voidp): Use delete.
11082         (add_include_dir): Replace with ...
11083         (line_header::add_include_dir): ... this method.  Use std::vector.
11084         (add_file_name): Replace with ...
11085         (line_header::add_file_name): ... this method.  Use std::vector.
11086         (add_include_dir_stub): Delete.
11087         (read_formatted_entries): Remove memset.
11088         (dwarf_decode_line_header): Return a line_header_up instead of a
11089         raw pointer.  Remove cleanup handling.  Pass lambdas to
11090         read_formatted_entries.  Adjust to use line_header methods.
11091         (dwarf_decode_lines_1): Adjust to use line_header methods.
11092         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11093         use std::vector.
11094
11095 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11096
11097         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11098         instead of struct ptid.
11099
11100 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11101
11102         * frame.c (get_frame_register_bytes): Unwind using value.
11103         (put_frame_register_bytes): Likewise.
11104
11105 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11106
11107         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11108         aggregate-like.
11109
11110 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11111
11112         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11113
11114 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11115
11116         * gdbthread.h (struct thread_info): Declare constructor and
11117         destructor.  Add some in-class member initializers.
11118         * thread.c (free_thread): Remove.
11119         (init_thread_list): Call delete instead of free_thread.
11120         (new_thread): Call thread_info constructor.
11121         (thread_info::thread_info): New function.
11122         (thread_info::~thread_info): New function.
11123         (delete_thread_1): Call delete instead of free_thread.
11124         (make_cleanup_restore_current_thread): Move tp and frame to
11125         inner block.
11126
11127 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11128
11129         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11130         (arc_skip_prologue): Likewise.
11131         (arc_make_frame_cache): Likewise.
11132         (arc_pv_get_operand): New function.
11133         (arc_is_in_prologue): Likewise.
11134         (arc_analyze_prologue): Likewise.
11135         (arc_print_frame_cache): Likewise.
11136         (MAX_PROLOGUE_LENGTH): New constant.
11137
11138 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11139
11140         * configure.tgt: Add arc-insn.o.
11141         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11142         (dump_arc_instruction_command): New function.
11143         (arc_fprintf_disasm): Likewise.
11144         (arc_disassemble_info): Likewise.
11145         (arc_insn_get_operand_value): Likewise.
11146         (arc_insn_get_operand_value_signed): Likewise.
11147         (arc_insn_get_memory_base_reg): Likewise.
11148         (arc_insn_get_memory_offset): Likewise.
11149         (arc_insn_get_branch_target): Likewise.
11150         (arc_insn_dump): Likewise.
11151         (arc_insn_get_linear_next_pc): Likewise.
11152         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11153         (arc_disassemble_info): Likewise.
11154         (arc_insn_get_branch_target): Likewise.
11155         (arc_insn_get_linear_next_pc): Likewise.
11156         * NEWS: Mention new "maint print arc arc-instruction".
11157
11158 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11159
11160         * arc-tdep (maintenance_print_arc_list): New variable.
11161         (maintenance_print_arc_command): New function.
11162
11163 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11164
11165         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11166         Add "limm" and "reserved".
11167         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11168         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11169         * arc-tdep.h (arc_regnum): Likewise.
11170
11171 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11172
11173         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11174         for THREADPTR register.
11175         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11176         register.
11177         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11178         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11179         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11180
11181 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11182
11183         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11184         registers above gdbarch_num_regs (gdbarch) as privileged in
11185         call0 ABI.
11186
11187 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11188
11189         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11190         for a single specified register or for all registers in
11191         a0_base..a0_base + C0_NREGS range.
11192         (supply_gregset_reg): Call regcache_raw_supply for a single
11193         specified register or for all registers in a0_base..a0_base +
11194         C0_NREGS range.
11195
11196 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11197
11198         * arch/xtensa.h (C0_NREGS): Add definition.
11199         * xtensa-tdep.c (C0_NREGS): Remove definition.
11200
11201 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11202
11203         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11204         Drop xtensa_default_isa initialization.
11205         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11206
11207 2017-03-27  Pedro Alves  <palves@redhat.com>
11208
11209         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11210         (file_entry::include_dir): New method.
11211         (line_header::include_dir_at, line_header::file_name_at): New
11212         methods.
11213         (setup_type_unit_groups, setup_type_unit_groups)
11214         (psymtab_include_file_name): Simplify using the new methods.
11215         (lnp_state_machine) <the_line_header>: New field.
11216         <file>: Add comment.
11217         (lnp_state_machine::current_file): New method.
11218         (dwarf_record_line): Simplify using the new methods.
11219         (init_lnp_state_machine): Initialize the "the_line_header" field.
11220         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11221         Simplify using the new methods.
11222
11223 2017-03-27  Pedro Alves  <palves@redhat.com>
11224
11225         * cp-name-parser.y (make_empty): Delete.
11226         (demangler_special, nested_name, ptr_operator, array_indicator)
11227         (direct_declarator, declarator_1): Use fill_comp instead of
11228         make_empty.
11229
11230 2017-03-27  Pedro Alves  <palves@redhat.com>
11231
11232         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11233         to ATTRIBUTE_PRINTF.
11234         * solib-target.c (library_list_start_list): Print "string" not
11235         "version".
11236         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11237         gdb_xml_error call.
11238
11239 2017-03-27  Pedro Alves  <palves@redhat.com>
11240
11241         * dwarf2read.c (struct file_and_directory): New.
11242         (dwarf2_get_dwz_file): Adjust to use std::string.
11243         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11244         (find_file_and_directory): Adjust to return a file_and_directory
11245         object.
11246         (read_file_scope): Adjust to use file_and_directory.  Remove
11247         make_cleanup/do_cleanups calls.
11248         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11249         make_cleanup/do_cleanups calls.
11250         * python/python.c (do_start_initialization): Adjust to ldirname
11251         returning a std::string.
11252         * utils.c (ldirname): Now returns a std::string.
11253         * utils.h (ldirname): Change return type to std::string.
11254         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11255         returning a std::string.
11256         * xml-tdesc.c (file_read_description_xml): Likewise.
11257
11258 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11259
11260         * regcache.c (regcache_debug_print_register): New function.
11261         * regcache.h (regcache_debug_print_register): New declaration.
11262         * target.c (debug_print_register): Remove.
11263         (target_fetch_registers): Call regcache_debug_print_register.
11264         (target_store_registers): Likewise.
11265
11266 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11267
11268         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11269         reference beyond the 'lh->include_dirs' array before accessing to
11270         it.
11271         (psymtab_include_file_name): Likewise.
11272         (dwarf_decode_lines_1): Likewise.
11273         (dwarf_decode_lines): Likewise.
11274         (file_file_name): Likewise.
11275
11276 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11277
11278         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11279         inferior_ptid.
11280         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11281         ps_lsetfpregs): Likewise.
11282         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11283         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11284         ps_lsetfpregs): Likewise.
11285         * target.c (target_fetch_registers, target_store_registers):
11286         Remove asserts.
11287
11288 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11289
11290         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11291
11292 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11293
11294         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11295         (_initialize_aarch64_tdep): Register it.
11296         (aarch64_record_load_store): Handle PRFM instruction.
11297         (aarch64_process_record_test): New function.
11298
11299 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11300
11301         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11302         indentation.
11303
11304 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11305
11306         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11307
11308 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11309
11310         python/python.c (do_start_initialization): Fix memory leak.
11311
11312 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11313
11314         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11315         using get_ptrace_pid.
11316         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11317         inferior_ptid.
11318         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11319         inferior_ptid instead of pid.
11320
11321 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11322
11323         * aarch64-tdep.c: Wrap locally used classes in anonymous
11324         namespace.
11325         * arm-tdep.c: Likewise.
11326         * linespec.c: Likewise.
11327         * ui-out.c: Likewise.
11328
11329 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11330
11331         PR gdb/19637
11332         * python/lib/gdb/printer/bound_registers.py: Import sys.
11333
11334 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11335
11336         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11337         windows_thread_info parameter and use it instead of
11338         current_thread.
11339         (windows_fetch_inferior_registers): Don't set current_thread,
11340         pass the thread to do_windows_fetch_inferior_registers.  Use
11341         ptid from regcache instead of inferior_ptid.
11342         (do_windows_store_inferior_registers): Add windows_thread_info
11343         parameter and use it instead of current_thread.
11344         (windows_store_inferior_registers): Don't set current_thread,
11345         pass the thread to do_windows_store_inferior_registers.  Use
11346         ptid from regcache instead of inferior_ptid.
11347
11348 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11349
11350         * ser-mingw.c (ser_windows_raw): Remove reference to
11351         struct serial::current_timeout.
11352
11353 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11354
11355         PR tdep/20928
11356         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11357         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11358         (sparc64_fsr_type): Fix %fsr decoding.
11359
11360 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11361
11362         * python/py-record-btrace.c (btpy_insn_data): Change return type
11363         for Python 2.
11364
11365 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11366
11367         * spu-linux-nat.c (spu_fetch_inferior_registers,
11368         spu_store_inferior_registers): Use ptid from regcache, set and
11369         restore inferior_ptid.
11370         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11371         Likewise.
11372
11373 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11374
11375         * i386-linux-nat.c (fetch_register, store_register,
11376         i386_linux_fetch_inferior_registers,
11377         i386_linux_store_inferior_registers): Use ptid from regcache.
11378         * ia64-linux-nat.c (ia64_linux_fetch_register,
11379         ia64_linux_store_register): Likewise.
11380         * inf-ptrace.c (inf_ptrace_fetch_register,
11381         inf_ptrace_store_register): Likewise.
11382         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11383         m32r_linux_store_inferior_registers): Likewise.
11384         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11385         m68kbsd_store_inferior_registers): Likewise.
11386         * m68k-linux-nat.c (fetch_register, store_register,
11387         m68k_linux_fetch_inferior_registers,
11388         m68k_linux_store_inferior_registers): Likewise.
11389         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11390         m88kbsd_store_inferior_registers): Likewise.
11391         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11392         mips_fbsd_store_inferior_registers): Likewise.
11393         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11394         mips64_linux_regsets_store_registers): Likewise.
11395         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11396         mipsnbsd_store_inferior_registers): Likewise.
11397         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11398         mips64obsd_store_inferior_registers): Likewise.
11399         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11400         Likewise.
11401         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11402         ppcfbsd_store_inferior_registers): Likewise.
11403         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11404         ppc_linux_store_inferior_registers): Likewise.
11405         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11406         ppcnbsd_store_inferior_registers): Likewise.
11407         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11408         ppcobsd_store_registers): Likewise.
11409         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11410         Likewise.
11411         * ravenscar-thread.c (ravenscar_fetch_registers,
11412         ravenscar_store_registers, ravenscar_prepare_to_store):
11413         Likewise.
11414         * record-btrace.c (record_btrace_fetch_registers,
11415         record_btrace_store_registers, record_btrace_prepare_to_store):
11416         Likewise.
11417         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11418         Lookup inferior using ptid from regcache, instead of
11419         current_inferior.
11420         * remote.c (remote_fetch_registers, remote_store_registers): Use
11421         ptid from regcache.
11422         * rs6000-nat.c (fetch_register, store_register): Likewise.
11423         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11424         s390_linux_store_inferior_registers): Likewise.
11425         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11426         shnbsd_store_inferior_registers): Likewise.
11427         * sol-thread.c (sol_thread_fetch_registers,
11428         sol_thread_store_registers): Likewise.
11429         * sparc-nat.c (sparc_fetch_inferior_registers,
11430         sparc_store_inferior_registers): Likewise.
11431         * tilegx-linux-nat.c (fetch_inferior_registers,
11432         store_inferior_registers): Likewise.
11433         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11434         vaxbsd_store_inferior_registers): Likewise.
11435         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11436         store_xtregs): Likewise.
11437
11438 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11439
11440         PR gdb/14441
11441         * NEWS: Mention support for rvalue references in GDB and python.
11442         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11443         supports both lvalue and rvalue references.
11444
11445 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11446
11447         PR gdb/14441
11448         * gdbtypes.c (rank_one_type): Implement overloading
11449         resolution rules regarding rvalue references.
11450
11451 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11452
11453         PR gdb/14441
11454         * aarch64-tdep.c (aarch64_type_align)
11455         (aarch64_extract_return_value, aarch64_store_return_value): Change
11456         lvalue reference type checks to general reference type checks.
11457         * amd64-tdep.c (amd64_classify): Likewise.
11458         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11459         Likewise.
11460         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11461         (arm_store_return_value): Likewise.
11462         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11463         * c-typeprint.c (c_print_type): Likewise.
11464         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11465         (cplus_number_of_children, cplus_describe_child): Likewise.
11466         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11467         * completer.c (expression_completer): Likewise.
11468         * cp-support.c (make_symbol_overload_list_adl_namespace):
11469         Likewise.
11470         * darwin-nat-info.c (info_mach_region_command): Likewise.
11471         * dwarf2loc.c (entry_data_value_coerce_ref)
11472         (value_of_dwarf_reg_entry): Likewise.
11473         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11474         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11475         Likewise.
11476         * findvar.c (extract_typed_address, store_typed_address):
11477         Likewise.
11478         * gdbtypes.c (rank_one_type): Likewise.
11479         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11480         * infcall.c (value_arg_coerce): Likewise.
11481         * language.c (pointer_type): Likewise.
11482         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11483         Likewise.
11484         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11485         * mn10300-tdep.c (mn10300_type_align): Likewise.
11486         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11487         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11488         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11489         Likewise.
11490         * printcmd.c (print_formatted, x_command): Likewise.
11491         * python/py-type.c (typy_get_composite, typy_template_argument):
11492         Likewise.
11493         * python/py-value.c (valpy_referenced_value)
11494         (valpy_get_dynamic_type, value_has_field): Likewise.
11495         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11496         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11497         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11498         * spu-tdep.c (spu_scalar_value_p): Likewise.
11499         * symtab.c (lookup_symbol_aux): Likewise.
11500         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11501         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11502         Likewise.
11503         * valops.c (value_cast_pointers, value_cast)
11504         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11505         (value_struct_elt, value_struct_elt_bitpos)
11506         (value_find_oload_method_list, find_overload_match)
11507         (value_rtti_indirect_type): Likewise.
11508         * valprint.c (val_print_scalar_type_p, generic_val_print):
11509         Likewise.
11510         * value.c (value_actual_type, value_as_address, unpack_long)
11511         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11512         (coerce_ref): Likewise.
11513         * varobj.c (varobj_get_value_type): Likewise.
11514
11515 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11516
11517         PR gdb/14441
11518         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11519         table of constants.
11520         * python/lib/gdb/command/explore.py: Support exploring values
11521         of rvalue reference types.
11522         * python/lib/gdb/types.py: Implement get_basic_type() for
11523         rvalue reference types.
11524         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11525         constant.
11526         * python/py-value.c (valpy_getitem): Add an rvalue reference
11527         check.
11528         (valpy_reference_value): Add new parameter "refcode".
11529         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11530         New wrappers for valpy_reference_value().
11531         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11532         (gdbpy_invoke_xmethod): Likewise.
11533
11534 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11535
11536         PR gdb/14441
11537         * dwarf2read.c (process_die, read_type_die_1): Handle the
11538         DW_TAG_rvalue_reference_type DIE.
11539         (read_tag_reference_type): Add new parameter "refcode".
11540
11541 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11542
11543         PR gdb/14441
11544         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11545         (c_type_print_modifier, c_type_print_varspec_suffix)
11546         (c_type_print_base): Support printing rvalue reference types.
11547         * c-valprint.c (c_val_print, c_value_print): Support printing
11548         rvalue reference values.
11549
11550 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11551
11552         PR gdb/14441
11553         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11554         typename.
11555         * cp-support.c (replace_typedefs): Handle
11556         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11557         * python/py-type.c (typy_lookup_type): Likewise.
11558
11559 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11560
11561         PR gdb/14441
11562         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11563         * parse.c (insert_type): Change assert statement.
11564         (follow_types): Handle rvalue reference types.
11565         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11566         constant.
11567
11568 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11569
11570         PR gdb/14441
11571         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11572         value_ref() interface.
11573         * c-valprint.c (c_value_print): Likewise.
11574         * infcall.c (value_arg_coerce): Likewise.
11575         * python/py-value.c (valpy_reference_value): Likewise.
11576         * valops.c (value_cast, value_reinterpret_cast)
11577         (value_dynamic_cast, typecmp): Likewise.
11578         (value_ref): Parameterize by kind of return value reference type.
11579         * value.h (value_ref): Add new parameter "refcode".
11580
11581 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11582
11583         PR gdb/14441
11584         * dwarf2read.c (read_tag_reference_type): Use
11585         lookup_lvalue_reference_type() instead of lookup_reference_type().
11586         * eval.c (evaluate_subexp_standard): Likewise.
11587         * f-exp.y: Likewise.
11588         * gdbtypes.c (make_reference_type, lookup_reference_type):
11589         Generalize with rvalue reference types.
11590         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11591         convenience wrappers for lookup_reference_type().
11592         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11593         reference kind parameter.
11594         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11595         wrappers for lookup_reference_type().
11596         * guile/scm-type.c (gdbscm_type_reference): Use
11597         lookup_lvalue_reference_type() instead of lookup_reference_type().
11598         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11599         * parse.c (follow_types): Likewise.
11600         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11601         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11602         Likewise.
11603         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11604         (gdbpy_invoke_xmethod): Likewise.
11605         * stabsread.c: Provide extra argument to make_reference_type()
11606         call.
11607         * valops.c (value_ref, value_rtti_indirect_type): Use
11608         lookup_lvalue_reference_type() instead of lookup_reference_type().
11609
11610 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11611
11612         PR gdb/14441
11613         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11614         (TYPE_IS_REFERENCE): New macro.
11615         (struct type): Add rvalue_reference_type field.
11616         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11617
11618 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11619
11620         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11621         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11622         New function definition.
11623         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11624         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11625         New function declaration.
11626         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11627         * mi/mi-interp.h: New file.
11628         * solib.c (info_sharedlibrary_command): Replace for loop with
11629         ALL_SO_LIBS macro
11630         * solib.h (update_solib_list): New function declaration.
11631         (so_list_head): Move macro.
11632         * solist.h (ALL_SO_LIBS): New macro.
11633
11634 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11635
11636         * infcmd.c (post_create_inferior): Remove unused argument in
11637         call to solib_add.
11638         * remote.c (remote_start_remote): Likewise.
11639         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11640         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11641         (enable_break): Likewise.
11642         * solib.c (update_solib_list): Remove unused target argument
11643         and its documentation.
11644         (solib_add): Remove unused target argument.  Remove unused
11645         argument in call to update_solib_list.
11646         (info_sharedlibrary_command): Remove unused argument in call
11647         to update_solib_list.
11648         (sharedlibrary_command): Remove unused argument in call to
11649         solib_add.
11650         (handle_solib_event): Likewise.
11651         (reload_shared_libraries): Likewise.
11652         * solib.h (solib_add): Remove unused target argument.
11653
11654 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11655
11656         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11657         (s390_displaced_step_fixup): Cover relative branches with the
11658         default fixup handling.  This fixes lack of support for some
11659         relative branch instructions.
11660
11661 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11662
11663         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11664         ptid from regcache.
11665
11666 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11667
11668         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11669         i386_darwin_store_inferior_registers): Use ptid from regcache.
11670
11671 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11672
11673         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11674         i386bsd_store_inferior_registers): Use ptid from regcache.
11675
11676 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11677
11678         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11679         hppaobsd_store_registers): Use ptid from regcache.
11680
11681 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11682
11683         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11684         hppanbsd_store_registers): Use ptid from regcache.
11685
11686 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11687
11688         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11689         from regcache.  Use get_ptrace_pid.
11690
11691 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11692
11693         * corelow.c (get_core_register_section): Use ptid from regcache,
11694         update doc.
11695
11696 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11697
11698         * bsd-uthread.c (bsd_uthread_fetch_registers,
11699         bsd_uthread_store_registers): Use ptid from regcache, set and
11700         restore inferior_ptid.
11701
11702 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11703
11704         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11705         fetch_fp_regs, store_register, store_regs, store_fp_register,
11706         store_fp_regs): Use ptid from regcache.
11707
11708 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11709
11710         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11711         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11712         store_vfp_regs): Use ptid from regcache.
11713
11714 2017-03-17  Pedro Alves  <palves@redhat.com>
11715
11716         PR remote/21188
11717         * ser-base.c (ser_base_wait_for): Add comment.
11718         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11719         version.
11720         * ser-unix.c (hardwire_raw): Remove reference to
11721         scb->current_timeout.
11722         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11723         (hardwire_ops): Install ser_base_readchar instead of
11724         hardwire_readchar.
11725         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11726         Remove fields.
11727
11728 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11729
11730         PR gdb/19637
11731         * python/lib/gdb/printer/bound_registers.py: Add support for
11732         Python 3.
11733
11734 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11735
11736         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11737         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11738         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11739         byte_offset to subobj_byte_offset.  Fix the handling of
11740         DWARF_VALUE_STACK on big-endian targets when coming via an
11741         implicit pointer.
11742         (dwarf2_evaluate_loc_desc): Adjust call to
11743         dwarf2_evaluate_loc_desc_full.
11744         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11745         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11746
11747 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11748
11749         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11750         and REVSH instructions.
11751
11752 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11753
11754         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11755         (arm_record_test): Declare.
11756         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11757         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11758         align with the manual.
11759         (thumb_record_misc): Adjust the code order to align with the
11760         manual.
11761         (thumb2_record_decode_insn_handler): Fix instruction matching.
11762         (instruction_reader_thumb): New class.
11763         (arm_record_test): New function.
11764
11765 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11766
11767         * arm-tdep.c (abstract_memory_reader): New class.
11768         (instruction_reader): New class.
11769         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11770         (decode_insn): Likewise.
11771
11772 2017-03-16  Doug Evans  <dje@google.com>
11773
11774         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11775         member.  Change type of TYPE member to SCM.  All uses updated.
11776         (lsscm_make_lazy_string_smob): Add assert.
11777         (lsscm_make_lazy_string): Flag bad length values.
11778         (lsscm_elt_type): New function.
11779         (gdbscm_lazy_string_to_value): Rewrite to use
11780         lsscm_safe_lazy_string_to_value.
11781         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11782         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11783         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11784         in incoming type.
11785         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11786         * guile/scm-type.c (tyscm_scm_to_type): New function.
11787
11788 2017-03-15  Doug Evans  <dje@google.com>
11789
11790         PR python/17728, python/18439, python/18779
11791         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11792         member.  Change type of TYPE member to PyObject *.  All uses updated.
11793         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11794         (gdbpy_create_lazy_string_object): Flag bad length values.
11795         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11796         Handle typedefs in incoming type.
11797         (stpy_lazy_string_elt_type): New function.
11798         (gdbpy_extract_lazy_string): Call it.
11799         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11800         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11801         typedefs in incoming type.
11802
11803 2017-03-16  Doug Evans  <dje@google.com>
11804
11805         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11806         * guile/scm-type.c (tyscm_scm_to_type): New function.
11807
11808 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11809
11810         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11811         "ULONGEST" for "skip".
11812
11813 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11814
11815         PR gdb/21220
11816         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11817         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11818         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11819         over ptrace peek/poke until end of buffer or error.
11820
11821 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11822
11823         * parse.c (length_of_subexp): Make static.
11824         * parser-defs.h (length_of_subexp): Remove.
11825
11826 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11827
11828         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11829         as well.
11830
11831 2017-03-14  Pedro Alves  <palves@redhat.com>
11832
11833         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11834         (main): Use std::unique_ptr.  Remove calls to
11835         cp_demangled_name_parse_free.
11836
11837 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11838
11839         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11840         alphabsd_store_inferior_registers): Use regcache->ptid instead
11841         of inferior_ptid.
11842
11843 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11844
11845         * aix-thread.c (aix_thread_fetch_registers,
11846         aix_thread_store_registers): Use regcache->ptid instead of
11847         inferior_ptid.
11848
11849 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11850
11851         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11852         store_gregs_to_thread, fetch_fpregs_from_thread,
11853         store_fpregs_to_thread): Use regcache->ptid instead of
11854         inferior_ptid.
11855
11856 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11857
11858         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11859         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11860         instead of inferior_ptid.
11861
11862 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11863
11864         * target.c (target_fetch_registers, target_store_registers): Add
11865         assert.
11866
11867 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11868
11869         * regcache.h (regcache_get_ptid): New function.
11870         * regcache.c (regcache_get_ptid): New function.
11871
11872 2017-03-13  Mark Wielaard  <mark@klomp.org>
11873
11874         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11875
11876 2017-03-10  Keith Seitz  <keiths@redhat.com>
11877
11878         PR c++/8218
11879         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11880
11881 2017-03-08  Pedro Alves  <palves@redhat.com>
11882
11883         PR gdb/18360
11884         * infrun.c (start_step_over, do_target_resume, resume)
11885         (restart_threads): Assert we're not resuming a thread that is
11886         meant to be stopped.
11887         (infrun_thread_stop_requested_callback): Delete.
11888         (infrun_thread_stop_requested): If the thread is internally
11889         stopped, queue a pending stop event and clear the thread's
11890         inline-frame state.
11891         (handle_stop_requested): New function.
11892         (handle_syscall_event, handle_inferior_event_1): Use
11893         handle_stop_requested.
11894         (handle_stop_requested): New function.
11895         (handle_signal_stop): Set the thread's stop_signal here instead of
11896         at caller.
11897         (finish_step_over): Clear step over info unconditionally.
11898         (handle_signal_stop): If the user had interrupted the event
11899         thread, consider the stop a random signal.
11900         (handle_signal_stop) <signal arrived while stepping over
11901         breakpoint>: Don't restart threads here.
11902         (stop_waiting): Don't clear step-over info here.
11903
11904 2017-03-08  Pedro Alves  <palves@redhat.com>
11905
11906         PR 21206
11907         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11908         goes to argument 2, not 1.
11909
11910 2017-03-08  Pedro Alves  <palves@redhat.com>
11911
11912         PR cli/21218
11913         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11914         display_gdb_prompt.
11915         (command_line_input): Add comment.
11916
11917 2017-03-08  Pedro Alves  <palves@redhat.com>
11918
11919         PR tui/21216
11920         * tui/tui-file.c (tui_file::write): New.
11921         * tui/tui-file.h (tui_file): Override "write".
11922         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11923         factored out from ...
11924         (tui_puts): ... here.
11925         (tui_putc): Use them.
11926         (tui_write): New function.
11927         * tui/tui-io.h (tui_write): Declare.
11928
11929 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11930
11931         * Makefile.in (SFILES): Replace "environ.c" with
11932         "common/environ.c".
11933         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11934         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11935         to...
11936         * common/environ.c: ... here.
11937         * environ.h: Moved to...
11938         * common/environ.h: ... here.
11939
11940 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11941
11942         * gdbarch.sh (pstring_ptr): New static function.
11943         (gdbarch_disassembler_options): Use it.
11944         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11945         not valid_disassembler_option->name.
11946         * gdbarch.c: Regenerate.
11947
11948 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11949
11950         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11951
11952 2017-03-07  Pedro Alves  <palves@redhat.com>
11953
11954         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11955
11956 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11957
11958         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11959         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11960         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11961         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11962
11963 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11964
11965         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11966
11967 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11968
11969         * remote.c (remote_add_target_side_commands): Use range-based
11970         for loop.
11971
11972 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11973
11974         PR gdb/21165
11975         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11976         value is lazy.
11977         * valprint.c (common_val_print): Likewise.
11978
11979 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11980
11981         * NEWS: Mention new set/show disassembler-options commands.
11982         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11983         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11984         (prospective_options): New static variable.
11985         (gdb_disassembler::gdb_disassembler): Initialize
11986         m_di.disassembler_options.
11987         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11988         (get_disassembler_options): New function.
11989         (set_disassembler_options): Likewise.
11990         (set_disassembler_options_sfunc): Likewise.
11991         (show_disassembler_options_sfunc): Likewise.
11992         (disassembler_options_completer): Likewise.
11993         (_initialize_disasm): Likewise.
11994         * disasm.h (get_disassembler_options): New prototype.
11995         (set_disassembler_options): Likewise.
11996         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11997         (gdbarch_verify_disassembler_options): Likewise.
11998         * gdbarch.c: Regenerate.
11999         * gdbarch.h: Likewise.
12000         * arm-tdep.c (num_disassembly_options): Delete.
12001         (set_disassembly_style): Likewise.
12002         (arm_disassembler_options): New static variable.
12003         (set_disassembly_style_sfunc): Convert short style name into long
12004         option name.  Call set_disassembler_options.
12005         (show_disassembly_style_sfunc): New function.
12006         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12007         set_gdbarch_verify_disassembler_options.
12008         (_initialize_arm_tdep): Delete regnames variable and update callers.
12009         (arm_disassembler_options): Initialize.
12010         (disasm_options): New variable.
12011         (num_disassembly_options): Rename from this...
12012         (num_disassembly_styles): ...to this.  Compute by scanning through
12013         disasm_options.
12014         (valid_disassembly_styles): Initialize using disasm_options.
12015         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12016         set_arm_regname_option.
12017         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12018         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12019         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12020         set_gdbarch_verify_disassembler_options.
12021         * s390-tdep.c (s390_disassembler_options): New static variable.
12022         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12023         set_gdbarch_verify_disassembler_options.
12024
12025 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12026
12027         * remote.c (remote_add_target_side_condition): Remove "struct"
12028         keyword from range-based for loop.
12029
12030 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12031
12032         * remote.c (remote_add_target_side_condition): Use range-based
12033         for loop.  Update comment.
12034
12035 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12036
12037         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12038
12039 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12040
12041         * regcache.c (regcache_raw_update): New function.
12042         (regcache_raw_read): Move code to regcache_raw_update.
12043         * regcache.h (regcache_raw_update): New declaration.
12044         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12045
12046 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12047
12048         * dwarf2read.c (create_debug_type_hash_table): Initialize
12049         header.signature and header.type_offset_in_tu.
12050
12051 2017-02-24  Pedro Alves  <palves@redhat.com>
12052
12053         * symtab.c (make_file_symbol_completion_list_1): Use
12054         add_symtab_completions.
12055
12056 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12057
12058         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12059
12060 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12061
12062         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12063         I386_MAX_REGISTER_SIZE.
12064         (i386_pseudo_register_write): Likewise.
12065         (i386_process_record): Likewise.
12066         * i387-tdep.c (i387_supply_xsave): Likewise.
12067         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12068         (store_register): Likewise.
12069
12070 2017-02-23  Pedro Alves  <palves@redhat.com>
12071
12072         * ada-lang.c: Include "common/function-view.h".
12073         (ada_iterate_over_symbols): Adjust to use function_view as
12074         callback type.
12075         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12076         (ada_make_symbol_completion_list): Use a lambda.
12077         (ada_exc_search_name_matches): Delete.
12078         (name_matches_regex): New.
12079         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12080         * compile/compile-c-support.c: Include "common/function-view.h".
12081         (print_one_macro): Change prototype to accept a ui_file pointer.
12082         (write_macro_definitions): Use a lambda.
12083         * dwarf2read.c: Include "common/function-view.h".
12084         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12085         (dw2_expand_symtabs_matching): Adjust to use function_view as
12086         callback type.
12087         * language.h: Include "common/function-view.h".
12088         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12089         function_view as callback type.
12090         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12091         * linespec.c: Include "common/function-view.h".
12092         (collect_info::add_symbol): New method.
12093         (struct symbol_and_data_callback, iterate_inline_only, struct
12094         symbol_matcher_data, iterate_name_matcher): Delete.
12095         (iterate_over_all_matching_symtabs): Adjust to use function_view
12096         as callback type and lambdas.
12097         (iterate_over_file_blocks): Adjust to use function_view as
12098         callback type.
12099         (decode_compound_collector): Now a class with private fields.
12100         (decode_compound_collector::release_symbols): New method.
12101         (collect_one_symbol): Rename to...
12102         (decode_compound_collector::operator()): ... this and adjust.
12103         (lookup_prefix_sym): decode_compound_collector construction bits
12104         move to decode_compound_collector ctor.  Pass the
12105         decode_compound_collector object directly as callback.  Remove
12106         cleanups and use decode_compound_collector::release_symbols
12107         instead.
12108         (symtab_collector): Now a class with private fields.
12109         (symtab_collector::release_symtabs): New method.
12110         (add_symtabs_to_list): Rename to...
12111         (symtab_collector::operator()): ... this and adjust.
12112         (collect_symtabs_from_filename): symtab_collector construction
12113         bits move to symtab_collector ctor.  Pass the symtab_collector
12114         object directly as callback.  Remove cleanups and use
12115         symtab_collector::release_symtabs instead.
12116         (collect_symbols): Delete.
12117         (add_matching_symbols_to_info): Use lambdas.
12118         * macrocmd.c (print_macro_callback): Delete.
12119         (info_macro_command): Use a lambda.
12120         (info_macros_command): Pass print_macro_definition as callable
12121         directly.
12122         (print_one_macro): Remove 'ignore' parameter.
12123         (macro_list_command): Adjust.
12124         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12125         (macro_for_each_data::user_data): Delete field.
12126         (foreach_macro): Adjust to call the function_view.
12127         (macro_for_each): Adjust to use function_view as callback type.
12128         (foreach_macro_in_scope): Adjust to call the function_view.
12129         (macro_for_each_in_scope): Adjust to use function_view as callback
12130         type.
12131         * macrotab.h: Include "common/function-view.h".
12132         (macro_callback_fn): Declare a prototype instead of a pointer.
12133         Remove "user_data" parameter.
12134         (macro_for_each, macro_for_each_in_scope): Adjust to use
12135         function_view as callback type.
12136         * psymtab.c (partial_map_expand_apply)
12137         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12138         Adjust to use function_view as callback type and to return bool.
12139         (psym_expand_symtabs_matching): Adjust to use function_view as
12140         callback types.
12141         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12142         to use function_view as callback type and to return bool.
12143         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12144         callback types.
12145         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12146         as callback types.
12147         * symfile.h: Include "common/function-view.h".
12148         (expand_symtabs_file_matcher_ftype)
12149         (expand_symtabs_symbol_matcher_ftype)
12150         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12151         return bool.
12152         (quick_symbol_functions::map_symtabs_matching_filename)
12153         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12154         function_view as callback type and return bool.
12155         (expand_symtabs_matching): Adjust to use function_view as callback
12156         type.
12157         (maintenance_expand_name_matcher)
12158         (maintenance_expand_file_matcher): Delete.
12159         (maintenance_expand_symtabs): Use lambdas.
12160         * symtab.c (iterate_over_some_symtabs): Adjust to use
12161         function_view as callback types and return bool.
12162         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12163         of a cleanup.
12164         (lookup_symtab_callback): Delete.
12165         (lookup_symtab): Use a lambda.
12166         (iterate_over_symbols): Adjust to use function_view as callback
12167         type.
12168         (struct search_symbols_data, search_symbols_file_matches)
12169         (search_symbols_name_matches): Delete.
12170         (search_symbols): Use a pair of lambdas.
12171         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12172         (symtab_expansion_callback): Delete.
12173         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12174         * symtab.h: Include "common/function-view.h".
12175         (iterate_over_some_symtabs): Adjust to use function_view as
12176         callback type and return bool.
12177         (iterate_over_symtabs): Adjust to use function_view as callback
12178         type.
12179         (symbol_found_callback_ftype): Remove 'data' parameter and return
12180         bool.
12181         (iterate_over_symbols): Adjust to use function_view as callback
12182         type.
12183
12184 2017-02-23  Pedro Alves  <palves@redhat.com>
12185
12186         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12187         (%.o) <unittests/%.c>: New pattern.
12188         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12189         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12190         * common/function-view.h: New file.
12191         * unittests/function-view-selftests.c: New file.
12192         * configure: Regenerate.
12193
12194 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12195
12196         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12197         inferior_ptid.
12198         * go32-nat.c (go32_thread_alive): Likewise.
12199
12200 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12201
12202         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12203         delete.
12204
12205 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12206
12207         * varobj.c (varobj_clear_saved_item): Use delete instead of
12208         xfree.
12209         (update_dynamic_varobj_children): Likewise.
12210
12211 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12212
12213         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12214
12215 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12216
12217         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12218         m_enum_value to 0 in default constructor.
12219
12220 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12221
12222         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12223         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12224         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12225         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12226         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12227         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12228         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12229         IS_STORE_CONDITIONAL_INSN.
12230
12231 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12232
12233         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12234
12235 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12236
12237         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12238
12239 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12240
12241         * dwarf2read.c (skip_one_die, read_attribute_value)
12242         (dwarf2_const_value_attr, dump_die_shallow)
12243         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12244         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12245
12246 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12247
12248         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12249         (dwarf_parse_macro_header): Accept DWARF version 5.
12250         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12251
12252 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12253
12254         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12255         DW_AT_GNU_*.
12256         * common/common-exceptions.h (enum errors): Likewise.
12257         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12258         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12259         (dwarf_expr_context::execute_stack_op): Likewise.
12260         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12261         Likewise.
12262         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12263         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12264         (show_entry_values_debug, call_site_to_target_addr)
12265         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12266         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12267         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12268         (value_of_dwarf_block_entry, indirect_pieced_value)
12269         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12270         (disassemble_dwarf_expression): Likewise.
12271         * dwarf2read.c (process_die, inherit_abstract_dies)
12272         (read_call_site_scope): Likewise.
12273         * gdbtypes.h (struct func_type, struct call_site_parameter)
12274         (struct call_site): Likewise.
12275         * stack.c (read_frame_arg): Likewise.
12276         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12277
12278 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12279
12280         * defs.h (read_unsigned_leb128): New declaration.
12281         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12282         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12283         (dwarf2_find_location_expression): Call also
12284         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12285         * dwarf2loc.h (dwarf2_version): New declaration.
12286         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12287         rnglists.
12288         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12289         .debug_rnglists.
12290         (struct dwop_section_names): Add loclists_dwo.
12291         (dwop_section_names): Add .debug_loclists.dwo.
12292         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12293         (struct dwarf2_per_cu_data): Add dwarf_version.
12294         (struct dwo_sections): Add loclists.
12295         (struct attr_abbrev): Add implicit_const.
12296         (read_indirect_line_string): New declaration.
12297         (read_unsigned_leb128): Delete declaration.
12298         (rcuh_kind): New definition.
12299         (read_and_check_comp_unit_head): Change parameter
12300         is_debug_types_section to section_kind.
12301         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12302         (read_comp_unit_head): Change parameter abfd to section, add parameter
12303         section_kind.  Handle DWARF-5.
12304         (error_check_comp_unit_head): Accept also DWARF version 5.
12305         (read_and_check_comp_unit_head): Change parameter
12306         is_debug_types_section to section_kind.
12307         (read_and_check_type_unit_head): Delete function.
12308         (read_abbrev_offset): Handle DWARF-5.
12309         (create_debug_type_hash_table): Add parameter section_kind.  Process
12310         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12311         comp_unit_head.
12312         (create_debug_types_hash_table): Update create_debug_type_hash_table
12313         caller.
12314         (create_all_type_units): Call create_debug_type_hash_table.
12315         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12316         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12317         caller.
12318         (skip_one_die): Handle DW_FORM_implicit_const.
12319         (dwarf2_rnglists_process): New function.
12320         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12321         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12322         (read_attribute_value): Handle DW_FORM_implicit_const,
12323         DW_FORM_line_strp.
12324         (read_attribute): Handle DW_FORM_implicit_const.
12325         (read_indirect_string_at_offset_from): New function from
12326         read_indirect_string_at_offset.
12327         (read_indirect_string_at_offset): Call
12328         read_indirect_string_at_offset_from.
12329         (read_indirect_line_string_at_offset): New function.
12330         (read_indirect_string): New function comment.
12331         (read_indirect_line_string): New function.
12332         (read_unsigned_leb128): Make it global.
12333         (dwarf2_string_attr): Handle DWARF-5.
12334         (add_include_dir_stub, read_formatted_entries): New functions.
12335         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12336         Handle DWARF-5.
12337         (per_cu_header_read_in): Update read_comp_unit_head caller.
12338         (dwarf2_version): New function.
12339         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12340         rnglists.
12341         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12342         fields.
12343
12344 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12345
12346         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12347
12348 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12349
12350         * dwarf2read.c (dwarf2_ranges_process): New function from
12351         dwarf2_ranges_read.
12352         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12353         dwarf2_ranges_process.
12354
12355 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12356
12357         * dwarf2read.c (create_debug_type_hash_table): New function from
12358         create_debug_types_hash_table.
12359         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12360         (create_all_type_units, open_and_init_dwo_file): Update
12361         create_debug_types_hash_table callers.
12362
12363 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12364
12365         PR gdb/16188
12366         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12367         refer to 'ap', not 'args'.
12368
12369 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12370             Pedro Alves  <palves@redhat.com>
12371
12372         PR gdb/16188
12373         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12374         calls succeeded.
12375         * fork-child.c (trace_start_error): New function.
12376         (trace_start_error_with_name): Likewise.
12377         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12378         * inf-ptrace.c (inf_ptrace_me): Likewise.
12379         * inferior.h (trace_start_error): New prototype.
12380         (trace_start_error_with_name): Likewise.
12381
12382 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12383
12384         PR gdb/21164
12385         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12386         NULL before using it.
12387         * symmisc.c (maintenance_print_symbols): Likewise.
12388         (maintenance_print_msymbols): Likewise.
12389
12390 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12391
12392         * NEWS: Add record Python bindings entry.
12393
12394 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12395
12396         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12397         py-record-full.o.
12398         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12399         * python/py-record-btrace.c, python/py-record-btrace.h,
12400         python/py-record-full.c, python/py-record-full.h: New file.
12401         * python/py-record.c: Add include for py-record-btrace.h and
12402         py-record-full.h.
12403         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12404         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12405         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12406         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12407         New definition.
12408         (gdbpy_initialize_btrace): New export.
12409         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12410
12411 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12412
12413         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12414         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12415         * python/py-record.c: New file.
12416         * python/python-internal.h (gdbpy_start_recording,
12417         gdbpy_current_recording, gdpy_stop_recording,
12418         gdbpy_initialize_record): New export.
12419         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12420         (python_GdbMethods): Add gdbpy_start_recording,
12421         gdbpy_current_recording and gdbpy_stop_recording.
12422
12423 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12424
12425         * record-btrace.c (record_btrace_record_method): New function.
12426         (init_record_btrace_ops): Initialize to_record_method.
12427         * record-full.c (record_full_record_method): New function.
12428         (init_record_full_ops, init_record_full_core_ops): Add
12429         record_full_record_method.
12430         * record.h (enum record_method): New enum.
12431         * target-debug.h (target_debug_print_enum_record_method: New define.
12432         * target-delegates.c: Regenerate.
12433         * target.c (target_record_method): New function.
12434         * target.h: Include record.h.
12435         (struct target_ops) <to_record_method>: New field.
12436         (target_record_method): New export.
12437
12438 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12439
12440         * record.h (record_start, record_stop): New export.
12441         * record.c (record_start, record_stop): New function.
12442
12443 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12444
12445         * btrace.c (btrace_fetch): Copy function call segments pointer
12446         into a vector.
12447         (btrace_clear): Clear the vector.
12448         (btrace_find_insn_by_number): Use binary search to find the correct
12449         function call segment.
12450         * btrace.h (brace_fun_p): New typedef.
12451         (struct btrace_thread_info) <functions>: New field.
12452
12453 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12454
12455         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12456         * btrace.c (btrace_decode_error): ... here.  New function.
12457         * btrace.h (btrace_decode_error): New export.
12458
12459 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12460
12461         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12462         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12463         btrace_find_insn_by_number): Remove special case for gaps.
12464         * btrace.h (btrace_insn_get_error): New export.
12465         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12466         * record-btrace.c (btrace_insn_history): Print number for gaps.
12467         (record_btrace_info, record_btrace_goto): Handle gaps.
12468
12469 2017-02-14  Tom Tromey  <tom@tromey.com>
12470
12471         PR python/13598:
12472         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12473         event.
12474         * python/py-evts.c (gdbpy_initialize_py_events): Add
12475         before_prompt registry.
12476         * python/py-events.h (events_object) <before_prompt>: New field.
12477
12478 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12479
12480         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12481
12482 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12483
12484         * symfile (_initialize_symfile): Add usage text to the load command's
12485         help text.
12486
12487 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12488
12489         * utils.c (defaulted_query): Don't query on secondary UIs.
12490
12491 2017-02-10  Tom Tromey  <tom@tromey.com>
12492
12493         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12494
12495 2017-02-10  Tom Tromey  <tom@tromey.com>
12496
12497         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12498         "cleanup" local.
12499         * python/py-type.c (typy_legacy_template_argument): Remove
12500         unnecessary "cleanup" local.
12501
12502 2017-02-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/python.c (do_start_initialization): New function, from
12505         _initialize_python.
12506         (_initialize_python): Call do_start_initialization.
12507         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12508         goto.
12509
12510 2017-02-10  Tom Tromey  <tom@tromey.com>
12511
12512         * python/py-prettyprint.c (pretty_print_one_value): Use
12513         gdbpy_ref.
12514
12515 2017-02-10  Tom Tromey  <tom@tromey.com>
12516
12517         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12518         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12519         gdbpy_ref.
12520         * python/py-type.c (field_new): Use gdbpy_ref.
12521         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12522         gdbpy_ref.
12523         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12524         (py_free_pspace): Likewise.
12525         (pspace_to_pspace_object): Likewise.
12526         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12527         (py_free_objfile): Likewise.
12528         (objfile_to_objfile_object): Likewise.
12529         * python/py-inferior.c (delete_thread_object): Use
12530         gdbpy_ref.
12531         (infpy_read_memory): Likewise.
12532         (py_free_inferior): Likewise.
12533         * python/py-evtregistry.c (create_eventregistry_object): Use
12534         gdbpy_ref.
12535         * python/py-event.c (create_event_object): Use gdbpy_ref.
12536
12537 2017-02-10  Tom Tromey  <tom@tromey.com>
12538
12539         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12540         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12541         used.
12542         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12543         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12544         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12545         python/py-framefilter.c, python/py-function.c,
12546         python/py-inferior.c, python/py-infevents.c,
12547         python/py-linetable.c, python/py-newobjfileevent.c,
12548         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12549         python/py-signalevent.c, python/py-stopevent.c,
12550         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12551         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12552         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12553         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12554
12555 2017-02-10  Tom Tromey  <tom@tromey.com>
12556
12557         * ui-out.h (ui_out_emit_type): New class.
12558         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12559         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12560         and ui_out_emit_tuple.
12561         (enumerate_locals): Likewise.
12562         (py_mi_print_variables, py_print_locals, py_print_args): Use
12563         ui_out_emit_list.
12564         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12565         ui_out_emit_list.
12566         * common/gdb_optional.h: New file.
12567
12568 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12569
12570         * MAINTAINERS (Write After Approval): Update my e-mail address.
12571
12572 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12573
12574         PR gdb/21122
12575         * breakpoint.c (_initialize_breakpoint): Update the help description
12576         of the 'commands' command to indicate that it takes a list argument.
12577
12578 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12579
12580         * interps.c (current_interp_set_logging): Remove "return".
12581
12582 2017-02-09  Gary Benson  <gbenson@redhat.com>
12583
12584         * symtab.c (add_symtab_completions): Prevent NULL pointer
12585         dereference.
12586
12587 2017-02-08  Pedro Alves  <palves@redhat.com>
12588
12589         * interps.c (interp::interp): Remove reference to quiet_p.
12590         (interp_set): Make static.  Remove dead "Switching to" output
12591         code.
12592         (interp_quiet_p, interp_set_quiet): Delete.
12593         (interpreter_exec_cmd): Don't set the interpreter quiet.
12594         * interps.h (interp_quiet_p): Make static.
12595         (class interp) <quiet_p>: Remove field
12596
12597 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12598
12599         * cli/cli-decode.c (find_command_name_length): Make it extern.
12600         * cli/cli-decode.h (find_command_name_length): Declare.
12601         * cli/cli-script.c (command_name_equals, line_first_arg):
12602         New functions.
12603         (process_next_line): Use cli-decode to parse command names.
12604         (build_command_line): Make args a constant pointer.
12605
12606 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12607
12608         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12609         Remove case-insensitive search.
12610
12611 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12612
12613         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12614         at the end of the line.  Avoids an ARI warning.
12615
12616 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12617
12618         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12619         rdseed instructions.
12620         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12621
12622 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12623
12624         PR tdep/20936
12625         Provide and use sparc32 and sparc64 target description XML files.
12626         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12627         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12628         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12629         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12630         * features/sparc/sparc32-solaris.xml: New file.
12631         * features/sparc/sparc64-solaris.xml: New file.
12632         * features/sparc/sparc32-solaris.c: Generated.
12633         * features/sparc/sparc64-solaris.c: Generated.
12634         * sparc-tdep.h: Account for differences in target descriptions.
12635         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12636         (sparc32_register_type): Use target provided registers.
12637         (validate_tdesc_registers): New function.
12638         (sparc32_gdbarch_init): Use tdesc_has_registers.
12639         Set pseudoregister functions.
12640         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12641         (sparc64_register_type): Use target provided registers.
12642         (sparc64_init_abi): Set pseudoregister functions.
12643
12644 2017-02-03  Tom Tromey  <tom@tromey.com>
12645
12646         PR rust/21097:
12647         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12648         with a single member.
12649
12650 2017-02-03  Pedro Alves  <palves@redhat.com>
12651
12652         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12653         (cli_interp_base::~cli_interp_base): New.
12654         (cli_interp): New struct.
12655         (as_cli_interp): Cast the interp itself to cli_interp.
12656         (cli_interpreter_pre_command_loop): Rename to ...
12657         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12658         parameter.
12659         (cli_interpreter_init): Rename to ...
12660         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12661         boolean.  Make extern.
12662         (cli_interpreter_resume): Rename to ...
12663         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12664         extern.
12665         (cli_interpreter_suspend): Rename to ...
12666         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12667         extern.
12668         (cli_interpreter_exec): Rename to ...
12669         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12670         extern.
12671         (cli_interpreter_supports_command_editing): Rename to ...
12672         (cli_interp_base::supports_command_editing): ... this.  Remove
12673         'interp' parameter.  Make extern.
12674         (cli_ui_out): Rename to ...
12675         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12676         Make extern.
12677         (cli_set_logging): Rename to ...
12678         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12679         parameter.  Make extern.
12680         (cli_interp_procs): Delete.
12681         (cli_interp_factory): Adjust to use "new".
12682         * cli/cli-interp.h: Include "interps.h".
12683         (struct cli_interp_base): New struct.
12684         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12685         (interp_new): Delete.
12686         (interp::interp, interp::~interp): New.
12687         (interp_set): Use bool, and return void.  Assume the interpreter
12688         has suspend, init and resume methods, and that the all return
12689         void.
12690         (set_top_level_interpreter): interp_set returns void.
12691         (interp_ui_out): Adapt.
12692         (current_interp_set_logging): Adapt.
12693         (interp_data): Delete.
12694         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12695         (interp_exec): Adapt.
12696         (top_level_interpreter_data): Delete.
12697         * interps.h (interp_init_ftype, interp_resume_ftype)
12698         (interp_suspend_ftype, interp_exec_ftype)
12699         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12700         (class interp): New.
12701         (interp_new): Delete.
12702         (interp_set): Now returns void.  Use bool.
12703         (interp_data, top_level_interpreter_data): Delete.
12704         * mi/mi-common.h: Include interps.h.
12705         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12706         init, resume, suspect, exec, interp_ui_out, set_logging and
12707         pre_command_loop methods.
12708         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12709         (mi_interpreter_init): Rename to ...
12710         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12711         bool, return void and make extern.  Adjust.
12712         (mi_interpreter_resume): ... Rename to ...
12713         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12714         return void and make extern.  Adjust.
12715         (mi_interpreter_suspend): ... Rename to ...
12716         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12717         return void and make extern.  Adjust.
12718         (mi_interpreter_exec): ... Rename to ...
12719         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12720         extern.  Adjust.
12721         (mi_interpreter_pre_command_loop): ... Rename to ...
12722         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12723         parameter and make extern.
12724         (mi_on_normal_stop_1): Adjust.
12725         (mi_ui_out): Rename to ...
12726         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12727         parameter and make extern.  Adjust.
12728         (mi_set_logging): Rename to ...
12729         (mi_interp::set_logging): ... this.  Remove the 'interp'
12730         parameter and make extern.  Adjust.
12731         (mi_interp_procs): Delete.
12732         (mi_interp_factory): Adjust to use 'new'.
12733         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12734         (mi_print_exception, mi_execute_command, mi_load_progress):
12735         Adjust.
12736         * tui/tui-interp.c (tui_interp): New class.
12737         (as_tui_interp): Return a tui_interp pointer.
12738         (tui_on_normal_stop, tui_on_signal_received)
12739         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12740         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12741         to use interp::interp_ui_out.
12742         (tui_init): Rename to ...
12743         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12744         bool, return void and make extern.  Adjust.
12745         (tui_resume): Rename to ...
12746         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12747         return void and make extern.  Adjust.
12748         (tui_suspend): Rename to ...
12749         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12750         return void and make extern.  Adjust.
12751         (tui_ui_out): Rename to ...
12752         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12753         parameter, and make extern.  Adjust.
12754         (tui_exec): Rename to ...
12755         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12756         make extern.
12757         (tui_interp_procs): Delete.
12758         (tui_interp_factory): Use "new".
12759
12760 2017-02-02  Tom Tromey  <tom@tromey.com>
12761
12762         * rust-exp.y (ends_raw_string, space_then_number)
12763         (rust_identifier_start_p): Return bool.
12764         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12765         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12766         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12767         (rust_chartype_p): Return bool.
12768         (val_print_struct, rust_print_struct_def, rust_print_type):
12769         Update.
12770         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12771         Return bool.
12772
12773 2017-02-02  Tom Tromey  <tom@tromey.com>
12774
12775         * rust-lang.c: Reindent.
12776
12777 2017-02-02  Tom Tromey  <tom@tromey.com>
12778
12779         * rust-lang.h (rust_crate_for_block): Update.
12780         * rust-lang.c (rust_crate_for_block): Return std::string.
12781         (rust_get_disr_info): Use std:;string, not
12782         gdb::unique_xmalloc_ptr.
12783         * rust-exp.y (crate_name): Update.
12784
12785 2017-02-02  Pedro Alves  <palves@redhat.com>
12786
12787         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12788         field out of gdb_disassembler_test and make it static.
12789
12790 2017-02-02  Pedro Alves  <palves@redhat.com>
12791
12792         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12793         mi1_interp and mi_interp fields.
12794
12795 2017-02-02  Pedro Alves  <palves@redhat.com>
12796
12797         * cli/cli-interp.c (struct saved_output_files, saved_output):
12798         Moved from cli/cli-logging.c.
12799         (cli_set_logging): New function.
12800         (cli_interp_procs): Install cli_set_logging.
12801         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12802         Declare.
12803         * cli/cli-logging.c (struct saved_output_files, saved_output):
12804         Moved to cli/cli-interp.c.
12805         (pop_output_files): Don't save outputs here.
12806         (make_logging_output): New function.
12807         (handle_redirections): Don't build tee nor save previous outputs
12808         here.
12809         * interps.c (current_interp_set_logging): Change prototype.
12810         Assume there's always a set_logging_proc method installed.
12811         * interps.h (interp_set_logging_ftype): Change prototype.
12812         (current_interp_set_logging): Change prototype and adjust comment.
12813         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12814         use make_logging_output.
12815         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12816 2017-02-02  Pedro Alves  <palves@redhat.com>
12817
12818         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12819         from ...
12820         (set_logging_overwrite): ... here.
12821         (logging_no_redirect_file): Delete.
12822         (set_logging_redirect): Don't handle redirection on the fly.
12823         Instead warn that "logging off" / "logging on" is necessary.
12824         (pop_output_files): Delete references to logging_no_redirect_file.
12825         (show_logging_command): Always speak in terms of what will happen
12826         once logging is reenabled.
12827
12828 2017-02-02  Pedro Alves  <palves@redhat.com>
12829
12830         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12831
12832 2017-02-02  Pedro Alves  <palves@redhat.com>
12833
12834         * disasm.c (gdb_pretty_print_insn): Rename to ...
12835         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12836         Remove gdbarch parameter.  Adapt to clear the object's buffers
12837         instead of allocating new buffers, and to print using the object's
12838         gdb_disassembler instead of calling gdb_print_insn.
12839         (dump_insns): Use gdb_pretty_print_disassembler.
12840         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12841         (gdb_pretty_print_disassembler): New class.
12842         * record-btrace.c (btrace_insn_history): Use
12843         gdb_pretty_print_disassembler.
12844
12845 2017-02-02  Pedro Alves  <palves@redhat.com>
12846
12847         * ada-lang.c (type_as_string): Use string_file.
12848         * ada-valprint.c (ada_print_floating): Use string_file.
12849         * ada-varobj.c (ada_varobj_scalar_image)
12850         (ada_varobj_get_value_image): Use string_file.
12851         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12852         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12853         * breakpoint.c (update_inserted_breakpoint_locations)
12854         (insert_breakpoint_locations, reattach_breakpoints)
12855         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12856         (print_it_watchpoint): Use string_file.
12857         (save_breakpoints): Use stdio_file.
12858         * c-exp.y (oper): Use string_file.
12859         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12860         tee_file.
12861         (pop_output_files): Use delete.
12862         (handle_redirections): Use stdio_file and tee_file.
12863         * cli/cli-setshow.c (do_show_command): Use string_file.
12864         * compile/compile-c-support.c (c_compute_program): Use
12865         string_file.
12866         * compile/compile-c-symbols.c (generate_vla_size): Take a
12867         'string_file &' instead of a 'ui_file *'.
12868         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12869         of a 'ui_file *'.  Use string_file.
12870         (generate_c_for_variable_locations): Take a 'string_file &'
12871         instead of a 'ui_file *'.
12872         * compile/compile-internal.h (generate_c_for_for_one_variable):
12873         Take a 'string_file &' instead of a 'ui_file *'.
12874         * compile/compile-loc2c.c (push, pushf, unary, binary)
12875         (print_label, pushf_register_address, pushf_register)
12876         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12877         'ui_file *'.  Adjust.
12878         * compile/compile.c (compile_to_object): Use string_file.
12879         * compile/compile.h (compile_dwarf_expr_to_c)
12880         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12881         'ui_file *'.
12882         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12883         (replace_typedefs_qualified_name): Use string_file and
12884         obstack_copy0.
12885         * disasm.c (gdb_pretty_print_insn): Use string_file.
12886         (gdb_disassembly): Adjust reference the null_stream global.
12887         (do_ui_file_delete): Delete.
12888         (gdb_insn_length): Use null_stream.
12889         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12890         * dwarf2loc.c (dwarf2_compile_property_to_c)
12891         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12892         'string_file &' instead of a 'ui_file *'.
12893         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12894         * dwarf2read.c (do_ui_file_peek_last): Delete.
12895         (dwarf2_compute_name): Use string_file.
12896         * event-top.c (gdb_setup_readline): Use stdio_file.
12897         * gdbarch.sh (verify_gdbarch): Use string_file.
12898         * gdbtypes.c (safe_parse_type): Use null_stream.
12899         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12900         string_file.
12901         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12902         'string_file *' instead of a 'ui_file *'.
12903         (gdbscm_arch_disassemble): Use string_file.
12904         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12905         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12906         inherits from ui_file.
12907         (ioscm_file_port_delete, ioscm_file_port_rewind)
12908         (ioscm_file_port_put): Delete.
12909         (ioscm_file_port_write): Rename to ...
12910         (ioscm_file_port::write): ... this.  Remove file_port_magic
12911         checks.
12912         (ioscm_file_port_new): Delete.
12913         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12914         ui_file_up.
12915         * guile/scm-type.c (tyscm_type_name): Use string_file.
12916         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12917         Use string_file.
12918         * infcmd.c (print_return_value_1): Use string_file.
12919         * infrun.c (print_target_wait_results): Use string_file.
12920         * language.c (add_language): Use string_file.
12921         * location.c (explicit_to_string_internal): Use string_file.
12922         * main.c (captured_main_1): Use null_file.
12923         * maint.c (maintenance_print_architecture): Use stdio_file.
12924         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12925         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12926         event_channel>: Change type to mi_console_file pointer.
12927         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12928         (mi_console_file_delete): Delete.
12929         (struct mi_console_file): Delete.
12930         (mi_console_file_magic): Delete.
12931         (mi_console_file_new): Delete.
12932         (mi_console_file::mi_console_file): New.
12933         (mi_console_file_delete): Delete.
12934         (mi_console_file_fputs): Delete.
12935         (mi_console_file::write): New.
12936         (mi_console_raw_packet): Delete.
12937         (mi_console_file::flush): New.
12938         (mi_console_file_flush): Delete.
12939         (mi_console_set_raw): Rename to ...
12940         (mi_console_file::set_raw): ... this.
12941         * mi/mi-console.h (class mi_console_file): New class.
12942         (mi_console_file_new, mi_console_set_raw): Delete.
12943         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12944         (mi_set_logging): Use delete and tee_file.  Adjust.
12945         * mi/mi-main.c (output_register): Use string_file.
12946         (mi_cmd_data_evaluate_expression): Use string_file.
12947         (mi_cmd_data_read_memory): Use string_file.
12948         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12949         * mi/mi-out.c (mi_ui_out::main_stream): New.
12950         (mi_ui_out::rewind): Use main_stream and
12951         string_file.
12952         (mi_ui_out::put): Use main_stream and string_file.
12953         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12954         Allocate a 'string_file' instead.
12955         (mi_out_new): Don't allocate a mem_fileopen stream here.
12956         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12957         (mi_ui_out::main_stream): Declare method.
12958         * printcmd.c (eval_command): Use string_file.
12959         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12960         * python/py-arch.c (archpy_disassemble): Use string_file.
12961         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12962         * python/py-frame.c (frapy_str): Use string_file.
12963         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12964         Use string_file.
12965         * python/py-type.c (typy_str): Use string_file.
12966         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12967         * python/py-value.c (valpy_str): Use string_file.
12968         * record-btrace.c (btrace_insn_history): Use string_file.
12969         * regcache.c (regcache_print): Use stdio_file.
12970         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12971         * remote.c (escape_buffer): Use string_file.
12972         * rust-lang.c (rust_get_disr_info): Use string_file.
12973         * serial.c (serial_open_ops_1): Use stdio_file.
12974         (do_serial_close): Use delete.
12975         * stack.c (print_frame_arg): Use string_file.
12976         (print_frame_args): Remove local mem_fileopen stream, not used.
12977         (print_frame): Use string_file.
12978         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12979         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12980         Take a 'string_file *' instead of a 'ui_file *'.
12981         * top.c (new_ui): Use stdio_file and stderr_file.
12982         (free_ui): Use delete.
12983         (execute_command_to_string): Use string_file.
12984         (quit_confirm): Use string_file.
12985         * tracepoint.c (collection_list::append_exp): Use string_file.
12986         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12987         * tui/tui-file.c: Don't include "ui-file.h".
12988         (enum streamtype, struct tui_stream): Delete.
12989         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12990         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12991         (tui_file::tui_file): New method.
12992         (tui_file_fputs): Delete.
12993         (tui_file_get_strbuf): Delete.
12994         (tui_file::puts): New method.
12995         (tui_file_adjust_strbuf): Delete.
12996         (tui_file_flush): Delete.
12997         (tui_file::flush): New method.
12998         * tui/tui-file.h: Tweak intro comment.
12999         Include ui-file.h.
13000         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13001         (tui_file_adjust_strbuf): Delete declarations.
13002         (class tui_file): New class.
13003         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13004         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13005         (tui_register_format): Use string_stream.
13006         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13007         (tui_get_function_from_frame): Use string_file.
13008         * typeprint.c (type_to_string): Use string_file.
13009         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13010         (null_stream): New global.
13011         (ui_file_delete): Delete.
13012         (ui_file::ui_file): New.
13013         (null_file_isatty): Delete.
13014         (ui_file::~ui_file): New.
13015         (null_file_rewind): Delete.
13016         (ui_file::printf): New.
13017         (null_file_put): Delete.
13018         (null_file_flush): Delete.
13019         (ui_file::putstr): New.
13020         (null_file_write): Delete.
13021         (ui_file::putstrn): New.
13022         (null_file_read): Delete.
13023         (ui_file::putc): New.
13024         (null_file_fputs): Delete.
13025         (null_file_write_async_safe): Delete.
13026         (ui_file::vprintf): New.
13027         (null_file_delete): Delete.
13028         (null_file::write): New.
13029         (null_file_fseek): Delete.
13030         (null_file::puts): New.
13031         (ui_file_data): Delete.
13032         (null_file::write_async_safe): New.
13033         (gdb_flush, ui_file_isatty): Adjust.
13034         (ui_file_put, ui_file_rewind): Delete.
13035         (ui_file_write): Adjust.
13036         (ui_file_write_for_put): Delete.
13037         (ui_file_write_async_safe, ui_file_read): Adjust.
13038         (ui_file_fseek): Delete.
13039         (fputs_unfiltered): Adjust.
13040         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13041         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13042         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13043         (set_ui_file_data): Delete.
13044         (string_file::~string_file, string_file::write)
13045         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13046         (do_ui_file_as_string, ui_file_as_string): Delete.
13047         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13048         (struct mem_file): Delete.
13049         (mem_file_new): Delete.
13050         (stdio_file::stdio_file): New.
13051         (mem_file_delete): Delete.
13052         (stdio_file::stdio_file): New.
13053         (mem_fileopen): Delete.
13054         (stdio_file::~stdio_file): New.
13055         (mem_file_rewind): Delete.
13056         (stdio_file::set_stream): New.
13057         (mem_file_put): Delete.
13058         (stdio_file::open): New.
13059         (mem_file_write): Delete.
13060         (stdio_file_magic, struct stdio_file): Delete.
13061         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13062         (stdio_file::flush): New.
13063         (stdio_file_read): Rename to ...
13064         (stdio_file::read): ... this.  Adjust.
13065         (stdio_file_write): Rename to ...
13066         (stdio_file::write): ... this.  Adjust.
13067         (stdio_file_write_async_safe): Rename to ...
13068         (stdio_file::write_async_safe) ... this.  Adjust.
13069         (stdio_file_fputs): Rename to ...
13070         (stdio_file::puts) ... this.  Adjust.
13071         (stdio_file_isatty): Delete.
13072         (stdio_file_fseek): Delete.
13073         (stdio_file::isatty): New.
13074         (stderr_file_write): Rename to ...
13075         (stderr_file::write) ... this.  Adjust.
13076         (stderr_file_fputs): Rename to ...
13077         (stderr_file::puts) ... this.  Adjust.
13078         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13079         (stderr_file::stderr_file): New.
13080         (tee_file_magic): Delete.
13081         (struct tee_file): Delete.
13082         (tee_file::tee_file): New.
13083         (tee_file_new): Delete.
13084         (tee_file::~tee_file): New.
13085         (tee_file_delete): Delete.
13086         (tee_file_flush): Rename to ...
13087         (tee_file::flush): ... this.  Adjust.
13088         (tee_file_write): Rename to ...
13089         (tee_file::write): ... this.  Adjust.
13090         (tee_file::write_async_safe): New.
13091         (tee_file_fputs): Rename to ...
13092         (tee_file::puts): ... this.  Adjust.
13093         (tee_file_isatty): Rename to ...
13094         (tee_file::isatty): ... this.  Adjust.
13095         * ui-file.h (struct obstack, struct ui_file): Don't
13096         forward-declare.
13097         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13098         (ui_file_write_ftype)
13099         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13100         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13101         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13102         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13103         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13104         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13105         (set_ui_file_fseek): Delete.
13106         (ui_file_data, ui_file_delete, ui_file_rewind)
13107         (struct ui_file): New.
13108         (ui_file_up): New.
13109         (class null_file): New.
13110         (null_stream): Declare.
13111         (ui_file_write_for_put, ui_file_put): Delete.
13112         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13113         Delete.
13114         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13115         (gdb_fopen, tee_file_new): Delete.
13116         (struct string_file): New.
13117         (struct stdio_file): New.
13118         (stdio_file_up): New.
13119         (struct stderr_file): New.
13120         (class tee_file): New.
13121         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13122         of a 'ui_file *'.  Adjust.
13123         * ui-out.h (class ui_out) <field_stream>: Likewise.
13124         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13125         (null_stream): Delete.
13126         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13127         Adjust.
13128         * utils.h (struct ui_file): Delete forward declaration..
13129         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13130         (error_stream): Take a 'string_file &' instead of a
13131         'ui_file *'.
13132         * varobj.c (varobj_value_get_print_value): Use string_file.
13133         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13134         * gdbarch.c: Regenerate.
13135
13136 2017-02-02  Pedro Alves  <palves@redhat.com>
13137
13138         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13139         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13140         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13141         Adjust to call gdb_print_insn instead of
13142         gdb_disassembler::print_insn.
13143         (dump_insns, do_mixed_source_and_assembly_deprecated)
13144         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13145         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13146         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13147         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13148         declaration.
13149         (gdb_pretty_print_insn): Re-add declaration.
13150         * record-btrace.c (btrace_insn_history): Don't allocate a
13151         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13152
13153 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13154
13155         * disasm.h (gdb_disassembly): Remove file_string parameter.
13156         * disasm.c (gdb_disassembly): Likewise.
13157         * cli/cli-cmds.c (print_disassembly): Adapt.
13158         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13159         * stack.c (do_gdb_disassembly): Likewise.
13160
13161 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13162
13163         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13164         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13165         targets.  And if the implicit value is longer than needed, extract
13166         the first bytes instead of the "least significant" ones.
13167
13168 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13169
13170         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13171         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13172         (btrace_fetch): Assert can_access_registers_ptid.
13173         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13174         validate_registers_access.
13175
13176 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13177
13178         * gdbthread.h (can_access_registers_ptid): New.
13179         * thread.c (can_access_registers_ptid): New.
13180
13181 2017-02-01  Pedro Alves  <palves@redhat.com>
13182
13183         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13184
13185 2017-01-31  Pedro Alves  <palves@redhat.com>
13186
13187         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13188         Fix typos.
13189
13190 2017-01-31  Pedro Alves  <palves@redhat.com>
13191
13192         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13193         not used.
13194
13195 2017-01-31  Pedro Alves  <palves@redhat.com>
13196
13197         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13198
13199 2017-01-31  Pedro Alves  <palves@redhat.com>
13200
13201         * common/scoped_restore.h
13202         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13203         change the value's parameter type to T2.
13204         (make_scoped_restore): Likewise.
13205
13206 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13207             Richard Henderson  <rth@redhat.com>
13208
13209         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13210         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13211         GS_BASE for older kernels.
13212         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13213         GS_BASE for older kernels.
13214         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13215         and GS_BASE to the offset table.
13216         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13217         system register group.
13218         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13219         for older kernels.
13220         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13221         amd64 ABI.
13222         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13223         AMD64_GSBASE_REGNUM.
13224         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13225         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13226         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13227         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13228         i386/64bit-segments.xml in those rules.
13229         * features/i386/64bit-segments.xml: New file.
13230         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13231         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13232         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13233         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13234         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13235         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13236         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13237         * features/i386/amd64-avx-linux.c: Regenerated.
13238         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13239         * features/i386/amd64-avx-mpx.c: Regenerated.
13240         * features/i386/amd64-avx512-linux.c: Regenerated.
13241         * features/i386/amd64-linux.c: Regenerated.
13242         * features/i386/amd64-mpx-linux.c: Regenerated.
13243         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13244         * features/i386/i386-avx-mpx.c: Regenerated.
13245         * features/i386/x32-avx-linux.c: Regenerated.
13246         * features/i386/x32-avx512-linux.c: Regenerated.
13247         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13248         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13249         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13250         * regformats/i386/amd64-linux.dat: Regenerated.
13251         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13252         * regformats/i386/x32-avx-linux.dat: Regenerated.
13253         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13254         * regformats/i386/x32-linux.dat: Regenerated.
13255
13256 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13257
13258         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13259         Set to AMD64_NUM_REGS.
13260
13261 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13262
13263         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13264         that checks validity of a register number.
13265
13266 2017-01-27  Kees Cook  <keescook@google.com>
13267
13268         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13269         fetch_fpregs if target has fpa registers.
13270         (arm_linux_store_inferior_registers): Call store_fpregs if target
13271         has fpa registers.
13272
13273 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13274
13275         * cris-tdep.c (cris_gdbarch_init): Remove check for
13276         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13277
13278 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13279
13280         * corelow.c (get_core_register_section): Check for regset
13281         existence before checking for REGSET_VARIABLE_SIZE.
13282
13283 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13284             Pedro Alves  <palves@redhat.com>
13285
13286         PR gdb/20939
13287         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13288         call memory_error, save memaddr instead.
13289         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13290         negative, cal memory_error.
13291         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13292
13293 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13294
13295         * disasm-selftests.c (memory_error_test): New function.
13296         (_initialize_disasm_selftests): Register memory_error_test.
13297
13298 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13299
13300         * Makefile.in (SFILES): Add disasm-selftests.c and
13301         selftest-arch.c.
13302         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13303         * disasm-selftests.c: New file.
13304         * selftest-arch.c: New file.
13305         * selftest-arch.h: New file.
13306
13307 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13308
13309         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13310         to bfd_arch_mep.  Don't return 0 if section is not
13311         found.  Call print_insn_mep.
13312
13313 2017-01-26  Pedro Alves  <palves@redhat.com>
13314             Yao Qi  <yao.qi@linaro.org>
13315
13316         * arm-tdep.c: Include "disasm.h".
13317         (gdb_print_insn_arm): Update code to get gdbarch.
13318         * disasm.c (dis_asm_read_memory): Change it to
13319         gdb_disassembler::dis_asm_read_memory.
13320         (dis_asm_memory_error): Likewise.
13321         (dis_asm_print_address): Likewise.
13322         (gdb_pretty_print_insn): Change it to
13323         gdb_disassembler::pretty_print_insn.
13324         (dump_insns): Add one argument gdb_disassemlber.  All
13325         callers updated.
13326         (do_mixed_source_and_assembly_deprecated): Likewise.
13327         (do_mixed_source_and_assembly): Likewise.
13328         (do_assembly_only): Likewise.
13329         (gdb_disassembler::gdb_disassembler): New.
13330         (gdb_disassembler::print_insn): New.
13331         * disasm.h (class gdb_disassembler): New.
13332         (gdb_pretty_print_insn): Remove declaration.
13333         (gdb_disassemble_info): Likewise.
13334         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13335         (gdbscm_disasm_read_memory_worker): Update.
13336         (gdbscm_disasm_read_memory): Update.
13337         (gdbscm_disasm_memory_error): Remove.
13338         (gdbscm_disasm_print_address): Remove.
13339         (gdbscm_disassembler::gdbscm_disassembler): New.
13340         (gdbscm_print_insn_from_port): Update.
13341         * mips-tdep.c: Include disasm.h.
13342         (gdb_print_insn_mips): Update code to get gdbarch.
13343         * record-btrace.c (btrace_insn_history): Update.
13344         * spu-tdep.c: Include disasm.h.
13345         (struct spu_dis_asm_data): Remove.
13346         (struct spu_dis_asm_info): New.
13347         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13348         SPU id.
13349         (gdb_print_insn_spu): Cast disassemble_info to
13350         spu_dis_asm_info.
13351
13352 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13353
13354         * disasm.c (do_ui_file_delete): Delete.
13355         (gdb_insn_length): Move code creating stream to ...
13356         * utils.c (null_stream): ... here.  New function.
13357         * utils.h (null_stream): Declare.
13358
13359 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13360
13361         * python/py-inferior.c (find_thread_object): Return directly
13362         from the loop.  Remove "found" variable.
13363
13364 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13365
13366         GDB 7.12.1 released.
13367
13368 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13369
13370         * python/py-function.c (fnpy_call): Reorder declarations to have
13371         the gdbpy_enter object declared first.
13372         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13373
13374 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13375
13376         PR python/21068
13377         * python/python-internal.h (PyMem_RawMalloc): Define for
13378         Python < 3.4.
13379         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13380         PyMem_RawMalloc instead of PyMem_Malloc.
13381
13382 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13383             Luis Machado  <lgustavo@codesourcery.com>
13384
13385         * NEWS (New commands): Mention flash-erase.
13386         (New MI commands): Mention target-flash-erase.
13387         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13388         command.
13389         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13390         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13391         * target.c (flash_erase_command): New function.
13392         (initialize_targets): Add new flash-erase command.
13393         * target.h (flash_erase_command): New declaration.
13394
13395 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13396
13397         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13398         HAVE_SYS_PROCFS_H is defined.
13399
13400 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13401
13402         * remote.c (struct cached_reg): Change data into a pointer.
13403         * (stop_reply_dtr): Free data pointers before deleting vector.
13404         (process_stop_reply): Likewise.
13405         (remote_parse_stop_reply): Allocate space for data
13406
13407 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13408
13409         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13410         MAX_REGISTER_SIZE.
13411         (amd64_pseudo_register_read_value): Likewise.
13412         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13413         (store_register_using_P): Likewise.
13414         * regcache.c (regcache_xfer_part): Likewise.
13415
13416 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13417
13418         Split real and pseudo registers.
13419         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13420         (sparc32_pseudo_regnum): New enum.
13421         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13422         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13423         (SPARC32_CP0_REGISTERS): New macro.
13424         (sparc32_pseudo_register_name): New function.
13425         (sparc32_register_name): Use sparc32_pseudo_register_name.
13426         (sparc32_pseudo_register_type): New function.
13427         (sparc32_register_type): Use sparc32_pseudo_register_type.
13428         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13429         pseudo register numbers.
13430         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13431         (SPARC64_CP0_REGISTERS): New macro.
13432         (sparc64_pseudo_register_name): New function.
13433         (sparc64_register_name): Use sparc64_pseudo_register_name.
13434         (sparc64_pseudo_register_type): New function.
13435         (sparc64_register_type): Use sparc64_pseudo_register_type.
13436         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13437         pseudo register numbers.
13438         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13439         sparc64_store_arguments): Handle pseudo register numbers.
13440
13441 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13442
13443         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13444         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13445         output.
13446         (getpkt_or_notif_sane_1): Likewise.
13447
13448 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13449
13450         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13451         of CC.  Pass "-x c++-header" instead of "-x c".
13452
13453 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13454
13455         * remote.c (remote_can_async_p): Update comment.
13456
13457 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13458
13459         * linux-nat.c (linux_nat_can_async_p): Update comment.
13460
13461 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13462
13463         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13464
13465 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13466
13467         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13468
13469 2017-01-10  Tom Tromey  <tom@tromey.com>
13470
13471         * python/py-type.c (typy_legacy_template_argument): Update.
13472         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13473         ~demangle_parse_info): Declare new members.
13474         (cp_demangled_name_to_comp): Return unique_ptr.
13475         (cp_demangled_name_parse_free)
13476         (make_cleanup_cp_demangled_name_parse_free)
13477         (cp_new_demangle_parse_info): Remove.
13478         * cp-support.c (do_demangled_name_parse_free_cleanup)
13479         (make_cleanup_cp_demangled_name_parse_free): Remove.
13480         (inspect_type, cp_canonicalize_string_full)
13481         (cp_canonicalize_string): Update.
13482         (mangled_name_to_comp): Change return type.
13483         (cp_class_name_from_physname, method_name_from_physname)
13484         (cp_func_name, cp_remove_params): Update.
13485         * cp-name-parser.y (demangle_parse_info): New constructor, from
13486         cp_new_demangle_parse_info.
13487         (~demangle_parse_info): New destructor, from
13488         cp_demangled_name_parse_free.
13489         (cp_merge_demangle_parse_infos): Update.
13490         (cp_demangled_name_to_comp): Change return type.
13491
13492 2017-01-10  Tom Tromey  <tom@tromey.com>
13493
13494         * top.c (prevent_dont_repeat): Change return type.
13495         * python/python.c (execute_gdb_command): Use std::string.
13496         Update.
13497         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13498         * command.h (prevent_dont_repeat): Change return type.
13499         * breakpoint.c (bpstat_do_actions_1): Update.
13500
13501 2017-01-10  Tom Tromey  <tom@tromey.com>
13502
13503         * value.h (scoped_value_mark::~scoped_value_mark): Call
13504         free_to_mark.
13505         (scoped_value_mark::free_to_mark): New method.
13506         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13507         scoped_value_mark.
13508
13509 2017-01-10  Tom Tromey  <tom@tromey.com>
13510
13511         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13512         (valpy_reference_value, valpy_const_value, valpy_get_address)
13513         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13514         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13515         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13516         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13517         scoped_value_mark.
13518         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13519         * value.h (scoped_value_mark): New class.
13520
13521 2017-01-10  Tom Tromey  <tom@tromey.com>
13522
13523         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13524         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13525         * psymtab.c (discard_psymtabs_upto): Remove.
13526         (make_cleanup_discard_psymtabs): Remove.
13527         (struct psymtab_state): Remove.
13528
13529 2017-01-10  Tom Tromey  <tom@tromey.com>
13530
13531         * record-full.c (record_full_save_cleanups): Remove.
13532         (record_full_save): Use gdb::unlinker.
13533         * gcore.c (do_bfd_delete_cleanup): Remove.
13534         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13535         cleanups.
13536         * dwarf2read.c (unlink_if_set): Remove.
13537         (write_psymtabs_to_index): Use gdb::unlinker.
13538         * common/gdb_unlinker.h: New file.
13539
13540 2017-01-10  Tom Tromey  <tom@tromey.com>
13541
13542         * windows-tdep.c (windows_xfer_shared_library): Update.
13543         * windows-nat.c (windows_make_so): Update.
13544         * utils.h (make_cleanup_bfd_unref): Remove.
13545         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13546         * symfile.h (symfile_bfd_open)
13547         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13548         * symfile.c (read_symbols, symbol_file_add)
13549         (separate_debug_file_exists): Update.
13550         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13551         (generic_load, reread_symbols): Update.
13552         * symfile-mem.c (symbol_file_add_from_memory): Update.
13553         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13554         (spu_symbol_file_add_from_memory): Update.
13555         * solist.h (struct target_so_ops) <bfd_open>: Return
13556         gdb_bfd_ref_ptr.
13557         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13558         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13559         gdb_bfd_ref_ptr.
13560         (solib_map_sections, reload_shared_libraries_1): Update.
13561         * solib-svr4.c (enable_break): Update.
13562         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13563         * solib-frv.c (enable_break2): Update.
13564         * solib-dsbt.c (enable_break): Update.
13565         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13566         gdb_bfd_ref_ptr.
13567         (darwin_solib_get_all_image_info_addr_at_init): Update.
13568         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13569         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13570         * record-full.c (record_full_save): Update.
13571         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13572         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13573         * minidebug.c (find_separate_debug_file_in_section): Return
13574         gdb_bfd_ref_ptr.
13575         * machoread.c (macho_add_oso_symfile): Change abfd to
13576         gdb_bfd_ref_ptr.
13577         (macho_symfile_read_all_oso): Update.
13578         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13579         (macho_symfile_read): Update.
13580         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13581         (jit_bfd_try_read_symtab): Update.
13582         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13583         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13584         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13585         gdb_bfd_ref_ptr.
13586         (gdb_bfd_ref_policy): New struct.
13587         (gdb_bfd_ref_ptr): New typedef.
13588         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13589         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13590         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13591         gdb_bfd_ref_ptr.
13592         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13593         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13594         (gcore_command): Update.
13595         * exec.c (exec_file_attach): Update.
13596         * elfread.c (elf_symfile_read): Update.
13597         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13598         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13599         (open_and_init_dwo_file): Update.
13600         (open_dwp_file): Return gdb_bfd_ref_ptr.
13601         (open_and_init_dwp_file): Update.
13602         * corelow.c (core_open): Update.
13603         * compile/compile-object-load.c (compile_object_load): Update.
13604         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13605         * coffread.c (coff_symfile_read): Update.
13606         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13607         gdb_bfd_ref_ptr.  Rename.
13608         (dump_bfd_file, restore_command): Update.
13609         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13610         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13611         (find_separate_debug_file_by_buildid): Update.
13612
13613 2017-01-10  Tom Tromey  <tom@tromey.com>
13614
13615         * common/gdb_ref_ptr.h: New file.
13616         * python/py-ref.h (struct gdbpy_ref_policy): New.
13617         (gdbpy_ref): Now a typedef.
13618
13619 2017-01-10  Tom Tromey  <tom@tromey.com>
13620
13621         * utils.h (make_cleanup_htab_delete): Don't declare.
13622         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13623         Remove.
13624         * linespec.c (decode_compound_collector): Add constructor,
13625         destructor.
13626         (lookup_prefix_sym): Remove cleanup.
13627         (symtab_collector): Add constructor, destructor.
13628         (collect_symtabs_from_filename): Remove cleanup.
13629         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13630         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13631         Use htab_up.
13632         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13633         * dwarf2read.c (dw2_expand_symtabs_matching)
13634         (dw2_map_symbol_filenames, dwarf_decode_macros)
13635         (write_psymtabs_to_index): Use htab_up.
13636         * dwarf2loc.c (func_verify_no_selftailcall)
13637         (call_site_find_chain_1, func_verify_no_selftailcall)
13638         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13639         std::vector, gdb::unique_xmalloc_ptr.
13640         (call_sitep): Remove typedef.
13641         (dwarf2_locexpr_baton_eval): Remove unused variable.
13642
13643 2017-01-10  Tom Tromey  <tom@tromey.com>
13644
13645         * python/python-internal.h (make_cleanup_py_decref)
13646         (make_cleanup_py_xdecref): Don't declare.
13647         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13648         (py_xdecref, make_cleanup_py_xdecref): Remove.
13649
13650 2017-01-10  Tom Tromey  <tom@tromey.com>
13651
13652         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13653         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13654
13655 2017-01-10  Tom Tromey  <tom@tromey.com>
13656
13657         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13658
13659 2017-01-10  Tom Tromey  <tom@tromey.com>
13660
13661         * python/py-utils.c (unicode_to_encoded_string)
13662         (python_string_to_target_string)
13663         (python_string_to_target_python_string)
13664         (python_string_to_host_string, gdbpy_obj_to_string)
13665         (get_addr_from_python): Use gdbpy_ref.
13666
13667 2017-01-10  Tom Tromey  <tom@tromey.com>
13668
13669         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13670         gdbpy_ref.
13671
13672 2017-01-10  Tom Tromey  <tom@tromey.com>
13673
13674         * python/python.c (eval_python_command, gdbpy_decode_line)
13675         (gdbpy_run_events, gdbpy_start_type_printers)
13676         (gdbpy_apply_type_printers): Use gdbpy_ref.
13677
13678 2017-01-10  Tom Tromey  <tom@tromey.com>
13679
13680         * python/py-param.c (get_doc_string, compute_enum_values): Use
13681         gdbpy_ref.
13682
13683 2017-01-10  Tom Tromey  <tom@tromey.com>
13684
13685         * python/py-inferior.c (find_thread_object, build_inferior_list):
13686         Use gdbpy_ref.
13687
13688 2017-01-10  Tom Tromey  <tom@tromey.com>
13689
13690         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13691
13692 2017-01-10  Tom Tromey  <tom@tromey.com>
13693
13694         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13695         gdbpy_ref.
13696
13697 2017-01-10  Tom Tromey  <tom@tromey.com>
13698
13699         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13700         extra incref.
13701         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13702         Use gdbpy_ref.
13703
13704 2017-01-10  Tom Tromey  <tom@tromey.com>
13705
13706         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13707         gdbpy_ref.
13708
13709 2017-01-10  Tom Tromey  <tom@tromey.com>
13710
13711         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13712         decref results of PyArg_ParseTupleAndKeywords.
13713
13714 2017-01-10  Tom Tromey  <tom@tromey.com>
13715
13716         * python/python.c (python_run_simple_file): Use
13717         unique_xmalloc_ptr, gdbpy_ref.
13718
13719 2017-01-10  Tom Tromey  <tom@tromey.com>
13720
13721         * python/py-prettyprint.c (print_stack_unless_memory_error)
13722         (print_string_repr, print_children): Use gdbpy_ref.
13723         (dummy_python_frame): New class.
13724         (dummy_python_frame::dummy_python_frame): Rename from
13725         push_dummy_python_frame.
13726         (py_restore_tstate): Remove.
13727
13728 2017-01-10  Tom Tromey  <tom@tromey.com>
13729
13730         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13731
13732 2017-01-10  Tom Tromey  <tom@tromey.com>
13733
13734         * python/python.c (ensure_python_env, restore_python_env):
13735         Remove.
13736         * python/python-internal.h (ensure_python_env): Don't declare.
13737         * varobj.h (varobj_ensure_python_env): Don't declare.
13738         * varobj.c (varobj_ensure_python_env): Remove.
13739
13740 2017-01-10  Tom Tromey  <tom@tromey.com>
13741
13742         * varobj.c (varobj_value_get_print_value): Use
13743         gdbpy_enter_varobj.
13744
13745 2017-01-10  Tom Tromey  <tom@tromey.com>
13746
13747         * python/py-prettyprint.c (print_string_repr, print_children):
13748         Update.
13749         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13750         of "encoding".
13751         * varobj.c (varobj_value_get_print_value): Update.
13752         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13753
13754 2017-01-10  Tom Tromey  <tom@tromey.com>
13755
13756         * varobj.c (varobj_get_display_hint)
13757         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13758         (varobj_set_visualizer, free_variable): Use
13759         gdbpy_enter_varobj.
13760
13761 2017-01-10  Tom Tromey  <tom@tromey.com>
13762
13763         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13764         (do_finish_initialization): New function.  Use gdbpy_ref.
13765         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13766         do_finish_initialization.
13767
13768 2017-01-10  Tom Tromey  <tom@tromey.com>
13769
13770         * python/py-param.c (get_set_value, get_show_value): Use
13771         gdbpy_enter, gdbpy_ref.
13772
13773 2017-01-10  Tom Tromey  <tom@tromey.com>
13774
13775         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13776
13777 2017-01-10  Tom Tromey  <tom@tromey.com>
13778
13779         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13780
13781 2017-01-10  Tom Tromey  <tom@tromey.com>
13782
13783         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13784         Use gdbpy_enter_varobj.
13785
13786 2017-01-10  Tom Tromey  <tom@tromey.com>
13787
13788         * varobj.c (gdbpy_enter_varobj): New constructor.
13789         * python/python-internal.h (gdbpy_enter_varobj): New class.
13790         * python/py-varobj.c (py_varobj_get_iterator): Use
13791         gdbpy_enter_varobj.
13792
13793 2017-01-10  Tom Tromey  <tom@tromey.com>
13794
13795         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13796         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13797         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13798         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13799         unique_xmalloc_ptr.
13800         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13801
13802 2017-01-10  Tom Tromey  <tom@tromey.com>
13803
13804         * python/py-xmethods.c (invoke_match_method): Use
13805         gdbpy_ref.
13806
13807 2017-01-10  Tom Tromey  <tom@tromey.com>
13808
13809         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13810         gdbpy_enter, gdbpy_ref.
13811
13812 2017-01-10  Tom Tromey  <tom@tromey.com>
13813
13814         * python/python.c (python_interactive_command): Use gdbpy_enter.
13815
13816 2017-01-10  Tom Tromey  <tom@tromey.com>
13817
13818         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13819         gdbpy_ref.
13820
13821 2017-01-10  Tom Tromey  <tom@tromey.com>
13822
13823         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13824         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13825
13826 2017-01-10  Tom Tromey  <tom@tromey.com>
13827
13828         * utils.h (htab_deleter): New struct.
13829         (htab_up): New typedef.
13830         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13831         gdbpy_enter, gdbpy_ref, htab_up.
13832
13833 2017-01-10  Tom Tromey  <tom@tromey.com>
13834
13835         * python/py-unwind.c (pending_frame_invalidate): Remove.
13836         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13837
13838 2017-01-10  Tom Tromey  <tom@tromey.com>
13839
13840         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13841         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13842
13843 2017-01-10  Tom Tromey  <tom@tromey.com>
13844
13845         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13846
13847 2017-01-10  Tom Tromey  <tom@tromey.com>
13848
13849         * python/python.c (gdbpy_eval_from_control_command)
13850         (gdbpy_source_script, gdbpy_run_events)
13851         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13852         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13853         gdbpy_enter.
13854
13855 2017-01-10  Tom Tromey  <tom@tromey.com>
13856
13857         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13858
13859 2017-01-10  Tom Tromey  <tom@tromey.com>
13860
13861         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13862
13863 2017-01-10  Tom Tromey  <tom@tromey.com>
13864
13865         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13866         (python_on_inferior_call_pre, python_on_inferior_call_post)
13867         (python_on_memory_change, python_on_register_change)
13868         (python_inferior_exit, python_new_objfile, add_thread_object)
13869         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13870
13871 2017-01-10  Tom Tromey  <tom@tromey.com>
13872
13873         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13874         (bpfinishpy_handle_exit): Use gdbpy_enter.
13875
13876 2017-01-10  Tom Tromey  <tom@tromey.com>
13877
13878         * python/py-cmd.c (cmdpy_destroyer)
13879         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13880         gdbpy_enter.
13881
13882 2017-01-10  Tom Tromey  <tom@tromey.com>
13883
13884         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13885         gdbpy_enter.
13886         (gdbpy_breakpoint_has_cond): Likewise.
13887
13888 2017-01-10  Tom Tromey  <tom@tromey.com>
13889
13890         * python/python.c (gdbpy_enter): New constructor.
13891         (~gdbpy_enter): New destructor.
13892         (restore_python_env, ensure_python_env): Rewrite.
13893         * python/python-internal.h (gdbpy_enter): New class.
13894
13895 2017-01-10  Tom Tromey  <tom@tromey.com>
13896
13897         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13898
13899 2017-01-10  Tom Tromey  <tom@tromey.com>
13900
13901         * python/py-value.c (value_has_field, get_field_flag)
13902         (get_field_type, valpy_getitem, convert_value_from_python): Use
13903         gdbpy_ref.
13904
13905 2017-01-10  Tom Tromey  <tom@tromey.com>
13906
13907         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13908         gdbpy_ref.
13909
13910 2017-01-10  Tom Tromey  <tom@tromey.com>
13911
13912         * python/py-prettyprint.c (search_pp_list)
13913         (find_pretty_printer_from_objfiles)
13914         (find_pretty_printer_from_progspace)
13915         (find_pretty_printer_from_gdb, find_pretty_printer)
13916         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13917         gdbpy_ref.
13918
13919 2017-01-10  Tom Tromey  <tom@tromey.com>
13920
13921         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13922
13923 2017-01-10  Tom Tromey  <tom@tromey.com>
13924
13925         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13926         (ltpy_get_all_source_lines): Use gdbpy_ref.
13927
13928 2017-01-10  Tom Tromey  <tom@tromey.com>
13929
13930         * python/py-framefilter.c (extract_sym, extract_value)
13931         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13932         gdbpy_ref.
13933
13934 2017-01-10  Tom Tromey  <tom@tromey.com>
13935
13936         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13937
13938 2017-01-10  Tom Tromey  <tom@tromey.com>
13939
13940         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13941
13942 2017-01-10  Tom Tromey  <tom@tromey.com>
13943
13944         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13945         gdbpy_ref.
13946
13947 2017-01-10  Tom Tromey  <tom@tromey.com>
13948
13949         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13950
13951 2017-01-10  Tom Tromey  <tom@tromey.com>
13952
13953         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13954         (typy_range): Use gdbpy_ref.
13955
13956 2017-01-10  Tom Tromey  <tom@tromey.com>
13957
13958         * python/py-threadevent.c (create_thread_event_object): Use
13959         gdbpy_ref.
13960         * python/py-stopevent.c (create_stop_event_object): Simplify.
13961         (emit_stop_event): Use gdbpy_ref.
13962         * python/py-signalevent.c (create_signal_event_object): Use
13963         gdbpy_ref.
13964         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13965         (emit_new_objfile_event, create_clear_objfiles_event_object)
13966         (emit_clear_objfiles_event): Use gdbpy_ref.
13967         * python/py-infevents.c (create_inferior_call_event_object)
13968         (create_register_changed_event_object)
13969         (create_memory_changed_event_object, emit_inferior_call_event)
13970         (emit_memory_changed_event, emit_register_changed_event): Use
13971         gdbpy_ref.
13972         * python/py-exitedevent.c (create_exited_event_object)
13973         (emit_exited_event): Use gdbpy_ref.
13974         * python/py-event.h (evpy_emit_event): Remove
13975         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13976         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13977         * python/py-continueevent.c (emit_continue_event): Use
13978         gdbpy_ref.
13979         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13980         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13981         gdbpy_ref.
13982         * python/py-bpevent.c (create_breakpoint_event_object): Use
13983         gdbpy_ref.
13984
13985 2017-01-10  Tom Tromey  <tom@tromey.com>
13986
13987         * python/py-ref.h: New file.
13988
13989 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13990
13991         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13992         void.
13993         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13994         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13995         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13996         * ui-out.c (ui_out::redirect): Likewise.
13997         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13998         * cli/cli-logging.c (set_logging_redirect): Update call site of
13999         ui_out::redirect.
14000         (handle_redirections): Likewise.
14001         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14002         * top.c (execute_command_to_string): Likewise.
14003         * utils.c (do_ui_out_redirect_pop): Likewise.
14004
14005 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14006
14007         * stack.c (_initialize_stack): Update "frame" command help message.
14008
14009 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14010
14011         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14012
14013 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14014
14015         * x86-linux-nat.h: Include gdb_proc_service.h.
14016
14017 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14018
14019         * ser-base.h: Include serial.h.
14020
14021 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14022
14023         * ppc-linux-tdep.h: Include ppc-tdep.h.
14024
14025 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14026
14027         * nat/amd64-linux-siginfo.h: Include signal.h.
14028
14029 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14030
14031         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14032
14033 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14034
14035         * mi/mi-parse.h: Include mi-cmds.h.
14036
14037 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14038
14039         * inf-loop.c: Don't include "target.h".
14040         * inf-loop.h: Include it here.
14041
14042 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14043
14044         * dfp.h: Include "dboulest.h" and "expression.h".
14045
14046 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14047
14048         * ax-gdb.h: Include "ax.h".
14049
14050 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14051
14052         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14053         with nat/gdb_ptrace.h.
14054
14055 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14056
14057         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14058         new line.
14059         (mips64_fbsd_sigframe_init): Likewise.
14060
14061 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14062
14063         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14064         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14065
14066 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14067
14068         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14069         * NEWS: Mention new FreeBSD/mips native configuration.
14070         * config/mips/fbsd.mh: New file.
14071         * configure.host: Add mips*-*-freebsd*.
14072         * mips-fbsd-nat.c: New file.
14073
14074 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14075
14076         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14077         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14078         * NEWS: Mention new FreeBSD/mips target.
14079         * configure.tgt: Add mips*-*-freebsd*.
14080         * mips-fbsd-tdep.c: New file.
14081         * mips-fbsd-tdep.h: New file.
14082
14083 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14084
14085         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14086         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14087
14088 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14089
14090         Update copyright year range in all GDB files.
14091
14092 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14093
14094         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14095
14096 For older changes see ChangeLog-2016.
14097 \f
14098 Local Variables:
14099 mode: change-log
14100 left-margin: 8
14101 fill-column: 74
14102 version-control: never
14103 coding: utf-8
14104 End: