Fix broken recursion detection when printing static members
[external/binutils.git] / gdb / ChangeLog
1 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
2
3         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4         to rewind obstack.
5
6 2017-10-26  Pedro Alves  <palves@redhat.com>
7
8         * remote.c (remote_async_terminal_ours_p): Delete.
9         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
10         Remove references to 'remote_async_terminal_ours_p'.
11
12 2017-10-26  Yao Qi  <yao.qi@linaro.org>
13
14         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
15
16 2017-10-26  Yao Qi  <yao.qi@linaro.org>
17
18         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
19         aspace const.
20         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
21         Likewise.
22         * breakpoint.c (bpstat_check_location): Remove cast.
23         (breakpoint_hit_catch_fork): Make aspce const.
24         (breakpoint_hit_catch_solib): Likewise.
25         (breakpoint_hit_catch_exec): Likewise.
26         (breakpoint_hit_ranged_breakpoint): Likewise.
27         (breakpoint_hit_watchpoint): Likewise.
28         (base_breakpoint_breakpoint_hit): Likewise.
29         (bkpt_breakpoint_hit): Likewise.
30         (dprintf_breakpoint_hit): Likewise.
31         (tracepoint_breakpoint_hit): Likewise.
32         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
33
34 2017-10-26  Yao Qi  <yao.qi@linaro.org>
35
36         * breakpoint.c (breakpoint_location_address_match): Change
37         "struct address_space *" to "const address_space".
38         (breakpoint_location_address_range_overlap): Likewise.
39         (breakpoint_here_p): Likewise.
40         (breakpoint_in_range_p): Likewise.
41         (moribund_breakpoint_here_p): Likewise.
42         (bp_location_inserted_here_p): Likewise.
43         (software_breakpoint_inserted_here_p): Likewise.
44         (hardware_breakpoint_inserted_here_p): Likewise.
45         (hardware_watchpoint_inserted_in_range): Likewise.
46         (bpstat_check_location): Likewise.
47         (bpstat_stop_status): Likewise.
48         (breakpoint_address_match): Likewise.
49         (breakpoint_address_match_range): Likewise.
50         (breakpoint_location_address_match): Likewise.
51         (breakpoint_location_address_range_overlap): Likewise.
52         (insert_single_step_breakpoint): Likewise.
53         (breakpoint_has_location_inserted_here): Likewise.
54         (single_step_breakpoint_inserted_here_p): Likewise.
55         (pc_at_non_inline_function): Likewise.
56         * breakpoint.h (bpstat_stop_status): Update declaration.
57         (breakpoint_here_p): Likewise.
58         (breakpoint_in_range_p): Likewise.
59         (moribund_breakpoint_here_p): Likewise.
60         (breakpoint_inserted_here_p): Likewise.
61         (software_breakpoint_inserted_here_p): Likewise.
62         (hardware_breakpoint_inserted_here_p): Likewise.
63         (breakpoint_has_location_inserted_here): Likewise.
64         (single_step_breakpoint_inserted_here_p): Likewise.
65         (hardware_watchpoint_inserted_in_range): Likewise.
66         (breakpoint_address_match): Likewise.
67         (insert_single_step_breakpoint): Likewise.
68         (pc_at_non_inline_function): Likewise.
69         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
70         * record.c (record_check_stopped_by_breakpoint): Likewise.
71         * record.h (record_check_stopped_by_breakpoint): Likewise.
72         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
73
74 2017-10-25  Yao Qi  <yao.qi@linaro.org>
75
76         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
77         regcache->arch () instead get_regcache_arch.
78         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
79         Likewise.
80         (aarch64_fbsd_store_inferior_registers): Likewise.
81         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
82         (store_gregs_to_thread): Likewise.
83         (fetch_fpregs_from_thread): Likewise.
84         (store_fpregs_to_thread): Likewise.
85         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
86         (aarch64_store_return_value): Likewise.
87         (aarch64_software_single_step): Likewise.
88         * aix-thread.c (aix_thread_wait): Likewise.
89         (supply_reg32): Likewise.
90         (supply_sprs64): Likewise.
91         (supply_sprs32): Likewise.
92         (fill_gprs64): Likewise.
93         (fill_gprs32): Likewise.
94         (fill_sprs64): Likewise.
95         (fill_sprs32): Likewise.
96         (store_regs_user_thread): Likewise.
97         (store_regs_kernel_thread): Likewise.
98         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
99         (alphabsd_store_inferior_registers): Likewise.
100         * alpha-tdep.c (alpha_extract_return_value): Likewise.
101         (alpha_store_return_value): Likewise.
102         (alpha_deal_with_atomic_sequence): Likewise.
103         (alpha_next_pc): Likewise.
104         (alpha_software_single_step): Likewise.
105         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
106         (amd64bsd_store_inferior_registers): Likewise.
107         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
108         Likewise.
109         (amd64_linux_store_inferior_registers): Likewise.
110         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
111         (amd64_collect_native_gregset): Likewise.
112         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
113         (amd64obsd_collect_uthread): Likewise.
114         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
115         (amd64_collect_fpregset): Likewise.
116         (amd64_supply_fxsave): Likewise.
117         (amd64_supply_xsave): Likewise.
118         (amd64_collect_fxsave): Likewise.
119         (amd64_collect_xsave): Likewise.
120         * arc-tdep.c (arc_write_pc): Likewise.
121         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
122         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
123         (arm_fbsd_store_inferior_registers): Likewise.
124         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
125         (store_vfp_regs): Likewise.
126         (arm_linux_fetch_inferior_registers): Likewise.
127         (arm_linux_store_inferior_registers): Likewise.
128         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
129         (arm_linux_sigreturn_next_pc): Likewise.
130         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
131         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
132         (fetch_register): Likewise.
133         (store_register): Likewise.
134         * arm-tdep.c (arm_is_thumb): Likewise.
135         (displaced_in_arm_mode): Likewise.
136         (bx_write_pc): Likewise.
137         (arm_get_next_pcs_addr_bits_remove): Likewise.
138         (arm_software_single_step): Likewise.
139         (arm_extract_return_value): Likewise.
140         (arm_store_return_value): Likewise.
141         (arm_write_pc): Likewise.
142         * bfin-tdep.c (bfin_extract_return_value): Likewise.
143         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
144         (bsd_uthread_store_registers): Likewise.
145         * core-regset.c (fetch_core_registers): Likewise.
146         * corelow.c (get_core_registers): Likewise.
147         * cris-tdep.c (cris_store_return_value): Likewise.
148         (cris_extract_return_value): Likewise.
149         (find_step_target): Likewise.
150         (find_step_target): Likewise.
151         (cris_software_single_step): Likewise.
152         * ctf.c (ctf_fetch_registers): Likewise.
153         * darwin-nat.c (cancel_breakpoint): Likewise.
154         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
155         * frv-tdep.c (frv_extract_return_value): Likewise.
156         * ft32-tdep.c (ft32_store_return_value): Likewise.
157         (ft32_extract_return_value): Likewise.
158         * go32-nat.c (fetch_register): Likewise.
159         (go32_fetch_registers): Likewise.
160         (go32_store_registers): Likewise.
161         (store_register): Likewise.
162         * h8300-tdep.c (h8300_extract_return_value): Likewise.
163         (h8300_store_return_value): Likewise.
164         * hppa-linux-nat.c (fetch_register): Likewise.
165         (store_register): Likewise.
166         (hppa_linux_fetch_inferior_registers): Likewise.
167         (hppa_linux_store_inferior_registers): Likewise.
168         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
169         (i386_darwin_store_inferior_registers): Likewise.
170         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
171         (gnu_store_registers): Likewise.
172         * i386-linux-nat.c (fetch_register): Likewise.
173         (store_register): Likewise.
174         (supply_gregset): Likewise.
175         (fill_gregset): Likewise.
176         (i386_linux_fetch_inferior_registers): Likewise.
177         (i386_linux_store_inferior_registers): Likewise.
178         (i386_linux_resume): Likewise.
179         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
180         Likewise.
181         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
182         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
183         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
184         (i386obsd_collect_uthread): Likewise.
185         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
186         (i386_supply_gregset): Likewise.
187         (i386_collect_gregset): Likewise.
188         (i386_supply_fpregset): Likewise.
189         (i386_collect_fpregset): Likewise.
190         (i386_mpx_bd_base): Likewise.
191         * i386-v4-nat.c (supply_fpregset): Likewise.
192         (fill_fpregset): Likewise.
193         * i387-tdep.c (i387_supply_fsave): Likewise.
194         (i387_collect_fsave): Likewise.
195         (i387_supply_fxsave): Likewise.
196         (i387_collect_fxsave): Likewise.
197         (i387_supply_xsave): Likewise.
198         (i387_collect_xsave): Likewise.
199         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
200         (ia64_linux_store_registers): Likewise.
201         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
202         (ia64_extract_return_value): Likewise.
203         (ia64_store_return_value): Likewise.
204         (find_func_descr): Likewise.
205         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
206         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
207         (inf_ptrace_store_registers): Likewise.
208         * infrun.c (use_displaced_stepping): Likewise.
209         (displaced_step_prepare_throw): Likewise.
210         (resume): Likewise.
211         (proceed): Likewise.
212         (do_target_wait): Likewise.
213         (adjust_pc_after_break): Likewise.
214         (handle_inferior_event_1): Likewise.
215         (handle_signal_stop): Likewise.
216         (save_infcall_suspend_state): Likewise.
217         (restore_infcall_suspend_state): Likewise.
218         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
219         * jit.c (jit_frame_prev_register): Likewise.
220         * linux-nat.c (save_stop_reason): Likewise.
221         (linux_nat_wait_1): Likewise.
222         (resume_stopped_resumed_lwps): Likewise.
223         * linux-record.c (record_linux_sockaddr): Likewise.
224         (record_linux_msghdr): Likewise.
225         (record_linux_system_call): Likewise.
226         * linux-tdep.c (linux_collect_thread_registers): Likewise.
227         * lm32-tdep.c (lm32_extract_return_value): Likewise.
228         (lm32_store_return_value): Likewise.
229         * m32c-tdep.c (m32c_read_flg): Likewise.
230         (m32c_pseudo_register_read): Likewise.
231         (m32c_pseudo_register_write): Likewise.
232         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
233         (m32r_linux_collect_gregset): Likewise.
234         * m32r-tdep.c (m32r_store_return_value): Likewise.
235         (m32r_extract_return_value): Likewise.
236         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
237         (m68kbsd_collect_fpregset): Likewise.
238         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
239         * m68k-linux-nat.c (fetch_register): Likewise.
240         (old_fetch_inferior_registers): Likewise.
241         (old_store_inferior_registers): Likewise.
242         (store_regs): Likewise.
243         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
244         (m68k_svr4_store_return_value): Likewise.
245         * m88k-tdep.c (m88k_store_arguments): Likewise.
246         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
247         (mi_cmd_data_write_register_values): Likewise.
248         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
249         (mips_fbsd_store_inferior_registers): Likewise.
250         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
251         (mips_fbsd_supply_gregs): Likewise.
252         (mips_fbsd_collect_fpregs): Likewise.
253         (mips_fbsd_collect_gregs): Likewise.
254         (mips_fbsd_supply_fpregset): Likewise.
255         (mips_fbsd_collect_fpregset): Likewise.
256         (mips_fbsd_supply_gregset): Likewise.
257         (mips_fbsd_collect_gregset): Likewise.
258         * mips-linux-nat.c (supply_gregset): Likewise.
259         (fill_gregset): Likewise.
260         (supply_fpregset): Likewise.
261         (fill_fpregset): Likewise.
262         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
263         (mips_fill_gregset): Likewise.
264         (mips_supply_fpregset): Likewise.
265         (mips_fill_fpregset): Likewise.
266         (mips64_supply_gregset): Likewise.
267         (micromips_linux_sigframe_validate): Likewise.
268         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
269         (mipsnbsd_fetch_inferior_registers): Likewise.
270         (mipsnbsd_store_inferior_registers): Likewise.
271         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
272         (mipsnbsd_supply_gregset): Likewise.
273         (mipsnbsd_iterate_over_regset_sections): Likewise.
274         (mipsnbsd_supply_reg): Likewise.
275         (mipsnbsd_supply_fpreg): Likewise.
276         * mips-tdep.c (mips_in_frame_stub): Likewise.
277         (mips_dummy_id): Likewise.
278         (is_octeon_bbit_op): Likewise.
279         (micromips_bc1_pc): Likewise.
280         (extended_mips16_next_pc): Likewise.
281         (mips16_next_pc): Likewise.
282         (deal_with_atomic_sequence): Likewise.
283         * moxie-tdep.c (moxie_process_readu): Likewise.
284         * nios2-tdep.c (nios2_get_next_pc): Likewise.
285         * nto-procfs.c (procfs_store_registers): Likewise.
286         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
287         (ppcfbsd_store_inferior_registers): Likewise.
288         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
289         (fetch_altivec_register): Likewise.
290         (get_spe_registers): Likewise.
291         (fetch_spe_register): Likewise.
292         (fetch_altivec_registers): Likewise.
293         (fetch_all_gp_regs): Likewise.
294         (fetch_all_fp_regs): Likewise.
295         (store_vsx_register): Likewise.
296         (store_altivec_register): Likewise.
297         (set_spe_registers): Likewise.
298         (store_spe_register): Likewise.
299         (store_altivec_registers): Likewise.
300         (store_all_gp_regs): Likewise.
301         (store_all_fp_regs): Likewise.
302         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
303         (ppc_linux_collect_gregset): Likewise.
304         (ppc_canonicalize_syscall): Likewise.
305         (ppc_linux_record_signal): Likewise.
306         (ppu2spu_prev_register): Likewise.
307         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
308         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
309         (ppcobsd_store_registers): Likewise.
310         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
311         Likewise.
312         (ppc_ravenscar_generic_store_registers): Likewise.
313         * procfs.c (procfs_fetch_registers): Likewise.
314         (procfs_store_registers): Likewise.
315         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
316         (ravenscar_store_registers): Likewise.
317         (ravenscar_prepare_to_store): Likewise.
318         * record-btrace.c (record_btrace_fetch_registers): Likewise.
319         * record-full.c (record_full_wait_1): Likewise.
320         (record_full_registers_change): Likewise.
321         (record_full_store_registers): Likewise.
322         (record_full_core_fetch_registers): Likewise.
323         (record_full_save): Likewise.
324         (record_full_goto_insn): Likewise.
325         * regcache.c (regcache_register_size): Likewise.
326         (get_regcache_arch): Remove.
327         (regcache_read_pc): Likewise.
328         * regcache.h (get_regcache_arch): Remove.
329         * remote-sim.c (gdbsim_fetch_register): Likewise.
330         (gdbsim_store_register): Likewise.
331         * remote.c (fetch_register_using_p): Likewise.
332         (send_g_packet): Likewise.
333         (remote_prepare_to_store): Likewise.
334         (store_registers_using_G): Likewise.
335         * reverse.c (save_bookmark_command): Likewise.
336         (goto_bookmark_command): Likewise.
337         * rs6000-aix-tdep.c (branch_dest): Likewise.
338         * rs6000-nat.c (rs6000_ptrace64): Likewise.
339         (fetch_register): Likewise.
340         * rs6000-tdep.c (ppc_supply_reg): Likewise.
341         (ppc_collect_reg): Likewise.
342         (ppc_collect_gregset): Likewise.
343         (ppc_collect_fpregset): Likewise.
344         (ppc_collect_vsxregset): Likewise.
345         (ppc_collect_vrregset): Likewise.
346         (ppc_displaced_step_hw_singlestep): Likewise.
347         (rs6000_pseudo_register_read): Likewise.
348         (rs6000_pseudo_register_write): Likewise.
349         * s390-linux-nat.c (supply_gregset): Likewise.
350         (fill_gregset): Likewise.
351         (s390_linux_fetch_inferior_registers): Likewise.
352         * s390-linux-tdep.c (s390_write_pc): Likewise.
353         (s390_software_single_step): Likewise.
354         (s390_all_but_pc_registers_record): Likewise.
355         (s390_linux_syscall_record): Likewise.
356         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
357         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
358         (shnbsd_store_inferior_registers): Likewise.
359         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
360         (sh_extract_return_value_fpu): Likewise.
361         (sh_store_return_value_nofpu): Likewise.
362         (sh_corefile_supply_regset): Likewise.
363         (sh_corefile_collect_regset): Likewise.
364         * sh64-tdep.c (sh64_extract_return_value): Likewise.
365         (sh64_store_return_value): Likewise.
366         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
367         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
368         (sparc_store_inferior_registers): Likewise.
369         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
370         (sparc_ravenscar_prepare_to_store): Likewise.
371         * sparc-tdep.c (sparc32_store_arguments): Likewise.
372         (sparc_analyze_control_transfer): Likewise.
373         (sparc_step_trap): Likewise.
374         (sparc_software_single_step): Likewise.
375         (sparc32_gdbarch_init): Likewise.
376         (sparc_supply_rwindow): Likewise.
377         (sparc_collect_rwindow): Likewise.
378         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
379         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
380         (sparc64nbsd_collect_gregset): Likewise.
381         (sparc64nbsd_supply_fpregset): Likewise.
382         (sparc64nbsd_collect_fpregset): Likewise.
383         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
384         (sparc64_supply_gregset): Likewise.
385         (sparc64_collect_gregset): Likewise.
386         (sparc64_supply_fpregset): Likewise.
387         (sparc64_collect_fpregset): Likewise.
388         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
389         * spu-tdep.c (spu_unwind_sp): Likewise.
390         (spu2ppu_prev_register): Likewise.
391         (spu_memory_remove_breakpoint): Likewise.
392         * stack.c (return_command): Likewise.
393         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
394         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
395         * tracefile.c (trace_save_ctf): Likewise.
396         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
397         (do_windows_store_inferior_registers): Likewise.
398         (windows_resume): Likewise.
399         * xtensa-linux-nat.c (fill_gregset): Likewise.
400         (supply_gregset_reg): Likewise.
401         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
402         (xtensa_register_read_masked): Likewise.
403         (xtensa_supply_gregset): Likewise.
404         (xtensa_extract_return_value): Likewise.
405         (xtensa_store_return_value): Likewise.
406
407 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
408
409         * doublest.c (floatformat_from_string): New function.
410         * doublest.h (floatformat_from_string): Add prototype.
411
412         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
413         (OP_FLOAT): ... this.
414         * expression.h: Do not include "doublest.h".
415         (union exp_element): Replace doubleconst and decfloatconst by
416         new element floatconst.
417         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
418         (ada_evaluate_subexp): Likewise.
419         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
420         OP_DOUBLE and OP_DECFLOAT.
421         * expprint.c (print_subexp_standard): Likewise.
422         (dump_subexp_body_standard): Likewise.
423         * breakpoint.c (watchpoint_exp_is_const): Likewise.
424
425         * parse.c: Include "dfp.h".
426         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
427         (write_exp_elt_floatcst): New function.
428         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
429         and OP_DECFLOAT.
430         (operator_check_standard): Likewise.
431         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
432         Return target format buffer instead of host DOUBLEST.
433         Use floatformat_from_string and decimal_from_string to parse
434         either binary or decimal floating-point types.
435         (parse_c_float): Remove.
436         * parser-defs.h: Do not include "doublest.h".
437         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
438         (write_exp_elt_floatcst): Add prototype.
439         (parse_float): Update prototype.
440         (parse_c_float): Remove.
441
442         * c-exp.y: Do not include "dfp.h".
443         (typed_val_float): Use byte buffer instead of DOUBLEST.
444         (typed_val_decfloat): Remove.
445         (DECFLOAT): Remove.
446         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
447         (parse_number): Update to new parse_float interface.
448         Parse suffixes and determine type before calling parse_float.
449         Handle decimal and binary FP types the same way.
450
451         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
452         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
453         (parse_number): Update to new parse_float interface.
454         Parse suffixes and determine type before calling parse_float.
455
456         * f-exp.y: Replace dval by typed_val_float.
457         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
458         (parse_number): Use parse_float instead of atof.
459
460         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
461         (parse_go_float): Remove.
462         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
463         (parse_number): Call parse_float instead of parse_go_float.
464         Parse suffixes and determine type before calling parse_float.
465
466         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
467         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
468         (parse_number): Update to new parse_float interface.
469         Parse suffixes and determine type before calling parse_float.
470
471         * m2-exp.y: Replace dval by byte buffer val.
472         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
473         (parse_number): Call parse_float instead of atof.
474
475         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
476         (lex_number): Call parse_float instead of strtod.
477         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
478         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
479         Use write_exp_elt_floatcst.
480         (unit_testing): Remove static variable.
481         (rust_type): Do not check unit_testing.
482         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
483
484         * ada-exp.y (type_float, type_double): Remove.
485         (typed_val_float): Use byte buffer instead of DOUBLEST.
486         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
487         * ada-lex.l (processReal): Use parse_float instead of sscanf.
488
489 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
490
491         * aarch64-tdep.h (enum aarch64_regnum): Remove.
492         * arch/aarch64.h: New file.
493
494 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
495
496         * dfp.h (decimal_from_string): Use const reference for argument.
497         * dfp.c (decimal_from_string): Likewise.
498
499 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
500
501         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
502         * sh64-tdep.c (sh64_do_fp_register): Likewise.
503         * mips-tdep.c (mips_print_fp_register): Likewise.
504
505 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
506
507         * common/format.h (enum argclass): Replace decfloat_arg by
508         dec32float_arg, dec64float_arg, and dec128float_arg.
509         * common/format.c (parse_format_string): Update to return
510         new decimal float argument classes.
511
512         * printcmd.c (printf_decfloat): Rename to ...
513         (printf_floating): ... this.  Add argclass argument, and use it
514         instead of parsing the format string again.  Add support for
515         binary floating-point values, using floatformat_to_string.
516         Convert value to the target format if it doesn't already match.
517         (ui_printf): Call printf_floating instead of printf_decfloat,
518         also for double_arg / long_double_arg.  Pass argclass.
519
520         * dfp.c (decimal_to_string): Add format string argument.
521         * dfp.h (decimal_to_string): Likewise.
522
523         * doublest.c (floatformat_to_string): Add format string argument.
524         * doublest.h (floatformat_to_string): Likewise.
525
526 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
527
528         * doublest.c (floatformat_precision): New routine.
529         (floatformat_to_string): Likewise.
530         * doublest.c (floatformat_to_string): Add prototype.
531
532         * printcmd.c (print_scalar_formatted): Only call print_floating
533         on floating-point types.
534         * valprint.c: Do not include "floatformat.h".
535         (generic_val_print_decfloat): Remove.
536         (generic_val_print): Call generic_val_print_float for both
537         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
538         (print_floating): Use floatformat_to_string.  Handle decimal float.
539         (print_decimal_floating): Remove, merge into floatformat_to_string.
540         * value.h (print_decimal_floating): Remove.
541
542         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
543
544 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
545
546         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
547
548 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
549
550         * memattr.h: Don't include vec.h.
551         (struct mem_attrib): Initialize fields.
552         <unknown>: New static method.
553         (struct mem_region): Add constructors, operator<, initialize
554         fields.
555         * memattr.c: Include algorithm.
556         (default_mem_attrib, unknown_mem_attrib): Remove.
557         (user_mem_region_list): New global.
558         (target_mem_region_list, mem_region_list): Change type to
559         std::vector<mem_region>.
560         (mem_use_target): Now a function.
561         (target_mem_regions_valid): Change type to bool.
562         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
563         (require_user_regions): Adjust.
564         (require_target_regions): Adjust.
565         (create_mem_region): Adjust.
566         (lookup_mem_region): Adjust.
567         (invalidate_target_mem_regions): Adjust.
568         (mem_clear): Rename to...
569         (user_mem_clear): ... this, and adjust.
570         (mem_command): Adjust.
571         (info_mem_command): Adjust.
572         (mem_enable, enable_mem_command, mem_disable,
573         disable_mem_command): Adjust.
574         (mem_delete): Adjust.
575         (delete_mem_command): Adjust.
576         * memory-map.h (parse_memory_map): Return an std::vector.
577         * memory-map.c (parse_memory_map): Likewise.
578         (struct memory_map_parsing_data): Add constructor.
579         <memory_map>: Point to std::vector.
580         (memory_map_start_memory): Adjust.
581         (memory_map_end_memory): Adjust.
582         (memory_map_end_property): Adjust.
583         (clear_result): Remove.
584         * remote.c (remote_memory_map): Return an std::vector.
585         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
586         Remove.
587         (target_debug_print_mem_region_vector): New.
588         * target-delegates.c: Regenerate.
589         * target.h (mem_region_vector): New typedef.
590         (to_memory_map): Return mem_region_vector.
591         (target_memory_map): Return an std::vector.
592         * target.c (target_memory_map): Return an std::vector.
593         (flash_erase_command): Adjust.
594
595 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
596
597         * memory-map.c (struct memory_map_parsing_data) <property_name>:
598         Change type to std::string.
599         (memory_map_start_property): Adjust.
600         (memory_map_end_property): Adjust.
601
602 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
603
604         * infrun.h: Include common/byte-vector.h.
605         (struct displaced_step_closure): New struct.
606         (struct buf_displaced_step_closure): New struct.
607         * infrun.c (displaced_step_closure::~displaced_step_closure):
608         Provide default implementation.
609         (displaced_step_clear): Deallocate step closure with delete.
610         * aarch64-tdep.c (displaced_step_closure): Rename to ...
611         (aarch64_displaced_step_closure): ... this, extend
612         displaced_step_closure.
613         (aarch64_displaced_step_data) <dsc>: Change type to
614         aarch64_displaced_step_closure.
615         (aarch64_displaced_step_copy_insn): Adjust to type change, use
616         unique_ptr.
617         (aarch64_displaced_step_fixup): Add cast for displaced step
618         closure.
619         * amd64-tdep.c (displaced_step_closure): Rename to ...
620         (amd64_displaced_step_closure): ... this, extend
621         displaced_step_closure.
622         <insn_buf>: Change type to std::vector<gdb_byte>.
623         <max_len>: Remove.
624         (fixup_riprel): Change type of DSC parameter, adjust to type
625         change of insn_buf.
626         (fixup_displaced_copy): Change type of DSC parameter.
627         (amd64_displaced_step_copy_insn): Instantiate
628         amd64_displaced_step_closure.
629         (amd64_displaced_step_fixup): Add cast for closure type, adjust
630         to type change of insn_buf.
631         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
632         parameter DSC.
633         (arm_linux_copy_svc): Likewise.
634         (cleanup_kernel_helper_return): Likewise.
635         (arm_catch_kernel_helper_return): Likewise.
636         (arm_linux_displaced_step_copy_insn): Instantiate
637         arm_displaced_step_closure.
638         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
639         (displaced_read_reg): Change type of parameter DSC.
640         (branch_write_pc): Likewise.
641         (load_write_pc): Likewise.
642         (alu_write_pc): Likewise.
643         (displaced_write_reg): Likewise.
644         (arm_copy_unmodified): Likewise.
645         (thumb_copy_unmodified_32bit): Likewise.
646         (thumb_copy_unmodified_16bit): Likewise.
647         (cleanup_preload): Likewise.
648         (install_preload): Likewise.
649         (arm_copy_preload): Likewise.
650         (thumb2_copy_preload): Likewise.
651         (install_preload_reg): Likewise.
652         (arm_copy_preload_reg): Likewise.
653         (cleanup_copro_load_store): Likewise.
654         (install_copro_load_store): Likewise.
655         (arm_copy_copro_load_store) Likewise.
656         (thumb2_copy_copro_load_store): Likewise.
657         (cleanup_branch): Likewise.
658         (install_b_bl_blx): Likewise.
659         (arm_copy_b_bl_blx): Likewise.
660         (thumb2_copy_b_bl_blx): Likewise.
661         (thumb_copy_b): Likewise.
662         (install_bx_blx_reg): Likewise.
663         (arm_copy_bx_blx_reg): Likewise.
664         (thumb_copy_bx_blx_reg): Likewise.
665         (cleanup_alu_imm): Likewise.
666         (arm_copy_alu_imm): Likewise.
667         (thumb2_copy_alu_imm): Likewise.
668         (cleanup_alu_reg): Likewise.
669         (install_alu_reg): Likewise.
670         (arm_copy_alu_reg): Likewise.
671         (thumb_copy_alu_reg): Likewise.
672         (cleanup_alu_shifted_reg): Likewise.
673         (install_alu_shifted_reg): Likewise.
674         (arm_copy_alu_shifted_reg): Likewise.
675         (cleanup_load): Likewise.
676         (cleanup_store): Likewise.
677         (arm_copy_extra_ld_st): Likewise.
678         (install_load_store): Likewise.
679         (thumb2_copy_load_literal): Likewise.
680         (thumb2_copy_load_reg_imm): Likewise.
681         (arm_copy_ldr_str_ldrb_strb): Likewise.
682         (cleanup_block_load_all): Likewise.
683         (cleanup_block_store_pc): Likewise.
684         (cleanup_block_load_pc): Likewise.
685         (arm_copy_block_xfer): Likewise.
686         (thumb2_copy_block_xfer): Likewise.
687         (cleanup_svc): Likewise.
688         (install_svc): Likewise.
689         (arm_copy_svc): Likewise.
690         (thumb_copy_svc): Likewise.
691         (arm_copy_undef): Likewise.
692         (thumb_32bit_copy_undef): Likewise.
693         (arm_copy_unpred): Likewise.
694         (arm_decode_misc_memhint_neon): Likewise.
695         (arm_decode_unconditional): Likewise.
696         (arm_decode_miscellaneous): Likewise.
697         (arm_decode_dp_misc): Likewise.
698         (arm_decode_ld_st_word_ubyte): Likewise.
699         (arm_decode_media): Likewise.
700         (arm_decode_b_bl_ldmstm): Likewise.
701         (arm_decode_ext_reg_ld_st): Likewise.
702         (thumb2_decode_dp_shift_reg): Likewise.
703         (thumb2_decode_ext_reg_ld_st): Likewise.
704         (arm_decode_svc_copro): Likewise.
705         (thumb2_decode_svc_copro): Likewise.
706         (install_pc_relative): Likewise.
707         (thumb_copy_pc_relative_16bit): Likewise.
708         (thumb_decode_pc_relative_16bit): Likewise.
709         (thumb_copy_pc_relative_32bit): Likewise.
710         (thumb_copy_16bit_ldr_literal): Likewise.
711         (thumb_copy_cbnz_cbz): Likewise.
712         (thumb2_copy_table_branch): Likewise.
713         (cleanup_pop_pc_16bit_all): Likewise.
714         (thumb_copy_pop_pc_16bit): Likewise.
715         (thumb_process_displaced_16bit_insn): Likewise.
716         (decode_thumb_32bit_ld_mem_hints): Likewise.
717         (thumb_process_displaced_32bit_insn): Likewise.
718         (thumb_process_displaced_insn): Likewise.
719         (arm_process_displaced_insn): Likewise.
720         (arm_displaced_init_closure): Likewise.
721         (arm_displaced_step_fixup): Add cast for closure.
722         * arm-tdep.h: Include infrun.h.
723         (displaced_step_closure): Rename to ...
724         (arm_displaced_step_closure): ... this, extend
725         displaced_step_closure.
726         <u::svc::copy_svc_os>: Change type of parameter DSC.
727         <cleanup>: Likewise.
728         (arm_process_displaced_insn): Likewise.
729         (arm_displaced_init_closure): Likewise.
730         (displaced_read_reg): Likewise.
731         (displaced_write_reg): Likewise.
732         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
733         Adjust.
734         * i386-tdep.h: Include infrun.h.
735         (i386_displaced_step_closure): New typedef.
736         * i386-tdep.c (i386_displaced_step_copy_insn): Use
737         i386_displaced_step_closure.
738         (i386_displaced_step_fixup): Adjust.
739         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
740         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
741         and unique_ptr.
742         (ppc_displaced_step_fixup): Adjust.
743         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
744         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
745         and unique_ptr.
746         (s390_displaced_step_fixup): Adjust.
747
748 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
749
750         * interps.h (interp_resume, interp_suspend, interp_set_temp):
751         Remove declarations.
752
753 2017-10-20  Tom Tromey  <tom@tromey.com>
754
755         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
756         std::vector.
757         (gdb_bfd_record_inclusion): Update.
758         (bfdp): Remove typedef.
759
760 2017-10-20  Tom Tromey  <tom@tromey.com>
761
762         * gdb_bfd.c (gdb_bfd_ref): Use new.
763         (struct gdb_bfd_data): Add constructor, destructor, and member
764         initializers.
765         (gdb_bfd_unref): Use delete.
766
767 2017-10-20  Tom Tromey  <tom@tromey.com>
768
769         * exec.c (exec_file_attach): Use new_bfd_ref.
770         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
771         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
772         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
773         new_bfd_ref.
774         * gdb_bfd.h (new_bfd_ref): New function.
775
776 2017-10-20  Pedro Alves  <palves@redhat.com>
777
778         * main.c (captured_command_loop): Add attribute noinline.
779
780 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
781
782         * interps.c (struct interp_factory): Add constructor.
783         (interp_factory_p): Remove typedef.
784         (DEF_VEC_P(interp_factory_p)): Remove.
785         (interpreter_factories): Change type to std::vector.
786         (interp_factory_register): Adjust.
787         (interp_lookup): Adjust.
788         (interpreter_completer): Adjust.
789
790 2017-10-19  Tom Tromey  <tom@tromey.com>
791
792         * break-catch-syscall.c (catch_syscall_completer): Use
793         std::string, gdb::unique_xmalloc_ptr.
794
795 2017-10-19  Tom Tromey  <tom@tromey.com>
796
797         * infcall.c (call_function_by_hand_dummy): Use std::string.
798
799 2017-10-19  Tom Tromey  <tom@tromey.com>
800
801         * mi/mi-main.c (mi_cmd_execute): Update.
802         * top.h (prepare_execute_command): Return scoped_value_mark.
803         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
804         Add move constructor.
805         * top.c (prepare_execute_command): Return scoped_value_mark.
806         (execute_command): Update.
807
808 2017-10-19  Pedro Alves  <palves@redhat.com>
809
810         * xml-support.c (xml_fetch_content_from_file): Check fread's
811         return.
812
813 2017-10-19  Pedro Alves  <palves@redhat.com>
814
815         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
816         async.
817         (handle_error_fd): New function.
818         (ser_base_async): Add/delete an event loop file handler for
819         error_fd.
820
821 2017-10-19  Pedro Alves  <palves@redhat.com>
822
823         * xml-support.c (xml_fetch_content_from_file): Don't read in
824         chunks.  Instead use fseek to determine the file's size, and read
825         it in one go.
826
827 2017-11-18  Keith Seitz  <keiths@redhat.com>
828
829         * c-exp.y (oper): Canonicalize conversion operators of user-defined
830         types.
831         Add whitespace to front of type name.
832
833 2017-10-18  Keith Seitz  <keiths@redhat.com>
834
835         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
836         DW_AT_accessibility.
837
838 2017-10-18  Yao Qi  <yao.qi@linaro.org>
839
840         * features/tic6x-c62x-linux.c: Remove.
841
842 2017-10-17  Tom Tromey  <tom@tromey.com>
843
844         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
845         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
846         (do_mixed_source_and_assembly): Likewise.
847
848 2017-10-17  Tom Tromey  <tom@tromey.com>
849
850         * regcache.c (regcache::xfer_part): Remove assertion.
851
852 2017-10-17  Pedro Alves  <palves@redhat.com>
853
854         * xml-support.c (xml_fetch_content_from_file): Call
855         unique_ptr::release() instead unique_ptr::get() when passing
856         through xrealloc.
857
858 2017-10-17  Yao Qi  <yao.qi@linaro.org>
859
860         * regcache.c (regcache::xfer_part): Remove parameters read and
861         write, add parameter is_raw.  All callers are updated.
862
863 2017-10-16  Keith Seitz  <keiths@redhat.com>
864
865         * c-typeprint.c (enum access_specifier): Moved here from
866         c_type_print_base.
867         (output_access_specifier): New function.
868         (c_type_print_base): Consider typedefs when assessing
869         whether access labels are needed.
870         Use output_access_specifier as needed.
871         Output access specifier for typedefs, if needed.
872         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
873         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
874         fields.
875         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
876         accessor macros.
877
878 2017-10-16  Tom Tromey  <tom@tromey.com>
879
880         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
881         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
882         * target.c (target_fileio_read_stralloc): Update.
883         * sparc64-tdep.c (adi_is_addr_mapped): Update.
884         * target.h (target_fileio_read_stralloc): Return
885         unique_xmalloc_ptr.
886
887 2017-10-16  Tom Tromey  <tom@tromey.com>
888
889         * xml-syscall.c (xml_init_syscalls_info): Update.
890         * xml-support.c (xinclude_start_include): Update.
891         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
892         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
893         (xml_fetch_content_from_file): Likewise.
894         * osdata.c (get_osdata): Update.
895         * target.h (target_read_stralloc, target_get_osdata): Return
896         unique_xmalloc_ptr.
897         * solib-aix.c (solib_aix_get_library_list): Update.
898         * solib-target.c (solib_target_current_sos): Update.
899         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
900         * xml-tdesc.c (fetch_available_features_from_target): Update.
901         (target_fetch_description_xml): Update.
902         (file_read_description_xml): Update.
903         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
904         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
905         (remote_pid_to_exec_file): Update.
906         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
907         (target_get_osdata): Likewise.
908
909 2017-10-16  Tom Tromey  <tom@tromey.com>
910
911         * remote.c (remote_register_number_and_offset): Use std::vector.
912         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
913         (putpkt_binary): Use gdb::def_vector.
914         (compare_sections_command): Use gdb::byte_vector.
915
916 2017-10-16  Tom Tromey  <tom@tromey.com>
917
918         * ppc-linux-nat.c (hwdebug_insert_point): Use
919         gdb::unique_xmalloc_ptr, XDUP.
920
921 2017-10-16  Tom Tromey  <tom@tromey.com>
922
923         * probe.c (parse_probes): Use std::string.
924         (info_probes_for_ops, enable_probes_command)
925         (disable_probes_command): Remove cleanups.
926
927 2017-10-16  Tom Tromey  <tom@tromey.com>
928
929         * buildsym.c (block_compar): Remove.
930         (end_symtab_get_static_block): Use std::vector.
931
932 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
933
934         * memrange.h (struct mem_range): Define operator< and operator==.
935         (mem_range_s): Remove.
936         (DEF_VEC_O (mem_range_s)): Remove.
937         (normalize_mem_ranges): Change parameter type to std::vector.
938         * memrange.c (compare_mem_ranges): Remove.
939         (normalize_mem_ranges): Change parameter type to std::vector,
940         adjust to vector change.
941         * exec.c (section_table_available_memory): Return vector, remove
942         parameter.
943         (section_table_read_available_memory): Adjust to std::vector
944         change.
945         * remote.c (remote_read_bytes): Adjust to std::vector
946         change.
947         * tracepoint.h (traceframe_available_memory): Change parameter
948         type to std::vector.
949         * tracepoint.c (traceframe_available_memory): Change parameter
950         type to std::vector, adjust.
951         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
952         std::vector change.
953         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
954         unittests/memrange-selftests.c.
955         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
956         * gdb/unittests/memrange-selftests.c: New file.
957
958 2017-10-16  Pedro Alves  <palves@redhat.com>
959
960         * elfread.c (probe_key_free): Rename range-for variable.
961         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
962         (find_probe_by_pc, collect_probes): Rename range-for variable.
963
964 2017-10-16  Yao Qi  <yao.qi@linaro.org>
965
966         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
967         * features/tic6x-c62x.c: Remove.
968         * features/tic6x-c64x-linux.c: Remove.
969         * features/tic6x-c64x.c: Remove.
970         * features/tic6x-c64xp-linux.c: Remove.
971         * features/tic6x-c64xp.c: Remove.
972         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
973         initialize_tdesc_tic6x_*_linux functions.
974         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
975         initialize_tdesc_tic6x_* functions.
976
977 2017-10-16  Yao Qi  <yao.qi@linaro.org>
978
979         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
980         tic6x-c62x.
981         * regformats/tic6x-c62x.dat: Remove.
982         * regformats/tic6x-c64x.dat: Remove.
983         * regformats/tic6x-c64xp.dat: Remove.
984
985 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
986
987         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
988         (the !HAVE_LIBEXPAT version).
989
990 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
991
992         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
993         const.
994
995 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
996
997         * target.h: Include tracepoint.h.
998         (enum trace_find_type): Move to tracepoint.h.
999         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1000         * tracepoint.h: Don't include target.h
1001         (enum trace_find_type): Move from target.h.
1002         (parse_traceframe_info): Return a unique ptr.
1003         * tracepoint.c (current_traceframe_info): Change type to unique
1004         ptr.
1005         (free_traceframe_info): Remove.
1006         (clear_traceframe_info): Don't manually free
1007         current_traceframe_info.
1008         (free_result): Remove.
1009         (parse_traceframe_info): Return a unique ptr.
1010         (get_traceframe_info): Adjust to unique ptr.
1011         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1012         * remote.c (remote_traceframe_info): Return a unique ptr.
1013         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1014         ptr.
1015         * target-debug.h (target_debug_print_traceframe_info_up): New
1016         macro.
1017         * target-delegates.c: Regenerate.
1018
1019 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1020
1021         * memrange.h (struct mem_range): Add constructors.
1022         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1023         std::vector<mem_range>.
1024         * tracepoint.c (free_traceframe_info): Don't manually free
1025         vector.
1026         (traceframe_info_start_memory): Adjust to vector change.
1027         (traceframe_available_memory): Likewise.
1028         * tracefile-tfile.c (build_traceframe_info): Likewise.
1029         * ctf.c (ctf_traceframe_info): Likewise.
1030
1031 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1032
1033         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1034         std::vector<int>.
1035         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1036         (traceframe_info_start_tvar): Adjust to vector change.
1037         (parse_traceframe_info): Allocate with new.
1038         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1039         vector change.
1040         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1041         change.
1042         tfile_traceframe_info): Allocate with new.
1043         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1044         change.
1045
1046 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1047
1048         * tracepoint.c (traceframe_info): Rename to...
1049         (current_traceframe_info): ...this.
1050         (clear_traceframe_info): Adjust.
1051         (get_traceframe_info): Adjust.
1052
1053 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1054
1055         * nat/linux-osdata.c: Include algorithm.
1056         (compare_processes): Remove.
1057         (struct pid_pgid_entry): New struct.
1058         (linux_xfer_osdata_processgroups): Use std::vector instead of
1059         XNEWVEC.
1060
1061 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1062
1063         * objfiles.h: Don't include symfile.h.
1064         (struct partial_symbol): Remove forward-declaration.
1065         (struct objfile) <global_psymbols, static_psymbols>: Change type
1066         to std::vector<partial_symbol *>.
1067         * objfiles.c (objfile::objfile): Don't memset those fields.
1068         (objfile::~objfile): Don't free those fields.
1069         * psympriv.h (struct psymbol_allocation_list): Remove
1070         forward-declaration.
1071         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1072         to std::vector.
1073         (start_psymtab_common): Change parameters to std::vector.
1074         * psymtab.c: Include algorithm.
1075         (require_partial_symbols): Call shrink_to_fit.
1076         (find_pc_sect_psymbol): Adjust to vector change.
1077         (match_partial_symbol): Likewise.
1078         (lookup_partial_symbol): Likewise.
1079         (psym_relocate): Likewise.
1080         (dump_psymtab): Likewise.
1081         (recursively_search_psymtabs): Likewise.
1082         (compare_psymbols): Remove.
1083         (sort_pst_symbols): Adjust to vector change.
1084         (start_psymtab_common): Likewise.
1085         (end_psymtab_common): Likewise.
1086         (psymbol_bcache_full): De-constify return value.
1087         (add_psymbol_to_bcache): Likewise.
1088         (extend_psymbol_list): Remove.
1089         (append_psymbol_to_list): Adjust to vector change.
1090         (add_psymbol_to_list): Likewise.
1091         (init_psymbol_list): Likewise.
1092         (maintenance_info_psymtabs): Likewise.
1093         (maintenance_check_psymtabs): Likewise.
1094         * symfile.h (struct psymbol_allocation_list): Remove.
1095         * symfile.c (reread_symbols): Adjust to vector change.
1096         * dbxread.c (start_psymtab): Change type of parameters.
1097         (dbx_symfile_read): Adjust to vector change.
1098         (read_dbx_symtab): Likewise.
1099         (start_psymtab): Change type of parameters.
1100         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1101         (create_partial_symtab): Likewise.
1102         (add_partial_symbol): Likewise.
1103         (write_one_signatured_type): Likewise.
1104         (recursively_write_psymbols): Likewise.
1105         * mdebugread.c (parse_partial_symbols): Likewise.
1106         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1107         (scan_xcoff_symtab): Adjust to vector change.
1108         (xcoff_initial_scan): Likewise.
1109
1110 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1111
1112         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1113
1114 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1115
1116         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1117         Remove s390x-*-expedite, add s390x-expedite.
1118
1119 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1120
1121         * features/s390-gs-linux64.c: Regenerated.
1122         * features/s390x-gs-linux64.c: Regenerated.
1123
1124 2017-10-13  Tom Tromey  <tom@tromey.com>
1125
1126         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1127         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1128         delete.
1129         * symfile.c (symbol_file_add_with_addrs): Use new.
1130         (symbol_file_add_separate): Update comment.
1131         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1132         * jit.c (jit_object_close_impl): Use new.
1133         (jit_unregister_code): Use delete.
1134         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1135         (~objfile): Rename from free_objfile.
1136         (free_objfile_separate_debug, do_free_objfile_cleanup)
1137         (free_all_objfiles, objfile_purge_solibs): Use delete.
1138         * objfiles.h (struct objfile): Add constructor and destructor.
1139         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1140         (allocate_objfile, free_objfile): Don't declare.
1141         (struct objstats): Add initializers.
1142
1143 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1144
1145         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1146         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1147         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1148         * gdbarch.h: Regenerate.
1149         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1150         Adjust comment.
1151         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1152         (i386_displaced_step_fixup): Adjust comment.
1153         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1154
1155 2017-10-12  Tom Tromey  <tom@tromey.com>
1156
1157         * prologue-value.h (pv_area::store_would_trash): Return bool.
1158         (pv_area::find_reg): Likewise.
1159         * prologue-value.c (pv_area::store_would_trash): Return bool.
1160         (pv_area::find_reg): Likewise.
1161
1162 2017-10-12  Tom Tromey  <tom@tromey.com>
1163
1164         * s390-linux-tdep.c (s390_store, s390_load)
1165         (s390_check_for_saved, s390_analyze_prologue): Update.
1166         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1167         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1168         * prologue-value.h (class pv_area): Move from prologue-value.c.
1169         Change names of members.  Add constructor, destructor, member
1170         functions.
1171         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1172         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1173         (pv_area_fetch, pv_area_scan): Don't declare.
1174         * prologue-value.c (struct pv_area::area_entry): Now member of
1175         pv_area.
1176         (struct pv_area): Move to prologue-value.h.
1177         (pv_area::pv_area): Rename from make_pv_area.
1178         (pv_area::~pv_area): Rename from free_pv_area.
1179         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1180         (clear_entries, find_entry, overlaps, store_would_trash, store)
1181         (fetch, find_reg, scan): Now member of pv_area.
1182         Remove "area" argument.  Update.
1183         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1184         Update.
1185         * mn10300-tdep.c (push_reg, check_for_saved)
1186         (mn10300_analyze_prologue): Update.
1187         * mep-tdep.c (is_arg_spill, check_for_saved)
1188         (mep_analyze_prologue): Update.
1189         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1190         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1191         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1192         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1193         Update.
1194         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1195         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1196
1197 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1198
1199         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1200         * linux-nat.c (linux_nat_delete_thread): New variable.
1201         (lwp_free): Invoke linux_nat_delete_thread if set.
1202         (linux_nat_set_delete_thread): New function.
1203         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1204         thread delete callback.
1205         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1206         (_initialize_arm_linux_nat): Assign thread delete callback.
1207         * s390-linux-nat.c (s390_delete_thread): New function.
1208         (_initialize_s390_nat): Assign thread delete callback.
1209         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1210         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1211         function.
1212         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1213         declaration.
1214         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1215         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1216
1217 2017-10-09  Tom Tromey  <tom@tromey.com>
1218
1219         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1220         std::string.
1221         * tui/tui-layout.c (enum tui_status): Use std::string.
1222
1223 2017-10-11  Tom Tromey  <tom@tromey.com>
1224
1225         * gdbthread.h (thread_command): Constify.
1226         * inferior.h (detach_command): Constify.
1227         * top.h (set_history, show_history): Constify.
1228         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1229         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1230         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1231         * printcmd.c (set_command): Constify.
1232         (non_const_set_command): New function.
1233         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1234         * breakpoint.c (enable_command, disable_command, delete_command)
1235         (catch_command, tcatch_command, set_breakpoint_cmd)
1236         (show_breakpoint_cmd): Constify.
1237         * macrocmd.c (macro_command): Constify.
1238         * infcmd.c (unset_command, kill_command, detach_command)
1239         (info_proc_cmd): Constify.
1240         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1241         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1242         (info_auto_load_cmd): Constify.
1243         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1244         (unset_tdesc_cmd): Constify.
1245         * ada-lang.c (set_ada_command, show_ada_command)
1246         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1247         * guile/guile.c (set_guile_command, show_guile_command)
1248         (info_guile_command): Constify.
1249         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1250         Constify.
1251         * skip.c (skip_command): Constify.
1252         * compile/compile.c (_initialize_compile): Constify.
1253         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1254         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1255         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1256         (maint_btrace_pt_show_cmd): Constify.
1257         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1258         Constify.
1259         * python/python.c (user_show_python, user_set_python): Constify.
1260         * mips-tdep.c (set_mips_command, show_mips_command)
1261         (set_mipsfpu_command): Constify.
1262         * record-btrace.c (cmd_record_btrace_start)
1263         (cmd_set_record_btrace, cmd_show_record_btrace)
1264         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1265         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1266         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1267         Constify.
1268         * symfile.c (overlay_command): Constify.
1269         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1270         * cli/cli-logging.c (set_logging_command, show_logging_command):
1271         Constify.
1272         * cli/cli-dump.c (dump_command, append_command)
1273         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1274         (tekhex_dump_command, binary_dump_command)
1275         (binary_append_command): Constify.
1276         * cli/cli-decode.c (struct cmd_list_element): Change type of
1277         "fun".
1278         * cli/cli-cmds.c (info_command, show_command, set_debug)
1279         (show_debug): Constify.
1280         (show_command): Add non-const overload.
1281         * top.c (set_history, show_history): Constify.
1282         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1283         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1284         * target.c (target_command): Constify.
1285         * sparc64-tdep.c (info_adi_command): Constify.
1286         * record-full.c (cmd_record_full_start): Constify.
1287         (set_record_full_command): Constify.  Fix typo.
1288         (show_record_full_command): Constify.
1289         * thread.c (thread_command, thread_apply_command): Constify.
1290         * memattr.c (dummy_cmd): Constify.
1291         * value.c (function_command): Constify.
1292         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1293         * probe.c (info_probes_command): Constify.
1294         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1295         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1296         (show_thread_cmd, set_thread_default_cmd)
1297         (show_thread_default_cmd): Constify.
1298         (check_empty): Constify.
1299         * tracepoint.c (tfind_command): Constify.
1300         * cp-support.c (maint_cplus_command): Constify.
1301         * windows-tdep.c (info_w32_command): Constify.
1302         * record.c (cmd_record_start, set_record_command)
1303         (show_record_command, info_record_command, cmd_record_goto):
1304         Constify.
1305         * ravenscar-thread.c (set_ravenscar_command)
1306         (show_ravenscar_command): Constify.
1307         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1308         Constify.
1309         (add_internal_problem_command): Remove casts.
1310         * arc-tdep.c (maintenance_print_arc_command): Constify.
1311         * valprint.c (set_print, show_print, set_print_raw)
1312         (show_print_raw): Constify.
1313         * maint.c (maintenance_command, maintenance_info_command)
1314         (maintenance_print_command, maintenance_set_cmd)
1315         (maintenance_show_cmd, set_per_command_cmd)
1316         (show_per_command_cmd, maintenance_check_command): Constify.
1317         * language.c (set_check, show_check): Constify.
1318         * typeprint.c (show_print_type, set_print_type): Constify.
1319         * go32-nat.c (go32_info_dos_command): Constify.
1320
1321 2017-10-11  Tom Tromey  <tom@tromey.com>
1322
1323         * breakpoint.c (prepare_re_set_context): Remove.
1324         (breakpoint_re_set_one): Update.  Don't use cleanups.
1325         (breakpoint_re_set): Use scoped_restore, std::string, and
1326         scoped_restore_current_language.
1327
1328 2017-10-11  Tom Tromey  <tom@tromey.com>
1329
1330         * breakpoint.c (commands_command_1): Use std::string.
1331         (cleanup_executing_breakpoints): Remove.
1332         (bpstat_do_actions_1): Use scoped_restore.
1333         (bpstat_check_watchpoint): Use std::string.
1334         (decode_static_tracepoint_spec): Likewise.
1335         (break_range_command): Likewise.
1336         (watch_command_1): Likewise.
1337         (compare_breakpoints): Change argument types.
1338         (clear_command): Use std::vector.
1339         (cleanup_executing_breakpoints): Remove.
1340         (update_global_location_list): Use unique_xmalloc_ptr.
1341         (strace_command): Remove unused declaration.
1342
1343 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1344
1345         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1346         * NEWS: Mention new FreeBSD/arm native configuration.
1347         * configure.host: Add arm*-*-freebsd*.
1348         * configure.nat: Likewise.
1349         * arm-fbsd-nat.c: New file.
1350
1351 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1352
1353         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1354         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1355         * NEWS: Mention new FreeBSD/arm target.
1356         * configure.tgt: Add arm*-*-freebsd*.
1357         * arm-fbsd-tdep.c: New file.
1358         * arm-fbsd-tdep.h: New file.
1359
1360 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1361
1362         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1363         `gdbarch_elfcore_write_linux_prpsinfo'.
1364         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1365         method.
1366         (elf_internal_linux_prpsinfo): Remove declaration.
1367         * gdbarch.h: Regenerate.
1368         * gdbarch.c: Regenerate.
1369
1370 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1371
1372         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1373         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1374
1375 2017-10-11  Pedro Alves  <palves@redhat.com>
1376
1377         * breakpoint.c (reattach_breakpoints): Delete.
1378         * breakpoint.h (reattach_breakpoints): Delete.
1379
1380 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1381
1382         * symfile.c (registered_sym_fns): Make struct, not typedef.
1383         (DEF_VEC_O (registered_sym_fns)): Remove.
1384         (symtab_fns): Change type to std::vector.
1385         (add_symtab_fns): Adjust.
1386         (find_sym_fns): Adjust.
1387
1388 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1389
1390         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1391         * arc-tdep.h (arc_arch_is_em): New function.
1392         (arc_arch_is_hs): Likewise.
1393
1394 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1395
1396         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1397         parentheses in the declaration.
1398         (macro_lookup_inclusion): Likewise.
1399         (macro_lookup_definition): Likewise.
1400         * p-lang.h (pascal_builtin_types): Likewise.
1401         * tui/tui-data.c (tui_win_list): Likewise.
1402         * tui/tui-data.h (tui_win_list): Likewise.
1403         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1404
1405 2017-10-11  Mark Rages  <markrages@gmail.com>
1406
1407         * target-memory.c (block_boundaries): Fix for block address not
1408         aligned on block size.
1409
1410 2017-10-10  Pedro Alves <palves@redhat.com>
1411             Tom Tromey  <tom@tromey.com>
1412
1413         * breakpoint.c (struct captured_breakpoint_query_args)
1414         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1415         (print_breakpoint): New.
1416         * breakpoint.h (print_breakpoint): Declare.
1417         * common/common-exceptions.h (enum return_reason): Remove
1418         references to catch_exceptions.
1419         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1420         Delete.
1421         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1422         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1423         * gdb.h: Delete.
1424         * gdbthread.h (thread_select): Declare.
1425         * mi/mi-cmd-break.c: Don't include gdb.h.
1426         (breakpoint_notify): Use print_breakpoint.
1427         * mi/mi-cmd-catch.c: Don't include gdb.h.
1428         * mi/mi-interp.c: Don't include gdb.h.
1429         (mi_print_breakpoint_for_event): New.
1430         (mi_breakpoint_created, mi_breakpoint_modified): Use
1431         mi_print_breakpoint_for_event.
1432         * mi/mi-main.c: Don't include gdb.h.
1433         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1434         thread_select instead of gdb_thread_select.
1435         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1436         of using gdb_list_thread_ids.
1437         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1438         FILEIO_ENOSYS here.
1439         (remote_fileio_request): Use TRY/CATCH instead of
1440         catch_exceptions.
1441         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1442         (symbol_file_add_from_memory_wrapper): Delete.
1443         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1444         * thread.c: Don't include gdb.h.
1445         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1446         (thread_alive): Use thread_select.
1447         (do_captured_thread_select): Delete, parts salvaged as ...
1448         (thread_select): ... this new function.
1449         (gdb_thread_select): Delete.
1450
1451 2017-10-10  Pedro Alves  <palves@redhat.com>
1452             Tom Tromey  <tom@tromey.com>
1453
1454         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1455         and reverse logic.
1456         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1457         No longer macros.  Instead ...
1458         (enum wp_check_result): They're now values of this new
1459         enumeration.
1460         (watchpoint_check): Change return type to wp_check_result and
1461         parameter type to bpstat.
1462         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1463         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1464         catch_errors.  Reverse logic of watchpoint_check call.
1465         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1466         pointer as parameter.
1467         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1468         * common/common-exceptions.c (throw_exception_sjlj): Update
1469         comments to avoid mentioning catch_errors.
1470         * exceptions.c (catch_errors): Delete.
1471         * exceptions.h: Update comments to avoid mentioning catch_errors.
1472         (catch_errors_ftype, catch_errors): Delete.
1473         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1474         (hook_stop_stub): Delete.
1475         (restore_selected_frame): Change return type to void, and
1476         parameter type to const frame_id &.
1477         (restore_infcall_control_state): Use TRY/CATCH instead of
1478         catch_errors.
1479         * main.c (captured_command_loop): Return void and remove
1480         parameter.  Remove references to catch_errors.
1481         (captured_main): Use TRY/CATCH instead of catch_errors.
1482         * objc-lang.c (objc_submethod_helper_data)
1483         (find_objc_msgcall_submethod_helper): Delete.
1484         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1485         catch_errors.
1486         * record-full.c (record_full_message): Return void.
1487         (record_full_message_args, record_full_message_wrapper): Delete.
1488         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1489         instead of catch_errors.
1490         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1491         parameter type to int.
1492         * solib-darwin.c (open_symbol_file_object): Ditto.
1493         * solib-dsbt.c (open_symbol_file_object): Ditto.
1494         * solib-frv.c (open_symbol_file_object): Ditto.
1495         * solib-svr4.c (open_symbol_file_object): Ditto.
1496         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1497         * solib.c (update_solib_list): Use TRY/CATCH instead of
1498         catch_errors.
1499         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1500         Change type.
1501         * symmisc.c (struct print_symbol_args): Remove.
1502         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1503         (print_symbol): Change type.
1504         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1505         and remove parameters.
1506         (catch_errors): New.
1507         (get_windows_debug_event): Adjust.
1508
1509 2017-10-09  Tom Tromey  <tom@tromey.com>
1510
1511         * mi/mi-main.c (free_splay_tree): Remove.
1512         (list_available_thread_groups): Use splay_tree_up.
1513         * common/gdb_splay_tree.h: New file.
1514
1515 2017-10-09  Tom Tromey  <tom@tromey.com>
1516
1517         * mi/mi-main.c (do_nothing): Remove.
1518         (list_available_thread_groups): Update.
1519
1520 2017-10-09  Pedro Alves  <palves@redhat.com>
1521
1522         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1523         reading registers when switching context.
1524
1525 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1526
1527         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1528         (fbsd_convert_siginfo): Likewise.
1529         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1530
1531 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1532
1533         * configure.ac (try_guile_versions): Remove guile-2.2.
1534         * configure: Regenerate.
1535
1536 2017-10-09  Tom Tromey  <tom@tromey.com>
1537
1538         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1539         (COMPILE.pre): Use $(CXX).
1540
1541 2017-10-09  Pedro Alves  <palves@redhat.com>
1542
1543         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1544         Use bool.
1545         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1546         * cp-support.h (cp_remove_params): Now returns a
1547         gdb::unique_xmalloc_ptr.
1548         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1549         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1550         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1551         returning a gdb::unique_xmalloc_ptr.
1552         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1553         * stack.c (find_frame_funname): Adjust to cp_remove_params
1554         returning a gdb::unique_xmalloc_ptr.
1555
1556 2017-10-08  Tom Tromey  <tom@tromey.com>
1557
1558         * dwarf2read.c (dwarf2_get_dwz_file): Use
1559         gdb::unique_xmalloc_ptr.
1560         (find_slot_in_mapped_hash): Likewise.
1561         (dwarf2_physname): Likewise.
1562         (create_dwo_unit_in_dwp_v1): Use std::string.
1563         (create_dwo_unit_in_dwp_v2): Likewise.
1564         (lookup_dwo_cutu): Likewise.
1565         (inherit_abstract_dies): Use std::vector.
1566         (read_array_type): Likewise.
1567         (dwarf_decode_macros): Remove unused declaration.
1568         (unsigned_int_compar): Remove.
1569         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1570         (psymtabs_addrmap_cleanup): Remove.
1571
1572 2017-10-08  Tom Tromey  <tom@tromey.com>
1573
1574         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1575         * frame.h (frame_cleanup_after_sniffer): Declare.
1576         (frame_prepare_for_sniffer): Return void.
1577         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1578         type of argument.
1579         (frame_prepare_for_sniffer): Return void.
1580
1581 2017-10-08  Tom Tromey  <tom@tromey.com>
1582
1583         * utils.h (make_cleanup_value_free): Remove.
1584         * utils.c (do_value_free, struct cleanup): Remove.
1585         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1586         Use gdb_value_up.
1587         * value.h (struct value_deleter): New.
1588         (gdb_value_up): New typedef.
1589
1590 2017-10-08  Tom Tromey  <tom@tromey.com>
1591
1592         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1593         (make_cleanup_free_search_symbols): Remove.
1594         (search_symbols): Return std::vector.
1595         (symbol_search::compare_search_syms): Now member of
1596         symbol_search.  Change arguments.
1597         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1598         (symtab_symbol_info, rbreak_command): Update.
1599         * symtab.h (struct symbol_search) <next>: Remove.
1600         Add constructors.
1601         (symbol_search::operator<): New function.
1602         (symbol_search::operator==): New function.
1603         (search_symbols): Remove std::vector.
1604         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1605         (symbol_search::compare_search_syms): Declare.
1606
1607 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1608
1609         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1610         arch/aarch64-insn.o.
1611         Remove one rule.
1612         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1613
1614 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1615
1616         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1617         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1618         arch/arm-linux.o respectively.
1619         * configure.tgt: Likewise.
1620
1621 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1622
1623         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1624         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1625
1626 2017-10-06  Pedro Alves  <palves@redhat.com>
1627
1628         * windows-nat.c: Include <algorithm>.
1629
1630 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1631
1632         * configure.tgt (i386_tobjs): New variable.
1633         (amd64_tobjs): New variable.
1634         Set $cpu_obs and $os_obs.
1635
1636 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1637
1638         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1639         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1640         (clean): Remove object files and dependency files.
1641         (distclean): Remove the directory.
1642         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1643         * configure: Re-generated.
1644         * configure.tgt: Replace amd64.o with arch/amd64.o.
1645
1646 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1647
1648         PR build/22188
1649         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1650         and SETEND.
1651
1652 2017-10-05  Pedro Alves  <palves@redhat.com>
1653
1654         * linux-nat.c (linux_child_follow_fork): When following the parent
1655         and detaching the child, consult the parent thread's architecture
1656         instead of the child's.
1657
1658 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1659
1660         * ax.h: Do not include "doublest.h".
1661         (union agent_val): Remove.
1662
1663 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1664
1665         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1666         (decimal_to_string): Return std::string object.
1667         (decimal_from_string): Accept std::string object.  Return bool.
1668         (decimal_from_integral, decimal_from_doublest): Remove.
1669         (decimal_from_longest): Add prototype.
1670         (decimal_from_ulongest): Likewise.
1671         (decimal_to_longest): Likewise.
1672         (decimal_from_doublest): Likewise.
1673         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1674         (MAX_DECIMAL_STRING): Move here.
1675         (decimal_to_string): Return std::string object.
1676         (decimal_from_string): Accept std::string object.  Return bool.
1677         (decimal_from_integral): Remove, replace by ...
1678         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1679         (decimal_to_longest): New function.
1680         (decimal_from_floating): Remove, replace by ...
1681         (decimal_from_doublest): ... this new function.
1682         (decimal_to_doublest): Update to new decimal_to_string interface.
1683
1684         * value.c (unpack_long): Use decimal_to_longest.
1685         * valops.c (value_cast): Use decimal_from_doublest instead of
1686         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1687         decimal_from_integral.
1688         * valarith.c (value_args_as_decimal): Likewise.
1689         * valprint.c (print_decimal_floating): Update to new
1690         decimal_to_string interface.
1691         * printcmd.c (printf_decfloat): Likewise.
1692         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1693
1694 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1695
1696         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1697         * gdbtypes.c: Include "floatformat.h".
1698         * value.c: Likewise.
1699         * m68k-tdep.c: Likewise.
1700
1701         * findvar.c: Do not include "floatformat.h".
1702         * amd64-darwin-tdep.c: Likewise.
1703         * arm-linux-tdep.c: Likewise.
1704         * i386-darwin-tdep.c: Likewise.
1705         * i387-tdep.c: Likewise.
1706         * m68k-linux-tdep.c: Likewise.
1707         * mep-tdep.c: Likewise.
1708         * mips-tdep.c: Likewise.
1709         * nios2-tdep.c: Likewise.
1710         * s390-linux-tdep.c: Likewise.
1711         * sparc-obsd-tdep.c: Likewise.
1712         * sparc-tdep.c: Likewise.
1713         * sparc64-tdep.c: Likewise.
1714         * spu-tdep.c: Likewise.
1715         * tic6x-tdep.c: Likewise.
1716         * tilegx-tdep.c: Likewise.
1717         * vax-tdep.c: Likewise.
1718         * xstormy16-tdep.c: Likewise.
1719         * xtensa-tdep.c: Likewise.
1720
1721         * top.c: Do not include "doublest.h".
1722         * aarch64-tdep.c: Likewise.
1723         * alpha-tdep.c: Likewise.
1724         * arm-linux-tdep.c: Likewise.
1725         * m68k-linux-tdep.c: Likewise.
1726         * tilegx-tdep.c: Likewise.
1727         * xstormy16-tdep.c: Likewise.
1728
1729 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1730
1731         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1732         (mipsn32_fbsd_sigframe): Define.
1733         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1734         for FreeBSD/mipsn32.
1735
1736 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1737
1738         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1739         AT_HWCAP.
1740
1741 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1742
1743         * MAINTAINERS (Misc): Update my email address.
1744
1745 2017-10-04  Pedro Alves  <palves@redhat.com>
1746
1747         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1748         it instead of target_gdbarch.
1749         (get_remote_state, get_remote_packet_size): Adjust
1750         get_remote_arch_state calls, passing down target_gdbarch
1751         explicitly.
1752         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1753         'gdbarch' and use it instead of target_gdbarch.
1754         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1755         passing down target_gdbarch explicitly.
1756         (struct stop_reply) <arch>: New field.
1757         (remote_parse_stop_reply): Use the stopped thread's architecture,
1758         not the current inferior's.  Save the architecture in the
1759         stop_reply.
1760         (process_stop_reply): Use the stop reply's architecture.
1761         (process_g_packet, remote_fetch_registers)
1762         (remote_prepare_to_store, store_registers_using_G)
1763         (remote_store_registers): Adjust get_remote_arch_state calls,
1764         using the regcache's architecture.
1765         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1766         passing down target_gdbarch explicitly.
1767         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1768         beneath instead of calling target_gdbarch.
1769         * target.c (default_thread_architecture): Use the specified
1770         inferior's architecture, instead of the current inferior's
1771         architecture (via target_gdbarch).
1772
1773 2017-10-04  Pedro Alves  <palves@redhat.com>
1774
1775         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1776         case.
1777         (regcache_print): Handle !target_has_registers here instead.
1778
1779 2017-10-04  Pedro Alves  <palves@redhat.com>
1780
1781         * frame.c (create_test_frame): Delete.
1782         * frame.h (create_test_frame): Delete.
1783         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1784         (class regcache_test): Delete.
1785         (test_target_has_registers, test_target_has_stack)
1786         (test_target_has_memory, test_target_prepare_to_store)
1787         (test_target_store_registers): New functions.
1788         (test_target_ops): New class.
1789         (register_to_value_test): Error out if there's already a
1790         process_stratum (or higher) target pushed.  Create a fuller mock
1791         environment, with mock target_ops, inferior, address space, thread
1792         and inferior_ptid.
1793         * progspace.c (struct address_space): Move to ...
1794         * progspace.h (struct address_space): ... here.
1795         * regcache.h (regcache::~regcache, regcache::raw_write)
1796         [GDB_SELF_TEST]: No longer virtual.
1797
1798 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1799
1800         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1801
1802 2017-10-04  Pedro Alves  <palves@redhat.com>
1803
1804         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1805         out of 'between TRY and CATCH'.
1806
1807 2017-10-04  Pedro Alves  <palves@redhat.com>
1808
1809         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1810         * common/common-exceptions.h (TRY): Open an outermost scope.
1811         Expand intro comment.
1812         (CATCH): Reindent.
1813         (END_CATCH): Close the outermost scope.
1814         * completer.c (complete_line_internal): Add missing END_CATCH.
1815
1816 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1817
1818         * NEWS (Changes since GDB 8.0): Add entry about new
1819         'set-cwd-on-gdbserver' feature.
1820         (New remote packets): Add entry for QSetWorkingDir.
1821         * common/common-inferior.h (set_inferior_cwd): New prototype.
1822         * infcmd.c (set_inferior_cwd): Remove "static".
1823         (show_cwd_command): Expand text to include remote debugging.
1824         * remote.c: Add PACKET_QSetWorkingDir.
1825         (remote_protocol_features) <QSetWorkingDir>: New entry for
1826         PACKET_QSetWorkingDir.
1827         (extended_remote_set_inferior_cwd): New function.
1828         (extended_remote_create_inferior): Call
1829         "extended_remote_set_inferior_cwd".
1830         (_initialize_remote): Call "add_packet_config_cmd" for
1831         QSetWorkingDir.
1832
1833 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1834
1835         * NEWS (New commands): Mention "set/show cwd".
1836         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1837         "cd" command's help text.
1838         * common/common-inferior.h (get_inferior_cwd): New prototype.
1839         * infcmd.c (inferior_cwd_scratch): New global variable.
1840         (set_inferior_cwd): New function.
1841         (get_inferior_cwd): Likewise.
1842         (set_cwd_command): Likewise.
1843         (show_cwd_command): Likewise.
1844         (_initialize_infcmd): Add "set/show cwd" commands.
1845         * inferior.h (class inferior) <cwd>: New field.
1846         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1847         (fork_inferior): Change inferior's cwd before its execution.
1848         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1849         to CreateProcess.
1850
1851 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1852
1853         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1854         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1855         (COMMON_OBS): Add gdb_tilde_expand.o.
1856         * common/gdb_tilde_expand.c: New file.
1857         * common/gdb_tilde_expand.h: Likewise.
1858
1859 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1860
1861         * gdbarch.sh (objfile): Remove duplicate declaration.
1862         * gdbarch.h: Regenerate.
1863
1864 2017-10-03  Tom Tromey  <tom@tromey.com>
1865
1866         * utils.c (internal_vproblem): Use string_vprintf.
1867
1868 2017-10-03  Tom Tromey  <tom@tromey.com>
1869
1870         * printcmd.c (info_symbol_command): Use std::string.
1871
1872 2017-10-03  Tom Tromey  <tom@tromey.com>
1873
1874         * top.c (gdb_safe_append_history): Use std::string.
1875
1876 2017-10-03  Tom Tromey  <tom@tromey.com>
1877
1878         * event-top.c (stdin_event_handler): Update.
1879         * main.c (captured_main_1): Update.
1880         * top.h (make_delete_ui_cleanup): Remove.
1881         (struct ui): Add constructor and destructor.
1882         (new_ui, delete_ui): Remove.
1883         * top.c (make_delete_ui_cleanup): Remove.
1884         (new_ui_command): Use std::unique_ptr.
1885         (delete_ui_cleanup): Remove.
1886         (ui::ui): Rename from new_ui.  Update.
1887         (free_ui): Remove.
1888         (ui::~ui): Rename from delete_ui.  Update.
1889
1890 2017-10-03  Tom Tromey  <tom@tromey.com>
1891
1892         * symfile.c (load_progress): Use gdb::byte_vector.
1893
1894 2017-10-03  Tom Tromey  <tom@tromey.com>
1895
1896         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1897         declaration.
1898         * printcmd.c (x_command): Remove unused declaration.
1899         * symfile.c (symbol_file_command): Remove unused declaration.
1900
1901 2017-10-03  Tom Tromey  <tom@tromey.com>
1902
1903         * utils.c (internal_vproblem): Use std::string.
1904         (defaulted_query): Likewise.
1905
1906 2017-10-03  Tom Tromey  <tom@tromey.com>
1907
1908         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1909         * top.c (execute_command_to_string): Update.
1910         * utils.c (make_cleanup_restore_page_info): Remove.
1911         (do_restore_page_info_cleanup): Remove.
1912         (set_batch_flag_and_restore_page_info):
1913         New.
1914         (make_cleanup_restore_page_info): Remove.
1915         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1916         (~set_batch_flag_and_restore_page_info): New
1917         (make_cleanup_restore_uinteger): Remove.
1918         (make_cleanup_restore_integer): Remove.
1919         (struct restore_integer_closure): Remove.
1920         (restore_integer): Remove.
1921         * utils.h (struct set_batch_flag_and_restore_page_info): New
1922         class.
1923         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1924         (make_cleanup_restore_page_info): Remove.
1925         (make_cleanup_restore_uinteger) Remove.
1926         (make_cleanup_restore_integer) Remove.
1927
1928 2017-10-03  Tom Tromey  <tom@tromey.com>
1929
1930         * record-full.h (record_full_gdb_operation_disable_set): Return
1931         scoped_restore_tmpl<int>.
1932         * infrun.c (adjust_pc_after_break): Update.
1933         (handle_signal_stop): Update.
1934         * record-full.c (record_full_gdb_operation_disable_set): Return
1935         scoped_restore_tmpl<int>.
1936         (record_full_wait_1, record_full_insert_breakpoint)
1937         (record_full_remove_breakpoint, record_full_save)
1938         (record_full_goto_insn): Update.
1939
1940 2017-10-02  Tom Tromey  <tom@tromey.com>
1941
1942         PR rust/22236:
1943         * rust-lang.c (rust_val_print_str): New function.
1944         (val_print_struct): Call it.
1945         (rust_subscript): Preserve name of slice type.
1946
1947 2017-10-02  Tom Tromey  <tom@tromey.com>
1948
1949         * rust-lang.c (rust_subscript): Handle slices in
1950         EVAL_AVOID_SIDE_EFFECTS case.
1951
1952 2017-10-02  Tom Tromey  <tom@tromey.com>
1953
1954         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1955
1956 2017-10-02  Tom Tromey  <tom@tromey.com>
1957
1958         * rust-lang.h (rust_slice_type): Add "extern".
1959
1960 2017-10-02  Tom Tromey  <tom@tromey.com>
1961             Pedro Alves  <palves@redhat.com>
1962
1963         * ada-lang.h (ada_exc_info::operator<): Make const.
1964         (ada_exc_info::operator==): Make const.
1965         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1966         Make const.
1967
1968 2017-09-29  Tom Tromey  <tom@tromey.com>
1969
1970         * target.c (read_whatever_is_readable): Change type of "result".
1971         Update.
1972         (free_memory_read_result_vector): Remove.
1973         (read_memory_robust): Change return type.  Update.
1974         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1975         bin2hex, std::string.
1976         * target.h (memory_read_result_s): Remove typedef.
1977         (free_memory_read_result_vector): Remove.
1978         (read_memory_robust): Return std::vector.
1979
1980 2017-09-29  Tom Tromey  <tom@tromey.com>
1981
1982         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1983
1984 2017-09-29  Tom Tromey  <tom@tromey.com>
1985
1986         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1987         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1988         operator< and operator==.
1989         (ada_exceptions_list): Return a std::vector.
1990         * ada-lang.c (ada_exc_info::operator<): Rename from
1991         compare_ada_exception_info.
1992         (ada_exc_info::operator==): New.
1993         (sort_remove_dups_ada_exceptions_list): Change type of
1994         "exceptions".
1995         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1996         (ada_add_global_exceptions): Likewise.
1997         (ada_exceptions_list_1): Return a std::vector.
1998         (ada_exceptions_list): Likewise.
1999
2000 2017-09-29  Tom Tromey  <tom@tromey.com>
2001
2002         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2003         'std::set *'.
2004         (print_one_inferior): Update.
2005         (free_vector_of_ints): Remove.
2006         (list_available_thread_groups): Change "ids" to std::set.
2007         (mi_cmd_list_thread_groups): Update.
2008         (struct collect_cores_data) <core>: Now a std::set.
2009         (collect_cores): Update.
2010         (unique): Remove.
2011         (print_one_inferior): Update.
2012
2013 2017-09-29  Tom Tromey  <tom@tromey.com>
2014
2015         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2016         (mi_execute_async_cli_command): Likewise.
2017         (mi_cmd_trace_frame_collected): Use field_fmt.
2018
2019 2017-09-29  Tom Tromey  <tom@tromey.com>
2020
2021         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2022         gdb::byte_vector.
2023
2024 2017-09-29  Tom Tromey  <tom@tromey.com>
2025
2026         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2027
2028 2017-09-29  Tom Tromey  <tom@tromey.com>
2029
2030         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2031
2032 2017-09-29  Tom Tromey  <tom@tromey.com>
2033
2034         * varobj.h (varobj_gen_name): Return std::string.
2035         * varobj.c (varobj_gen_name): Return std::string.
2036         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2037         (mi_cmd_var_delete): Don't copy "name".
2038
2039 2017-09-29  Tom Tromey  <tom@tromey.com>
2040
2041         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2042         (mi_cmd_break_insert_1): Update.
2043
2044 2017-09-29  Tom Tromey  <tom@tromey.com>
2045
2046         * target.h (make_scoped_defer_target_commit_resume): Update.
2047         * target.c (make_scoped_defer_target_commit_resume): Rename from
2048         make_cleanup_defer_target_commit_resume.  Return a
2049         scoped_restore.
2050         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2051
2052 2017-09-29  Tom Tromey  <tom@tromey.com>
2053
2054         * main.c (captured_main_1): Remove unused declaration.
2055         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2056
2057 2017-09-29  Tom Tromey  <tom@tromey.com>
2058
2059         * symtab.c (search_symbols): Remove unused outer cleanup.
2060         (make_source_files_completion_list): Remove unused declaration.
2061
2062 2017-09-29  Tom Tromey  <tom@tromey.com>
2063
2064         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2065
2066 2017-09-29  Tom Tromey  <tom@tromey.com>
2067
2068         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2069         gdb::byte_vector.
2070
2071 2017-09-29  Tom Tromey  <tom@tromey.com>
2072
2073         * complaints.c (vcomplaint): Use std::string.
2074
2075 2017-09-29  Tom Tromey  <tom@tromey.com>
2076
2077         * tracepoint.c (trace_variable_command): Use std::string.
2078         (encode_actions_1): Remove unused declarations.
2079         (create_tsv_from_upload): Use std::string.
2080
2081 2017-09-29  Tom Tromey  <tom@tromey.com>
2082
2083         * cp-support.c (gdb_demangle): Use std::string.
2084
2085 2017-09-29  Tom Tromey  <tom@tromey.com>
2086
2087         * stack.c (parse_frame_specification): Use std::string
2088         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2089
2090 2017-09-29  Tom Tromey  <tom@tromey.com>
2091
2092         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2093
2094 2017-09-29  Tom Tromey  <tom@tromey.com>
2095
2096         * utils.c (vfprintf_maybe_filtered): Use std::string.
2097         (vfprintf_unfiltered): Likewise.
2098
2099 2017-09-29  Tom Tromey  <tom@tromey.com>
2100
2101         * event-top.c (top_level_prompt): Return std::string.
2102         (display_gdb_prompt): Update.
2103
2104 2017-09-29  Tom Tromey  <tom@tromey.com>
2105
2106         * unittests/common-utils-selftests.c (format): New function.
2107         (string_vprintf_tests): New function.
2108         (_initialize_common_utils_selftests): Register new tests.
2109         * common/common-utils.c (string_vprintf): New function.
2110         * common/common-utils.h (string_vprintf): Declare.
2111
2112 2017-09-29  Pedro Alves  <palves@redhat.com>
2113
2114         * common/rsp-low.c (unpack_varlen_hex): Constify.
2115         * common/rsp-low.h (unpack_varlen_hex): Constify.
2116         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2117         Constify.
2118         * remote.c (remote_set_permissions, read_ptid)
2119         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2120         (remote_static_tracepoint_marker_at)
2121         (remote_static_tracepoint_markers_by_strid)
2122         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2123         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2124         (parse_tracepoint_definition, parse_tsv_definition)
2125         (parse_static_tracepoint_marker_definition): Constify.
2126         * tracepoint.h (parse_static_tracepoint_marker_definition)
2127         (parse_trace_status, parse_tracepoint_status)
2128         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2129
2130 2017-09-29  Pedro Alves  <palves@redhat.com>
2131
2132         * remote.c (target_buf, target_buf_size): Delete.
2133         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2134         Use the connection's packet buffer instead.
2135         All callers adjusted.
2136         (_initialize_remote): Remove references to target_buf and
2137         target_buf_size.
2138
2139 2017-09-28  Pedro Alves  <palves@redhat.com>
2140
2141         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2142         unittests/common-utils-selftests.c.
2143         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2144         (COMMON_OBS): Remove utils-selftests.o.
2145         * utils-selftests.c: Move to ...
2146         * unittests/common-utils-selftests.c: ... here and rename self
2147         test to "string_printf".
2148
2149 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2150
2151         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2152         having NULL cus or tus.
2153
2154 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2155
2156         * arm-tdep.c: (convert_from_extended): Remove.
2157         (convert_to_extended): Likewise.
2158         (arm_extract_return_value): Use convert_typed_floating.
2159         (arm_store_return_value): Likewise.
2160
2161         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2162         * sh-tdep.c: Do not include "floatformat.h".
2163         (sh_littlebyte_bigword_type): New function.
2164         (sh_register_convert_to_virtual): Use convert_typed_floating.
2165         (sh_register_convert_to_raw): Likewise.
2166         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2167         (sh64_littlebyte_bigword_type): New function.
2168         (sh64_extract_return_value): Use convert_typed_floating.
2169         (sh64_register_convert_to_virtual): Likewise.
2170         (sh64_register_convert_to_raw): Likewise.
2171
2172 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2173
2174         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2175         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2176
2177         * gdbtypes.h (union type_specific): Make field floatformat hold
2178         just a single struct floatformat, not an array.
2179         (floatformat_from_type): Move here.
2180         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2181         changed TYPE_FLOATFORMAT definition.
2182         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2183         (recursive_dump_type): Likewise.
2184         (init_float_type): Install correct floatformat for byte order.
2185         (arch_float_type): Likewise.
2186
2187 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2188
2189         * gdbtypes.c (init_type): Change incoming argument from
2190         length-in-bytes to length-in-bits.  Assert length is a
2191         multiple of TARGET_CHAR_BITS.
2192         (arch_type, arch_flags_type): Likewise.
2193         (init_integer_type): Update call to init_type.
2194         (init_character_type): Likewise.
2195         (init_boolean_type): Likewise.
2196         (init_float_type): Likewise.
2197         (init_decfloat_type): Likewise.
2198         (init_complex_type): Likewise.
2199         (init_pointer_type): Likewise.
2200         (objfile_type): Likewise.
2201         (arch_integer_type): Update call to arch_type.
2202         (arch_character_type): Likewise.
2203         (arch_boolean_type): Likewise.
2204         (arch_float_type): Likewise.
2205         (arch_decfloat_type): Likewise.
2206         (arch_complex_type): Likewise.
2207         (arch_pointer_type): Likewise.
2208         (gdbtypes_post_init): Likewise.
2209
2210         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2211         (read_base_type): Likewise.
2212         * mdebugread.c (basic_type): Likewise.
2213         * stabsread.c (dbx_init_float_type): Likewise.
2214         (rs6000_builtin_type): Likewise.
2215         (read_range_type): Likewise.  Also, fix call to init_integer_type
2216         with erroneous length argument.
2217
2218         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2219         * d-lang.c (build_d_types): Likewise.
2220         * f-lang.c (build_fortran_types): Likewise.
2221         * go-lang.c (build_go_types): Likewise.
2222         * opencl-lang.c (build_opencl_types): Likewise.
2223         * jit.c (finalize_symtab): Likewise.
2224         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2225         (build_std_type_info_type): Likewise.
2226         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2227         update call to arch_flags_type.
2228
2229         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2230         arch_type.
2231         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2232         * windows-tdep.c (windows_get_tlb_type): Likewise.
2233
2234         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2235         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2236         * m32c-tdep.c (make_types): Likewise.
2237         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2238         (rl78_psw_type): Update call to arch_flags_type.
2239         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2240         * rx-tdep.c (rx_psw_type): Likewise.
2241         (rx_fpsw_type): Likewise.
2242         * sparc-tdep.c (sparc_psr_type): Likewise.
2243         (sparc_fsr_type): Likewise.
2244         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2245         (sparc64_ccr_type): Likewise.
2246         (sparc64_fsr_type): Likewise.
2247         (sparc64_fprs_type): Likewise.
2248
2249 2017-09-27  Tom Tromey  <tom@tromey.com>
2250
2251         * findcmd.c (find_command): Constify.
2252
2253 2017-09-27  Tom Tromey  <tom@tromey.com>
2254
2255         * ada-tasks.c (task_command_1, task_command): Constify.
2256
2257 2017-09-27  Tom Tromey  <tom@tromey.com>
2258
2259         * symtab.c (maintenance_print_symbol_cache)
2260         (maintenance_flush_symbol_cache)
2261         (maintenance_print_symbol_cache_statistics): Constify.
2262
2263 2017-09-27  Tom Tromey  <tom@tromey.com>
2264
2265         * inferior.c (detach_inferior_command, kill_inferior_command)
2266         (inferior_command): Constify.
2267
2268 2017-09-27  Tom Tromey  <tom@tromey.com>
2269
2270         * regcache.c (regcache_print, maintenance_print_registers)
2271         (maintenance_print_raw_registers)
2272         (maintenance_print_cooked_registers)
2273         (maintenance_print_register_groups)
2274         (maintenance_print_remote_registers): Constify.
2275
2276 2017-09-27  Tom Tromey  <tom@tromey.com>
2277
2278         * printcmd.c (map_display_numbers, undisplay_command)
2279         (enable_disable_display_command, enable_display_command)
2280         (disable_display_command): Constify.
2281
2282 2017-09-27  Tom Tromey  <tom@tromey.com>
2283
2284         * breakpoint.h (delete_command): Don't declare.
2285         * breakpoint.c (delete_command, enable_once_command)
2286         (enable_count_command, enable_delete_command, breakpoint_1)
2287         (maintenance_info_breakpoints, stopin_command, stopat_command)
2288         (delete_command, delete_trace_command, save_breakpoints)
2289         (save_breakpoints_command, save_tracepoints_command): Constify.
2290
2291 2017-09-27  Tom Tromey  <tom@tromey.com>
2292
2293         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2294         (skip_ws, extract_identifier, macro_define_command)
2295         (macro_undef_command, macro_list_command): Constify.
2296
2297 2017-09-27  Tom Tromey  <tom@tromey.com>
2298
2299         * infcmd.c (environment_info, set_environment_command)
2300         (unset_environment_command, path_info, info_proc_cmd_1)
2301         (info_proc_cmd_mappings, info_proc_cmd_stat)
2302         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2303         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2304
2305 2017-09-27  Tom Tromey  <tom@tromey.com>
2306
2307         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2308         Constify.
2309
2310 2017-09-27  Tom Tromey  <tom@tromey.com>
2311
2312         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2313
2314 2017-09-27  Tom Tromey  <tom@tromey.com>
2315
2316         * demangle.c (demangle_command): Constify.
2317
2318 2017-09-27  Tom Tromey  <tom@tromey.com>
2319
2320         * progspace.c (maintenance_info_program_spaces_command):
2321         Constify.
2322
2323 2017-09-27  Tom Tromey  <tom@tromey.com>
2324
2325         * compile/compile.c (check_raw_argument, compile_file_command)
2326         (compile_code_command, compile_print_command): Constify.
2327
2328 2017-09-27  Tom Tromey  <tom@tromey.com>
2329
2330         * reggroups.c (maintenance_print_reggroups): Constify.
2331
2332 2017-09-27  Tom Tromey  <tom@tromey.com>
2333
2334         * dwarf2read.c (save_gdb_index_command): Constify.
2335
2336 2017-09-27  Tom Tromey  <tom@tromey.com>
2337
2338         * stap-probe.c (info_probes_stap_command): Constify.
2339
2340 2017-09-27  Tom Tromey  <tom@tromey.com>
2341
2342         * fork-child.c (unset_exec_wrapper_command): Constify.
2343
2344 2017-09-27  Tom Tromey  <tom@tromey.com>
2345
2346         * btrace.c (get_uint, get_context_size, no_chunk)
2347         (maint_btrace_packet_history_cmd)
2348         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2349         (maint_info_btrace_cmd): Constify.
2350
2351 2017-09-27  Tom Tromey  <tom@tromey.com>
2352
2353         * reverse.c (delete_bookmark_command): Constify.
2354
2355 2017-09-27  Tom Tromey  <tom@tromey.com>
2356
2357         * remote.c (set_memory_packet_size)
2358         (set_memory_write_packet_size, show_memory_write_packet_size)
2359         (set_memory_read_packet_size, show_memory_read_packet_size)
2360         (compare_sections_command, packet_command, remote_put_command)
2361         (remote_get_command, remote_delete_command): Constify.
2362
2363 2017-09-27  Tom Tromey  <tom@tromey.com>
2364
2365         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2366         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2367         (set_mipsfpu_auto_command): Constify.
2368
2369 2017-09-27  Tom Tromey  <tom@tromey.com>
2370
2371         * cli/cli-cmds.h (cd_command): Constify.
2372         * cli/cli-cmds.c (cd_command): Constify.
2373
2374 2017-09-27  Tom Tromey  <tom@tromey.com>
2375
2376         * thread.c (thread_name_command, thread_find_command): Constify.
2377
2378 2017-09-27  Tom Tromey  <tom@tromey.com>
2379
2380         * probe.c (enable_probes_command, disable_probes_command):
2381         Constify.
2382
2383 2017-09-27  Tom Tromey  <tom@tromey.com>
2384
2385         * symfile.c (symbol_file_command): Constify.
2386         * gdbcore.h (deprecated_file_changed_hook): Constify.
2387         * exec.c (deprecated_file_changed_hook, exec_file_command)
2388         (file_command): Constify.
2389         * defs.h (symbol_file_command): Constify.
2390
2391 2017-09-27  Tom Tromey  <tom@tromey.com>
2392
2393         * remote-fileio.c (set_system_call_allowed)
2394         (show_system_call_allowed): Constify.
2395
2396 2017-09-27  Tom Tromey  <tom@tromey.com>
2397
2398         * tracepoint.c (delete_trace_variable_command)
2399         (tfind_end_command, tfind_start_command, tfind_pc_command)
2400         (tfind_tracepoint_command, tfind_line_command)
2401         (tfind_range_command, tfind_outside_command): Constify.
2402
2403 2017-09-27  Tom Tromey  <tom@tromey.com>
2404
2405         * ax-gdb.c (maint_agent_printf_command, agent_command)
2406         (agent_eval_command): Constify.
2407
2408 2017-09-27  Tom Tromey  <tom@tromey.com>
2409
2410         * tracepoint.c (info_scope_command): Constify.
2411         * python/python.c (gdbpy_decode_line): Constify.
2412         * python/py-breakpoint.c (bppy_init): Constify.
2413         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2414         * location.h: (new_linespec_location)
2415         (string_to_event_location_basic, string_to_event_location):
2416         Constify.
2417         * location.c (new_linespec_location)
2418         (string_to_event_location_basic, string_to_event_location):
2419         Constify.
2420         * linespec.h (decode_line_with_current_source)
2421         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2422         * linespec.c (linespec_lex_to_end)
2423         (decode_line_with_current_source)
2424         (decode_line_with_last_displayed): Constify.
2425         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2426         Constify.
2427         * cli/cli-cmds.c (edit_command, list_command): Constify.
2428         * breakpoint.h (until_break_command, watch_command_wrapper)
2429         (awatch_command_wrapper, rwatch_command_wrapper)
2430         (init_ada_exception_breakpoint): Constify.
2431         * breakpoint.c (break_command_1, dprintf_command)
2432         (break_range_command, watch_command_wrapper)
2433         (rwatch_command_wrapper, awatch_command_wrapper)
2434         (until_break_command, init_ada_exception_breakpoint)
2435         (strace_marker_create_sals_from_location, trace_command)
2436         (ftrace_command, strace_command, struct tracepoint): Constify.
2437         * ax-gdb.c (agent_command_1): Constify.
2438         * ada-lang.c (ada_exception_sal): Constify.
2439
2440 2017-09-27  Tom Tromey  <tom@tromey.com>
2441
2442         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2443         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2444         (get_context_size, no_chunk, get_insn_history_modifiers)
2445         (cmd_record_insn_history, get_call_history_modifiers)
2446         (cmd_record_call_history): Constify.
2447
2448 2017-09-27  Tom Tromey  <tom@tromey.com>
2449
2450         * source.c (show_substitute_path_command)
2451         (unset_substitute_path_command, set_substitute_path_command):
2452         Constify.
2453
2454 2017-09-27  Tom Tromey  <tom@tromey.com>
2455
2456         * typeprint.c (maintenance_print_type): Constify.
2457         * maint.c (maintenance_dump_me, maintenance_demangle)
2458         (maintenance_time_display, maintenance_info_sections)
2459         (maintenance_print_statistics, maintenance_deprecate)
2460         (maintenance_undeprecate): Constify.
2461         (maintenance_do_deprecate): Constify.  Use std::string.
2462         (maintenance_selftest): Constify.
2463         * gdbtypes.h (maintenance_print_type): Constify.
2464
2465 2017-09-27  Tom Tromey  <tom@tromey.com>
2466
2467         * hppa-tdep.c (unwind_command): Constify.
2468
2469 2017-09-27  Tom Tromey  <tom@tromey.com>
2470
2471         * target-descriptions.c (unset_tdesc_filename_cmd)
2472         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2473         Constify.
2474
2475 2017-09-27  Tom Tromey  <tom@tromey.com>
2476
2477         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2478
2479 2017-09-27  Tom Tromey  <tom@tromey.com>
2480
2481         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2482
2483 2017-09-27  Tom Tromey  <tom@tromey.com>
2484
2485         * tui/tui-regs.c (tui_reg_command): Constify.
2486
2487 2017-09-27  Tom Tromey  <tom@tromey.com>
2488
2489         * skip.c (skip_file_command, skip_function_command)
2490         (skip_enable_command, skip_disable_command, skip_delete_command):
2491         Constify.
2492
2493 2017-09-27  Tom Tromey  <tom@tromey.com>
2494
2495         * record-btrace.c (cmd_record_btrace_bts_start)
2496         (cmd_record_btrace_pt_start): Constify.
2497
2498 2017-09-27  Tom Tromey  <tom@tromey.com>
2499
2500         * symmisc.c (maintenance_print_symbols)
2501         (maintenance_print_msymbols, maintenance_print_objfiles)
2502         (maintenance_info_symtabs, maintenance_check_symtabs)
2503         (maintenance_expand_symtabs, maintenance_info_line_tables):
2504         Constify.
2505
2506 2017-09-27  Tom Tromey  <tom@tromey.com>
2507
2508         * top.c (new_ui_command): Constify.
2509
2510 2017-09-27  Tom Tromey  <tom@tromey.com>
2511
2512         * symfile.c (add_symbol_file_command)
2513         (remove_symbol_file_command, list_overlays_command)
2514         (map_overlay_command, unmap_overlay_command)
2515         (overlay_auto_command, overlay_manual_command)
2516         (overlay_off_command, overlay_load_command): Constify.
2517
2518 2017-09-27  Tom Tromey  <tom@tromey.com>
2519
2520         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2521         (info_spu_mailbox_command, info_spu_dma_command)
2522         (info_spu_proxydma_command): Constify.
2523
2524 2017-09-27  Tom Tromey  <tom@tromey.com>
2525
2526         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2527
2528 2017-09-27  Tom Tromey  <tom@tromey.com>
2529
2530         * cli/cli-script.c (user_defined_command): Constify.
2531
2532 2017-09-27  Tom Tromey  <tom@tromey.com>
2533
2534         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2535         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2536         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2537         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2538         (dump_binary_value, append_binary_memory, append_binary_value):
2539         Constify.
2540         (struct dump_context) <func>: Constify.
2541         (add_dump_command): Update.
2542
2543 2017-09-27  Tom Tromey  <tom@tromey.com>
2544
2545         * cli/cli-cmds.c (show_version, show_configuration)
2546         (source_command, show_user): Constify.
2547
2548 2017-09-27  Tom Tromey  <tom@tromey.com>
2549
2550         * target.c (maintenance_print_target_stack): Constify.
2551
2552 2017-09-27  Tom Tromey  <tom@tromey.com>
2553
2554         * interps.c (interpreter_exec_cmd): Constify.
2555
2556 2017-09-27  Tom Tromey  <tom@tromey.com>
2557
2558         * record-full.c (cmd_record_full_restore): Constify.
2559
2560 2017-09-27  Tom Tromey  <tom@tromey.com>
2561
2562         * memattr.c (enable_mem_command, disable_mem_command)
2563         (delete_mem_command): Constify.
2564
2565 2017-09-27  Tom Tromey  <tom@tromey.com>
2566
2567         * value.c (show_convenience): Constify.
2568
2569 2017-09-27  Tom Tromey  <tom@tromey.com>
2570
2571         * gdbcore.h (core_file_command): Update.
2572         * corefile.c (core_file_command): Constify.
2573
2574 2017-09-27  Tom Tromey  <tom@tromey.com>
2575
2576         * user-regs.c (maintenance_print_user_registers): Constify.
2577
2578 2017-09-27  Tom Tromey  <tom@tromey.com>
2579
2580         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2581
2582 2017-09-27  Tom Tromey  <tom@tromey.com>
2583
2584         * cp-support.c (first_component_command): Constify.
2585
2586 2017-09-27  Tom Tromey  <tom@tromey.com>
2587
2588         * psymtab.c (maintenance_print_psymbols)
2589         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2590         Constify.
2591
2592 2017-09-27  Tom Tromey  <tom@tromey.com>
2593
2594         * windows-tdep.c (display_tib): Constify.
2595
2596 2017-09-27  Tom Tromey  <tom@tromey.com>
2597
2598         * linux-fork.c (delete_checkpoint_command)
2599         (detach_checkpoint_command): Constify.
2600
2601 2017-09-27  Tom Tromey  <tom@tromey.com>
2602
2603         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2604
2605 2017-09-27  Tom Tromey  <tom@tromey.com>
2606
2607         * arc-tdep.c (dump_arc_instruction_command): Constify.
2608
2609 2017-09-27  Tom Tromey  <tom@tromey.com>
2610
2611         * valprint.c (set_radix, show_radix): Constify.
2612
2613 2017-09-27  Tom Tromey  <tom@tromey.com>
2614
2615         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2616
2617 2017-09-27  Tom Tromey  <tom@tromey.com>
2618
2619         * command.h (not_just_help_class_command): Update.
2620         * cli/cli-decode.h (not_just_help_class_command): Update.
2621         * cli/cli-decode.c (not_just_help_class_command): Constify.
2622
2623 2017-09-27  Tom Tromey  <tom@tromey.com>
2624
2625         * gdb_bfd.c (maintenance_info_bfds): Constify.
2626
2627 2017-09-27  Tom Tromey  <tom@tromey.com>
2628
2629         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2630         overloads.
2631         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2632         (do_const_cfunc): New function.
2633         (cmd_cfunc_eq): New overload.
2634         (cli_user_command_p): Check do_const_cfunc.
2635         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2636         const_cfunc.
2637         * command.h (add_cmd): Add const overload and no-function
2638         overload.
2639         (set_cmd_cfunc): Add const overload.
2640         (cmd_const_cfunc_ftype): Declare.
2641         (cmd_cfunc_eq): Add const overload.
2642         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2643         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2644         overload.
2645
2646 2017-09-27  Tom Tromey  <tom@tromey.com>
2647
2648         * macroexp.c (get_next_token_for_substitution): New function.
2649         (substitute_args): Call it.  Check for __VA_OPT__.
2650
2651 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2652             Pedro Alves <palves@redhat.com>
2653
2654         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2655         producer_is_icc_lt_14.
2656         (producer_is_icc_lt_14): New function.
2657         (check_producer): Add code for checking version of ICC.
2658         (producer_is_icc): Move to producer.c.
2659         (read_structure_type): Restrict ICC workaround to ICC<14.
2660         * producer.c: Include selftest.h.
2661         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2662         New functions.
2663         * producer.h (producer_is_icc): New declaration.
2664
2665 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2666
2667         * Makefile.in (SFILES): Add producer.c.
2668         (COMMON_OBS): Add producer.o
2669         * amd64-tdep.c (producer.h): Add new include.
2670         * dwarf2read.c (producer.h): Add new include.
2671         * producer.c: New file.
2672         * producer.h: New file.
2673         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2674         producer.c.
2675         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2676         producer.h.
2677
2678 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2679
2680         * configure.ac: Search ncursesw before ncurses.
2681         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2682         * gdb_curses.h: Include <ncursesw/ncurses.h>
2683         * config.in, configure: Regenerate.
2684
2685 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2686
2687         PR gdb/22185
2688         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2689         obsolete.
2690         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2691         Remove i386sol2 support.
2692         * configure.nat <i386sol2>: Remove.
2693         <sol2-64>: Fold into ...
2694         <sol2>: ... this.
2695         Move common settings to default section.
2696         Add sol-thread.o.
2697         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2698         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2699         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2700         <i[34567]86-*-solaris*>: Remove.
2701         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2702
2703         * configure.ac: Remove wctype in libw check.
2704         (_MSE_INT_H): Don't define on Solaris 7-9.
2705         <solaris*>: Remove libthread_db.so.1 check.
2706         * configure: Regenerate.
2707         * config.in: Regenerate.
2708
2709         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2710         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2711         (gdb_ps_size_t): Remove.
2712         Use base types in users.
2713         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2714
2715         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2716
2717 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2718
2719         PR build/22206
2720         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2721         (adi_is_addr_mapped): Likewise.
2722         (PSR_ICC): Don't redefine.
2723         (PSR_IMPL): Likewise.
2724
2725 2017-09-25  Tom Tromey  <tom@tromey.com>
2726
2727         * regcache.c (regcache::dump): Use string_printf.
2728
2729 2017-09-25  Tom Tromey  <tom@tromey.com>
2730
2731         * regcache.c (class regcache_invalidator): New.
2732         (struct register_to_invalidate): Remove.
2733         (make_cleanup_regcache_invalidate): Remove.
2734         (regcache::raw_write): Use regcache_invalidator.
2735
2736 2017-09-25  Tom Tromey  <tom@tromey.com>
2737
2738         * spu-tdep.c (spu2ppu_sniffer): Update.
2739         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2740         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2741         Remove.
2742         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2743         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2744         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2745         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2746         (frame_pop): Update.
2747
2748 2017-09-25  Tom Tromey  <tom@tromey.com>
2749
2750         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2751         * regcache.h (regcache_xfree): Don't declare.
2752         * regcache.c (regcache_xfree): Remove.
2753         (do_regcache_xfree): Use delete.
2754         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2755         * linux-fork.c (free_fork): Use delete.
2756         (fork_save_infrun_state): Likewise.
2757         * jit.c (jit_dealloc_cache): Use delete.
2758         * infrun.c (discard_infcall_suspend_state): Use delete.
2759
2760 2017-09-25  Tom Tromey  <tom@tromey.com>
2761
2762         * regcache.h (regcache_xmalloc): Don't declare.
2763         (regcache_raw_set_cached_value): Update comment.
2764         * regcache.c (regcache_xmalloc): Remove.
2765         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2766         * jit.c (jit_frame_sniffer): Use new.
2767         * frame.c (frame_save_as_regcache): Use new.
2768
2769 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2770
2771         * NEWS: Advertise support for guarded-storage registers on IBM z.
2772
2773 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2774
2775         * s390-linux-nat.c (have_regset_gs): New static variable.
2776         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2777         control block and guarded-storage broadcast control regsets.
2778         (s390_read_description): Detect whether the target has
2779         guarded-storage support, return appropriate tdesc.
2780         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2781         (features/s390x-gs-linux64.c): Likewise.
2782         (struct gdbarch_tdep) <have_gs>: New field.
2783         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2784         (s390_gsbc_regset): New variables.
2785         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2786         and s390_gsbc_regset, if applicable.
2787         (s390_core_read_description): Check whether core file was from a
2788         target with guarded-storage support; include appropriate regsets.
2789         (s390_gdbarch_init): Add registers for guarded-storage support.
2790         (_initialize_s390_tdep): Initialize new target descriptions that
2791         include registers for guarded-storage support.
2792         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2793         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2794         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2795         (S390_NUM_REGS): Adjust macro definition.
2796         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2797         (tdesc_s390x_gs_linux64): New declarations.
2798
2799 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2800
2801         * features/s390-gs-linux64.xml: New file.
2802         * features/s390-gs.xml: New file.
2803         * features/s390-gsbc.xml: New file.
2804         * features/s390x-gs-linux64.xml: New file.
2805         * features/Makefile (WHICH): Add s390-gs-linux64 and
2806         s390x-gs-linux64.
2807         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2808         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2809         * features/s390-gs-linux64.c: New generated file.
2810         * features/s390x-gs-linux64.c: New file.
2811         * regformats/s390-gs-linux64.dat: New file.
2812         * regformats/s390x-gs-linux64.dat: New file.
2813
2814 2017-09-23  Tom Tromey  <tom@tromey.com>
2815
2816         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2817
2818 2017-09-22  Tom Tromey  <tom@tromey.com>
2819
2820         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2821         type to scoped_restore_tmpl.
2822         <scoped_input_handler>: Initialize m_quit_handler directly.
2823
2824 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2825
2826         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2827         (cd_command): Likewise.  Free "current_directory" before
2828         assigning to it.
2829         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2830         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2831         * top.c (gdb_dirbuf): Remove global declaration.
2832         * top.h (gdb_dirbuf): Likewise.
2833
2834 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2835
2836         * gnulib/aclocal.m4: Regenerate.
2837         * gnulib/config.in: Regenerate.
2838         * gnulib/configure: Regenerate.
2839         * gnulib/import/Makefile.am: Regenerate.
2840         * gnulib/import/Makefile.in: Regenerate.
2841         * gnulib/import/assure.h: New file.
2842         * gnulib/import/at-func.c: Likewise
2843         * gnulib/import/chdir-long.c: New file.
2844         * gnulib/import/chdir-long.h: New file.
2845         * gnulib/import/cloexec.c: New file.
2846         * gnulib/import/cloexec.h: New file.
2847         * gnulib/import/close.c: New file.
2848         * gnulib/import/closedir.c: New file.
2849         * gnulib/import/dirent-private.h: New file.
2850         * gnulib/import/dup-safer.c: New file.
2851         * gnulib/import/dup.c: New file.
2852         * gnulib/import/dup2.c: New file.
2853         * gnulib/import/error.c: New file.
2854         * gnulib/import/error.h: New file.
2855         * gnulib/import/exitfail.c: New file.
2856         * gnulib/import/exitfail.h: New file.
2857         * gnulib/import/fchdir.c: New file.
2858         * gnulib/import/fcntl.c: New file.
2859         * gnulib/import/fcntl.in.h: New file.
2860         * gnulib/import/fd-hook.c: New file.
2861         * gnulib/import/fd-hook.h: New file.
2862         * gnulib/import/fd-safer.c: New file.
2863         * gnulib/import/fdopendir.c: New file.
2864         * gnulib/import/filename.h: New file.
2865         * gnulib/import/filenamecat-lgpl.c: New file.
2866         * gnulib/import/filenamecat.h: New file.
2867         * gnulib/import/fstat.c: New file.
2868         * gnulib/import/fstatat.c: New file.
2869         * gnulib/import/getcwd-lgpl.c: New file.
2870         * gnulib/import/getcwd.c: New file.
2871         * gnulib/import/getdtablesize.c: New file.
2872         * gnulib/import/getlogin_r.c: New file.
2873         * gnulib/import/getprogname.c: New file.
2874         * gnulib/import/getprogname.h: New file.
2875         * gnulib/import/gettext.h: New file.
2876         * gnulib/import/glob-libc.h: New file.
2877         * gnulib/import/glob.c: New file.
2878         * gnulib/import/glob.in.h: New file.
2879         * gnulib/import/intprops.h: New file.
2880         * gnulib/import/m4/chdir-long.m4: New file.
2881         * gnulib/import/m4/close.m4: New file.
2882         * gnulib/import/m4/closedir.m4: New file.
2883         * gnulib/import/m4/d-ino.m4: New file.
2884         * gnulib/import/m4/d-type.m4: New file.
2885         * gnulib/import/m4/dup.m4: New file.
2886         * gnulib/import/m4/dup2.m4: New file.
2887         * gnulib/import/m4/error.m4: New file.
2888         * gnulib/import/m4/fchdir.m4: New file.
2889         * gnulib/import/m4/fcntl.m4: New file.
2890         * gnulib/import/m4/fcntl_h.m4: New file.
2891         * gnulib/import/m4/fdopendir.m4: New file.
2892         * gnulib/import/m4/filenamecat.m4: New file.
2893         * gnulib/import/m4/fstat.m4: New file.
2894         * gnulib/import/m4/fstatat.m4: New file.
2895         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2896         * gnulib/import/m4/getcwd-path-max.m4: New file.
2897         * gnulib/import/m4/getcwd.m4: New file.
2898         * gnulib/import/m4/getdtablesize.m4: New file.
2899         * gnulib/import/m4/getlogin_r.m4: New file.
2900         * gnulib/import/m4/getprogname.m4: New file.
2901         * gnulib/import/m4/glob.m4: New file.
2902         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2903         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2904         * gnulib/import/m4/mempcpy.m4: New file.
2905         * gnulib/import/m4/memrchr.m4: New file.
2906         * gnulib/import/m4/mode_t.m4: New file.
2907         * gnulib/import/m4/msvc-inval.m4: New file.
2908         * gnulib/import/m4/msvc-nothrow.m4: New file.
2909         * gnulib/import/m4/open.m4: New file.
2910         * gnulib/import/m4/openat.m4: New file.
2911         * gnulib/import/m4/opendir.m4: New file.
2912         * gnulib/import/m4/readdir.m4: New file.
2913         * gnulib/import/m4/realloc.m4: New file.
2914         * gnulib/import/m4/rewinddir.m4: New file.
2915         * gnulib/import/m4/save-cwd.m4: New file.
2916         * gnulib/import/m4/strdup.m4: New file.
2917         * gnulib/import/m4/strerror.m4: New file.
2918         * gnulib/import/m4/unistd-safer.m4: New file.
2919         * gnulib/import/mempcpy.c: New file.
2920         * gnulib/import/memrchr.c: New file.
2921         * gnulib/import/msvc-inval.c: New file.
2922         * gnulib/import/msvc-inval.h: New file.
2923         * gnulib/import/msvc-nothrow.c: New file.
2924         * gnulib/import/msvc-nothrow.h: New file.
2925         * gnulib/import/open.c: New file.
2926         * gnulib/import/openat-die.c: New file.
2927         * gnulib/import/openat-priv.h: New file.
2928         * gnulib/import/openat-proc.c: New file.
2929         * gnulib/import/openat.c: New file.
2930         * gnulib/import/openat.h: New file.
2931         * gnulib/import/opendir.c: New file.
2932         * gnulib/import/pipe-safer.c: New file.
2933         * gnulib/import/readdir.c: New file.
2934         * gnulib/import/realloc.c: New file.
2935         * gnulib/import/rewinddir.c: New file.
2936         * gnulib/import/save-cwd.c: New file.
2937         * gnulib/import/save-cwd.h: New file.
2938         * gnulib/import/strdup.c: New file.
2939         * gnulib/import/strerror-override.c: New file.
2940         * gnulib/import/strerror-override.h: New file.
2941         * gnulib/import/strerror.c: New file.
2942         * gnulib/import/unistd--.h: New file.
2943         * gnulib/import/unistd-safer.h: New file.
2944         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2945         "getcwd" and "glob".
2946         * ser-tcp.c: Undefine "close" before redefining it.
2947
2948 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2949
2950         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2951         get rid of res_val.
2952
2953 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2954
2955         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2956         <sol2,sparc>: Likewise.
2957         <sol2-64,i386>: Likewise.
2958
2959         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2960         -Wdeprecated-declarations on *-*-solaris*.
2961         * configure: Regenerate.
2962
2963         * procfs.c: Include "nat/inferior.h".
2964         (procfs_info_proc): Fix typo.
2965
2966 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2967
2968         * remote.c (vector): Include.
2969         (struct private_thread_info): Add field, thread_handle.
2970         (free_private_thread_info): Deallocate storage associated with
2971         thread handle.
2972         (get_private_info_thread): Initialize `thread_handle' field.
2973         (struct thread_item): Add field, thread_handle.
2974         (clear_threads_listing_context): Deallocate storage associated
2975         with thread handle.
2976         (start_thread): Add support for "handle" attribute.
2977         (thread_attributes): Add "handle".
2978         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2979         field.
2980         (remote_update_thread_list): Update thread_handle.
2981         (remote_thread_handle_to_thread_info): New function.
2982         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2983
2984 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2985
2986         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2987         function.
2988         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2989         * python/python-internal.h (thread_object_type): Declare.
2990
2991 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2992
2993         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2994         (target_thread_handle_to_thread_info): Declare.
2995         * target.c (target_thread_handle_to_thread_info): New function.
2996         * target-delegates.c: Regenerate.
2997         * gdbthread.h (find_thread_by_handle): Declare.
2998         * thread.c (find_thread_by_handle): New function.
2999         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3000         function.
3001         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3002
3003 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3004
3005         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3006
3007 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3008
3009         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3010
3011 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3012
3013         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3014         to gdb_target_obs.
3015
3016 2017-09-20  Tom Tromey  <tom@tromey.com>
3017
3018         * breakpoint.c (struct counted_command_line): Remove.
3019         (breakpoint_commands): Update.
3020         (alloc_counted_command_line, incref_counted_command_line)
3021         (decref_counted_command_line, do_cleanup_counted_command_line)
3022         (make_cleanup_decref_counted_command_line): Remove.
3023         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3024         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3025         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3026         (save_breakpoints): Update.
3027         * breakpoint.h (counted_command_line): Now a typedef to
3028         shared_ptr.
3029         (struct breakpoint) <commands>: Now a counted_command_line.
3030         (struct bpstats) <command>: Likewise.
3031
3032 2017-09-20  Tom Tromey  <tom@tromey.com>
3033
3034         * breakpoint.c (struct commands_info, do_map_commands_command):
3035         Remove.
3036         (commands_command_1): Update.
3037         (iterate_over_related_breakpoints): Take a function_view.
3038         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3039         (delete_command): Update.
3040         (map_breakpoint_numbers): Take a function_view.
3041         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3042         (disable_command): Update.
3043         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3044         (enable_command): Update.
3045         (struct disp_data, do_enable_breakpoint_disp)
3046         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3047         (do_map_enable_delete_breakpoint): Remove.
3048         (enable_once_command, enable_count_command, enable_delete_command)
3049         (delete_trace_variable_command): Update.
3050
3051 2017-09-20  Tom Tromey  <tom@tromey.com>
3052
3053         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3054         (bpstat_clear): Use delete.
3055         (bpstats): New constructors.
3056         (bpstat_copy, bpstat_stop_status): Use new.
3057         (dprintf_after_condition_true): Update.
3058         * breakpoint.h (bpstats::bpstats): Add constructors.
3059         (bpstats::~bpstats): Add destructor.
3060
3061 2017-09-20  Pedro Alves  <palves@redhat.com>
3062
3063         * eval.c (make_params): Delete, refactored as ...
3064         (class fake_method): ... this new type's ctor.
3065         (fake_method::~fake_method): New.
3066         (evaluate_subexp_standard): Use 'fake_method'.
3067
3068 2017-09-20  Tom Tromey  <tom@tromey.com>
3069
3070         * windows-nat.c (get_windows_debug_event, windows_wait)
3071         (do_initial_windows_stuff, windows_attach): Update.
3072         * utils.c (vwarning, internal_vproblem): Update.
3073         (ui_unregister_input_event_handler_cleanup)
3074         (prepare_to_handle_input): Remove.
3075         (class scoped_input_handler): New.
3076         (defaulted_query, prompt_for_continue): Update.
3077         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3078         Update.
3079         * top.c (undo_terminal_modifications_before_exit): Update.
3080         * target/target.h (target_terminal_init, target_terminal_inferior)
3081         (target_terminal_ours): Don't declare.
3082         (class target_terminal): New.
3083         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3084         (target_terminal_ours_for_output)
3085         (make_cleanup_restore_target_terminal): Don't declare.
3086         (target_terminal_info): Remove.
3087         * target.c (enum terminal_state, terminal_state): Remove.
3088         (target_terminal::terminal_state): Define.
3089         (target_terminal::init): Rename from target_terminal_init.
3090         (target_terminal::inferior): Rename from
3091         target_terminal_inferior.
3092         (target_terminal::ours): Rename from target_terminal_ours.
3093         (target_terminal::ours_for_output): Rename from
3094         target_terminal_ours_for_output.
3095         (target_terminal::info): New method.
3096         (cleanup_restore_target_terminal)
3097         (make_cleanup_restore_target_terminal): Remove.
3098         * solib.c (handle_solib_event): Update.
3099         * remote.c (remote_serial_quit_handler): Update.
3100         (remote_terminal_inferior, remote_wait_as): Update.
3101         * record-full.c (record_full_wait_1): Update.
3102         * nto-procfs.c (procfs_create_inferior): Update.
3103         * nat/fork-inferior.c (startup_inferior): Update.
3104         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3105         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3106         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3107         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3108         (mi_breakpoint_created, mi_breakpoint_deleted)
3109         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3110         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3111         (mi_user_selected_context_changed, report_initial_inferior):
3112         Update.
3113         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3114         (linux_nat_terminal_inferior): Update.
3115         * infrun.c (follow_fork_inferior)
3116         (handle_vfork_child_exec_or_exit, do_target_resume)
3117         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3118         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3119         Update.
3120         * inflow.c (child_terminal_init, info_terminal_command): Update.
3121         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3122         (attach_command): Update.
3123         * infcall.c (call_thread_fsm_should_stop): Update.
3124         * gnu-nat.c (gnu_attach): Update.
3125         * extension.c (struct active_ext_lang_state)
3126         (restore_active_ext_lang): Update.
3127         * exceptions.c (print_flush): Update.
3128         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3129         (struct quit_handler_cleanup_data, restore_quit_handler)
3130         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3131         Remove.
3132         * cp-support.c (gdb_demangle): Update.
3133         * breakpoint.c (update_inserted_breakpoint_locations)
3134         (insert_breakpoint_locations, handle_jit_event)
3135         (disable_breakpoints_in_unloaded_shlib): Update.
3136         * annotate.c (annotate_breakpoints_invalid)
3137         (annotate_frames_invalid): Update.
3138
3139 2017-09-20  Tom Tromey  <tom@tromey.com>
3140
3141         * main.c (catch_command_errors): Rename from
3142         catch_command_errors_const.
3143         (captured_main_1): Update.
3144
3145 2017-09-20  Pedro Alves  <palves@redhat.com>
3146
3147         * cli/cli-cmds.c (list_command): Use print_sal_location.
3148         (print_sal_location): New function.
3149         (ambiguous_line_spec): Use print_sal_location.
3150         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3151         * symtab.c (find_function_start_sal): Likewise.
3152         * symtab.h (symtab_and_line::symbol): New field.
3153
3154 2017-09-20  Pedro Alves  <palves@redhat.com>
3155
3156         * linespec.c (minsym_found): Handle non-text minsyms.
3157         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3158
3159 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3160
3161         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3162         backslash.
3163
3164 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3165
3166         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3167         vmovups instead vmovaps.
3168         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3169
3170 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3171
3172         * NEWS (Changes since GDB 8.0): Add starti.
3173         * infcmd.c (enum run_break): New.
3174         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3175         case.
3176         (run_command): Use enum run_how.
3177         (start_command): Likewise.
3178         (starti_command): New function.
3179         (RUN_ARGS_HELP): New macro.
3180         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3181         commands.  Add starti command.
3182
3183 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3184
3185         * Makefile.in (monitor.o): Remove the rule.
3186
3187 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3188
3189         * annotate.h (struct annotate_arg_emitter): Use
3190         DISABLE_COPY_AND_ASSIGN.
3191         * common/refcounted-object.h (refcounted_object): Likewise.
3192         * completer.h (struct completion_result): Likewise.
3193         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3194         * filename-seen-cache.h (filename_seen_cache): Likewise.
3195         * gdbcore.h (thread_section_name): Likewise.
3196         * gdb_regex.h (compiled_regex): Likewise.
3197         * gdbthread.h (scoped_restore_current_thread): Likewise.
3198         * inferior.h (scoped_restore_current_inferior): Likewise.
3199         * jit.c (jit_reader): Likewise.
3200         * linespec.h (struct linespec_result): Likewise.
3201         * mi/mi-parse.h (struct mi_parse): Likewise.
3202         * nat/fork-inferior.c (execv_argv): Likewise.
3203         * progspace.h (scoped_restore_current_program_space): Likewise.
3204         * python/python-internal.h (class gdbpy_enter): Likewise.
3205         * regcache.h (regcache): Likewise.
3206         * target-descriptions.c (struct tdesc_reg): Likewise.
3207         (struct tdesc_type): Likewise.
3208         (struct tdesc_feature): Likewise.
3209         * ui-out.h (ui_out_emit_type): Likewise.
3210
3211 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3212
3213         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3214         label abort_expression.
3215
3216 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3217
3218         * common/buffer.c (buffer_xml_printf): Adjust.
3219         * common/xml-utils.c (xml_escape_text): Change return type to
3220         std::string, update code accordingly.
3221         * common/xml-utils.h (xml_escape_text): Change return type to
3222         std::string.
3223         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3224         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3225         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3226         Adjust.
3227
3228 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3229
3230         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3231         (SUBDIR_UNITTESTS_OBS): Add new object file.
3232         * unittests/xml-utils-selftests.c: New file.
3233
3234 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3235
3236         * common/selftest.h (selftest): New struct/interface.
3237         (register_test): Add name parameter, add new overload.
3238         (run_tests): Add filter parameter.
3239         (for_each_selftest_ftype): New typedef.
3240         (for_each_selftest): New declaration.
3241         * common/selftest.c (tests): Change type to
3242         map<string, unique_ptr<selftest>>.
3243         (simple_selftest): New struct.
3244         (register_test): New function.
3245         (register_test): Add name parameter and use it.
3246         (run_tests): Add filter parameter and use it.  Add prints.
3247         Adjust to vector -> map change.
3248         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3249         registering selftests.
3250         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3251         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3252         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3253         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3254         * findvar.c (_initialize_findvar): Likewise.
3255         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3256         * maint.c (maintenance_selftest): Update call to run_tests.
3257         (maintenance_info_selftests): New function.
3258         (_initialize_maint_cmds): Register "maintenance info selftests"
3259         command.  Update "maintenance selftest" doc.
3260         * regcache.c (_initialize_regcache): Add names when registering
3261         selftests.
3262         * rust-exp.y (_initialize_rust_exp): Likewise.
3263         * selftest-arch.c (gdbarch_selftest): New struct.
3264         (gdbarch_tests): Remove.
3265         (register_test_foreach_arch): Add name parameter.  Call
3266         register_test.
3267         (tests_with_arch): Remove, move most content to
3268         gdbarch_selftest::operator().
3269         (_initialize_selftests_foreach_arch): Remove.
3270         * selftest-arch.h (register_test_foreach_arch): Add name
3271         parameter.
3272         (run_tests_with_arch): New declaration.
3273         * utils-selftests.c (_initialize_utils_selftests): Add names
3274         when registering selftests.
3275         * utils.c (_initialize_utils): Likewise.
3276         * unittests/array-view-selftests.c
3277         (_initialize_array_view_selftests): Likewise.
3278         * unittests/environ-selftests.c (_initialize_environ_selftests):
3279         Likewise.
3280         * unittests/function-view-selftests.c
3281         (_initialize_function_view_selftests): Likewise.
3282         * unittests/offset-type-selftests.c
3283         (_initialize_offset_type_selftests): Likewise.
3284         * unittests/optional-selftests.c
3285         (_initialize_optional_selftests): Likewise.
3286         * unittests/scoped_restore-selftests.c
3287         (_initialize_scoped_restore_selftests): Likewise.
3288         * NEWS: Document "maintenance selftest" and "maint info
3289         selftests".
3290
3291 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3292
3293         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3294         scoped_restore.
3295
3296 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3297
3298         * mi/mi-main.c (mi_load_progress): Make uiout variable
3299         a unique_ptr.
3300
3301 2017-09-15  Pedro Alves  <palves@redhat.com>
3302
3303         * compile/compile-c-types.c (convert_enum, convert_int)
3304         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3305
3306 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3307
3308         * dwarf2read.c (copy_string): Remove.
3309         (parse_macro_definition): Replace copy_string with savestring.
3310
3311 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3312
3313         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3314         gdb_target_obs.
3315         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3316         Likewise.
3317         (i[34567]86-*-linux*): Likewise.
3318
3319 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3320
3321         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3322         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3323         <stack>: Change type to std::vector.
3324         <stack_len, stack_allocated>: Remove.
3325         <grow_stack>: Remove.
3326         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3327         (dwarf_expr_context::~dwarf_expr_context): Remove.
3328         (dwarf_expr_context::grow_stack): Remove.
3329         (dwarf_expr_context::push): Adjust.
3330         (dwarf_expr_context::pop): Adjust.
3331         (dwarf_expr_context::fetch): Adjust.
3332         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3333         (dwarf_expr_context::stack_empty_p): Adjust.
3334         (dwarf_expr_context::execute_stack_op): Adjust.
3335
3336 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3337
3338         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3339         return type to bool.
3340         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3341
3342 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3343
3344         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3345         Change type to bool.
3346         (dwarf_stack_value) <in_stack_memory>: Likewise.
3347         (dwarf_expr_context) <push_address>: Change parameter type to
3348         bool.
3349         <fetch_in_stack_memory>: Change return type to bool.
3350         <push>: Change parameter type to bool.
3351         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3352         to bool.
3353         (dwarf_expr_context::push_address): Likewise.
3354         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3355         to bool.
3356         (dwarf_expr_context::execute_stack_op): Adjust.
3357         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3358
3359 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3360
3361         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3362         (struct dwarf_expr_context) <n_pieces>: Remove.
3363         <pieces>: Change type to std::vector.
3364         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3365         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3366         pieces.
3367         (dwarf_expr_context::add_piece): Adjust.
3368         * dwarf2loc.c (struct piece_closure): Initialize fields.
3369         <n_pieces>: Remove.
3370         <pieces>: Change type to std::vector.
3371         (allocate_piece_closure): Adjust, change parameter to
3372         std::vector rvalue and std::move it to piece_closure.
3373         (rw_pieced_value): Adjust.
3374         (check_pieced_synthetic_pointer): Adjust.
3375         (indirect_synthetic_pointer): Adjust.
3376         (coerce_pieced_ref): Adjust.
3377         (free_pieced_value_closure):  Adjust.  Use delete to free
3378         piece_closure.
3379         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3380         to allocate_piece_closure.
3381         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3382
3383 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3384
3385         * probe.h (probe_ops_cp): Remove typedef.
3386         (DEF_VEC_P (probe_ops_cp)): Remove.
3387         (all_probe_ops): Change type to std::vector.
3388         * probe.c (info_probes_for_ops): Adjust to vector change.
3389         (probe_linespec_to_ops): Likewise.
3390         (all_probe_ops): Change type to std::vector.
3391         (_initialize_probe): Adjust to vector change.
3392         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3393         * elfread.c (elf_get_probes): Likewise.
3394         * stap-probe.c (_initialize_stap_probe): Likewise.
3395
3396 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3397
3398         * probe.h (struct bound_probe): Define constructors.
3399         * probe.c (bound_probe_s): Remove typedef.
3400         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3401         (collect_probes): Change return type to std::vector, remove
3402         cleanup.
3403         (compare_probes): Return bool, change parameter type.  Change
3404         semantic to "less than".
3405         (gen_ui_out_table_header_info): Change parameter to std::vector
3406         and update.
3407         (exists_probe_with_pops): Likewise.
3408         (info_probes_for_ops): Update to std::vector change.
3409         (enable_probes_command): Likewise.
3410         (disable_probes_command): Likewise.
3411
3412 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3413
3414         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3415         vec to std::vector.
3416         * probe.c (parse_probes_in_pspace): Update.
3417         (find_probes_in_objfile): Update.
3418         (find_probe_by_pc): Update.
3419         (collect_probes): Update.
3420         (probe_any_get_probes): Update.
3421         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3422         return type to reference to std::vector.
3423         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3424         std::vector and update.
3425         (dtrace_process_dof): Likewise.
3426         (dtrace_get_probes): Likewise.
3427         * elfread.c (elf_get_probes): Change return type to std::vector,
3428         store an std::vector in bfd_data.
3429         (probe_key_free): Update to std::vector.
3430         * stap-probe.c (handle_stap_probe): Change parameter to
3431         std::vector and update.
3432         (stap_get_probes): Likewise.
3433         * symfile-debug.c (debug_sym_get_probes): Change return type to
3434         std::vector and update.
3435
3436 2017-09-11  Tom Tromey  <tom@tromey.com>
3437
3438         * breakpoint.c (program_breakpoint_here_p): Update.
3439         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3440         from make_show_memory_breakpoints_cleanup.  Return a
3441         scoped_restore_tmpl<int>.
3442         (restore_show_memory_breakpoints): Remove.
3443         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3444         * mem-break.c (memory_validate_breakpoint): Update.
3445         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3446         (ia64_memory_remove_breakpoint): Update.
3447         (ia64_breakpoint_from_pc): Update.
3448         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3449         from make_show_memory_breakpoints_cleanup.
3450
3451 2017-09-11  Tom Tromey  <tom@tromey.com>
3452
3453         * d-namespace.c (d_lookup_symbol): Use std::string.
3454         (find_symbol_in_baseclass): Likewise.
3455
3456 2017-09-11  Tom Tromey  <tom@tromey.com>
3457
3458         * ctf.c (ctf_start): Use std::string.
3459
3460 2017-09-11  Tom Tromey  <tom@tromey.com>
3461
3462         * ada-lang.c (is_known_support_routine): Update.
3463         (ada_unhandled_exception_name_addr_from_raise): Update.
3464         * guile/scm-frame.c (gdbscm_frame_name): Update.
3465         * python/py-frame.c (frapy_name): Update.
3466         (frapy_function): Update.
3467         * stack.h (find_frame_funname): Update.
3468         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3469         (print_frame): Update.
3470
3471 2017-09-11  Tom Tromey  <tom@tromey.com>
3472
3473         * findcmd.c (put_bits): Take a gdb::byte_vector.
3474         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3475         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3476         cleanups.
3477         (find_command): Update.
3478
3479 2017-09-11  Tom Tromey  <tom@tromey.com>
3480
3481         * cli/cli-script.c (class scoped_restore_hook_in): New.
3482         (clear_hook_in_cleanup): Remove.
3483         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3484         scoped_restore_hook_in.
3485
3486 2017-09-11  Tom Tromey  <tom@tromey.com>
3487
3488         * cli/cli-script.c (restore_interp): Remove.
3489         (read_command_lines): Use scoped_restore_interp.
3490         * interps.c (scoped_restore_interp::set_temp): Rename from
3491         interp_set_temp.
3492         * interps.h (class scoped_restore_interp): New.
3493         (interp_set_temp): Remove.
3494
3495 2017-09-11  Tom Tromey  <tom@tromey.com>
3496
3497         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3498         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3499         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3500         scoped_restore.
3501         (mi_cmd_break_insert_1): Update.
3502         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3503         scoped_restore.
3504
3505 2017-09-11  Tom Tromey  <tom@tromey.com>
3506
3507         * demangle.c (demangle_command): Update.
3508         * breakpoint.c (disable_command): Update.
3509         (enable_command): Update.
3510         (find_location_by_number): Make "number" const.  Use
3511         get_number_trailer.
3512         * cli/cli-utils.c (extract_arg): Return std::string.
3513         * probe.c (parse_probe_linespec): Update.  Change types.
3514         (collect_probes): Take string arguments.
3515         (parse_probe_linespec): Likewise.
3516         (info_probes_for_ops): Update.
3517         (enable_probes_command): Update.
3518         (disable_probes_command): Update.
3519         * break-catch-sig.c (catch_signal_split_args): Update.
3520         * mi/mi-parse.c (mi_parse): Update.
3521
3522 2017-09-11  Tom Tromey  <tom@tromey.com>
3523
3524         * language.h (language_enum): Make argument const.
3525         * language.c (language_enum): Make argument const.
3526
3527 2017-09-11  Tom Tromey  <tom@tromey.com>
3528
3529         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3530         as function.
3531         (skip_to_space): Rename from skip_to_space_const.
3532         * common/common-utils.c (skip_to_space): New function.
3533         (skip_to_space): Rename from skip_to_space_const.
3534         * cli/cli-utils.h (get_number): Rename from get_number_const.
3535         (extract_arg): Rename from extract_arg_const.
3536         * cli/cli-utils.c (get_number): Rename from get_number_const.
3537         (extract_arg): Rename from extract_arg_const.
3538         (number_or_range_parser::get_number): Use ::get_number.
3539         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3540         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3541         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3542         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3543         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3544         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3545         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3546         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3547
3548 2017-09-11  Tom Tromey  <tom@tromey.com>
3549
3550         * python/python.c (do_start_initialization): Use
3551         py-event-types.def to initialize types.
3552         Define all object type structures.
3553         * python/python-internal.h: Don't declare event initialization
3554         functions.
3555         * python/py-threadevent.c (thread_event_object_type): Don't
3556         define.
3557         * python/py-stopevent.c (stop_event_object_type): Don't define.
3558         * python/py-signalevent.c (signal_event_object_type): Don't
3559         declare or define.
3560         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3561         (clear_objfiles_event_object_type): Don't declare or define.
3562         * python/py-infevents.c (inferior_call_pre_event_object_type)
3563         (inferior_call_post_event_object_type)
3564         (register_changed_event_object_type)
3565         (memory_changed_event_object_type): Don't declare or define.
3566         * python/py-inferior.c (new_thread_event_object_type)
3567         (new_inferior_event_object_type)
3568         (inferior_deleted_event_object_type): Don't declare or define.
3569         * python/py-exitedevent.c (exited_event_object_type): Don't
3570         declare or define.
3571         * python/py-evts.c (gdbpy_initialize_py_events): Use
3572         py-all-events.def.
3573         * python/py-events.h (thread_event_object_type): Don't declare.
3574         (events_object): Use py-all-events.def.
3575         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3576         py-event-types.def.
3577         * python/py-event-types.def: New file.
3578         * python/py-continueevent.c (create_continue_event_object): Don't
3579         declare or define.
3580         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3581         declare or define.
3582         * python/py-all-events.def: New file.
3583
3584 2017-09-11  Tom Tromey  <tom@tromey.com>
3585
3586         * python/py-threadevent.c (create_thread_event_object): Return
3587         gdbpy_ref.
3588         * python/py-stopevent.h (create_stop_event_object)
3589         (create_breakpoint_event_object, create_signal_event_object):
3590         Update.
3591         * python/py-stopevent.c (create_stop_event_object): Return
3592         gdbpy_ref.
3593         (emit_stop_event): Update.
3594         * python/py-signalevent.c (create_signal_event_object): Return
3595         gdbpy_ref.
3596         * python/py-infevents.c (create_inferior_call_event_object):
3597         Update.
3598         * python/py-event.h (create_event_object)
3599         (create_thread_event_object): Update.
3600         * python/py-event.c (create_event_object): Return gdbpy_ref.
3601         * python/py-continueevent.c: Return gdbpy_ref.
3602         * python/py-bpevent.c (create_breakpoint_event_object): Return
3603         gdbpy_ref.
3604
3605 2017-09-11  Tom Tromey  <tom@tromey.com>
3606
3607         PR python/15622:
3608         * NEWS: Add entry.
3609         * python/python.c (do_start_initialization): Initialize new event
3610         types.
3611         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3612         (gdbpy_initialize_inferior_deleted_event)
3613         (gdbpy_initialize_new_thread_event): Declare.
3614         * python/py-threadevent.c (create_thread_event_object): Add option
3615         "thread" parameter.
3616         * python/py-inferior.c (new_thread_event_object_type)
3617         (new_inferior_event_object_type)
3618         (inferior_deleted_event_object_type): Declare.
3619         (python_new_inferior, python_inferior_deleted): New functions.
3620         (add_thread_object): Emit new_thread event.
3621         (gdbpy_initialize_inferior): Attach new functions to corresponding
3622         observers.
3623         (new_thread, new_inferior, inferior_deleted): Define new event
3624         types.
3625         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3626         registries.
3627         * python/py-events.h (events_object) <new_inferior,
3628         inferior_deleted, new_thread>: New fields.
3629         * python/py-event.h (create_thread_event_breakpoint): Add optional
3630         "thread" parameter.
3631
3632 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3633
3634         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3635         check current_ui instead.
3636         (internal_vproblem): Likewise.
3637
3638 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3639
3640         * thread.c (print_thread_info_1): Remove unnecessary calls to
3641         uiout->is_mi_like_p.
3642
3643 2017-09-09  Tom Tromey  <tom@tromey.com>
3644
3645         * namespace.h (add_using_directive): Update.
3646         * namespace.c (add_using_directive): Change type of excludes to
3647         std::vector.
3648         * dwarf2read.c (read_import_statement): Use std::vector.
3649         (read_namespace): Update.
3650         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3651
3652 2017-09-09  Tom Tromey  <tom@tromey.com>
3653
3654         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3655
3656 2017-09-09  Tom Tromey  <tom@tromey.com>
3657
3658         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3659
3660 2017-09-09  Tom Tromey  <tom@tromey.com>
3661
3662         * stack.c (func_command): Use gdb::def_vector.
3663
3664 2017-09-09  Tom Tromey  <tom@tromey.com>
3665
3666         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3667         ui_out_emit_list, ui_out_emit_tuple.
3668         (mi_cmd_var_update): Likewise.
3669
3670 2017-09-09  Tom Tromey  <tom@tromey.com>
3671
3672         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3673         ui_out_redirect_pop.
3674         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3675         ui_out_redirect_pop.
3676         * utils.c (do_ui_out_redirect_pop)
3677         (make_cleanup_ui_out_redirect_pop): Remove.
3678         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3679         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3680         * ui-out.h (ui_out_redirect_pop): New class.
3681
3682 2017-09-09  Tom Tromey  <tom@tromey.com>
3683
3684         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3685         (list_available_thread_groups, mi_cmd_list_thread_groups)
3686         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3687         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3688         Likewise.
3689
3690 2017-09-09  Tom Tromey  <tom@tromey.com>
3691
3692         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3693         ui_out_emit_tuple.
3694
3695 2017-09-09  Tom Tromey  <tom@tromey.com>
3696
3697         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3698         * stack.c (print_frame): Use ui_out_emit_tuple.
3699         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3700         (info_spu_mailbox_command, info_spu_dma_command)
3701         (info_spu_proxydma_command): Likewise.
3702         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3703         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3704         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3705         ui_out_emit_tuple.
3706         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3707
3708 2017-09-09  Tom Tromey  <tom@tromey.com>
3709
3710         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3711         (class ui_out_emit_table): Update comment.
3712         * ui-out.c (do_cleanup_table_end)
3713         (make_cleanup_ui_out_table_begin_end): Remove.
3714         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3715         (info_spu_dma_cmdlist): Likewise.
3716         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3717         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3718         ui_out_emit_table.
3719
3720 2017-09-09  Tom Tromey  <tom@tromey.com>
3721
3722         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3723         ui_out_emit_list, gdb::optional.
3724
3725 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3726
3727         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3728         prototype.
3729         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3730         prototype.
3731         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3732         prototype.
3733         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3734         * ada-exp.y: Remove _initialize_ada_exp prototype.
3735         * ada-lang.c: Remove _initialize_ada_language prototype.
3736         * ada-tasks.c: Remove _initialize_tasks prototype.
3737         * addrmap.c: Remove _initialize_addrmap prototype.
3738         * agent.c: Remove _initialize_agent prototype.
3739         * aix-thread.c: Remove _initialize_aix_thread prototype.
3740         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3741         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3742         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3743         prototype.
3744         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3745         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3746         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3747         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3748         prototype.
3749         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3750         prototype.
3751         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3752         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3753         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3754         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3755         prototype.
3756         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3757         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3758         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3759         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3760         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3761         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3762         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3763         prototype.
3764         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3765         prototype.
3766         * annotate.c: Remove _initialize_annotate prototype.
3767         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3768         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3769         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3770         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3771         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3772         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3773         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3774         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3775         prototype.
3776         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3777         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3778         * auto-load.c: Remove _initialize_auto_load prototype.
3779         * auxv.c: Remove _initialize_auxv prototype.
3780         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3781         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3782         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3783         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3784         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3785         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3786         prototype.
3787         * break-catch-throw.c: Remove _initialize_break_catch_throw
3788         prototype.
3789         * breakpoint.c: Remove _initialize_breakpoint prototype.
3790         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3791         * btrace.c: Remove _initialize_btrace prototype.
3792         * charset.c: Remove _initialize_charset prototype.
3793         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3794         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3795         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3796         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3797         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3798         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3799         * coffread.c: Remove _initialize_coffread prototype.
3800         * compile/compile.c: Remove _initialize_compile prototype.
3801         * complaints.c: Remove _initialize_complaints prototype.
3802         * completer.c: Remove _initialize_completer prototype.
3803         * copying.awk: Remove _initialize_copying prototype.
3804         * copying.c: Regenerate.
3805         * core-regset.c: Remove _initialize_core_regset prototype.
3806         * corefile.c: Remove _initialize_core prototype.
3807         * corelow.c: Remove _initialize_corelow prototype.
3808         * cp-abi.c: Remove _initialize_cp_abi prototype.
3809         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3810         * cp-support.c: Remove _initialize_cp_support prototype.
3811         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3812         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3813         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3814         * ctf.c: Remove _initialize_ctf prototype.
3815         * d-lang.c: Remove _initialize_d_language prototype.
3816         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3817         prototype.
3818         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3819         * dbxread.c: Remove _initialize_dbxread prototype.
3820         * dcache.c: Remove _initialize_dcache prototype.
3821         * demangle.c: Remove _initialize_demangler prototype.
3822         * disasm-selftests.c: Remove _initialize_disasm_selftests
3823         prototype.
3824         * disasm.c: Remove _initialize_disasm prototype.
3825         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3826         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3827         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3828         prototype.
3829         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3830         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3831         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3832         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3833         * elfread.c: Remove _initialize_elfread prototype.
3834         * exec.c: Remove _initialize_exec prototype.
3835         * extension.c: Remove _initialize_extension prototype.
3836         * f-lang.c: Remove _initialize_f_language prototype.
3837         * f-valprint.c: Remove _initialize_f_valprint prototype.
3838         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3839         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3840         * filesystem.c: Remove _initialize_filesystem prototype.
3841         * findcmd.c: Remove _initialize_mem_search prototype.
3842         * fork-child.c: Remove _initialize_fork_child prototype.
3843         * frame-base.c: Remove _initialize_frame_base prototype.
3844         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3845         * frame.c: Remove _initialize_frame prototype.
3846         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3847         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3848         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3849         * gcore.c: Remove _initialize_gcore prototype.
3850         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3851         * gdbarch.c: Regenerate.
3852         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3853         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3854         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3855         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3856         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3857         * go-lang.c: Remove _initialize_go_language prototype.
3858         * go32-nat.c: Remove _initialize_go32_nat prototype.
3859         * guile/guile.c: Remove _initialize_guile prototype.
3860         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3861         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3862         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3863         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3864         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3865         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3866         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3867         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3868         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3869         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3870         prototype.
3871         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3872         prototype.
3873         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3874         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3875         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3876         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3877         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3878         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3879         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3880         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3881         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3882         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3883         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3884         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3885         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3886         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3887         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3888         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3889         prototype.
3890         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3891         prototype.
3892         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3893         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3894         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3895         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3896         * infcall.c: Remove _initialize_infcall prototype.
3897         * infcmd.c: Remove _initialize_infcmd prototype.
3898         * inferior.c: Remove _initialize_inferiors prototype.
3899         * inflow.c: Remove _initialize_inflow prototype.
3900         * infrun.c: Remove _initialize_infrun prototype.
3901         * interps.c: Remove _initialize_interpreter prototype.
3902         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3903         * jit.c: Remove _initialize_jit prototype.
3904         * language.c: Remove _initialize_language prototype.
3905         * linux-fork.c: Remove _initialize_linux_fork prototype.
3906         * linux-nat.c: Remove _initialize_linux_nat prototype.
3907         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3908         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3909         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3910         * m2-lang.c: Remove _initialize_m2_language prototype.
3911         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3912         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3913         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3914         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3915         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3916         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3917         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3918         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3919         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3920         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3921         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3922         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3923         * machoread.c: Remove _initialize_machoread prototype.
3924         * macrocmd.c: Remove _initialize_macrocmd prototype.
3925         * macroscope.c: Remove _initialize_macroscope prototype.
3926         * maint.c: Remove _initialize_maint_cmds prototype.
3927         * mdebugread.c: Remove _initialize_mdebugread prototype.
3928         * memattr.c: Remove _initialize_mem prototype.
3929         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3930         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3931         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3932         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3933         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3934         * microblaze-linux-tdep.c: Remove
3935         _initialize_microblaze_linux_tdep prototype.
3936         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3937         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3938         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3939         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3940         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3941         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3942         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3943         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3944         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3945         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3946         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3947         prototype.
3948         * mipsread.c: Remove _initialize_mipsread prototype.
3949         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3950         prototype.
3951         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3952         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3953         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3954         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3955         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3956         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3957         prototype.
3958         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3959         * nto-procfs.c: Remove _initialize_procfs prototype.
3960         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3961         * objc-lang.c: Remove _initialize_objc_language prototype.
3962         * objfiles.c: Remove _initialize_objfiles prototype.
3963         * observer.c: Remove observer_test_first_notification_function,
3964         observer_test_second_notification_function,
3965         observer_test_third_notification_function, and
3966         _initialize_observer prototypes.
3967         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3968         * osabi.c: Remove _initialize_gdb_osabi prototype.
3969         * osdata.c: Remove _initialize_osdata prototype.
3970         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3971         * parse.c: Remove _initialize_parse prototype.
3972         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3973         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3974         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3975         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3976         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3977         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3978         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3979         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3980         * printcmd.c: Remove _initialize_printcmd prototype.
3981         * probe.c: Remove _initialize_probe prototype.
3982         * proc-api.c: Remove _initialize_proc_api prototype.
3983         * proc-events.c: Remove _initialize_proc_events prototype.
3984         * proc-service.c: Remove _initialize_proc_service prototype.
3985         * procfs.c: Remove _initialize_procfs prototype.
3986         * psymtab.c: Remove _initialize_psymtab prototype.
3987         * python/python.c: Remove _initialize_python prototype.
3988         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3989         * record-btrace.c: Remove _initialize_record_btrace prototype.
3990         * record-full.c: Remove _initialize_record_full prototype.
3991         * record.c: Remove _initialize_record prototype.
3992         * regcache.c: Remove _initialize_regcache prototype.
3993         * reggroups.c: Remove _initialize_reggroup prototype.
3994         * remote-notif.c: Remove _initialize_notif prototype.
3995         * remote-sim.c: Remove _initialize_remote_sim prototype.
3996         * remote.c: Remove _initialize_remote prototype.
3997         * reverse.c: Remove _initialize_reverse prototype.
3998         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3999         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4000         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4001         prototype.
4002         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4003         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4004         * rust-exp.y: Remove _initialize_rust_exp prototype.
4005         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4006         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4007         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4008         * score-tdep.c: Remove _initialize_score_tdep prototype.
4009         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4010         prototype.
4011         * ser-go32.c: Remove _initialize_ser_dos prototype.
4012         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4013         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4014         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4015         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4016         * serial.c: Remove _initialize_serial prototype.
4017         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4018         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4019         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4020         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4021         * skip.c: Remove _initialize_step_skip prototype.
4022         * sol-thread.c: Remove _initialize_sol_thread prototype.
4023         * solib-aix.c: Remove _initialize_solib_aix prototype.
4024         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4025         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4026         * solib-frv.c: Remove _initialize_frv_solib prototype.
4027         * solib-spu.c: Remove _initialize_spu_solib prototype.
4028         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4029         * solib-target.c: Remove _initialize_solib_target prototype.
4030         * solib.c: Remove _initialize_solib prototype.
4031         * source.c: Remove _initialize_source prototype.
4032         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4033         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4034         prototype.
4035         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4036         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4037         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4038         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4039         prototype.
4040         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4041         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4042         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4043         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4044         prototype.
4045         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4046         prototype.
4047         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4048         prototype.
4049         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4050         prototype.
4051         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4052         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4053         prototype.
4054         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4055         prototype.
4056         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4057         prototype.
4058         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4059         prototype.
4060         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4061         prototype.
4062         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4063         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4064         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4065         * stabsread.c: Remove _initialize_stabsread prototype.
4066         * stack.c: Remove _initialize_stack prototype.
4067         * stap-probe.c: Remove _initialize_stap_probe prototype.
4068         * std-regs.c: Remove _initialize_frame_reg prototype.
4069         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4070         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4071         * symfile.c: Remove _initialize_symfile prototype.
4072         * symmisc.c: Remove _initialize_symmisc prototype.
4073         * symtab.c: Remove _initialize_symtab prototype.
4074         * target-dcache.c: Remove _initialize_target_dcache prototype.
4075         * target-descriptions.c: Remove _initialize_target_descriptions
4076         prototype.
4077         * thread.c: Remove _initialize_thread prototype.
4078         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4079         prototype.
4080         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4081         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4082         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4083         prototype.
4084         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4085         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4086         * tracefile.c: Remove _initialize_tracefile prototype.
4087         * tracepoint.c: Remove _initialize_tracepoint prototype.
4088         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4089         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4090         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4091         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4092         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4093         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4094         * tui/tui.c: Remove _initialize_tui prototype.
4095         * typeprint.c: Remove _initialize_typeprint prototype.
4096         * user-regs.c: Remove _initialize_user_regs prototype.
4097         * utils.c: Remove _initialize_utils prototype.
4098         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4099         * valarith.c: Remove _initialize_valarith prototype.
4100         * valops.c: Remove _initialize_valops prototype.
4101         * valprint.c: Remove _initialize_valprint prototype.
4102         * value.c: Remove _initialize_values prototype.
4103         * varobj.c: Remove _initialize_varobj prototype.
4104         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4105         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4106         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4107         * windows-nat.c: Remove _initialize_windows_nat,
4108         _initialize_check_for_gdb_ini, and _initialize_loadable
4109         prototypes.
4110         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4111         * xcoffread.c: Remove _initialize_xcoffread prototype.
4112         * xml-support.c: Remove _initialize_xml_support prototype.
4113         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4114         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4115         prototype.
4116         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4117         prototype.
4118         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4119
4120 2017-09-08  Keith Seitz  <keiths@redhat.com>
4121
4122         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4123         field.
4124
4125 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4126
4127         * f-valprint.c (f_val_print): Remove check for one byte
4128         sized integers. Remove printing of character type.
4129
4130 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4131             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4132             Bernhard Heckel  <bernhard.heckel@intel.com>
4133
4134         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4135         to maintain proper indentation when printing pointers/refs.
4136
4137 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4138
4139         GDB 8.0.1 released.
4140
4141 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4142
4143         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4144
4145 2017-09-05  Tom Tromey  <tom@tromey.com>
4146
4147         * parse.c (funcall_chain): Now a std::vector.
4148         (start_arglist, end_arglist): Simplify.
4149         (free_funcalls): Remove.
4150         (parse_exp_in_context_1): Remove cleanup.
4151
4152 2017-09-05  Tom Tromey  <tom@tromey.com>
4153
4154         * go-exp.y (go_parse): Don't create a cleanup.
4155
4156 2017-09-05  Tom Tromey  <tom@tromey.com>
4157
4158         * d-exp.y (PrimaryExpression): Use std::string.
4159         (d_parse): Don't create a cleanup.
4160
4161 2017-09-05  Tom Tromey  <tom@tromey.com>
4162
4163         * utils.c (do_clear_parser_state): Remove.
4164         (make_cleanup_clear_parser_state): Remove.
4165         * p-exp.y (pascal_parse): Use scoped_restore.
4166         * m2-exp.y (m2_parse): Use scoped_restore.
4167         * f-exp.y (f_parse): Use scoped_restore.
4168         * d-exp.y (d_parse): Use scoped_restore.
4169         * c-exp.y (c_parse): Use scoped_restore.
4170         * ada-exp.y (ada_parse): Use scoped_restore.
4171         * utils.h (make_cleanup_clear_parser_state): Remove.
4172
4173 2017-09-06  Keith Seitz  <keiths@redhat.com>
4174
4175         * dwarf2read.c (dw2_linkage_name_attr): New function.
4176         (dw2_linkage_name): New function.
4177         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4178         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4179         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4180
4181 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4182
4183         * config/djgpp/djconfig.sh: Correct shell portability issue.
4184
4185 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4186
4187         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4188
4189 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4190
4191         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4192         * NEWS: Mention new FreeBSD/mips native configuration.
4193         * configure.host: Add aarch64*-*-freebsd*.
4194         * configure.nat: Likewise.
4195         * aarch64-fbsd-nat.c: New file.
4196
4197 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4198
4199         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4200         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4201         * NEWS: Mention new FreeBSD/aarch64 target.
4202         * configure.tgt: Add aarch64*-*-freebsd*.
4203         * aarch64-fbsd-tdep.c: New file.
4204         * aarch64-fbsd-tdep.h: New file.
4205
4206 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4207
4208         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4209
4210 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4211
4212         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4213         of TLS symbols.
4214
4215 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4216
4217         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4218         call.
4219
4220 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4221
4222         * infrun.c (follow_exec): Call add_thread after
4223         target_find_description.
4224
4225 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4226
4227         * infrun.c (handle_inferior_event_1): When exec'ing, read
4228         stop_pc after follow_exec.
4229
4230 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4231
4232         * remote.c (process_g_packet): Update error message.
4233
4234 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4235
4236         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4237         targets.
4238
4239 2017-09-05  Pedro Alves  <palves@redhat.com>
4240
4241         * eval.c (eval_call, evaluate_funcall): New functions, factored
4242         out from ...
4243         (evaluate_subexp_standard): ... this.
4244
4245 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4246
4247         * amd64-tdep.c (amd64_target_description): Create target
4248         descriptions.
4249         (_initialize_amd64_tdep): Don't call functions
4250         initialize_tdesc_amd64_*.  Add self tests.
4251         * arch/amd64.c (amd64_create_target_description): Add parameter
4252         is_linux.  Call set_tdesc_osabi if is_linux is true.
4253         * arch/amd64.h (amd64_create_target_description): Update the
4254         declaration.
4255         * arch/i386.c (i386_create_target_description): Add parameter
4256         is_linux.  Call set_tdesc_osabi if is_linux is true.
4257         * arch/i386.h (i386_create_target_description): Update
4258         declaration.
4259         * configure.tgt: Add i386.o to gdb_target_obs.
4260         * features/Makefile (XMLTOC): Remove i386/*.xml.
4261         * features/i386/amd64-avx-avx512.c: Remove.
4262         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4263         * features/i386/amd64-avx-mpx.c: Remove.
4264         * features/i386/amd64-avx.c: Remove.
4265         * features/i386/amd64-mpx.c: Remove.
4266         * features/i386/amd64.c: Remove.
4267         * features/i386/i386-avx-avx512.c: Remove.
4268         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4269         * features/i386/i386-avx-mpx.c: Remove.
4270         * features/i386/i386-avx.c: Remove.
4271         * features/i386/i386-mmx.c: Remove.
4272         * features/i386/i386-mpx.c: Remove.
4273         * features/i386/i386.c: Remove.
4274         * i386-tdep.c: Don't include features/i386/i386*.c., include
4275         target-descriptions.h and arch/i386.h.
4276         (i386_target_description): Create target descriptions.
4277         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4278         functions.  Do self tests.
4279
4280 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4281
4282         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4283         * features/i386/amd64-avx-avx512-linux.c: Removed.
4284         * features/i386/amd64-avx-linux.c: Removed.
4285         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4286         * features/i386/amd64-avx-mpx-linux.c: Removed.
4287         * features/i386/amd64-linux.c: Removed.
4288         * features/i386/amd64-mpx-linux.c: Removed.
4289         * features/i386/x32-avx-avx512-linux.c: Removed.
4290         * features/i386/x32-avx-linux.c: Removed.
4291         * features/i386/x32-linux.c: Removed.
4292
4293 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4294
4295         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4296         features/i386/*.c.
4297         (amd64_linux_read_description): Call
4298         amd64_create_target_description.
4299         * arch/amd64.c: New file.
4300         * arch/amd64.h: New file.
4301         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4302         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4303
4304 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4305
4306         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4307         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4308         (amd64_linux_read_description): Create target descriptions.
4309         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4310         functions.  Add unit tests.
4311         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4312         x32-core.xml.
4313         * features/i386/64bit-avx.c: Generated.
4314         * features/i386/64bit-avx512.c: Generated.
4315         * features/i386/64bit-core.c: Generated.
4316         * features/i386/64bit-linux.c: Generated.
4317         * features/i386/64bit-mpx.c: Generated.
4318         * features/i386/64bit-pkeys.c: Generated.
4319         * features/i386/64bit-segments.c: Generated.
4320         * features/i386/64bit-sse.c: Generated.
4321         * features/i386/x32-core.c: Generated.
4322         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4323         c files for amd64-linux and x32-linux.
4324
4325 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4326
4327         * amd64-linux-tdep.c (amd64_linux_read_description): New
4328         function.
4329         (amd64_linux_core_read_description): Call
4330         amd64_linux_read_description.
4331         (amd64_linux_init_abi): Likewise.
4332         (amd64_x32_linux_init_abi): Likewise.
4333         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4334         * x86-linux-nat.c (x86_linux_read_description): Call
4335         amd64_linux_read_description.
4336
4337 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4338
4339         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4340         comments.
4341
4342 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4343
4344         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4345         * features/i386/i386-avx-avx512-linux.c: Remove.
4346         * features/i386/i386-avx-linux.c: Remove.
4347         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4348         * features/i386/i386-avx-mpx-linux.c: Remove.
4349         * features/i386/i386-linux.c: Remove.
4350         * features/i386/i386-mmx-linux.c: Remove.
4351         * features/i386/i386-mpx-linux.c: Remove.
4352
4353 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4354
4355         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4356         (SFILES): Add arch/i386.c.
4357         (HFILES_NO_SRCDIR): Add arch/i386.h.
4358         * arch/i386.c: New file.
4359         * arch/i386.h: New file.
4360         * arch/tdesc.h (allocate_target_description): Declare.
4361         (set_tdesc_architecture): Declare.
4362         (set_tdesc_osabi): Declare.
4363         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4364         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4365         include arch/i386.h.
4366         (i386_linux_read_description): Remove code and call
4367         i386_create_target_description.
4368         (set_tdesc_architecture): New function.
4369         (set_tdesc_osabi): New function.
4370         * target-descriptions.h (allocate_target_description): Remove.
4371
4372 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4373
4374         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4375         * target-descriptions.c (tdesc_create_feature): Likewise, and
4376         adjust code.
4377         * features/i386/32bit-avx.c: Re-generated.
4378         * features/i386/32bit-avx512.c: Re-generated.
4379         * features/i386/32bit-core.c: Re-generated.
4380         * features/i386/32bit-linux.c: Re-generated.
4381         * features/i386/32bit-mpx.c: Re-generated.
4382         * features/i386/32bit-pkeys.c: Re-generated.
4383         * features/i386/32bit-sse.c: Re-generated.
4384
4385 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4386
4387         * regformats/regdef.h (struct reg): Override operator == and !=.
4388
4389 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4390
4391         * arch/tdesc.h: New file.
4392         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4393         * target-descriptions.c: Update comments.
4394         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4395         declarations.
4396         * features/i386/32bit-avx.c: Re-generated.
4397         * features/i386/32bit-avx512.c: Re-generated.
4398         * features/i386/32bit-core.c: Re-generated.
4399         * features/i386/32bit-linux.c: Re-generated.
4400         * features/i386/32bit-mpx.c: Re-generated.
4401         * features/i386/32bit-pkeys.c: Re-generated.
4402         * features/i386/32bit-sse.c: Re-generated.
4403
4404 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4405
4406         * regformats/regdat.sh: Update generated code.
4407
4408 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4409
4410         * regformats/regdat.sh: Adjust code order.
4411
4412 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4413
4414         * expprint.c (dump_subexp_body_standard): Use constant format
4415         string in fprintf_filtered call.
4416
4417 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4418
4419         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4420         NetBSD/i386.
4421         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4422
4423 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4424
4425         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4426
4427 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4428
4429         * bsd-kvm.o: Define _KMEMUSER.
4430         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4431         * configure: Regenerate.
4432
4433 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4434
4435         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4436         * i386-fbsd-nat.c: Likewise.
4437
4438 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4439
4440         * unittests/array-view-selftests.c: Add include of <array>.
4441
4442 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4443
4444         * spu-tdep.c (flush_ea_cache): Add missing argument to
4445         call_function_by_hand.
4446
4447 2017-09-04  Pedro Alves  <palves@redhat.com>
4448
4449         * NEWS (Safer support for debugging with no debug info): New.
4450
4451 2017-09-04  Pedro Alves  <palves@redhat.com>
4452
4453         * c-exp.y (function_method, function_method_void): Add current
4454         instance flags to TYPE_INSTANCE.
4455         * dwarf2read.c (check_modifier): New.
4456         (compute_delayed_physnames): Assert that only C++ adds delayed
4457         physnames.  Mark fn_fields as const/volatile depending on
4458         physname.
4459         * eval.c (make_params): New type_instance_flags parameter.  Use
4460         it as the new type's instance flags.
4461         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4462         flags element and pass it to make_params.
4463         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4464         instance flags element.
4465         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4466         * gdbtypes.h: Include "enum-flags.h".
4467         (type_instance_flags): New enum-flags type.
4468         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4469         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4470         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4471         (follow_type_instance_flags): New function.
4472         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4473         * parser-defs.h (follow_type_instance_flags): Declare.
4474         * valops.c (value_struct_elt_for_reference): const/volatile must
4475         match too.
4476
4477 2017-09-04  Pedro Alves  <palves@redhat.com>
4478
4479         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4480         function/method scopes; lookup the nested name as a function local
4481         static variable.
4482
4483 2017-09-04  Pedro Alves  <palves@redhat.com>
4484
4485         (%type <voidval>): Add function_method.
4486         * c-exp.y (exp): New production for calls with no arguments.
4487         (function_method, function_method_void_or_typelist): New
4488         productions.
4489         (exp): New production for "method()::static_var".
4490         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4491         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4492         Handle OP_FUNC_STATIC_VAR.
4493         * parse.c (operator_length_standard):
4494         Handle OP_FUNC_STATIC_VAR.
4495
4496 2017-09-04  Pedro Alves  <palves@redhat.com>
4497
4498         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4499         handling.
4500         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4501         Ditto.
4502         * parse.c (operator_length_standard, operator_check_standard):
4503         Ditto.
4504         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4505
4506 2017-09-04  Pedro Alves  <palves@redhat.com>
4507
4508         * ax-gdb.c: Include "typeprint.h".
4509         (gen_expr_for_cast): New function.
4510         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4511         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4512         type is unknown.
4513         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4514         nodebug_data_symbol.
4515         * eval.c: Include "typeprint.h".
4516         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4517         Error out if symbol has unknown type.
4518         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4519         evaluate_subexp_for_cast.
4520         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4521         OP_VAR_MSYM_VALUE.
4522         (evaluate_subexp_for_cast): New function.
4523         * gdbtypes.c (init_nodebug_var_type): New function.
4524         (objfile_type): Use it to initialize types of variables with no
4525         debug info.
4526         * typeprint.c (error_unknown_type): New.
4527         * typeprint.h (error_unknown_type): New declaration.
4528         * compile/compile-c-types.c (convert_type_basic): Handle
4529         TYPE_CODE_ERROR; warn and fallback to int for variables with
4530         unknown type.
4531
4532 2017-09-04  Pedro Alves  <palves@redhat.com>
4533
4534         * eval.c (evaluate_var_value): New function, factored out from ...
4535         (evaluate_subexp_standard): ... here.
4536
4537 2017-09-04  Pedro Alves  <palves@redhat.com>
4538
4539         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4540         Remove useless assignments to 'op'.
4541
4542 2017-09-04  Pedro Alves  <palves@redhat.com>
4543
4544         * eval.c (eval_skip_value): New function.
4545         (evaluate_subexp_standard): Use it.
4546
4547 2017-09-04  Pedro Alves  <palves@redhat.com>
4548
4549         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4550         function name from symbol/minsym and pass it to
4551         error_call_unknown_return_type.
4552
4553 2017-09-04  Pedro Alves  <palves@redhat.com>
4554
4555         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4556         * ax-gdb.c (gen_msym_var_ref): New function.
4557         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4558         * eval.c (evaluate_var_msym_value): New function.
4559         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4560         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4561         to call_function_by_hand.
4562         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4563         Handle OP_VAR_MSYM_VALUE.
4564         (union exp_element) <msymbol>: New field.
4565         * minsyms.h (struct type): Forward declare.
4566         (find_minsym_type_and_address): Declare.
4567         * parse.c (write_exp_elt_msym): New function.
4568         (write_exp_msymbol): Delete, refactored as ...
4569         (find_minsym_type_and_address): ... this new function.
4570         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4571         (operator_length_standard, operator_check_standard): Handle
4572         OP_VAR_MSYM_VALUE.
4573         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4574
4575 2017-09-04  Pedro Alves  <palves@redhat.com>
4576
4577         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4578         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4579         unknown.
4580         * ada-typeprint.c (print_func_type): Handle functions with unknown
4581         return type.
4582         * c-typeprint.c (c_type_print_base): Handle functions and methods
4583         with unknown return type.
4584         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4585         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4586         * compile/compile-c-types.c: Include "objfiles.h".
4587         (convert_func): For functions with unknown return type, warn and
4588         default to int.
4589         * compile/compile-object-run.c (compile_object_run): Adjust call
4590         to call_function_by_hand_dummy.
4591         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4592         call_function_by_hand.
4593         * eval.c (evaluate_subexp_standard): Adjust calls to
4594         call_function_by_hand.  Handle functions and methods with unknown
4595         return type.  Pass expect_type to call_function_by_hand.
4596         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4597         return type.
4598         * gcore.c (call_target_sbrk): Adjust call to
4599         call_function_by_hand.
4600         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4601         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4602         an integer address type instead of nodebug.
4603         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4604         call_function_by_hand.
4605         * infcall.c (error_call_unknown_return_type): New function.
4606         (call_function_by_hand): New "default_return_type" parameter.
4607         Pass it down.
4608         (call_function_by_hand_dummy): New "default_return_type"
4609         parameter.  Use it instead of defaulting to int.  If there's no
4610         default and the return type is unknown, throw an error.  If
4611         there's a default return type, and the called function has no
4612         debug info, then assume the function is prototyped.
4613         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4614         New "default_return_type" parameter.
4615         (error_call_unknown_return_type): New declaration.
4616         * linux-fork.c (call_lseek): Cast return type of lseek.
4617         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4618         call_function_by_hand.
4619         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4620         calls to call_function_by_hand.
4621         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4622         return type.
4623         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4624         (value_nsstring, print_object_command): Adjust calls to
4625         call_function_by_hand.
4626         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4627         functions with unknown return type.
4628         (pascal_type_print_func_varspec_suffix): New function.
4629         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4630         TYPE_CODE_METHOD>: Use it.
4631         * python/py-value.c (valpy_call): Adjust call to
4632         call_function_by_hand.
4633         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4634         call_function_by_hand.
4635         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4636         call_function_by_hand.
4637         * valops.c (value_allocate_space_in_inferior): Adjust call to
4638         call_function_by_hand.
4639         * typeprint.c (type_print_unknown_return_type): New function.
4640         * typeprint.h (type_print_unknown_return_type): New declaration.
4641
4642 2017-09-04  Pedro Alves  <palves@redhat.com>
4643
4644         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4645         types with more than one parameter as prototyped.
4646
4647 2017-09-04  Pedro Alves  <palves@redhat.com>
4648
4649         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4650         (disassemble_command): Use gdb_disassembly_flags instead of bare
4651         int.
4652         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4653         (dump_insns, do_mixed_source_and_assembly_deprecated)
4654         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4655         Use gdb_disassembly_flags instead of bare int.
4656         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4657         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4658         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4659         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4660         (enum gdb_disassembly_flag): ... values of this new enumeration.
4661         (gdb_disassembly_flags): Define.
4662         (gdb_disassembly)
4663         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4664         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4665         gdb_disassembly_flags instead of bare int.
4666         * record-btrace.c (btrace_insn_history)
4667         (record_btrace_insn_history, record_btrace_insn_history_range)
4668         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4669         instead of bare int.
4670         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4671         Use gdb_disassembly_flags instead of bare int.
4672         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4673         Define.
4674         * target-delegates.c: Regenerate.
4675         * target.c (target_insn_history, target_insn_history_from)
4676         (target_insn_history_range): Use gdb_disassembly_flags instead of
4677         bare int.
4678         * target.h: Include "disasm.h".
4679         (struct target_ops) <to_insn_history, to_insn_history_from,
4680         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4681         int.
4682         (target_insn_history, target_insn_history_from)
4683         (target_insn_history_range): Use gdb_disassembly_flags instead of
4684         bare int.
4685
4686 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4687
4688         * cli/cli-script.c (build_command_line): For if/while commands,
4689         check whether args is empty.
4690
4691 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4692
4693         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4694         (enum command_control_type): Likewise.
4695         (struct command_line): Likewise.
4696         (free_command_lines): Likewise.
4697         (struct command_lines_deleter): Likewise.
4698         (command_line_up): Likewise.
4699         (read_command_lines): Likewise.
4700         (read_command_lines_1): Likewise.
4701         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4702         (enum command_control_type): Likewise.
4703         (struct command_line): Likewise.
4704         (free_command_lines): Likewise.
4705         (struct command_lines_deleter): Likewise.
4706         (command_line_up): Likewise.
4707         (read_command_lines): Likewise.
4708         (read_command_lines_1): Likewise.
4709         * breakpoint.h: Include cli/cli-script.h.
4710         * extension-priv.h: Likewise.
4711         * gdbcmd.h: Likewise.
4712
4713 2017-09-04  Pedro Alves  <palves@redhat.com>
4714
4715         * ada-lang.c (is_known_support_routine): Move sal declaration to
4716         where it is initialized.
4717         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4718         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4719         (clear_command, update_static_tracepoint): Remove init_sal
4720         references.  Move declarations closer to initializations.
4721         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4722         initializations.
4723         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4724         references.  Move sal declarations closer to initializations.
4725         * frame.c (find_frame_sal): Return a symtab_and_line via function
4726         return instead of output parameter.  Remove init_sal references.
4727         * frame.h (find_frame_sal): Return a symtab_and_line via function
4728         return instead of output parameter.
4729         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4730         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4731         instead of memset.
4732         (gdbscm_find_pc_line): Remove init_sal reference.
4733         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4734         references.  Move declarations closer to initializations.
4735         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4736         initializations.
4737         (finish_backward): Remove init_sal references.  Move declarations
4738         closer to initializations.
4739         * infrun.c (process_event_stop_test, handle_step_into_function)
4740         (insert_hp_step_resume_breakpoint_at_frame)
4741         (insert_step_resume_breakpoint_at_caller): Likewise.
4742         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4743         (symbol_to_sal): Likewise.
4744         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4745         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4746         to its initialization.
4747         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4748         init_sal references.  Move declarations closer to initializations.
4749         * source.c (get_current_source_symtab_and_line): Remove brace
4750         initialization.
4751         (set_current_source_symtab_and_line): Now takes the sal by const
4752         reference.  Remove brace initialization.
4753         (line_info): Remove init_sal reference.
4754         * source.h (set_current_source_symtab_and_line): Now takes a
4755         symtab_and_line via const reference.
4756         * stack.c (set_current_sal_from_frame): Adjust.
4757         (print_frame_info): Adjust.
4758         (get_last_displayed_sal): Return the sal via function return
4759         instead of via output parameter.  Simplify.
4760         (frame_info): Adjust.
4761         * stack.h (get_last_displayed_sal): Return the sal via function
4762         return instead of via output parameter.
4763         * symtab.c (init_sal): Delete.
4764         (find_pc_sect_line): Remove init_sal references.  Move
4765         declarations closer to initializations.
4766         (find_function_start_sal): Remove init_sal references.  Move
4767         declarations closer to initializations.
4768         * symtab.h (struct symtab_and_line): In-class initialize all
4769         fields.
4770         * tracepoint.c (set_traceframe_context)
4771         (print_one_static_tracepoint_marker): Remove init_sal references.
4772         Move declarations closer to initializations.
4773         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4774         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4775         declarations closer to initializations.
4776         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4777         init_sal references.  Adjust.
4778
4779 2017-09-04  Pedro Alves  <palves@redhat.com>
4780
4781         * ax-gdb.c (agent_command_1): Use range-for.
4782         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4783         * breakpoint.c: Include "common/array-view.h".
4784         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4785         parameter from struct symtabs_and_lines to
4786         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4787         (breakpoint_sals_to_pc): Change sals parameter from struct
4788         symtabs_and_lines to std::vector reference.
4789         (check_fast_tracepoint_sals): Change sals parameter from struct
4790         symtabs_and_lines to std::array_view.  Use range-for.
4791         (decode_static_tracepoint_spec): Return a std::vector instead of
4792         symtabs_and_lines.  Update.
4793         (create_breakpoint): Update.
4794         (break_range_command, until_break_command, clear_command): Update.
4795         (base_breakpoint_decode_location, bkpt_decode_location)
4796         (bkpt_probe_create_sals_from_location)
4797         (bkpt_probe_decode_location, tracepoint_decode_location)
4798         (tracepoint_probe_decode_location)
4799         (strace_marker_create_sals_from_location): Return a std::vector
4800         instead of symtabs_and_lines.
4801         (strace_marker_create_breakpoints_sal): Update.
4802         (strace_marker_decode_location): Return a std::vector instead of
4803         symtabs_and_lines.  Update.
4804         (update_breakpoint_locations): Change struct symtabs_and_lines
4805         parameters to gdb::array_view.  Adjust.
4806         (location_to_sals): Return a std::vector instead of
4807         symtabs_and_lines.  Update.
4808         (breakpoint_re_set_default): Use std::vector instead of struct
4809         symtabs_and_lines.
4810         (decode_location_default): Return a std::vector instead of
4811         symtabs_and_lines.  Update.
4812         * breakpoint.h: Include "common/array-view.h".
4813         (struct breakpoint_ops) <decode_location>: Now returns a
4814         std::vector instead of returning a symtabs_and_lines via output
4815         parameter.
4816         (update_breakpoint_locations): Change sals parameters to use
4817         gdb::array_view.
4818         * cli/cli-cmds.c (edit_command, list_command): Update to use
4819         std::vector and gdb::array_view.
4820         (ambiguous_line_spec): Adjust to use gdb::array_view and
4821         range-for.
4822         (compare_symtabs): Rename to ...
4823         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4824         const reference and adjust.
4825         (filter_sals): Rewrite using std::vector and standard algorithms.
4826         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4827         (jump_command): Update to use std::vector.
4828         * linespec.c (struct linespec_state) <canonical_names>: Update
4829         comment.
4830         (add_sal_to_sals_basic): Delete.
4831         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4832         (decode_line_2, create_sals_line_offset)
4833         (convert_address_location_to_sals, convert_linespec_to_sals)
4834         (convert_explicit_location_to_sals, parse_linespec)
4835         (event_location_to_sals, decode_line_full, decode_line_1)
4836         (decode_line_with_current_source)
4837         (decode_line_with_last_displayed, decode_objc)
4838         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4839         (linespec_result::~linespec_result): Adjust to use std::vector
4840         instead of symtabs_and_lines.
4841         * linespec.h (linespec_sals::sals): Now a std::vector.
4842         (struct linespec_result): Use std::vector, bool, and in-class
4843         initialization.
4844         (decode_line_1, decode_line_with_current_source)
4845         (decode_line_with_last_displayed): Return std::vector.
4846         * macrocmd.c (info_macros_command): Use std::vector.
4847         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4848         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4849         std::vector.
4850         * probe.h (parse_probes): Return a std::vector.
4851         * python/python.c (gdbpy_decode_line): Use std::vector and
4852         gdb::array_view.
4853         * source.c (select_source_symtab, line_info): Use std::vector.
4854         * stack.c (func_command): Use std::vector.
4855         * symtab.h (struct symtabs_and_lines): Delete.
4856         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4857
4858 2017-09-04  Pedro Alves  <palves@redhat.com>
4859
4860         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4861         unittests/array-view-selftests.c.
4862         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4863         * common/array-view.h: New file.
4864         * unittests/array-view-selftests.c: New file.
4865
4866 2017-09-04  Pedro Alves  <palves@redhat.com>
4867
4868         * cli/cli-cmds.c (edit_command): Pass message to
4869         ambiguous_line_spec.
4870         (list_command): Pass message to ambiguous_line_spec.  Say
4871         "first"/"last" instead of "start" and "end" to be consistent with
4872         the manual.
4873         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4874         them to print formatted message.
4875
4876 2017-09-04  Pedro Alves  <palves@redhat.com>
4877
4878         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4879         ftrace_update_insns by reference instead of pointer.
4880
4881 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4882
4883         * i386-go32-tdep.c: Include x86-xstate.h.
4884         (i386_go32_init_abi): Call i386_target_description.
4885         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4886         if xcr0 is X86_XSTATE_X87_MASK.
4887         * i386-tdep.h (tdesc_i386): Remove the declaration.
4888         (tdesc_i386_mmx): Likewise.
4889
4890 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4891
4892         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4893         X86_XSTATE_SSE_MASK instead of 0.
4894
4895 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4896
4897         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4898         i386_target_description.
4899         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4900         i386_target_description.
4901         * i386-tdep.c (i386_gdbarch_init): Likewise.
4902
4903 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4904
4905         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4906         (x86_darwin_init_abi_64): Call amd64_target_description.
4907         * amd64-dicos-tdep.c: Likewise.
4908         * amd64-fbsd-nat.c: Likewise.
4909         * amd64-fbsd-tdep.c: Likewise.
4910         * amd64-nbsd-tdep.c: Likewise.
4911         * amd64-obsd-tdep.c: Likewise.
4912         * amd64-sol2-tdep.c: Likewise.
4913         * amd64-windows-tdep.c: Likewise.
4914         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4915
4916 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4917
4918         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4919         (btrace_function) <insn>: Change type to use std::vector.
4920         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4921         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4922         ftrace_update_insns, ftrace_compute_global_level_offset,
4923         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4924         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4925         change to std::vector.
4926         (ftrace_update_insns): Adjust to change to std::vector, change
4927         type of INSN parameter.
4928         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4929         * record-btrace.c (btrace_call_history_insn_range,
4930         btrace_compute_src_line_range,
4931         record_btrace_frame_prev_register): Adjust to change to
4932         std::vector.
4933         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4934         to change to std::vector.
4935
4936 2017-09-03  Tom Tromey  <tom@tromey.com>
4937
4938         * corefile.c (reopen_exec_file): Use std::string.
4939
4940 2017-09-03  Tom Tromey  <tom@tromey.com>
4941
4942         * compile/compile.c (compile_register_name_mangled): Return
4943         std::string.
4944         * compile/compile-loc2c.c (pushf_register_address): Update.
4945         (pushf_register): Update.
4946         * compile/compile-c-types.c (convert_array): Update.
4947         * compile/compile-c-symbols.c (generate_vla_size): Update.
4948         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4949         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4950         (convert_one_symbol): Update.
4951         (generate_c_for_for_one_variable): Update.
4952         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4953         std::string.
4954         (generate_register_struct): Update.
4955         * compile/compile-internal.h (c_get_range_decl_name): Return a
4956         std::string.
4957         (compile_register_name_mangled): Return std::string.
4958
4959 2017-09-03  Tom Tromey  <tom@tromey.com>
4960
4961         * utils.c (perror_string): Return a std::string.
4962         (throw_perror_with_name, perror_warning_with_name): Update.
4963
4964 2017-09-03  Tom Tromey  <tom@tromey.com>
4965
4966         * demangle.c (demangle_command): Use std::string,
4967         unique_xmalloc_ptr.
4968
4969 2017-09-03  Tom Tromey  <tom@tromey.com>
4970
4971         * cli/cli-setshow.c (do_set_command): Use std::string.
4972
4973 2017-09-03  Tom Tromey  <tom@tromey.com>
4974
4975         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4976
4977 2017-09-03  Tom Tromey  <tom@tromey.com>
4978
4979         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4980
4981 2017-09-03  Tom Tromey  <tom@tromey.com>
4982
4983         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4984         gdb::unique_xmalloc_ptr.
4985
4986 2017-09-03  Tom Tromey  <tom@tromey.com>
4987
4988         * thread.c (print_thread_info_1): Use string_printf.
4989         (thread_apply_command, thread_apply_all_command): Use
4990         std::string.
4991
4992 2017-09-03  Tom Tromey  <tom@tromey.com>
4993
4994         * valprint.c (val_print_string): Update.
4995         * gdbcore.h (memory_error_message): Return std::string.
4996         * corefile.c (memory_error_message): Return std::string.
4997         (memory_error): Update.
4998         * breakpoint.c (insert_bp_location): Update.
4999
5000 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5001
5002         * target/waitstatus.h (target_waitstatus_to_string): Change
5003         return type to std::string.
5004         * target/waitstatus.c (target_waitstatus_to_string): Return
5005         std::string.
5006         * target.h (target_waitstatus_to_string): Remove declaration.
5007         * infrun.c (resume, clear_proceed_status_thread,
5008         print_target_wait_results, do_target_wait, save_waitstatus,
5009         stop_all_threads): Adjust.
5010         * record-btrace.c (record_btrace_wait): Adjust.
5011         * target-debug.h
5012         (target_debug_print_struct_target_waitstatus_p): Adjust.
5013
5014 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5015
5016         PR gdb/22046
5017         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5018         detection.
5019
5020 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5021
5022         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5023         for setting/unsetting environment variables on the remote target.
5024         (New remote packets): Add entries for QEnvironmentHexEncoded,
5025         QEnvironmentUnset and QEnvironmentReset.
5026         * common/environ.c (gdb_environ::operator=): Extend method to
5027         handle m_user_set_env_list and m_user_unset_env_list.
5028         (gdb_environ::clear): Likewise.
5029         (match_var_in_string): Change type of first parameter from 'char
5030         *' to 'const char *'.
5031         (gdb_environ::set): Extend method to handle
5032         m_user_set_env_list and m_user_unset_env_list.
5033         (gdb_environ::unset): Likewise.
5034         (gdb_environ::clear_user_set_env): New method.
5035         (gdb_environ::user_set_envp): Likewise.
5036         (gdb_environ::user_unset_envp): Likewise.
5037         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5038         m_user_unset_env_list on move constructor/assignment.
5039         (unset): Add new default parameter 'update_unset_list = true'.
5040         (clear_user_set_env): New method.
5041         (user_set_envp): Likewise.
5042         (user_unset_envp): Likewise.
5043         (m_user_set_env_list): New std::set.
5044         (m_user_unset_env_list): Likewise.
5045         * common/rsp-low.c (hex2str): New function.
5046         (bin2hex): New overload for bin2hex function.
5047         * common/rsp-low.c (hex2str): New prototype.
5048         (str2hex): New overload prototype.
5049         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5050         QEnvironmentUnset and QEnvironmentReset.
5051         (remote_protocol_features): Add QEnvironmentHexEncoded,
5052         QEnvironmentUnset and QEnvironmentReset packets.
5053         (send_environment_packet): New function.
5054         (extended_remote_environment_support): Likewise.
5055         (extended_remote_create_inferior): Call
5056         extended_remote_environment_support.
5057         (_initialize_remote): Add QEnvironmentHexEncoded,
5058         QEnvironmentUnset and QEnvironmentReset packet configs.
5059         * unittests/environ-selftests.c (gdb_selftest_env_var):
5060         New variable.
5061         (test_vector_initialization): New function.
5062         (test_init_from_host_environ): Likewise.
5063         (test_reinit_from_host_environ): Likewise.
5064         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5065         Likewise.
5066         (test_unset_set_empty_vector): Likewise.
5067         (test_vector_clear): Likewise.
5068         (test_std_move): Likewise.
5069         (test_move_constructor):
5070         (test_self_move): Likewise.
5071         (test_set_unset_reset): Likewise.
5072         (run_tests): Rewrite in terms of the functions above.
5073
5074 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5075
5076         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5077         (adi_available): Use a temp variable of type CORE_ADDR as argument
5078         3 when calling target_auxv_search.
5079         (adi_normalize_address): Use masks and xor operators to calculate
5080         normalized address.
5081         (adi_read_versions, adi_write_versions, adi_print_versions)
5082         (do_examine, do_assign): Use paddress.
5083
5084 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5085
5086         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5087         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5088         out of loop and add supply of FIR.
5089         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5090         add collect of FIR.
5091
5092 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5093
5094         PR gdb/21827
5095         * cli/cli-script.c (define_command): Don't convert command name
5096         to lower case.
5097
5098 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5099
5100         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5101         Update all callers accordingly. Remove all code blocks handling
5102         the case where DISPP is not NULL.
5103
5104 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5105
5106         PR symtab/22003
5107         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5108         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5109         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5110
5111 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5112
5113         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5114         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5115         (read_comp_units_from_section): New parameter abbrev_section, use
5116         read_and_check_comp_unit_head, allocate signatured_type if needed.
5117         (create_all_comp_units): Update read_comp_units_from_section caller.
5118
5119 2017-08-23  Pedro Alves  <palves@redhat.com>
5120
5121         PR remote/21852
5122         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5123         to null_ptid and switch to thread without reading the registers
5124         after adding the inferior.
5125
5126 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5127
5128         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5129         compile-gcc.
5130         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5131         (compile_to_object): Implement compile_gcc.
5132         (_initialize_compile): Install "set compile-gcc".  Initialize
5133         compile_gcc.
5134
5135 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5136
5137         * compile/compile.c (compile_to_object): Conditionally call
5138         set_verbose.  Conditionally call compile or compile_v0.
5139
5140 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5141
5142         * sparc64-tdep.h: (adi_normalize_address): New export.
5143         * sparc-nat.h: (open_adi_tag_fd): New export.
5144         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5145         * sparc64-linux-tdep.c:
5146         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5147         (sparc64_linux_handle_segmentation_fault): New function.
5148         (sparc64_linux_init_abi): Register
5149         sparc64_linux_handle_segmentation_fault
5150         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5151         (sparc64_addr_bits_remove): New function.
5152         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5153         (MAX_PROC_NAME_SIZE): New macro.
5154         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5155         (sparc64adilist): New variable.
5156         (adi_proc_list): New variable.
5157         (find_adi_info): New function.
5158         (add_adi_info): New function.
5159         (get_adi_info_proc): New function.
5160         (get_adi_info): New function.
5161         (info_adi_command): New function.
5162         (read_maps_entry): New function.
5163         (adi_available): New function.
5164         (adi_normalize_address): New function.
5165         (adi_align_address): New function.
5166         (adi_convert_byte_count): New function.
5167         (adi_tag_fd): New function.
5168         (adi_is_addr_mapped): New function.
5169         (adi_read_versions): New function.
5170         (adi_write_versions): New function.
5171         (adi_print_versions): New function.
5172         (do_examine): New function.
5173         (do_assign): New function.
5174         (adi_examine_command): New function.
5175         (adi_assign_command): New function.
5176         (_initialize_sparc64_adi_tdep): New function.
5177
5178 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5179
5180         * breakpoint.c (breakpoints_info): Rename to ...
5181         (info_breakpoints_command): ... this.
5182         (watchpoints_info): Rename to ...
5183         (info_watchpoints_command): ... this.
5184         (tracepoints_info): Rename to ...
5185         (info_tracepoints_command): ... this.
5186         (_initialize_breakpoint): Adjust.
5187         * dcache.c (dcache_info): Rename to ...
5188         (info_display_command): ... this.
5189         (_initialize_dcache): Adjust.
5190         * frame.h (args_info): Rename to ...
5191         (info_args_command): ... this.
5192         (locals_info): Rename to ...
5193         (info_locals_command): ... this.
5194         * infcmd.c (nofp_registers_info): Rename to ...
5195         (info_registers_command): ... this.
5196         (float_info): Rename to ...
5197         (info_float_command): ... this.
5198         (program_info): Rename to ...
5199         (info_program_command): ... this.
5200         (all_registers_info): Rename to ...
5201         (info_all_registers_command): ... this.
5202         (vector_info): Rename to ...
5203         (info_vector_command): ... this.
5204         (float_info): Rename to ...
5205         (info_float_command): ... this.
5206         (_initialize_infcmd): Adjust.
5207         * inferior.h (term_info): Rename to ...
5208         (info_terminal_command): ... this.
5209         * inflow.c (term_info): Rename to ...
5210         (info_terminal_command): ... this.
5211         (_initialize_inflow): Adjust.
5212         * infrun.c (signals_info): Rename to ...
5213         (info_signals_command): ... this.
5214         (_initialize_infrun): Adjust.
5215         * objc-lang.c (classes_info): Rename to ...
5216         (info_classes_command): ... this.
5217         (selectors_info): Rename to ...
5218         (info_selectors_command): ... this.
5219         (_initialize_objc_language): Adjust.
5220         * printcmd.c (sym_info): Rename to ...
5221         (info_symbol_command): ... this.
5222         (address_info): Rename to ...
5223         (info_address_command): ... this.
5224         (display_info): Rename to ...
5225         (info_display_command): ... this.
5226         (_initialize_printcmd): Adjust.
5227         * reverse.c (bookmarks_info): Rename to ...
5228         (info_breakpoints_command): ... this.
5229         (_initialize_reverse): Adjust.
5230         * ser-go32.c (dos_info): Rename to ...
5231         (info_serial_command): ... this.
5232         (_initialize_ser_dos): Adjust.
5233         * skip.c (skip_info): Rename to ...
5234         (info_skip_command): ... this.
5235         (_initialize_step_skip): Adjust.
5236         * source.c (line_info): Rename to ...
5237         (info_line_command): ... this.
5238         (source_info): Rename to ...
5239         (info_source_command)
5240         * stack.c (frame_info): Rename to ...
5241         (info_frame_command): ... this.
5242         (locals_info): Rename to ...
5243         (info_locals_command): ... this.
5244         (args_info): Rename to ...
5245         (info_args_command): ... this.
5246         (_initialize_stack): Adjust.
5247         * symtab.c (sources_info): Rename to ...
5248         (info_sources_command): ... this.
5249         (variables_info): Rename to ...
5250         (info_variables_command): ... this.
5251         (functions_info): Rename to ...
5252         (info_functions_command): ... this.
5253         (types_info): Rename to ...
5254         (info_types_command): ... this.
5255         (_initialize_symtab): Adjust.
5256         * target.c (target_info): Rename to ...
5257         (info_target_command): ... this.
5258         (initialize_targets): Adjust.
5259         * tracepoint.c (tvariables_info): Rename to ...
5260         (info_tvariables_command): ... this.
5261         (scope_info): Rename to ...
5262         (info_scope_command): ... this.
5263         (trace_dump_actions): Adjust.
5264         (_initialize_tracepoint): Adjust.
5265
5266 2017-08-22  Tom Tromey  <tom@tromey.com>
5267
5268         * breakpoint.h (install_breakpoint): Update.
5269         * breakpoint.c (add_solib_catchpoint): Update.
5270         (install_breakpoint): Change argument to a std::unique_ptr.
5271         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5272         (create_breakpoint_sal, create_breakpoint): Update.
5273         (watch_command_1, catch_exec_command_1)
5274         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5275         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5276         Return the breakpoint.
5277         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5278         (new_single_step_breakpoint): Update.
5279         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5280         std::unique_ptr.
5281         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5282         std::unique_ptr.
5283         * break-catch-sig.c (create_signal_catchpoint): Use
5284         std::unique_ptr.
5285         * ada-lang.c (create_ada_exception_catchpoint): Use
5286         std::unique_ptr.
5287
5288 2017-08-22  Tom Tromey  <tom@tromey.com>
5289
5290         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5291
5292 2017-08-22  Tom Tromey  <tom@tromey.com>
5293
5294         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5295         (lookup_partial_symbol): Update.
5296
5297 2017-08-22  Tom Tromey  <tom@tromey.com>
5298
5299         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5300         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5301         (find_and_open_source, symtab_to_fullname): Update.
5302         * psymtab.c (psymtab_to_fullname): Update.
5303
5304 2017-08-22  Tom Tromey  <tom@tromey.com>
5305
5306         * exec.c (exec_file_attach): Update.
5307         * linux-thread-db.c (try_thread_db_load): Update.
5308         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5309         * utils.c (gdb_realpath): Change return type.
5310         (gdb_realpath_keepfile): Update.
5311         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5312         (_initialize_utils): Register the new self test.
5313         * source.c (openp): Update.
5314         (find_and_open_source): Update.
5315         * nto-tdep.c (nto_find_and_open_solib): Update.
5316         * main.c (set_gdb_data_directory): Update.
5317         (captured_main_1): Update.
5318         * dwarf2read.c (dwarf2_get_dwz_file): Update
5319         (dw2_map_symbol_filenames): Update.
5320         * auto-load.c (auto_load_safe_path_vec_update): Update.
5321         (filename_is_in_auto_load_safe_path_vec): Change type of
5322         "filename_realp".
5323         (auto_load_objfile_script): Update.
5324         (file_is_auto_load_safe): Update.  Use std::string.
5325         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5326
5327 2017-08-22  Tom Tromey  <tom@tromey.com>
5328
5329         * utils.c (gdb_realpath_keepfile): Return a
5330         gdb::unique_xmalloc_ptr.
5331         * exec.c (exec_file_attach): Update.
5332         * utils.h (gdb_realpath_keepfile): Return a
5333         gdb::unique_xmalloc_ptr.
5334
5335 2017-08-22  Tom Tromey  <tom@tromey.com>
5336
5337         * compile/compile.c (compile_file_command): Use
5338         gdb::unique_xmalloc_ptr, std::string.
5339         * utils.c (gdb_abspath): Change return type.
5340         * source.c (openp): Update.
5341         * objfiles.c (allocate_objfile): Update.
5342         * main.c (set_gdb_data_directory): Update.
5343         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5344
5345 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5346
5347         * cli-cmds.c (list_commands): List actual code around more than
5348         one location.
5349
5350 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5351
5352         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5353
5354 2017-08-21  Pedro Alves  <palves@redhat.com>
5355
5356         PR gdb/19487
5357         * c-exp.y (variable production): Handle function aliases.
5358         * minsyms.c (msymbol_is_text): New function.
5359         * minsyms.h (msymbol_is_text): Declare.
5360         * symtab.c (find_function_alias_target): New function.
5361         * symtab.h (find_function_alias_target): Declare.
5362
5363 2017-08-21  Pedro Alves  <palves@redhat.com>
5364
5365         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5366         typedefs.
5367         * typeprint.c (whatis_exp): If handling "whatis", and expression
5368         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5369         typedefs here.
5370         * valops.c (value_cast): Save "to" type before resolving
5371         stubs/typedefs.  Use that type as resulting value's type.
5372
5373 2017-08-18  Tom Tromey  <tom@tromey.com>
5374             Pedro Alves  <palves@redhat.com>
5375
5376         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5377         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5378         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5379         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5380         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5381         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5382         (linux_get_siginfo_data): Add "thread" argument.  Use
5383         scoped_restore.
5384         * linux-nat.c (linux_child_follow_fork)
5385         (check_stopped_by_watchpoint): Use scoped_restore.
5386         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5387         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5388         (restore_inferior_ptid, save_inferior_ptid): Remove.
5389         * btrace.c (btrace_fetch): Use scoped_restore.
5390         * bsd-uthread.c (bsd_uthread_fetch_registers)
5391         (bsd_uthread_store_registers): Use scoped_restore.
5392         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5393         scoped_restore.
5394         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5395         (aix_thread_xfer_partial): Use scoped_restore.
5396         * inferior.h (save_inferior_ptid): Remove.
5397
5398 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5399
5400         PR tdep/21818
5401         * arm-tdep.c (gdb_print_insn_arm): Mark
5402         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5403
5404 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5405
5406         * NEWS: Mention GDBserver's new option "--selftest".
5407         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5408         * selftest.c: Move it to common/selftest.c.
5409         * selftest.h: Move it to common/selftest.h.
5410         * selftest-arch.c (reset): New function.
5411         (tests_with_arch): Call reset.
5412
5413 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5414
5415         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5416         instead of exception_fprintf and printf_filtered.
5417
5418 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5419
5420         * selftest.c (register_self_test): Rename it to
5421         selftests::register_test.
5422         (run_self_tests): selftest::run_tests.
5423         * selftest.h: Update declarations.
5424         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5425         selftests::register_test_foreach_arch.
5426         * selftest-arch.h: Update declaration.
5427         * aarch64-tdep.c: Update.
5428         * arm-tdep.c: Likewise.
5429         * disasm-selftests.c: Likewise.
5430         * dwarf2loc.c: Likewise.
5431         * dwarf2-frame.c: Likewise.
5432         * findvar.c: Likewise.
5433         * gdbarch-selftests.c: Likewise.
5434         * maint.c (maintenance_selftest): Likewise.
5435         * regcache.c: Likewise.
5436         * rust-exp.y: Likewise.
5437         * selftest-arch.c: Likewise.
5438         * unittests/environ-selftests.c: Likewise.
5439         * unittests/function-view-selftests.c: Likewise.
5440         * unittests/offset-type-selftests.c: Likewise.
5441         * unittests/optional-selftests.c: Likewise.
5442         * unittests/scoped_restore-selftests.c: Likewise.
5443         * utils-selftests.c: Likewise.
5444
5445 2017-08-17  Pedro Alves  <palves@redhat.com>
5446
5447         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5448         local.
5449
5450 2017-08-17  Pedro Alves  <palves@redhat.com>
5451
5452         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5453         field.
5454         (reset_die_in_process): Delete, replaced by ...
5455         (process_die_scope): ... this new class.  Make it responsible for
5456         freeing cu->line_header too.
5457         (process_die): Use process_die_scope.
5458         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5459         cu->line_header_die_owner.  Don't release the line header if it's
5460         owned by the CU.
5461         (setup_type_unit_groups): Make the CU/DIE own the line header.
5462         Don't release the line header here.
5463
5464 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5465
5466         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5467
5468 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5469
5470         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5471         Single-Key mode
5472
5473 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5474
5475         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5476         mode command list.
5477
5478 2017-08-15  Stafford Horne  <shorne@gmail.com>
5479
5480         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5481
5482 2017-08-15  Stafford Horne  <shorne@gmail.com>
5483
5484         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5485
5486 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5487
5488         PR gdb/21954
5489         * infcmd.c (unset_environment_command): Use the 'clear' method on
5490         the environment instead of resetting it.
5491
5492 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5493
5494         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5495         platforms.
5496
5497 2017-08-14  Tom Tromey  <tom@tromey.com>
5498
5499         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5500         (print_binary_chars): Likewise.
5501         (BITS_IN_BYTES): Remove.
5502
5503 2017-08-14  Tom Tromey  <tom@tromey.com>
5504
5505         PR gdb/21675
5506         * valprint.c (LOW_ZERO): Change value to 034.
5507         (print_octal_chars): Add static_asserts for octal constants.
5508         * printcmd.c (print_scalar_formatted): Add 'd' case.
5509
5510 2017-08-11  Tom Tromey  <tom@tromey.com>
5511
5512         * symfile.c (add_symbol_file_command): Use std::vector.
5513
5514 2017-08-14  Tom Tromey  <tom@tromey.com>
5515
5516         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5517         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5518         std::move.
5519         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5520
5521 2017-08-11  Pedro Alves  <palves@redhat.com>
5522
5523         * infrun.c (process_event_stop_test): Adjust
5524         function_name_is_marked_for_skip call.
5525         * skip.c: Include <list>.
5526         (skiplist_entry): Make it a class with private fields, and
5527         getters/setters.
5528         (skiplist_entry_chain): Delete.
5529         (skiplist_entries): New.
5530         (skiplist_entry_count): Delete.
5531         (highest_skiplist_entry_num): New.
5532         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5533         (add_skiplist_entry): Delete.
5534         (skiplist_entry::skiplist_entry): New.
5535         (skiplist_entry::add_entry): New.
5536         (skip_file_command, skip_function): Adjust.
5537         (compile_skip_regexp): Delete.
5538         (skip_command): Don't compile regexp here.  Adjust to use
5539         skiplist_entry::add_entry.
5540         (skip_info): Adjust to use range-for and getters.
5541         (skip_enable_command, skip_disable_command): Adjust to use
5542         range-for and setters.
5543         (skip_delete_command): Adjust to use std::list.
5544         (add_skiplist_entry): Delete.
5545         (skip_file_p): Delete, refactored as ...
5546         (skiplist_entry::do_skip_file_p): ... this new method.
5547         (skip_gfile_p): Delete, refactored as ...
5548         (skiplist_entry::do_gskip_file_p): ... this new method.
5549         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5550         (skiplist_entry::skip_function_p): ... this new method.
5551         (function_name_is_marked_for_skip): Now returns bool, and takes
5552         the function sal by const reference.  Adjust to use range-for and
5553         skiplist_entry methods.
5554         (_initialize_step_skip): Remove references to
5555         skiplist_entry_chain, skiplist_entry_count.
5556         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5557         takes the function sal by const reference.
5558
5559 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5560
5561         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5562         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5563         (dwarf2_frame_cache):
5564         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5565         RETURN_MASK_ALL and set *this_case to NULL.
5566         * frame-unwind.h: Update comments.
5567
5568 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5569
5570         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5571         (dwarf2_frame_state_copy_regs): Remove.
5572         (dwarf2_frame_state_free_regs): Remove.
5573         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5574         (dwarf2_restore_rule): Call method .alloc_regs instead of
5575         dwarf2_frame_state_alloc_regs.
5576         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5577         constructor.  Call std::move.
5578         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5579         (dwarf2_frame_cache): Likewise.
5580
5581         [GDB_SELF_TEST]: Include selftest.h and
5582         selftest-arch.h.
5583         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5584         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5585         execute_cfa_program_test.
5586
5587         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5588         copy ctor, assignment operator, move assignment.
5589         <alloc_regs>: New method.
5590         <swap>: New method.
5591         (struct dwarf2_frame_state): Delete dtor.
5592         (dwarf2_frame_state_alloc_regs): Remove declaration.
5593         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5594         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5595
5596 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5597
5598         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5599         (dwarf2_frame_state::dwarf2_frame_state): New.
5600         (dwarf2_frame_state::~dwarf2_frame_state): New.
5601         (dwarf2_fetch_cfa_info): Update.
5602         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5603         rather than a pointer.  Update code.
5604         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5605         dtor.
5606         <data_align, code_align, retaddr_column>: Change them to const.
5607         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5608         to bool.
5609
5610 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5611
5612         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5613         <loc.exp>: New field.
5614         * dwarf2-frame.c (execute_cfa_program): Update.
5615         (dwarf2_frame_prev_register): Update.
5616
5617 2017-08-10  Pedro Alves  <palves@redhat.com>
5618
5619         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5620
5621 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5622
5623         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5624         (fbsd_pending_children): Use std::list.
5625         (fbsd_remember_child): Likewise.
5626         (fbsd_is_child_pending): Likewise.
5627         (fbsd_pending_vfork_done): Use std::forward_list.
5628         (fbsd_add_vfork_done): Likewise.
5629         (fbsd_is_vfork_done_pending): Likewise.
5630         (fbsd_next_vfork_done): Likewise.
5631
5632 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5633
5634         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5635         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5636         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5637         for `mapfilename'.
5638         (fbsd_xfer_partial): Use gdb::byte_vector.
5639         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5640
5641 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5642
5643         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5644         "filestuff.h".
5645         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5646
5647 2017-08-09  Tom Tromey  <tom@tromey.com>
5648
5649         * skip.c (skiplist_entry): New constructor.
5650         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5651         (skiplist_entry::file_is_glob): Now bool.
5652         (skiplist_entry::file, skiplist_entry::function): Now
5653         std::string.
5654         (make_skip_entry): Return a unique_ptr.  Use new.
5655         (free_skiplist_entry, free_skiplist_entry_cleanup)
5656         (make_free_skiplist_entry_cleanup): Remove.
5657         (skip_command, skip_disable_command, add_skiplist_entry)
5658         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5659         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5660         (function_name_is_marked_for_skip): Update.
5661         (skip_delete_command): Update.  Use delete.
5662
5663 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5664
5665         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5666         (aarch64_linux_core_read_description): New function.
5667         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5668
5669 2017-08-09  Pedro Alves  <palves@redhat.com>
5670
5671         * cp-name-parser.y (cp_comp_to_string): Return a
5672         gdb::unique_xmalloc_ptr<char>.
5673         * cp-support.c (replace_typedefs_qualified_name)
5674         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5675         (cp_canonicalize_string_full): Use op= instead of explicit
5676         convertion.
5677         (cp_class_name_from_physname, method_name_from_physname)
5678         (cp_func_name, cp_remove_params): Adjust to use
5679         gdb::unique_xmalloc_ptr<char>.
5680         * cp-support.h (cp_comp_to_string): Return a
5681         gdb::unique_xmalloc_ptr<char>.
5682         * python/py-type.c (typy_lookup_type): Adjust to use
5683         gdb::unique_xmalloc_ptr<char>.
5684
5685 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5686
5687         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5688
5689 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5690             Yao Qi  <yao.qi@linaro.org>
5691
5692         * cp-support.c (cp_canonicalize_string_full): Use
5693         gdb::unique_xmalloc_ptr<char>.
5694         (cp_canonicalize_string): Likewise.
5695
5696 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5697
5698         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5699         * regformats/i386/amd64-avx-avx512.dat: Remove.
5700         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5701         * regformats/i386/amd64-avx-mpx.dat:Remove.
5702         * regformats/i386/amd64-avx.dat: Remove.
5703         * regformats/i386/amd64-mpx.dat: Remove.
5704         * regformats/i386/i386-avx-avx512.dat: Remove.
5705         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5706         * regformats/i386/i386-avx-mpx.dat: Remove.
5707         * regformats/i386/i386-mmx.dat: Remove.
5708         * regformats/i386/i386-mpx.dat: Remove.
5709
5710 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5711
5712         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5713         * amd64-tdep.c: Don't include features/i386/x32*.c.
5714         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5715         functions.
5716         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5717         and i386/x32-avx-avx512.
5718         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5719         and i386/x32.xml.
5720         * features/i386/x32-avx-avx512.c: Removed.
5721         * features/i386/x32-avx-avx512.xml: Removed.
5722         * features/i386/x32-avx.c: Removed.
5723         * features/i386/x32-avx.xml: Removed.
5724         * features/i386/x32.c: Removed.
5725         * features/i386/x32.xml: Removed.
5726         * regformats/i386/x32-avx-avx512.dat: Removed.
5727         * regformats/i386/x32-avx.dat: Removed.
5728         * regformats/i386/x32.dat: Removed.
5729
5730 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5731
5732         PR breakpoints/21886
5733         * mem-break.c (default_memory_insert_breakpoint): Use
5734         `->placed_address' rather than `->reqstd_address' for the
5735         breakpoint location.
5736
5737 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5738
5739         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5740         assertions.
5741
5742 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5743
5744         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5745         a union of `tdep_info', `tdesc_data' and `id'.
5746         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5747         rather than `info.tdep_info'.
5748         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5749         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5750         * i386-tdep.c (i386_gdbarch_init): Likewise.
5751         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5752         * mips-tdep.c (mips_gdbarch_init): Likewise.
5753         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5754         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5755         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5756         `info.tdep_info'.
5757         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5758         `info.tdep_info'.
5759         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5760         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5761         `info.tdep_info'.
5762         * spu-tdep.c (spu_gdbarch_init): Likewise.
5763         * gdbarch.h: Regenerate.
5764
5765 2017-08-07  Leszek Swirski  <leszeks@google.com>
5766
5767         PR symtab/20899
5768         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5769
5770 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5771
5772         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5773         (gdbsim_open): Rename gdb_argv args object to argv.
5774
5775 2017-08-05  Tom Tromey  <tom@tromey.com>
5776
5777         * compile/compile-object-load.c (compile_object_load): Use
5778         gdb::unique_xmalloc_ptr.
5779         * cli/cli-dump.c (scan_filename): Rename from
5780         scan_filename_with_cleanup.  Change return type.
5781         (scan_expression): Rename from scan_expression_with_cleanup.
5782         Change return type.
5783         (dump_memory_to_file, dump_value_to_file, restore_command):
5784         Use gdb::unique_xmalloc_ptr.  Update.
5785         * cli/cli-cmds.c (find_and_open_script): Use
5786         gdb::unique_xmalloc_ptr.
5787         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5788         * symmisc.c (maintenance_print_symbols)
5789         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5790         * symfile.c (symfile_bfd_open, generic_load)
5791         (add_symbol_file_command, remove_symbol_file_command): Use
5792         gdb::unique_xmalloc_ptr.
5793         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5794         * psymtab.c (maintenance_print_psymbols): Use
5795         gdb::unique_xmalloc_ptr.
5796         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5797         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5798         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5799         (reload_shared_libraries_1): Likewise.
5800
5801 2017-08-05  Tom Tromey  <tom@tromey.com>
5802
5803         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5804         (rust_op_vector, rust_set_vector): New typedefs.
5805         (current_parser): New global.
5806         (work_obstack): Change to pointer type.  Update all users.
5807         (rust_ast, pstate): Remove globals.
5808         (struct rust_parser): New.
5809         (%union) <params, field_inits>: Change type.
5810         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5811         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5812         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5813         (convert_params_to_types, convert_params_to_expression): Change
5814         type of "params".
5815         (ast_string): Change type of "fields".
5816         (rust_parse): Make a rust_parser.  Remove cleanups.
5817         (rust_lex_tests): Make and install an auto_obstack.
5818
5819 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5820
5821         * configure.srv (ipa_x32_linux_regobj): New.
5822         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5823         instead of X86_TDESC_AVX512.
5824         (initialize_low_tracepoint): Call
5825         init_registers_x32_avx_avx512_linux.
5826
5827 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5828
5829         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5830
5831 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5832
5833         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5834
5835 2017-08-03  Tom Tromey  <tom@tromey.com>
5836
5837         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5838         Remove.
5839         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5840
5841 2017-08-03  Tom Tromey  <tom@tromey.com>
5842
5843         * python/py-param.c (compute_enum_values): Use gdb_argv.
5844
5845 2017-08-03  Tom Tromey  <tom@tromey.com>
5846
5847         * utils.h (struct gdb_argv_deleter): New.
5848         (gdb_argv): New class.
5849         * utils.c (gdb_argv::reset): New method.
5850         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5851         * tracefile.c (tsave_command): Use gdb_argv.
5852         * top.c (new_ui_command): Use gdb_argv.
5853         * symmisc.c (maintenance_print_symbols)
5854         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5855         * symfile.c (symbol_file_command, generic_load)
5856         (remove_symbol_file_command): Use gdb_argv.
5857         * stack.c (backtrace_command): Use gdb_argv.
5858         * source.c (add_path, show_substitute_path_command)
5859         (unset_substitute_path_command, set_substitute_path_command):
5860         Use gdb_argv.
5861         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5862         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5863         * remote.c (extended_remote_run, remote_put_command)
5864         (remote_get_command, remote_delete_command): Use gdb_argv.
5865         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5866         (gdbsim_open): Use gdb_argv.
5867         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5868         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5869         * procfs.c (procfs_info_proc): Use gdb_argv.
5870         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5871         * infrun.c (handle_command): Use gdb_argv.
5872         * inferior.c (add_inferior_command, clone_inferior_command):
5873         Use gdb_argv.
5874         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5875         * exec.c (exec_file_command): Use gdb_argv.
5876         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5877         * compile/compile.c (build_argc_argv): Use gdb_argv.
5878
5879 2017-08-03  Tom Tromey  <tom@tromey.com>
5880
5881         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5882
5883 2017-08-03  Tom Tromey  <tom@tromey.com>
5884
5885         * python/python.c (compute_python_string): Return std::string.
5886         (gdbpy_eval_from_control_command): Update.
5887         (do_start_initialization): Use std::string.
5888         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5889         xstrprintf.
5890         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5891         xstrprintf.
5892
5893 2017-08-03  Tom Tromey  <tom@tromey.com>
5894
5895         * top.h (do_restore_instream_cleanup): Remove.
5896         * top.c (do_restore_instream_cleanup): Remove.
5897         (read_command_file): Use scoped_restore.
5898         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5899
5900 2017-08-03  Tom Tromey  <tom@tromey.com>
5901
5902         * cli/cli-script.c (execute_user_command)
5903         (execute_control_command): Use scoped_restore.
5904
5905 2017-08-03  Tom Tromey  <tom@tromey.com>
5906
5907         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5908         (execute_user_command): Remove user_call_depth; use
5909         user_args_stack's size instead.
5910
5911 2017-08-03  Tom Tromey  <tom@tromey.com>
5912
5913         * top.h (in_user_command): Remove.
5914         * top.c (in_user_command): Remove.
5915         * cli/cli-script.c (do_restore_user_call_depth)
5916         (execute_user_command): Update.
5917
5918 2017-08-03  Tom Tromey  <tom@tromey.com>
5919
5920         * valops.c (search_struct_method): Use gdb::byte_vector.
5921         * valarith.c (value_concat): Use std::vector.
5922         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5923         (simple_search_memory): Likewise.
5924         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5925         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5926         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5927         * elfread.c (elf_rel_plt_read): Use std::string.
5928         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5929         * cli/cli-dump.c (restore_section_callback): Use
5930         gdb::byte_vector.
5931
5932 2017-08-03  Tom Tromey  <tom@tromey.com>
5933
5934         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5935
5936 2017-08-03  Tom Tromey  <tom@tromey.com>
5937
5938         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5939         (tui_register_format): Use scoped_restore.
5940
5941 2017-08-03  Tom Tromey  <tom@tromey.com>
5942
5943         * reverse.c (exec_direction_default): Remove.
5944         (exec_reverse_once): Use scoped_restore.
5945         * remote.c (restore_remote_timeout): Remove.
5946         (remote_flash_erase, remote_flash_write, remote_flash_done)
5947         (readchar, remote_serial_write): Use scoped_restore.
5948         * cli/cli-script.c (struct source_cleanup_lines_args)
5949         (source_cleanup_lines): Remove.
5950         (script_from_file): Use scoped_restore.
5951         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5952         (source_command): Use scoped_restore.
5953
5954 2017-08-03  Tom Tromey  <tom@tromey.com>
5955
5956         * utils.h (make_cleanup_free_so): Remove.
5957         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5958         * solist.h (struct so_deleter): New.
5959         (so_list_up): New typedef.
5960         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5961
5962 2017-08-03  Tom Tromey  <tom@tromey.com>
5963
5964         * utils.h (make_cleanup_restore_current_language): Remove.
5965         * utils.c (do_restore_current_language)
5966         (make_cleanup_restore_current_language): Remove.
5967         * parse.c (parse_exp_in_context_1)
5968         (parse_expression_with_language): Use
5969         scoped_restore_current_language.
5970         * mi/mi-main.c (mi_cmd_execute): Use
5971         scoped_restore_current_language.
5972         * language.h (scoped_restore_current_language): New class.
5973
5974 2017-08-03  Tom Tromey  <tom@tromey.com>
5975
5976         * compile/compile.c (cleanup_unlink_file): Remove.
5977         (compile_to_object): Use gdb::unlinker.
5978         (eval_compile_command): Likewise.
5979
5980 2017-08-03  Tom Tromey  <tom@tromey.com>
5981
5982         * utils.h (make_cleanup_fclose): Remove.
5983         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5984
5985 2017-08-03  Tom Tromey  <tom@tromey.com>
5986
5987         * top.c (open_terminal_stream): Return gdb_file_up.
5988         (new_ui_command): Update.
5989
5990 2017-08-03  Tom Tromey  <tom@tromey.com>
5991
5992         * source.c (print_source_lines_base, forward_search_command)
5993         (reverse_search_command): Use gdb_file_up.
5994
5995 2017-08-03  Tom Tromey  <tom@tromey.com>
5996
5997         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5998
5999 2017-08-03  Tom Tromey  <tom@tromey.com>
6000
6001         * cli/cli-cmds.c (find_and_open_script): Change return type.
6002         Remove "streamp" and "full_path" parameters.
6003         (source_script_with_search): Update.
6004         * auto-load.c (source_script_file): Update.
6005         * cli/cli-cmds.h (find_and_open_script): Change type.
6006         (open_script): New struct.
6007
6008 2017-08-03  Tom Tromey  <tom@tromey.com>
6009
6010         * xml-support.c (xml_fetch_content_from_file): Update.
6011         * ui-file.c (stdio_file::open): Update.
6012         * tracefile-tfile.c (tfile_start): Update.
6013         * remote.c (remote_file_put, remote_file_get): Update.
6014         * nat/linux-procfs.c (linux_proc_get_int)
6015         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6016         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6017         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6018         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6019         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6020         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6021         * linux-nat.c (linux_proc_pending_signals): Update.
6022         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6023         (file_closer): Remove.
6024         * compile/compile.c (compile_to_object): Update.
6025         * common/filestuff.h (struct gdb_file_deleter): New.
6026         (gdb_file_up): New typedef.
6027         (gdb_fopen_cloexec): Change return type.
6028         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6029         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6030         (dump_binary_file, restore_binary_file): Update.
6031         * auto-load.c (auto_load_objfile_script_1): Update.
6032
6033 2017-08-03  Tom Tromey  <tom@tromey.com>
6034
6035         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6036         (info_static_tracepoint_markers_command): Likewise.
6037         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6038         * skip.c (skip_info): Use ui_out_emit_table.
6039         * progspace.c (print_program_space): Use ui_out_emit_table.
6040         * osdata.c (info_osdata): Use ui_out_emit_table.
6041         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6042         ui_out_emit_table.
6043         * linux-thread-db.c (info_auto_load_libthread_db): Use
6044         ui_out_emit_table.
6045         * inferior.c (print_inferior): Use ui_out_emit_table.
6046         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6047         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6048         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6049         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6050         * ui-out.h (class ui_out_emit_table): New.
6051
6052 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6053
6054         * mips-tdep.c (mips_fpu_type_str): New function.
6055         (mips_dump_tdep): Call it.
6056
6057 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6058
6059         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6060         `->mips_fpu_type'.
6061
6062 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6063
6064         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6065
6066 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6067
6068         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6069
6070 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6071
6072         * cli/cli-cmds.c (maintenancechecklist): New variable.
6073         * gdbcmd.h (maintenancechecklist): Declare it.
6074         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6075         Call i386_linux_read_description with different masks.
6076         * maint.c (maintenance_check_command): New function.
6077         (_initialize_maint_cmds): Call add_prefix_cmd.
6078         * target-descriptions.c (tdesc_reg): override operator != and ==.
6079         (tdesc_type): Likewise.
6080         (tdesc_feature): Likewise.
6081         (target_desc): Likewise.
6082         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6083         (maintenance_check_xml_descriptions): New function.
6084         (_initialize_target_descriptions) Add command "xml-descriptions".
6085         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6086
6087 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6088
6089         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6090         Include features/i386/32bit-*.c.
6091         (i386_linux_read_description): Generate target description if it
6092         doesn't exist.
6093         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6094         functions.
6095         * features/i386/32bit-linux.c: Re-generated.
6096         * features/i386/32bit-sse.c: Likewise.
6097         * target-descriptions.c (print_c_feature::visit): Print code to
6098         set register number if needed.
6099         (print_c_feature) <m_next_regnum>: New field.
6100
6101 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6102
6103         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6104         (FEATURE_XMLFILES): New.
6105         (FEATURE_CFILES): New.
6106         New rules.
6107         (clean-cfiles): Remove generated c files.
6108         * features/i386/32bit-avx.c: Generated.
6109         * features/i386/32bit-avx512.c: Generated.
6110         * features/i386/32bit-core.c: Generated.
6111         * features/i386/32bit-linux.c: Generated.
6112         * features/i386/32bit-mpx.c: Generated.
6113         * features/i386/32bit-pkeys.c: Generated.
6114         * features/i386/32bit-sse.c: Generated.
6115         * target-descriptions.c: Include algorithm.
6116         (tdesc_element_visitor): Add method visit_end.
6117         (print_c_tdesc): Implement visit_end.
6118         (print_c_tdesc:: m_filename_after_features): Move it to
6119         protected.
6120         (print_c_feature): New class.
6121         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6122         name starts with "i386/32bit-".
6123
6124 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6125
6126         * target-descriptions.c (tdesc_element_visitor): New class.
6127         (tdesc_element): New class.
6128         (tdesc_reg): Inherit from tdesc_element.
6129         (tdesc_reg::accept): New function.
6130         (tdesc_type): Inherit from tdesc_element.
6131         (tdesc_type::accept): New function.
6132         (tdesc_feature): Inherit from tdesc_element.
6133         (tdesc_feature::accept): New function.
6134         (target_desc): Inherit from tdesc_element.
6135         (target_desc::target_desc): New.
6136         (target_desc::~target_desc): New.
6137         (target_desc::accept): New.
6138         (allocate_target_description): Use new.
6139         (free_target_description): Use delete.
6140         (print_c_tdesc): New class.
6141         (maint_print_c_tdesc_cmd): Adjust.
6142
6143         * features/aarch64.c: Re-generated.
6144         * features/arc-arcompact.c: Re-generated.
6145         * features/arc-v2.c: Re-generated.
6146         * features/arm/arm-with-iwmmxt.c: Re-generated.
6147         * features/arm/arm-with-m.c: Re-generated.
6148         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6149         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6150         * features/arm/arm-with-neon.c: Re-generated.
6151         * features/arm/arm-with-vfpv2.c: Re-generated.
6152         * features/arm/arm-with-vfpv3.c: Re-generated.
6153         * features/i386/amd64-avx-avx512.c: Re-generated.
6154         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6155         * features/i386/amd64-avx.c: Re-generated.
6156         * features/i386/amd64-avx-linux.c: Re-generated.
6157         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6158         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6159         * features/i386/amd64-avx-mpx.c: Re-generated.
6160         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6161         * features/i386/amd64.c: Re-generated.
6162         * features/i386/amd64-linux.c: Re-generated.
6163         * features/i386/amd64-mpx.c: Re-generated.
6164         * features/i386/amd64-mpx-linux.c: Re-generated.
6165         * features/i386/i386-avx-avx512.c: Re-generated.
6166         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6167         * features/i386/i386-avx.c: Re-generated.
6168         * features/i386/i386-avx-linux.c: Re-generated.
6169         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6170         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6171         * features/i386/i386-avx-mpx.c: Re-generated.
6172         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6173         * features/i386/i386.c: Re-generated.
6174         * features/i386/i386-linux.c: Re-generated.
6175         * features/i386/i386-mmx.c: Re-generated.
6176         * features/i386/i386-mmx-linux.c: Re-generated.
6177         * features/i386/i386-mpx.c: Re-generated.
6178         * features/i386/i386-mpx-linux.c: Re-generated.
6179         * features/i386/x32-avx-avx512.c: Re-generated.
6180         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6181         * features/i386/x32-avx.c: Re-generated.
6182         * features/i386/x32-avx-linux.c: Re-generated.
6183         * features/i386/x32.c: Re-generated.
6184         * features/i386/x32-linux.c: Re-generated.
6185         * features/microblaze.c: Re-generated.
6186         * features/microblaze-with-stack-protect.c: Re-generated.
6187         * features/mips64-dsp-linux.c: Re-generated.
6188         * features/mips64-linux.c: Re-generated.
6189         * features/mips-dsp-linux.c: Re-generated.
6190         * features/mips-linux.c: Re-generated.
6191         * features/nds32.c: Re-generated.
6192         * features/nios2.c: Re-generated.
6193         * features/nios2-linux.c: Re-generated.
6194         * features/rs6000/powerpc-32.c: Re-generated.
6195         * features/rs6000/powerpc-32l.c: Re-generated.
6196         * features/rs6000/powerpc-403.c: Re-generated.
6197         * features/rs6000/powerpc-403gc.c : Re-generated.
6198         * features/rs6000/powerpc-405.c: Re-generated.
6199         * features/rs6000/powerpc-505.c: Re-generated.
6200         * features/rs6000/powerpc-601.c: Re-generated.
6201         * features/rs6000/powerpc-602.c: Re-generated.
6202         * features/rs6000/powerpc-603.c: Re-generated.
6203         * features/rs6000/powerpc-604.c: Re-generated.
6204         * features/rs6000/powerpc-64.c: Re-generated.
6205         * features/rs6000/powerpc-64l.c: Re-generated.
6206         * features/rs6000/powerpc-7400.c: Re-generated.
6207         * features/rs6000/powerpc-750.c: Re-generated.
6208         * features/rs6000/powerpc-860.c: Re-generated.
6209         * features/rs6000/powerpc-altivec32.c: Re-generated.
6210         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6211         * features/rs6000/powerpc-altivec64.c: Re-generated.
6212         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6213         * features/rs6000/powerpc-cell32l.c: Re-generated.
6214         * features/rs6000/powerpc-cell64l.c: Re-generated.
6215         * features/rs6000/powerpc-e500.c: Re-generated.
6216         * features/rs6000/powerpc-e500l.c: Re-generated.
6217         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6218         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6219         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6220         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6221         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6222         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6223         * features/rs6000/powerpc-vsx32.c: Re-generated.
6224         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6225         * features/rs6000/powerpc-vsx64.c: Re-generated.
6226         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6227         * features/rs6000/rs6000.c: Re-generated.
6228         * features/s390-linux32.c: Re-generated.
6229         * features/s390-linux32v1.c: Re-generated.
6230         * features/s390-linux32v2.c: Re-generated.
6231         * features/s390-linux64.c: Re-generated.
6232         * features/s390-linux64v1.c: Re-generated.
6233         * features/s390-linux64v2.c: Re-generated.
6234         * features/s390-te-linux64.c: Re-generated.
6235         * features/s390-tevx-linux64.c: Re-generated.
6236         * features/s390-vx-linux64.c: Re-generated.
6237         * features/s390x-linux64.c: Re-generated.
6238         * features/s390x-linux64v1.c: Re-generated.
6239         * features/s390x-linux64v2.c: Re-generated.
6240         * features/s390x-te-linux64.c: Re-generated.
6241         * features/s390x-tevx-linux64.c: Re-generated.
6242         * features/s390x-vx-linux64.c: Re-generated.
6243         * features/sparc/sparc32-solaris.c: Re-generated.
6244         * features/sparc/sparc64-solaris.c: Re-generated.
6245         * features/tic6x-c62x.c: Re-generated.
6246         * features/tic6x-c62x-linux.c: Re-generated.
6247         * features/tic6x-c64x.c: Re-generated.
6248         * features/tic6x-c64x-linux.c: Re-generated.
6249         * features/tic6x-c64xp.c: Re-generated.
6250         * features/tic6x-c64xp-linux.c: Re-generated.
6251
6252 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6253
6254         * i386-linux-tdep.c (i386_linux_read_description): New function.
6255         (i386_linux_core_read_description): Call
6256         i386_linux_read_description.
6257         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6258         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6259         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6260         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6261         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6262         * x86-linux-nat.c (x86_linux_read_description): Call
6263         i386_linux_read_description.
6264
6265 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6266
6267         * NEWS: Mention it.
6268         * features/Makefile (%.c: %.xml): Pass the xml file name to
6269         command "maint print c-tdesc".
6270         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6271         name from 'arg'.
6272
6273 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6274
6275         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6276         in-class initialization.
6277         (tdesc_create_feature): Call new instead of XCNEW.
6278         (free_target_description): Ue delete.
6279
6280 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6281
6282         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6283
6284 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6285
6286         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6287         constant.
6288         (amd64_x32_init_abi): Likewise.
6289         * amd64-tdep.h (amd64_init_abi): Update declaration.
6290         (amd64_x32_init_abi): Likewise.
6291
6292 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6293
6294         PR tdep/21717
6295         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6296         condition for FPSCR.
6297         (arm_linux_store_inferior_registers): Likewise.
6298
6299 2017-07-22  Tom Tromey  <tom@tromey.com>
6300
6301         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6302         <syscalls_counts>: Now a std::vector.
6303         (get_catch_syscall_inferior_data): Use "new".
6304         (catch_syscall_inferior_data_cleanup): Use "delete".
6305         (insert_catch_syscall, remove_catch_syscall)
6306         (clear_syscall_counts): Update.
6307
6308 2017-07-22  Tom Tromey  <tom@tromey.com>
6309
6310         * break-catch-syscall.c (syscall_catchpoint)
6311         <syscalls_to_be_caught>: Now a std::vector<int>
6312         (~syscall_catchpoint): Remove.
6313         (insert_catch_syscall, remove_catch_syscall)
6314         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6315         (print_mention_catch_syscall, print_recreate_catch_syscall):
6316         Update.
6317         (create_syscall_event_catchpoint): Change type of "filter"
6318         parameter.
6319         (catch_syscall_split_args): Return a std::vector.
6320         (catch_syscall_command_1, catching_syscall_number_1): Update.
6321
6322 2017-07-22  Tom Tromey  <tom@tromey.com>
6323
6324         * break-catch-throw.c (struct exception_catchpoint)
6325         <exception_rx>: Now a std::string.
6326         (~exception_catchpoint): Remove.
6327         (print_one_detail_exception_catchpoint): Update.
6328         (handle_gnu_v3_exceptions): Change type of except_rx.
6329         (extract_exception_regexp): Return a std::string.
6330         (catch_exception_command_1): Update.
6331
6332 2017-07-22  Tom Tromey  <tom@tromey.com>
6333
6334         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6335         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6336         std::vector.
6337         <catch_all>: Now a bool.
6338         (~signal_catchpoint): Remove.
6339         (signal_catchpoint_insert_location)
6340         (signal_catchpoint_remove_location)
6341         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6342         (signal_catchpoint_print_mention)
6343         (signal_catchpoint_print_recreate)
6344         (signal_catchpoint_explains_signal): Update.
6345         (create_signal_catchpoint): Change type of "filter" and
6346         "catch_all".
6347         (catch_signal_split_args): Return a std::vector.  Change type of
6348         "catch_all".
6349         (catch_signal_command): Update.
6350
6351 2017-07-20  Pedro Alves  <palves@redhat.com>
6352
6353         * ada-lang.c (ada_language_defn): Make extern.
6354         (_initialize_ada_language): Remove add_language call.
6355         * c-lang.c (c_language_defn, cplus_language_defn)
6356         (asm_language_defn, minimal_language_defn): Make extern.
6357         (_initialize_c_language): Delete.
6358         * completer.c (compare_cstrings): Delete, moved to utils.h.
6359         * d-lang.c (d_language_defn): Make extern.
6360         (_initialize_d_language): Remove add_language calls.
6361         * defs.h (enum language): Add comment.
6362         * f-lang.c (f_language_defn): Make extern.
6363         (_initialize_f_language): Remove add_language call.
6364         * go-lang.c (go_language_defn): Make extern.
6365         (_initialize_go_language): Remove add_language call.
6366         * language.c: Include <algorithm>.
6367         (languages): Redefine as const array.
6368         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6369         (set_language_command): Handle "local".  Use for-range loop.
6370         (set_language): Remove loop.
6371         (language_enum): Rewrite.
6372         (language_def, language_str): Remove loops.
6373         (add_language): Delete.
6374         (add_set_language_command): New, based on add_languages.
6375         (skip_language_trampoline): Adjust.
6376         (local_language_defn): Delete.
6377         (language_gdbarch_post_init): Adjust.
6378         (_initialize_language): Remove add_language calls.  Call
6379         add_set_language_command.
6380         * language.h (add_language): Delete.
6381         (auto_language_defn)
6382         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6383         (asm_language_defn, c_language_defn, cplus_language_defn)
6384         (d_language_defn, f_language_defn, go_language_defn)
6385         (m2_language_defn, objc_language_defn, opencl_language_defn)
6386         (pascal_language_defn, rust_language_defn): Declare.
6387         * m2-lang.c (m2_language_defn): Make extern.
6388         (_initialize_m2_language): Remove add_language call.
6389         * objc-lang.c (objc_language_defn): Make extern.
6390         (_initialize_objc_language): Remove add_language call.
6391         * opencl-lang.c (opencl_language_defn): Make extern.
6392         (_initialize_opencl_language): Remove add_language call.
6393         * p-lang.c (pascal_language_defn): Make extern.
6394         (_initialize_pascal_language): Delete.
6395         * rust-lang.c (rust_language_defn): Make extern.
6396         (_initialize_rust_language): Delete.
6397         * utils.h (compare_cstrings): New static inline function.
6398
6399 2017-07-20  Pedro Alves  <palves@redhat.com>
6400
6401         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6402         (get_var_value): Constify parameters.
6403         (get_int_var_value): Change prototype.
6404         (to_fixed_range_type): Adjust.
6405         * ada-lang.h (get_int_var_value): Change prototype.
6406
6407 2017-07-20  Pedro Alves  <palves@redhat.com>
6408
6409         * dwarf2read.c (dw2_lookup_symbol): Use
6410         SYMBOL_MATCHES_SEARCH_NAME.
6411         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6412
6413 2017-07-20  Pedro Alves  <palves@redhat.com>
6414
6415         * block.c (block_iter_name_step, block_iter_name_first)
6416         (block_iter_name_next): Delete.
6417         (block_lookup_symbol_primary): Adjust to use
6418         dict_iter_match_first/dict_iter_match_next.
6419         * block.h (block_iter_name_first, block_iter_name_next): Delete
6420         declarations.
6421         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6422         dict_iter_match_first/dict_iter_match_next.
6423
6424 2017-07-20  Pedro Alves  <palves@redhat.com>
6425
6426         * cp-support.c (cp_find_first_component_aux): Add missing case for
6427         end of string.
6428
6429 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6430
6431         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6432         of dwo_cu's dwo_file.
6433
6434 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6435
6436         * remote.c (store_registers_using_G): Remove one line comment.
6437
6438 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6439
6440         * regcache.c (regcache_cpy): Simplify it.
6441         (regcache::cpy_no_passthrough): Remove it.
6442         * regcache.h (cpy_no_passthrough): Remove it.
6443         (regcache_dup, regcache_cpy): Update comments.
6444
6445 2017-07-18  Pedro Alves  <palves@redhat.com>
6446
6447         * remote-sim.c (sim_command_completer): Adjust to work with a
6448         completion_tracker instead of a VEC.
6449
6450 2017-07-17  Pedro Alves  <palves@redhat.com>
6451
6452         * completer.c (complete_source_filenames): New function.
6453         (complete_address_and_linespec_locations): New function.
6454         (location_completer): Use complete_address_and_linespec_locations.
6455         (completion_tracker::build_completion_result): Honor the tracker's
6456         request to suppress append.
6457         * completer.h (completion_tracker::suppress_append_ws)
6458         (completion_tracker::set_suppress_append_ws): New methods.
6459         (completion_tracker::m_suppress_append_ws): New field.
6460         (complete_source_filenames): New declaration.
6461         * linespec.c (linespec_complete_what): New.
6462         (struct ls_parser) <complete_what, completion_word,
6463         completion_quote_char, completion_quote_end, completion_tracker>:
6464         New fields.
6465         (string_find_incomplete_keyword_at_end): New.
6466         (linespec_lexer_lex_string): Record quote char.  If in completion
6467         mode, don't throw.
6468         (linespec_lexer_consume_token): Advance the completion word point.
6469         (linespec_lexer_peek_token): Save/restore completion info.
6470         (save_stream_and_consume_token): New.
6471         (set_completion_after_number): New.
6472         (linespec_parse_basic): Set what to complete next depending on
6473         token.  Handle function and label completions specially.
6474         (parse_linespec): Disable objc shortcut in completion mode.  Set
6475         what to complete next depending on token type.  Skip keyword if in
6476         completion mode.
6477         (complete_linespec_component, linespec_complete): New.
6478         * linespec.h (linespec_complete): Declare.
6479
6480 2017-07-17  Pedro Alves  <palves@redhat.com>
6481
6482         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6483         Handle 'operator<' / 'operator<<'.
6484
6485 2017-07-17  Pedro Alves  <palves@redhat.com>
6486
6487         * completer.c (collect_explicit_location_matches): Handle
6488         MATCH_LABEL.
6489         (convert_explicit_location_to_linespec): New, factored out from
6490         ...
6491         (convert_explicit_location_to_sals): ... this.
6492         (complete_label): New.
6493         (linespec_complete_label, find_label_symbols_in_block): New.
6494         (find_label_symbols): Add completion_mode parameter and adjust to
6495         call find_label_symbols_in_block.
6496         * linespec.h (linespec_complete_label): Declare.
6497
6498 2017-07-17  Pedro Alves  <palves@redhat.com>
6499
6500         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6501         complete_symbol_mode parameter.
6502         * cli/cli-cmds.c (complete_command): Get the completion result out
6503         of the handle_brkchars tracker if used a custom word point.
6504         * completer.c: Include "linespec.h".
6505         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6506         (advance_to_expression_complete_word_point): New.
6507         (completion_tracker::completes_to_completion_word): New.
6508         (complete_files_symbols): Pass down
6509         complete_symbol_mode::EXPRESSION.
6510         (explicit_options, probe_options): New.
6511         (collect_explicit_location_matches): Complete on the
6512         explictit_loc->foo instead of word.  Use
6513         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6514         keyword and options completions.
6515         (backup_text_ptr): Delete.
6516         (skip_keyword): New.
6517         (complete_explicit_location): Remove 'word' parameter.  Add
6518         language, quoted_arg_start and quoted_arg_end parameters.
6519         Rewrite, parsing left to right.
6520         (location_completer): Rewrite.
6521         (location_completer_handle_brkchars): New function.
6522         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6523         (enum complete_line_internal_reason): Adjust comments.
6524         (completion_tracker::discard_completions): New.
6525         (completer_handle_brkchars_func_for_completer): Handle
6526         location_completer.
6527         (gdb_custom_word_point_brkchars)
6528         (gdb_org_rl_basic_quote_characters): New.
6529         (gdb_completion_word_break_characters_throw)
6530         (completion_find_completion_word): Handle trackers that use a
6531         custom word point.
6532         (completion_tracker::advance_custom_word_point_by): New.
6533         (completion_tracker::build_completion_result): Don't rely on
6534         readline appending the quote char.
6535         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6536         use a custom word point.
6537         (gdb_rl_attempted_completion_function): Restore
6538         rl_basic_quote_characters.
6539         * completer.h (class completion_tracker): Extend intro comment.
6540         (completion_tracker::set_quote_char)
6541         (completion_tracker::quote_char)
6542         (completion_tracker::set_use_custom_word_point)
6543         (completion_tracker::use_custom_word_point)
6544         (completion_tracker::custom_word_point)
6545         (completion_tracker::set_custom_word_point)
6546         (completion_tracker::advance_custom_word_point_by)
6547         (completion_tracker::completes_to_completion_word)
6548         (completion_tracker::discard_completions): New methods.
6549         (completion_tracker::m_quote_char)
6550         (completion_tracker::m_use_custom_word_point)
6551         (completion_tracker::m_custom_word_point): New fields.
6552         (advance_to_expression_complete_word_point): Declare.
6553         * f-lang.c (f_collect_symbol_completion_matches): Add
6554         complete_symbol_mode parameter.
6555         * language.h (struct language_defn)
6556         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6557         parameter.
6558         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6559         (linespec_complete_function): New function.
6560         (linespec_lexer_lex_keyword): Adjust.
6561         * linespec.h (linespec_keywords, linespec_complete_function): New
6562         declarations.
6563         * location.c (find_end_quote): New function.
6564         (explicit_location_lex_one): Add explicit_completion_info
6565         parameter.  Save quoting info.  Don't throw if being called for
6566         completion.  Don't handle Ada operators here.
6567         (is_cp_operator, skip_op_false_positives, first_of)
6568         (explicit_location_lex_one_function): New function.
6569         (string_to_explicit_location): Replace 'dont_throw' parameter with
6570         an explicit_completion_info pointer parameter.  Handle it.  Don't
6571         use explicit_location_lex_one to lex function names.  Use
6572         explicit_location_lex_one_function instead.
6573         * location.h (struct explicit_completion_info): New.
6574         (string_to_explicit_location): Replace 'dont_throw' parameter with
6575         an explicit_completion_info pointer parameter.
6576         * symtab.c (default_collect_symbol_completion_matches_break_on):
6577         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6578         (default_collect_symbol_completion_matches)
6579         (collect_symbol_completion_matches): Add complete_symbol_mode
6580         parameter.
6581         (collect_symbol_completion_matches_type): Pass down
6582         complete_symbol_mode::EXPRESSION.
6583         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6584         parameter.  Handle LINESPEC mode.
6585         * symtab.h (complete_symbol_mode): New.
6586         (default_collect_symbol_completion_matches_break_on)
6587         (default_collect_symbol_completion_matches)
6588         (collect_symbol_completion_matches)
6589         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6590         parameter.
6591
6592 2017-07-17  Pedro Alves  <palves@redhat.com>
6593
6594         * utils.c (enum class strncmp_iw_mode): New.
6595         (strcmp_iw): Rename to ...
6596         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6597         parameters.  Handle them.
6598         (strncmp_iw): New.
6599         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6600         * utils.h (strncmp_iw): Declare.
6601         (strcmp_iw): Move describing comments here.
6602
6603 2017-07-17  Pedro Alves  <palves@redhat.com>
6604
6605         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6606         CP_OPERATOR_STR.
6607         * c-typeprint.c (is_type_conversion_operator): Use
6608         CP_OPERATOR_STR.
6609         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6610         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6611         CP_OPERATOR_LEN.
6612         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6613         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6614         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6615         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6616         CP_OPERATOR_STR.
6617         * location.c: Include "cp-support.h".
6618         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6619         CP_OPERATOR_STR.
6620         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6621         CP_OPERATOR_LEN.
6622
6623 2017-07-17  Pedro Alves  <palves@redhat.com>
6624
6625         * cli/cli-cmds.c (complete_command): Use a completion tracker
6626         along with completion_find_completion_word for handle_brkchars
6627         phase.
6628         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6629         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6630         (struct gdb_rl_completion_word_info): New.
6631         (gdb_rl_find_completion_word): New.
6632         (completion_find_completion_word): New.
6633         * completer.h (completion_find_completion_word): Declare.
6634
6635 2017-07-17  Pedro Alves  <palves@redhat.com>
6636
6637         * ada-lang.c (symbol_completion_match): Adjust comments.
6638         (symbol_completion_add): Replace vector parameter with
6639         completion_tracker parameter.  Use it.
6640         (ada_make_symbol_completion_list): Rename to...
6641         (ada_collect_symbol_completion_matches): ... this.  Add
6642         completion_tracker parameter and use it.
6643         (ada_language_defn): Adjust.
6644         * break-catch-syscall.c (catch_syscall_completer): Adjust
6645         prototype and work with completion_tracker instead of VEC.
6646         * breakpoint.c (condition_completer): Adjust prototype and work
6647         with completion_tracker instead of VEC.
6648         * c-lang.c (c_language_defn, cplus_language_defn)
6649         (asm_language_defn, minimal_language_defn): Adjust to renames.
6650         * cli/cli-cmds.c (complete_command): Rework using
6651         completion_tracker.  Catch exceptions when completing.
6652         * cli/cli-decode.c (integer_unlimited_completer)
6653         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6654         with completion_tracker instead of VEC.
6655         * command.h (struct completion_tracker): Forward declare.
6656         (completer_ftype, completer_handle_brkchars_ftype): Change
6657         types.
6658         (complete_on_cmdlist, complete_on_enum): Adjust.
6659         * completer.c: Include <algorithm>.
6660         (struct gdb_completer_state): New.
6661         (current_completion): New global.
6662         (readline_line_completion_function): Delete.
6663         (noop_completer, filename_completer)
6664         (filename_completer_handle_brkchars, complete_files_symbols)
6665         (linespec_location_completer): Adjust to work with a
6666         completion_tracker instead of a VEC.
6667         (string_or_empty): New.
6668         (collect_explicit_location_matches): Adjust to work with a
6669         completion_tracker instead of a VEC.
6670         (explicit_location_completer): Rename to ...
6671         (complete_explicit_location): ... this and adjust to work with a
6672         completion_tracker instead of a VEC.
6673         (location_completer): Adjust to work with a completion_tracker
6674         instead of a VEC.
6675         (add_struct_fields): Adjust to work with a completion_list instead
6676         of VEC.
6677         (expression_completer): Rename to ...
6678         (complete_expression): ... this and adjust to work with a
6679         completion_tracker instead of a VEC.  Use complete_files_symbols.
6680         (expression_completer): Reimplement on top of complete_expression.
6681         (symbol_completer): Adjust to work with a completion_tracker
6682         instead of a VEC.
6683         (enum complete_line_internal_reason): Add describing comments.
6684         (complete_line_internal_normal_command): Adjust to work with a
6685         completion_tracker instead of a VEC.
6686         (complete_line_internal): Rename to ...
6687         (complete_line_internal_1): ... this and adjust to work with a
6688         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6689         handle_brkchars phase.
6690         (new_completion_tracker): Delete.
6691         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6692         complete_line_internal_1.
6693         (free_completion_tracker): Delete.
6694         (INITIAL_COMPLETION_HTAB_SIZE): New.
6695         (completion_tracker::completion_tracker)
6696         (completion_tracker::~completion_tracker): New.
6697         (maybe_add_completion): Delete.
6698         (completion_tracker::maybe_add_completion)
6699         (completion_tracker::add_completion)
6700         (completion_tracker::add_completions): New.
6701         (throw_max_completions_reached_error): Delete.
6702         (complete_line): Adjust to work with a completion_tracker instead
6703         of a VEC.  Don't create a completion_tracker_t or check for max
6704         completions here.
6705         (command_completer, command_completer_handle_brkchars)
6706         (signal_completer, reg_or_group_completer_1)
6707         (reg_or_group_completer, default_completer_handle_brkchars):
6708         Adjust to work with a completion_tracker.
6709         (gdb_completion_word_break_characters_throw): New.
6710         (gdb_completion_word_break_characters): Reimplement.
6711         (line_completion_function): Delete.
6712         (completion_tracker::recompute_lowest_common_denominator)
6713         (expand_preserving_ws)
6714         (completion_tracker::build_completion_result)
6715         (completion_result::completion_result)
6716         (completion_result::completion_result)
6717         (completion_result::~completion_result)
6718         (completion_result::completion_result)
6719         (completion_result::release_match_list, compare_cstrings)
6720         (completion_result::sort_match_list)
6721         (completion_result::reset_match_list)
6722         (gdb_rl_attempted_completion_function_throw)
6723         (gdb_rl_attempted_completion_function): New.
6724         * completer.h (completion_list, struct completion_result)
6725         (class completion_tracker): New.
6726         (complete_line): Add completion_tracker parameter.
6727         (readline_line_completion_function): Delete.
6728         (gdb_rl_attempted_completion_function): New.
6729         (noop_completer, filename_completer, expression_completer)
6730         (location_completer, symbol_completer, command_completer)
6731         (signal_completer, reg_or_group_completer): Update prototypes.
6732         (completion_tracker_t, new_completion_tracker)
6733         (make_cleanup_free_completion_tracker): Delete.
6734         (enum maybe_add_completion_enum): Delete.
6735         (maybe_add_completion): Delete.
6736         (throw_max_completions_reached_error): Delete.
6737         * corefile.c (complete_set_gnutarget): Adjust to work with a
6738         completion_tracker instead of a VEC.
6739         * cp-abi.c (cp_abi_completer): Adjust to work with a
6740         completion_tracker instead of a VEC.
6741         * d-lang.c (d_language_defn): Adjust.
6742         * disasm.c (disassembler_options_completer): Adjust to work with a
6743         completion_tracker instead of a VEC.
6744         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6745         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6746         with a completion_tracker instead of a VEC.
6747         (f_language_defn): Adjust.
6748         * go-lang.c (go_language_defn): Adjust.
6749         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6750         Adjust to work with a completion_tracker instead of a VEC.
6751         * infrun.c (handle_completer): Likewise.
6752         * interps.c (interpreter_completer): Likewise.
6753         * interps.h (interpreter_completer): Likewise.
6754         * language.c (unknown_language_defn, auto_language_defn)
6755         (local_language_defn): Adjust.
6756         * language.h (language_defn::la_make_symbol_completion_list):
6757         Rename to ...
6758         (language_defn::la_collect_symbol_completion_matches): ... this
6759         and adjust to work with a completion_tracker instead of a VEC.
6760         * m2-lang.c (m2_language_defn): Adjust.
6761         * objc-lang.c (objc_language_defn): Adjust.
6762         * opencl-lang.c (opencl_language_defn): Adjust.
6763         * p-lang.c (pascal_language_defn): Adjust.
6764         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6765         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6766         with a completion_tracker.
6767         * rust-lang.c (rust_language_defn): Adjust.
6768         * symtab.c (free_completion_list, do_free_completion_list)
6769         (return_val, completion_tracker): Delete.
6770         (completion_list_add_name, completion_list_add_symbol)
6771         (completion_list_add_msymbol, completion_list_objc_symbol)
6772         (completion_list_add_fields, add_symtab_completions): Add
6773         completion_tracker parameter and use it.
6774         (default_make_symbol_completion_list_break_on_1): Rename to...
6775         (default_collect_symbol_completion_matches_break_on): ... this.
6776         Add completion_tracker parameter and use it instead of allocating
6777         a completion tracker here.
6778         (default_make_symbol_completion_list_break_on): Delete old
6779         implementation.
6780         (default_make_symbol_completion_list): Delete.
6781         (default_collect_symbol_completion_matches): New.
6782         (make_symbol_completion_list): Delete.
6783         (collect_symbol_completion_matches): New.
6784         (make_symbol_completion_type): Rename to ...
6785         (collect_symbol_completion_matches_type): ... this.  Add
6786         completion_tracker parameter and use it instead of VEC.
6787         (make_file_symbol_completion_list_1): Rename to...
6788         (collect_file_symbol_completion_matches): ... this.  Add
6789         completion_tracker parameter and use it instead of VEC.
6790         (make_file_symbol_completion_list): Delete.
6791         (add_filename_to_list): Use completion_list instead of a VEC.
6792         (add_partial_filename_data::list): Now a completion_list.
6793         (make_source_files_completion_list): Work with a completion_list
6794         instead of a VEC.
6795         * symtab.h: Include "completer.h".
6796         (default_make_symbol_completion_list_break_on)
6797         (default_make_symbol_completion_list, make_symbol_completion_list)
6798         (make_symbol_completion_type, make_file_symbol_completion_list)
6799         (make_source_files_completion_list): Delete.
6800         (default_collect_symbol_completion_matches_break_on)
6801         (default_collect_symbol_completion_matches)
6802         (collect_symbol_completion_matches)
6803         (collect_symbol_completion_matches_type)
6804         (collect_file_symbol_completion_matches)
6805         (make_source_files_completion_list): New.
6806         * top.c (init_main): Don't install a rl_completion_entry_function
6807         hook.  Install a rl_attempted_completion_function hook instead.
6808         * tui/tui-layout.c (layout_completer): Adjust to work with a
6809         completion_tracker.
6810         * tui/tui-regs.c (tui_reggroup_completer):
6811         * tui/tui-win.c (window_name_completer, focus_completer)
6812         (winheight_completer): Adjust to work with a completion_tracker.
6813         * value.c: Include "completer.h".
6814         (complete_internalvar): Adjust to work with a completion_tracker.
6815         * value.h (complete_internalvar): Likewise.
6816
6817 2017-07-17  Pedro Alves  <palves@redhat.com>
6818
6819         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6820         renames.
6821         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6822         comments to completer_ftype's declaration.
6823         <completer_handle_brkchars>: Change type to
6824         completer_handle_brkchars_ftype.
6825         * command.h (completer_ftype): Add describing comment and give
6826         names to parameters.
6827         (completer_ftype_void): Rename to ...
6828         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6829         (set_cmd_completer_handle_brkchars): Adjust.
6830         * completer.c (filename_completer_handle_brkchars): New function.
6831         (complete_line_internal_normal_command): New function, factored
6832         out from ...
6833         (complete_line_internal): ... here.
6834         (command_completer_handle_brkchars)
6835         (default_completer_handle_brkchars)
6836         (completer_handle_brkchars_func_for_completer): New functions.
6837         * completer.h (set_gdb_completion_word_break_characters): Delete
6838         declaration.
6839         (completer_handle_brkchars_func_for_completer): New declaration.
6840         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6841         completer_handle_brkchars_func_for_completer.
6842
6843 2017-07-17  Pedro Alves  <palves@redhat.com>
6844
6845         * completer.c (symbol_completer): New function, based on
6846         make_symbol_completion_list_fn.
6847         * completer.h (symbol_completer): New declaration.
6848         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6849         * python/py-cmd.c (completers): Adjust.
6850         * symtab.c (make_symbol_completion_list_fn): Delete.
6851         * symtab.h (make_symbol_completion_list_fn): Delete.
6852         * cli/cli-decode.c (add_cmd): Adjust.
6853
6854 2017-07-17  Pedro Alves  <palves@redhat.com>
6855
6856         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6857         * dwarf2read.c: Include "filename-seen-cache.h".
6858         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6859         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6860         * filename-seen-cache.c: New file.
6861         * filename-seen-cache.h: New file.
6862         * symtab.c: Include "filename-seen-cache.h".
6863         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6864         (create_filename_seen_cache, clear_filename_seen_cache)
6865         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6866         to filename-seen-cache.h/filename-seen-cache.c.
6867         (output_source_filename, sources_info)
6868         (maybe_add_partial_symtab_filename)
6869         (make_source_files_completion_list): Adjust to use
6870         filename_seen_cache.
6871
6872 2017-07-17  Pedro Alves  <palves@redhat.com>
6873
6874         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6875         fields.
6876         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6877         dwarf2_debug_sections*)): New.
6878         (dwarf2_per_objfile::dwarf2_per_objfile(const
6879         dwarf2_per_objfile&)): Declare as deleted.
6880         (dwarf2_per_objfile::operator=): Declare as deleted.
6881         (dwarf2_per_objfile::dwarf2_per_objfile)
6882         (dwarf2_per_objfile::~dwarf2_per_objfile)
6883         (dwarf2_per_objfile::free_cached_comp_units): New.
6884         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6885         ctor.  Call dwarf2_per_objfile's ctor manually.
6886         (dwarf2_locate_sections): Deleted/refactored as ...
6887         (dwarf2_per_objfile::locate_sections): ... this new method.
6888         (free_cached_comp_units): Defer to
6889         dwarf2_per_objfile::free_cached_comp_units.
6890         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6891
6892 2017-07-14  Tom Tromey  <tom@tromey.com>
6893
6894         PR rust/21764:
6895         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6896         parameter.
6897         <UNOP_SIZEOF>: Split into separate case.
6898         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6899
6900 2017-07-14  Tom Tromey  <tom@tromey.com>
6901
6902         PR rust/21763:
6903         * symtab.c (symbol_matches_domain): Add language_rust to special
6904         case.
6905         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6906         treat LOC_TYPEDEF symbols as variables.
6907
6908 2017-07-14  Pedro Alves  <palves@redhat.com>
6909
6910         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6911         symtabs matching all symtabs with SRCFILE as file name instead of
6912         only considering the first hit, with lookup_symtab.
6913
6914 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6915
6916         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6917         operator_name parameters.
6918         (gen_expr): Update function call.
6919
6920 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6921
6922         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6923         parameter.
6924         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6925         Likewise.
6926         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6927         parameter, use agent_expr::gdbarch instead, update function
6928         calls.
6929         (locexpr_tracepoint_var_ref): Likewise.
6930         (loclist_tracepoint_var_ref): Likewise.
6931         * ax-gdb.c (gen_trace_static_fields): Likewise.
6932         (gen_traced_pop): Likewise.
6933         (gen_frame_args_address): Likewise.
6934         (gen_frame_locals_address): Likewise.
6935         (gen_var_ref): Likewise.
6936         (gen_struct_ref_recursive): Likewise.
6937         (gen_static_field): Likewise.
6938         (gen_maybe_namespace_elt): Likewise.
6939         (gen_expr): Likewise.
6940         (gen_trace_for_var): Likewise.
6941         (gen_trace_for_expr): Likewise.
6942         (gen_trace_for_return_address): Likewise.
6943
6944 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6945
6946         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6947         parameter.
6948         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6949
6950 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6951
6952         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6953         from ax, update calls.
6954         (gen_usual_arithmetic): Likewise.
6955         (gen_integral_promotions): Likewise.
6956         (gen_bitfield_ref): Likewise.
6957         (gen_primitive_field): Likewise.
6958         (gen_struct_ref_recursive): Likewise.
6959         (gen_struct_ref): Likewise.
6960         (gen_maybe_namespace_elt): Likewise.
6961         (gen_struct_elt_for_reference): Likewise.
6962         (gen_namespace_elt): Likewise.
6963         (gen_aggregate_elt_ref): Likewise.
6964         (gen_expr): Get gdbarch from ax, update calls.
6965         (gen_expr_binop_rest): Likewise.
6966
6967 2017-07-13  Pedro Alves  <palves@redhat.com>
6968
6969         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6970         as default tdesc.
6971         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6972         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6973         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6974         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6975         tdep.
6976         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6977         Get final tdesc from the tdep.
6978         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6979         default tdesc.
6980         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6981         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6982         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6983         Use it as default tdesc.
6984         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6985         down to amd_init_abi.  No longer handle fallback tdesc here.
6986         * amd64-tdep.h (tdesc_x32): Declare.
6987         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6988         parameter.
6989         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6990         as default tdesc.
6991
6992 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6993
6994         * s390-linux-tdep.c (s390_process_record): Add support for
6995         instructions new in arch12.
6996
6997 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6998
6999         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7000         PT_GETFSBASE and PT_GETGSBASE.
7001         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7002         PT_SETGSBASE.
7003
7004 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7005
7006         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7007         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7008         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7009         those rules.
7010         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7011         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7012         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7013         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7014         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7015         * features/i386/amd64.xml: Add 64bit-segments.xml.
7016         * features/i386/amd64-avx-avx512.c: Regenerated.
7017         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7018         * features/i386/amd64-avx-mpx.c: Regenerated.
7019         * features/i386/amd64-avx.c: Regenerated.
7020         * features/i386/amd64-mpx.c: Regenerated.
7021         * features/i386/amd64.c: Regenerated.
7022         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7023         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7024         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7025         * regformats/i386/amd64-avx.dat: Regenerated.
7026         * regformats/i386/amd64-mpx.dat: Regenerated.
7027         * regformats/i386/amd64.dat: Regenerated.
7028
7029 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7030
7031         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7032         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7033
7034 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7035
7036         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7037         unsetenv.
7038         * gnulib/aclocal.m4: Regenerate.
7039         * gnulib/config.in: Regenerate.
7040         * gnulib/configure: Regenerate.
7041         * gnulib/import/Makefile.am: Regenerate.
7042         * gnulib/import/Makefile.in: Regenerate.
7043         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7044         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7045         * gnulib/import/m4/environ.m4: New file.
7046         * gnulib/import/m4/setenv.m4: New file.
7047         * gnulib/import/setenv.c: New file.
7048         * gnulib/import/unsetenv.c: New file.
7049
7050 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7051
7052         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7053         address when op is DW_OP_addr.
7054
7055 2017-07-09  Tom Tromey  <tom@tromey.com>
7056
7057         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7058         check and apply to outer type.
7059
7060 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7061
7062         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7063         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7064         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7065         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7066
7067 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7068
7069         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7070
7071 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7072
7073         * corelow.c (get_core_siginfo): Remove.
7074         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7075         instead of get_core_siginfo.
7076         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7077         * gdbarch.h: Re-generate.
7078         * gdbarch.c: Re-generate.
7079         * linux-tdep.c (linux_core_xfer_siginfo): New.
7080         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7081
7082 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7083
7084         * corelow.c (thread_section_name): Move to ...
7085         * gdbcore.h (thread_section_name): ... here.
7086
7087 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7088
7089         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7090         (struct siginfo32): New.
7091         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7092         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7093         via ptrace(PT_LWPINFO).
7094
7095 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7096
7097         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7098         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7099         (fbsd_get_siginfo_type): New.
7100         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7101         (_initialize_fbsd_tdep): New.
7102
7103 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7104
7105         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7106         a singular dwo_unit*) to support multiple CUs in the same way that
7107         multiple TUs are supported.
7108         (create_cus_hash_table): Replace create_dwo_cu with a function for
7109         parsing multiple CUs from a DWO file.
7110         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7111         create_dwo_cu.
7112         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7113         htab_find, rather than comparing the signature to a singleton CU in
7114         the dwo_file.
7115
7116 2017-07-06  Pedro Alves  <palves@redhat.com>
7117
7118         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7119
7120 2017-07-04  Pedro Alves  <palves@redhat.com>
7121
7122         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7123         * gdbtypes.h (TYPE_STATIC): Delete.
7124         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7125         is_synchronized, is_native>: Delete.
7126         <dummy>: Bump.
7127         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7128         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7129         (TYPE_FN_FIELD_ABSTRACT): Delete.
7130
7131 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7132
7133         * buffer.h (buffer_finish): Fix spelling mistakes.
7134
7135 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7136
7137         * .dir-locals.el: Automatically switch to C-style comments in
7138         versions of Emacs that support the feature.
7139
7140 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7141             Pedro Alves  <palves@redhat.com>
7142
7143         PR cli/21688
7144         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7145         (process_next_line): New variable 'inline_cmd'.
7146         Adjust 'if' clauses for "python", "compile" and "guile" to use
7147         'command_name_equals' and check for '!inline_cmd'.
7148
7149 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7150
7151         PR cli/21688
7152         * cli/cli-script.c (command_name_equals_not_inline): New function.
7153         (process_next_line): Adjust 'if' clauses for "python", "compile"
7154         and "guile" to use command_name_equals_not_inline.
7155
7156 2017-06-29  Pedro Alves  <palves@redhat.com>
7157
7158         * completer.c (expression_completer): Call
7159         linespec_location_completer instead of location_completer.
7160
7161 2017-06-29  Pedro Alves  <palves@redhat.com>
7162
7163         * completer.c (expression_completer): Remove code that recomputes
7164         'text' from 'word'.
7165
7166 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7167
7168         * regformats/regdat.sh: Generate code with
7169         "ifndef IN_PROCESS_AGENT".
7170
7171 2017-06-28  Pedro Alves  <palves@redhat.com>
7172
7173         * command.h: Include "common/scoped_restore.h".
7174
7175 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7176
7177         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7178         instead of obstack_grow.
7179
7180 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7181
7182         PR gdb/21337
7183         * symfile.c (reread_symbols): Call objfiles_changed just before
7184         read_symbols.
7185
7186 2017-06-27  Pedro Alves  <palves@redhat.com>
7187
7188         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7189         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7190         (completion_list_add_symbol, completion_list_add_msymbol):
7191         ... these new functions.
7192         (add_symtab_completions)
7193         (default_make_symbol_completion_list_break_on_1): Adjust.
7194
7195 2017-06-27  Pedro Alves  <palves@redhat.com>
7196
7197         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7198         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7199         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7200         dtor.
7201         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7202         'storage_obstack' field an auto_obstack.  In-class initialize all
7203         non-bitfield fields.  Make minsyms_read bool.
7204         * symfile.c (read_symbols): Adjust.
7205
7206 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7207
7208         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7209         (gdbsim_store_register): Likewise.
7210
7211 2017-06-27  Pedro Alves  <palves@redhat.com>
7212
7213         * c-exp.y (name_obstack): Now an auto_obstack.
7214         (yylex): Use auto_obstack::clear.
7215         (c_parse): Use auto_obstack::clear instead of reinitializing and
7216         freeing the obstack.
7217         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7218         * d-exp.y (name_obstack): Now an auto_obstack.
7219         (yylex): Use auto_obstack::clear.
7220         (d_parse): Use auto_obstack::clear instead of reinitializing and
7221         freeing the obstack.
7222         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7223         auto_obstack.
7224         * dwarf2read.c (create_addrmap_from_index)
7225         (dwarf2_build_psymtabs_hard)
7226         (update_enumeration_type_from_children): Likewise.
7227         * gdb_obstack.h (auto_obstack): New type.
7228         * go-exp.y (name_obstack): Now an auto_obstack.
7229         (build_packaged_name): Use auto_obstack::clear.
7230         (go_parse): Use auto_obstack::clear instead of reinitializing and
7231         freeing the obstack.
7232         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7233         auto_obstack.
7234         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7235         * rust-exp.y (work_obstack): Now an auto_obstack.
7236         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7237         reinitializing and freeing the obstack.
7238         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7239         (host_char_to_target): Use auto_obstack.
7240         * utils.h (make_cleanup_obstack_free): Delete declaration.
7241         * valprint.c (generic_emit_char, generic_printstr): Use
7242         auto_obstack.
7243
7244 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7245
7246         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7247         thread.
7248         (darwin_init_thread_list): Don't update dummy thread.
7249         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7250
7251 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7252
7253         * record-full.c (netorder16): Remove.
7254
7255 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7256
7257         * common/diagnostics.h: Define macros for GCC.
7258         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7259         * common/vec.h: Include diagnostics.h.
7260         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7261         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7262         warning.
7263
7264 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7265
7266         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7267         New macro.
7268         * ada-lex.l: Ignore deprecated register warnings.
7269
7270 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7271
7272         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7273         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7274
7275 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7276
7277         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7278         its own line.
7279
7280 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7281
7282         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7283
7284 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7285
7286         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7287         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7288         (xtensa_register_read_masked): Likewise.
7289
7290 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7291
7292         * common/environ.c (gdb_environ::unset): Update comment.
7293
7294 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7295
7296         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7297         registers.
7298
7299 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7300
7301         * record-full.c (record_full_exec_insn): Use byte_vector.
7302
7303 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7304
7305         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7306         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7307
7308 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7309
7310         * remote.c (cached_reg): Move from here...
7311         * regcache.h (cached_reg): ...to here.
7312         * python/py-unwind.c (struct reg_info): Remove.
7313         (cached_frame_info): Use cached_reg_t.
7314         (pyuw_prev_register): Likewise.
7315         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7316         (pyuw_dealloc_cache): Free all registers.
7317
7318 2017-06-22  Pedro Alves  <palves@redhat.com>
7319             Simon Marchi  <simon.marchi@ericsson.com>
7320
7321         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7322         warning.
7323         * common/diagnostics.h: New file.
7324
7325 2017-06-22  Pedro Alves  <palves@redhat.com>
7326
7327         * common/agent.h: Add include guards.
7328
7329 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7330
7331         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7332         talk about addressable units instead of bytes.
7333
7334 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7335
7336         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7337         of '::const_iterator'.
7338
7339 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7340
7341         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7342         'unittests/environ-selftests.c'.
7343         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7344         * charset.c (find_charset_names): Declare object 'iconv_env'.
7345         Update code to use 'iconv_env' object.  Remove call to
7346         'free_environ'.
7347         * common/environ.c: Include <utility>.
7348         (make_environ): Delete function.
7349         (free_environ): Delete function.
7350         (gdb_environ::clear): New function.
7351         (gdb_environ::operator=): New function.
7352         (gdb_environ::get): Likewise.
7353         (environ_vector): Delete function.
7354         (set_in_environ): Delete function.
7355         (gdb_environ::set): New function.
7356         (unset_in_environ): Delete function.
7357         (gdb_environ::unset): New function.
7358         (gdb_environ::envp): Likewise.
7359         * common/environ.h: Include <vector>.
7360         (struct gdb_environ): Delete; transform into...
7361         (class gdb_environ): ... this class.
7362         (free_environ): Delete prototype.
7363         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7364         environ_vector): Likewise.
7365         * infcmd.c (run_command_1): Update code to call
7366         'envp' from 'gdb_environ' class.
7367         (environment_info): Update code to call methods from 'gdb_environ'
7368         class.
7369         (unset_environment_command): Likewise.
7370         (path_info): Likewise.
7371         (path_command): Likewise.
7372         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7373         (inferior::inferior): Initialize 'environment' using the host's
7374         information.
7375         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7376         Include "environ.h".
7377         (class inferior) <environment>: Change type from 'struct
7378         gdb_environ' to 'gdb_environ'.
7379         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7380         methods from 'gdb_environ' class.
7381         * solib.c (solib_find_1): Likewise
7382         * unittests/environ-selftests.c: New file.
7383
7384 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7385
7386         * features/i386/i386-linux.xml: Exchange the order of including
7387         32bit-linux.xml and 32bit-sse.xml.
7388         * features/i386/i386-linux.c: Regenerated.
7389
7390 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7391
7392         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7393         Delete copy ctor and assignment operator.
7394         (tdesc_type): Likewise.
7395         (tdesc_feature): Likewise.
7396         (tdesc_free_reg): Remove.
7397         (tdesc_create_reg): Use new.
7398         (tdesc_free_type): Remove.
7399         (tdesc_create_vector): Use new.
7400         (tdesc_create_union): Likewise.
7401         (tdesc_create_flags): Likewise.
7402         (tdesc_create_enum): Likewise.
7403         (tdesc_free_feature): Delete.
7404         (free_target_description): Use delete.
7405
7406 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7407
7408         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7409         registers.
7410
7411 2017-06-19  Pedro Alves  <palves@redhat.com>
7412
7413         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7414         after gdb::unlinker.
7415
7416 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7417
7418         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7419         gdb_environ to access an environment variable.
7420
7421 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7422
7423         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7424         gdb_byte*.
7425
7426 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7429
7430 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7431
7432         * configure: Re-generate.
7433         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7434
7435 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7436
7437         * configure: Re-generate.
7438         * warning.m4: Pass -Werror to compiler when checking for
7439         supported warning flags.
7440
7441 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7442
7443         * Makefile.in (COMPILE.pre): Add "-x c++".
7444
7445 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7446             Pedro Alves  <palves@redhat.com>
7447             Yao Qi  <yao.qi@linaro.org>
7448
7449         * defs.h (RequireLongest): New.
7450         (extract_integer): Declare function template.
7451         (extract_signed_integer): Remove the declaration, but define it
7452         static inline.
7453         (extract_unsigned_integer): Likewise.
7454         (store_integer): Declare function template.
7455         (store_signed_integer): Remove the declaration, but define it
7456         static inline.
7457         (store_unsigned_integer): Likewise.
7458         * findvar.c (extract_integer): New function template.
7459         (extract_signed_integer): Remove.
7460         (extract_unsigned_integer): Remove.
7461         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7462         instantiations.
7463         (store_integer): New function template.
7464         (store_signed_integer): Remove.
7465         (store_unsigned_integer): Remove.
7466         (store_integer): Explicit instantiations.
7467         * regcache.c (regcache_raw_read_signed): Update.
7468         (regcache::raw_read): New function.
7469         (regcache::raw_read_signed): Remove.
7470         (regcache::raw_read_unsigned): Remove.
7471         (regcache_raw_read_unsigned): Update.
7472         (regcache_raw_write_unsigned): Update.
7473         (regcache::raw_write_signed): Remove.
7474         (regcache::raw_write): New function.
7475         (regcache_cooked_read_signed): Update.
7476         (regcache::raw_write_unsigned): Remove.
7477         (regcache::cooked_read_signed): Remove.
7478         (regcache_cooked_read_unsigned): Update.
7479         (regcache::cooked_read_unsigned): Remove.
7480         (regcache_cooked_write_signed): Update.
7481         (regcache_cooked_write_unsigned): Update.
7482         * regcache.h (regcache) <raw_read_signed>: Remove.
7483         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7484         <raw_read, raw_write>: New.
7485         <cooked_read_signed, cooked_write_signed>: Remove.
7486         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7487         <cooked_read, cooked_write>: New.
7488         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7489         (sh64_pseudo_register_write): Update.
7490
7491 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7492
7493         * arc-tdep.c (arc_disassembler_options): New variable.
7494         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7495         of default_print_insn.
7496         (arc_delayed_print_insn): Set info->section when needed,
7497         use default_print_insn to retrieve a disassembler.
7498
7499 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7500
7501         PR gdb/21574
7502         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7503         to mention $SHELL and startup-with-shell.
7504
7505 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7506
7507         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7508
7509 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7510
7511         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7512         default_print_insn instead of print_insn_aarch64.
7513         * arm-tdep.c (gdb_print_insn_arm): Call
7514         default_print_insn instead of print_insn_big_arm
7515         and print_insn_little_arm.
7516         * i386-tdep.c (i386_print_insn): Call default_print_insn
7517         instead of print_insn_i386.
7518         * ia64-tdep.c (ia64_print_insn): Call
7519         default_print_insn instead of print_insn_ia64.
7520         * mips-tdep.c (gdb_print_insn_mips): Call
7521         default_print_insn instead of print_insn_big_mips
7522         and print_insn_little_mips.
7523         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7524         instead of print_insn_spu.
7525
7526 2017-06-14  Pedro Alves  <palves@redhat.com>
7527
7528         * ada-lang.c: Include "common/byte-vector.h".
7529         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7530         * charset.c (wchar_iterator::iterate): Resize the vector instead
7531         of reserving it.
7532         * common/byte-vector.h: Include "common/def-vector.h".
7533         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7534         * cli/cli-dump.c: Include "common/byte-vector.h".
7535         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7536         * common/byte-vector.h: New file.
7537         * common/def-vector.h: New file.
7538         * common/default-init-alloc.h: New file.
7539         * dwarf2loc.c: Include "common/byte-vector.h".
7540         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7541         instead of reserving it.
7542         * dwarf2read.c: Include "common/byte-vector.h".
7543         (data_buf::m_vec): Now a gdb::byte_vector.
7544         * gdb_regex.c: Include "common/def-vector.h".
7545         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7546         * mi/mi-main.c: Include "common/byte-vector.h".
7547         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7548         * printcmd.c: Include "common/byte-vector.h".
7549         (print_scalar_formatted): Use gdb::byte_vector.
7550         * valprint.c: Include "common/byte-vector.h".
7551         (maybe_negate_by_bytes, print_decimal_chars): Use
7552         gdb::byte_vector.
7553
7554 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7555
7556         * darwin-nat.c: Include "nat/fork-inferior.h".
7557
7558 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * configure.nat: Factor out Darwin bits that are not
7561         architecture-specific.  Add fork-inferior.o.
7562
7563 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7564
7565         * configure.nat: Factor out AIX bits that are not
7566         architecture-specific.  Add fork-inferior.o.
7567
7568 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7569
7570         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7571         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7572         wrappers that just call rw_pieced_value.
7573
7574 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7575
7576         * dwarf2loc.c (write_pieced_value): When writing the data for a
7577         memory piece, use write_memory_with_notification instead of
7578         write_memory.
7579
7580 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7581
7582         * valops.c (read_value_memory): Change embedded_offset to
7583         represent a bit offset instead of a byte offset.
7584         * value.h (read_value_memory): Adjust comment.
7585
7586 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7587
7588         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7589         dest_offset_bits and source_offset_bits.
7590         (write_pieced_value): Likewise.
7591
7592 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7593
7594         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7595         given by DW_OP_bit_piece.
7596         (write_pieced_value): Likewise.
7597
7598 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7599
7600         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7601         some other preparations to the places where sufficient information
7602         is available.
7603         (write_pieced_value): Likewise.
7604
7605 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7606
7607         * dwarf2loc.c (bits_to_bytes): New function.
7608         (read_pieced_value): Fix offset calculations for register pieces
7609         on big-endian targets.
7610         (write_pieced_value): Likewise.
7611
7612 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7613
7614         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7615         (write_pieced_value): Likewise.
7616
7617 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7618
7619         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7620         transfer the source value's least significant bits, instead of its
7621         lowest-addressed ones.  Rename type_len to max_offset.
7622         (read_pieced_value): Mirror above changes to write_pieced_value as
7623         applicable.
7624
7625 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7626
7627         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7628         truncate full bytes from dest_offset_bits before using it as an
7629         offset into the buffer.
7630
7631 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7632
7633         * dwarf2loc.c (write_pieced_value): Include transfer size in
7634         byte-wise check.
7635
7636 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7637
7638         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7639         calculation of this_size.
7640
7641 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7642
7643         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7644         when targeting a bit-field.
7645         (write_pieced_value): Likewise.
7646
7647 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7648
7649         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7650         (allocate_piece_closure): Drop addr_size parameter.
7651         (dwarf2_evaluate_loc_desc_full): Adjust call to
7652         allocate_piece_closure.
7653
7654 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7655
7656         PR gdb/21226
7657         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7658         the LSB end, independent of endianness.
7659
7660 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7661
7662         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7663         size capping.
7664
7665 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7666
7667         * mips-linux-nat.c: Move include features/mips*-linux.c to
7668         mips-linux-tdep.c.
7669         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7670         to mips-linux-tdep.c.
7671         * mips-linux-tdep.c: Include features/mips*-linux.c
7672         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7673         functions.
7674         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7675         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7676         (tdesc_mips64_dsp_linux): Declare.
7677
7678 2017-06-12  Tom Tromey  <tom@tromey.com>
7679
7680         * valprint.h (val_print_type_code_int): Remove.
7681         * valprint.c (generic_val_print_int): Always call
7682         val_print_scalar_formatted.
7683         (val_print_type_code_int): Remove.
7684         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7685         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7686         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7687         * ada-valprint.c (ada_val_print_num): Use
7688         val_print_scalar_formatted.
7689
7690 2017-06-12  Tom Tromey  <tom@tromey.com>
7691
7692         * printcmd.c (print_scalar_formatted): Unify the two switches.
7693         Don't convert scalars to LONGEST.
7694
7695 2017-06-12  Tom Tromey  <tom@tromey.com>
7696
7697         PR exp/16225:
7698         * valprint.h (print_decimal_chars): Update.
7699         * valprint.c (maybe_negate_by_bytes): New function.
7700         (print_decimal_chars): Add "is_signed" argument.
7701         * printcmd.c (print_scalar_formatted): Update.
7702
7703 2017-06-12  Tom Tromey  <tom@tromey.com>
7704
7705         PR exp/16225:
7706         * valprint.h (print_binary_chars, print_hex_chars): Update.
7707         * valprint.c (val_print_type_code_int): Update.
7708         (print_binary_chars): Add "zero_pad" argument.
7709         (emit_octal_digit): New function.
7710         (print_octal_chars): Don't zero-pad.
7711         (print_decimal_chars): Likewise.
7712         (print_hex_chars): Add "zero_pad" argument.
7713         * sh64-tdep.c (sh64_do_fp_register): Update.
7714         * regcache.c (regcache::dump): Update.
7715         * printcmd.c (print_scalar_formatted): Update.
7716         * infcmd.c (default_print_one_register_info): Update.
7717
7718 2017-06-12  Pedro Alves  <palves@redhat.com>
7719             Alan Hayward  <alan.hayward@arm.com>
7720
7721         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7722         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7723         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7724         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7725         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7726
7727 2017-06-12  Pedro Alves  <palves@redhat.com>
7728
7729         * dwarf2read.c (mapped_symtab::data): Now a vector of
7730         symtab_index_entry instead of vector of
7731         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7732         whether an element's name is NULL instead of checking whether the
7733         element itself is NULL.
7734         (find_slot): Change return type.  Adjust.
7735         (hash_expand, , add_index_entry, uniquify_cu_indices)
7736         (write_hash_table): Adjust.
7737
7738 2017-06-12  Pedro Alves  <palves@redhat.com>
7739
7740         * dwarf2read.c (recursively_count_psymbols): New function.
7741         (write_psymtabs_to_index): Call it to compute number of psyms and
7742         pass estimate size of psyms_seen to unordered_set's ctor.
7743
7744 2017-06-12  Pedro Alves  <palves@redhat.com>
7745
7746         * dwarf2read.c (write_hash_table): Check if key already exists
7747         before emplacing.
7748
7749 2017-06-12  Pedro Alves  <palves@redhat.com>
7750
7751         * dwarf2read.c (data_buf::append_space): Rename to...
7752         (data_buf::grow): ... this, and make private.  Adjust all callers.
7753         (data_buf::append_uint): New method.
7754         (add_address_entry, write_one_signatured_type)
7755         (write_psymtabs_to_index): Use it.
7756
7757 2017-06-12  Pedro Alves  <palves@redhat.com>
7758
7759         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7760         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7761         (data_buf::file_write): Call ::fwrite directly.
7762
7763 2017-06-12  Pedro Alves  <palves@redhat.com>
7764
7765         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7766         std::vector::erase.
7767
7768 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7769
7770         Code cleanup: C++ify .gdb_index producer.
7771         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7772         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7773         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7774         (create_strtab, add_string): Remove.
7775         (file_write, data_buf): New.
7776         (struct symtab_index_entry): Use std::vector for cu_indices.
7777         (struct mapped_symtab): Use std::vector for data.
7778         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7779         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7780         Remove.
7781         (find_slot): Change return type.  Update it to the new data structures.
7782         (hash_expand, add_index_entry): Update it to the new data structures.
7783         (offset_type_compare): Remove.
7784         (uniquify_cu_indices): Update it to the new data structures.
7785         (c_str_view, c_str_view_hasher, vector_hasher): New.
7786         (add_indices_to_cpool): Remove.
7787         (write_hash_table): Update it to the new data structures.
7788         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7789         (eq_psymtab_cu_index): Remove.
7790         (psym_index_map): New typedef.
7791         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7792         reference and std::unordered_map for cu_index_htab.
7793         (add_address_entry, add_address_entry_worker, write_address_map)
7794         (write_psymbols): Update it to the new data structures.
7795         (write_obstack): Remove.
7796         (struct signatured_type_index_data): Change types_list to a data_buf
7797         reference and psyms_seen to a std::unordered_set reference.
7798         (write_one_signatured_type, recursively_write_psymbols)
7799         (write_psymtabs_to_index): Update it to the new data structures.
7800
7801 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7802
7803         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7804         separate-debug-file commands.
7805         * symfile.h (separate_debug_file_debug): New global.
7806         * symfile.c (separate_debug_file_debug): New global.
7807         (separate_debug_file_exists, find_separate_debug_file): Add
7808         debug output.
7809         (_initialize_symfile): Add "set debug separate-debug-file"
7810         command.
7811         * build-id.c (build_id_to_debug_bfd,
7812         find_separate_debug_file_by_buildid): Add debug output.
7813
7814 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7815
7816         * gdbarch.sh (displaced_step_free_closure): Remove.
7817         * gdbarch.h, gdbarch.c: Re-generate.
7818         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7819         displaced_step_free_closure.
7820         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7821         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7822         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7823         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7824         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7825         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7826         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7827         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7828         * infrun.c (displaced_step_clear): Call xfree instead of
7829         gdbarch_displaced_step_free_closure.
7830
7831 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7832
7833         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7834         NULL".
7835
7836 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7837
7838         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7839         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7840         (mn10300_push_dummy_call): Likewise.
7841
7842 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7843
7844         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7845
7846 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7847
7848         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7849
7850 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7851
7852         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7853         able to start inferiors using a shell.
7854         (New remote packets): Announce new packet "QStartupWithShell".
7855         * remote.c: Add PACKET_QStartupWithShell.
7856         (extended_remote_create_inferior): Handle new
7857         PACKET_QStartupWithShell.
7858         (remote_protocol_features) <QStartupWithShell>: New entry for
7859         PACKET_QStartupWithShell.
7860         (_initialize_remote): Call "add_packet_config_cmd" for
7861         QStartupShell.
7862
7863 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7864             Pedro Alves  <palves@redhat.com>
7865
7866         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7867         and "nat/fork-inferior.h".
7868         * common/common-inferior.h: New file, with contents from
7869         "gdb/inferior.h".
7870         * commom/common-utils.c: Include "common-utils.h".
7871         (stringify_argv): New function.
7872         * common/common-utils.h (stringify_argv): New prototype.
7873         * configure.nat: Add "fork-inferior.o" as a dependency for
7874         "*linux*", "fbsd*" and "nbsd*" hosts.
7875         * corefile.c (get_exec_file): Update comment.
7876         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7877         instead of "startup_inferior".
7878         (darwin_create_inferior): Call "add_thread_silent" after
7879         "fork_inferior".
7880         * fork-child.c: Cleanup unnecessary includes.
7881         (SHELL_FILE): Move to "common/common-fork-child.c".
7882         (environ): Likewise.
7883         (exec_wrapper): Initialize.
7884         (get_exec_wrapper): New function.
7885         (breakup_args): Move to "common/common-fork-child.c"; rename to
7886         "breakup_args_for_exec".
7887         (escape_bang_in_quoted_argument): Move to
7888         "common/common-fork-child.c".
7889         (saved_ui): New variable.
7890         (prefork_hook): New function.
7891         (postfork_hook): Likewise.
7892         (postfork_child_hook): Likewise.
7893         (gdb_startup_inferior): Likewise.
7894         (fork_inferior): Move to "common/common-fork-child.c".  Update
7895         function to support gdbserver.
7896         (startup_inferior): Likewise.
7897         * gdbcore.h (get_exec_file): Remove declaration.
7898         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7899         instead of "startup_inferior".  Call "add_thread_silent" after
7900         "fork_inferior".
7901         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7902         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7903         instead of "startup_inferior".  Call "add_thread_silent" after
7904         "fork_inferior".
7905         * inferior.h: Include "common-inferior.h".
7906         (trace_start_error): Move to "common/common-utils.h".
7907         (trace_start_error_with_name): Likewise.
7908         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7909         (startup_inferior): Likewise.
7910         (gdb_startup_inferior): New prototype.
7911         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7912         * nat/fork-inferior.h: New file.
7913         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7914         instead of "startup_inferior".  Call "add_thread_silent" after
7915         "fork_inferior".
7916         * target.h (target_terminal_init): Move prototype to
7917         "target/target.h".
7918         (target_terminal_inferior): Likewise.
7919         (target_terminal_ours): Likewise.
7920         * target/target.h (target_terminal_init): New prototype, moved
7921         from "target.h".
7922         (target_terminal_inferior): Likewise.
7923         (target_terminal_ours): Likewise.
7924         * utils.c (gdb_flush_out_err): New function.
7925
7926 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7927
7928         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7929         * common/common-gdbthread.h: New file, with parts from
7930         "gdb/gdbthread.h".
7931         * gdbthread.h: Include "common-gdbthread.h".
7932         (switch_to_thread): Moved to "common/common-gdbthread.h".
7933
7934 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7935
7936         * Makefile.in (SFILES): Add "common/job-control.c".
7937         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7938         (COMMON_OBS): Add "job-control.o".
7939         * common/job-control.c: New file, with contents from
7940         "gdb/inflow.c".
7941         * common/job-control.h: New file, with contents from "terminal.h".
7942         * fork-child.c: Include "job-control.h".
7943         * inflow.c: Include "job-control.h".
7944         (gdb_setpgid): Move to "common/common-inflow.c".
7945         (_initialize_inflow): Move setting of "job_control" to
7946         "handle_job_control".
7947         * terminal.h (job_control): Moved to "common/common-terminal.h".
7948         (gdb_setpgid): Likewise.
7949         * top.c: Include "job_control.h".
7950         * utils.c: Likewise.
7951         (job_control): Moved to "job-control.c".
7952
7953 2017-06-07  Pedro Alves  <palves@redhat.com>
7954
7955         * Makefile.in (SFILES): Add gdb_regex.c.
7956         (COMMON_OBS): Add gdb_regex.o.
7957         * ada-lang.c (ada_add_standard_exceptions)
7958         (ada_add_exceptions_from_frame, name_matches_regex)
7959         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7960         parameter type to compiled_regex.  Adjust.
7961         (ada_exceptions_list): Use compiled_regex.
7962         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7963         std::unique_ptr<compiled_regex>.
7964         (exception_catchpoint::~exception_catchpoint): Remove regfree
7965         call.
7966         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7967         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7968         * breakpoint.c (solib_catchpoint::compiled): Now a
7969         std::unique_ptr<compiled_regex>.
7970         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7971         (check_status_catch_solib): Adjust to use compiled_regex.
7972         (add_solib_catchpoint): Adjust to use compiled_regex.
7973         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7974         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7975         compiled_regex reference.  Adjust to use it.
7976         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7977         declaration.  Include "gdb_regex.h".
7978         (apropos_cmd): Change regex parameter to compiled_regex reference.
7979         * gdb_regex.c: New file.
7980         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7981         declarations.
7982         (class compiled_regex): New.
7983         * linux-tdep.c: Include "common/gdb_optional.h".
7984         (struct mapping_regexes): New, factored out from
7985         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7986         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7987         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7988         * probe.c: Include "common/gdb_optional.h".
7989         (collect_probes): Use compiled_regex and gdb::optional and remove
7990         cleanups.
7991         * skip.c: Include "common/gdb_optional.h".
7992         (skiplist_entry::compiled_function_regexp): Now a
7993         gdb::optional<compiled_regex>.
7994         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7995         (free_skiplist_entry): Remove regfree call.
7996         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7997         compiled_regex and gdb::optional.
7998         * symtab.c: Include "common/gdb_optional.h".
7999         (search_symbols): Use compiled_regex and gdb::optional.
8000         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8001         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8002         to gdb_regex.c.
8003
8004 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8005
8006         * regcache.c (regcache::save): Avoid buffer use.
8007         (regcache::dump): Likewise.
8008
8009 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8010
8011         * sh-tdep.c (sh_pseudo_register_read): Remove
8012         MAX_REGISTER_SIZE.
8013         (sh_pseudo_register_write): Likewise.
8014         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8015         (sh64_pseudo_register_write): Likewise
8016
8017 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8018
8019         * aarch64-tdep.c (aarch64_store_return_value): Use
8020         V_REGISTER_SIZE.
8021         (aarch64_pseudo_read_value): Likewise.
8022         (aarch64_pseudo_write): Likewise.
8023
8024 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8025
8026         * regformats/regdef.h (set_register_cache): Remove the
8027         declaration.
8028
8029 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8030
8031         * frame.c (frame_unwind_register_signed): Use
8032         frame_unwind_register_value.
8033
8034 2017-06-06  Pedro Alves  <palves@redhat.com>
8035
8036         PR breakpoints/21553
8037         * breakpoint.c (create_breakpoints_sal_default)
8038         (init_breakpoint_sal, create_breakpoint_sal): Use
8039         gdb::unique_xmalloc_ptr for string parameters.
8040         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8041         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8042         (base_breakpoint_create_breakpoints_sal)
8043         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8044         (strace_marker_create_breakpoints_sal)
8045         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8046         string parameters.
8047         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8048         gdb::unique_xmalloc_ptr for string parameters.
8049         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8050         parameters.
8051
8052 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8053
8054         * alpha-tdep.c (alpha_register_to_value): Use
8055         get_frame_register_value.
8056         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8057
8058 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8059
8060         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8061         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8062         (ia64_value_to_register): Likewise.
8063         (ia64_extract_return_value): Likewise.
8064         (ia64_store_return_value): Likewise.
8065         (ia64_push_dummy_call): Likewise.
8066
8067 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8068
8069         GDB 8.0 released.
8070
8071 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8072
8073         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8074
8075 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8076
8077         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8078         parameter.
8079         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8080
8081 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8082
8083         * event-loop.c (poll_timers): Unallocate timer using delete
8084         instead of xfree.
8085
8086 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8087
8088         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8089         (struct breakpoint) <~breakpoint>: New.
8090         (struct watchpoint): Inherit from breakpoint.
8091         <~watchpoint>: New.
8092         <base>: Remove.
8093         (struct tracepoint): Inherit from breakpoint.
8094         <base>: Remove.
8095         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8096         (struct longjmp_breakpoint): Inherit from breakpoint.
8097         <~longjmp_breakpoint>: New.
8098         <base>: Remove.
8099         (new_breakpoint_from_type): Remove casts.
8100         (watchpoint_in_thread_scope): Remove reference to base field.
8101         (watchpoint_del_at_next_stop): Likewise.
8102         (update_watchpoint): Likewise.
8103         (watchpoint_check): Likewise.
8104         (bpstat_check_watchpoint): Likewise.
8105         (set_longjmp_breakpoint): Likewise.
8106         (struct fork_catchpoint): Inherit from breakpoint.
8107         <base>: Remove.
8108         (struct solib_catchpoint): Inherit from breakpoint.
8109         <~solib_catchpoint>: New.
8110         <base>: Remove.
8111         (dtor_catch_solib): Change to ...
8112         (solib_catchpoint::~solib_catchpoint): ... this.
8113         (breakpoint_hit_catch_solib): Remove reference to base field.
8114         (add_solib_catchpoint): Likewise.
8115         (create_fork_vfork_event_catchpoint): Likewise.
8116         (struct exec_catchpoint): Inherit from breakpoint.
8117         <~exec_catchpoint>: New.
8118         <base>: Remove.
8119         (dtor_catch_exec): Change to ...
8120         (exec_catchpoint::~exec_catchpoint): ... this.
8121         (dtor_watchpoint): Change to ...
8122         (watchpoint::~watchpoint): ... this.
8123         (watch_command_1): Remove reference to base field.
8124         (catch_exec_command_1): Likewise.
8125         (base_breakpoint_dtor): Change to ...
8126         (breakpoint::~breakpoint): ... this.
8127         (base_breakpoint_ops): Remove dtor field value.
8128         (longjmp_bkpt_dtor): Change to ...
8129         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8130         (strace_marker_create_breakpoints_sal): Remove reference to base
8131         field.
8132         (delete_breakpoint): Don't manually call breakpoint destructor.
8133         (create_tracepoint_from_upload): Remove reference to base field.
8134         (trace_pass_set_count): Likewise.
8135         (initialize_breakpoint_ops): Don't initialize
8136         momentary_breakpoint_ops, don't set dtors.
8137         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8138         <~ada_catchpoint>: New.
8139         <base>: Remove.
8140         (create_excep_cond_exprs): Remove reference to base field.
8141         (dtor_exception): Change to ...
8142         (ada_catchpoint::~ada_catchpoint): ... this.
8143         (dtor_catch_exception): Remove.
8144         (dtor_catch_exception_unhandled): Remove.
8145         (dtor_catch_assert): Remove.
8146         (create_ada_exception_catchpoint): Remove reference to base
8147         field.
8148         (initialize_ada_catchpoint_ops): Don't set dtors.
8149         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8150         breakpoint.
8151         <~signal_catchpoint>: New.
8152         <base>: Remove.
8153         (signal_catchpoint_dtor): Change to ...
8154         (signal_catchpoint::~signal_catchpoint): ... this.
8155         (create_signal_catchpoint): Remove reference to base field.
8156         (initialize_signal_catchpoint_ops): Don't set dtor.
8157         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8158         from breakpoint.
8159         <~syscall_catchpoint>: New.
8160         <base>: Remove.
8161         (dtor_catch_syscall): Change to ...
8162         (syscall_catchpoint::~syscall_catchpoint): ... this.
8163         (create_syscall_event_catchpoint): Remove reference to base
8164         field.
8165         (initialize_syscall_catchpoint_ops): Don't set dtor.
8166         * break-catch-throw.c (struct exception_catchpoint): Inherit
8167         from breakpoint.
8168         <~exception_catchpoint>: New.
8169         <base>: Remove.
8170         (dtor_exception_catchpoint): Change to ...
8171         (exception_catchpoint::~exception_catchpoint): ... this.
8172         (handle_gnu_v3_exceptions): Remove reference to base field.
8173         (initialize_throw_catchpoint_ops): Don't set dtor.
8174         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8175         field.
8176         * remote.c (remote_get_tracepoint_status): Likewise.
8177         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8178         * tracefile.c (tracefile_fetch_registers): Likewise.
8179         * tracepoint.c (actions_command): Likewise.
8180         (validate_actionline): Likewise.
8181         (tfind_1): Likewise.
8182         (get_traceframe_location): Likewise.
8183         (find_matching_tracepoint_location): Likewise.
8184         (parse_tracepoint_status): Likewise.
8185         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8186
8187 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8188
8189         * breakpoint.c (struct longjmp_breakpoint): New struct.
8190         (is_tracepoint_type): Change return type to bool.
8191         (is_longjmp_type): New function.
8192         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8193         (set_raw_breakpoint_without_location): Use
8194         new_breakpoint_from_type.
8195         (set_raw_breakpoint): Likewise.
8196
8197 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8198
8199         * breakpoint.c (new_breakpoint_from_type): New function.
8200         (create_breakpoint_sal): Use new_breakpoint_from_type and
8201         unique_ptr.
8202         (create_breakpoint): Likewise.
8203
8204 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8205
8206         * memattr.c (mem_info_command): Rename to ...
8207         (info_mem_command): ... this.
8208         (mem_enable_command): Rename to ...
8209         (enable_mem_command): ... this.
8210         (mem_disable_command): Rename to ...
8211         (disable_mem_command): ... this.
8212         (mem_delete_command): Rename to ...
8213         (delete_mem_command): ... this.
8214         (_initialize_mem): Adjust function names.
8215
8216 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8217
8218         * btrace.c (handle_pt_insn_events): New.
8219         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8220         STATUS.  Split into this and ...
8221         (handle_pt_insn_event_flags): ... this.
8222
8223 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8224
8225         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8226         and struct pt_insn.resynced.
8227         * configure: Regenerated.
8228         * config.in: Regenerated.
8229
8230 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8231
8232         * btrace.c (ftrace_find_call_by_number): New function.
8233         (ftrace_new_function): Store objects, not pointers.
8234         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8235         ftrace_new_gap, ftrace_update_function,
8236         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8237         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8238         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8239         btrace_ends_with_single_insn, btrace_call_get): Account for
8240         btrace_thread_info::functions now storing objects.
8241         * btrace.h (struct btrace_thread_info): Add constructor.
8242         (struct btrace_thread_info) <functions>: Make std::vector.
8243         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8244         Initialize with default values.
8245         * record-btrace.c (record_btrace_frame_sniffer): Account for
8246         btrace_thread_info::functions now storing objects.
8247
8248 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8249
8250         * btrace.c: Remove typedef bfun_s.
8251         (ftrace_new_gap): Directly add gaps to the list of gaps.
8252         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8253         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8254         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8255         instead of gdb VEC.
8256
8257 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8258
8259         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8260         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8261         with btrace_thread_info::next_segment and
8262         btrace_thread_info::prev_segment.
8263         * btrace.h: Remove struct btrace_func_link.
8264         (struct btrace_function): Replace pair of function segment pointers
8265         with pair of indices.
8266         * python/py-record-btrace.c (btpy_call_prev_sibling,
8267         btpy_call_next_sibling): Replace references to
8268         btrace_thread_info::segment with btrace_thread_info::next_segment and
8269         btrace_thread_info::prev_segment.
8270         * record-btrace.c (record_btrace_frame_this_id): Use
8271         btrace_find_call_by_number.
8272
8273 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8274
8275         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8276         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8277         btrace_insn_next, btrace_insn_prev): Remove references to
8278         btrace_thread_info::flow.
8279         * btrace.h (struct btrace_function): Remove FLOW.
8280
8281 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8282
8283         * btrace.c (ftrace_find_call_by_number): New function.
8284         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8285         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8286         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8287         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8288         index.
8289         * btrace.h (struct btrace_function): Turn UP into an index.
8290         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8291         as an index.
8292         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8293         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8294         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8295
8296 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8297
8298         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8299         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8300         ftrace_update_function, ftrace_compute_global_level_offset,
8301         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8302         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8303         btrace_insn_end, btrace_is_empty): Remove references to
8304         btrace_thread_info::begin and btrace_thread_info::end.
8305         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8306         (struct btrace_thread_info) <functions>: Adjust comment.
8307         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8308         btrace_thread_info::begin.
8309
8310 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8311
8312         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8313         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8314         ftrace_update_function): Remove arguments that implicitly were always
8315         BTINFO->END.
8316         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8317         Don't pass BTINFO->END.
8318
8319 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8320
8321         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8322         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8323         btrace_find_insn_by_number): Replace function segment pointer with
8324         index.
8325         (btrace_insn_cmp): Simplify.
8326         * btrace.h: (struct btrace_insn_iterator) Rename index to
8327         insn_index.  Replace function segment pointer with index into function
8328         segment vector.
8329         * record-btrace.c (record_btrace_call_history): Replace function
8330         segment pointer use with index.
8331         (record_btrace_frame_sniffer): Retrieve function call segment through
8332         vector.
8333         (record_btrace_set_replay): Remove defunc't safety check.
8334
8335 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8336
8337         * btrace.c (btrace_ends_with_single_insn): New function.
8338         (btrace_call_get, btrace_call_number, btrace_call_begin,
8339         btrace_call_end, btrace_call_next, btrace_call_prev,
8340         btrace_find_call_by_number): Use index into call segment vector
8341         instead of pointer.
8342         (btrace_call_cmp): Simplify.
8343         * btrace.h (struct btrace_call_iterator): Replace function call segment
8344         pointer with index into vector.
8345         * record-btrace.c (record_btrace_call_history): Use index instead of
8346         pointer.
8347
8348 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8349
8350         * btrace.c (btrace_insn_begin, btrace_insn_end,
8351         btrace_find_insn_by_number): Add btinfo to iterator.
8352         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8353
8354 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8355
8356         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8357         and save pointers directly.
8358         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8359         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8360         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8361         changed signature of functions.
8362         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8363         (btrace_fetch): Remove code that adds btrace_function pointers to
8364         vector of btrace_functions.
8365         (btrace_clear): Simplify freeing vector of btrace_functions.
8366
8367 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8368
8369         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8370         Replace VEC_* with std::vector functions.
8371         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8372         (struct btrace_thread_info)<functions>: Change type to std::vector.
8373
8374 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8375
8376         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8377         "Removed targets and native configurations" up.  Merge duplicate
8378         "New commands" sub-sections.  Add "New options" sub-sections.
8379
8380 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8381
8382         * defs.h (copy_integer_to_size): New declaration.
8383         * findvar.c (copy_integer_to_size): New function.
8384         (do_cint_test): New selftest function.
8385         (copy_integer_to_size_test): Likewise.
8386         (_initialize_findvar): Likewise.
8387         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8388         (mips_fbsd_collect_reg): Use raw_collect_integer.
8389         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8390         (mips64_fill_gregset): Use raw_collect_integer
8391         (mips64_fill_fpregset): Use raw_supply_integer.
8392         * regcache.c (regcache::raw_supply_integer): New function.
8393         (regcache::raw_collect_integer): Likewise.
8394         * regcache.h: (regcache::raw_supply_integer): New declaration.
8395         (regcache::raw_collect_integer): Likewise.
8396
8397 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8398
8399         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8400         (COMMON_OBS): Add gdbarch-selftests.o.
8401         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8402         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8403         * gdbarch-selftests.c: New file.
8404         * regcache.h (regcache) <~regcache>: Mark it virtual if
8405         GDB_SELF_TEST.
8406         <raw_write>: Likewise.
8407
8408 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8409
8410         * regcache.c (current_regcache): Change it to
8411         regcache::current_regcache.
8412         (regcache_observer_target_changed): Update.
8413         (regcache_thread_ptid_changed): Make it a regcache static
8414         method.
8415         (regcache_thread_ptid_changed): Update.
8416         (class regcache_access): New.
8417         (current_regcache_test): Update.
8418         (_initialize_regcache): Update.
8419         * regcache.h: Include forward_list.
8420         (regcache): Declare regcache_thread_ptid_changed and declare
8421         registers_changed_ptid as friend.
8422
8423 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8424
8425         * i387-tdep.c (i387_register_to_value): Use register_size
8426         instead of TYPE_LENGTH.
8427         * m68k-tdep.c (m68k_register_to_value): Likewise.
8428
8429 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8430
8431         * i387-tdep.c (i387_convert_register_p): Return false if type
8432         code isn't TYPE_CODE_FLT.
8433
8434 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8435
8436         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8437         length is 4.
8438         (alpha_register_to_value): Remove type length check.
8439         (alpha_value_to_register): Likewise.
8440
8441 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8442
8443         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8444         TYPE_CODE_FLT.
8445
8446 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8447
8448         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8449         TYPE_CODE_FLT or not.
8450
8451 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8452
8453         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8454         * avr-tdep.c (avr_gdbarch_init): Likewise.
8455         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8456         * cris-tdep.c (cris_gdbarch_init): Likewise.
8457         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8458         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8459         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8460         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8461         * mep-tdep.c (mep_gdbarch_init): Likewise.
8462         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8463         * mips-tdep.c (mips_gdbarch_init): Likewise.
8464         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8465         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8466         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8467         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8468         * v850-tdep.c (v850_gdbarch_init): Likewise.
8469
8470 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8471
8472         * selftest-arch.c (tests_with_arch): Call registers_changed
8473         and reinit_frame_cache.
8474         * selftest.c (run_self_tests): Likewise.
8475
8476 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8477
8478         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8479         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8480
8481 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8482
8483         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8484         set_gdbarch_print_insn.
8485
8486 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8487
8488         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8489         set_gdbarch_print_insn.
8490
8491 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8492
8493         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8494         set_gdbarch_print_insn.
8495         * arc-tdep.c (arc_gdbarch_init): Likewise.
8496         * arch-utils.c: include dis-asm.h.
8497         (default_print_insn): New function.
8498         * arch-utils.h (default_print_insn): Declare.
8499         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8500         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8501         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8502         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8503         * frv-tdep.c (frv_gdbarch_init): Likewise.
8504         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8505         * gdbarch.sh (print_insn): Use default_print_insn.
8506         * gdbarch.c: Regenerated.
8507         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8508         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8509         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8510         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8511         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8512         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8513         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8514         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8515         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8516         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8517         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8518         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8519         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8520         * mt-tdep.c (mt_gdbarch_init): Likewise.
8521         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8522         * nios2-tdep.c (nios2_print_insn): Remove.
8523         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8524         * rx-tdep.c (rx_gdbarch_init): Likewise.
8525         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8526         * score-tdep.c (score_print_insn): Remove.
8527         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8528         * sh-tdep.c (sh_gdbarch_init): Likewise.
8529         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8530         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8531         * tic6x-tdep.c (tic6x_print_insn): Remove.
8532         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8533         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8534         * v850-tdep.c (v850_gdbarch_init): Likewise.
8535         * vax-tdep.c (vax_gdbarch_init): Likewise.
8536         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8537         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8538
8539 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8540
8541         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8542         (MIPS_FP0_REGNUM): Remove.
8543         (MIPS_FSR_REGNUM): Remove.
8544         (mips_fbsd_supply_fpregs): Use mips_regnum.
8545         (mips_fbsd_supply_gregs): Likewise.
8546         (mips_fbsd_collect_fpregs): Likewise.
8547         (mips_fbsd_collect_gregs): Likewise.
8548
8549 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8550
8551         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8552         (getpfpregs_supplies): New function.
8553         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8554         getfpregs_supplies.
8555         (mips_fbsd_store_inferior_registers): Likewise.
8556
8557 2017-05-22  Pedro Alves <palves@redhat.com>
8558
8559         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8560         maintainer.
8561
8562 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8563
8564         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8565         (store_register): Likewise.
8566         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8567         (get_decimal_float_return_value): Likewise.
8568         (do_ppc_sysv_return_value): Likewise.
8569         (ppc64_sysv_abi_push_integer): Likewise.
8570         (ppc64_sysv_abi_push_freg): Likewise.
8571         (ppc64_sysv_abi_return_value_base): Likewise.
8572         (ppc64_sysv_abi_return_value): Likewise.
8573         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8574         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8575         * rs6000-nat.c: Likewise.
8576         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8577         (rs6000_value_to_register): Likewise.
8578         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8579
8580 2017-05-21  Tom Tromey  <tom@tromey.com>
8581
8582         PR rust/21466:
8583         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8584         arrays as "[T]", not "[T; ]".
8585
8586 2017-05-19  Tom Tromey  <tom@tromey.com>
8587
8588         PR rust/21484:
8589         * rust-lang.c (exp_descriptor_rust): New function.
8590         (rust_language_defn): Use it.
8591         * p-lang.c (pascal_language_defn): Update.
8592         * opencl-lang.c (opencl_language_defn): Update.
8593         * objc-lang.c (objc_language_defn): Update.
8594         * m2-lang.c (m2_language_defn): Update.
8595         * language.h (struct language_defn)
8596         <la_watch_location_expression>: New member.
8597         * language.c (unknown_language_defn, auto_language_defn)
8598         (local_language_defn): Update.
8599         * go-lang.c (go_language_defn): Update.
8600         * f-lang.c (f_language_defn): Update.
8601         * d-lang.c (d_language_defn): Update.
8602         * c-lang.h (c_watch_location_expression): Declare.
8603         * c-lang.c (c_watch_location_expression): New function.
8604         (c_language_defn, cplus_language_defn, asm_language_defn)
8605         (minimal_language_defn): Use it.
8606         * breakpoint.c (watch_command_1): Call
8607         la_watch_location_expression.
8608         * ada-lang.c (ada_language_defn): Update.
8609
8610 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8611
8612         PR tui/21482
8613         * gdb_curses.h (NOMACROS): Define.
8614         (NCURSES_NOMACROS): Define.
8615
8616 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8617
8618         PR tui/21482
8619         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8620         arg to char *.
8621         * tui/tui-wingeneral.c (box_win): Likewise.
8622         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8623         (tui_show_source_line): Likewise.
8624         (tui_show_exec_info_content): Likewise.
8625
8626 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8627
8628         * sparc-tdep.c (sparc_structure_return_p)
8629         (sparc_arg_on_registers_p): New functions.
8630         (sparc32_store_arguments): Use them.
8631         * sparc64-tdep.c (sparc64_16_byte_align_p)
8632         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8633         Handle TYPE_CODE_ARRAY.
8634
8635 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8636
8637         * cli/cli-decode.c (add_alias_cmd): New function.
8638         * command.h (add_alias_cmd): Declare.
8639         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8640         instead call add_alias_cmd.
8641
8642 2017-05-17  Pedro Alves  <palves@redhat.com>
8643
8644         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8645         (nat_makefile_frag): ... this.  All references updated.
8646         * configure.ac: Likewise.
8647         * configure.nat: Likewise.  Enhance comments.
8648         * configure: Regenerate.
8649
8650 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8651
8652         * procfs.c (procfs_create_inferior): Change prototype to match
8653         definition.
8654
8655 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8656
8657         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8658         C++ compiler warning.
8659
8660 2017-05-12  Tom Tromey  <tom@tromey.com>
8661
8662         PR rust/21483:
8663         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8664         recurse, just call value_struct_elt directly.
8665
8666 2017-05-12  Tom Tromey  <tom@tromey.com>
8667
8668         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8669         OP_RUST_ARRAY>: Fix.
8670
8671 2017-05-12  Tom Tromey  <tom@tromey.com>
8672
8673         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8674
8675 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8676
8677         * regcache.c: Include <forward_list>.
8678         (struct regcache_list): Remove.
8679         (current_regcache): Update.
8680         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8681         (regcache_thread_ptid_changed): Likewise.
8682         (registers_changed_ptid): Likewise.
8683         (current_regcache_size): Likewise.
8684
8685 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8686
8687         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8688         (current_regcache_size): New function.
8689         (current_regcache_test): New function.
8690         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8691
8692 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8693
8694         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8695         (print_gp_register_row): Use get_frame_register_value.
8696
8697 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8698
8699         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8700         (mips_supply_fpregset): Likewise.
8701         (mips64_supply_gregset): Likewise.
8702
8703 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8704
8705         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8706         regcache->raw_supply_zeroed.
8707
8708 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8709
8710         * configure.nat: Rearrange 'case' statements to match
8711         host before cpu.
8712
8713 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8714
8715         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8716         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8717         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8718         "@nat_extra_makefile_frag@".
8719         (Makefile): Remove dependency on "@frags@".
8720         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8721         (data-directory/Makefile): Likewise.
8722         * config/aarch64/linux.mh: Deleted; moved contents to
8723         "gdb/configure.nat".
8724         * config/alpha/alpha-linux.mh: Likewise.
8725         * config/alpha/nbsd.mh: Likewise.
8726         * config/arm/linux.mh: Likewise.
8727         * config/arm/nbsdelf.mh: Likewise.
8728         * config/i386/cygwin.mh: Likewise.
8729         * config/i386/cygwin64.mh: Likewise.
8730         * config/i386/darwin.mh: Likewise.
8731         * config/i386/fbsd.mh: Likewise.
8732         * config/i386/fbsd64.mh: Likewise.
8733         * config/i386/go32.mh: Likewise.
8734         * config/i386/i386gnu.mh: Likewise.
8735         * config/i386/i386sol2.mh: Likewise.
8736         * config/i386/linux.mh: Likewise.
8737         * config/i386/linux64.mh: Likewise.
8738         * config/i386/mingw.mh: Likewise.
8739         * config/i386/mingw64.mh: Likewise.
8740         * config/i386/nbsd64.mh: Likewise.
8741         * config/i386/nbsdelf.mh: Likewise.
8742         * config/i386/nto.mh: Likewise.
8743         * config/i386/obsd.mh: Likewise.
8744         * config/i386/obsd64.mh: Likewise.
8745         * config/i386/sol2-64.mh: Likewise.
8746         * config/ia64/linux.mh: Likewise.
8747         * config/m32r/linux.mh: Likewise.
8748         * config/m68k/linux.mh: Likewise.
8749         * config/m68k/nbsdelf.mh: Likewise.
8750         * config/m68k/obsd.mh: Likewise.
8751         * config/m88k/obsd.mh: Likewise.
8752         * config/mips/fbsd.mh: Likewise.
8753         * config/mips/linux.mh: Likewise.
8754         * config/mips/nbsd.mh: Likewise.
8755         * config/mips/obsd64.mh: Likewise.
8756         * config/pa/linux.mh: Likewise.
8757         * config/pa/nbsd.mh: Likewise.
8758         * config/pa/obsd.mh: Likewise.
8759         * config/powerpc/aix.mh: Likewise.
8760         * config/powerpc/fbsd.mh: Likewise.
8761         * config/powerpc/linux.mh: Likewise.
8762         * config/powerpc/nbsd.mh: Likewise.
8763         * config/powerpc/obsd.mh: Likewise.
8764         * config/powerpc/ppc64-linux.mh: Likewise.
8765         * config/powerpc/spu-linux.mh: Likewise.
8766         * config/s390/linux.mh: Likewise.
8767         * config/sh/nbsd.mh: Likewise.
8768         * config/sparc/fbsd.mh: Likewise.
8769         * config/sparc/linux.mh: Likewise.
8770         * config/sparc/linux64.mh: Likewise.
8771         * config/sparc/nbsd64.mh: Likewise.
8772         * config/sparc/nbsdelf.mh: Likewise.
8773         * config/sparc/obsd64.mh: Likewise.
8774         * config/sparc/sol2.mh: Likewise.
8775         * config/tilegx/linux.mh: Likewise.
8776         * config/vax/nbsdelf.mh: Likewise.
8777         * config/vax/obsd.mh: Likewise.
8778         * config/xtensa/linux.mh: Likewise.
8779         * config/i386/i386gnu.mn: New file, with excerpts from
8780         "config/i386/i386gnu.mh".
8781         * configure: Regenerate.
8782         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8783         *.mh files under "gdb/config".
8784         * configure.nat: New file, with contents from the
8785         "gdb/config/*/*.mh" files.
8786
8787 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8788
8789         * btrace.c (btrace_clear): Free insn vector.
8790
8791 2017-05-05  Pedro Alves  <palves@redhat.com>
8792
8793         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8794         * configure: Regenerate.
8795
8796 2017-05-04  Pedro Alves  <palves@redhat.com>
8797
8798         * Makefile.in (SFILES): Add progspace-and-thread.c.
8799         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8800         (COMMON_OBS): Add progspace-and-thread.o.
8801         * breakpoint.c: Include "progspace-and-thread.h".
8802         (update_inserted_breakpoint_locations)
8803         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8804         Use scoped_restore_current_pspace_and_thread.
8805         (create_std_terminate_master_breakpoint): Use
8806         scoped_restore_current_program_space.
8807         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8808         (print_breakpoint_location): Use
8809         scoped_restore_current_program_space.
8810         (bp_loc_is_permanent): Use
8811         scoped_restore_current_pspace_and_thread.
8812         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8813         (download_tracepoint_locations): Use
8814         scoped_restore_current_pspace_and_thread.
8815         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8816         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8817         (enum step_over_calls_kind): Moved from inferior.h.
8818         (class scoped_restore_current_thread): New class.
8819         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8820         declaration.
8821         (scoped_restore_current_thread): New class.
8822         * infcmd.c: Include "common/gdb_optional.h".
8823         (continue_1, proceed_after_attach): Use
8824         scoped_restore_current_thread.
8825         (notice_new_inferior): Use scoped_restore_current_thread.
8826         * inferior.c: Include "progspace-and-thread.h".
8827         (restore_inferior, save_current_inferior): Delete.
8828         (add_inferior_command, clone_inferior_command): Use
8829         scoped_restore_current_pspace_and_thread.
8830         * inferior.h (scoped_restore_current_inferior): New class.
8831         * infrun.c: Include "progspace-and-thread.h" and
8832         "common/gdb_optional.h".
8833         (follow_fork_inferior): Use
8834         scoped_restore_current_pspace_and_thread.
8835         (scoped_restore_exited_inferior): New class.
8836         (handle_vfork_child_exec_or_exit): Use
8837         scoped_restore_exited_inferior,
8838         scoped_restore_current_pspace_and_thread,
8839         scoped_restore_current_thread and scoped_restore.
8840         (fetch_inferior_event): Use scoped_restore_current_thread.
8841         * linespec.c (decode_line_full, decode_line_1): Use
8842         scoped_restore_current_program_space.
8843         * mi/mi-main.c: Include "progspace-and-thread.h".
8844         (exec_continue): Use scoped_restore_current_thread.
8845         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8846         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8847         * proc-service.c (ps_pglobal_lookup): Use
8848         scoped_restore_current_program_space.
8849         * progspace-and-thread.c: New file.
8850         * progspace-and-thread.h: New file.
8851         * progspace.c (release_program_space, clone_program_space): Use
8852         scoped_restore_current_program_space.
8853         (restore_program_space, save_current_program_space)
8854         (save_current_space_and_thread): Delete.
8855         (switch_to_program_space_and_thread): Moved to
8856         progspace-and-thread.c.
8857         * progspace.h (save_current_program_space)
8858         (save_current_space_and_thread): Delete declarations.
8859         (scoped_restore_current_program_space): New class.
8860         * remote.c (remote_btrace_maybe_reopen): Use
8861         scoped_restore_current_thread.
8862         * symtab.c: Include "progspace-and-thread.h".
8863         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8864         * thread.c (print_thread_info_1): Use
8865         scoped_restore_current_thread.
8866         (struct current_thread_cleanup): Delete.
8867         (do_restore_current_thread_cleanup)
8868         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8869         (scoped_restore_current_thread::~scoped_restore_current_thread):
8870         ... this new dtor.
8871         (make_cleanup_restore_current_thread): Rename/convert to ...
8872         (scoped_restore_current_thread::scoped_restore_current_thread):
8873         ... this new ctor.
8874         (thread_apply_all_command): Use scoped_restore_current_thread.
8875         (thread_apply_command): Use scoped_restore_current_thread.
8876         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8877         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8878
8879 2017-05-04  Pedro Alves  <palves@redhat.com>
8880
8881         * thread.c (make_cleanup_restore_current_thread): Move
8882         find_thread_ptid call before the is_stopped call.  Assert that the
8883         thread is found.  Replace is_stopped call by checking the thread's
8884         state directly.  Remove unnecessary NULL-thread check.
8885
8886 2017-05-04  Pedro Alves  <palves@redhat.com>
8887
8888         * corelow.c (thread_section_name): New class.
8889         (get_core_register_section, get_core_siginfo): Use it.
8890
8891 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8892
8893         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8894         (get_core_register_section): Remove xfree of NULL pointer.
8895
8896 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8897
8898         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8899         * regcache.c (regcache::raw_supply_zeroed): New function.
8900         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8901
8902 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8903
8904         * gdbarch.sh: Remove commented out definition of
8905         TARGET_CHAR_BIT.
8906         * gdbarch.h: Re-generate.
8907
8908 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8909
8910         * configure: Regenerate.
8911
8912 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8913
8914         * solib-target.c (solib_target_relocate_section_addresses):
8915         Remove num_section_bases, num_bases, segment_bases variables.
8916
8917 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8918
8919         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8920
8921 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8922
8923         * solib-target.c: Include <vector>
8924         (struct lm_info_target) <~lm_info_target>: Remove.
8925         <segment_bases, section_bases>: Change type to
8926         std::vector<CORE_ADDR>.
8927         (library_list_start_segment, library_list_start_section,
8928         library_list_end_library,
8929         solib_target_relocate_section_addresses): Adjust.
8930
8931 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8932
8933         * gdbarch.sh (software_single_step): Change return type to
8934         std::vector<CORE_ADDR>.
8935         * gdbarch.c, gdbarch.h: Re-generate.
8936         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8937         Adjust.
8938         (arm_deal_with_atomic_sequence_raw): Adjust.
8939         (thumb_get_next_pcs_raw): Adjust.
8940         (arm_get_next_pcs_raw): Adjust.
8941         (arm_get_next_pcs): Adjust.
8942         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8943         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8944         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8945         (alpha_software_single_step): Adjust.
8946         * alpha-tdep.h (alpha_software_single_step): Adjust.
8947         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8948         * arm-tdep.c (arm_software_single_step): Adjust.
8949         (arm_breakpoint_kind_from_current_state): Adjust.
8950         * arm-tdep.h (arm_software_single_step): Adjust.
8951         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8952         * cris-tdep.c (cris_software_single_step): Adjust.
8953         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8954         (micromips_deal_with_atomic_sequence): Adjust.
8955         (deal_with_atomic_sequence): Adjust.
8956         (mips_software_single_step): Adjust.
8957         * mips-tdep.h (mips_software_single_step): Adjust.
8958         * moxie-tdep.c (moxie_software_single_step): Adjust.
8959         * nios2-tdep.c (nios2_software_single_step): Adjust.
8960         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8961         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8962         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8963         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8964         * sparc-tdep.c (sparc_software_single_step): Adjust.
8965         * spu-tdep.c (spu_software_single_step): Adjust.
8966         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8967
8968 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8969
8970         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8971         * gdbarch.h: Re-generate.
8972
8973 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8974
8975         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8976         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8977         * python/py-instruction.c, python/py-instruction.h: New file.
8978         * python/py-record.c: Add py-instruction.h include.
8979         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8980         gdb.RecordInstruction.
8981         * python/python-internal.h: Add gdbpy_initialize_instruction
8982         declaration.
8983         * python/python.c (do_start_initialization): Add
8984         gdbpy_initialize_instruction.
8985
8986 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8987
8988         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8989         Remove.
8990         (btrace_func_from_recpy_func): New function.
8991         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8992         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8993         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8994         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8995         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8996         Also, use new helper functions.
8997         (btpy_list_item): Use new helper functions.
8998         (recpy_bt_function_call_history): Use new type name.
8999         (btpy_call_getset): Remove.
9000         (gdbpy_initialize_btrace): Remove code to initialize
9001         gdb.BtraceFunctionCall.
9002         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9003         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9004         recpy_bt_func_prev, recpy_bt_func_next): New export.
9005         * python/py-record.c (recpy_func_type): New static object.
9006         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9007         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9008         recpy_func_next): New function.
9009         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9010         (recpy_func_getset): New static object.
9011         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9012         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9013
9014 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9015
9016         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9017         (btpy_object, btpy_insn_type, btpy_new): Remove.
9018         (btpy_list_object): Use gdb.RecordInstruction type instead of
9019         gdb.BtraceInstruction type.
9020         (btrace_insn_from_recpy_insn): New function.
9021         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9022         btpy_new.
9023         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9024         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9025         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9026         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9027         instead of btpy_object.
9028         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9029         btpy_insn_data, btpy_insn_decode): Rename to ...
9030         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9031         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9032         recpy_bt_insn_decode): This.  Also, use new helper functions.
9033         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9034         recpy_insn_type.
9035         (btpy_insn_getset): Remove.
9036         (gdbpy_initialize_btrace): Remove code to initialize
9037         gdb.BtraceInstruction.  Use recpy_element_object.
9038         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9039         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9040         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9041         * python/py-record.c (recpy_insn_type): New static object.
9042         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9043         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9044         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9045         New function.
9046         (recpy_insn_getset): New static object.
9047         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9048         * python/py-record.h (recpy_element_object): New typedef.
9049         (recpy_insn_type, recpy_insn_new): New export.
9050
9051 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9052
9053         * py-record-btrace.c (btpy_insn_new): Removed.
9054         (btpy_insn_or_gap_new): New function.
9055         (btpy_insn_error): Removed.
9056         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9057         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9058         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9059         btpy_insn_or_gap_new instead of btpy_insn_new.
9060         (btpy_insn_getset): Remove btpy_insn_error.
9061         * py-record.c (recpy_gap_type): New static object.
9062         (recpy_gap_object): New typedef.
9063         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9064         recpy_gap_reason_string): New function.
9065         (recpy_gap_getset): New static object.
9066         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9067         * py-record.h (recpy_gap_new): New export.
9068
9069 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9070
9071         * python/py-record.c (recpy_ptid): Remove.
9072         (recpy_record_getset): Remove recpy_ptid.
9073
9074 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9075
9076         * btrace.c (btrace_fetch): Set inferior_ptid.
9077         * python/py-record-btrace.c: Add "py-record.h" include.
9078         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9079         recpy_bt_end, recpy_bt_instruction_history,
9080         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9081         in gdb.Record object instead of current ptid.
9082         * python/py-record.c: Include new "py-record.h" file.
9083         (recpy_record_object): Moved to py-record.h.
9084         * python/py-record.h: New file.
9085
9086 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9087
9088         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9089         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9090         indentation.
9091
9092 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9093
9094         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9095         the past maintainers section.
9096
9097 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9098
9099         * infcmd.c (get_return_value): Use regcache ctor, and remove
9100         cleanup.
9101
9102 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9103             Pedro Alves  <palves@redhat.com>
9104
9105         * regcache.c (regcache::regcache): New tag dispatch ctor.
9106         (do_cooked_read): Moved above.
9107         (regcache_dup): Use the tag dispatch ctor..
9108         * regcache.h (regcache): Declare ctor, delete copy ctor and
9109         assignment operator, remove friend regcache_dup.
9110
9111 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9112
9113         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9114         call method save instead of regcache_cpy.
9115         * regcache.h (struct regcache): Make regcache_dup a friend.
9116
9117 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9118
9119         * regcache.c (struct regcache): Move to regcache.h
9120         (regcache::arch): New method.
9121         (regcache_get_ptid): Update.
9122         (get_regcache_arch): Call arch method.
9123         (get_regcache_aspace): Call method aspace.
9124         (register_buffer): Change it to method.
9125         (regcache_save): Change it to regcache::save.
9126         (regcache_restore): Likewise.
9127         (regcache_cpy_no_passthrough): Remove the declaration.
9128         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9129         (regcache_cpy_no_passthrough): Change it to method
9130         cpy_no_passthrough.
9131         (regcache_register_status): Change it to method
9132         get_register_status.
9133         (regcache_invalidate): Change it to method invalidate.
9134         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9135         (regcache_raw_update): Change it to method raw_update.
9136         (regcache_raw_read): Likewise.
9137         (regcache_raw_read_signed): Likewise.
9138         (regcache_raw_read_unsigned): Likewise.
9139         (regcache_raw_write_signed): Likewise.
9140         (regcache_raw_write_unsigned): Likewise.
9141         (regcache_cooked_read): Likewise.
9142         (regcache_cooked_read_value): Likewise.
9143         (regcache_cooked_read_signed): Likewise.
9144         (regcache_cooked_read_unsigned): Likewise.
9145         (regcache_cooked_write_signed): Likewise.
9146         (regcache_cooked_write_unsigned): Likewise.
9147         (regcache_raw_set_cached_value): Likewise.
9148         (regcache_raw_write): Likewise.
9149         (regcache_cooked_write): Likewise.
9150         (regcache_xfer_part): Likewise.
9151         (regcache_raw_read_part): Likewise.
9152         (regcache_raw_write_part): Likewise.
9153         (regcache_cooked_read_part): Likewise.
9154         (regcache_cooked_write_part): Likewise.
9155         (regcache_raw_supply): Likewise.
9156         (regcache_raw_collect): Likewise.
9157         (regcache_transfer_regset): Likewise.
9158         (regcache_supply_regset): Likewise.
9159         (regcache_collect_regset): Likewise.
9160         (regcache_debug_print_register): Likewise.
9161         (enum regcache_dump_what): Move it to regcache.h.
9162         (regcache_dump): Change it to method dump.
9163         * regcache.h (enum regcache_dump_what): New.
9164         (class regcache): New.
9165         * target.c (target_fetch_registers): Call method
9166         debug_print_register.
9167         (target_store_registers): Likewise.
9168
9169 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9170
9171         * windows-nat.c (struct lm_info_windows): Initialize field.
9172         (windows_make_so): Allocate lm_info_windows with new.
9173         (windows_free_so): Free lm_info_windows with delete.
9174
9175 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9176
9177         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9178         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9179         cleanup.
9180         (darwin_free_so): Free lm_info_darwin with delete.
9181
9182 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9183
9184         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9185         <l_addr_p>: Change type to bool.
9186         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9187         (svr4_free_so): Free lm_info_svr4 with delete.
9188         (svr4_copy_library_list): Replace memcpy with call to copy
9189         constructor.
9190         (library_list_start_library, svr4_default_sos): Allocate
9191         lm_info_svr4 with new.
9192
9193 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9194
9195         * solib-target.c (struct lm_info_target): Add destructor,
9196         initialize fields.
9197         <name>: Change type to std::string.
9198         (library_list_start_library): Allocate lm_info_target with new.
9199         (solib_target_free_library_list): Free lm_info_target with
9200         delete.
9201         (solib_target_current_sos): Adapt to std::string.
9202         (solib_target_free_so): Free lm_info_target with delete.
9203
9204 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9205
9206         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9207         fields.
9208         (frv_current_sos): Allocate lm_info_frv with new.
9209         (frv_relocate_main_executable): Free lm_info_frv with delete,
9210         allocate with new.
9211         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9212
9213 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9214
9215         * solib-frv.c (struct lm_info_frv): Fix indentation.
9216
9217 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9218
9219         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9220         map field.
9221         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9222         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9223         and allocate with new.
9224         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9225
9226 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9227
9228         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9229         <filename, member_name>: Change type to std::string.
9230         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9231         (library_list_start_library): Allocate lm_info_aix with new.
9232         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9233         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9234         with copy constructor.
9235
9236 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9237
9238         * solist.h (struct lm_info): Remove.
9239         (struct lm_info_base): New class.
9240         (struct so_list) <lm_info>: Change type to lm_info_base *.
9241         * nto-tdep.c (struct lm_info): Remove.
9242         (lm_addr): Adjust.
9243         * solib-aix.c (struct lm_info): Rename to ...
9244         (struct lm_info_aix): ... this.  Extend lm_info_base.
9245         (lm_info_p): Rename to ...
9246         (lm_info_aix_p): ... this, and adjust.
9247         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9248         solib_aix_parse_libraries, library_list_start_library,
9249         solib_aix_free_library_list, solib_aix_parse_libraries,
9250         solib_aix_get_library_list,
9251         solib_aix_relocate_section_addresses, solib_aix_free_so,
9252         solib_aix_get_section_offsets,
9253         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9254         Adjust.
9255         (struct solib_aix_inferior_data) <library_list>: Adjust.
9256         * solib-darwin.c (struct lm_info): Rename to ...
9257         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9258         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9259         * solib-dsbt.c (struct lm_info): Rename to ...
9260         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9261         (struct dsbt_info) <main_executable_lm_info): Adjust.
9262         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9263         dsbt_relocate_section_addresses): Adjust.
9264         * solib-frv.c (struct lm_info): Rename to ...
9265         (struct lm_info_frv): ... this.  Extend lm_info_base.
9266         (main_executable_lm_info): Adjust.
9267         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9268         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9269         find_canonical_descriptor_in_load_object,
9270         frv_fdpic_find_canonical_descriptor): Adjust.
9271         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9272         to lm_info_svr4.
9273         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9274         svr4_clear_so, svr4_copy_library_list,
9275         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9276         svr4_current_sos, svr4_fetch_objfile_link_map,
9277         solist_update_incremental): Adjust.
9278         * solib-svr4.h (struct lm_info_svr4): Move here from
9279         solib-svr4.c.
9280         * solib-target.c (struct lm_info): Rename to ...
9281         (struct lm_info_target): ... this.  Extend lm_info_base.
9282         (lm_info_p): Rename to ...
9283         (lm_info_target_p): ... this.
9284         (solib_target_parse_libraries, library_list_start_segment,
9285         library_list_start_section, library_list_start_library,
9286         library_list_end_library, solib_target_free_library_list,
9287         solib_target_current_sos, solib_target_free_so,
9288         solib_target_relocate_section_addresses): Adjust.
9289         * windows-nat.c (struct lm_info): Rename to ...
9290         (struct lm_info_windows): ... this.  Extend lm_info_base.
9291         (windows_make_so, handle_load_dll, handle_unload_dll,
9292         windows_xfer_shared_libraries): Adjust.
9293
9294 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9295
9296         * solib-darwin.c (struct darwin_so_list): Remove.
9297         (darwin_current_sos): Allocate an so_list object instead of a
9298         darwin_so_list, separately allocate an lm_info object.
9299         (darwin_free_so): Free lm_info.
9300
9301 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9302
9303         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9304         with fprintf_filtered.
9305
9306 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9307
9308         * regcache.c (regcache::regcache): New function.
9309         (regcache::~regcache): New function.
9310         (regcache_xmalloc_1): Remove.
9311         (regcache_xmalloc): Call new regcache.
9312         (regcache_xfree): Call delete regcache.
9313         (get_thread_arch_aspace_regcache): Call new regcache.
9314
9315 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9316
9317         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9318         lwp instead of ptid_get_lwp.
9319
9320 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9321
9322         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9323         lwp_info instead of getting from inferior_ptid.
9324
9325 2017-04-27  Keith Seitz  <keiths@redhat.com>
9326
9327         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9328         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9329         (CV_CONVERSION_BADNESS): Define.
9330         (rank_one_type): Remove overly restrictive rvalue reference
9331         rank checks.
9332         Add cv-qualifier checks and subranks for type equality.
9333         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9334         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9335         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9336
9337 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9338
9339         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9340         count when creating the object.
9341
9342 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9343             Ulrich Weigand  <uweigand@de.ibm.com>
9344
9345         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9346         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9347         is used in AIX.
9348         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9349         (process_xcoff_symbol): Likewise.
9350         (scan_xcoff_symtab): Likewise.
9351
9352 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9353
9354         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9355         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9356         (ia64_access_reg): Use get_frame_register_unsigned.
9357         (ia64_access_rse_reg): Likewise.
9358         (ia64_libunwind_frame_prev_register): Likewise.
9359
9360 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9361
9362         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9363         * gdbarch.c: Regenerated.
9364         * gdbarch.h: Regenerated.
9365         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9366         visibility external.
9367         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9368         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9369         (enum cfa_how_kind): Move to ...
9370         (struct dwarf2_frame_state_reg_info): Likewise.
9371         (struct dwarf2_frame_state): Likewise.
9372         * dwarf2-frame.h: ... here.
9373         (dwarf2_frame_state_alloc_regs): New declaration.
9374         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9375         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9376
9377 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9378
9379         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9380         regcache_raw_read_unsigned.
9381         (xtensa_pseudo_register_write): Likewise.
9382
9383 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9384
9385         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9386         (nds32_pseudo_register_write): Likewise.
9387
9388 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9389
9390         * regcache.c (struct regcache) <readonly_p>: Change its type
9391         to bool.
9392         (regcache_xmalloc_1): Update parameter type and callers update.
9393
9394 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9395
9396         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9397         set_gdbarch_wchar_bit.
9398         * arm-tdep.c (arm_gdbarch_init): Likewise.
9399
9400 2017-04-25  Pedro Alves  <palves@redhat.com>
9401
9402         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9403         (BothAreRelocatable, memcopy, memmove): Don't define.
9404         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9405         macros.
9406
9407 2017-04-25  Pedro Alves  <palves@redhat.com>
9408
9409         * common/common-defs.h: Include "common/poison.h".
9410         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9411         and adjust.
9412         * common/poison.h: New file.
9413         * common/traits.h: Include <type_traits>.
9414         (Not, Or, Requires): New, moved from common/function-view.h.
9415
9416 2017-04-25  Pedro Alves  <palves@redhat.com>
9417
9418         * breakpoint.h (struct breakpoint): In-class initialize all
9419         fields.  Make boolean fields "bool".
9420         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9421         memset call and initializations no longer necessary.
9422
9423 2017-04-25  Pedro Alves  <palves@redhat.com>
9424
9425         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9426         reference.
9427         (pt_btrace_insn): New function.
9428         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9429
9430 2017-04-25  Pedro Alves  <palves@redhat.com>
9431
9432         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9433         "base" field and inherit from "bp_location" instead.  Add
9434         non-default ctor.
9435         (allocate_location_exception): Use new non-default ctor.
9436         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9437         (init_bp_location): Convert to ...
9438         (bp_location::bp_location): ... this new ctor, and remove memset
9439         call.
9440         (base_breakpoint_allocate_location): Use the new non-default ctor.
9441         * breakpoint.h (bp_location): Now a class.  Declare default and
9442         non-default ctors.  In-class initialize all members.
9443         (init_bp_location): Remove declaration.
9444
9445 2017-04-25  Pedro Alves  <palves@redhat.com>
9446
9447         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9448         assignment operator.
9449
9450 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9451
9452         * doublest.c (convert_doublest_to_floatformat): Call
9453         floatformat_totalsize_bytes.
9454
9455 2017-04-22  Tom Tromey  <tom@tromey.com>
9456
9457         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9458         ui_out_emit_list.
9459         * stack.c (print_frame): Use ui_out_emit_list.
9460         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9461         ui_out_emit_list.
9462         * mi/mi-main.c (print_one_inferior)
9463         (mi_cmd_data_list_register_names)
9464         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9465         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9466         ui_out_emit_list.
9467         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9468         (mi_output_solib_attribs): Use ui_out_emit_list,
9469         ui_out_emit_tuple.
9470         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9471         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9472         (mi_cmd_stack_list_args, list_args_or_locals): Use
9473         ui_out_emit_list.
9474         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9475         * breakpoint.c (print_solib_event, output_thread_groups): Use
9476         ui_out_emit_list.
9477
9478 2017-04-22  Tom Tromey  <tom@tromey.com>
9479
9480         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9481         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9482         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9483
9484 2017-04-22  Tom Tromey  <tom@tromey.com>
9485
9486         * tracepoint.c (tvariables_info_1)
9487         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9488
9489 2017-04-22  Tom Tromey  <tom@tromey.com>
9490
9491         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9492         annotate_arg_emitter.
9493         * breakpoint.c (print_mention_watchpoint)
9494         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9495         * annotate.h (struct annotate_arg_emitter): New.
9496
9497 2017-04-22  Tom Tromey  <tom@tromey.com>
9498
9499         * record-btrace.c (record_btrace_insn_history)
9500         (record_btrace_insn_history_range, record_btrace_call_history)
9501         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9502         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9503         ui_out_emit_tuple.
9504         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9505         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9506         * skip.c (skip_info): Use ui_out_emit_tuple.
9507         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9508         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9509         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9510         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9511         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9512         ui_out_emit_tuple.
9513         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9514         (output_register, mi_cmd_data_read_memory)
9515         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9516         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9517         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9518         Use ui_out_emit_tuple.
9519         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9520         ui_out_emit_tuple.
9521         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9522         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9523         * linux-thread-db.c (info_auto_load_libthread_db): Use
9524         ui_out_emit_tuple.
9525         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9526         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9527         * disasm.c (do_mixed_source_and_assembly_deprecated)
9528         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9529         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9530         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9531         * breakpoint.c (print_one_breakpoint_location)
9532         (print_one_breakpoint): Use ui_out_emit_tuple.
9533         * auto-load.c (print_script, info_auto_load_cmd): Use
9534         ui_out_emit_tuple.
9535         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9536
9537 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9538
9539         * thread.c (print_thread_info_1): Remove dead code.
9540
9541 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9542
9543         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9544         GDB_SELF_TEST.
9545         * arm-tdep.c (selftests::arm_record_test): Likewise.
9546
9547 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9548
9549         * regcache.c (regcache_restore): Remove argument 2.  Replace
9550         argument 3 with regcache.  Get register status from
9551         src->register_status and get register contents from
9552         register_buffer (src, regnum).
9553         (regcache_cpy): Update.
9554
9555 2017-04-19  Pedro Alves  <palves@redhat.com>
9556
9557         * gdbthread.h (thread): Add missing closing parenthesis in
9558         comment.
9559
9560 2017-04-19  Pedro Alves  <palves@redhat.com>
9561
9562         * common/refcounted-object.h: New file.
9563         * gdbthread.h: Include "common/refcounted-object.h".
9564         (thread_info): Inherit from refcounted_object and add comments.
9565         (thread_info::incref, thread_info::decref)
9566         (thread_info::m_refcount): Delete.
9567         (thread_info::deletable): Use the refcounted_object::refcount()
9568         method.
9569         * inferior.c (current_inferior_): Add comment.
9570         (set_current_inferior): Increment/decrement refcounts.
9571         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9572         not-deletable instead of comparing with the current inferior.
9573         (initialize_inferiors): Increment the initial inferior's refcount.
9574         * inferior.h (struct inferior): Forward declare.
9575         Include "common/refcounted-object.h".
9576         (current_inferior, set_current_inferior): Move declaration to
9577         before struct inferior's definition, and fix comment.
9578         (inferior): Inherit from refcounted_object.  Add comments.
9579         * thread.c (switch_to_thread_no_regs): Reference the thread's
9580         inferior pointer directly instead of doing a ptid lookup.
9581         (switch_to_no_thread): New function.
9582         (switch_to_thread(thread_info *)): New function, factored out
9583         from ...
9584         (switch_to_thread(ptid_t)): ... this.
9585         (restore_current_thread): Delete.
9586         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9587         fields, and add 'inf' field.
9588         (do_restore_current_thread_cleanup): Check whether old->inf is
9589         alive instead of looking up an inferior by ptid.  Use
9590         switch_to_thread and switch_to_no_thread.
9591         (restore_current_thread_cleanup_dtor): Use old->inf directly
9592         instead of lookup up an inferior by id.  Decref the inferior.
9593         Don't restore 'removable'.
9594         (make_cleanup_restore_current_thread): Same the inferior pointer
9595         in old, instead of the inferior number.  Incref the inferior.
9596         Don't save/clear 'removable'.
9597
9598 2017-04-19  Pedro Alves  <palves@redhat.com>
9599
9600         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9601         unittests/scoped_restore-selftests.c.
9602         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9603         * common/scoped_restore.h (scoped_restore_base): Make "class".
9604         (scoped_restore_base::release): New public method.
9605         (scoped_restore_base::scoped_restore_base): New protected ctor.
9606         (scoped_restore_base::m_saved_var): New protected field.
9607         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9608         scoped_restore_base base class instead of m_saved_var directly.
9609         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9610         (scoped_restore_tmpl::scoped_restore_tmpl(const
9611         scoped_restore_tmpl<T>&)): Likewise.
9612         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9613         method.
9614         (scoped_restore_tmpl::saved_var): New method.
9615         (scoped_restore_tmpl::m_saved_var): Delete.
9616         * inferior.h (inferior::detaching): Now a bool.
9617         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9618         cleanup.
9619         * unittests/scoped_restore-selftests.c: New file.
9620
9621 2017-04-19  Pedro Alves  <palves@redhat.com>
9622
9623         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9624         Re-sort in alphabetic order.
9625
9626 2017-04-18  Pedro Alves  <palves@redhat.com>
9627
9628         * xml-support.c (obstack_xml_printf): Delete.
9629         * xml-support.h (obstack_xml_printf): Delete.
9630
9631 2017-04-18  Pedro Alves  <palves@redhat.com>
9632
9633         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9634         vdebug, verror, body_text, start_element, end_element, name,
9635         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9636         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9637         is_xinclude>: Make private and add m_ prefix.
9638         (gdb_xml_parser::body_text): New method, based on ...
9639         (gdb_xml_body_text): ... this.  Adjust.
9640         (gdb_xml_parser::vdebug): New method, based on ...
9641         (gdb_xml_debug): ... this.  Adjust.
9642         (gdb_xml_parser::verror): New method, based on ...
9643         (gdb_xml_error): ... this.  Adjust.
9644         (gdb_xml_parser::start_element): New method, based on ...
9645         (gdb_xml_start_element): ... this.  Adjust.
9646         (gdb_xml_start_element_wrapper): Defer to
9647         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9648         (gdb_xml_parser::end_element): New method, based on ...
9649         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9650         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9651         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9652         (gdb_xml_parser::use_dtd): New method, based on ...
9653         (gdb_xml_use_dtd): ... this.  Adjust.
9654         (gdb_xml_parser::parse): New method, based on ...
9655         (gdb_xml_parse): ... this.  Adjust.
9656         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9657         (xinclude_start_include): Adjust to call the parser's name method.
9658         (xml_xinclude_default, xml_xinclude_start_doctype)
9659         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9660         method.
9661         (xml_process_xincludes): Adjust to call parser methods.
9662         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9663         declarations.
9664
9665 2017-04-18  Pedro Alves  <palves@redhat.com>
9666
9667         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9668         gdb::optional<std::string>.
9669         * xml-support.c: Include <string>.
9670         (scope_level::scope_level(scope_level &&))
9671         (scope_level::~scope_level): Delete.
9672         (scope_level::body): Now a std::string.
9673         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9674         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9675         parameter.
9676         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9677         (xinclude_parsing_data::output): Now a std::string reference.
9678         (xinclude_start_include): Adjust.
9679         (xml_xinclude_default): Adjust.
9680         (xml_process_xincludes): Add 'output' parameter, and return bool.
9681         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9682         and return bool.
9683         * xml-tdesc.c: Include <unordered_map> and <string>.
9684         (tdesc_xml_cache): Delete.
9685         (tdesc_xml_cache_s): Delete.
9686         (xml_cache): Now an std::unordered_map.
9687         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9688         (target_fetch_description_xml): Change return type to
9689         gdb::optional<std::string>, and adjust.
9690         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9691         (target_fetch_description_xml): Change return type to
9692         gdb::optional<std::string>.
9693
9694 2017-04-18  Pedro Alves  <palves@redhat.com>
9695
9696         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9697         unittests/optional-selftests.c.
9698         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9699         * unittests/optional-selftests.c: New file.
9700         * unittests/optional/assignment/1.cc: New file.
9701         * unittests/optional/assignment/2.cc: New file.
9702         * unittests/optional/assignment/3.cc: New file.
9703         * unittests/optional/assignment/4.cc: New file.
9704         * unittests/optional/assignment/5.cc: New file.
9705         * unittests/optional/assignment/6.cc: New file.
9706         * unittests/optional/assignment/7.cc: New file.
9707         * unittests/optional/cons/copy.cc: New file.
9708         * unittests/optional/cons/default.cc: New file.
9709         * unittests/optional/cons/move.cc: New file.
9710         * unittests/optional/cons/value.cc: New file.
9711         * unittests/optional/in_place.cc: New file.
9712         * unittests/optional/observers/1.cc: New file.
9713         * unittests/optional/observers/2.cc: New file.
9714
9715 2017-04-18  Pedro Alves  <palves@redhat.com>
9716
9717         * common/gdb_optional.h: Include common/traits.h.
9718         (in_place_t): New type.
9719         (in_place): New constexpr variable.
9720         (optional::optional): Remove member initialization of
9721         m_instantiated.
9722         (optional::optional(in_place_t...)): New constructor.
9723         (optional::~optional): Use reset.
9724         (optional::optional(const optional&)): New.
9725         (optional::optional(const optional&&)): New.
9726         (optional::optional(T &)): New.
9727         (optional::optional(T &&)): New.
9728         (operator::operator=(const optional &)): New.
9729         (operator::operator=(optional &&)): New.
9730         (operator::operator= (const T &))
9731         (operator::operator= (T &&))
9732         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9733         (operator::reset): New.
9734         (operator::m_instantiated):: Add in-class initializer.
9735         * common/traits.h: Include <type_traits>.
9736         (struct And): New types.
9737
9738 2017-04-18  Pedro Alves  <palves@redhat.com>
9739
9740         * xml-support.c: Include <vector>.
9741         (scope_level::scope_level(const gdb_xml_element *))
9742         (scope_level::scope_level(scope_level&&)): New.
9743         (scope_level::~scope_level): New.
9744         (scope_level_s): Delete.
9745         (gdb_xml_parser::scopes): Now a std::vector.
9746         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9747         Use std::vector.
9748         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9749         scope cleanup code.
9750         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9751         of the scopes member.  Use std::vector::emplace_back.
9752
9753 2017-04-18  Pedro Alves  <palves@redhat.com>
9754
9755         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9756         a bool.
9757         (gdb_xml_end_element): Change type of first parameter.
9758         (gdb_xml_cleanup): Rename to ...
9759         (gdb_xml_parser::~gdb_xml_parser): ... this.
9760         (gdb_xml_create_parser_and_cleanup): Delete with ...
9761         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9762         to this new ctor.
9763         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9764         using gdb_xml_create_parser_and_cleanup.
9765         (xinclude_parsing_data): Add ctor/dtor.
9766         (xml_xinclude_cleanup): Delete.
9767         (xml_process_xincludes): Create a local xinclude_parsing_data
9768         instead of heap-allocating one.  Create a local gdb_xml_parser
9769         instead of heap-allocating one with
9770         gdb_xml_create_parser_and_cleanup.
9771
9772 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9773
9774         PR threads/20743
9775         * fbsd-nat.c (resume_one_thread_cb): Remove.
9776         (resume_all_threads_cb): Remove.
9777         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9778         iterate_over_threads.
9779
9780 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9781
9782         * NEWS: Create a new section for the next release branch.
9783         Rename the section of the current branch, now that it has
9784         been cut.
9785
9786 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9787
9788         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9789         * version.in: Bump version to 8.0.50.DATE-git.
9790
9791 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9792
9793         PR gdb/21385
9794         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9795         independently of the host, and fix build breakage on Cygwin.
9796
9797 2017-04-13  Pedro Alves  <palves@redhat.com>
9798
9799         * inferior.c (free_inferior): Convert to ...
9800         (inferior::~inferior): ... this dtor.
9801         (inferior::inferior): New ctor, factored out from ...
9802         (add_inferior_silent): ... here.  Allocate the inferior with a new
9803         expression.
9804         (delete_inferior): Call delete instead of free_inferior.
9805         * inferior.h (gdb_environ, continuation): Forward declare.
9806         (inferior): Now a class.  Add in-class initialization to all
9807         members.  Make boolean fields bool, except 'detaching'.
9808         (inferior::inferior): New explicit ctor.
9809         (inferior::~inferior): New.
9810
9811 2017-04-13  Pedro Alves  <palves@redhat.com>
9812
9813         * inferior.c (init_inferior_list): Delete.
9814         * inferior.h (init_inferior_list): Delete.
9815
9816 2017-04-13  Pedro Alves  <palves@redhat.com>
9817
9818         PR threads/13217
9819         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9820         (top level): Call it twice, with different thread sets.
9821
9822 2017-04-13  Pedro Alves  <palves@redhat.com>
9823
9824         * thread.c: Include <algorithm>.
9825         (thread_array_cleanup): Delete.
9826         (scoped_inc_dec_ref): New class.
9827         (live_threads_count): New function.
9828         (set_thread_refcount): Delete.
9829         (tp_array_compar_ascending): Now a bool.
9830         (tp_array_compar): Convert to a std::sort comparison function.
9831         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9832         and live_threads_count.
9833
9834 2017-04-13  Pedro Alves  <palves@redhat.com>
9835
9836         * infrun.c (follow_fork_inferior): Also switch the current
9837         inferior.
9838
9839 2017-04-13  Pedro Alves  <palves@redhat.com>
9840
9841         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9842         before calling create_internal_breakpoint.
9843
9844 2017-04-13  Pedro Alves  <palves@redhat.com>
9845
9846         * fork-child.c (execv_argv): New class.
9847         (breakup_args): Refactored as ...
9848         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9849         Copy arguments to storage and replace separators with NULL
9850         terminators in place.
9851         (escape_bang_in_quoted_argument): Adjust to return bool.
9852         (execv_argv::execv_argv): New ctor.
9853         (execv_argv::init_for_shell): New method, factored out from
9854         fork_inferior.  Don't strdup strings into the vector.
9855         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9856         Remove free_vector_argv call.
9857
9858 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9859
9860         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9861         tdep->rx_psw_type.
9862
9863 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9864
9865         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9866         * rx-tdep.c (rx_gdbarch_init): Likewise.
9867
9868 2017-04-13  Pedro Alves  <palves@redhat.com>
9869
9870         * breakpoint.h (struct breakpoint): Reindent.
9871
9872 2017-04-13  Pedro Alves  <palves@redhat.com>
9873
9874         * breakpoint.c (bp_location): Rename to ...
9875         (bp_locations): ... this.  All references updated.
9876         (bp_location_count): Rename to ...
9877         (bp_locations_count): ... this.  All references updated.
9878         (bp_location_placed_address_before_address_max): Rename to ...
9879         (bp_locations_placed_address_before_address_max): ... this.  All
9880         references updated.
9881         (bp_location_shadow_len_after_address_max): Rename to ...
9882         (bp_locations_shadow_len_after_address_max): ... this.  All
9883         references updated.
9884         (bp_location_compare_addrs): Rename to ...
9885         (bp_locations_compare_addrs): ... this.  All references updated.
9886         (bp_location_compare):Rename to ...
9887         (bp_locations_compare): ... this.  All references updated.
9888         (bp_location_target_extensions_update): Rename to ...
9889         (bp_locations_target_extensions_update): ... this.  All references
9890         updated.
9891
9892 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9893
9894         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9895         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9896         'sgtty.h'.
9897         * common/gdb_termios.h: New file, with parts of "terminal.h".
9898         * inflow.c: Include "gdb_termios.h".
9899         * ser-unix.c: Include "gdb_termios.h".
9900         * terminal.h: Move terminal-related defines to
9901         "common/gdb_termios.h".
9902
9903 2017-04-12  Tom Tromey  <tom@tromey.com>
9904
9905         * probe.c (parse_probes): Update.
9906         * location.h (delete_event_location): Don't declare.
9907         (event_location_deleter::operator()): Update.
9908         * location.c (event_location_deleter::operator()): Rename from
9909         delete_event_location.
9910         * linespec.h (linespec_result) <location>: Change type to
9911         event_location_up.
9912         * linespec.c (canonicalize_linespec, event_location_to_sals)
9913         (decode_objc): Update.
9914         (linespec_result): Don't call delete_event_location.
9915         * breakpoint.c (create_breakpoints_sal)
9916         (bkpt_probe_create_sals_from_location)
9917         (strace_marker_create_sals_from_location): Update.
9918
9919 2017-04-12  Tom Tromey  <tom@tromey.com>
9920
9921         * linespec.h (struct linespec_result): Add constructor and
9922         destructor.
9923         (init_linespec_result, destroy_linespec_result)
9924         (make_cleanup_destroy_linespec_result): Don't declare.
9925         * linespec.c (init_linespec_result): Remove.
9926         (linespec_result::~linespec_result): Rename from
9927         destroy_linespec_result.  Update.
9928         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9929         Remove.
9930         * breakpoint.c (create_breakpoint, break_range_command)
9931         (decode_location_default): Update.
9932         * ax-gdb.c (agent_command_1): Update.
9933
9934 2017-04-12  Tom Tromey  <tom@tromey.com>
9935
9936         * remote.c (remote_download_tracepoint): Update.
9937         * python/py-breakpoint.c (bppy_get_location): Update.
9938         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9939         (gdbscm_breakpoint_location): Update.
9940         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9941         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9942         Change type to event_location_up.
9943         * breakpoint.c (create_overlay_event_breakpoint)
9944         (create_longjmp_master_breakpoint)
9945         (create_std_terminate_master_breakpoint)
9946         (create_exception_master_breakpoint)
9947         (breakpoint_event_location_empty_p, print_breakpoint_location)
9948         (print_one_breakpoint_location, create_thread_event_breakpoint)
9949         (init_breakpoint_sal, create_breakpoint)
9950         (print_recreate_ranged_breakpoint, break_range_command)
9951         (init_ada_exception_breakpoint, say_where): Update.
9952         (base_breakpoint_dtor): Don't call delete_event_location.
9953         (bkpt_print_recreate, tracepoint_print_recreate)
9954         (dprintf_print_recreate, update_static_tracepoint)
9955         (breakpoint_re_set_default): Update.
9956
9957 2017-04-12  Tom Tromey  <tom@tromey.com>
9958
9959         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9960         type of "to_do".  Update.
9961         (compute_stack_depth): Use std::vector.
9962
9963 2017-04-12  Tom Tromey  <tom@tromey.com>
9964
9965         * printcmd.c (find_instruction_backward): Use std::vector.
9966
9967 2017-04-12  Tom Tromey  <tom@tromey.com>
9968
9969         * symfile.c (objfilep): Remove typedef.
9970         (reread_symbols): Use a std::vector.
9971
9972 2017-04-12  Tom Tromey  <tom@tromey.com>
9973
9974         * mi/mi-main.c (exec_direction_forward): Remove.
9975         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9976         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9977         scoped_restore.
9978         * guile/guile.c (guile_repl_command, guile_command)
9979         (gdbscm_execute_gdb_command): Use scoped_restore.
9980         * go-exp.y (go_parse): Use scoped_restore.
9981         * d-exp.y (d_parse): Use scoped_restore.
9982         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9983         * c-exp.y (c_parse): Use scoped_restore.
9984
9985 2017-04-12  Tom Tromey  <tom@tromey.com>
9986
9987         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9988         (mi_parse): Update return type.
9989         (mi_parse_free): Remove.
9990         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9991         (mi_parse::~mi_parse): Rename from mi_parse_free.
9992         (mi_parse_cleanup): Remove.
9993         (mi_parse): Return a unique_ptr.  Use new.
9994         * mi/mi-main.c (mi_execute_command): Update.
9995
9996 2017-04-12  Tom Tromey  <tom@tromey.com>
9997
9998         * location.c (explicit_location_lex_one): Return a
9999         unique_xmalloc_ptr.
10000         (string_to_explicit_location): Update.  Remove cleanups.
10001
10002 2017-04-12  Tom Tromey  <tom@tromey.com>
10003
10004         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10005         (compare_value_and_voffset): Change type.  Update.
10006         (compute_vtable_size): Change type of "offset_vec".
10007         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10008         (gnuv3_get_typeid): Remove extraneous declaration.
10009
10010 2017-04-12  Tom Tromey  <tom@tromey.com>
10011
10012         * charset.h (wchar_iterator): Fix comment.
10013
10014 2017-04-12  Tom Tromey  <tom@tromey.com>
10015
10016         * charset.c (iconv_wrapper): New class.
10017         (cleanup_iconv): Remove.
10018         (convert_between_encodings): Use it.
10019
10020 2017-04-12  Tom Tromey  <tom@tromey.com>
10021
10022         * symfile.h (increment_reading_symtab): Update type.
10023         * symfile.c (decrement_reading_symtab): Remove.
10024         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10025         * psymtab.c (psymtab_to_symtab): Update.
10026         * dwarf2read.c (dw2_instantiate_symtab): Update.
10027
10028 2017-04-12  Tom Tromey  <tom@tromey.com>
10029
10030         * jit.c (struct jit_reader): Declare separately.  Add constructor
10031         and destructor.  Change type of "handle".
10032         (loaded_jit_reader): Define separately.
10033         (jit_reader_load): Update.  New "new".
10034         (jit_reader_unload_command): Use "delete".
10035         * gdb-dlfcn.h (struct dlclose_deleter): New.
10036         (gdb_dlhandle_up): New typedef.
10037         (gdb_dlopen, gdb_dlsym): Update types.
10038         (gdb_dlclose): Remove.
10039         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10040         (gdb_dlsym): Change type of "handle".
10041         (make_cleanup_dlclose): Remove.
10042         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10043         * compile/compile-c-support.c (load_libcc): Update.
10044
10045 2017-04-12  Tom Tromey  <tom@tromey.com>
10046
10047         * symtab.h (find_pcs_for_symtab_line): Change return type.
10048         * symtab.c (find_pcs_for_symtab_line): Change return type.
10049         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10050         type of "vec".  Update.
10051         (ltpy_get_pcs_for_line): Update.
10052         * linespec.c (decode_digits_ordinary): Update.
10053
10054 2017-04-12  Tom Tromey  <tom@tromey.com>
10055
10056         * tracepoint.c (actions_command): Update.
10057         * python/python.c (python_command, python_interactive_command):
10058         Update.
10059         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10060         * guile/guile.c (guile_command): Update.
10061         * defs.h (read_command_lines, read_command_lines_1): Return
10062         command_line_up.
10063         (command_lines_deleter): New struct.
10064         (command_line_up): New typedef.
10065         * compile/compile.c (compile_code_command)
10066         (compile_print_command): Update.
10067         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10068         command_line_up.
10069         (make_cleanup_free_command_lines): Remove.
10070         * cli/cli-script.c (get_command_line, read_command_lines_1)
10071         (copy_command_lines): Return command_line_up.
10072         (while_command, if_command, read_command_lines, define_command)
10073         (document_command): Update.
10074         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10075         Remove.
10076         * breakpoint.h (breakpoint_set_commands): Change type of
10077         "commands".
10078         * breakpoint.c (breakpoint_set_commands): Change type of
10079         "commands".  Update.
10080         (do_map_commands_command, update_dprintf_command_list)
10081         (create_tracepoint_from_upload): Update.
10082
10083 2017-04-12  Tom Tromey  <tom@tromey.com>
10084
10085         * tracepoint.c (scope_info): Update.
10086         * spu-tdep.c (spu_catch_start): Update.
10087         * python/python.c (gdbpy_decode_line): Update.
10088         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10089         * python/py-breakpoint.c (bppy_init): Update.
10090         * probe.c (parse_probes): Update.
10091         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10092         * location.h (event_location_deleter): New struct.
10093         (event_location_up): New typedef.
10094         (new_linespec_location, new_address_location, new_probe_location)
10095         (new_explicit_location, copy_event_location)
10096         (string_to_event_location, string_to_event_location_basic)
10097         (string_to_explicit_location): Update return type.
10098         (make_cleanup_delete_event_location): Remove.
10099         * location.c (new_linespec_location, new_address_location)
10100         (new_probe_location, new_explicit_location, copy_event_location):
10101         Return event_location_up.
10102         (delete_event_location_cleanup)
10103         (make_cleanup_delete_event_location): Remove.
10104         (string_to_explicit_location, string_to_event_location_basic)
10105         (string_to_event_location): Return event_location_up.
10106         * linespec.c (canonicalize_linespec, event_location_to_sals)
10107         (decode_line_with_current_source)
10108         (decode_line_with_last_displayed, decode_objc): Update.
10109         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10110         * completer.c (location_completer): Update.
10111         * cli/cli-cmds.c (edit_command, list_command): Update.
10112         * breakpoint.c (create_overlay_event_breakpoint)
10113         (create_longjmp_master_breakpoint)
10114         (create_std_terminate_master_breakpoint)
10115         (create_exception_master_breakpoint)
10116         (create_thread_event_breakpoint): Update.
10117         (init_breakpoint_sal): Update.  Remove some dead code.
10118         (create_breakpoint_sal): Change type of "location".  Update.
10119         (create_breakpoints_sal, create_breakpoint, break_command_1)
10120         (dprintf_command, break_range_command, until_break_command)
10121         (init_ada_exception_breakpoint)
10122         (strace_marker_create_sals_from_location)
10123         (update_static_tracepoint, trace_command, ftrace_command)
10124         (strace_command, create_tracepoint_from_upload): Update.
10125         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10126         * ax-gdb.c (agent_command_1): Update.
10127
10128 2017-04-12  Pedro Alves  <palves@redhat.com>
10129
10130         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10131         * configure.tgt: Handle i[34567]86-*-go32* and
10132         i[34567]86-*-msdosdjgpp*.
10133         * i386-tdep.c (i386_svr4_reg_to_regnum):
10134         Make extern.
10135         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10136         i386-go32-tdep.c.
10137         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10138         * i386-go32-tdep.c: New file.
10139         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10140         declarations.
10141
10142 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10143
10144         * aix-thread.c (pd_status2str): Change return type to const char *.
10145
10146 2017-04-12  Pedro Alves  <palves@redhat.com>
10147
10148         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10149         calls to set_gdbarch_gnu_triplet_regexp.
10150
10151 2017-04-12  Pedro Alves  <palves@redhat.com>
10152
10153         PR gdb/21323
10154         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10155         New enum value.
10156         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10157         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10158         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10159         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10160         * gdbarch.h, gdbarch.c: Regenerate.
10161         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10162         gdbarch_wchar_bit and gdbarch_wchar_signed.
10163         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10164         * arm-tdep.c (arm_gdbarch_init): Likewise.
10165         * avr-tdep.c (avr_gdbarch_init): Likewise.
10166         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10167         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10168         * i386-tdep.c (i386_go32_init_abi): Likewise.
10169         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10170         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10171         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10172         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10173         * sh-tdep.c (sh_gdbarch_init): Likewise.
10174         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10175         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10176         * windows-tdep.c (windows_init_abi): Likewise.
10177         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10178
10179 2017-04-12  Pedro Alves  <palves@redhat.com>
10180
10181         PR c++/21323
10182         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10183         cplus_primitive_type_char32_t>: New enum values.
10184         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10185         and cplus_primitive_type_char32_t.
10186         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10187         32, use the archtecture's built-in type for char16_t and char32_t,
10188         respectively.  Otherwise, fallback to init_integer_type as before,
10189         but make the type unsigned, and issue a complaint.
10190         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10191
10192 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10193
10194         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10195         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10196
10197 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10198
10199         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10200         'const char *'.
10201
10202 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10203
10204         * common/common-utils.c (free_vector_argv): New function.
10205         * common/common-utils.h: Include <vector>.
10206         (free_vector_argv): New prototype.
10207         * darwin-nat.c (darwin_create_inferior): Rewrite function
10208         prototype in order to constify "exec_file" and accept a
10209         "std::string" for "allargs".
10210         * fork-child.c: Include <vector>.
10211         (breakup_args): Rewrite function, using C++.
10212         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10213         and accept "std::string" for "allargs".  Update the code to
10214         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10215         and "execvp".
10216         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10217         order to constify "exec_file" and accept a "std::string" for
10218         "allargs".
10219         * go32-nat.c (go32_create_inferior): Likewise.
10220         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10221         * infcmd.c (run_command_1): Constify "exec_file".  Use
10222         "std::string" for inferior arguments.
10223         * inferior.h (fork_inferior): Update prototype.
10224         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10225         prototype in order to constify "exec_file" and accept a
10226         "std::string" for "allargs".
10227         * nto-procfs.c (procfs_create_inferior): Likewise.
10228         * procfs.c (procfs_create_inferior): Likewise.
10229         * remote-sim.c (gdbsim_create_inferior): Likewise.
10230         * remote.c (extended_remote_run): Update code to accept
10231         "std::string" as argument.
10232         (extended_remote_create_inferior): Rewrite function prototype in
10233         order to constify "exec_file" and accept a "std::string" for
10234         "allargs".
10235         * rs6000-nat.c (super_create_inferior): Likewise.
10236         (rs6000_create_inferior): Likewise.
10237         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10238         * windows-nat.c (windows_create_inferior): Likewise.
10239
10240 2017-04-11  Pedro Alves  <palves@redhat.com>
10241
10242         * thread.c: Fix whitespace throughout.
10243
10244 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10245
10246         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10247
10248 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10249
10250         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10251
10252 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10253
10254         PR gdb/21364
10255         * osdata.c (info_osdata): Check if 'type' is an empty string
10256         instead of NULL.
10257
10258 2017-04-10  Pedro Alves  <palves@redhat.com>
10259
10260         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10261         (ptid_to_global_thread_id, in_thread_list)
10262         (do_captured_list_thread_ids, set_resumed, set_running)
10263         (set_executing, set_stop_requested, finish_thread_state)
10264         (validate_registers_access, can_access_registers_ptid)
10265         (print_thread_info_1, switch_to_thread)
10266         (do_restore_current_thread_cleanup)
10267         (make_cleanup_restore_current_thread, thread_command)
10268         (thread_name_command): Use operator== instead of ptid_equal.
10269
10270 2017-04-10  Pedro Alves  <palves@redhat.com>
10271
10272         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10273         (current_thread_cleanup_chain): Delete.
10274         (restore_current_thread_cleanup_dtor)
10275         (make_cleanup_restore_current_thread): Remove references to
10276         current_thread_cleanup_chain.
10277
10278 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10279
10280         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10281         REG_UNKNOWN.
10282
10283 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10284
10285         PR gdb/19942
10286         * gdbthread.h (thread_info::deletable): New method.
10287         (thread_info::incref): New method.
10288         (thread_info::decref): New method.
10289         (thread_info::refcount): Move it to private.
10290         * infrun.c (save_stop_context): Call inc_refcount.
10291         (release_stop_context_cleanup): Likewise.
10292         * thread.c (set_thread_exited): New function.
10293         (init_thread_list): Delete "tp" only it is deletable, otherwise
10294         call set_thread_exited.
10295         (delete_thread_1): Call set_thread_exited.
10296         (current_thread_cleanup) <inferior_pid>: Remove.
10297         <thread>: New field.
10298         (restore_current_thread_ptid_changed): Removed.
10299         (do_restore_current_thread_cleanup): Adjust.
10300         (restore_current_thread_cleanup_dtor): Don't call
10301         find_thread_ptid.
10302         (set_thread_refcount): Use dec_refcount.
10303         (make_cleanup_restore_current_thread): Adjust.
10304         (thread_apply_all_command): Call inc_refcount.
10305         (_initialize_thread): Don't call
10306         observer_attach_thread_ptid_changed.
10307
10308 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10309
10310         * thread.c (delete_thread_1): Hoist code on marking thread as
10311         exited.
10312
10313 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10314
10315         * windows-nat.c (windows_detach): Initialize ptid with
10316         minus_one_ptid.
10317
10318 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10319
10320         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10321
10322 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10323
10324         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10325         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10326         (bfin_pseudo_register_write): Likewise
10327
10328 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10329
10330         * common/ptid.h (struct ptid): Change to...
10331         (class ptid_t): ... this.
10332         <ptid_t>: New constructors.
10333         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10334         matches>: New methods.
10335         <make_null, make_minus_one>: New static methods.
10336         <pid>: Rename to...
10337         <m_pid>: ...this.
10338         <lwp>: Rename to...
10339         <m_lwp>: ...this.
10340         <tid>: Rename to...
10341         <m_tid>: ...this.
10342         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10343         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10344         as references, move comment to class ptid_t.
10345         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10346         ptid_t static methods.
10347         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10348         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10349         Take ptid arguments as references, implement using ptid_t methods.
10350         * unittests/ptid-selftests.c: New file.
10351         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10352         unittests/ptid-selftests.c.
10353         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10354
10355 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10356
10357         * python/python.c (python_run_simple_file): Cast mode literal to
10358         non-const char pointer as expected by PyFile_FromString.
10359
10360 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10361
10362         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10363         minus_one_ptid and null_ptid.
10364
10365 2017-04-05  Pedro Alves  <palves@redhat.com>
10366
10367         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10368         * configure: Regenerate.
10369
10370 2017-04-05  Pedro Alves  <palves@redhat.com>
10371
10372         * ada-exp.y (yyerror): Constify.
10373         * ada-lang.c (bound_name, get_selections)
10374         (ada_variant_discrim_type)
10375         (ada_variant_discrim_name, ada_value_struct_elt)
10376         (ada_lookup_struct_elt_type, is_unchecked_variant)
10377         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10378         (catch_ada_exception_command_split)
10379         (catch_ada_assert_command_split, catch_assert_command)
10380         (ada_op_name): Constify.
10381         * ada-lang.h (ada_yyerror, get_selections)
10382         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10383         * arc-tdep.c (arc_print_frame_cache): Constify.
10384         * arm-tdep.c (arm_skip_stub): Constify.
10385         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10386         (gen_aggregate_elt_ref): Constify.
10387         * bcache.c (print_bcache_statistics): Constify.
10388         * bcache.h (print_bcache_statistics): Constify.
10389         * break-catch-throw.c (catch_exception_command_1):
10390         * breakpoint.c (struct ep_type_description::description):
10391         Constify.
10392         (add_solib_catchpoint): Constify.
10393         (catch_fork_command_1): Add cast.
10394         (add_catch_command): Constify.
10395         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10396         Constify.
10397         * bsd-uthread.c (bsd_uthread_state): Constify.
10398         * buildsym.c (patch_subfile_names): Constify.
10399         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10400         Constify.
10401         * c-exp.y (yyerror): Constify.
10402         (token::oper): Constify.
10403         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10404         * c-varobj.c (cplus_describe_child): Constify.
10405         * charset.c (find_charset_names): Add cast.
10406         (find_charset_names): Constify array and add const_cast.
10407         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10408         (edit_command): Constify.
10409         * cli/cli-decode.c (lookup_cmd): Constify.
10410         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10411         Constify.
10412         (struct dump_context): Constify.
10413         (add_dump_command, restore_command): Constify.
10414         * cli/cli-script.c (get_command_line): Constify.
10415         * cli/cli-script.h (get_command_line): Constify.
10416         * cli/cli-utils.c (check_for_argument): Constify.
10417         * cli/cli-utils.h (check_for_argument): Constify.
10418         * coff-pe-read.c (struct read_pe_section_data): Constify.
10419         * command.h (lookup_cmd): Constify.
10420         * common/print-utils.c (decimal2str): Constify.
10421         * completer.c (gdb_print_filename): Constify.
10422         * corefile.c (set_gnutarget): Constify.
10423         * cp-name-parser.y (yyerror): Constify.
10424         * cp-valprint.c (cp_print_class_member): Constify.
10425         * cris-tdep.c (cris_register_name, crisv32_register_name):
10426         Constify.
10427         * d-exp.y (yyerror): Constify.
10428         (struct token::oper): Constify.
10429         * d-lang.h (d_yyerror): Constify.
10430         * dbxread.c (struct header_file_location::name): Constify.
10431         (add_old_header_file, add_new_header_file, last_function_name)
10432         (dbx_next_symbol_text, add_bincl_to_list)
10433         (find_corresponding_bincl_psymtab, set_namestring)
10434         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10435         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10436         * defs.h (command_line_input, print_address_symbolic)
10437         (deprecated_readline_begin_hook): Constify.
10438         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10439         Constify.
10440         * event-top.c (handle_line_of_input): Constify and add cast.
10441         * exceptions.c (catch_errors): Constify.
10442         * exceptions.h (catch_errors): Constify.
10443         * expprint.c (print_subexp_standard, op_string, op_name)
10444         (op_name_standard, dump_raw_expression, dump_raw_expression):
10445         * expression.h (op_name, op_string, dump_raw_expression):
10446         Constify.
10447         * f-exp.y (yyerror): Constify.
10448         (struct token::oper): Constify.
10449         (struct f77_boolean_val::name): Constify.
10450         * f-lang.c (f_word_break_characters): Constify.
10451         * f-lang.h (f_yyerror): Constify.
10452         * fork-child.c (fork_inferior): Add cast.
10453         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10454         (new_variant): Constify.
10455         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10456         * gdbarch.c: Regenerate.
10457         * gdbcore.h (set_gnutarget): Constify.
10458         * go-exp.y (yyerror): Constify.
10459         (token::oper): Constify.
10460         * go-lang.h (go_yyerror): Constify.
10461         * go32-nat.c (go32_sysinfo): Constify.
10462         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10463         * guile/scm-cmd.c (cmdscm_function): Constify.
10464         * guile/scm-param.c (pascm_param_value): Constify.
10465         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10466         (h8300sx_register_name): Constify.
10467         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10468         Constify.
10469         * ia64-tdep.c (ia64_register_names): Constify.
10470         * infcmd.c (construct_inferior_arguments): Constify.
10471         (path_command, attach_post_wait): Constify.
10472         * language.c (show_range_command, show_case_command)
10473         (unk_lang_error): Constify.
10474         * language.h (language_defn::la_error)
10475         (language_defn::la_name_of_this): Constify.
10476         * linespec.c (decode_line_2): Constify.
10477         * linux-thread-db.c (thread_db_err_str): Constify.
10478         * lm32-tdep.c (lm32_register_name): Constify.
10479         * m2-exp.y (yyerror): Constify.
10480         * m2-lang.h (m2_yyerror): Constify.
10481         * m32r-tdep.c (m32r_register_names): Constify and make static.
10482         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10483         * m88k-tdep.c (m88k_register_name): Constify.
10484         * macroexp.c (appendmem): Constify.
10485         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10486         (upgrade_type, parse_external, parse_partial_symbols)
10487         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10488         (new_symbol): Constify.
10489         * memattr.c (mem_info_command): Constify.
10490         * mep-tdep.c (register_name_from_keyword): Constify.
10491         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10492         Constify.
10493         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10494         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10495         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10496         cast.
10497         (mi_execute_async_cli_command): Constify.
10498         * mips-tdep.c (mips_register_name): Constify.
10499         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10500         (am33_register_name, am33_2_register_name)
10501         * moxie-tdep.c (moxie_register_names): Constify.
10502         * nat/linux-osdata.c (osdata_type): Constify fields.
10503         * nto-tdep.c (nto_parse_redirection): Constify.
10504         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10505         (lookup_child_selector): Constify.
10506         (objc_methcall::name): Constify.
10507         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10508         (lookup_struct_typedef): Constify.
10509         * objfiles.c (pc_in_section): Constify.
10510         * objfiles.h (pc_in_section): Constify.
10511         * p-exp.y (struct token::oper): Constify.
10512         (yyerror): Constify.
10513         * p-lang.h (pascal_yyerror): Constify.
10514         * parser-defs.h (op_name_standard): Constify.
10515         (op_print::string): Constify.
10516         (exp_descriptor::op_name): Constify.
10517         * printcmd.c (print_address_symbolic): Constify.
10518         * psymtab.c (print_partial_symbols): Constify.
10519         * python/py-breakpoint.c (stop_func): Constify.
10520         (bppy_get_expression): Constify.
10521         * python/py-cmd.c (cmdpy_completer::name): Constify.
10522         (cmdpy_function): Constify.
10523         * python/py-event.c (evpy_add_attribute)
10524         (gdbpy_initialize_event_generic): Constify.
10525         * python/py-event.h (evpy_add_attribute)
10526         (gdbpy_initialize_event_generic): Constify.
10527         * python/py-evts.c (add_new_registry): Constify.
10528         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10529         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10530         * python/py-inferior.c (get_buffer): Add cast.
10531         * python/py-param.c (parm_constant::name): Constify.
10532         * python/py-unwind.c (fprint_frame_id): Constify.
10533         * python/python.c (gdbpy_parameter_value): Constify.
10534         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10535         * remote.c (memory_packet_config::name): Constify.
10536         (show_packet_config_cmd, remote_write_bytes)
10537         (remote_buffer_add_string):
10538         * reverse.c (exec_reverse_once): Constify.
10539         * rs6000-tdep.c (variant::name, variant::description): Constify.
10540         * rust-exp.y (rustyyerror): Constify.
10541         * rust-lang.c (rust_op_name): Constify.
10542         * rust-lang.h (rustyyerror): Constify.
10543         * serial.h (serial_ops::name): Constify.
10544         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10545         (sh_sh3e_register_name, sh_sh2e_register_name)
10546         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10547         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10548         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10549         (sh_sh4al_dsp_register_name): Constify.
10550         * sh64-tdep.c (sh64_register_name): Constify.
10551         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10552         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10553         * stabsread.c (patch_block_stabs, read_type_number)
10554         (ref_map::stabs, ref_add, process_reference)
10555         (symbol_reference_defined, define_symbol, define_symbol)
10556         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10557         (read_one_struct_field, read_struct_fields, read_baseclasses)
10558         (read_tilde_fields, read_struct_type, read_array_type)
10559         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10560         (read_huge_number, read_range_type, read_args, common_block_start)
10561         (find_name_end): Constify.
10562         * stabsread.h (common_block_start, define_symbol)
10563         (process_one_symbol, symbol_reference_defined, ref_add):
10564         * symfile.c (get_section_index, add_symbol_file_command):
10565         * symfile.h (get_section_index): Constify.
10566         * target-descriptions.c (tdesc_type::name): Constify.
10567         (tdesc_free_type): Add cast.
10568         * target.c (find_default_run_target):
10569         (add_deprecated_target_alias, find_default_run_target)
10570         (target_announce_detach): Constify.
10571         (do_option): Constify.
10572         * target.h (add_deprecated_target_alias): Constify.
10573         * thread.c (print_thread_info_1): Constify.
10574         * top.c (deprecated_readline_begin_hook, command_line_input):
10575         Constify.
10576         (init_main): Add casts.
10577         * top.h (handle_line_of_input): Constify.
10578         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10579         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10580         (tfind_command): Rename to ...
10581         (tfind_command_1): ... this and constify.
10582         (tfind_command): New function.
10583         (tfind_end_command, tfind_start_command): Adjust.
10584         (encode_source_string): Constify.
10585         * tracepoint.h (encode_source_string): Constify.
10586         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10587         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10588         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10589         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10590         * tui/tui-win.c (parse_scrolling_args): Constify.
10591         * tui/tui-windata.c (tui_erase_data_content): Constify.
10592         * tui/tui-windata.h (tui_erase_data_content): Constify.
10593         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10594         * tui/tui.c (tui_enable): Add cast.
10595         * utils.c (defaulted_query): Constify.
10596         (init_page_info): Add cast.
10597         (puts_debug, subset_compare): Constify.
10598         * utils.h (subset_compare): Constify.
10599         * varobj.c (varobj_format_string): Constify.
10600         * varobj.h (varobj_format_string): Constify.
10601         * vax-tdep.c (vax_register_name): Constify.
10602         * windows-nat.c (windows_detach): Constify.
10603         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10604         * xml-support.c (gdb_xml_end_element): Constify.
10605         * xml-tdesc.c (tdesc_start_reg): Constify.
10606         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10607         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10608         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10609
10610 2017-04-05  Pedro Alves  <palves@redhat.com>
10611
10612         * proc-api.c (struct trans): Constify.
10613         (procfs_note): Constify.
10614         * proc-events.c (struct trans, syscall_table):
10615         * proc-flags.c (struct trans): Constify.
10616         * proc-utils.h (procfs_note): Constify.
10617         * proc-why.c (struct trans): Constify.
10618         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10619         (procfs_detach): Constify.
10620         * sol-thread.c (struct string_map): Constify.
10621         (td_err_string, td_state_string): Constify.
10622
10623 2017-04-05  Pedro Alves  <palves@redhat.com>
10624
10625         * proc-api.c (procfs_filename): Don't initialize
10626         procfs_filename.
10627         (prepare_to_trace): Assume procfs_filename is non-NULL.
10628         (_initialize_proc_api): Give procfs_filename a default value here.
10629
10630 2017-04-05  Pedro Alves  <palves@redhat.com>
10631
10632         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10633         'cond_string' parameter.
10634         (extract_exception_regexp): Constify 'string' parameter.
10635         (catch_exception_command_1): Constify.
10636         * breakpoint.c (init_catchpoint)
10637         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10638         parameter.
10639         (ep_parse_optional_if_clause, catch_fork_command_1)
10640         (catch_exec_command_1): Constify.
10641         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10642         parameter.
10643         (ep_parse_optional_if_clause): Constify.
10644         * cli/cli-utils.c (remove_trailing_whitespace)
10645         (check_for_argument): Constify.
10646         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10647         non-const overload.
10648         (check_for_argument): Likewise.
10649
10650 2017-04-05  Pedro Alves  <palves@redhat.com>
10651
10652         * event-top.c (command_line_handler): Add cast to execute_command
10653         call.
10654         * record-btrace.c (cmd_record_btrace_bts_start)
10655         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10656         (cmd_record_btrace_start): Add cast to execute_command call.
10657         * record-full.c (record_full_goto_insn):
10658         * record.c (record_start, record_stop): Add cast to
10659         execute_command_to_string calls.
10660         (cmd_record_start): Add cast to execute_command calls.
10661
10662 2017-04-05  Pedro Alves  <palves@redhat.com>
10663
10664         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10665         static inline function.
10666         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10667         array and use gdb_PyArg_ParseTupleAndKeywords.
10668         * python/py-cmd.c (cmdpy_init): Likewise.
10669         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10670         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10671         (infpy_search_memory): Likewise.
10672         * python/py-objfile.c (objfpy_add_separate_debug_file)
10673         (gdbpy_lookup_objfile): Likewise.
10674         * python/py-symbol.c (gdbpy_lookup_symbol)
10675         (gdbpy_lookup_global_symbol): Likewise.
10676         * python/py-type.c (gdbpy_lookup_type): Likewise.
10677         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10678         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10679         Likewise.
10680
10681 2017-04-05  Pedro Alves  <palves@redhat.com>
10682
10683         * python/python-internal.h (gdb_PyGetSetDef): New type.
10684         * python/py-block.c (block_object_getset)
10685         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10686         * python/py-event.c (event_object_getset)
10687         (finish_breakpoint_object_getset): Likewise.
10688         * python/py-inferior.c (inferior_object_getset): Likewise.
10689         * python/py-infthread.c (thread_object_getset): Likewise.
10690         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10691         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10692         * python/py-objfile.c (objfile_getset): Likewise.
10693         * python/py-progspace.c (pspace_getset): Likewise.
10694         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10695         Likewise.
10696         * python/py-record.c (recpy_record_getset): Likewise.
10697         * python/py-symbol.c (symbol_object_getset): Likewise.
10698         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10699         Likewise.
10700         * python/py-type.c (type_object_getset, field_object_getset):
10701         Likewise.
10702         * python/py-value.c (value_object_getset): Likewise.
10703
10704 2017-04-05  Pedro Alves  <palves@redhat.com>
10705
10706         * python/python-internal.h (gdb_PyObject_CallMethod)
10707         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10708         New functions.
10709         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10710         (PySys_GetObject, PySys_SetPath): New macros.
10711
10712 2017-04-05  Pedro Alves  <palves@redhat.com>
10713
10714         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10715         info_osdata_command.
10716         * osdata.c (info_osdata_command): Rename to ...
10717         (info_osdata): ... this.  Constify 'type' parameter, and remove
10718         the 'from_tty' parameter.  Accept NULL TYPE.
10719         (info_osdata_command): New function.
10720         * osdata.h (info_osdata_command): Remove declaration.
10721         (info_osdata): New declaration.
10722
10723 2017-04-05  Pedro Alves  <palves@redhat.com>
10724
10725         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10726         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10727         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10728         parameter.
10729         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10730         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10731         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10732         parameter.
10733         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10734         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10735         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10736         (mi_cmd_file_list_exec_source_files)
10737         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10738         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10739         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10740         parameter.
10741         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10742         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10743         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10744         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10745         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10746         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10747         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10748         'command' parameter.
10749         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10750         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10751         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10752         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10753         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10754         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10755         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10756         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10757         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10758         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10759         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10760         parameter.
10761         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10762         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10763         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10764         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10765         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10766         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10767         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10768         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10769         (mi_cmd_data_list_changed_registers)
10770         (mi_cmd_data_write_register_values)
10771         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10772         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10773         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10774         (mi_cmd_list_features, mi_cmd_list_target_features)
10775         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10776         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10777         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10778         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10779         (mi_cmd_trace_frame_collected): Constify 'command'
10780         parameter.
10781         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10782         'command' parameter.
10783
10784 2017-04-05  Pedro Alves  <palves@redhat.com>
10785
10786         * ada-lang.c (ada_completer_word_break_characters): Now a const
10787         array.
10788         (ada_get_gdb_completer_word_break_characters): Constify.
10789         * completer.c (gdb_completer_command_word_break_characters)
10790         (gdb_completer_file_name_break_characters)
10791         (gdb_completer_quote_characters): Now const arrays.
10792         (get_gdb_completer_quote_characters): Constify.
10793         (set_rl_completer_word_break_characters): New function.
10794         (set_gdb_completion_word_break_characters)
10795         (complete_line_internal): Use it.
10796         * completer.h (get_gdb_completer_quote_characters): Constify.
10797         (set_rl_completer_word_break_characters): Declare.
10798         * f-lang.c (f_word_break_characters): Constify.
10799         * language.c (default_word_break_characters): Constify.
10800         * language.h (language_defn::la_word_break_characters): Constify.
10801         (default_word_break_characters): Constify.
10802         * top.c (init_main): Use set_rl_completer_word_break_characters.
10803
10804 2017-04-05  Pedro Alves  <palves@redhat.com>
10805
10806         * aix-thread.c (aix_thread_pid_to_str)
10807         (aix_thread_extra_thread_info): Constify.
10808         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10809         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10810         (bsd_uthread_pid_to_str): Constify.
10811         * corelow.c (core_pid_to_str): Constify.
10812         * darwin-nat.c (darwin_pid_to_str): Constify.
10813         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10814         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10815         Constify.
10816         * gnu-nat.c (gnu_pid_to_str): Constify.
10817         * go32-nat.c (go32_pid_to_str): Constify.
10818         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10819         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10820         * inferior.c (inferior_pid_to_str): Constify.
10821         * linux-nat.c (linux_nat_pid_to_str): Constify.
10822         * linux-tdep.c (linux_core_pid_to_str): Constify.
10823         * linux-thread-db.c (thread_db_pid_to_str)
10824         (thread_db_extra_thread_info): Constify.
10825         * nto-tdep.c (nto_extra_thread_info): Constify.
10826         * nto-tdep.h (nto_extra_thread_info): Constify.
10827         * obsd-nat.c (obsd_pid_to_str): Constify.
10828         * procfs.c (procfs_pid_to_str): Constify.
10829         * ravenscar-thread.c (ravenscar_extra_thread_info)
10830         (ravenscar_pid_to_str): Constify.
10831         * remote-sim.c (gdbsim_pid_to_str): Constify.
10832         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10833         Constify.
10834         * sol-thread.c (solaris_pid_to_str): Constify.
10835         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10836         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10837         * target.c (default_pid_to_str, target_pid_to_str)
10838         (normal_pid_to_str, default_pid_to_str): Constify.
10839         * target.h (target_ops::to_pid_to_str)
10840         (target_ops::to_extra_thread_info): Constify.
10841         (target_pid_to_str, normal_pid_to_str): Constify.
10842         * windows-nat.c (windows_pid_to_str): Constify.
10843         * gdbarch.sh (core_pid_to_str): Constify.
10844         * target-delegates.c: Regenerate.
10845         * gdbarch.h, gdbarch.c: Regenerate.
10846
10847 2017-04-05  Pedro Alves  <palves@redhat.com>
10848
10849         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10850         the memory of the temporary warning_pre_print override.
10851         * utils.c (warning_pre_print): Constify.
10852         * utils.h (warning_pre_print): Constify.
10853
10854 2017-04-05  Pedro Alves  <palves@redhat.com>
10855
10856         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10857         (shell_command): New function.
10858         (make_command): Use std::string.
10859         (init_cli_cmds): Register shell_command instead of shell_escape.
10860
10861 2017-04-05  Pedro Alves  <palves@redhat.com>
10862
10863         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10864         * tracepoint.c (default_collect): Don't initialize.
10865
10866 2017-04-05  Pedro Alves  <palves@redhat.com>
10867
10868         * macroexp.c (macro_buffer::shared): Now a bool.
10869         (init_buffer): Update.
10870         (init_shared_buffer): Constify 'addr' parameter.
10871         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10872         casts.
10873
10874 2017-04-05  Pedro Alves  <palves@redhat.com>
10875
10876         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10877         * disasm.c (set_disassembler_options): Constify local.
10878         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10879
10880 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10881
10882         PR gdb/21352
10883         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10884         option.
10885
10886 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10887
10888         * frame.c (frame_unwind_register_unsigned): Call
10889         frame_unwind_register_value.
10890
10891 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10892
10893         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10894         Use gdb_test_multiple, and don't match anchor.
10895
10896 2017-04-05  Pedro Alves  <palves@redhat.com>
10897
10898         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10899         (Write After Approval): Remove Simon Marchi.
10900
10901 2017-04-05  Pedro Alves  <palves@redhat.com>
10902
10903         * common/gdb_optional.h (optional::optional): Make constexpr and
10904         initialize m_dummy.
10905
10906 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10907
10908         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10909         (amd64fbsd_jmp_buf_reg_offset): Remove.
10910         (amd64fbsd_supply_uthread): Remove function.
10911         (amd64fbsd_collect_uthread): Remove function.
10912         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10913         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10914         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10915         (fbsd-nat.c): Update comment.
10916         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10917         (i386fbsd_jmp_buf_reg_offset): Remove.
10918         (i386fbsd_supply_uthread): Remove function.
10919         (i386fbsd_collect_uthread): Remove function.
10920         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10921
10922 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10923
10924         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10925         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10926         * NEWS: Mention that support for FreeBSD/alpha was removed.
10927         * alpha-fbsd-tdep.c: Delete file.
10928         * config/alpha/fbsd.mh: Delete file.
10929         * configure.host: Delete alpha*-*-freebsd* and
10930         alpha*-*-kfreebsd*-gnu.
10931         * configure.tgt: Delete alpha*-*-freebsd* and
10932         alpha*-*-kfreebsd*-gnu.
10933
10934 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10935
10936         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10937         amd64bsd_store_inferior_registers): Use ptid from regcache.
10938
10939 2017-04-04  Pedro Alves  <palves@redhat.com>
10940
10941         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10942         data fields, make them private and add "m_" prefixes.
10943         (lnp_state_machine::lnp_state_machine): New ctor.
10944         (record_line, check_line_address, handle_set_discriminator)
10945         (handle_set_address, handle_advance_pc, handle_special_opcode)
10946         (handle_advance_line, handle_set_file, handle_negate_stmt)
10947         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10948         (end_sequence, advance_line): New methods.
10949         (m_gdbarch, m_record_lines_p): New fields.
10950         (lnp_reader_state): Delete.
10951         (dwarf_record_line): Rename to ...
10952         (lnp_state_machine::record_line): ... adjust.
10953         (init_lnp_state_machine): Delete.
10954         (lnp_state_machine::lnp_state_machine): New.
10955         (check_line_address): Rename to ...
10956         (lnp_state_machine::check_line_address): This.
10957         (dwarf_decode_lines_1): Remove reference to "reader_state".
10958         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10959         State machine internal state manipulation moved to
10960         lnp_state_machine methods.
10961
10962 2017-04-04  Pedro Alves  <palves@redhat.com>
10963
10964         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10965         unittests/offset-type-selftests.c.
10966         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10967         * common/offset-type.h: New file.
10968         * common/preprocessor.h: New file.
10969         * common/traits.h: New file.
10970         * common/valid-expr.h: New file.
10971         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10972         sect_offset and cu_offset strong typedefs throughout.
10973         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10974         typedefs throughout.
10975         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10976         sect_offset and cu_offset strong typedefs throughout.
10977         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10978         typedefs throughout.
10979         * gdbtypes.h: Include "common/offset-type.h".
10980         (cu_offset): Now an offset type (strong typedef) instead of a
10981         struct.
10982         (sect_offset): Likewise.
10983         (union call_site_parameter_u): Rename "param_offset" field to
10984         "param_cu_off".
10985         * unittests/offset-type-selftests.c: New file.
10986
10987 2017-04-04  Pedro Alves  <palves@redhat.com>
10988
10989         * common/underlying.h: New file.
10990         * dwarf2read.c: Include "common/gdb_optional.h" and
10991         "common/underlying.h".
10992         (dir_index, file_name_index): New types.
10993         (file_entry): Use them.
10994         (file_entry::include): Use to_underlying.
10995         (line_header::add_file_name): Use dir_index.
10996         (read_formatted_entries): Use gdb::optional.  Read form before
10997         writting to file_entry.
10998         (dwarf_decode_line_header): Use dir_index.
10999         (lnp_state_machine::current_file): Use to_underlying.
11000         (lnp_state_machine::file): Change type to file_name_index.
11001         (dwarf_record_line): Use to_underlying.
11002         (init_lnp_state_machine): Use file_name_index.
11003         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11004
11005 2017-04-04  Pedro Alves  <palves@redhat.com>
11006
11007         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11008         operator bool, has_value and get methods.
11009
11010 2017-04-04  Pedro Alves  <palves@redhat.com>
11011
11012         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11013         fields.
11014         (line_header): Initialize all data fields.  Change type of
11015         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11016         Change type of include_dirs to std::vector<const char *>.  Remove
11017         num_include_dirs, include_dirs_size.  Change type of file_names to
11018         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11019         (line_header::line_header): New.
11020         (line_header::add_include_dir, line_header::add_file_name): New
11021         methods.
11022         (line_header::include_dir_at): Remove NULL check.
11023         (line_header::file_name_at): Add const overload.
11024         (line_header_up): New unique_ptr typedef.
11025         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11026         std::vector.  Remove free_line_header call.
11027         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11028         free_line_header call.
11029         (free_cu_line_header): Delete.
11030         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11031         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11032         Adjust to use std::vector.
11033         (free_line_header): Delete.
11034         (free_line_header_voidp): Use delete.
11035         (add_include_dir): Replace with ...
11036         (line_header::add_include_dir): ... this method.  Use std::vector.
11037         (add_file_name): Replace with ...
11038         (line_header::add_file_name): ... this method.  Use std::vector.
11039         (add_include_dir_stub): Delete.
11040         (read_formatted_entries): Remove memset.
11041         (dwarf_decode_line_header): Return a line_header_up instead of a
11042         raw pointer.  Remove cleanup handling.  Pass lambdas to
11043         read_formatted_entries.  Adjust to use line_header methods.
11044         (dwarf_decode_lines_1): Adjust to use line_header methods.
11045         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11046         use std::vector.
11047
11048 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11049
11050         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11051         instead of struct ptid.
11052
11053 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11054
11055         * frame.c (get_frame_register_bytes): Unwind using value.
11056         (put_frame_register_bytes): Likewise.
11057
11058 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11059
11060         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11061         aggregate-like.
11062
11063 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11064
11065         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11066
11067 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11068
11069         * gdbthread.h (struct thread_info): Declare constructor and
11070         destructor.  Add some in-class member initializers.
11071         * thread.c (free_thread): Remove.
11072         (init_thread_list): Call delete instead of free_thread.
11073         (new_thread): Call thread_info constructor.
11074         (thread_info::thread_info): New function.
11075         (thread_info::~thread_info): New function.
11076         (delete_thread_1): Call delete instead of free_thread.
11077         (make_cleanup_restore_current_thread): Move tp and frame to
11078         inner block.
11079
11080 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11081
11082         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11083         (arc_skip_prologue): Likewise.
11084         (arc_make_frame_cache): Likewise.
11085         (arc_pv_get_operand): New function.
11086         (arc_is_in_prologue): Likewise.
11087         (arc_analyze_prologue): Likewise.
11088         (arc_print_frame_cache): Likewise.
11089         (MAX_PROLOGUE_LENGTH): New constant.
11090
11091 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11092
11093         * configure.tgt: Add arc-insn.o.
11094         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11095         (dump_arc_instruction_command): New function.
11096         (arc_fprintf_disasm): Likewise.
11097         (arc_disassemble_info): Likewise.
11098         (arc_insn_get_operand_value): Likewise.
11099         (arc_insn_get_operand_value_signed): Likewise.
11100         (arc_insn_get_memory_base_reg): Likewise.
11101         (arc_insn_get_memory_offset): Likewise.
11102         (arc_insn_get_branch_target): Likewise.
11103         (arc_insn_dump): Likewise.
11104         (arc_insn_get_linear_next_pc): Likewise.
11105         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11106         (arc_disassemble_info): Likewise.
11107         (arc_insn_get_branch_target): Likewise.
11108         (arc_insn_get_linear_next_pc): Likewise.
11109         * NEWS: Mention new "maint print arc arc-instruction".
11110
11111 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11112
11113         * arc-tdep (maintenance_print_arc_list): New variable.
11114         (maintenance_print_arc_command): New function.
11115
11116 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11117
11118         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11119         Add "limm" and "reserved".
11120         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11121         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11122         * arc-tdep.h (arc_regnum): Likewise.
11123
11124 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11125
11126         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11127         for THREADPTR register.
11128         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11129         register.
11130         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11131         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11132         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11133
11134 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11135
11136         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11137         registers above gdbarch_num_regs (gdbarch) as privileged in
11138         call0 ABI.
11139
11140 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11141
11142         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11143         for a single specified register or for all registers in
11144         a0_base..a0_base + C0_NREGS range.
11145         (supply_gregset_reg): Call regcache_raw_supply for a single
11146         specified register or for all registers in a0_base..a0_base +
11147         C0_NREGS range.
11148
11149 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11150
11151         * arch/xtensa.h (C0_NREGS): Add definition.
11152         * xtensa-tdep.c (C0_NREGS): Remove definition.
11153
11154 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11155
11156         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11157         Drop xtensa_default_isa initialization.
11158         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11159
11160 2017-03-27  Pedro Alves  <palves@redhat.com>
11161
11162         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11163         (file_entry::include_dir): New method.
11164         (line_header::include_dir_at, line_header::file_name_at): New
11165         methods.
11166         (setup_type_unit_groups, setup_type_unit_groups)
11167         (psymtab_include_file_name): Simplify using the new methods.
11168         (lnp_state_machine) <the_line_header>: New field.
11169         <file>: Add comment.
11170         (lnp_state_machine::current_file): New method.
11171         (dwarf_record_line): Simplify using the new methods.
11172         (init_lnp_state_machine): Initialize the "the_line_header" field.
11173         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11174         Simplify using the new methods.
11175
11176 2017-03-27  Pedro Alves  <palves@redhat.com>
11177
11178         * cp-name-parser.y (make_empty): Delete.
11179         (demangler_special, nested_name, ptr_operator, array_indicator)
11180         (direct_declarator, declarator_1): Use fill_comp instead of
11181         make_empty.
11182
11183 2017-03-27  Pedro Alves  <palves@redhat.com>
11184
11185         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11186         to ATTRIBUTE_PRINTF.
11187         * solib-target.c (library_list_start_list): Print "string" not
11188         "version".
11189         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11190         gdb_xml_error call.
11191
11192 2017-03-27  Pedro Alves  <palves@redhat.com>
11193
11194         * dwarf2read.c (struct file_and_directory): New.
11195         (dwarf2_get_dwz_file): Adjust to use std::string.
11196         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11197         (find_file_and_directory): Adjust to return a file_and_directory
11198         object.
11199         (read_file_scope): Adjust to use file_and_directory.  Remove
11200         make_cleanup/do_cleanups calls.
11201         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11202         make_cleanup/do_cleanups calls.
11203         * python/python.c (do_start_initialization): Adjust to ldirname
11204         returning a std::string.
11205         * utils.c (ldirname): Now returns a std::string.
11206         * utils.h (ldirname): Change return type to std::string.
11207         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11208         returning a std::string.
11209         * xml-tdesc.c (file_read_description_xml): Likewise.
11210
11211 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11212
11213         * regcache.c (regcache_debug_print_register): New function.
11214         * regcache.h (regcache_debug_print_register): New declaration.
11215         * target.c (debug_print_register): Remove.
11216         (target_fetch_registers): Call regcache_debug_print_register.
11217         (target_store_registers): Likewise.
11218
11219 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11220
11221         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11222         reference beyond the 'lh->include_dirs' array before accessing to
11223         it.
11224         (psymtab_include_file_name): Likewise.
11225         (dwarf_decode_lines_1): Likewise.
11226         (dwarf_decode_lines): Likewise.
11227         (file_file_name): Likewise.
11228
11229 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11230
11231         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11232         inferior_ptid.
11233         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11234         ps_lsetfpregs): Likewise.
11235         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11236         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11237         ps_lsetfpregs): Likewise.
11238         * target.c (target_fetch_registers, target_store_registers):
11239         Remove asserts.
11240
11241 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11242
11243         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11244
11245 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11246
11247         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11248         (_initialize_aarch64_tdep): Register it.
11249         (aarch64_record_load_store): Handle PRFM instruction.
11250         (aarch64_process_record_test): New function.
11251
11252 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11253
11254         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11255         indentation.
11256
11257 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11258
11259         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11260
11261 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11262
11263         python/python.c (do_start_initialization): Fix memory leak.
11264
11265 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11266
11267         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11268         using get_ptrace_pid.
11269         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11270         inferior_ptid.
11271         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11272         inferior_ptid instead of pid.
11273
11274 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11275
11276         * aarch64-tdep.c: Wrap locally used classes in anonymous
11277         namespace.
11278         * arm-tdep.c: Likewise.
11279         * linespec.c: Likewise.
11280         * ui-out.c: Likewise.
11281
11282 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11283
11284         PR gdb/19637
11285         * python/lib/gdb/printer/bound_registers.py: Import sys.
11286
11287 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11288
11289         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11290         windows_thread_info parameter and use it instead of
11291         current_thread.
11292         (windows_fetch_inferior_registers): Don't set current_thread,
11293         pass the thread to do_windows_fetch_inferior_registers.  Use
11294         ptid from regcache instead of inferior_ptid.
11295         (do_windows_store_inferior_registers): Add windows_thread_info
11296         parameter and use it instead of current_thread.
11297         (windows_store_inferior_registers): Don't set current_thread,
11298         pass the thread to do_windows_store_inferior_registers.  Use
11299         ptid from regcache instead of inferior_ptid.
11300
11301 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11302
11303         * ser-mingw.c (ser_windows_raw): Remove reference to
11304         struct serial::current_timeout.
11305
11306 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11307
11308         PR tdep/20928
11309         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11310         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11311         (sparc64_fsr_type): Fix %fsr decoding.
11312
11313 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11314
11315         * python/py-record-btrace.c (btpy_insn_data): Change return type
11316         for Python 2.
11317
11318 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11319
11320         * spu-linux-nat.c (spu_fetch_inferior_registers,
11321         spu_store_inferior_registers): Use ptid from regcache, set and
11322         restore inferior_ptid.
11323         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11324         Likewise.
11325
11326 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11327
11328         * i386-linux-nat.c (fetch_register, store_register,
11329         i386_linux_fetch_inferior_registers,
11330         i386_linux_store_inferior_registers): Use ptid from regcache.
11331         * ia64-linux-nat.c (ia64_linux_fetch_register,
11332         ia64_linux_store_register): Likewise.
11333         * inf-ptrace.c (inf_ptrace_fetch_register,
11334         inf_ptrace_store_register): Likewise.
11335         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11336         m32r_linux_store_inferior_registers): Likewise.
11337         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11338         m68kbsd_store_inferior_registers): Likewise.
11339         * m68k-linux-nat.c (fetch_register, store_register,
11340         m68k_linux_fetch_inferior_registers,
11341         m68k_linux_store_inferior_registers): Likewise.
11342         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11343         m88kbsd_store_inferior_registers): Likewise.
11344         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11345         mips_fbsd_store_inferior_registers): Likewise.
11346         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11347         mips64_linux_regsets_store_registers): Likewise.
11348         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11349         mipsnbsd_store_inferior_registers): Likewise.
11350         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11351         mips64obsd_store_inferior_registers): Likewise.
11352         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11353         Likewise.
11354         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11355         ppcfbsd_store_inferior_registers): Likewise.
11356         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11357         ppc_linux_store_inferior_registers): Likewise.
11358         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11359         ppcnbsd_store_inferior_registers): Likewise.
11360         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11361         ppcobsd_store_registers): Likewise.
11362         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11363         Likewise.
11364         * ravenscar-thread.c (ravenscar_fetch_registers,
11365         ravenscar_store_registers, ravenscar_prepare_to_store):
11366         Likewise.
11367         * record-btrace.c (record_btrace_fetch_registers,
11368         record_btrace_store_registers, record_btrace_prepare_to_store):
11369         Likewise.
11370         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11371         Lookup inferior using ptid from regcache, instead of
11372         current_inferior.
11373         * remote.c (remote_fetch_registers, remote_store_registers): Use
11374         ptid from regcache.
11375         * rs6000-nat.c (fetch_register, store_register): Likewise.
11376         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11377         s390_linux_store_inferior_registers): Likewise.
11378         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11379         shnbsd_store_inferior_registers): Likewise.
11380         * sol-thread.c (sol_thread_fetch_registers,
11381         sol_thread_store_registers): Likewise.
11382         * sparc-nat.c (sparc_fetch_inferior_registers,
11383         sparc_store_inferior_registers): Likewise.
11384         * tilegx-linux-nat.c (fetch_inferior_registers,
11385         store_inferior_registers): Likewise.
11386         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11387         vaxbsd_store_inferior_registers): Likewise.
11388         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11389         store_xtregs): Likewise.
11390
11391 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11392
11393         PR gdb/14441
11394         * NEWS: Mention support for rvalue references in GDB and python.
11395         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11396         supports both lvalue and rvalue references.
11397
11398 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11399
11400         PR gdb/14441
11401         * gdbtypes.c (rank_one_type): Implement overloading
11402         resolution rules regarding rvalue references.
11403
11404 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11405
11406         PR gdb/14441
11407         * aarch64-tdep.c (aarch64_type_align)
11408         (aarch64_extract_return_value, aarch64_store_return_value): Change
11409         lvalue reference type checks to general reference type checks.
11410         * amd64-tdep.c (amd64_classify): Likewise.
11411         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11412         Likewise.
11413         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11414         (arm_store_return_value): Likewise.
11415         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11416         * c-typeprint.c (c_print_type): Likewise.
11417         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11418         (cplus_number_of_children, cplus_describe_child): Likewise.
11419         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11420         * completer.c (expression_completer): Likewise.
11421         * cp-support.c (make_symbol_overload_list_adl_namespace):
11422         Likewise.
11423         * darwin-nat-info.c (info_mach_region_command): Likewise.
11424         * dwarf2loc.c (entry_data_value_coerce_ref)
11425         (value_of_dwarf_reg_entry): Likewise.
11426         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11427         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11428         Likewise.
11429         * findvar.c (extract_typed_address, store_typed_address):
11430         Likewise.
11431         * gdbtypes.c (rank_one_type): Likewise.
11432         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11433         * infcall.c (value_arg_coerce): Likewise.
11434         * language.c (pointer_type): Likewise.
11435         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11436         Likewise.
11437         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11438         * mn10300-tdep.c (mn10300_type_align): Likewise.
11439         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11440         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11441         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11442         Likewise.
11443         * printcmd.c (print_formatted, x_command): Likewise.
11444         * python/py-type.c (typy_get_composite, typy_template_argument):
11445         Likewise.
11446         * python/py-value.c (valpy_referenced_value)
11447         (valpy_get_dynamic_type, value_has_field): Likewise.
11448         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11449         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11450         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11451         * spu-tdep.c (spu_scalar_value_p): Likewise.
11452         * symtab.c (lookup_symbol_aux): Likewise.
11453         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11454         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11455         Likewise.
11456         * valops.c (value_cast_pointers, value_cast)
11457         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11458         (value_struct_elt, value_struct_elt_bitpos)
11459         (value_find_oload_method_list, find_overload_match)
11460         (value_rtti_indirect_type): Likewise.
11461         * valprint.c (val_print_scalar_type_p, generic_val_print):
11462         Likewise.
11463         * value.c (value_actual_type, value_as_address, unpack_long)
11464         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11465         (coerce_ref): Likewise.
11466         * varobj.c (varobj_get_value_type): Likewise.
11467
11468 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11469
11470         PR gdb/14441
11471         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11472         table of constants.
11473         * python/lib/gdb/command/explore.py: Support exploring values
11474         of rvalue reference types.
11475         * python/lib/gdb/types.py: Implement get_basic_type() for
11476         rvalue reference types.
11477         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11478         constant.
11479         * python/py-value.c (valpy_getitem): Add an rvalue reference
11480         check.
11481         (valpy_reference_value): Add new parameter "refcode".
11482         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11483         New wrappers for valpy_reference_value().
11484         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11485         (gdbpy_invoke_xmethod): Likewise.
11486
11487 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11488
11489         PR gdb/14441
11490         * dwarf2read.c (process_die, read_type_die_1): Handle the
11491         DW_TAG_rvalue_reference_type DIE.
11492         (read_tag_reference_type): Add new parameter "refcode".
11493
11494 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11495
11496         PR gdb/14441
11497         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11498         (c_type_print_modifier, c_type_print_varspec_suffix)
11499         (c_type_print_base): Support printing rvalue reference types.
11500         * c-valprint.c (c_val_print, c_value_print): Support printing
11501         rvalue reference values.
11502
11503 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11504
11505         PR gdb/14441
11506         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11507         typename.
11508         * cp-support.c (replace_typedefs): Handle
11509         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11510         * python/py-type.c (typy_lookup_type): Likewise.
11511
11512 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11513
11514         PR gdb/14441
11515         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11516         * parse.c (insert_type): Change assert statement.
11517         (follow_types): Handle rvalue reference types.
11518         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11519         constant.
11520
11521 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11522
11523         PR gdb/14441
11524         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11525         value_ref() interface.
11526         * c-valprint.c (c_value_print): Likewise.
11527         * infcall.c (value_arg_coerce): Likewise.
11528         * python/py-value.c (valpy_reference_value): Likewise.
11529         * valops.c (value_cast, value_reinterpret_cast)
11530         (value_dynamic_cast, typecmp): Likewise.
11531         (value_ref): Parameterize by kind of return value reference type.
11532         * value.h (value_ref): Add new parameter "refcode".
11533
11534 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11535
11536         PR gdb/14441
11537         * dwarf2read.c (read_tag_reference_type): Use
11538         lookup_lvalue_reference_type() instead of lookup_reference_type().
11539         * eval.c (evaluate_subexp_standard): Likewise.
11540         * f-exp.y: Likewise.
11541         * gdbtypes.c (make_reference_type, lookup_reference_type):
11542         Generalize with rvalue reference types.
11543         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11544         convenience wrappers for lookup_reference_type().
11545         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11546         reference kind parameter.
11547         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11548         wrappers for lookup_reference_type().
11549         * guile/scm-type.c (gdbscm_type_reference): Use
11550         lookup_lvalue_reference_type() instead of lookup_reference_type().
11551         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11552         * parse.c (follow_types): Likewise.
11553         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11554         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11555         Likewise.
11556         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11557         (gdbpy_invoke_xmethod): Likewise.
11558         * stabsread.c: Provide extra argument to make_reference_type()
11559         call.
11560         * valops.c (value_ref, value_rtti_indirect_type): Use
11561         lookup_lvalue_reference_type() instead of lookup_reference_type().
11562
11563 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11564
11565         PR gdb/14441
11566         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11567         (TYPE_IS_REFERENCE): New macro.
11568         (struct type): Add rvalue_reference_type field.
11569         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11570
11571 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11572
11573         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11574         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11575         New function definition.
11576         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11577         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11578         New function declaration.
11579         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11580         * mi/mi-interp.h: New file.
11581         * solib.c (info_sharedlibrary_command): Replace for loop with
11582         ALL_SO_LIBS macro
11583         * solib.h (update_solib_list): New function declaration.
11584         (so_list_head): Move macro.
11585         * solist.h (ALL_SO_LIBS): New macro.
11586
11587 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11588
11589         * infcmd.c (post_create_inferior): Remove unused argument in
11590         call to solib_add.
11591         * remote.c (remote_start_remote): Likewise.
11592         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11593         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11594         (enable_break): Likewise.
11595         * solib.c (update_solib_list): Remove unused target argument
11596         and its documentation.
11597         (solib_add): Remove unused target argument.  Remove unused
11598         argument in call to update_solib_list.
11599         (info_sharedlibrary_command): Remove unused argument in call
11600         to update_solib_list.
11601         (sharedlibrary_command): Remove unused argument in call to
11602         solib_add.
11603         (handle_solib_event): Likewise.
11604         (reload_shared_libraries): Likewise.
11605         * solib.h (solib_add): Remove unused target argument.
11606
11607 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11608
11609         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11610         (s390_displaced_step_fixup): Cover relative branches with the
11611         default fixup handling.  This fixes lack of support for some
11612         relative branch instructions.
11613
11614 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11617         ptid from regcache.
11618
11619 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11620
11621         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11622         i386_darwin_store_inferior_registers): Use ptid from regcache.
11623
11624 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11625
11626         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11627         i386bsd_store_inferior_registers): Use ptid from regcache.
11628
11629 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11630
11631         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11632         hppaobsd_store_registers): Use ptid from regcache.
11633
11634 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11635
11636         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11637         hppanbsd_store_registers): Use ptid from regcache.
11638
11639 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11640
11641         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11642         from regcache.  Use get_ptrace_pid.
11643
11644 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11645
11646         * corelow.c (get_core_register_section): Use ptid from regcache,
11647         update doc.
11648
11649 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11650
11651         * bsd-uthread.c (bsd_uthread_fetch_registers,
11652         bsd_uthread_store_registers): Use ptid from regcache, set and
11653         restore inferior_ptid.
11654
11655 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11656
11657         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11658         fetch_fp_regs, store_register, store_regs, store_fp_register,
11659         store_fp_regs): Use ptid from regcache.
11660
11661 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11662
11663         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11664         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11665         store_vfp_regs): Use ptid from regcache.
11666
11667 2017-03-17  Pedro Alves  <palves@redhat.com>
11668
11669         PR remote/21188
11670         * ser-base.c (ser_base_wait_for): Add comment.
11671         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11672         version.
11673         * ser-unix.c (hardwire_raw): Remove reference to
11674         scb->current_timeout.
11675         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11676         (hardwire_ops): Install ser_base_readchar instead of
11677         hardwire_readchar.
11678         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11679         Remove fields.
11680
11681 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11682
11683         PR gdb/19637
11684         * python/lib/gdb/printer/bound_registers.py: Add support for
11685         Python 3.
11686
11687 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11688
11689         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11690         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11691         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11692         byte_offset to subobj_byte_offset.  Fix the handling of
11693         DWARF_VALUE_STACK on big-endian targets when coming via an
11694         implicit pointer.
11695         (dwarf2_evaluate_loc_desc): Adjust call to
11696         dwarf2_evaluate_loc_desc_full.
11697         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11698         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11699
11700 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11701
11702         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11703         and REVSH instructions.
11704
11705 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11706
11707         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11708         (arm_record_test): Declare.
11709         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11710         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11711         align with the manual.
11712         (thumb_record_misc): Adjust the code order to align with the
11713         manual.
11714         (thumb2_record_decode_insn_handler): Fix instruction matching.
11715         (instruction_reader_thumb): New class.
11716         (arm_record_test): New function.
11717
11718 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11719
11720         * arm-tdep.c (abstract_memory_reader): New class.
11721         (instruction_reader): New class.
11722         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11723         (decode_insn): Likewise.
11724
11725 2017-03-16  Doug Evans  <dje@google.com>
11726
11727         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11728         member.  Change type of TYPE member to SCM.  All uses updated.
11729         (lsscm_make_lazy_string_smob): Add assert.
11730         (lsscm_make_lazy_string): Flag bad length values.
11731         (lsscm_elt_type): New function.
11732         (gdbscm_lazy_string_to_value): Rewrite to use
11733         lsscm_safe_lazy_string_to_value.
11734         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11735         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11736         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11737         in incoming type.
11738         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11739         * guile/scm-type.c (tyscm_scm_to_type): New function.
11740
11741 2017-03-15  Doug Evans  <dje@google.com>
11742
11743         PR python/17728, python/18439, python/18779
11744         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11745         member.  Change type of TYPE member to PyObject *.  All uses updated.
11746         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11747         (gdbpy_create_lazy_string_object): Flag bad length values.
11748         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11749         Handle typedefs in incoming type.
11750         (stpy_lazy_string_elt_type): New function.
11751         (gdbpy_extract_lazy_string): Call it.
11752         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11753         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11754         typedefs in incoming type.
11755
11756 2017-03-16  Doug Evans  <dje@google.com>
11757
11758         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11759         * guile/scm-type.c (tyscm_scm_to_type): New function.
11760
11761 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11762
11763         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11764         "ULONGEST" for "skip".
11765
11766 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11767
11768         PR gdb/21220
11769         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11770         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11771         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11772         over ptrace peek/poke until end of buffer or error.
11773
11774 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11775
11776         * parse.c (length_of_subexp): Make static.
11777         * parser-defs.h (length_of_subexp): Remove.
11778
11779 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11780
11781         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11782         as well.
11783
11784 2017-03-14  Pedro Alves  <palves@redhat.com>
11785
11786         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11787         (main): Use std::unique_ptr.  Remove calls to
11788         cp_demangled_name_parse_free.
11789
11790 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11791
11792         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11793         alphabsd_store_inferior_registers): Use regcache->ptid instead
11794         of inferior_ptid.
11795
11796 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11797
11798         * aix-thread.c (aix_thread_fetch_registers,
11799         aix_thread_store_registers): Use regcache->ptid instead of
11800         inferior_ptid.
11801
11802 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11803
11804         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11805         store_gregs_to_thread, fetch_fpregs_from_thread,
11806         store_fpregs_to_thread): Use regcache->ptid instead of
11807         inferior_ptid.
11808
11809 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11810
11811         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11812         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11813         instead of inferior_ptid.
11814
11815 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11816
11817         * target.c (target_fetch_registers, target_store_registers): Add
11818         assert.
11819
11820 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11821
11822         * regcache.h (regcache_get_ptid): New function.
11823         * regcache.c (regcache_get_ptid): New function.
11824
11825 2017-03-13  Mark Wielaard  <mark@klomp.org>
11826
11827         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11828
11829 2017-03-10  Keith Seitz  <keiths@redhat.com>
11830
11831         PR c++/8218
11832         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11833
11834 2017-03-08  Pedro Alves  <palves@redhat.com>
11835
11836         PR gdb/18360
11837         * infrun.c (start_step_over, do_target_resume, resume)
11838         (restart_threads): Assert we're not resuming a thread that is
11839         meant to be stopped.
11840         (infrun_thread_stop_requested_callback): Delete.
11841         (infrun_thread_stop_requested): If the thread is internally
11842         stopped, queue a pending stop event and clear the thread's
11843         inline-frame state.
11844         (handle_stop_requested): New function.
11845         (handle_syscall_event, handle_inferior_event_1): Use
11846         handle_stop_requested.
11847         (handle_stop_requested): New function.
11848         (handle_signal_stop): Set the thread's stop_signal here instead of
11849         at caller.
11850         (finish_step_over): Clear step over info unconditionally.
11851         (handle_signal_stop): If the user had interrupted the event
11852         thread, consider the stop a random signal.
11853         (handle_signal_stop) <signal arrived while stepping over
11854         breakpoint>: Don't restart threads here.
11855         (stop_waiting): Don't clear step-over info here.
11856
11857 2017-03-08  Pedro Alves  <palves@redhat.com>
11858
11859         PR 21206
11860         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11861         goes to argument 2, not 1.
11862
11863 2017-03-08  Pedro Alves  <palves@redhat.com>
11864
11865         PR cli/21218
11866         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11867         display_gdb_prompt.
11868         (command_line_input): Add comment.
11869
11870 2017-03-08  Pedro Alves  <palves@redhat.com>
11871
11872         PR tui/21216
11873         * tui/tui-file.c (tui_file::write): New.
11874         * tui/tui-file.h (tui_file): Override "write".
11875         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11876         factored out from ...
11877         (tui_puts): ... here.
11878         (tui_putc): Use them.
11879         (tui_write): New function.
11880         * tui/tui-io.h (tui_write): Declare.
11881
11882 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11883
11884         * Makefile.in (SFILES): Replace "environ.c" with
11885         "common/environ.c".
11886         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11887         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11888         to...
11889         * common/environ.c: ... here.
11890         * environ.h: Moved to...
11891         * common/environ.h: ... here.
11892
11893 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11894
11895         * gdbarch.sh (pstring_ptr): New static function.
11896         (gdbarch_disassembler_options): Use it.
11897         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11898         not valid_disassembler_option->name.
11899         * gdbarch.c: Regenerate.
11900
11901 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11902
11903         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11904
11905 2017-03-07  Pedro Alves  <palves@redhat.com>
11906
11907         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11908
11909 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11910
11911         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11912         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11913         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11914         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11915
11916 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11917
11918         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11919
11920 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11921
11922         * remote.c (remote_add_target_side_commands): Use range-based
11923         for loop.
11924
11925 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11926
11927         PR gdb/21165
11928         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11929         value is lazy.
11930         * valprint.c (common_val_print): Likewise.
11931
11932 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11933
11934         * NEWS: Mention new set/show disassembler-options commands.
11935         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11936         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11937         (prospective_options): New static variable.
11938         (gdb_disassembler::gdb_disassembler): Initialize
11939         m_di.disassembler_options.
11940         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11941         (get_disassembler_options): New function.
11942         (set_disassembler_options): Likewise.
11943         (set_disassembler_options_sfunc): Likewise.
11944         (show_disassembler_options_sfunc): Likewise.
11945         (disassembler_options_completer): Likewise.
11946         (_initialize_disasm): Likewise.
11947         * disasm.h (get_disassembler_options): New prototype.
11948         (set_disassembler_options): Likewise.
11949         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11950         (gdbarch_verify_disassembler_options): Likewise.
11951         * gdbarch.c: Regenerate.
11952         * gdbarch.h: Likewise.
11953         * arm-tdep.c (num_disassembly_options): Delete.
11954         (set_disassembly_style): Likewise.
11955         (arm_disassembler_options): New static variable.
11956         (set_disassembly_style_sfunc): Convert short style name into long
11957         option name.  Call set_disassembler_options.
11958         (show_disassembly_style_sfunc): New function.
11959         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11960         set_gdbarch_verify_disassembler_options.
11961         (_initialize_arm_tdep): Delete regnames variable and update callers.
11962         (arm_disassembler_options): Initialize.
11963         (disasm_options): New variable.
11964         (num_disassembly_options): Rename from this...
11965         (num_disassembly_styles): ...to this.  Compute by scanning through
11966         disasm_options.
11967         (valid_disassembly_styles): Initialize using disasm_options.
11968         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11969         set_arm_regname_option.
11970         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11971         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11972         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11973         set_gdbarch_verify_disassembler_options.
11974         * s390-tdep.c (s390_disassembler_options): New static variable.
11975         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11976         set_gdbarch_verify_disassembler_options.
11977
11978 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11979
11980         * remote.c (remote_add_target_side_condition): Remove "struct"
11981         keyword from range-based for loop.
11982
11983 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11984
11985         * remote.c (remote_add_target_side_condition): Use range-based
11986         for loop.  Update comment.
11987
11988 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11989
11990         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11991
11992 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11993
11994         * regcache.c (regcache_raw_update): New function.
11995         (regcache_raw_read): Move code to regcache_raw_update.
11996         * regcache.h (regcache_raw_update): New declaration.
11997         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11998
11999 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12000
12001         * dwarf2read.c (create_debug_type_hash_table): Initialize
12002         header.signature and header.type_offset_in_tu.
12003
12004 2017-02-24  Pedro Alves  <palves@redhat.com>
12005
12006         * symtab.c (make_file_symbol_completion_list_1): Use
12007         add_symtab_completions.
12008
12009 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12010
12011         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12012
12013 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12014
12015         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12016         I386_MAX_REGISTER_SIZE.
12017         (i386_pseudo_register_write): Likewise.
12018         (i386_process_record): Likewise.
12019         * i387-tdep.c (i387_supply_xsave): Likewise.
12020         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12021         (store_register): Likewise.
12022
12023 2017-02-23  Pedro Alves  <palves@redhat.com>
12024
12025         * ada-lang.c: Include "common/function-view.h".
12026         (ada_iterate_over_symbols): Adjust to use function_view as
12027         callback type.
12028         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12029         (ada_make_symbol_completion_list): Use a lambda.
12030         (ada_exc_search_name_matches): Delete.
12031         (name_matches_regex): New.
12032         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12033         * compile/compile-c-support.c: Include "common/function-view.h".
12034         (print_one_macro): Change prototype to accept a ui_file pointer.
12035         (write_macro_definitions): Use a lambda.
12036         * dwarf2read.c: Include "common/function-view.h".
12037         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12038         (dw2_expand_symtabs_matching): Adjust to use function_view as
12039         callback type.
12040         * language.h: Include "common/function-view.h".
12041         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12042         function_view as callback type.
12043         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12044         * linespec.c: Include "common/function-view.h".
12045         (collect_info::add_symbol): New method.
12046         (struct symbol_and_data_callback, iterate_inline_only, struct
12047         symbol_matcher_data, iterate_name_matcher): Delete.
12048         (iterate_over_all_matching_symtabs): Adjust to use function_view
12049         as callback type and lambdas.
12050         (iterate_over_file_blocks): Adjust to use function_view as
12051         callback type.
12052         (decode_compound_collector): Now a class with private fields.
12053         (decode_compound_collector::release_symbols): New method.
12054         (collect_one_symbol): Rename to...
12055         (decode_compound_collector::operator()): ... this and adjust.
12056         (lookup_prefix_sym): decode_compound_collector construction bits
12057         move to decode_compound_collector ctor.  Pass the
12058         decode_compound_collector object directly as callback.  Remove
12059         cleanups and use decode_compound_collector::release_symbols
12060         instead.
12061         (symtab_collector): Now a class with private fields.
12062         (symtab_collector::release_symtabs): New method.
12063         (add_symtabs_to_list): Rename to...
12064         (symtab_collector::operator()): ... this and adjust.
12065         (collect_symtabs_from_filename): symtab_collector construction
12066         bits move to symtab_collector ctor.  Pass the symtab_collector
12067         object directly as callback.  Remove cleanups and use
12068         symtab_collector::release_symtabs instead.
12069         (collect_symbols): Delete.
12070         (add_matching_symbols_to_info): Use lambdas.
12071         * macrocmd.c (print_macro_callback): Delete.
12072         (info_macro_command): Use a lambda.
12073         (info_macros_command): Pass print_macro_definition as callable
12074         directly.
12075         (print_one_macro): Remove 'ignore' parameter.
12076         (macro_list_command): Adjust.
12077         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12078         (macro_for_each_data::user_data): Delete field.
12079         (foreach_macro): Adjust to call the function_view.
12080         (macro_for_each): Adjust to use function_view as callback type.
12081         (foreach_macro_in_scope): Adjust to call the function_view.
12082         (macro_for_each_in_scope): Adjust to use function_view as callback
12083         type.
12084         * macrotab.h: Include "common/function-view.h".
12085         (macro_callback_fn): Declare a prototype instead of a pointer.
12086         Remove "user_data" parameter.
12087         (macro_for_each, macro_for_each_in_scope): Adjust to use
12088         function_view as callback type.
12089         * psymtab.c (partial_map_expand_apply)
12090         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12091         Adjust to use function_view as callback type and to return bool.
12092         (psym_expand_symtabs_matching): Adjust to use function_view as
12093         callback types.
12094         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12095         to use function_view as callback type and to return bool.
12096         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12097         callback types.
12098         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12099         as callback types.
12100         * symfile.h: Include "common/function-view.h".
12101         (expand_symtabs_file_matcher_ftype)
12102         (expand_symtabs_symbol_matcher_ftype)
12103         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12104         return bool.
12105         (quick_symbol_functions::map_symtabs_matching_filename)
12106         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12107         function_view as callback type and return bool.
12108         (expand_symtabs_matching): Adjust to use function_view as callback
12109         type.
12110         (maintenance_expand_name_matcher)
12111         (maintenance_expand_file_matcher): Delete.
12112         (maintenance_expand_symtabs): Use lambdas.
12113         * symtab.c (iterate_over_some_symtabs): Adjust to use
12114         function_view as callback types and return bool.
12115         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12116         of a cleanup.
12117         (lookup_symtab_callback): Delete.
12118         (lookup_symtab): Use a lambda.
12119         (iterate_over_symbols): Adjust to use function_view as callback
12120         type.
12121         (struct search_symbols_data, search_symbols_file_matches)
12122         (search_symbols_name_matches): Delete.
12123         (search_symbols): Use a pair of lambdas.
12124         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12125         (symtab_expansion_callback): Delete.
12126         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12127         * symtab.h: Include "common/function-view.h".
12128         (iterate_over_some_symtabs): Adjust to use function_view as
12129         callback type and return bool.
12130         (iterate_over_symtabs): Adjust to use function_view as callback
12131         type.
12132         (symbol_found_callback_ftype): Remove 'data' parameter and return
12133         bool.
12134         (iterate_over_symbols): Adjust to use function_view as callback
12135         type.
12136
12137 2017-02-23  Pedro Alves  <palves@redhat.com>
12138
12139         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12140         (%.o) <unittests/%.c>: New pattern.
12141         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12142         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12143         * common/function-view.h: New file.
12144         * unittests/function-view-selftests.c: New file.
12145         * configure: Regenerate.
12146
12147 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12148
12149         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12150         inferior_ptid.
12151         * go32-nat.c (go32_thread_alive): Likewise.
12152
12153 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12154
12155         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12156         delete.
12157
12158 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12159
12160         * varobj.c (varobj_clear_saved_item): Use delete instead of
12161         xfree.
12162         (update_dynamic_varobj_children): Likewise.
12163
12164 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12165
12166         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12167
12168 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12169
12170         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12171         m_enum_value to 0 in default constructor.
12172
12173 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12174
12175         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12176         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12177         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12178         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12179         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12180         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12181         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12182         IS_STORE_CONDITIONAL_INSN.
12183
12184 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12185
12186         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12187
12188 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12189
12190         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12191
12192 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12193
12194         * dwarf2read.c (skip_one_die, read_attribute_value)
12195         (dwarf2_const_value_attr, dump_die_shallow)
12196         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12197         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12198
12199 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12200
12201         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12202         (dwarf_parse_macro_header): Accept DWARF version 5.
12203         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12204
12205 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12206
12207         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12208         DW_AT_GNU_*.
12209         * common/common-exceptions.h (enum errors): Likewise.
12210         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12211         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12212         (dwarf_expr_context::execute_stack_op): Likewise.
12213         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12214         Likewise.
12215         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12216         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12217         (show_entry_values_debug, call_site_to_target_addr)
12218         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12219         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12220         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12221         (value_of_dwarf_block_entry, indirect_pieced_value)
12222         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12223         (disassemble_dwarf_expression): Likewise.
12224         * dwarf2read.c (process_die, inherit_abstract_dies)
12225         (read_call_site_scope): Likewise.
12226         * gdbtypes.h (struct func_type, struct call_site_parameter)
12227         (struct call_site): Likewise.
12228         * stack.c (read_frame_arg): Likewise.
12229         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12230
12231 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12232
12233         * defs.h (read_unsigned_leb128): New declaration.
12234         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12235         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12236         (dwarf2_find_location_expression): Call also
12237         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12238         * dwarf2loc.h (dwarf2_version): New declaration.
12239         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12240         rnglists.
12241         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12242         .debug_rnglists.
12243         (struct dwop_section_names): Add loclists_dwo.
12244         (dwop_section_names): Add .debug_loclists.dwo.
12245         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12246         (struct dwarf2_per_cu_data): Add dwarf_version.
12247         (struct dwo_sections): Add loclists.
12248         (struct attr_abbrev): Add implicit_const.
12249         (read_indirect_line_string): New declaration.
12250         (read_unsigned_leb128): Delete declaration.
12251         (rcuh_kind): New definition.
12252         (read_and_check_comp_unit_head): Change parameter
12253         is_debug_types_section to section_kind.
12254         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12255         (read_comp_unit_head): Change parameter abfd to section, add parameter
12256         section_kind.  Handle DWARF-5.
12257         (error_check_comp_unit_head): Accept also DWARF version 5.
12258         (read_and_check_comp_unit_head): Change parameter
12259         is_debug_types_section to section_kind.
12260         (read_and_check_type_unit_head): Delete function.
12261         (read_abbrev_offset): Handle DWARF-5.
12262         (create_debug_type_hash_table): Add parameter section_kind.  Process
12263         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12264         comp_unit_head.
12265         (create_debug_types_hash_table): Update create_debug_type_hash_table
12266         caller.
12267         (create_all_type_units): Call create_debug_type_hash_table.
12268         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12269         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12270         caller.
12271         (skip_one_die): Handle DW_FORM_implicit_const.
12272         (dwarf2_rnglists_process): New function.
12273         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12274         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12275         (read_attribute_value): Handle DW_FORM_implicit_const,
12276         DW_FORM_line_strp.
12277         (read_attribute): Handle DW_FORM_implicit_const.
12278         (read_indirect_string_at_offset_from): New function from
12279         read_indirect_string_at_offset.
12280         (read_indirect_string_at_offset): Call
12281         read_indirect_string_at_offset_from.
12282         (read_indirect_line_string_at_offset): New function.
12283         (read_indirect_string): New function comment.
12284         (read_indirect_line_string): New function.
12285         (read_unsigned_leb128): Make it global.
12286         (dwarf2_string_attr): Handle DWARF-5.
12287         (add_include_dir_stub, read_formatted_entries): New functions.
12288         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12289         Handle DWARF-5.
12290         (per_cu_header_read_in): Update read_comp_unit_head caller.
12291         (dwarf2_version): New function.
12292         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12293         rnglists.
12294         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12295         fields.
12296
12297 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12298
12299         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12300
12301 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12302
12303         * dwarf2read.c (dwarf2_ranges_process): New function from
12304         dwarf2_ranges_read.
12305         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12306         dwarf2_ranges_process.
12307
12308 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12309
12310         * dwarf2read.c (create_debug_type_hash_table): New function from
12311         create_debug_types_hash_table.
12312         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12313         (create_all_type_units, open_and_init_dwo_file): Update
12314         create_debug_types_hash_table callers.
12315
12316 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12317
12318         PR gdb/16188
12319         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12320         refer to 'ap', not 'args'.
12321
12322 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12323             Pedro Alves  <palves@redhat.com>
12324
12325         PR gdb/16188
12326         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12327         calls succeeded.
12328         * fork-child.c (trace_start_error): New function.
12329         (trace_start_error_with_name): Likewise.
12330         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12331         * inf-ptrace.c (inf_ptrace_me): Likewise.
12332         * inferior.h (trace_start_error): New prototype.
12333         (trace_start_error_with_name): Likewise.
12334
12335 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12336
12337         PR gdb/21164
12338         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12339         NULL before using it.
12340         * symmisc.c (maintenance_print_symbols): Likewise.
12341         (maintenance_print_msymbols): Likewise.
12342
12343 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12344
12345         * NEWS: Add record Python bindings entry.
12346
12347 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12348
12349         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12350         py-record-full.o.
12351         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12352         * python/py-record-btrace.c, python/py-record-btrace.h,
12353         python/py-record-full.c, python/py-record-full.h: New file.
12354         * python/py-record.c: Add include for py-record-btrace.h and
12355         py-record-full.h.
12356         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12357         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12358         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12359         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12360         New definition.
12361         (gdbpy_initialize_btrace): New export.
12362         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12363
12364 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12365
12366         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12367         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12368         * python/py-record.c: New file.
12369         * python/python-internal.h (gdbpy_start_recording,
12370         gdbpy_current_recording, gdpy_stop_recording,
12371         gdbpy_initialize_record): New export.
12372         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12373         (python_GdbMethods): Add gdbpy_start_recording,
12374         gdbpy_current_recording and gdbpy_stop_recording.
12375
12376 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12377
12378         * record-btrace.c (record_btrace_record_method): New function.
12379         (init_record_btrace_ops): Initialize to_record_method.
12380         * record-full.c (record_full_record_method): New function.
12381         (init_record_full_ops, init_record_full_core_ops): Add
12382         record_full_record_method.
12383         * record.h (enum record_method): New enum.
12384         * target-debug.h (target_debug_print_enum_record_method: New define.
12385         * target-delegates.c: Regenerate.
12386         * target.c (target_record_method): New function.
12387         * target.h: Include record.h.
12388         (struct target_ops) <to_record_method>: New field.
12389         (target_record_method): New export.
12390
12391 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12392
12393         * record.h (record_start, record_stop): New export.
12394         * record.c (record_start, record_stop): New function.
12395
12396 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12397
12398         * btrace.c (btrace_fetch): Copy function call segments pointer
12399         into a vector.
12400         (btrace_clear): Clear the vector.
12401         (btrace_find_insn_by_number): Use binary search to find the correct
12402         function call segment.
12403         * btrace.h (brace_fun_p): New typedef.
12404         (struct btrace_thread_info) <functions>: New field.
12405
12406 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12407
12408         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12409         * btrace.c (btrace_decode_error): ... here.  New function.
12410         * btrace.h (btrace_decode_error): New export.
12411
12412 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12413
12414         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12415         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12416         btrace_find_insn_by_number): Remove special case for gaps.
12417         * btrace.h (btrace_insn_get_error): New export.
12418         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12419         * record-btrace.c (btrace_insn_history): Print number for gaps.
12420         (record_btrace_info, record_btrace_goto): Handle gaps.
12421
12422 2017-02-14  Tom Tromey  <tom@tromey.com>
12423
12424         PR python/13598:
12425         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12426         event.
12427         * python/py-evts.c (gdbpy_initialize_py_events): Add
12428         before_prompt registry.
12429         * python/py-events.h (events_object) <before_prompt>: New field.
12430
12431 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12432
12433         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12434
12435 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12436
12437         * symfile (_initialize_symfile): Add usage text to the load command's
12438         help text.
12439
12440 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12441
12442         * utils.c (defaulted_query): Don't query on secondary UIs.
12443
12444 2017-02-10  Tom Tromey  <tom@tromey.com>
12445
12446         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12447
12448 2017-02-10  Tom Tromey  <tom@tromey.com>
12449
12450         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12451         "cleanup" local.
12452         * python/py-type.c (typy_legacy_template_argument): Remove
12453         unnecessary "cleanup" local.
12454
12455 2017-02-10  Tom Tromey  <tom@tromey.com>
12456
12457         * python/python.c (do_start_initialization): New function, from
12458         _initialize_python.
12459         (_initialize_python): Call do_start_initialization.
12460         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12461         goto.
12462
12463 2017-02-10  Tom Tromey  <tom@tromey.com>
12464
12465         * python/py-prettyprint.c (pretty_print_one_value): Use
12466         gdbpy_ref.
12467
12468 2017-02-10  Tom Tromey  <tom@tromey.com>
12469
12470         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12471         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12472         gdbpy_ref.
12473         * python/py-type.c (field_new): Use gdbpy_ref.
12474         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12475         gdbpy_ref.
12476         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12477         (py_free_pspace): Likewise.
12478         (pspace_to_pspace_object): Likewise.
12479         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12480         (py_free_objfile): Likewise.
12481         (objfile_to_objfile_object): Likewise.
12482         * python/py-inferior.c (delete_thread_object): Use
12483         gdbpy_ref.
12484         (infpy_read_memory): Likewise.
12485         (py_free_inferior): Likewise.
12486         * python/py-evtregistry.c (create_eventregistry_object): Use
12487         gdbpy_ref.
12488         * python/py-event.c (create_event_object): Use gdbpy_ref.
12489
12490 2017-02-10  Tom Tromey  <tom@tromey.com>
12491
12492         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12493         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12494         used.
12495         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12496         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12497         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12498         python/py-framefilter.c, python/py-function.c,
12499         python/py-inferior.c, python/py-infevents.c,
12500         python/py-linetable.c, python/py-newobjfileevent.c,
12501         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12502         python/py-signalevent.c, python/py-stopevent.c,
12503         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12504         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12505         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12506         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12507
12508 2017-02-10  Tom Tromey  <tom@tromey.com>
12509
12510         * ui-out.h (ui_out_emit_type): New class.
12511         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12512         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12513         and ui_out_emit_tuple.
12514         (enumerate_locals): Likewise.
12515         (py_mi_print_variables, py_print_locals, py_print_args): Use
12516         ui_out_emit_list.
12517         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12518         ui_out_emit_list.
12519         * common/gdb_optional.h: New file.
12520
12521 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12522
12523         * MAINTAINERS (Write After Approval): Update my e-mail address.
12524
12525 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12526
12527         PR gdb/21122
12528         * breakpoint.c (_initialize_breakpoint): Update the help description
12529         of the 'commands' command to indicate that it takes a list argument.
12530
12531 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12532
12533         * interps.c (current_interp_set_logging): Remove "return".
12534
12535 2017-02-09  Gary Benson  <gbenson@redhat.com>
12536
12537         * symtab.c (add_symtab_completions): Prevent NULL pointer
12538         dereference.
12539
12540 2017-02-08  Pedro Alves  <palves@redhat.com>
12541
12542         * interps.c (interp::interp): Remove reference to quiet_p.
12543         (interp_set): Make static.  Remove dead "Switching to" output
12544         code.
12545         (interp_quiet_p, interp_set_quiet): Delete.
12546         (interpreter_exec_cmd): Don't set the interpreter quiet.
12547         * interps.h (interp_quiet_p): Make static.
12548         (class interp) <quiet_p>: Remove field
12549
12550 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12551
12552         * cli/cli-decode.c (find_command_name_length): Make it extern.
12553         * cli/cli-decode.h (find_command_name_length): Declare.
12554         * cli/cli-script.c (command_name_equals, line_first_arg):
12555         New functions.
12556         (process_next_line): Use cli-decode to parse command names.
12557         (build_command_line): Make args a constant pointer.
12558
12559 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12560
12561         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12562         Remove case-insensitive search.
12563
12564 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12565
12566         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12567         at the end of the line.  Avoids an ARI warning.
12568
12569 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12570
12571         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12572         rdseed instructions.
12573         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12574
12575 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12576
12577         PR tdep/20936
12578         Provide and use sparc32 and sparc64 target description XML files.
12579         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12580         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12581         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12582         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12583         * features/sparc/sparc32-solaris.xml: New file.
12584         * features/sparc/sparc64-solaris.xml: New file.
12585         * features/sparc/sparc32-solaris.c: Generated.
12586         * features/sparc/sparc64-solaris.c: Generated.
12587         * sparc-tdep.h: Account for differences in target descriptions.
12588         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12589         (sparc32_register_type): Use target provided registers.
12590         (validate_tdesc_registers): New function.
12591         (sparc32_gdbarch_init): Use tdesc_has_registers.
12592         Set pseudoregister functions.
12593         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12594         (sparc64_register_type): Use target provided registers.
12595         (sparc64_init_abi): Set pseudoregister functions.
12596
12597 2017-02-03  Tom Tromey  <tom@tromey.com>
12598
12599         PR rust/21097:
12600         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12601         with a single member.
12602
12603 2017-02-03  Pedro Alves  <palves@redhat.com>
12604
12605         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12606         (cli_interp_base::~cli_interp_base): New.
12607         (cli_interp): New struct.
12608         (as_cli_interp): Cast the interp itself to cli_interp.
12609         (cli_interpreter_pre_command_loop): Rename to ...
12610         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12611         parameter.
12612         (cli_interpreter_init): Rename to ...
12613         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12614         boolean.  Make extern.
12615         (cli_interpreter_resume): Rename to ...
12616         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12617         extern.
12618         (cli_interpreter_suspend): Rename to ...
12619         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12620         extern.
12621         (cli_interpreter_exec): Rename to ...
12622         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12623         extern.
12624         (cli_interpreter_supports_command_editing): Rename to ...
12625         (cli_interp_base::supports_command_editing): ... this.  Remove
12626         'interp' parameter.  Make extern.
12627         (cli_ui_out): Rename to ...
12628         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12629         Make extern.
12630         (cli_set_logging): Rename to ...
12631         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12632         parameter.  Make extern.
12633         (cli_interp_procs): Delete.
12634         (cli_interp_factory): Adjust to use "new".
12635         * cli/cli-interp.h: Include "interps.h".
12636         (struct cli_interp_base): New struct.
12637         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12638         (interp_new): Delete.
12639         (interp::interp, interp::~interp): New.
12640         (interp_set): Use bool, and return void.  Assume the interpreter
12641         has suspend, init and resume methods, and that the all return
12642         void.
12643         (set_top_level_interpreter): interp_set returns void.
12644         (interp_ui_out): Adapt.
12645         (current_interp_set_logging): Adapt.
12646         (interp_data): Delete.
12647         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12648         (interp_exec): Adapt.
12649         (top_level_interpreter_data): Delete.
12650         * interps.h (interp_init_ftype, interp_resume_ftype)
12651         (interp_suspend_ftype, interp_exec_ftype)
12652         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12653         (class interp): New.
12654         (interp_new): Delete.
12655         (interp_set): Now returns void.  Use bool.
12656         (interp_data, top_level_interpreter_data): Delete.
12657         * mi/mi-common.h: Include interps.h.
12658         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12659         init, resume, suspect, exec, interp_ui_out, set_logging and
12660         pre_command_loop methods.
12661         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12662         (mi_interpreter_init): Rename to ...
12663         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12664         bool, return void and make extern.  Adjust.
12665         (mi_interpreter_resume): ... Rename to ...
12666         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12667         return void and make extern.  Adjust.
12668         (mi_interpreter_suspend): ... Rename to ...
12669         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12670         return void and make extern.  Adjust.
12671         (mi_interpreter_exec): ... Rename to ...
12672         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12673         extern.  Adjust.
12674         (mi_interpreter_pre_command_loop): ... Rename to ...
12675         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12676         parameter and make extern.
12677         (mi_on_normal_stop_1): Adjust.
12678         (mi_ui_out): Rename to ...
12679         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12680         parameter and make extern.  Adjust.
12681         (mi_set_logging): Rename to ...
12682         (mi_interp::set_logging): ... this.  Remove the 'interp'
12683         parameter and make extern.  Adjust.
12684         (mi_interp_procs): Delete.
12685         (mi_interp_factory): Adjust to use 'new'.
12686         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12687         (mi_print_exception, mi_execute_command, mi_load_progress):
12688         Adjust.
12689         * tui/tui-interp.c (tui_interp): New class.
12690         (as_tui_interp): Return a tui_interp pointer.
12691         (tui_on_normal_stop, tui_on_signal_received)
12692         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12693         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12694         to use interp::interp_ui_out.
12695         (tui_init): Rename to ...
12696         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12697         bool, return void and make extern.  Adjust.
12698         (tui_resume): Rename to ...
12699         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12700         return void and make extern.  Adjust.
12701         (tui_suspend): Rename to ...
12702         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12703         return void and make extern.  Adjust.
12704         (tui_ui_out): Rename to ...
12705         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12706         parameter, and make extern.  Adjust.
12707         (tui_exec): Rename to ...
12708         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12709         make extern.
12710         (tui_interp_procs): Delete.
12711         (tui_interp_factory): Use "new".
12712
12713 2017-02-02  Tom Tromey  <tom@tromey.com>
12714
12715         * rust-exp.y (ends_raw_string, space_then_number)
12716         (rust_identifier_start_p): Return bool.
12717         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12718         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12719         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12720         (rust_chartype_p): Return bool.
12721         (val_print_struct, rust_print_struct_def, rust_print_type):
12722         Update.
12723         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12724         Return bool.
12725
12726 2017-02-02  Tom Tromey  <tom@tromey.com>
12727
12728         * rust-lang.c: Reindent.
12729
12730 2017-02-02  Tom Tromey  <tom@tromey.com>
12731
12732         * rust-lang.h (rust_crate_for_block): Update.
12733         * rust-lang.c (rust_crate_for_block): Return std::string.
12734         (rust_get_disr_info): Use std:;string, not
12735         gdb::unique_xmalloc_ptr.
12736         * rust-exp.y (crate_name): Update.
12737
12738 2017-02-02  Pedro Alves  <palves@redhat.com>
12739
12740         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12741         field out of gdb_disassembler_test and make it static.
12742
12743 2017-02-02  Pedro Alves  <palves@redhat.com>
12744
12745         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12746         mi1_interp and mi_interp fields.
12747
12748 2017-02-02  Pedro Alves  <palves@redhat.com>
12749
12750         * cli/cli-interp.c (struct saved_output_files, saved_output):
12751         Moved from cli/cli-logging.c.
12752         (cli_set_logging): New function.
12753         (cli_interp_procs): Install cli_set_logging.
12754         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12755         Declare.
12756         * cli/cli-logging.c (struct saved_output_files, saved_output):
12757         Moved to cli/cli-interp.c.
12758         (pop_output_files): Don't save outputs here.
12759         (make_logging_output): New function.
12760         (handle_redirections): Don't build tee nor save previous outputs
12761         here.
12762         * interps.c (current_interp_set_logging): Change prototype.
12763         Assume there's always a set_logging_proc method installed.
12764         * interps.h (interp_set_logging_ftype): Change prototype.
12765         (current_interp_set_logging): Change prototype and adjust comment.
12766         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12767         use make_logging_output.
12768         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12769 2017-02-02  Pedro Alves  <palves@redhat.com>
12770
12771         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12772         from ...
12773         (set_logging_overwrite): ... here.
12774         (logging_no_redirect_file): Delete.
12775         (set_logging_redirect): Don't handle redirection on the fly.
12776         Instead warn that "logging off" / "logging on" is necessary.
12777         (pop_output_files): Delete references to logging_no_redirect_file.
12778         (show_logging_command): Always speak in terms of what will happen
12779         once logging is reenabled.
12780
12781 2017-02-02  Pedro Alves  <palves@redhat.com>
12782
12783         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12784
12785 2017-02-02  Pedro Alves  <palves@redhat.com>
12786
12787         * disasm.c (gdb_pretty_print_insn): Rename to ...
12788         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12789         Remove gdbarch parameter.  Adapt to clear the object's buffers
12790         instead of allocating new buffers, and to print using the object's
12791         gdb_disassembler instead of calling gdb_print_insn.
12792         (dump_insns): Use gdb_pretty_print_disassembler.
12793         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12794         (gdb_pretty_print_disassembler): New class.
12795         * record-btrace.c (btrace_insn_history): Use
12796         gdb_pretty_print_disassembler.
12797
12798 2017-02-02  Pedro Alves  <palves@redhat.com>
12799
12800         * ada-lang.c (type_as_string): Use string_file.
12801         * ada-valprint.c (ada_print_floating): Use string_file.
12802         * ada-varobj.c (ada_varobj_scalar_image)
12803         (ada_varobj_get_value_image): Use string_file.
12804         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12805         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12806         * breakpoint.c (update_inserted_breakpoint_locations)
12807         (insert_breakpoint_locations, reattach_breakpoints)
12808         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12809         (print_it_watchpoint): Use string_file.
12810         (save_breakpoints): Use stdio_file.
12811         * c-exp.y (oper): Use string_file.
12812         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12813         tee_file.
12814         (pop_output_files): Use delete.
12815         (handle_redirections): Use stdio_file and tee_file.
12816         * cli/cli-setshow.c (do_show_command): Use string_file.
12817         * compile/compile-c-support.c (c_compute_program): Use
12818         string_file.
12819         * compile/compile-c-symbols.c (generate_vla_size): Take a
12820         'string_file &' instead of a 'ui_file *'.
12821         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12822         of a 'ui_file *'.  Use string_file.
12823         (generate_c_for_variable_locations): Take a 'string_file &'
12824         instead of a 'ui_file *'.
12825         * compile/compile-internal.h (generate_c_for_for_one_variable):
12826         Take a 'string_file &' instead of a 'ui_file *'.
12827         * compile/compile-loc2c.c (push, pushf, unary, binary)
12828         (print_label, pushf_register_address, pushf_register)
12829         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12830         'ui_file *'.  Adjust.
12831         * compile/compile.c (compile_to_object): Use string_file.
12832         * compile/compile.h (compile_dwarf_expr_to_c)
12833         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12834         'ui_file *'.
12835         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12836         (replace_typedefs_qualified_name): Use string_file and
12837         obstack_copy0.
12838         * disasm.c (gdb_pretty_print_insn): Use string_file.
12839         (gdb_disassembly): Adjust reference the null_stream global.
12840         (do_ui_file_delete): Delete.
12841         (gdb_insn_length): Use null_stream.
12842         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12843         * dwarf2loc.c (dwarf2_compile_property_to_c)
12844         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12845         'string_file &' instead of a 'ui_file *'.
12846         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12847         * dwarf2read.c (do_ui_file_peek_last): Delete.
12848         (dwarf2_compute_name): Use string_file.
12849         * event-top.c (gdb_setup_readline): Use stdio_file.
12850         * gdbarch.sh (verify_gdbarch): Use string_file.
12851         * gdbtypes.c (safe_parse_type): Use null_stream.
12852         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12853         string_file.
12854         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12855         'string_file *' instead of a 'ui_file *'.
12856         (gdbscm_arch_disassemble): Use string_file.
12857         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12858         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12859         inherits from ui_file.
12860         (ioscm_file_port_delete, ioscm_file_port_rewind)
12861         (ioscm_file_port_put): Delete.
12862         (ioscm_file_port_write): Rename to ...
12863         (ioscm_file_port::write): ... this.  Remove file_port_magic
12864         checks.
12865         (ioscm_file_port_new): Delete.
12866         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12867         ui_file_up.
12868         * guile/scm-type.c (tyscm_type_name): Use string_file.
12869         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12870         Use string_file.
12871         * infcmd.c (print_return_value_1): Use string_file.
12872         * infrun.c (print_target_wait_results): Use string_file.
12873         * language.c (add_language): Use string_file.
12874         * location.c (explicit_to_string_internal): Use string_file.
12875         * main.c (captured_main_1): Use null_file.
12876         * maint.c (maintenance_print_architecture): Use stdio_file.
12877         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12878         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12879         event_channel>: Change type to mi_console_file pointer.
12880         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12881         (mi_console_file_delete): Delete.
12882         (struct mi_console_file): Delete.
12883         (mi_console_file_magic): Delete.
12884         (mi_console_file_new): Delete.
12885         (mi_console_file::mi_console_file): New.
12886         (mi_console_file_delete): Delete.
12887         (mi_console_file_fputs): Delete.
12888         (mi_console_file::write): New.
12889         (mi_console_raw_packet): Delete.
12890         (mi_console_file::flush): New.
12891         (mi_console_file_flush): Delete.
12892         (mi_console_set_raw): Rename to ...
12893         (mi_console_file::set_raw): ... this.
12894         * mi/mi-console.h (class mi_console_file): New class.
12895         (mi_console_file_new, mi_console_set_raw): Delete.
12896         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12897         (mi_set_logging): Use delete and tee_file.  Adjust.
12898         * mi/mi-main.c (output_register): Use string_file.
12899         (mi_cmd_data_evaluate_expression): Use string_file.
12900         (mi_cmd_data_read_memory): Use string_file.
12901         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12902         * mi/mi-out.c (mi_ui_out::main_stream): New.
12903         (mi_ui_out::rewind): Use main_stream and
12904         string_file.
12905         (mi_ui_out::put): Use main_stream and string_file.
12906         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12907         Allocate a 'string_file' instead.
12908         (mi_out_new): Don't allocate a mem_fileopen stream here.
12909         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12910         (mi_ui_out::main_stream): Declare method.
12911         * printcmd.c (eval_command): Use string_file.
12912         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12913         * python/py-arch.c (archpy_disassemble): Use string_file.
12914         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12915         * python/py-frame.c (frapy_str): Use string_file.
12916         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12917         Use string_file.
12918         * python/py-type.c (typy_str): Use string_file.
12919         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12920         * python/py-value.c (valpy_str): Use string_file.
12921         * record-btrace.c (btrace_insn_history): Use string_file.
12922         * regcache.c (regcache_print): Use stdio_file.
12923         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12924         * remote.c (escape_buffer): Use string_file.
12925         * rust-lang.c (rust_get_disr_info): Use string_file.
12926         * serial.c (serial_open_ops_1): Use stdio_file.
12927         (do_serial_close): Use delete.
12928         * stack.c (print_frame_arg): Use string_file.
12929         (print_frame_args): Remove local mem_fileopen stream, not used.
12930         (print_frame): Use string_file.
12931         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12932         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12933         Take a 'string_file *' instead of a 'ui_file *'.
12934         * top.c (new_ui): Use stdio_file and stderr_file.
12935         (free_ui): Use delete.
12936         (execute_command_to_string): Use string_file.
12937         (quit_confirm): Use string_file.
12938         * tracepoint.c (collection_list::append_exp): Use string_file.
12939         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12940         * tui/tui-file.c: Don't include "ui-file.h".
12941         (enum streamtype, struct tui_stream): Delete.
12942         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12943         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12944         (tui_file::tui_file): New method.
12945         (tui_file_fputs): Delete.
12946         (tui_file_get_strbuf): Delete.
12947         (tui_file::puts): New method.
12948         (tui_file_adjust_strbuf): Delete.
12949         (tui_file_flush): Delete.
12950         (tui_file::flush): New method.
12951         * tui/tui-file.h: Tweak intro comment.
12952         Include ui-file.h.
12953         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12954         (tui_file_adjust_strbuf): Delete declarations.
12955         (class tui_file): New class.
12956         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12957         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12958         (tui_register_format): Use string_stream.
12959         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12960         (tui_get_function_from_frame): Use string_file.
12961         * typeprint.c (type_to_string): Use string_file.
12962         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12963         (null_stream): New global.
12964         (ui_file_delete): Delete.
12965         (ui_file::ui_file): New.
12966         (null_file_isatty): Delete.
12967         (ui_file::~ui_file): New.
12968         (null_file_rewind): Delete.
12969         (ui_file::printf): New.
12970         (null_file_put): Delete.
12971         (null_file_flush): Delete.
12972         (ui_file::putstr): New.
12973         (null_file_write): Delete.
12974         (ui_file::putstrn): New.
12975         (null_file_read): Delete.
12976         (ui_file::putc): New.
12977         (null_file_fputs): Delete.
12978         (null_file_write_async_safe): Delete.
12979         (ui_file::vprintf): New.
12980         (null_file_delete): Delete.
12981         (null_file::write): New.
12982         (null_file_fseek): Delete.
12983         (null_file::puts): New.
12984         (ui_file_data): Delete.
12985         (null_file::write_async_safe): New.
12986         (gdb_flush, ui_file_isatty): Adjust.
12987         (ui_file_put, ui_file_rewind): Delete.
12988         (ui_file_write): Adjust.
12989         (ui_file_write_for_put): Delete.
12990         (ui_file_write_async_safe, ui_file_read): Adjust.
12991         (ui_file_fseek): Delete.
12992         (fputs_unfiltered): Adjust.
12993         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12994         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12995         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12996         (set_ui_file_data): Delete.
12997         (string_file::~string_file, string_file::write)
12998         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12999         (do_ui_file_as_string, ui_file_as_string): Delete.
13000         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13001         (struct mem_file): Delete.
13002         (mem_file_new): Delete.
13003         (stdio_file::stdio_file): New.
13004         (mem_file_delete): Delete.
13005         (stdio_file::stdio_file): New.
13006         (mem_fileopen): Delete.
13007         (stdio_file::~stdio_file): New.
13008         (mem_file_rewind): Delete.
13009         (stdio_file::set_stream): New.
13010         (mem_file_put): Delete.
13011         (stdio_file::open): New.
13012         (mem_file_write): Delete.
13013         (stdio_file_magic, struct stdio_file): Delete.
13014         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13015         (stdio_file::flush): New.
13016         (stdio_file_read): Rename to ...
13017         (stdio_file::read): ... this.  Adjust.
13018         (stdio_file_write): Rename to ...
13019         (stdio_file::write): ... this.  Adjust.
13020         (stdio_file_write_async_safe): Rename to ...
13021         (stdio_file::write_async_safe) ... this.  Adjust.
13022         (stdio_file_fputs): Rename to ...
13023         (stdio_file::puts) ... this.  Adjust.
13024         (stdio_file_isatty): Delete.
13025         (stdio_file_fseek): Delete.
13026         (stdio_file::isatty): New.
13027         (stderr_file_write): Rename to ...
13028         (stderr_file::write) ... this.  Adjust.
13029         (stderr_file_fputs): Rename to ...
13030         (stderr_file::puts) ... this.  Adjust.
13031         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13032         (stderr_file::stderr_file): New.
13033         (tee_file_magic): Delete.
13034         (struct tee_file): Delete.
13035         (tee_file::tee_file): New.
13036         (tee_file_new): Delete.
13037         (tee_file::~tee_file): New.
13038         (tee_file_delete): Delete.
13039         (tee_file_flush): Rename to ...
13040         (tee_file::flush): ... this.  Adjust.
13041         (tee_file_write): Rename to ...
13042         (tee_file::write): ... this.  Adjust.
13043         (tee_file::write_async_safe): New.
13044         (tee_file_fputs): Rename to ...
13045         (tee_file::puts): ... this.  Adjust.
13046         (tee_file_isatty): Rename to ...
13047         (tee_file::isatty): ... this.  Adjust.
13048         * ui-file.h (struct obstack, struct ui_file): Don't
13049         forward-declare.
13050         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13051         (ui_file_write_ftype)
13052         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13053         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13054         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13055         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13056         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13057         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13058         (set_ui_file_fseek): Delete.
13059         (ui_file_data, ui_file_delete, ui_file_rewind)
13060         (struct ui_file): New.
13061         (ui_file_up): New.
13062         (class null_file): New.
13063         (null_stream): Declare.
13064         (ui_file_write_for_put, ui_file_put): Delete.
13065         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13066         Delete.
13067         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13068         (gdb_fopen, tee_file_new): Delete.
13069         (struct string_file): New.
13070         (struct stdio_file): New.
13071         (stdio_file_up): New.
13072         (struct stderr_file): New.
13073         (class tee_file): New.
13074         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13075         of a 'ui_file *'.  Adjust.
13076         * ui-out.h (class ui_out) <field_stream>: Likewise.
13077         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13078         (null_stream): Delete.
13079         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13080         Adjust.
13081         * utils.h (struct ui_file): Delete forward declaration..
13082         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13083         (error_stream): Take a 'string_file &' instead of a
13084         'ui_file *'.
13085         * varobj.c (varobj_value_get_print_value): Use string_file.
13086         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13087         * gdbarch.c: Regenerate.
13088
13089 2017-02-02  Pedro Alves  <palves@redhat.com>
13090
13091         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13092         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13093         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13094         Adjust to call gdb_print_insn instead of
13095         gdb_disassembler::print_insn.
13096         (dump_insns, do_mixed_source_and_assembly_deprecated)
13097         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13098         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13099         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13100         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13101         declaration.
13102         (gdb_pretty_print_insn): Re-add declaration.
13103         * record-btrace.c (btrace_insn_history): Don't allocate a
13104         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13105
13106 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13107
13108         * disasm.h (gdb_disassembly): Remove file_string parameter.
13109         * disasm.c (gdb_disassembly): Likewise.
13110         * cli/cli-cmds.c (print_disassembly): Adapt.
13111         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13112         * stack.c (do_gdb_disassembly): Likewise.
13113
13114 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13115
13116         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13117         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13118         targets.  And if the implicit value is longer than needed, extract
13119         the first bytes instead of the "least significant" ones.
13120
13121 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13122
13123         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13124         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13125         (btrace_fetch): Assert can_access_registers_ptid.
13126         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13127         validate_registers_access.
13128
13129 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13130
13131         * gdbthread.h (can_access_registers_ptid): New.
13132         * thread.c (can_access_registers_ptid): New.
13133
13134 2017-02-01  Pedro Alves  <palves@redhat.com>
13135
13136         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13137
13138 2017-01-31  Pedro Alves  <palves@redhat.com>
13139
13140         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13141         Fix typos.
13142
13143 2017-01-31  Pedro Alves  <palves@redhat.com>
13144
13145         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13146         not used.
13147
13148 2017-01-31  Pedro Alves  <palves@redhat.com>
13149
13150         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13151
13152 2017-01-31  Pedro Alves  <palves@redhat.com>
13153
13154         * common/scoped_restore.h
13155         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13156         change the value's parameter type to T2.
13157         (make_scoped_restore): Likewise.
13158
13159 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13160             Richard Henderson  <rth@redhat.com>
13161
13162         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13163         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13164         GS_BASE for older kernels.
13165         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13166         GS_BASE for older kernels.
13167         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13168         and GS_BASE to the offset table.
13169         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13170         system register group.
13171         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13172         for older kernels.
13173         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13174         amd64 ABI.
13175         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13176         AMD64_GSBASE_REGNUM.
13177         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13178         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13179         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13180         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13181         i386/64bit-segments.xml in those rules.
13182         * features/i386/64bit-segments.xml: New file.
13183         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13184         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13185         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13186         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13187         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13188         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13189         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13190         * features/i386/amd64-avx-linux.c: Regenerated.
13191         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13192         * features/i386/amd64-avx-mpx.c: Regenerated.
13193         * features/i386/amd64-avx512-linux.c: Regenerated.
13194         * features/i386/amd64-linux.c: Regenerated.
13195         * features/i386/amd64-mpx-linux.c: Regenerated.
13196         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13197         * features/i386/i386-avx-mpx.c: Regenerated.
13198         * features/i386/x32-avx-linux.c: Regenerated.
13199         * features/i386/x32-avx512-linux.c: Regenerated.
13200         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13201         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13202         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13203         * regformats/i386/amd64-linux.dat: Regenerated.
13204         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13205         * regformats/i386/x32-avx-linux.dat: Regenerated.
13206         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13207         * regformats/i386/x32-linux.dat: Regenerated.
13208
13209 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13210
13211         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13212         Set to AMD64_NUM_REGS.
13213
13214 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13215
13216         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13217         that checks validity of a register number.
13218
13219 2017-01-27  Kees Cook  <keescook@google.com>
13220
13221         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13222         fetch_fpregs if target has fpa registers.
13223         (arm_linux_store_inferior_registers): Call store_fpregs if target
13224         has fpa registers.
13225
13226 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13227
13228         * cris-tdep.c (cris_gdbarch_init): Remove check for
13229         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13230
13231 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13232
13233         * corelow.c (get_core_register_section): Check for regset
13234         existence before checking for REGSET_VARIABLE_SIZE.
13235
13236 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13237             Pedro Alves  <palves@redhat.com>
13238
13239         PR gdb/20939
13240         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13241         call memory_error, save memaddr instead.
13242         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13243         negative, cal memory_error.
13244         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13245
13246 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13247
13248         * disasm-selftests.c (memory_error_test): New function.
13249         (_initialize_disasm_selftests): Register memory_error_test.
13250
13251 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13252
13253         * Makefile.in (SFILES): Add disasm-selftests.c and
13254         selftest-arch.c.
13255         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13256         * disasm-selftests.c: New file.
13257         * selftest-arch.c: New file.
13258         * selftest-arch.h: New file.
13259
13260 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13261
13262         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13263         to bfd_arch_mep.  Don't return 0 if section is not
13264         found.  Call print_insn_mep.
13265
13266 2017-01-26  Pedro Alves  <palves@redhat.com>
13267             Yao Qi  <yao.qi@linaro.org>
13268
13269         * arm-tdep.c: Include "disasm.h".
13270         (gdb_print_insn_arm): Update code to get gdbarch.
13271         * disasm.c (dis_asm_read_memory): Change it to
13272         gdb_disassembler::dis_asm_read_memory.
13273         (dis_asm_memory_error): Likewise.
13274         (dis_asm_print_address): Likewise.
13275         (gdb_pretty_print_insn): Change it to
13276         gdb_disassembler::pretty_print_insn.
13277         (dump_insns): Add one argument gdb_disassemlber.  All
13278         callers updated.
13279         (do_mixed_source_and_assembly_deprecated): Likewise.
13280         (do_mixed_source_and_assembly): Likewise.
13281         (do_assembly_only): Likewise.
13282         (gdb_disassembler::gdb_disassembler): New.
13283         (gdb_disassembler::print_insn): New.
13284         * disasm.h (class gdb_disassembler): New.
13285         (gdb_pretty_print_insn): Remove declaration.
13286         (gdb_disassemble_info): Likewise.
13287         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13288         (gdbscm_disasm_read_memory_worker): Update.
13289         (gdbscm_disasm_read_memory): Update.
13290         (gdbscm_disasm_memory_error): Remove.
13291         (gdbscm_disasm_print_address): Remove.
13292         (gdbscm_disassembler::gdbscm_disassembler): New.
13293         (gdbscm_print_insn_from_port): Update.
13294         * mips-tdep.c: Include disasm.h.
13295         (gdb_print_insn_mips): Update code to get gdbarch.
13296         * record-btrace.c (btrace_insn_history): Update.
13297         * spu-tdep.c: Include disasm.h.
13298         (struct spu_dis_asm_data): Remove.
13299         (struct spu_dis_asm_info): New.
13300         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13301         SPU id.
13302         (gdb_print_insn_spu): Cast disassemble_info to
13303         spu_dis_asm_info.
13304
13305 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13306
13307         * disasm.c (do_ui_file_delete): Delete.
13308         (gdb_insn_length): Move code creating stream to ...
13309         * utils.c (null_stream): ... here.  New function.
13310         * utils.h (null_stream): Declare.
13311
13312 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13313
13314         * python/py-inferior.c (find_thread_object): Return directly
13315         from the loop.  Remove "found" variable.
13316
13317 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13318
13319         GDB 7.12.1 released.
13320
13321 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13322
13323         * python/py-function.c (fnpy_call): Reorder declarations to have
13324         the gdbpy_enter object declared first.
13325         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13326
13327 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13328
13329         PR python/21068
13330         * python/python-internal.h (PyMem_RawMalloc): Define for
13331         Python < 3.4.
13332         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13333         PyMem_RawMalloc instead of PyMem_Malloc.
13334
13335 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13336             Luis Machado  <lgustavo@codesourcery.com>
13337
13338         * NEWS (New commands): Mention flash-erase.
13339         (New MI commands): Mention target-flash-erase.
13340         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13341         command.
13342         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13343         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13344         * target.c (flash_erase_command): New function.
13345         (initialize_targets): Add new flash-erase command.
13346         * target.h (flash_erase_command): New declaration.
13347
13348 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13349
13350         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13351         HAVE_SYS_PROCFS_H is defined.
13352
13353 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13354
13355         * remote.c (struct cached_reg): Change data into a pointer.
13356         * (stop_reply_dtr): Free data pointers before deleting vector.
13357         (process_stop_reply): Likewise.
13358         (remote_parse_stop_reply): Allocate space for data
13359
13360 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13361
13362         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13363         MAX_REGISTER_SIZE.
13364         (amd64_pseudo_register_read_value): Likewise.
13365         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13366         (store_register_using_P): Likewise.
13367         * regcache.c (regcache_xfer_part): Likewise.
13368
13369 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13370
13371         Split real and pseudo registers.
13372         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13373         (sparc32_pseudo_regnum): New enum.
13374         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13375         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13376         (SPARC32_CP0_REGISTERS): New macro.
13377         (sparc32_pseudo_register_name): New function.
13378         (sparc32_register_name): Use sparc32_pseudo_register_name.
13379         (sparc32_pseudo_register_type): New function.
13380         (sparc32_register_type): Use sparc32_pseudo_register_type.
13381         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13382         pseudo register numbers.
13383         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13384         (SPARC64_CP0_REGISTERS): New macro.
13385         (sparc64_pseudo_register_name): New function.
13386         (sparc64_register_name): Use sparc64_pseudo_register_name.
13387         (sparc64_pseudo_register_type): New function.
13388         (sparc64_register_type): Use sparc64_pseudo_register_type.
13389         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13390         pseudo register numbers.
13391         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13392         sparc64_store_arguments): Handle pseudo register numbers.
13393
13394 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13395
13396         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13397         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13398         output.
13399         (getpkt_or_notif_sane_1): Likewise.
13400
13401 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13402
13403         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13404         of CC.  Pass "-x c++-header" instead of "-x c".
13405
13406 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13407
13408         * remote.c (remote_can_async_p): Update comment.
13409
13410 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13411
13412         * linux-nat.c (linux_nat_can_async_p): Update comment.
13413
13414 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13415
13416         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13417
13418 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13419
13420         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13421
13422 2017-01-10  Tom Tromey  <tom@tromey.com>
13423
13424         * python/py-type.c (typy_legacy_template_argument): Update.
13425         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13426         ~demangle_parse_info): Declare new members.
13427         (cp_demangled_name_to_comp): Return unique_ptr.
13428         (cp_demangled_name_parse_free)
13429         (make_cleanup_cp_demangled_name_parse_free)
13430         (cp_new_demangle_parse_info): Remove.
13431         * cp-support.c (do_demangled_name_parse_free_cleanup)
13432         (make_cleanup_cp_demangled_name_parse_free): Remove.
13433         (inspect_type, cp_canonicalize_string_full)
13434         (cp_canonicalize_string): Update.
13435         (mangled_name_to_comp): Change return type.
13436         (cp_class_name_from_physname, method_name_from_physname)
13437         (cp_func_name, cp_remove_params): Update.
13438         * cp-name-parser.y (demangle_parse_info): New constructor, from
13439         cp_new_demangle_parse_info.
13440         (~demangle_parse_info): New destructor, from
13441         cp_demangled_name_parse_free.
13442         (cp_merge_demangle_parse_infos): Update.
13443         (cp_demangled_name_to_comp): Change return type.
13444
13445 2017-01-10  Tom Tromey  <tom@tromey.com>
13446
13447         * top.c (prevent_dont_repeat): Change return type.
13448         * python/python.c (execute_gdb_command): Use std::string.
13449         Update.
13450         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13451         * command.h (prevent_dont_repeat): Change return type.
13452         * breakpoint.c (bpstat_do_actions_1): Update.
13453
13454 2017-01-10  Tom Tromey  <tom@tromey.com>
13455
13456         * value.h (scoped_value_mark::~scoped_value_mark): Call
13457         free_to_mark.
13458         (scoped_value_mark::free_to_mark): New method.
13459         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13460         scoped_value_mark.
13461
13462 2017-01-10  Tom Tromey  <tom@tromey.com>
13463
13464         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13465         (valpy_reference_value, valpy_const_value, valpy_get_address)
13466         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13467         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13468         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13469         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13470         scoped_value_mark.
13471         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13472         * value.h (scoped_value_mark): New class.
13473
13474 2017-01-10  Tom Tromey  <tom@tromey.com>
13475
13476         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13477         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13478         * psymtab.c (discard_psymtabs_upto): Remove.
13479         (make_cleanup_discard_psymtabs): Remove.
13480         (struct psymtab_state): Remove.
13481
13482 2017-01-10  Tom Tromey  <tom@tromey.com>
13483
13484         * record-full.c (record_full_save_cleanups): Remove.
13485         (record_full_save): Use gdb::unlinker.
13486         * gcore.c (do_bfd_delete_cleanup): Remove.
13487         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13488         cleanups.
13489         * dwarf2read.c (unlink_if_set): Remove.
13490         (write_psymtabs_to_index): Use gdb::unlinker.
13491         * common/gdb_unlinker.h: New file.
13492
13493 2017-01-10  Tom Tromey  <tom@tromey.com>
13494
13495         * windows-tdep.c (windows_xfer_shared_library): Update.
13496         * windows-nat.c (windows_make_so): Update.
13497         * utils.h (make_cleanup_bfd_unref): Remove.
13498         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13499         * symfile.h (symfile_bfd_open)
13500         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13501         * symfile.c (read_symbols, symbol_file_add)
13502         (separate_debug_file_exists): Update.
13503         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13504         (generic_load, reread_symbols): Update.
13505         * symfile-mem.c (symbol_file_add_from_memory): Update.
13506         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13507         (spu_symbol_file_add_from_memory): Update.
13508         * solist.h (struct target_so_ops) <bfd_open>: Return
13509         gdb_bfd_ref_ptr.
13510         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13511         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13512         gdb_bfd_ref_ptr.
13513         (solib_map_sections, reload_shared_libraries_1): Update.
13514         * solib-svr4.c (enable_break): Update.
13515         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13516         * solib-frv.c (enable_break2): Update.
13517         * solib-dsbt.c (enable_break): Update.
13518         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13519         gdb_bfd_ref_ptr.
13520         (darwin_solib_get_all_image_info_addr_at_init): Update.
13521         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13522         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13523         * record-full.c (record_full_save): Update.
13524         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13525         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13526         * minidebug.c (find_separate_debug_file_in_section): Return
13527         gdb_bfd_ref_ptr.
13528         * machoread.c (macho_add_oso_symfile): Change abfd to
13529         gdb_bfd_ref_ptr.
13530         (macho_symfile_read_all_oso): Update.
13531         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13532         (macho_symfile_read): Update.
13533         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13534         (jit_bfd_try_read_symtab): Update.
13535         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13536         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13537         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13538         gdb_bfd_ref_ptr.
13539         (gdb_bfd_ref_policy): New struct.
13540         (gdb_bfd_ref_ptr): New typedef.
13541         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13542         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13543         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13544         gdb_bfd_ref_ptr.
13545         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13546         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13547         (gcore_command): Update.
13548         * exec.c (exec_file_attach): Update.
13549         * elfread.c (elf_symfile_read): Update.
13550         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13551         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13552         (open_and_init_dwo_file): Update.
13553         (open_dwp_file): Return gdb_bfd_ref_ptr.
13554         (open_and_init_dwp_file): Update.
13555         * corelow.c (core_open): Update.
13556         * compile/compile-object-load.c (compile_object_load): Update.
13557         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13558         * coffread.c (coff_symfile_read): Update.
13559         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13560         gdb_bfd_ref_ptr.  Rename.
13561         (dump_bfd_file, restore_command): Update.
13562         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13563         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13564         (find_separate_debug_file_by_buildid): Update.
13565
13566 2017-01-10  Tom Tromey  <tom@tromey.com>
13567
13568         * common/gdb_ref_ptr.h: New file.
13569         * python/py-ref.h (struct gdbpy_ref_policy): New.
13570         (gdbpy_ref): Now a typedef.
13571
13572 2017-01-10  Tom Tromey  <tom@tromey.com>
13573
13574         * utils.h (make_cleanup_htab_delete): Don't declare.
13575         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13576         Remove.
13577         * linespec.c (decode_compound_collector): Add constructor,
13578         destructor.
13579         (lookup_prefix_sym): Remove cleanup.
13580         (symtab_collector): Add constructor, destructor.
13581         (collect_symtabs_from_filename): Remove cleanup.
13582         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13583         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13584         Use htab_up.
13585         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13586         * dwarf2read.c (dw2_expand_symtabs_matching)
13587         (dw2_map_symbol_filenames, dwarf_decode_macros)
13588         (write_psymtabs_to_index): Use htab_up.
13589         * dwarf2loc.c (func_verify_no_selftailcall)
13590         (call_site_find_chain_1, func_verify_no_selftailcall)
13591         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13592         std::vector, gdb::unique_xmalloc_ptr.
13593         (call_sitep): Remove typedef.
13594         (dwarf2_locexpr_baton_eval): Remove unused variable.
13595
13596 2017-01-10  Tom Tromey  <tom@tromey.com>
13597
13598         * python/python-internal.h (make_cleanup_py_decref)
13599         (make_cleanup_py_xdecref): Don't declare.
13600         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13601         (py_xdecref, make_cleanup_py_xdecref): Remove.
13602
13603 2017-01-10  Tom Tromey  <tom@tromey.com>
13604
13605         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13606         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13607
13608 2017-01-10  Tom Tromey  <tom@tromey.com>
13609
13610         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13611
13612 2017-01-10  Tom Tromey  <tom@tromey.com>
13613
13614         * python/py-utils.c (unicode_to_encoded_string)
13615         (python_string_to_target_string)
13616         (python_string_to_target_python_string)
13617         (python_string_to_host_string, gdbpy_obj_to_string)
13618         (get_addr_from_python): Use gdbpy_ref.
13619
13620 2017-01-10  Tom Tromey  <tom@tromey.com>
13621
13622         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13623         gdbpy_ref.
13624
13625 2017-01-10  Tom Tromey  <tom@tromey.com>
13626
13627         * python/python.c (eval_python_command, gdbpy_decode_line)
13628         (gdbpy_run_events, gdbpy_start_type_printers)
13629         (gdbpy_apply_type_printers): Use gdbpy_ref.
13630
13631 2017-01-10  Tom Tromey  <tom@tromey.com>
13632
13633         * python/py-param.c (get_doc_string, compute_enum_values): Use
13634         gdbpy_ref.
13635
13636 2017-01-10  Tom Tromey  <tom@tromey.com>
13637
13638         * python/py-inferior.c (find_thread_object, build_inferior_list):
13639         Use gdbpy_ref.
13640
13641 2017-01-10  Tom Tromey  <tom@tromey.com>
13642
13643         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13644
13645 2017-01-10  Tom Tromey  <tom@tromey.com>
13646
13647         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13648         gdbpy_ref.
13649
13650 2017-01-10  Tom Tromey  <tom@tromey.com>
13651
13652         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13653         extra incref.
13654         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13655         Use gdbpy_ref.
13656
13657 2017-01-10  Tom Tromey  <tom@tromey.com>
13658
13659         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13660         gdbpy_ref.
13661
13662 2017-01-10  Tom Tromey  <tom@tromey.com>
13663
13664         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13665         decref results of PyArg_ParseTupleAndKeywords.
13666
13667 2017-01-10  Tom Tromey  <tom@tromey.com>
13668
13669         * python/python.c (python_run_simple_file): Use
13670         unique_xmalloc_ptr, gdbpy_ref.
13671
13672 2017-01-10  Tom Tromey  <tom@tromey.com>
13673
13674         * python/py-prettyprint.c (print_stack_unless_memory_error)
13675         (print_string_repr, print_children): Use gdbpy_ref.
13676         (dummy_python_frame): New class.
13677         (dummy_python_frame::dummy_python_frame): Rename from
13678         push_dummy_python_frame.
13679         (py_restore_tstate): Remove.
13680
13681 2017-01-10  Tom Tromey  <tom@tromey.com>
13682
13683         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13684
13685 2017-01-10  Tom Tromey  <tom@tromey.com>
13686
13687         * python/python.c (ensure_python_env, restore_python_env):
13688         Remove.
13689         * python/python-internal.h (ensure_python_env): Don't declare.
13690         * varobj.h (varobj_ensure_python_env): Don't declare.
13691         * varobj.c (varobj_ensure_python_env): Remove.
13692
13693 2017-01-10  Tom Tromey  <tom@tromey.com>
13694
13695         * varobj.c (varobj_value_get_print_value): Use
13696         gdbpy_enter_varobj.
13697
13698 2017-01-10  Tom Tromey  <tom@tromey.com>
13699
13700         * python/py-prettyprint.c (print_string_repr, print_children):
13701         Update.
13702         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13703         of "encoding".
13704         * varobj.c (varobj_value_get_print_value): Update.
13705         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13706
13707 2017-01-10  Tom Tromey  <tom@tromey.com>
13708
13709         * varobj.c (varobj_get_display_hint)
13710         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13711         (varobj_set_visualizer, free_variable): Use
13712         gdbpy_enter_varobj.
13713
13714 2017-01-10  Tom Tromey  <tom@tromey.com>
13715
13716         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13717         (do_finish_initialization): New function.  Use gdbpy_ref.
13718         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13719         do_finish_initialization.
13720
13721 2017-01-10  Tom Tromey  <tom@tromey.com>
13722
13723         * python/py-param.c (get_set_value, get_show_value): Use
13724         gdbpy_enter, gdbpy_ref.
13725
13726 2017-01-10  Tom Tromey  <tom@tromey.com>
13727
13728         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13729
13730 2017-01-10  Tom Tromey  <tom@tromey.com>
13731
13732         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13733
13734 2017-01-10  Tom Tromey  <tom@tromey.com>
13735
13736         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13737         Use gdbpy_enter_varobj.
13738
13739 2017-01-10  Tom Tromey  <tom@tromey.com>
13740
13741         * varobj.c (gdbpy_enter_varobj): New constructor.
13742         * python/python-internal.h (gdbpy_enter_varobj): New class.
13743         * python/py-varobj.c (py_varobj_get_iterator): Use
13744         gdbpy_enter_varobj.
13745
13746 2017-01-10  Tom Tromey  <tom@tromey.com>
13747
13748         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13749         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13750         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13751         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13752         unique_xmalloc_ptr.
13753         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13754
13755 2017-01-10  Tom Tromey  <tom@tromey.com>
13756
13757         * python/py-xmethods.c (invoke_match_method): Use
13758         gdbpy_ref.
13759
13760 2017-01-10  Tom Tromey  <tom@tromey.com>
13761
13762         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13763         gdbpy_enter, gdbpy_ref.
13764
13765 2017-01-10  Tom Tromey  <tom@tromey.com>
13766
13767         * python/python.c (python_interactive_command): Use gdbpy_enter.
13768
13769 2017-01-10  Tom Tromey  <tom@tromey.com>
13770
13771         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13772         gdbpy_ref.
13773
13774 2017-01-10  Tom Tromey  <tom@tromey.com>
13775
13776         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13777         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13778
13779 2017-01-10  Tom Tromey  <tom@tromey.com>
13780
13781         * utils.h (htab_deleter): New struct.
13782         (htab_up): New typedef.
13783         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13784         gdbpy_enter, gdbpy_ref, htab_up.
13785
13786 2017-01-10  Tom Tromey  <tom@tromey.com>
13787
13788         * python/py-unwind.c (pending_frame_invalidate): Remove.
13789         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13790
13791 2017-01-10  Tom Tromey  <tom@tromey.com>
13792
13793         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13794         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13795
13796 2017-01-10  Tom Tromey  <tom@tromey.com>
13797
13798         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13799
13800 2017-01-10  Tom Tromey  <tom@tromey.com>
13801
13802         * python/python.c (gdbpy_eval_from_control_command)
13803         (gdbpy_source_script, gdbpy_run_events)
13804         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13805         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13806         gdbpy_enter.
13807
13808 2017-01-10  Tom Tromey  <tom@tromey.com>
13809
13810         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13811
13812 2017-01-10  Tom Tromey  <tom@tromey.com>
13813
13814         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13815
13816 2017-01-10  Tom Tromey  <tom@tromey.com>
13817
13818         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13819         (python_on_inferior_call_pre, python_on_inferior_call_post)
13820         (python_on_memory_change, python_on_register_change)
13821         (python_inferior_exit, python_new_objfile, add_thread_object)
13822         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13823
13824 2017-01-10  Tom Tromey  <tom@tromey.com>
13825
13826         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13827         (bpfinishpy_handle_exit): Use gdbpy_enter.
13828
13829 2017-01-10  Tom Tromey  <tom@tromey.com>
13830
13831         * python/py-cmd.c (cmdpy_destroyer)
13832         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13833         gdbpy_enter.
13834
13835 2017-01-10  Tom Tromey  <tom@tromey.com>
13836
13837         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13838         gdbpy_enter.
13839         (gdbpy_breakpoint_has_cond): Likewise.
13840
13841 2017-01-10  Tom Tromey  <tom@tromey.com>
13842
13843         * python/python.c (gdbpy_enter): New constructor.
13844         (~gdbpy_enter): New destructor.
13845         (restore_python_env, ensure_python_env): Rewrite.
13846         * python/python-internal.h (gdbpy_enter): New class.
13847
13848 2017-01-10  Tom Tromey  <tom@tromey.com>
13849
13850         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13851
13852 2017-01-10  Tom Tromey  <tom@tromey.com>
13853
13854         * python/py-value.c (value_has_field, get_field_flag)
13855         (get_field_type, valpy_getitem, convert_value_from_python): Use
13856         gdbpy_ref.
13857
13858 2017-01-10  Tom Tromey  <tom@tromey.com>
13859
13860         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13861         gdbpy_ref.
13862
13863 2017-01-10  Tom Tromey  <tom@tromey.com>
13864
13865         * python/py-prettyprint.c (search_pp_list)
13866         (find_pretty_printer_from_objfiles)
13867         (find_pretty_printer_from_progspace)
13868         (find_pretty_printer_from_gdb, find_pretty_printer)
13869         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13870         gdbpy_ref.
13871
13872 2017-01-10  Tom Tromey  <tom@tromey.com>
13873
13874         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13875
13876 2017-01-10  Tom Tromey  <tom@tromey.com>
13877
13878         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13879         (ltpy_get_all_source_lines): Use gdbpy_ref.
13880
13881 2017-01-10  Tom Tromey  <tom@tromey.com>
13882
13883         * python/py-framefilter.c (extract_sym, extract_value)
13884         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13885         gdbpy_ref.
13886
13887 2017-01-10  Tom Tromey  <tom@tromey.com>
13888
13889         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13890
13891 2017-01-10  Tom Tromey  <tom@tromey.com>
13892
13893         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13894
13895 2017-01-10  Tom Tromey  <tom@tromey.com>
13896
13897         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13898         gdbpy_ref.
13899
13900 2017-01-10  Tom Tromey  <tom@tromey.com>
13901
13902         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13903
13904 2017-01-10  Tom Tromey  <tom@tromey.com>
13905
13906         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13907         (typy_range): Use gdbpy_ref.
13908
13909 2017-01-10  Tom Tromey  <tom@tromey.com>
13910
13911         * python/py-threadevent.c (create_thread_event_object): Use
13912         gdbpy_ref.
13913         * python/py-stopevent.c (create_stop_event_object): Simplify.
13914         (emit_stop_event): Use gdbpy_ref.
13915         * python/py-signalevent.c (create_signal_event_object): Use
13916         gdbpy_ref.
13917         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13918         (emit_new_objfile_event, create_clear_objfiles_event_object)
13919         (emit_clear_objfiles_event): Use gdbpy_ref.
13920         * python/py-infevents.c (create_inferior_call_event_object)
13921         (create_register_changed_event_object)
13922         (create_memory_changed_event_object, emit_inferior_call_event)
13923         (emit_memory_changed_event, emit_register_changed_event): Use
13924         gdbpy_ref.
13925         * python/py-exitedevent.c (create_exited_event_object)
13926         (emit_exited_event): Use gdbpy_ref.
13927         * python/py-event.h (evpy_emit_event): Remove
13928         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13929         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13930         * python/py-continueevent.c (emit_continue_event): Use
13931         gdbpy_ref.
13932         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13933         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13934         gdbpy_ref.
13935         * python/py-bpevent.c (create_breakpoint_event_object): Use
13936         gdbpy_ref.
13937
13938 2017-01-10  Tom Tromey  <tom@tromey.com>
13939
13940         * python/py-ref.h: New file.
13941
13942 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13943
13944         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13945         void.
13946         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13947         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13948         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13949         * ui-out.c (ui_out::redirect): Likewise.
13950         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13951         * cli/cli-logging.c (set_logging_redirect): Update call site of
13952         ui_out::redirect.
13953         (handle_redirections): Likewise.
13954         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13955         * top.c (execute_command_to_string): Likewise.
13956         * utils.c (do_ui_out_redirect_pop): Likewise.
13957
13958 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13959
13960         * stack.c (_initialize_stack): Update "frame" command help message.
13961
13962 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13963
13964         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13965
13966 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13967
13968         * x86-linux-nat.h: Include gdb_proc_service.h.
13969
13970 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13971
13972         * ser-base.h: Include serial.h.
13973
13974 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13975
13976         * ppc-linux-tdep.h: Include ppc-tdep.h.
13977
13978 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13979
13980         * nat/amd64-linux-siginfo.h: Include signal.h.
13981
13982 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13983
13984         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13985
13986 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13987
13988         * mi/mi-parse.h: Include mi-cmds.h.
13989
13990 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13991
13992         * inf-loop.c: Don't include "target.h".
13993         * inf-loop.h: Include it here.
13994
13995 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13996
13997         * dfp.h: Include "dboulest.h" and "expression.h".
13998
13999 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14000
14001         * ax-gdb.h: Include "ax.h".
14002
14003 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14004
14005         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14006         with nat/gdb_ptrace.h.
14007
14008 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14009
14010         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14011         new line.
14012         (mips64_fbsd_sigframe_init): Likewise.
14013
14014 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14015
14016         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14017         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14018
14019 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14020
14021         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14022         * NEWS: Mention new FreeBSD/mips native configuration.
14023         * config/mips/fbsd.mh: New file.
14024         * configure.host: Add mips*-*-freebsd*.
14025         * mips-fbsd-nat.c: New file.
14026
14027 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14028
14029         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14030         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14031         * NEWS: Mention new FreeBSD/mips target.
14032         * configure.tgt: Add mips*-*-freebsd*.
14033         * mips-fbsd-tdep.c: New file.
14034         * mips-fbsd-tdep.h: New file.
14035
14036 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14037
14038         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14039         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14040
14041 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14042
14043         Update copyright year range in all GDB files.
14044
14045 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14046
14047         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14048
14049 For older changes see ChangeLog-2016.
14050 \f
14051 Local Variables:
14052 mode: change-log
14053 left-margin: 8
14054 fill-column: 74
14055 version-control: never
14056 coding: utf-8
14057 End: