const-fy breakpoint_ops->breakpoint_hit parameter aspace
[external/binutils.git] / gdb / ChangeLog
1 2017-10-26  Yao Qi  <yao.qi@linaro.org>
2
3         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4         aspace const.
5         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
6         Likewise.
7         * breakpoint.c (bpstat_check_location): Remove cast.
8         (breakpoint_hit_catch_fork): Make aspce const.
9         (breakpoint_hit_catch_solib): Likewise.
10         (breakpoint_hit_catch_exec): Likewise.
11         (breakpoint_hit_ranged_breakpoint): Likewise.
12         (breakpoint_hit_watchpoint): Likewise.
13         (base_breakpoint_breakpoint_hit): Likewise.
14         (bkpt_breakpoint_hit): Likewise.
15         (dprintf_breakpoint_hit): Likewise.
16         (tracepoint_breakpoint_hit): Likewise.
17         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
18
19 2017-10-26  Yao Qi  <yao.qi@linaro.org>
20
21         * breakpoint.c (breakpoint_location_address_match): Change
22         "struct address_space *" to "const address_space".
23         (breakpoint_location_address_range_overlap): Likewise.
24         (breakpoint_here_p): Likewise.
25         (breakpoint_in_range_p): Likewise.
26         (moribund_breakpoint_here_p): Likewise.
27         (bp_location_inserted_here_p): Likewise.
28         (software_breakpoint_inserted_here_p): Likewise.
29         (hardware_breakpoint_inserted_here_p): Likewise.
30         (hardware_watchpoint_inserted_in_range): Likewise.
31         (bpstat_check_location): Likewise.
32         (bpstat_stop_status): Likewise.
33         (breakpoint_address_match): Likewise.
34         (breakpoint_address_match_range): Likewise.
35         (breakpoint_location_address_match): Likewise.
36         (breakpoint_location_address_range_overlap): Likewise.
37         (insert_single_step_breakpoint): Likewise.
38         (breakpoint_has_location_inserted_here): Likewise.
39         (single_step_breakpoint_inserted_here_p): Likewise.
40         (pc_at_non_inline_function): Likewise.
41         * breakpoint.h (bpstat_stop_status): Update declaration.
42         (breakpoint_here_p): Likewise.
43         (breakpoint_in_range_p): Likewise.
44         (moribund_breakpoint_here_p): Likewise.
45         (breakpoint_inserted_here_p): Likewise.
46         (software_breakpoint_inserted_here_p): Likewise.
47         (hardware_breakpoint_inserted_here_p): Likewise.
48         (breakpoint_has_location_inserted_here): Likewise.
49         (single_step_breakpoint_inserted_here_p): Likewise.
50         (hardware_watchpoint_inserted_in_range): Likewise.
51         (breakpoint_address_match): Likewise.
52         (insert_single_step_breakpoint): Likewise.
53         (pc_at_non_inline_function): Likewise.
54         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
55         * record.c (record_check_stopped_by_breakpoint): Likewise.
56         * record.h (record_check_stopped_by_breakpoint): Likewise.
57         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
58
59 2017-10-25  Yao Qi  <yao.qi@linaro.org>
60
61         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
62         regcache->arch () instead get_regcache_arch.
63         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
64         Likewise.
65         (aarch64_fbsd_store_inferior_registers): Likewise.
66         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
67         (store_gregs_to_thread): Likewise.
68         (fetch_fpregs_from_thread): Likewise.
69         (store_fpregs_to_thread): Likewise.
70         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
71         (aarch64_store_return_value): Likewise.
72         (aarch64_software_single_step): Likewise.
73         * aix-thread.c (aix_thread_wait): Likewise.
74         (supply_reg32): Likewise.
75         (supply_sprs64): Likewise.
76         (supply_sprs32): Likewise.
77         (fill_gprs64): Likewise.
78         (fill_gprs32): Likewise.
79         (fill_sprs64): Likewise.
80         (fill_sprs32): Likewise.
81         (store_regs_user_thread): Likewise.
82         (store_regs_kernel_thread): Likewise.
83         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
84         (alphabsd_store_inferior_registers): Likewise.
85         * alpha-tdep.c (alpha_extract_return_value): Likewise.
86         (alpha_store_return_value): Likewise.
87         (alpha_deal_with_atomic_sequence): Likewise.
88         (alpha_next_pc): Likewise.
89         (alpha_software_single_step): Likewise.
90         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
91         (amd64bsd_store_inferior_registers): Likewise.
92         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
93         Likewise.
94         (amd64_linux_store_inferior_registers): Likewise.
95         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
96         (amd64_collect_native_gregset): Likewise.
97         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
98         (amd64obsd_collect_uthread): Likewise.
99         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
100         (amd64_collect_fpregset): Likewise.
101         (amd64_supply_fxsave): Likewise.
102         (amd64_supply_xsave): Likewise.
103         (amd64_collect_fxsave): Likewise.
104         (amd64_collect_xsave): Likewise.
105         * arc-tdep.c (arc_write_pc): Likewise.
106         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
107         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
108         (arm_fbsd_store_inferior_registers): Likewise.
109         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
110         (store_vfp_regs): Likewise.
111         (arm_linux_fetch_inferior_registers): Likewise.
112         (arm_linux_store_inferior_registers): Likewise.
113         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
114         (arm_linux_sigreturn_next_pc): Likewise.
115         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
116         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
117         (fetch_register): Likewise.
118         (store_register): Likewise.
119         * arm-tdep.c (arm_is_thumb): Likewise.
120         (displaced_in_arm_mode): Likewise.
121         (bx_write_pc): Likewise.
122         (arm_get_next_pcs_addr_bits_remove): Likewise.
123         (arm_software_single_step): Likewise.
124         (arm_extract_return_value): Likewise.
125         (arm_store_return_value): Likewise.
126         (arm_write_pc): Likewise.
127         * bfin-tdep.c (bfin_extract_return_value): Likewise.
128         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
129         (bsd_uthread_store_registers): Likewise.
130         * core-regset.c (fetch_core_registers): Likewise.
131         * corelow.c (get_core_registers): Likewise.
132         * cris-tdep.c (cris_store_return_value): Likewise.
133         (cris_extract_return_value): Likewise.
134         (find_step_target): Likewise.
135         (find_step_target): Likewise.
136         (cris_software_single_step): Likewise.
137         * ctf.c (ctf_fetch_registers): Likewise.
138         * darwin-nat.c (cancel_breakpoint): Likewise.
139         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
140         * frv-tdep.c (frv_extract_return_value): Likewise.
141         * ft32-tdep.c (ft32_store_return_value): Likewise.
142         (ft32_extract_return_value): Likewise.
143         * go32-nat.c (fetch_register): Likewise.
144         (go32_fetch_registers): Likewise.
145         (go32_store_registers): Likewise.
146         (store_register): Likewise.
147         * h8300-tdep.c (h8300_extract_return_value): Likewise.
148         (h8300_store_return_value): Likewise.
149         * hppa-linux-nat.c (fetch_register): Likewise.
150         (store_register): Likewise.
151         (hppa_linux_fetch_inferior_registers): Likewise.
152         (hppa_linux_store_inferior_registers): Likewise.
153         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
154         (i386_darwin_store_inferior_registers): Likewise.
155         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
156         (gnu_store_registers): Likewise.
157         * i386-linux-nat.c (fetch_register): Likewise.
158         (store_register): Likewise.
159         (supply_gregset): Likewise.
160         (fill_gregset): Likewise.
161         (i386_linux_fetch_inferior_registers): Likewise.
162         (i386_linux_store_inferior_registers): Likewise.
163         (i386_linux_resume): Likewise.
164         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
165         Likewise.
166         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
167         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
168         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
169         (i386obsd_collect_uthread): Likewise.
170         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
171         (i386_supply_gregset): Likewise.
172         (i386_collect_gregset): Likewise.
173         (i386_supply_fpregset): Likewise.
174         (i386_collect_fpregset): Likewise.
175         (i386_mpx_bd_base): Likewise.
176         * i386-v4-nat.c (supply_fpregset): Likewise.
177         (fill_fpregset): Likewise.
178         * i387-tdep.c (i387_supply_fsave): Likewise.
179         (i387_collect_fsave): Likewise.
180         (i387_supply_fxsave): Likewise.
181         (i387_collect_fxsave): Likewise.
182         (i387_supply_xsave): Likewise.
183         (i387_collect_xsave): Likewise.
184         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
185         (ia64_linux_store_registers): Likewise.
186         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
187         (ia64_extract_return_value): Likewise.
188         (ia64_store_return_value): Likewise.
189         (find_func_descr): Likewise.
190         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
191         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
192         (inf_ptrace_store_registers): Likewise.
193         * infrun.c (use_displaced_stepping): Likewise.
194         (displaced_step_prepare_throw): Likewise.
195         (resume): Likewise.
196         (proceed): Likewise.
197         (do_target_wait): Likewise.
198         (adjust_pc_after_break): Likewise.
199         (handle_inferior_event_1): Likewise.
200         (handle_signal_stop): Likewise.
201         (save_infcall_suspend_state): Likewise.
202         (restore_infcall_suspend_state): Likewise.
203         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
204         * jit.c (jit_frame_prev_register): Likewise.
205         * linux-nat.c (save_stop_reason): Likewise.
206         (linux_nat_wait_1): Likewise.
207         (resume_stopped_resumed_lwps): Likewise.
208         * linux-record.c (record_linux_sockaddr): Likewise.
209         (record_linux_msghdr): Likewise.
210         (record_linux_system_call): Likewise.
211         * linux-tdep.c (linux_collect_thread_registers): Likewise.
212         * lm32-tdep.c (lm32_extract_return_value): Likewise.
213         (lm32_store_return_value): Likewise.
214         * m32c-tdep.c (m32c_read_flg): Likewise.
215         (m32c_pseudo_register_read): Likewise.
216         (m32c_pseudo_register_write): Likewise.
217         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
218         (m32r_linux_collect_gregset): Likewise.
219         * m32r-tdep.c (m32r_store_return_value): Likewise.
220         (m32r_extract_return_value): Likewise.
221         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
222         (m68kbsd_collect_fpregset): Likewise.
223         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
224         * m68k-linux-nat.c (fetch_register): Likewise.
225         (old_fetch_inferior_registers): Likewise.
226         (old_store_inferior_registers): Likewise.
227         (store_regs): Likewise.
228         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
229         (m68k_svr4_store_return_value): Likewise.
230         * m88k-tdep.c (m88k_store_arguments): Likewise.
231         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
232         (mi_cmd_data_write_register_values): Likewise.
233         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
234         (mips_fbsd_store_inferior_registers): Likewise.
235         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
236         (mips_fbsd_supply_gregs): Likewise.
237         (mips_fbsd_collect_fpregs): Likewise.
238         (mips_fbsd_collect_gregs): Likewise.
239         (mips_fbsd_supply_fpregset): Likewise.
240         (mips_fbsd_collect_fpregset): Likewise.
241         (mips_fbsd_supply_gregset): Likewise.
242         (mips_fbsd_collect_gregset): Likewise.
243         * mips-linux-nat.c (supply_gregset): Likewise.
244         (fill_gregset): Likewise.
245         (supply_fpregset): Likewise.
246         (fill_fpregset): Likewise.
247         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
248         (mips_fill_gregset): Likewise.
249         (mips_supply_fpregset): Likewise.
250         (mips_fill_fpregset): Likewise.
251         (mips64_supply_gregset): Likewise.
252         (micromips_linux_sigframe_validate): Likewise.
253         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
254         (mipsnbsd_fetch_inferior_registers): Likewise.
255         (mipsnbsd_store_inferior_registers): Likewise.
256         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
257         (mipsnbsd_supply_gregset): Likewise.
258         (mipsnbsd_iterate_over_regset_sections): Likewise.
259         (mipsnbsd_supply_reg): Likewise.
260         (mipsnbsd_supply_fpreg): Likewise.
261         * mips-tdep.c (mips_in_frame_stub): Likewise.
262         (mips_dummy_id): Likewise.
263         (is_octeon_bbit_op): Likewise.
264         (micromips_bc1_pc): Likewise.
265         (extended_mips16_next_pc): Likewise.
266         (mips16_next_pc): Likewise.
267         (deal_with_atomic_sequence): Likewise.
268         * moxie-tdep.c (moxie_process_readu): Likewise.
269         * nios2-tdep.c (nios2_get_next_pc): Likewise.
270         * nto-procfs.c (procfs_store_registers): Likewise.
271         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
272         (ppcfbsd_store_inferior_registers): Likewise.
273         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
274         (fetch_altivec_register): Likewise.
275         (get_spe_registers): Likewise.
276         (fetch_spe_register): Likewise.
277         (fetch_altivec_registers): Likewise.
278         (fetch_all_gp_regs): Likewise.
279         (fetch_all_fp_regs): Likewise.
280         (store_vsx_register): Likewise.
281         (store_altivec_register): Likewise.
282         (set_spe_registers): Likewise.
283         (store_spe_register): Likewise.
284         (store_altivec_registers): Likewise.
285         (store_all_gp_regs): Likewise.
286         (store_all_fp_regs): Likewise.
287         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
288         (ppc_linux_collect_gregset): Likewise.
289         (ppc_canonicalize_syscall): Likewise.
290         (ppc_linux_record_signal): Likewise.
291         (ppu2spu_prev_register): Likewise.
292         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
293         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
294         (ppcobsd_store_registers): Likewise.
295         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
296         Likewise.
297         (ppc_ravenscar_generic_store_registers): Likewise.
298         * procfs.c (procfs_fetch_registers): Likewise.
299         (procfs_store_registers): Likewise.
300         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
301         (ravenscar_store_registers): Likewise.
302         (ravenscar_prepare_to_store): Likewise.
303         * record-btrace.c (record_btrace_fetch_registers): Likewise.
304         * record-full.c (record_full_wait_1): Likewise.
305         (record_full_registers_change): Likewise.
306         (record_full_store_registers): Likewise.
307         (record_full_core_fetch_registers): Likewise.
308         (record_full_save): Likewise.
309         (record_full_goto_insn): Likewise.
310         * regcache.c (regcache_register_size): Likewise.
311         (get_regcache_arch): Remove.
312         (regcache_read_pc): Likewise.
313         * regcache.h (get_regcache_arch): Remove.
314         * remote-sim.c (gdbsim_fetch_register): Likewise.
315         (gdbsim_store_register): Likewise.
316         * remote.c (fetch_register_using_p): Likewise.
317         (send_g_packet): Likewise.
318         (remote_prepare_to_store): Likewise.
319         (store_registers_using_G): Likewise.
320         * reverse.c (save_bookmark_command): Likewise.
321         (goto_bookmark_command): Likewise.
322         * rs6000-aix-tdep.c (branch_dest): Likewise.
323         * rs6000-nat.c (rs6000_ptrace64): Likewise.
324         (fetch_register): Likewise.
325         * rs6000-tdep.c (ppc_supply_reg): Likewise.
326         (ppc_collect_reg): Likewise.
327         (ppc_collect_gregset): Likewise.
328         (ppc_collect_fpregset): Likewise.
329         (ppc_collect_vsxregset): Likewise.
330         (ppc_collect_vrregset): Likewise.
331         (ppc_displaced_step_hw_singlestep): Likewise.
332         (rs6000_pseudo_register_read): Likewise.
333         (rs6000_pseudo_register_write): Likewise.
334         * s390-linux-nat.c (supply_gregset): Likewise.
335         (fill_gregset): Likewise.
336         (s390_linux_fetch_inferior_registers): Likewise.
337         * s390-linux-tdep.c (s390_write_pc): Likewise.
338         (s390_software_single_step): Likewise.
339         (s390_all_but_pc_registers_record): Likewise.
340         (s390_linux_syscall_record): Likewise.
341         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
342         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
343         (shnbsd_store_inferior_registers): Likewise.
344         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
345         (sh_extract_return_value_fpu): Likewise.
346         (sh_store_return_value_nofpu): Likewise.
347         (sh_corefile_supply_regset): Likewise.
348         (sh_corefile_collect_regset): Likewise.
349         * sh64-tdep.c (sh64_extract_return_value): Likewise.
350         (sh64_store_return_value): Likewise.
351         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
352         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
353         (sparc_store_inferior_registers): Likewise.
354         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
355         (sparc_ravenscar_prepare_to_store): Likewise.
356         * sparc-tdep.c (sparc32_store_arguments): Likewise.
357         (sparc_analyze_control_transfer): Likewise.
358         (sparc_step_trap): Likewise.
359         (sparc_software_single_step): Likewise.
360         (sparc32_gdbarch_init): Likewise.
361         (sparc_supply_rwindow): Likewise.
362         (sparc_collect_rwindow): Likewise.
363         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
364         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
365         (sparc64nbsd_collect_gregset): Likewise.
366         (sparc64nbsd_supply_fpregset): Likewise.
367         (sparc64nbsd_collect_fpregset): Likewise.
368         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
369         (sparc64_supply_gregset): Likewise.
370         (sparc64_collect_gregset): Likewise.
371         (sparc64_supply_fpregset): Likewise.
372         (sparc64_collect_fpregset): Likewise.
373         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
374         * spu-tdep.c (spu_unwind_sp): Likewise.
375         (spu2ppu_prev_register): Likewise.
376         (spu_memory_remove_breakpoint): Likewise.
377         * stack.c (return_command): Likewise.
378         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
379         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
380         * tracefile.c (trace_save_ctf): Likewise.
381         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
382         (do_windows_store_inferior_registers): Likewise.
383         (windows_resume): Likewise.
384         * xtensa-linux-nat.c (fill_gregset): Likewise.
385         (supply_gregset_reg): Likewise.
386         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
387         (xtensa_register_read_masked): Likewise.
388         (xtensa_supply_gregset): Likewise.
389         (xtensa_extract_return_value): Likewise.
390         (xtensa_store_return_value): Likewise.
391
392 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
393
394         * doublest.c (floatformat_from_string): New function.
395         * doublest.h (floatformat_from_string): Add prototype.
396
397         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
398         (OP_FLOAT): ... this.
399         * expression.h: Do not include "doublest.h".
400         (union exp_element): Replace doubleconst and decfloatconst by
401         new element floatconst.
402         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
403         (ada_evaluate_subexp): Likewise.
404         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
405         OP_DOUBLE and OP_DECFLOAT.
406         * expprint.c (print_subexp_standard): Likewise.
407         (dump_subexp_body_standard): Likewise.
408         * breakpoint.c (watchpoint_exp_is_const): Likewise.
409
410         * parse.c: Include "dfp.h".
411         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
412         (write_exp_elt_floatcst): New function.
413         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
414         and OP_DECFLOAT.
415         (operator_check_standard): Likewise.
416         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
417         Return target format buffer instead of host DOUBLEST.
418         Use floatformat_from_string and decimal_from_string to parse
419         either binary or decimal floating-point types.
420         (parse_c_float): Remove.
421         * parser-defs.h: Do not include "doublest.h".
422         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
423         (write_exp_elt_floatcst): Add prototype.
424         (parse_float): Update prototype.
425         (parse_c_float): Remove.
426
427         * c-exp.y: Do not include "dfp.h".
428         (typed_val_float): Use byte buffer instead of DOUBLEST.
429         (typed_val_decfloat): Remove.
430         (DECFLOAT): Remove.
431         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
432         (parse_number): Update to new parse_float interface.
433         Parse suffixes and determine type before calling parse_float.
434         Handle decimal and binary FP types the same way.
435
436         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
437         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
438         (parse_number): Update to new parse_float interface.
439         Parse suffixes and determine type before calling parse_float.
440
441         * f-exp.y: Replace dval by typed_val_float.
442         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
443         (parse_number): Use parse_float instead of atof.
444
445         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
446         (parse_go_float): Remove.
447         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
448         (parse_number): Call parse_float instead of parse_go_float.
449         Parse suffixes and determine type before calling parse_float.
450
451         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
452         (FLOAT): 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         * m2-exp.y: Replace dval by byte buffer val.
457         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
458         (parse_number): Call parse_float instead of atof.
459
460         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
461         (lex_number): Call parse_float instead of strtod.
462         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
463         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
464         Use write_exp_elt_floatcst.
465         (unit_testing): Remove static variable.
466         (rust_type): Do not check unit_testing.
467         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
468
469         * ada-exp.y (type_float, type_double): Remove.
470         (typed_val_float): Use byte buffer instead of DOUBLEST.
471         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
472         * ada-lex.l (processReal): Use parse_float instead of sscanf.
473
474 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
475
476         * aarch64-tdep.h (enum aarch64_regnum): Remove.
477         * arch/aarch64.h: New file.
478
479 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
480
481         * dfp.h (decimal_from_string): Use const reference for argument.
482         * dfp.c (decimal_from_string): Likewise.
483
484 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
485
486         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
487         * sh64-tdep.c (sh64_do_fp_register): Likewise.
488         * mips-tdep.c (mips_print_fp_register): Likewise.
489
490 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
491
492         * common/format.h (enum argclass): Replace decfloat_arg by
493         dec32float_arg, dec64float_arg, and dec128float_arg.
494         * common/format.c (parse_format_string): Update to return
495         new decimal float argument classes.
496
497         * printcmd.c (printf_decfloat): Rename to ...
498         (printf_floating): ... this.  Add argclass argument, and use it
499         instead of parsing the format string again.  Add support for
500         binary floating-point values, using floatformat_to_string.
501         Convert value to the target format if it doesn't already match.
502         (ui_printf): Call printf_floating instead of printf_decfloat,
503         also for double_arg / long_double_arg.  Pass argclass.
504
505         * dfp.c (decimal_to_string): Add format string argument.
506         * dfp.h (decimal_to_string): Likewise.
507
508         * doublest.c (floatformat_to_string): Add format string argument.
509         * doublest.h (floatformat_to_string): Likewise.
510
511 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
512
513         * doublest.c (floatformat_precision): New routine.
514         (floatformat_to_string): Likewise.
515         * doublest.c (floatformat_to_string): Add prototype.
516
517         * printcmd.c (print_scalar_formatted): Only call print_floating
518         on floating-point types.
519         * valprint.c: Do not include "floatformat.h".
520         (generic_val_print_decfloat): Remove.
521         (generic_val_print): Call generic_val_print_float for both
522         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
523         (print_floating): Use floatformat_to_string.  Handle decimal float.
524         (print_decimal_floating): Remove, merge into floatformat_to_string.
525         * value.h (print_decimal_floating): Remove.
526
527         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
528
529 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
530
531         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
532
533 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
534
535         * memattr.h: Don't include vec.h.
536         (struct mem_attrib): Initialize fields.
537         <unknown>: New static method.
538         (struct mem_region): Add constructors, operator<, initialize
539         fields.
540         * memattr.c: Include algorithm.
541         (default_mem_attrib, unknown_mem_attrib): Remove.
542         (user_mem_region_list): New global.
543         (target_mem_region_list, mem_region_list): Change type to
544         std::vector<mem_region>.
545         (mem_use_target): Now a function.
546         (target_mem_regions_valid): Change type to bool.
547         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
548         (require_user_regions): Adjust.
549         (require_target_regions): Adjust.
550         (create_mem_region): Adjust.
551         (lookup_mem_region): Adjust.
552         (invalidate_target_mem_regions): Adjust.
553         (mem_clear): Rename to...
554         (user_mem_clear): ... this, and adjust.
555         (mem_command): Adjust.
556         (info_mem_command): Adjust.
557         (mem_enable, enable_mem_command, mem_disable,
558         disable_mem_command): Adjust.
559         (mem_delete): Adjust.
560         (delete_mem_command): Adjust.
561         * memory-map.h (parse_memory_map): Return an std::vector.
562         * memory-map.c (parse_memory_map): Likewise.
563         (struct memory_map_parsing_data): Add constructor.
564         <memory_map>: Point to std::vector.
565         (memory_map_start_memory): Adjust.
566         (memory_map_end_memory): Adjust.
567         (memory_map_end_property): Adjust.
568         (clear_result): Remove.
569         * remote.c (remote_memory_map): Return an std::vector.
570         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
571         Remove.
572         (target_debug_print_mem_region_vector): New.
573         * target-delegates.c: Regenerate.
574         * target.h (mem_region_vector): New typedef.
575         (to_memory_map): Return mem_region_vector.
576         (target_memory_map): Return an std::vector.
577         * target.c (target_memory_map): Return an std::vector.
578         (flash_erase_command): Adjust.
579
580 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
581
582         * memory-map.c (struct memory_map_parsing_data) <property_name>:
583         Change type to std::string.
584         (memory_map_start_property): Adjust.
585         (memory_map_end_property): Adjust.
586
587 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
588
589         * infrun.h: Include common/byte-vector.h.
590         (struct displaced_step_closure): New struct.
591         (struct buf_displaced_step_closure): New struct.
592         * infrun.c (displaced_step_closure::~displaced_step_closure):
593         Provide default implementation.
594         (displaced_step_clear): Deallocate step closure with delete.
595         * aarch64-tdep.c (displaced_step_closure): Rename to ...
596         (aarch64_displaced_step_closure): ... this, extend
597         displaced_step_closure.
598         (aarch64_displaced_step_data) <dsc>: Change type to
599         aarch64_displaced_step_closure.
600         (aarch64_displaced_step_copy_insn): Adjust to type change, use
601         unique_ptr.
602         (aarch64_displaced_step_fixup): Add cast for displaced step
603         closure.
604         * amd64-tdep.c (displaced_step_closure): Rename to ...
605         (amd64_displaced_step_closure): ... this, extend
606         displaced_step_closure.
607         <insn_buf>: Change type to std::vector<gdb_byte>.
608         <max_len>: Remove.
609         (fixup_riprel): Change type of DSC parameter, adjust to type
610         change of insn_buf.
611         (fixup_displaced_copy): Change type of DSC parameter.
612         (amd64_displaced_step_copy_insn): Instantiate
613         amd64_displaced_step_closure.
614         (amd64_displaced_step_fixup): Add cast for closure type, adjust
615         to type change of insn_buf.
616         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
617         parameter DSC.
618         (arm_linux_copy_svc): Likewise.
619         (cleanup_kernel_helper_return): Likewise.
620         (arm_catch_kernel_helper_return): Likewise.
621         (arm_linux_displaced_step_copy_insn): Instantiate
622         arm_displaced_step_closure.
623         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
624         (displaced_read_reg): Change type of parameter DSC.
625         (branch_write_pc): Likewise.
626         (load_write_pc): Likewise.
627         (alu_write_pc): Likewise.
628         (displaced_write_reg): Likewise.
629         (arm_copy_unmodified): Likewise.
630         (thumb_copy_unmodified_32bit): Likewise.
631         (thumb_copy_unmodified_16bit): Likewise.
632         (cleanup_preload): Likewise.
633         (install_preload): Likewise.
634         (arm_copy_preload): Likewise.
635         (thumb2_copy_preload): Likewise.
636         (install_preload_reg): Likewise.
637         (arm_copy_preload_reg): Likewise.
638         (cleanup_copro_load_store): Likewise.
639         (install_copro_load_store): Likewise.
640         (arm_copy_copro_load_store) Likewise.
641         (thumb2_copy_copro_load_store): Likewise.
642         (cleanup_branch): Likewise.
643         (install_b_bl_blx): Likewise.
644         (arm_copy_b_bl_blx): Likewise.
645         (thumb2_copy_b_bl_blx): Likewise.
646         (thumb_copy_b): Likewise.
647         (install_bx_blx_reg): Likewise.
648         (arm_copy_bx_blx_reg): Likewise.
649         (thumb_copy_bx_blx_reg): Likewise.
650         (cleanup_alu_imm): Likewise.
651         (arm_copy_alu_imm): Likewise.
652         (thumb2_copy_alu_imm): Likewise.
653         (cleanup_alu_reg): Likewise.
654         (install_alu_reg): Likewise.
655         (arm_copy_alu_reg): Likewise.
656         (thumb_copy_alu_reg): Likewise.
657         (cleanup_alu_shifted_reg): Likewise.
658         (install_alu_shifted_reg): Likewise.
659         (arm_copy_alu_shifted_reg): Likewise.
660         (cleanup_load): Likewise.
661         (cleanup_store): Likewise.
662         (arm_copy_extra_ld_st): Likewise.
663         (install_load_store): Likewise.
664         (thumb2_copy_load_literal): Likewise.
665         (thumb2_copy_load_reg_imm): Likewise.
666         (arm_copy_ldr_str_ldrb_strb): Likewise.
667         (cleanup_block_load_all): Likewise.
668         (cleanup_block_store_pc): Likewise.
669         (cleanup_block_load_pc): Likewise.
670         (arm_copy_block_xfer): Likewise.
671         (thumb2_copy_block_xfer): Likewise.
672         (cleanup_svc): Likewise.
673         (install_svc): Likewise.
674         (arm_copy_svc): Likewise.
675         (thumb_copy_svc): Likewise.
676         (arm_copy_undef): Likewise.
677         (thumb_32bit_copy_undef): Likewise.
678         (arm_copy_unpred): Likewise.
679         (arm_decode_misc_memhint_neon): Likewise.
680         (arm_decode_unconditional): Likewise.
681         (arm_decode_miscellaneous): Likewise.
682         (arm_decode_dp_misc): Likewise.
683         (arm_decode_ld_st_word_ubyte): Likewise.
684         (arm_decode_media): Likewise.
685         (arm_decode_b_bl_ldmstm): Likewise.
686         (arm_decode_ext_reg_ld_st): Likewise.
687         (thumb2_decode_dp_shift_reg): Likewise.
688         (thumb2_decode_ext_reg_ld_st): Likewise.
689         (arm_decode_svc_copro): Likewise.
690         (thumb2_decode_svc_copro): Likewise.
691         (install_pc_relative): Likewise.
692         (thumb_copy_pc_relative_16bit): Likewise.
693         (thumb_decode_pc_relative_16bit): Likewise.
694         (thumb_copy_pc_relative_32bit): Likewise.
695         (thumb_copy_16bit_ldr_literal): Likewise.
696         (thumb_copy_cbnz_cbz): Likewise.
697         (thumb2_copy_table_branch): Likewise.
698         (cleanup_pop_pc_16bit_all): Likewise.
699         (thumb_copy_pop_pc_16bit): Likewise.
700         (thumb_process_displaced_16bit_insn): Likewise.
701         (decode_thumb_32bit_ld_mem_hints): Likewise.
702         (thumb_process_displaced_32bit_insn): Likewise.
703         (thumb_process_displaced_insn): Likewise.
704         (arm_process_displaced_insn): Likewise.
705         (arm_displaced_init_closure): Likewise.
706         (arm_displaced_step_fixup): Add cast for closure.
707         * arm-tdep.h: Include infrun.h.
708         (displaced_step_closure): Rename to ...
709         (arm_displaced_step_closure): ... this, extend
710         displaced_step_closure.
711         <u::svc::copy_svc_os>: Change type of parameter DSC.
712         <cleanup>: Likewise.
713         (arm_process_displaced_insn): Likewise.
714         (arm_displaced_init_closure): Likewise.
715         (displaced_read_reg): Likewise.
716         (displaced_write_reg): Likewise.
717         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
718         Adjust.
719         * i386-tdep.h: Include infrun.h.
720         (i386_displaced_step_closure): New typedef.
721         * i386-tdep.c (i386_displaced_step_copy_insn): Use
722         i386_displaced_step_closure.
723         (i386_displaced_step_fixup): Adjust.
724         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
725         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
726         and unique_ptr.
727         (ppc_displaced_step_fixup): Adjust.
728         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
729         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
730         and unique_ptr.
731         (s390_displaced_step_fixup): Adjust.
732
733 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
734
735         * interps.h (interp_resume, interp_suspend, interp_set_temp):
736         Remove declarations.
737
738 2017-10-20  Tom Tromey  <tom@tromey.com>
739
740         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
741         std::vector.
742         (gdb_bfd_record_inclusion): Update.
743         (bfdp): Remove typedef.
744
745 2017-10-20  Tom Tromey  <tom@tromey.com>
746
747         * gdb_bfd.c (gdb_bfd_ref): Use new.
748         (struct gdb_bfd_data): Add constructor, destructor, and member
749         initializers.
750         (gdb_bfd_unref): Use delete.
751
752 2017-10-20  Tom Tromey  <tom@tromey.com>
753
754         * exec.c (exec_file_attach): Use new_bfd_ref.
755         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
756         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
757         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
758         new_bfd_ref.
759         * gdb_bfd.h (new_bfd_ref): New function.
760
761 2017-10-20  Pedro Alves  <palves@redhat.com>
762
763         * main.c (captured_command_loop): Add attribute noinline.
764
765 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
766
767         * interps.c (struct interp_factory): Add constructor.
768         (interp_factory_p): Remove typedef.
769         (DEF_VEC_P(interp_factory_p)): Remove.
770         (interpreter_factories): Change type to std::vector.
771         (interp_factory_register): Adjust.
772         (interp_lookup): Adjust.
773         (interpreter_completer): Adjust.
774
775 2017-10-19  Tom Tromey  <tom@tromey.com>
776
777         * break-catch-syscall.c (catch_syscall_completer): Use
778         std::string, gdb::unique_xmalloc_ptr.
779
780 2017-10-19  Tom Tromey  <tom@tromey.com>
781
782         * infcall.c (call_function_by_hand_dummy): Use std::string.
783
784 2017-10-19  Tom Tromey  <tom@tromey.com>
785
786         * mi/mi-main.c (mi_cmd_execute): Update.
787         * top.h (prepare_execute_command): Return scoped_value_mark.
788         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
789         Add move constructor.
790         * top.c (prepare_execute_command): Return scoped_value_mark.
791         (execute_command): Update.
792
793 2017-10-19  Pedro Alves  <palves@redhat.com>
794
795         * xml-support.c (xml_fetch_content_from_file): Check fread's
796         return.
797
798 2017-10-19  Pedro Alves  <palves@redhat.com>
799
800         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
801         async.
802         (handle_error_fd): New function.
803         (ser_base_async): Add/delete an event loop file handler for
804         error_fd.
805
806 2017-10-19  Pedro Alves  <palves@redhat.com>
807
808         * xml-support.c (xml_fetch_content_from_file): Don't read in
809         chunks.  Instead use fseek to determine the file's size, and read
810         it in one go.
811
812 2017-11-18  Keith Seitz  <keiths@redhat.com>
813
814         * c-exp.y (oper): Canonicalize conversion operators of user-defined
815         types.
816         Add whitespace to front of type name.
817
818 2017-10-18  Keith Seitz  <keiths@redhat.com>
819
820         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
821         DW_AT_accessibility.
822
823 2017-10-18  Yao Qi  <yao.qi@linaro.org>
824
825         * features/tic6x-c62x-linux.c: Remove.
826
827 2017-10-17  Tom Tromey  <tom@tromey.com>
828
829         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
830         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
831         (do_mixed_source_and_assembly): Likewise.
832
833 2017-10-17  Tom Tromey  <tom@tromey.com>
834
835         * regcache.c (regcache::xfer_part): Remove assertion.
836
837 2017-10-17  Pedro Alves  <palves@redhat.com>
838
839         * xml-support.c (xml_fetch_content_from_file): Call
840         unique_ptr::release() instead unique_ptr::get() when passing
841         through xrealloc.
842
843 2017-10-17  Yao Qi  <yao.qi@linaro.org>
844
845         * regcache.c (regcache::xfer_part): Remove parameters read and
846         write, add parameter is_raw.  All callers are updated.
847
848 2017-10-16  Keith Seitz  <keiths@redhat.com>
849
850         * c-typeprint.c (enum access_specifier): Moved here from
851         c_type_print_base.
852         (output_access_specifier): New function.
853         (c_type_print_base): Consider typedefs when assessing
854         whether access labels are needed.
855         Use output_access_specifier as needed.
856         Output access specifier for typedefs, if needed.
857         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
858         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
859         fields.
860         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
861         accessor macros.
862
863 2017-10-16  Tom Tromey  <tom@tromey.com>
864
865         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
866         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
867         * target.c (target_fileio_read_stralloc): Update.
868         * sparc64-tdep.c (adi_is_addr_mapped): Update.
869         * target.h (target_fileio_read_stralloc): Return
870         unique_xmalloc_ptr.
871
872 2017-10-16  Tom Tromey  <tom@tromey.com>
873
874         * xml-syscall.c (xml_init_syscalls_info): Update.
875         * xml-support.c (xinclude_start_include): Update.
876         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
877         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
878         (xml_fetch_content_from_file): Likewise.
879         * osdata.c (get_osdata): Update.
880         * target.h (target_read_stralloc, target_get_osdata): Return
881         unique_xmalloc_ptr.
882         * solib-aix.c (solib_aix_get_library_list): Update.
883         * solib-target.c (solib_target_current_sos): Update.
884         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
885         * xml-tdesc.c (fetch_available_features_from_target): Update.
886         (target_fetch_description_xml): Update.
887         (file_read_description_xml): Update.
888         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
889         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
890         (remote_pid_to_exec_file): Update.
891         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
892         (target_get_osdata): Likewise.
893
894 2017-10-16  Tom Tromey  <tom@tromey.com>
895
896         * remote.c (remote_register_number_and_offset): Use std::vector.
897         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
898         (putpkt_binary): Use gdb::def_vector.
899         (compare_sections_command): Use gdb::byte_vector.
900
901 2017-10-16  Tom Tromey  <tom@tromey.com>
902
903         * ppc-linux-nat.c (hwdebug_insert_point): Use
904         gdb::unique_xmalloc_ptr, XDUP.
905
906 2017-10-16  Tom Tromey  <tom@tromey.com>
907
908         * probe.c (parse_probes): Use std::string.
909         (info_probes_for_ops, enable_probes_command)
910         (disable_probes_command): Remove cleanups.
911
912 2017-10-16  Tom Tromey  <tom@tromey.com>
913
914         * buildsym.c (block_compar): Remove.
915         (end_symtab_get_static_block): Use std::vector.
916
917 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
918
919         * memrange.h (struct mem_range): Define operator< and operator==.
920         (mem_range_s): Remove.
921         (DEF_VEC_O (mem_range_s)): Remove.
922         (normalize_mem_ranges): Change parameter type to std::vector.
923         * memrange.c (compare_mem_ranges): Remove.
924         (normalize_mem_ranges): Change parameter type to std::vector,
925         adjust to vector change.
926         * exec.c (section_table_available_memory): Return vector, remove
927         parameter.
928         (section_table_read_available_memory): Adjust to std::vector
929         change.
930         * remote.c (remote_read_bytes): Adjust to std::vector
931         change.
932         * tracepoint.h (traceframe_available_memory): Change parameter
933         type to std::vector.
934         * tracepoint.c (traceframe_available_memory): Change parameter
935         type to std::vector, adjust.
936         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
937         std::vector change.
938         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
939         unittests/memrange-selftests.c.
940         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
941         * gdb/unittests/memrange-selftests.c: New file.
942
943 2017-10-16  Pedro Alves  <palves@redhat.com>
944
945         * elfread.c (probe_key_free): Rename range-for variable.
946         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
947         (find_probe_by_pc, collect_probes): Rename range-for variable.
948
949 2017-10-16  Yao Qi  <yao.qi@linaro.org>
950
951         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
952         * features/tic6x-c62x.c: Remove.
953         * features/tic6x-c64x-linux.c: Remove.
954         * features/tic6x-c64x.c: Remove.
955         * features/tic6x-c64xp-linux.c: Remove.
956         * features/tic6x-c64xp.c: Remove.
957         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
958         initialize_tdesc_tic6x_*_linux functions.
959         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
960         initialize_tdesc_tic6x_* functions.
961
962 2017-10-16  Yao Qi  <yao.qi@linaro.org>
963
964         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
965         tic6x-c62x.
966         * regformats/tic6x-c62x.dat: Remove.
967         * regformats/tic6x-c64x.dat: Remove.
968         * regformats/tic6x-c64xp.dat: Remove.
969
970 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
971
972         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
973         (the !HAVE_LIBEXPAT version).
974
975 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
976
977         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
978         const.
979
980 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
981
982         * target.h: Include tracepoint.h.
983         (enum trace_find_type): Move to tracepoint.h.
984         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
985         * tracepoint.h: Don't include target.h
986         (enum trace_find_type): Move from target.h.
987         (parse_traceframe_info): Return a unique ptr.
988         * tracepoint.c (current_traceframe_info): Change type to unique
989         ptr.
990         (free_traceframe_info): Remove.
991         (clear_traceframe_info): Don't manually free
992         current_traceframe_info.
993         (free_result): Remove.
994         (parse_traceframe_info): Return a unique ptr.
995         (get_traceframe_info): Adjust to unique ptr.
996         * ctf.c (ctf_traceframe_info): Return a unique ptr.
997         * remote.c (remote_traceframe_info): Return a unique ptr.
998         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
999         ptr.
1000         * target-debug.h (target_debug_print_traceframe_info_up): New
1001         macro.
1002         * target-delegates.c: Regenerate.
1003
1004 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1005
1006         * memrange.h (struct mem_range): Add constructors.
1007         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1008         std::vector<mem_range>.
1009         * tracepoint.c (free_traceframe_info): Don't manually free
1010         vector.
1011         (traceframe_info_start_memory): Adjust to vector change.
1012         (traceframe_available_memory): Likewise.
1013         * tracefile-tfile.c (build_traceframe_info): Likewise.
1014         * ctf.c (ctf_traceframe_info): Likewise.
1015
1016 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1017
1018         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1019         std::vector<int>.
1020         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1021         (traceframe_info_start_tvar): Adjust to vector change.
1022         (parse_traceframe_info): Allocate with new.
1023         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1024         vector change.
1025         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1026         change.
1027         tfile_traceframe_info): Allocate with new.
1028         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1029         change.
1030
1031 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1032
1033         * tracepoint.c (traceframe_info): Rename to...
1034         (current_traceframe_info): ...this.
1035         (clear_traceframe_info): Adjust.
1036         (get_traceframe_info): Adjust.
1037
1038 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1039
1040         * nat/linux-osdata.c: Include algorithm.
1041         (compare_processes): Remove.
1042         (struct pid_pgid_entry): New struct.
1043         (linux_xfer_osdata_processgroups): Use std::vector instead of
1044         XNEWVEC.
1045
1046 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1047
1048         * objfiles.h: Don't include symfile.h.
1049         (struct partial_symbol): Remove forward-declaration.
1050         (struct objfile) <global_psymbols, static_psymbols>: Change type
1051         to std::vector<partial_symbol *>.
1052         * objfiles.c (objfile::objfile): Don't memset those fields.
1053         (objfile::~objfile): Don't free those fields.
1054         * psympriv.h (struct psymbol_allocation_list): Remove
1055         forward-declaration.
1056         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1057         to std::vector.
1058         (start_psymtab_common): Change parameters to std::vector.
1059         * psymtab.c: Include algorithm.
1060         (require_partial_symbols): Call shrink_to_fit.
1061         (find_pc_sect_psymbol): Adjust to vector change.
1062         (match_partial_symbol): Likewise.
1063         (lookup_partial_symbol): Likewise.
1064         (psym_relocate): Likewise.
1065         (dump_psymtab): Likewise.
1066         (recursively_search_psymtabs): Likewise.
1067         (compare_psymbols): Remove.
1068         (sort_pst_symbols): Adjust to vector change.
1069         (start_psymtab_common): Likewise.
1070         (end_psymtab_common): Likewise.
1071         (psymbol_bcache_full): De-constify return value.
1072         (add_psymbol_to_bcache): Likewise.
1073         (extend_psymbol_list): Remove.
1074         (append_psymbol_to_list): Adjust to vector change.
1075         (add_psymbol_to_list): Likewise.
1076         (init_psymbol_list): Likewise.
1077         (maintenance_info_psymtabs): Likewise.
1078         (maintenance_check_psymtabs): Likewise.
1079         * symfile.h (struct psymbol_allocation_list): Remove.
1080         * symfile.c (reread_symbols): Adjust to vector change.
1081         * dbxread.c (start_psymtab): Change type of parameters.
1082         (dbx_symfile_read): Adjust to vector change.
1083         (read_dbx_symtab): Likewise.
1084         (start_psymtab): Change type of parameters.
1085         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1086         (create_partial_symtab): Likewise.
1087         (add_partial_symbol): Likewise.
1088         (write_one_signatured_type): Likewise.
1089         (recursively_write_psymbols): Likewise.
1090         * mdebugread.c (parse_partial_symbols): Likewise.
1091         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1092         (scan_xcoff_symtab): Adjust to vector change.
1093         (xcoff_initial_scan): Likewise.
1094
1095 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1096
1097         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1098
1099 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1100
1101         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1102         Remove s390x-*-expedite, add s390x-expedite.
1103
1104 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1105
1106         * features/s390-gs-linux64.c: Regenerated.
1107         * features/s390x-gs-linux64.c: Regenerated.
1108
1109 2017-10-13  Tom Tromey  <tom@tromey.com>
1110
1111         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1112         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1113         delete.
1114         * symfile.c (symbol_file_add_with_addrs): Use new.
1115         (symbol_file_add_separate): Update comment.
1116         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1117         * jit.c (jit_object_close_impl): Use new.
1118         (jit_unregister_code): Use delete.
1119         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1120         (~objfile): Rename from free_objfile.
1121         (free_objfile_separate_debug, do_free_objfile_cleanup)
1122         (free_all_objfiles, objfile_purge_solibs): Use delete.
1123         * objfiles.h (struct objfile): Add constructor and destructor.
1124         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1125         (allocate_objfile, free_objfile): Don't declare.
1126         (struct objstats): Add initializers.
1127
1128 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1129
1130         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1131         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1132         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1133         * gdbarch.h: Regenerate.
1134         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1135         Adjust comment.
1136         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1137         (i386_displaced_step_fixup): Adjust comment.
1138         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1139
1140 2017-10-12  Tom Tromey  <tom@tromey.com>
1141
1142         * prologue-value.h (pv_area::store_would_trash): Return bool.
1143         (pv_area::find_reg): Likewise.
1144         * prologue-value.c (pv_area::store_would_trash): Return bool.
1145         (pv_area::find_reg): Likewise.
1146
1147 2017-10-12  Tom Tromey  <tom@tromey.com>
1148
1149         * s390-linux-tdep.c (s390_store, s390_load)
1150         (s390_check_for_saved, s390_analyze_prologue): Update.
1151         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1152         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1153         * prologue-value.h (class pv_area): Move from prologue-value.c.
1154         Change names of members.  Add constructor, destructor, member
1155         functions.
1156         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1157         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1158         (pv_area_fetch, pv_area_scan): Don't declare.
1159         * prologue-value.c (struct pv_area::area_entry): Now member of
1160         pv_area.
1161         (struct pv_area): Move to prologue-value.h.
1162         (pv_area::pv_area): Rename from make_pv_area.
1163         (pv_area::~pv_area): Rename from free_pv_area.
1164         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1165         (clear_entries, find_entry, overlaps, store_would_trash, store)
1166         (fetch, find_reg, scan): Now member of pv_area.
1167         Remove "area" argument.  Update.
1168         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1169         Update.
1170         * mn10300-tdep.c (push_reg, check_for_saved)
1171         (mn10300_analyze_prologue): Update.
1172         * mep-tdep.c (is_arg_spill, check_for_saved)
1173         (mep_analyze_prologue): Update.
1174         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1175         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1176         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1177         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1178         Update.
1179         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1180         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1181
1182 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1183
1184         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1185         * linux-nat.c (linux_nat_delete_thread): New variable.
1186         (lwp_free): Invoke linux_nat_delete_thread if set.
1187         (linux_nat_set_delete_thread): New function.
1188         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1189         thread delete callback.
1190         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1191         (_initialize_arm_linux_nat): Assign thread delete callback.
1192         * s390-linux-nat.c (s390_delete_thread): New function.
1193         (_initialize_s390_nat): Assign thread delete callback.
1194         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1195         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1196         function.
1197         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1198         declaration.
1199         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1200         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1201
1202 2017-10-09  Tom Tromey  <tom@tromey.com>
1203
1204         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1205         std::string.
1206         * tui/tui-layout.c (enum tui_status): Use std::string.
1207
1208 2017-10-11  Tom Tromey  <tom@tromey.com>
1209
1210         * gdbthread.h (thread_command): Constify.
1211         * inferior.h (detach_command): Constify.
1212         * top.h (set_history, show_history): Constify.
1213         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1214         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1215         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1216         * printcmd.c (set_command): Constify.
1217         (non_const_set_command): New function.
1218         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1219         * breakpoint.c (enable_command, disable_command, delete_command)
1220         (catch_command, tcatch_command, set_breakpoint_cmd)
1221         (show_breakpoint_cmd): Constify.
1222         * macrocmd.c (macro_command): Constify.
1223         * infcmd.c (unset_command, kill_command, detach_command)
1224         (info_proc_cmd): Constify.
1225         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1226         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1227         (info_auto_load_cmd): Constify.
1228         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1229         (unset_tdesc_cmd): Constify.
1230         * ada-lang.c (set_ada_command, show_ada_command)
1231         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1232         * guile/guile.c (set_guile_command, show_guile_command)
1233         (info_guile_command): Constify.
1234         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1235         Constify.
1236         * skip.c (skip_command): Constify.
1237         * compile/compile.c (_initialize_compile): Constify.
1238         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1239         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1240         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1241         (maint_btrace_pt_show_cmd): Constify.
1242         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1243         Constify.
1244         * python/python.c (user_show_python, user_set_python): Constify.
1245         * mips-tdep.c (set_mips_command, show_mips_command)
1246         (set_mipsfpu_command): Constify.
1247         * record-btrace.c (cmd_record_btrace_start)
1248         (cmd_set_record_btrace, cmd_show_record_btrace)
1249         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1250         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1251         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1252         Constify.
1253         * symfile.c (overlay_command): Constify.
1254         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1255         * cli/cli-logging.c (set_logging_command, show_logging_command):
1256         Constify.
1257         * cli/cli-dump.c (dump_command, append_command)
1258         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1259         (tekhex_dump_command, binary_dump_command)
1260         (binary_append_command): Constify.
1261         * cli/cli-decode.c (struct cmd_list_element): Change type of
1262         "fun".
1263         * cli/cli-cmds.c (info_command, show_command, set_debug)
1264         (show_debug): Constify.
1265         (show_command): Add non-const overload.
1266         * top.c (set_history, show_history): Constify.
1267         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1268         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1269         * target.c (target_command): Constify.
1270         * sparc64-tdep.c (info_adi_command): Constify.
1271         * record-full.c (cmd_record_full_start): Constify.
1272         (set_record_full_command): Constify.  Fix typo.
1273         (show_record_full_command): Constify.
1274         * thread.c (thread_command, thread_apply_command): Constify.
1275         * memattr.c (dummy_cmd): Constify.
1276         * value.c (function_command): Constify.
1277         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1278         * probe.c (info_probes_command): Constify.
1279         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1280         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1281         (show_thread_cmd, set_thread_default_cmd)
1282         (show_thread_default_cmd): Constify.
1283         (check_empty): Constify.
1284         * tracepoint.c (tfind_command): Constify.
1285         * cp-support.c (maint_cplus_command): Constify.
1286         * windows-tdep.c (info_w32_command): Constify.
1287         * record.c (cmd_record_start, set_record_command)
1288         (show_record_command, info_record_command, cmd_record_goto):
1289         Constify.
1290         * ravenscar-thread.c (set_ravenscar_command)
1291         (show_ravenscar_command): Constify.
1292         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1293         Constify.
1294         (add_internal_problem_command): Remove casts.
1295         * arc-tdep.c (maintenance_print_arc_command): Constify.
1296         * valprint.c (set_print, show_print, set_print_raw)
1297         (show_print_raw): Constify.
1298         * maint.c (maintenance_command, maintenance_info_command)
1299         (maintenance_print_command, maintenance_set_cmd)
1300         (maintenance_show_cmd, set_per_command_cmd)
1301         (show_per_command_cmd, maintenance_check_command): Constify.
1302         * language.c (set_check, show_check): Constify.
1303         * typeprint.c (show_print_type, set_print_type): Constify.
1304         * go32-nat.c (go32_info_dos_command): Constify.
1305
1306 2017-10-11  Tom Tromey  <tom@tromey.com>
1307
1308         * breakpoint.c (prepare_re_set_context): Remove.
1309         (breakpoint_re_set_one): Update.  Don't use cleanups.
1310         (breakpoint_re_set): Use scoped_restore, std::string, and
1311         scoped_restore_current_language.
1312
1313 2017-10-11  Tom Tromey  <tom@tromey.com>
1314
1315         * breakpoint.c (commands_command_1): Use std::string.
1316         (cleanup_executing_breakpoints): Remove.
1317         (bpstat_do_actions_1): Use scoped_restore.
1318         (bpstat_check_watchpoint): Use std::string.
1319         (decode_static_tracepoint_spec): Likewise.
1320         (break_range_command): Likewise.
1321         (watch_command_1): Likewise.
1322         (compare_breakpoints): Change argument types.
1323         (clear_command): Use std::vector.
1324         (cleanup_executing_breakpoints): Remove.
1325         (update_global_location_list): Use unique_xmalloc_ptr.
1326         (strace_command): Remove unused declaration.
1327
1328 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1329
1330         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1331         * NEWS: Mention new FreeBSD/arm native configuration.
1332         * configure.host: Add arm*-*-freebsd*.
1333         * configure.nat: Likewise.
1334         * arm-fbsd-nat.c: New file.
1335
1336 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1337
1338         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1339         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1340         * NEWS: Mention new FreeBSD/arm target.
1341         * configure.tgt: Add arm*-*-freebsd*.
1342         * arm-fbsd-tdep.c: New file.
1343         * arm-fbsd-tdep.h: New file.
1344
1345 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1346
1347         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1348         `gdbarch_elfcore_write_linux_prpsinfo'.
1349         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1350         method.
1351         (elf_internal_linux_prpsinfo): Remove declaration.
1352         * gdbarch.h: Regenerate.
1353         * gdbarch.c: Regenerate.
1354
1355 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1356
1357         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1358         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1359
1360 2017-10-11  Pedro Alves  <palves@redhat.com>
1361
1362         * breakpoint.c (reattach_breakpoints): Delete.
1363         * breakpoint.h (reattach_breakpoints): Delete.
1364
1365 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1366
1367         * symfile.c (registered_sym_fns): Make struct, not typedef.
1368         (DEF_VEC_O (registered_sym_fns)): Remove.
1369         (symtab_fns): Change type to std::vector.
1370         (add_symtab_fns): Adjust.
1371         (find_sym_fns): Adjust.
1372
1373 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1374
1375         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1376         * arc-tdep.h (arc_arch_is_em): New function.
1377         (arc_arch_is_hs): Likewise.
1378
1379 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1380
1381         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1382         parentheses in the declaration.
1383         (macro_lookup_inclusion): Likewise.
1384         (macro_lookup_definition): Likewise.
1385         * p-lang.h (pascal_builtin_types): Likewise.
1386         * tui/tui-data.c (tui_win_list): Likewise.
1387         * tui/tui-data.h (tui_win_list): Likewise.
1388         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1389
1390 2017-10-11  Mark Rages  <markrages@gmail.com>
1391
1392         * target-memory.c (block_boundaries): Fix for block address not
1393         aligned on block size.
1394
1395 2017-10-10  Pedro Alves <palves@redhat.com>
1396             Tom Tromey  <tom@tromey.com>
1397
1398         * breakpoint.c (struct captured_breakpoint_query_args)
1399         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1400         (print_breakpoint): New.
1401         * breakpoint.h (print_breakpoint): Declare.
1402         * common/common-exceptions.h (enum return_reason): Remove
1403         references to catch_exceptions.
1404         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1405         Delete.
1406         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1407         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1408         * gdb.h: Delete.
1409         * gdbthread.h (thread_select): Declare.
1410         * mi/mi-cmd-break.c: Don't include gdb.h.
1411         (breakpoint_notify): Use print_breakpoint.
1412         * mi/mi-cmd-catch.c: Don't include gdb.h.
1413         * mi/mi-interp.c: Don't include gdb.h.
1414         (mi_print_breakpoint_for_event): New.
1415         (mi_breakpoint_created, mi_breakpoint_modified): Use
1416         mi_print_breakpoint_for_event.
1417         * mi/mi-main.c: Don't include gdb.h.
1418         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1419         thread_select instead of gdb_thread_select.
1420         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1421         of using gdb_list_thread_ids.
1422         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1423         FILEIO_ENOSYS here.
1424         (remote_fileio_request): Use TRY/CATCH instead of
1425         catch_exceptions.
1426         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1427         (symbol_file_add_from_memory_wrapper): Delete.
1428         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1429         * thread.c: Don't include gdb.h.
1430         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1431         (thread_alive): Use thread_select.
1432         (do_captured_thread_select): Delete, parts salvaged as ...
1433         (thread_select): ... this new function.
1434         (gdb_thread_select): Delete.
1435
1436 2017-10-10  Pedro Alves  <palves@redhat.com>
1437             Tom Tromey  <tom@tromey.com>
1438
1439         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1440         and reverse logic.
1441         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1442         No longer macros.  Instead ...
1443         (enum wp_check_result): They're now values of this new
1444         enumeration.
1445         (watchpoint_check): Change return type to wp_check_result and
1446         parameter type to bpstat.
1447         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1448         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1449         catch_errors.  Reverse logic of watchpoint_check call.
1450         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1451         pointer as parameter.
1452         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1453         * common/common-exceptions.c (throw_exception_sjlj): Update
1454         comments to avoid mentioning catch_errors.
1455         * exceptions.c (catch_errors): Delete.
1456         * exceptions.h: Update comments to avoid mentioning catch_errors.
1457         (catch_errors_ftype, catch_errors): Delete.
1458         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1459         (hook_stop_stub): Delete.
1460         (restore_selected_frame): Change return type to void, and
1461         parameter type to const frame_id &.
1462         (restore_infcall_control_state): Use TRY/CATCH instead of
1463         catch_errors.
1464         * main.c (captured_command_loop): Return void and remove
1465         parameter.  Remove references to catch_errors.
1466         (captured_main): Use TRY/CATCH instead of catch_errors.
1467         * objc-lang.c (objc_submethod_helper_data)
1468         (find_objc_msgcall_submethod_helper): Delete.
1469         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1470         catch_errors.
1471         * record-full.c (record_full_message): Return void.
1472         (record_full_message_args, record_full_message_wrapper): Delete.
1473         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1474         instead of catch_errors.
1475         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1476         parameter type to int.
1477         * solib-darwin.c (open_symbol_file_object): Ditto.
1478         * solib-dsbt.c (open_symbol_file_object): Ditto.
1479         * solib-frv.c (open_symbol_file_object): Ditto.
1480         * solib-svr4.c (open_symbol_file_object): Ditto.
1481         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1482         * solib.c (update_solib_list): Use TRY/CATCH instead of
1483         catch_errors.
1484         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1485         Change type.
1486         * symmisc.c (struct print_symbol_args): Remove.
1487         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1488         (print_symbol): Change type.
1489         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1490         and remove parameters.
1491         (catch_errors): New.
1492         (get_windows_debug_event): Adjust.
1493
1494 2017-10-09  Tom Tromey  <tom@tromey.com>
1495
1496         * mi/mi-main.c (free_splay_tree): Remove.
1497         (list_available_thread_groups): Use splay_tree_up.
1498         * common/gdb_splay_tree.h: New file.
1499
1500 2017-10-09  Tom Tromey  <tom@tromey.com>
1501
1502         * mi/mi-main.c (do_nothing): Remove.
1503         (list_available_thread_groups): Update.
1504
1505 2017-10-09  Pedro Alves  <palves@redhat.com>
1506
1507         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1508         reading registers when switching context.
1509
1510 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1511
1512         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1513         (fbsd_convert_siginfo): Likewise.
1514         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1515
1516 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1517
1518         * configure.ac (try_guile_versions): Remove guile-2.2.
1519         * configure: Regenerate.
1520
1521 2017-10-09  Tom Tromey  <tom@tromey.com>
1522
1523         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1524         (COMPILE.pre): Use $(CXX).
1525
1526 2017-10-09  Pedro Alves  <palves@redhat.com>
1527
1528         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1529         Use bool.
1530         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1531         * cp-support.h (cp_remove_params): Now returns a
1532         gdb::unique_xmalloc_ptr.
1533         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1534         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1535         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1536         returning a gdb::unique_xmalloc_ptr.
1537         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1538         * stack.c (find_frame_funname): Adjust to cp_remove_params
1539         returning a gdb::unique_xmalloc_ptr.
1540
1541 2017-10-08  Tom Tromey  <tom@tromey.com>
1542
1543         * dwarf2read.c (dwarf2_get_dwz_file): Use
1544         gdb::unique_xmalloc_ptr.
1545         (find_slot_in_mapped_hash): Likewise.
1546         (dwarf2_physname): Likewise.
1547         (create_dwo_unit_in_dwp_v1): Use std::string.
1548         (create_dwo_unit_in_dwp_v2): Likewise.
1549         (lookup_dwo_cutu): Likewise.
1550         (inherit_abstract_dies): Use std::vector.
1551         (read_array_type): Likewise.
1552         (dwarf_decode_macros): Remove unused declaration.
1553         (unsigned_int_compar): Remove.
1554         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1555         (psymtabs_addrmap_cleanup): Remove.
1556
1557 2017-10-08  Tom Tromey  <tom@tromey.com>
1558
1559         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1560         * frame.h (frame_cleanup_after_sniffer): Declare.
1561         (frame_prepare_for_sniffer): Return void.
1562         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1563         type of argument.
1564         (frame_prepare_for_sniffer): Return void.
1565
1566 2017-10-08  Tom Tromey  <tom@tromey.com>
1567
1568         * utils.h (make_cleanup_value_free): Remove.
1569         * utils.c (do_value_free, struct cleanup): Remove.
1570         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1571         Use gdb_value_up.
1572         * value.h (struct value_deleter): New.
1573         (gdb_value_up): New typedef.
1574
1575 2017-10-08  Tom Tromey  <tom@tromey.com>
1576
1577         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1578         (make_cleanup_free_search_symbols): Remove.
1579         (search_symbols): Return std::vector.
1580         (symbol_search::compare_search_syms): Now member of
1581         symbol_search.  Change arguments.
1582         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1583         (symtab_symbol_info, rbreak_command): Update.
1584         * symtab.h (struct symbol_search) <next>: Remove.
1585         Add constructors.
1586         (symbol_search::operator<): New function.
1587         (symbol_search::operator==): New function.
1588         (search_symbols): Remove std::vector.
1589         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1590         (symbol_search::compare_search_syms): Declare.
1591
1592 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1593
1594         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1595         arch/aarch64-insn.o.
1596         Remove one rule.
1597         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1598
1599 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1600
1601         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1602         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1603         arch/arm-linux.o respectively.
1604         * configure.tgt: Likewise.
1605
1606 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1607
1608         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1609         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1610
1611 2017-10-06  Pedro Alves  <palves@redhat.com>
1612
1613         * windows-nat.c: Include <algorithm>.
1614
1615 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1616
1617         * configure.tgt (i386_tobjs): New variable.
1618         (amd64_tobjs): New variable.
1619         Set $cpu_obs and $os_obs.
1620
1621 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1622
1623         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1624         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1625         (clean): Remove object files and dependency files.
1626         (distclean): Remove the directory.
1627         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1628         * configure: Re-generated.
1629         * configure.tgt: Replace amd64.o with arch/amd64.o.
1630
1631 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1632
1633         PR build/22188
1634         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1635         and SETEND.
1636
1637 2017-10-05  Pedro Alves  <palves@redhat.com>
1638
1639         * linux-nat.c (linux_child_follow_fork): When following the parent
1640         and detaching the child, consult the parent thread's architecture
1641         instead of the child's.
1642
1643 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1644
1645         * ax.h: Do not include "doublest.h".
1646         (union agent_val): Remove.
1647
1648 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1649
1650         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1651         (decimal_to_string): Return std::string object.
1652         (decimal_from_string): Accept std::string object.  Return bool.
1653         (decimal_from_integral, decimal_from_doublest): Remove.
1654         (decimal_from_longest): Add prototype.
1655         (decimal_from_ulongest): Likewise.
1656         (decimal_to_longest): Likewise.
1657         (decimal_from_doublest): Likewise.
1658         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1659         (MAX_DECIMAL_STRING): Move here.
1660         (decimal_to_string): Return std::string object.
1661         (decimal_from_string): Accept std::string object.  Return bool.
1662         (decimal_from_integral): Remove, replace by ...
1663         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1664         (decimal_to_longest): New function.
1665         (decimal_from_floating): Remove, replace by ...
1666         (decimal_from_doublest): ... this new function.
1667         (decimal_to_doublest): Update to new decimal_to_string interface.
1668
1669         * value.c (unpack_long): Use decimal_to_longest.
1670         * valops.c (value_cast): Use decimal_from_doublest instead of
1671         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1672         decimal_from_integral.
1673         * valarith.c (value_args_as_decimal): Likewise.
1674         * valprint.c (print_decimal_floating): Update to new
1675         decimal_to_string interface.
1676         * printcmd.c (printf_decfloat): Likewise.
1677         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1678
1679 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1680
1681         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1682         * gdbtypes.c: Include "floatformat.h".
1683         * value.c: Likewise.
1684         * m68k-tdep.c: Likewise.
1685
1686         * findvar.c: Do not include "floatformat.h".
1687         * amd64-darwin-tdep.c: Likewise.
1688         * arm-linux-tdep.c: Likewise.
1689         * i386-darwin-tdep.c: Likewise.
1690         * i387-tdep.c: Likewise.
1691         * m68k-linux-tdep.c: Likewise.
1692         * mep-tdep.c: Likewise.
1693         * mips-tdep.c: Likewise.
1694         * nios2-tdep.c: Likewise.
1695         * s390-linux-tdep.c: Likewise.
1696         * sparc-obsd-tdep.c: Likewise.
1697         * sparc-tdep.c: Likewise.
1698         * sparc64-tdep.c: Likewise.
1699         * spu-tdep.c: Likewise.
1700         * tic6x-tdep.c: Likewise.
1701         * tilegx-tdep.c: Likewise.
1702         * vax-tdep.c: Likewise.
1703         * xstormy16-tdep.c: Likewise.
1704         * xtensa-tdep.c: Likewise.
1705
1706         * top.c: Do not include "doublest.h".
1707         * aarch64-tdep.c: Likewise.
1708         * alpha-tdep.c: Likewise.
1709         * arm-linux-tdep.c: Likewise.
1710         * m68k-linux-tdep.c: Likewise.
1711         * tilegx-tdep.c: Likewise.
1712         * xstormy16-tdep.c: Likewise.
1713
1714 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1715
1716         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1717         (mipsn32_fbsd_sigframe): Define.
1718         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1719         for FreeBSD/mipsn32.
1720
1721 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1722
1723         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1724         AT_HWCAP.
1725
1726 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1727
1728         * MAINTAINERS (Misc): Update my email address.
1729
1730 2017-10-04  Pedro Alves  <palves@redhat.com>
1731
1732         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1733         it instead of target_gdbarch.
1734         (get_remote_state, get_remote_packet_size): Adjust
1735         get_remote_arch_state calls, passing down target_gdbarch
1736         explicitly.
1737         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1738         'gdbarch' and use it instead of target_gdbarch.
1739         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1740         passing down target_gdbarch explicitly.
1741         (struct stop_reply) <arch>: New field.
1742         (remote_parse_stop_reply): Use the stopped thread's architecture,
1743         not the current inferior's.  Save the architecture in the
1744         stop_reply.
1745         (process_stop_reply): Use the stop reply's architecture.
1746         (process_g_packet, remote_fetch_registers)
1747         (remote_prepare_to_store, store_registers_using_G)
1748         (remote_store_registers): Adjust get_remote_arch_state calls,
1749         using the regcache's architecture.
1750         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1751         passing down target_gdbarch explicitly.
1752         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1753         beneath instead of calling target_gdbarch.
1754         * target.c (default_thread_architecture): Use the specified
1755         inferior's architecture, instead of the current inferior's
1756         architecture (via target_gdbarch).
1757
1758 2017-10-04  Pedro Alves  <palves@redhat.com>
1759
1760         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1761         case.
1762         (regcache_print): Handle !target_has_registers here instead.
1763
1764 2017-10-04  Pedro Alves  <palves@redhat.com>
1765
1766         * frame.c (create_test_frame): Delete.
1767         * frame.h (create_test_frame): Delete.
1768         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1769         (class regcache_test): Delete.
1770         (test_target_has_registers, test_target_has_stack)
1771         (test_target_has_memory, test_target_prepare_to_store)
1772         (test_target_store_registers): New functions.
1773         (test_target_ops): New class.
1774         (register_to_value_test): Error out if there's already a
1775         process_stratum (or higher) target pushed.  Create a fuller mock
1776         environment, with mock target_ops, inferior, address space, thread
1777         and inferior_ptid.
1778         * progspace.c (struct address_space): Move to ...
1779         * progspace.h (struct address_space): ... here.
1780         * regcache.h (regcache::~regcache, regcache::raw_write)
1781         [GDB_SELF_TEST]: No longer virtual.
1782
1783 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1784
1785         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1786
1787 2017-10-04  Pedro Alves  <palves@redhat.com>
1788
1789         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1790         out of 'between TRY and CATCH'.
1791
1792 2017-10-04  Pedro Alves  <palves@redhat.com>
1793
1794         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1795         * common/common-exceptions.h (TRY): Open an outermost scope.
1796         Expand intro comment.
1797         (CATCH): Reindent.
1798         (END_CATCH): Close the outermost scope.
1799         * completer.c (complete_line_internal): Add missing END_CATCH.
1800
1801 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1802
1803         * NEWS (Changes since GDB 8.0): Add entry about new
1804         'set-cwd-on-gdbserver' feature.
1805         (New remote packets): Add entry for QSetWorkingDir.
1806         * common/common-inferior.h (set_inferior_cwd): New prototype.
1807         * infcmd.c (set_inferior_cwd): Remove "static".
1808         (show_cwd_command): Expand text to include remote debugging.
1809         * remote.c: Add PACKET_QSetWorkingDir.
1810         (remote_protocol_features) <QSetWorkingDir>: New entry for
1811         PACKET_QSetWorkingDir.
1812         (extended_remote_set_inferior_cwd): New function.
1813         (extended_remote_create_inferior): Call
1814         "extended_remote_set_inferior_cwd".
1815         (_initialize_remote): Call "add_packet_config_cmd" for
1816         QSetWorkingDir.
1817
1818 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1819
1820         * NEWS (New commands): Mention "set/show cwd".
1821         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1822         "cd" command's help text.
1823         * common/common-inferior.h (get_inferior_cwd): New prototype.
1824         * infcmd.c (inferior_cwd_scratch): New global variable.
1825         (set_inferior_cwd): New function.
1826         (get_inferior_cwd): Likewise.
1827         (set_cwd_command): Likewise.
1828         (show_cwd_command): Likewise.
1829         (_initialize_infcmd): Add "set/show cwd" commands.
1830         * inferior.h (class inferior) <cwd>: New field.
1831         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1832         (fork_inferior): Change inferior's cwd before its execution.
1833         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1834         to CreateProcess.
1835
1836 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1837
1838         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1839         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1840         (COMMON_OBS): Add gdb_tilde_expand.o.
1841         * common/gdb_tilde_expand.c: New file.
1842         * common/gdb_tilde_expand.h: Likewise.
1843
1844 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1845
1846         * gdbarch.sh (objfile): Remove duplicate declaration.
1847         * gdbarch.h: Regenerate.
1848
1849 2017-10-03  Tom Tromey  <tom@tromey.com>
1850
1851         * utils.c (internal_vproblem): Use string_vprintf.
1852
1853 2017-10-03  Tom Tromey  <tom@tromey.com>
1854
1855         * printcmd.c (info_symbol_command): Use std::string.
1856
1857 2017-10-03  Tom Tromey  <tom@tromey.com>
1858
1859         * top.c (gdb_safe_append_history): Use std::string.
1860
1861 2017-10-03  Tom Tromey  <tom@tromey.com>
1862
1863         * event-top.c (stdin_event_handler): Update.
1864         * main.c (captured_main_1): Update.
1865         * top.h (make_delete_ui_cleanup): Remove.
1866         (struct ui): Add constructor and destructor.
1867         (new_ui, delete_ui): Remove.
1868         * top.c (make_delete_ui_cleanup): Remove.
1869         (new_ui_command): Use std::unique_ptr.
1870         (delete_ui_cleanup): Remove.
1871         (ui::ui): Rename from new_ui.  Update.
1872         (free_ui): Remove.
1873         (ui::~ui): Rename from delete_ui.  Update.
1874
1875 2017-10-03  Tom Tromey  <tom@tromey.com>
1876
1877         * symfile.c (load_progress): Use gdb::byte_vector.
1878
1879 2017-10-03  Tom Tromey  <tom@tromey.com>
1880
1881         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1882         declaration.
1883         * printcmd.c (x_command): Remove unused declaration.
1884         * symfile.c (symbol_file_command): Remove unused declaration.
1885
1886 2017-10-03  Tom Tromey  <tom@tromey.com>
1887
1888         * utils.c (internal_vproblem): Use std::string.
1889         (defaulted_query): Likewise.
1890
1891 2017-10-03  Tom Tromey  <tom@tromey.com>
1892
1893         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1894         * top.c (execute_command_to_string): Update.
1895         * utils.c (make_cleanup_restore_page_info): Remove.
1896         (do_restore_page_info_cleanup): Remove.
1897         (set_batch_flag_and_restore_page_info):
1898         New.
1899         (make_cleanup_restore_page_info): Remove.
1900         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1901         (~set_batch_flag_and_restore_page_info): New
1902         (make_cleanup_restore_uinteger): Remove.
1903         (make_cleanup_restore_integer): Remove.
1904         (struct restore_integer_closure): Remove.
1905         (restore_integer): Remove.
1906         * utils.h (struct set_batch_flag_and_restore_page_info): New
1907         class.
1908         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1909         (make_cleanup_restore_page_info): Remove.
1910         (make_cleanup_restore_uinteger) Remove.
1911         (make_cleanup_restore_integer) Remove.
1912
1913 2017-10-03  Tom Tromey  <tom@tromey.com>
1914
1915         * record-full.h (record_full_gdb_operation_disable_set): Return
1916         scoped_restore_tmpl<int>.
1917         * infrun.c (adjust_pc_after_break): Update.
1918         (handle_signal_stop): Update.
1919         * record-full.c (record_full_gdb_operation_disable_set): Return
1920         scoped_restore_tmpl<int>.
1921         (record_full_wait_1, record_full_insert_breakpoint)
1922         (record_full_remove_breakpoint, record_full_save)
1923         (record_full_goto_insn): Update.
1924
1925 2017-10-02  Tom Tromey  <tom@tromey.com>
1926
1927         PR rust/22236:
1928         * rust-lang.c (rust_val_print_str): New function.
1929         (val_print_struct): Call it.
1930         (rust_subscript): Preserve name of slice type.
1931
1932 2017-10-02  Tom Tromey  <tom@tromey.com>
1933
1934         * rust-lang.c (rust_subscript): Handle slices in
1935         EVAL_AVOID_SIDE_EFFECTS case.
1936
1937 2017-10-02  Tom Tromey  <tom@tromey.com>
1938
1939         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1940
1941 2017-10-02  Tom Tromey  <tom@tromey.com>
1942
1943         * rust-lang.h (rust_slice_type): Add "extern".
1944
1945 2017-10-02  Tom Tromey  <tom@tromey.com>
1946             Pedro Alves  <palves@redhat.com>
1947
1948         * ada-lang.h (ada_exc_info::operator<): Make const.
1949         (ada_exc_info::operator==): Make const.
1950         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1951         Make const.
1952
1953 2017-09-29  Tom Tromey  <tom@tromey.com>
1954
1955         * target.c (read_whatever_is_readable): Change type of "result".
1956         Update.
1957         (free_memory_read_result_vector): Remove.
1958         (read_memory_robust): Change return type.  Update.
1959         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1960         bin2hex, std::string.
1961         * target.h (memory_read_result_s): Remove typedef.
1962         (free_memory_read_result_vector): Remove.
1963         (read_memory_robust): Return std::vector.
1964
1965 2017-09-29  Tom Tromey  <tom@tromey.com>
1966
1967         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1968
1969 2017-09-29  Tom Tromey  <tom@tromey.com>
1970
1971         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1972         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1973         operator< and operator==.
1974         (ada_exceptions_list): Return a std::vector.
1975         * ada-lang.c (ada_exc_info::operator<): Rename from
1976         compare_ada_exception_info.
1977         (ada_exc_info::operator==): New.
1978         (sort_remove_dups_ada_exceptions_list): Change type of
1979         "exceptions".
1980         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1981         (ada_add_global_exceptions): Likewise.
1982         (ada_exceptions_list_1): Return a std::vector.
1983         (ada_exceptions_list): Likewise.
1984
1985 2017-09-29  Tom Tromey  <tom@tromey.com>
1986
1987         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1988         'std::set *'.
1989         (print_one_inferior): Update.
1990         (free_vector_of_ints): Remove.
1991         (list_available_thread_groups): Change "ids" to std::set.
1992         (mi_cmd_list_thread_groups): Update.
1993         (struct collect_cores_data) <core>: Now a std::set.
1994         (collect_cores): Update.
1995         (unique): Remove.
1996         (print_one_inferior): Update.
1997
1998 2017-09-29  Tom Tromey  <tom@tromey.com>
1999
2000         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2001         (mi_execute_async_cli_command): Likewise.
2002         (mi_cmd_trace_frame_collected): Use field_fmt.
2003
2004 2017-09-29  Tom Tromey  <tom@tromey.com>
2005
2006         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2007         gdb::byte_vector.
2008
2009 2017-09-29  Tom Tromey  <tom@tromey.com>
2010
2011         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2012
2013 2017-09-29  Tom Tromey  <tom@tromey.com>
2014
2015         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2016
2017 2017-09-29  Tom Tromey  <tom@tromey.com>
2018
2019         * varobj.h (varobj_gen_name): Return std::string.
2020         * varobj.c (varobj_gen_name): Return std::string.
2021         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2022         (mi_cmd_var_delete): Don't copy "name".
2023
2024 2017-09-29  Tom Tromey  <tom@tromey.com>
2025
2026         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2027         (mi_cmd_break_insert_1): Update.
2028
2029 2017-09-29  Tom Tromey  <tom@tromey.com>
2030
2031         * target.h (make_scoped_defer_target_commit_resume): Update.
2032         * target.c (make_scoped_defer_target_commit_resume): Rename from
2033         make_cleanup_defer_target_commit_resume.  Return a
2034         scoped_restore.
2035         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2036
2037 2017-09-29  Tom Tromey  <tom@tromey.com>
2038
2039         * main.c (captured_main_1): Remove unused declaration.
2040         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2041
2042 2017-09-29  Tom Tromey  <tom@tromey.com>
2043
2044         * symtab.c (search_symbols): Remove unused outer cleanup.
2045         (make_source_files_completion_list): Remove unused declaration.
2046
2047 2017-09-29  Tom Tromey  <tom@tromey.com>
2048
2049         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2050
2051 2017-09-29  Tom Tromey  <tom@tromey.com>
2052
2053         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2054         gdb::byte_vector.
2055
2056 2017-09-29  Tom Tromey  <tom@tromey.com>
2057
2058         * complaints.c (vcomplaint): Use std::string.
2059
2060 2017-09-29  Tom Tromey  <tom@tromey.com>
2061
2062         * tracepoint.c (trace_variable_command): Use std::string.
2063         (encode_actions_1): Remove unused declarations.
2064         (create_tsv_from_upload): Use std::string.
2065
2066 2017-09-29  Tom Tromey  <tom@tromey.com>
2067
2068         * cp-support.c (gdb_demangle): Use std::string.
2069
2070 2017-09-29  Tom Tromey  <tom@tromey.com>
2071
2072         * stack.c (parse_frame_specification): Use std::string
2073         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2074
2075 2017-09-29  Tom Tromey  <tom@tromey.com>
2076
2077         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2078
2079 2017-09-29  Tom Tromey  <tom@tromey.com>
2080
2081         * utils.c (vfprintf_maybe_filtered): Use std::string.
2082         (vfprintf_unfiltered): Likewise.
2083
2084 2017-09-29  Tom Tromey  <tom@tromey.com>
2085
2086         * event-top.c (top_level_prompt): Return std::string.
2087         (display_gdb_prompt): Update.
2088
2089 2017-09-29  Tom Tromey  <tom@tromey.com>
2090
2091         * unittests/common-utils-selftests.c (format): New function.
2092         (string_vprintf_tests): New function.
2093         (_initialize_common_utils_selftests): Register new tests.
2094         * common/common-utils.c (string_vprintf): New function.
2095         * common/common-utils.h (string_vprintf): Declare.
2096
2097 2017-09-29  Pedro Alves  <palves@redhat.com>
2098
2099         * common/rsp-low.c (unpack_varlen_hex): Constify.
2100         * common/rsp-low.h (unpack_varlen_hex): Constify.
2101         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2102         Constify.
2103         * remote.c (remote_set_permissions, read_ptid)
2104         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2105         (remote_static_tracepoint_marker_at)
2106         (remote_static_tracepoint_markers_by_strid)
2107         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2108         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2109         (parse_tracepoint_definition, parse_tsv_definition)
2110         (parse_static_tracepoint_marker_definition): Constify.
2111         * tracepoint.h (parse_static_tracepoint_marker_definition)
2112         (parse_trace_status, parse_tracepoint_status)
2113         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2114
2115 2017-09-29  Pedro Alves  <palves@redhat.com>
2116
2117         * remote.c (target_buf, target_buf_size): Delete.
2118         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2119         Use the connection's packet buffer instead.
2120         All callers adjusted.
2121         (_initialize_remote): Remove references to target_buf and
2122         target_buf_size.
2123
2124 2017-09-28  Pedro Alves  <palves@redhat.com>
2125
2126         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2127         unittests/common-utils-selftests.c.
2128         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2129         (COMMON_OBS): Remove utils-selftests.o.
2130         * utils-selftests.c: Move to ...
2131         * unittests/common-utils-selftests.c: ... here and rename self
2132         test to "string_printf".
2133
2134 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2135
2136         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2137         having NULL cus or tus.
2138
2139 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2140
2141         * arm-tdep.c: (convert_from_extended): Remove.
2142         (convert_to_extended): Likewise.
2143         (arm_extract_return_value): Use convert_typed_floating.
2144         (arm_store_return_value): Likewise.
2145
2146         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2147         * sh-tdep.c: Do not include "floatformat.h".
2148         (sh_littlebyte_bigword_type): New function.
2149         (sh_register_convert_to_virtual): Use convert_typed_floating.
2150         (sh_register_convert_to_raw): Likewise.
2151         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2152         (sh64_littlebyte_bigword_type): New function.
2153         (sh64_extract_return_value): Use convert_typed_floating.
2154         (sh64_register_convert_to_virtual): Likewise.
2155         (sh64_register_convert_to_raw): Likewise.
2156
2157 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2158
2159         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2160         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2161
2162         * gdbtypes.h (union type_specific): Make field floatformat hold
2163         just a single struct floatformat, not an array.
2164         (floatformat_from_type): Move here.
2165         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2166         changed TYPE_FLOATFORMAT definition.
2167         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2168         (recursive_dump_type): Likewise.
2169         (init_float_type): Install correct floatformat for byte order.
2170         (arch_float_type): Likewise.
2171
2172 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2173
2174         * gdbtypes.c (init_type): Change incoming argument from
2175         length-in-bytes to length-in-bits.  Assert length is a
2176         multiple of TARGET_CHAR_BITS.
2177         (arch_type, arch_flags_type): Likewise.
2178         (init_integer_type): Update call to init_type.
2179         (init_character_type): Likewise.
2180         (init_boolean_type): Likewise.
2181         (init_float_type): Likewise.
2182         (init_decfloat_type): Likewise.
2183         (init_complex_type): Likewise.
2184         (init_pointer_type): Likewise.
2185         (objfile_type): Likewise.
2186         (arch_integer_type): Update call to arch_type.
2187         (arch_character_type): Likewise.
2188         (arch_boolean_type): Likewise.
2189         (arch_float_type): Likewise.
2190         (arch_decfloat_type): Likewise.
2191         (arch_complex_type): Likewise.
2192         (arch_pointer_type): Likewise.
2193         (gdbtypes_post_init): Likewise.
2194
2195         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2196         (read_base_type): Likewise.
2197         * mdebugread.c (basic_type): Likewise.
2198         * stabsread.c (dbx_init_float_type): Likewise.
2199         (rs6000_builtin_type): Likewise.
2200         (read_range_type): Likewise.  Also, fix call to init_integer_type
2201         with erroneous length argument.
2202
2203         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2204         * d-lang.c (build_d_types): Likewise.
2205         * f-lang.c (build_fortran_types): Likewise.
2206         * go-lang.c (build_go_types): Likewise.
2207         * opencl-lang.c (build_opencl_types): Likewise.
2208         * jit.c (finalize_symtab): Likewise.
2209         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2210         (build_std_type_info_type): Likewise.
2211         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2212         update call to arch_flags_type.
2213
2214         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2215         arch_type.
2216         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2217         * windows-tdep.c (windows_get_tlb_type): Likewise.
2218
2219         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2220         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2221         * m32c-tdep.c (make_types): Likewise.
2222         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2223         (rl78_psw_type): Update call to arch_flags_type.
2224         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2225         * rx-tdep.c (rx_psw_type): Likewise.
2226         (rx_fpsw_type): Likewise.
2227         * sparc-tdep.c (sparc_psr_type): Likewise.
2228         (sparc_fsr_type): Likewise.
2229         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2230         (sparc64_ccr_type): Likewise.
2231         (sparc64_fsr_type): Likewise.
2232         (sparc64_fprs_type): Likewise.
2233
2234 2017-09-27  Tom Tromey  <tom@tromey.com>
2235
2236         * findcmd.c (find_command): Constify.
2237
2238 2017-09-27  Tom Tromey  <tom@tromey.com>
2239
2240         * ada-tasks.c (task_command_1, task_command): Constify.
2241
2242 2017-09-27  Tom Tromey  <tom@tromey.com>
2243
2244         * symtab.c (maintenance_print_symbol_cache)
2245         (maintenance_flush_symbol_cache)
2246         (maintenance_print_symbol_cache_statistics): Constify.
2247
2248 2017-09-27  Tom Tromey  <tom@tromey.com>
2249
2250         * inferior.c (detach_inferior_command, kill_inferior_command)
2251         (inferior_command): Constify.
2252
2253 2017-09-27  Tom Tromey  <tom@tromey.com>
2254
2255         * regcache.c (regcache_print, maintenance_print_registers)
2256         (maintenance_print_raw_registers)
2257         (maintenance_print_cooked_registers)
2258         (maintenance_print_register_groups)
2259         (maintenance_print_remote_registers): Constify.
2260
2261 2017-09-27  Tom Tromey  <tom@tromey.com>
2262
2263         * printcmd.c (map_display_numbers, undisplay_command)
2264         (enable_disable_display_command, enable_display_command)
2265         (disable_display_command): Constify.
2266
2267 2017-09-27  Tom Tromey  <tom@tromey.com>
2268
2269         * breakpoint.h (delete_command): Don't declare.
2270         * breakpoint.c (delete_command, enable_once_command)
2271         (enable_count_command, enable_delete_command, breakpoint_1)
2272         (maintenance_info_breakpoints, stopin_command, stopat_command)
2273         (delete_command, delete_trace_command, save_breakpoints)
2274         (save_breakpoints_command, save_tracepoints_command): Constify.
2275
2276 2017-09-27  Tom Tromey  <tom@tromey.com>
2277
2278         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2279         (skip_ws, extract_identifier, macro_define_command)
2280         (macro_undef_command, macro_list_command): Constify.
2281
2282 2017-09-27  Tom Tromey  <tom@tromey.com>
2283
2284         * infcmd.c (environment_info, set_environment_command)
2285         (unset_environment_command, path_info, info_proc_cmd_1)
2286         (info_proc_cmd_mappings, info_proc_cmd_stat)
2287         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2288         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2289
2290 2017-09-27  Tom Tromey  <tom@tromey.com>
2291
2292         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2293         Constify.
2294
2295 2017-09-27  Tom Tromey  <tom@tromey.com>
2296
2297         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2298
2299 2017-09-27  Tom Tromey  <tom@tromey.com>
2300
2301         * demangle.c (demangle_command): Constify.
2302
2303 2017-09-27  Tom Tromey  <tom@tromey.com>
2304
2305         * progspace.c (maintenance_info_program_spaces_command):
2306         Constify.
2307
2308 2017-09-27  Tom Tromey  <tom@tromey.com>
2309
2310         * compile/compile.c (check_raw_argument, compile_file_command)
2311         (compile_code_command, compile_print_command): Constify.
2312
2313 2017-09-27  Tom Tromey  <tom@tromey.com>
2314
2315         * reggroups.c (maintenance_print_reggroups): Constify.
2316
2317 2017-09-27  Tom Tromey  <tom@tromey.com>
2318
2319         * dwarf2read.c (save_gdb_index_command): Constify.
2320
2321 2017-09-27  Tom Tromey  <tom@tromey.com>
2322
2323         * stap-probe.c (info_probes_stap_command): Constify.
2324
2325 2017-09-27  Tom Tromey  <tom@tromey.com>
2326
2327         * fork-child.c (unset_exec_wrapper_command): Constify.
2328
2329 2017-09-27  Tom Tromey  <tom@tromey.com>
2330
2331         * btrace.c (get_uint, get_context_size, no_chunk)
2332         (maint_btrace_packet_history_cmd)
2333         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2334         (maint_info_btrace_cmd): Constify.
2335
2336 2017-09-27  Tom Tromey  <tom@tromey.com>
2337
2338         * reverse.c (delete_bookmark_command): Constify.
2339
2340 2017-09-27  Tom Tromey  <tom@tromey.com>
2341
2342         * remote.c (set_memory_packet_size)
2343         (set_memory_write_packet_size, show_memory_write_packet_size)
2344         (set_memory_read_packet_size, show_memory_read_packet_size)
2345         (compare_sections_command, packet_command, remote_put_command)
2346         (remote_get_command, remote_delete_command): Constify.
2347
2348 2017-09-27  Tom Tromey  <tom@tromey.com>
2349
2350         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2351         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2352         (set_mipsfpu_auto_command): Constify.
2353
2354 2017-09-27  Tom Tromey  <tom@tromey.com>
2355
2356         * cli/cli-cmds.h (cd_command): Constify.
2357         * cli/cli-cmds.c (cd_command): Constify.
2358
2359 2017-09-27  Tom Tromey  <tom@tromey.com>
2360
2361         * thread.c (thread_name_command, thread_find_command): Constify.
2362
2363 2017-09-27  Tom Tromey  <tom@tromey.com>
2364
2365         * probe.c (enable_probes_command, disable_probes_command):
2366         Constify.
2367
2368 2017-09-27  Tom Tromey  <tom@tromey.com>
2369
2370         * symfile.c (symbol_file_command): Constify.
2371         * gdbcore.h (deprecated_file_changed_hook): Constify.
2372         * exec.c (deprecated_file_changed_hook, exec_file_command)
2373         (file_command): Constify.
2374         * defs.h (symbol_file_command): Constify.
2375
2376 2017-09-27  Tom Tromey  <tom@tromey.com>
2377
2378         * remote-fileio.c (set_system_call_allowed)
2379         (show_system_call_allowed): Constify.
2380
2381 2017-09-27  Tom Tromey  <tom@tromey.com>
2382
2383         * tracepoint.c (delete_trace_variable_command)
2384         (tfind_end_command, tfind_start_command, tfind_pc_command)
2385         (tfind_tracepoint_command, tfind_line_command)
2386         (tfind_range_command, tfind_outside_command): Constify.
2387
2388 2017-09-27  Tom Tromey  <tom@tromey.com>
2389
2390         * ax-gdb.c (maint_agent_printf_command, agent_command)
2391         (agent_eval_command): Constify.
2392
2393 2017-09-27  Tom Tromey  <tom@tromey.com>
2394
2395         * tracepoint.c (info_scope_command): Constify.
2396         * python/python.c (gdbpy_decode_line): Constify.
2397         * python/py-breakpoint.c (bppy_init): Constify.
2398         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2399         * location.h: (new_linespec_location)
2400         (string_to_event_location_basic, string_to_event_location):
2401         Constify.
2402         * location.c (new_linespec_location)
2403         (string_to_event_location_basic, string_to_event_location):
2404         Constify.
2405         * linespec.h (decode_line_with_current_source)
2406         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2407         * linespec.c (linespec_lex_to_end)
2408         (decode_line_with_current_source)
2409         (decode_line_with_last_displayed): Constify.
2410         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2411         Constify.
2412         * cli/cli-cmds.c (edit_command, list_command): Constify.
2413         * breakpoint.h (until_break_command, watch_command_wrapper)
2414         (awatch_command_wrapper, rwatch_command_wrapper)
2415         (init_ada_exception_breakpoint): Constify.
2416         * breakpoint.c (break_command_1, dprintf_command)
2417         (break_range_command, watch_command_wrapper)
2418         (rwatch_command_wrapper, awatch_command_wrapper)
2419         (until_break_command, init_ada_exception_breakpoint)
2420         (strace_marker_create_sals_from_location, trace_command)
2421         (ftrace_command, strace_command, struct tracepoint): Constify.
2422         * ax-gdb.c (agent_command_1): Constify.
2423         * ada-lang.c (ada_exception_sal): Constify.
2424
2425 2017-09-27  Tom Tromey  <tom@tromey.com>
2426
2427         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2428         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2429         (get_context_size, no_chunk, get_insn_history_modifiers)
2430         (cmd_record_insn_history, get_call_history_modifiers)
2431         (cmd_record_call_history): Constify.
2432
2433 2017-09-27  Tom Tromey  <tom@tromey.com>
2434
2435         * source.c (show_substitute_path_command)
2436         (unset_substitute_path_command, set_substitute_path_command):
2437         Constify.
2438
2439 2017-09-27  Tom Tromey  <tom@tromey.com>
2440
2441         * typeprint.c (maintenance_print_type): Constify.
2442         * maint.c (maintenance_dump_me, maintenance_demangle)
2443         (maintenance_time_display, maintenance_info_sections)
2444         (maintenance_print_statistics, maintenance_deprecate)
2445         (maintenance_undeprecate): Constify.
2446         (maintenance_do_deprecate): Constify.  Use std::string.
2447         (maintenance_selftest): Constify.
2448         * gdbtypes.h (maintenance_print_type): Constify.
2449
2450 2017-09-27  Tom Tromey  <tom@tromey.com>
2451
2452         * hppa-tdep.c (unwind_command): Constify.
2453
2454 2017-09-27  Tom Tromey  <tom@tromey.com>
2455
2456         * target-descriptions.c (unset_tdesc_filename_cmd)
2457         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2458         Constify.
2459
2460 2017-09-27  Tom Tromey  <tom@tromey.com>
2461
2462         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2463
2464 2017-09-27  Tom Tromey  <tom@tromey.com>
2465
2466         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2467
2468 2017-09-27  Tom Tromey  <tom@tromey.com>
2469
2470         * tui/tui-regs.c (tui_reg_command): Constify.
2471
2472 2017-09-27  Tom Tromey  <tom@tromey.com>
2473
2474         * skip.c (skip_file_command, skip_function_command)
2475         (skip_enable_command, skip_disable_command, skip_delete_command):
2476         Constify.
2477
2478 2017-09-27  Tom Tromey  <tom@tromey.com>
2479
2480         * record-btrace.c (cmd_record_btrace_bts_start)
2481         (cmd_record_btrace_pt_start): Constify.
2482
2483 2017-09-27  Tom Tromey  <tom@tromey.com>
2484
2485         * symmisc.c (maintenance_print_symbols)
2486         (maintenance_print_msymbols, maintenance_print_objfiles)
2487         (maintenance_info_symtabs, maintenance_check_symtabs)
2488         (maintenance_expand_symtabs, maintenance_info_line_tables):
2489         Constify.
2490
2491 2017-09-27  Tom Tromey  <tom@tromey.com>
2492
2493         * top.c (new_ui_command): Constify.
2494
2495 2017-09-27  Tom Tromey  <tom@tromey.com>
2496
2497         * symfile.c (add_symbol_file_command)
2498         (remove_symbol_file_command, list_overlays_command)
2499         (map_overlay_command, unmap_overlay_command)
2500         (overlay_auto_command, overlay_manual_command)
2501         (overlay_off_command, overlay_load_command): Constify.
2502
2503 2017-09-27  Tom Tromey  <tom@tromey.com>
2504
2505         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2506         (info_spu_mailbox_command, info_spu_dma_command)
2507         (info_spu_proxydma_command): Constify.
2508
2509 2017-09-27  Tom Tromey  <tom@tromey.com>
2510
2511         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2512
2513 2017-09-27  Tom Tromey  <tom@tromey.com>
2514
2515         * cli/cli-script.c (user_defined_command): Constify.
2516
2517 2017-09-27  Tom Tromey  <tom@tromey.com>
2518
2519         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2520         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2521         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2522         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2523         (dump_binary_value, append_binary_memory, append_binary_value):
2524         Constify.
2525         (struct dump_context) <func>: Constify.
2526         (add_dump_command): Update.
2527
2528 2017-09-27  Tom Tromey  <tom@tromey.com>
2529
2530         * cli/cli-cmds.c (show_version, show_configuration)
2531         (source_command, show_user): Constify.
2532
2533 2017-09-27  Tom Tromey  <tom@tromey.com>
2534
2535         * target.c (maintenance_print_target_stack): Constify.
2536
2537 2017-09-27  Tom Tromey  <tom@tromey.com>
2538
2539         * interps.c (interpreter_exec_cmd): Constify.
2540
2541 2017-09-27  Tom Tromey  <tom@tromey.com>
2542
2543         * record-full.c (cmd_record_full_restore): Constify.
2544
2545 2017-09-27  Tom Tromey  <tom@tromey.com>
2546
2547         * memattr.c (enable_mem_command, disable_mem_command)
2548         (delete_mem_command): Constify.
2549
2550 2017-09-27  Tom Tromey  <tom@tromey.com>
2551
2552         * value.c (show_convenience): Constify.
2553
2554 2017-09-27  Tom Tromey  <tom@tromey.com>
2555
2556         * gdbcore.h (core_file_command): Update.
2557         * corefile.c (core_file_command): Constify.
2558
2559 2017-09-27  Tom Tromey  <tom@tromey.com>
2560
2561         * user-regs.c (maintenance_print_user_registers): Constify.
2562
2563 2017-09-27  Tom Tromey  <tom@tromey.com>
2564
2565         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2566
2567 2017-09-27  Tom Tromey  <tom@tromey.com>
2568
2569         * cp-support.c (first_component_command): Constify.
2570
2571 2017-09-27  Tom Tromey  <tom@tromey.com>
2572
2573         * psymtab.c (maintenance_print_psymbols)
2574         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2575         Constify.
2576
2577 2017-09-27  Tom Tromey  <tom@tromey.com>
2578
2579         * windows-tdep.c (display_tib): Constify.
2580
2581 2017-09-27  Tom Tromey  <tom@tromey.com>
2582
2583         * linux-fork.c (delete_checkpoint_command)
2584         (detach_checkpoint_command): Constify.
2585
2586 2017-09-27  Tom Tromey  <tom@tromey.com>
2587
2588         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2589
2590 2017-09-27  Tom Tromey  <tom@tromey.com>
2591
2592         * arc-tdep.c (dump_arc_instruction_command): Constify.
2593
2594 2017-09-27  Tom Tromey  <tom@tromey.com>
2595
2596         * valprint.c (set_radix, show_radix): Constify.
2597
2598 2017-09-27  Tom Tromey  <tom@tromey.com>
2599
2600         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2601
2602 2017-09-27  Tom Tromey  <tom@tromey.com>
2603
2604         * command.h (not_just_help_class_command): Update.
2605         * cli/cli-decode.h (not_just_help_class_command): Update.
2606         * cli/cli-decode.c (not_just_help_class_command): Constify.
2607
2608 2017-09-27  Tom Tromey  <tom@tromey.com>
2609
2610         * gdb_bfd.c (maintenance_info_bfds): Constify.
2611
2612 2017-09-27  Tom Tromey  <tom@tromey.com>
2613
2614         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2615         overloads.
2616         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2617         (do_const_cfunc): New function.
2618         (cmd_cfunc_eq): New overload.
2619         (cli_user_command_p): Check do_const_cfunc.
2620         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2621         const_cfunc.
2622         * command.h (add_cmd): Add const overload and no-function
2623         overload.
2624         (set_cmd_cfunc): Add const overload.
2625         (cmd_const_cfunc_ftype): Declare.
2626         (cmd_cfunc_eq): Add const overload.
2627         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2628         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2629         overload.
2630
2631 2017-09-27  Tom Tromey  <tom@tromey.com>
2632
2633         * macroexp.c (get_next_token_for_substitution): New function.
2634         (substitute_args): Call it.  Check for __VA_OPT__.
2635
2636 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2637             Pedro Alves <palves@redhat.com>
2638
2639         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2640         producer_is_icc_lt_14.
2641         (producer_is_icc_lt_14): New function.
2642         (check_producer): Add code for checking version of ICC.
2643         (producer_is_icc): Move to producer.c.
2644         (read_structure_type): Restrict ICC workaround to ICC<14.
2645         * producer.c: Include selftest.h.
2646         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2647         New functions.
2648         * producer.h (producer_is_icc): New declaration.
2649
2650 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2651
2652         * Makefile.in (SFILES): Add producer.c.
2653         (COMMON_OBS): Add producer.o
2654         * amd64-tdep.c (producer.h): Add new include.
2655         * dwarf2read.c (producer.h): Add new include.
2656         * producer.c: New file.
2657         * producer.h: New file.
2658         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2659         producer.c.
2660         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2661         producer.h.
2662
2663 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2664
2665         * configure.ac: Search ncursesw before ncurses.
2666         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2667         * gdb_curses.h: Include <ncursesw/ncurses.h>
2668         * config.in, configure: Regenerate.
2669
2670 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2671
2672         PR gdb/22185
2673         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2674         obsolete.
2675         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2676         Remove i386sol2 support.
2677         * configure.nat <i386sol2>: Remove.
2678         <sol2-64>: Fold into ...
2679         <sol2>: ... this.
2680         Move common settings to default section.
2681         Add sol-thread.o.
2682         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2683         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2684         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2685         <i[34567]86-*-solaris*>: Remove.
2686         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2687
2688         * configure.ac: Remove wctype in libw check.
2689         (_MSE_INT_H): Don't define on Solaris 7-9.
2690         <solaris*>: Remove libthread_db.so.1 check.
2691         * configure: Regenerate.
2692         * config.in: Regenerate.
2693
2694         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2695         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2696         (gdb_ps_size_t): Remove.
2697         Use base types in users.
2698         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2699
2700         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2701
2702 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2703
2704         PR build/22206
2705         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2706         (adi_is_addr_mapped): Likewise.
2707         (PSR_ICC): Don't redefine.
2708         (PSR_IMPL): Likewise.
2709
2710 2017-09-25  Tom Tromey  <tom@tromey.com>
2711
2712         * regcache.c (regcache::dump): Use string_printf.
2713
2714 2017-09-25  Tom Tromey  <tom@tromey.com>
2715
2716         * regcache.c (class regcache_invalidator): New.
2717         (struct register_to_invalidate): Remove.
2718         (make_cleanup_regcache_invalidate): Remove.
2719         (regcache::raw_write): Use regcache_invalidator.
2720
2721 2017-09-25  Tom Tromey  <tom@tromey.com>
2722
2723         * spu-tdep.c (spu2ppu_sniffer): Update.
2724         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2725         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2726         Remove.
2727         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2728         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2729         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2730         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2731         (frame_pop): Update.
2732
2733 2017-09-25  Tom Tromey  <tom@tromey.com>
2734
2735         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2736         * regcache.h (regcache_xfree): Don't declare.
2737         * regcache.c (regcache_xfree): Remove.
2738         (do_regcache_xfree): Use delete.
2739         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2740         * linux-fork.c (free_fork): Use delete.
2741         (fork_save_infrun_state): Likewise.
2742         * jit.c (jit_dealloc_cache): Use delete.
2743         * infrun.c (discard_infcall_suspend_state): Use delete.
2744
2745 2017-09-25  Tom Tromey  <tom@tromey.com>
2746
2747         * regcache.h (regcache_xmalloc): Don't declare.
2748         (regcache_raw_set_cached_value): Update comment.
2749         * regcache.c (regcache_xmalloc): Remove.
2750         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2751         * jit.c (jit_frame_sniffer): Use new.
2752         * frame.c (frame_save_as_regcache): Use new.
2753
2754 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2755
2756         * NEWS: Advertise support for guarded-storage registers on IBM z.
2757
2758 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2759
2760         * s390-linux-nat.c (have_regset_gs): New static variable.
2761         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2762         control block and guarded-storage broadcast control regsets.
2763         (s390_read_description): Detect whether the target has
2764         guarded-storage support, return appropriate tdesc.
2765         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2766         (features/s390x-gs-linux64.c): Likewise.
2767         (struct gdbarch_tdep) <have_gs>: New field.
2768         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2769         (s390_gsbc_regset): New variables.
2770         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2771         and s390_gsbc_regset, if applicable.
2772         (s390_core_read_description): Check whether core file was from a
2773         target with guarded-storage support; include appropriate regsets.
2774         (s390_gdbarch_init): Add registers for guarded-storage support.
2775         (_initialize_s390_tdep): Initialize new target descriptions that
2776         include registers for guarded-storage support.
2777         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2778         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2779         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2780         (S390_NUM_REGS): Adjust macro definition.
2781         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2782         (tdesc_s390x_gs_linux64): New declarations.
2783
2784 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2785
2786         * features/s390-gs-linux64.xml: New file.
2787         * features/s390-gs.xml: New file.
2788         * features/s390-gsbc.xml: New file.
2789         * features/s390x-gs-linux64.xml: New file.
2790         * features/Makefile (WHICH): Add s390-gs-linux64 and
2791         s390x-gs-linux64.
2792         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2793         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2794         * features/s390-gs-linux64.c: New generated file.
2795         * features/s390x-gs-linux64.c: New file.
2796         * regformats/s390-gs-linux64.dat: New file.
2797         * regformats/s390x-gs-linux64.dat: New file.
2798
2799 2017-09-23  Tom Tromey  <tom@tromey.com>
2800
2801         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2802
2803 2017-09-22  Tom Tromey  <tom@tromey.com>
2804
2805         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2806         type to scoped_restore_tmpl.
2807         <scoped_input_handler>: Initialize m_quit_handler directly.
2808
2809 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2810
2811         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2812         (cd_command): Likewise.  Free "current_directory" before
2813         assigning to it.
2814         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2815         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2816         * top.c (gdb_dirbuf): Remove global declaration.
2817         * top.h (gdb_dirbuf): Likewise.
2818
2819 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2820
2821         * gnulib/aclocal.m4: Regenerate.
2822         * gnulib/config.in: Regenerate.
2823         * gnulib/configure: Regenerate.
2824         * gnulib/import/Makefile.am: Regenerate.
2825         * gnulib/import/Makefile.in: Regenerate.
2826         * gnulib/import/assure.h: New file.
2827         * gnulib/import/at-func.c: Likewise
2828         * gnulib/import/chdir-long.c: New file.
2829         * gnulib/import/chdir-long.h: New file.
2830         * gnulib/import/cloexec.c: New file.
2831         * gnulib/import/cloexec.h: New file.
2832         * gnulib/import/close.c: New file.
2833         * gnulib/import/closedir.c: New file.
2834         * gnulib/import/dirent-private.h: New file.
2835         * gnulib/import/dup-safer.c: New file.
2836         * gnulib/import/dup.c: New file.
2837         * gnulib/import/dup2.c: New file.
2838         * gnulib/import/error.c: New file.
2839         * gnulib/import/error.h: New file.
2840         * gnulib/import/exitfail.c: New file.
2841         * gnulib/import/exitfail.h: New file.
2842         * gnulib/import/fchdir.c: New file.
2843         * gnulib/import/fcntl.c: New file.
2844         * gnulib/import/fcntl.in.h: New file.
2845         * gnulib/import/fd-hook.c: New file.
2846         * gnulib/import/fd-hook.h: New file.
2847         * gnulib/import/fd-safer.c: New file.
2848         * gnulib/import/fdopendir.c: New file.
2849         * gnulib/import/filename.h: New file.
2850         * gnulib/import/filenamecat-lgpl.c: New file.
2851         * gnulib/import/filenamecat.h: New file.
2852         * gnulib/import/fstat.c: New file.
2853         * gnulib/import/fstatat.c: New file.
2854         * gnulib/import/getcwd-lgpl.c: New file.
2855         * gnulib/import/getcwd.c: New file.
2856         * gnulib/import/getdtablesize.c: New file.
2857         * gnulib/import/getlogin_r.c: New file.
2858         * gnulib/import/getprogname.c: New file.
2859         * gnulib/import/getprogname.h: New file.
2860         * gnulib/import/gettext.h: New file.
2861         * gnulib/import/glob-libc.h: New file.
2862         * gnulib/import/glob.c: New file.
2863         * gnulib/import/glob.in.h: New file.
2864         * gnulib/import/intprops.h: New file.
2865         * gnulib/import/m4/chdir-long.m4: New file.
2866         * gnulib/import/m4/close.m4: New file.
2867         * gnulib/import/m4/closedir.m4: New file.
2868         * gnulib/import/m4/d-ino.m4: New file.
2869         * gnulib/import/m4/d-type.m4: New file.
2870         * gnulib/import/m4/dup.m4: New file.
2871         * gnulib/import/m4/dup2.m4: New file.
2872         * gnulib/import/m4/error.m4: New file.
2873         * gnulib/import/m4/fchdir.m4: New file.
2874         * gnulib/import/m4/fcntl.m4: New file.
2875         * gnulib/import/m4/fcntl_h.m4: New file.
2876         * gnulib/import/m4/fdopendir.m4: New file.
2877         * gnulib/import/m4/filenamecat.m4: New file.
2878         * gnulib/import/m4/fstat.m4: New file.
2879         * gnulib/import/m4/fstatat.m4: New file.
2880         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2881         * gnulib/import/m4/getcwd-path-max.m4: New file.
2882         * gnulib/import/m4/getcwd.m4: New file.
2883         * gnulib/import/m4/getdtablesize.m4: New file.
2884         * gnulib/import/m4/getlogin_r.m4: New file.
2885         * gnulib/import/m4/getprogname.m4: New file.
2886         * gnulib/import/m4/glob.m4: New file.
2887         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2888         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2889         * gnulib/import/m4/mempcpy.m4: New file.
2890         * gnulib/import/m4/memrchr.m4: New file.
2891         * gnulib/import/m4/mode_t.m4: New file.
2892         * gnulib/import/m4/msvc-inval.m4: New file.
2893         * gnulib/import/m4/msvc-nothrow.m4: New file.
2894         * gnulib/import/m4/open.m4: New file.
2895         * gnulib/import/m4/openat.m4: New file.
2896         * gnulib/import/m4/opendir.m4: New file.
2897         * gnulib/import/m4/readdir.m4: New file.
2898         * gnulib/import/m4/realloc.m4: New file.
2899         * gnulib/import/m4/rewinddir.m4: New file.
2900         * gnulib/import/m4/save-cwd.m4: New file.
2901         * gnulib/import/m4/strdup.m4: New file.
2902         * gnulib/import/m4/strerror.m4: New file.
2903         * gnulib/import/m4/unistd-safer.m4: New file.
2904         * gnulib/import/mempcpy.c: New file.
2905         * gnulib/import/memrchr.c: New file.
2906         * gnulib/import/msvc-inval.c: New file.
2907         * gnulib/import/msvc-inval.h: New file.
2908         * gnulib/import/msvc-nothrow.c: New file.
2909         * gnulib/import/msvc-nothrow.h: New file.
2910         * gnulib/import/open.c: New file.
2911         * gnulib/import/openat-die.c: New file.
2912         * gnulib/import/openat-priv.h: New file.
2913         * gnulib/import/openat-proc.c: New file.
2914         * gnulib/import/openat.c: New file.
2915         * gnulib/import/openat.h: New file.
2916         * gnulib/import/opendir.c: New file.
2917         * gnulib/import/pipe-safer.c: New file.
2918         * gnulib/import/readdir.c: New file.
2919         * gnulib/import/realloc.c: New file.
2920         * gnulib/import/rewinddir.c: New file.
2921         * gnulib/import/save-cwd.c: New file.
2922         * gnulib/import/save-cwd.h: New file.
2923         * gnulib/import/strdup.c: New file.
2924         * gnulib/import/strerror-override.c: New file.
2925         * gnulib/import/strerror-override.h: New file.
2926         * gnulib/import/strerror.c: New file.
2927         * gnulib/import/unistd--.h: New file.
2928         * gnulib/import/unistd-safer.h: New file.
2929         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2930         "getcwd" and "glob".
2931         * ser-tcp.c: Undefine "close" before redefining it.
2932
2933 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2934
2935         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2936         get rid of res_val.
2937
2938 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2939
2940         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2941         <sol2,sparc>: Likewise.
2942         <sol2-64,i386>: Likewise.
2943
2944         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2945         -Wdeprecated-declarations on *-*-solaris*.
2946         * configure: Regenerate.
2947
2948         * procfs.c: Include "nat/inferior.h".
2949         (procfs_info_proc): Fix typo.
2950
2951 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2952
2953         * remote.c (vector): Include.
2954         (struct private_thread_info): Add field, thread_handle.
2955         (free_private_thread_info): Deallocate storage associated with
2956         thread handle.
2957         (get_private_info_thread): Initialize `thread_handle' field.
2958         (struct thread_item): Add field, thread_handle.
2959         (clear_threads_listing_context): Deallocate storage associated
2960         with thread handle.
2961         (start_thread): Add support for "handle" attribute.
2962         (thread_attributes): Add "handle".
2963         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2964         field.
2965         (remote_update_thread_list): Update thread_handle.
2966         (remote_thread_handle_to_thread_info): New function.
2967         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2968
2969 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2970
2971         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2972         function.
2973         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2974         * python/python-internal.h (thread_object_type): Declare.
2975
2976 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2977
2978         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2979         (target_thread_handle_to_thread_info): Declare.
2980         * target.c (target_thread_handle_to_thread_info): New function.
2981         * target-delegates.c: Regenerate.
2982         * gdbthread.h (find_thread_by_handle): Declare.
2983         * thread.c (find_thread_by_handle): New function.
2984         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2985         function.
2986         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2987
2988 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2989
2990         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2991
2992 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2993
2994         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2995
2996 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2997
2998         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2999         to gdb_target_obs.
3000
3001 2017-09-20  Tom Tromey  <tom@tromey.com>
3002
3003         * breakpoint.c (struct counted_command_line): Remove.
3004         (breakpoint_commands): Update.
3005         (alloc_counted_command_line, incref_counted_command_line)
3006         (decref_counted_command_line, do_cleanup_counted_command_line)
3007         (make_cleanup_decref_counted_command_line): Remove.
3008         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3009         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3010         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3011         (save_breakpoints): Update.
3012         * breakpoint.h (counted_command_line): Now a typedef to
3013         shared_ptr.
3014         (struct breakpoint) <commands>: Now a counted_command_line.
3015         (struct bpstats) <command>: Likewise.
3016
3017 2017-09-20  Tom Tromey  <tom@tromey.com>
3018
3019         * breakpoint.c (struct commands_info, do_map_commands_command):
3020         Remove.
3021         (commands_command_1): Update.
3022         (iterate_over_related_breakpoints): Take a function_view.
3023         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3024         (delete_command): Update.
3025         (map_breakpoint_numbers): Take a function_view.
3026         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3027         (disable_command): Update.
3028         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3029         (enable_command): Update.
3030         (struct disp_data, do_enable_breakpoint_disp)
3031         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3032         (do_map_enable_delete_breakpoint): Remove.
3033         (enable_once_command, enable_count_command, enable_delete_command)
3034         (delete_trace_variable_command): Update.
3035
3036 2017-09-20  Tom Tromey  <tom@tromey.com>
3037
3038         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3039         (bpstat_clear): Use delete.
3040         (bpstats): New constructors.
3041         (bpstat_copy, bpstat_stop_status): Use new.
3042         (dprintf_after_condition_true): Update.
3043         * breakpoint.h (bpstats::bpstats): Add constructors.
3044         (bpstats::~bpstats): Add destructor.
3045
3046 2017-09-20  Pedro Alves  <palves@redhat.com>
3047
3048         * eval.c (make_params): Delete, refactored as ...
3049         (class fake_method): ... this new type's ctor.
3050         (fake_method::~fake_method): New.
3051         (evaluate_subexp_standard): Use 'fake_method'.
3052
3053 2017-09-20  Tom Tromey  <tom@tromey.com>
3054
3055         * windows-nat.c (get_windows_debug_event, windows_wait)
3056         (do_initial_windows_stuff, windows_attach): Update.
3057         * utils.c (vwarning, internal_vproblem): Update.
3058         (ui_unregister_input_event_handler_cleanup)
3059         (prepare_to_handle_input): Remove.
3060         (class scoped_input_handler): New.
3061         (defaulted_query, prompt_for_continue): Update.
3062         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3063         Update.
3064         * top.c (undo_terminal_modifications_before_exit): Update.
3065         * target/target.h (target_terminal_init, target_terminal_inferior)
3066         (target_terminal_ours): Don't declare.
3067         (class target_terminal): New.
3068         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3069         (target_terminal_ours_for_output)
3070         (make_cleanup_restore_target_terminal): Don't declare.
3071         (target_terminal_info): Remove.
3072         * target.c (enum terminal_state, terminal_state): Remove.
3073         (target_terminal::terminal_state): Define.
3074         (target_terminal::init): Rename from target_terminal_init.
3075         (target_terminal::inferior): Rename from
3076         target_terminal_inferior.
3077         (target_terminal::ours): Rename from target_terminal_ours.
3078         (target_terminal::ours_for_output): Rename from
3079         target_terminal_ours_for_output.
3080         (target_terminal::info): New method.
3081         (cleanup_restore_target_terminal)
3082         (make_cleanup_restore_target_terminal): Remove.
3083         * solib.c (handle_solib_event): Update.
3084         * remote.c (remote_serial_quit_handler): Update.
3085         (remote_terminal_inferior, remote_wait_as): Update.
3086         * record-full.c (record_full_wait_1): Update.
3087         * nto-procfs.c (procfs_create_inferior): Update.
3088         * nat/fork-inferior.c (startup_inferior): Update.
3089         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3090         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3091         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3092         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3093         (mi_breakpoint_created, mi_breakpoint_deleted)
3094         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3095         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3096         (mi_user_selected_context_changed, report_initial_inferior):
3097         Update.
3098         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3099         (linux_nat_terminal_inferior): Update.
3100         * infrun.c (follow_fork_inferior)
3101         (handle_vfork_child_exec_or_exit, do_target_resume)
3102         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3103         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3104         Update.
3105         * inflow.c (child_terminal_init, info_terminal_command): Update.
3106         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3107         (attach_command): Update.
3108         * infcall.c (call_thread_fsm_should_stop): Update.
3109         * gnu-nat.c (gnu_attach): Update.
3110         * extension.c (struct active_ext_lang_state)
3111         (restore_active_ext_lang): Update.
3112         * exceptions.c (print_flush): Update.
3113         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3114         (struct quit_handler_cleanup_data, restore_quit_handler)
3115         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3116         Remove.
3117         * cp-support.c (gdb_demangle): Update.
3118         * breakpoint.c (update_inserted_breakpoint_locations)
3119         (insert_breakpoint_locations, handle_jit_event)
3120         (disable_breakpoints_in_unloaded_shlib): Update.
3121         * annotate.c (annotate_breakpoints_invalid)
3122         (annotate_frames_invalid): Update.
3123
3124 2017-09-20  Tom Tromey  <tom@tromey.com>
3125
3126         * main.c (catch_command_errors): Rename from
3127         catch_command_errors_const.
3128         (captured_main_1): Update.
3129
3130 2017-09-20  Pedro Alves  <palves@redhat.com>
3131
3132         * cli/cli-cmds.c (list_command): Use print_sal_location.
3133         (print_sal_location): New function.
3134         (ambiguous_line_spec): Use print_sal_location.
3135         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3136         * symtab.c (find_function_start_sal): Likewise.
3137         * symtab.h (symtab_and_line::symbol): New field.
3138
3139 2017-09-20  Pedro Alves  <palves@redhat.com>
3140
3141         * linespec.c (minsym_found): Handle non-text minsyms.
3142         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3143
3144 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3145
3146         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3147         backslash.
3148
3149 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3150
3151         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3152         vmovups instead vmovaps.
3153         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3154
3155 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3156
3157         * NEWS (Changes since GDB 8.0): Add starti.
3158         * infcmd.c (enum run_break): New.
3159         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3160         case.
3161         (run_command): Use enum run_how.
3162         (start_command): Likewise.
3163         (starti_command): New function.
3164         (RUN_ARGS_HELP): New macro.
3165         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3166         commands.  Add starti command.
3167
3168 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3169
3170         * Makefile.in (monitor.o): Remove the rule.
3171
3172 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3173
3174         * annotate.h (struct annotate_arg_emitter): Use
3175         DISABLE_COPY_AND_ASSIGN.
3176         * common/refcounted-object.h (refcounted_object): Likewise.
3177         * completer.h (struct completion_result): Likewise.
3178         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3179         * filename-seen-cache.h (filename_seen_cache): Likewise.
3180         * gdbcore.h (thread_section_name): Likewise.
3181         * gdb_regex.h (compiled_regex): Likewise.
3182         * gdbthread.h (scoped_restore_current_thread): Likewise.
3183         * inferior.h (scoped_restore_current_inferior): Likewise.
3184         * jit.c (jit_reader): Likewise.
3185         * linespec.h (struct linespec_result): Likewise.
3186         * mi/mi-parse.h (struct mi_parse): Likewise.
3187         * nat/fork-inferior.c (execv_argv): Likewise.
3188         * progspace.h (scoped_restore_current_program_space): Likewise.
3189         * python/python-internal.h (class gdbpy_enter): Likewise.
3190         * regcache.h (regcache): Likewise.
3191         * target-descriptions.c (struct tdesc_reg): Likewise.
3192         (struct tdesc_type): Likewise.
3193         (struct tdesc_feature): Likewise.
3194         * ui-out.h (ui_out_emit_type): Likewise.
3195
3196 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3197
3198         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3199         label abort_expression.
3200
3201 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3202
3203         * common/buffer.c (buffer_xml_printf): Adjust.
3204         * common/xml-utils.c (xml_escape_text): Change return type to
3205         std::string, update code accordingly.
3206         * common/xml-utils.h (xml_escape_text): Change return type to
3207         std::string.
3208         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3209         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3210         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3211         Adjust.
3212
3213 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3214
3215         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3216         (SUBDIR_UNITTESTS_OBS): Add new object file.
3217         * unittests/xml-utils-selftests.c: New file.
3218
3219 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3220
3221         * common/selftest.h (selftest): New struct/interface.
3222         (register_test): Add name parameter, add new overload.
3223         (run_tests): Add filter parameter.
3224         (for_each_selftest_ftype): New typedef.
3225         (for_each_selftest): New declaration.
3226         * common/selftest.c (tests): Change type to
3227         map<string, unique_ptr<selftest>>.
3228         (simple_selftest): New struct.
3229         (register_test): New function.
3230         (register_test): Add name parameter and use it.
3231         (run_tests): Add filter parameter and use it.  Add prints.
3232         Adjust to vector -> map change.
3233         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3234         registering selftests.
3235         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3236         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3237         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3238         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3239         * findvar.c (_initialize_findvar): Likewise.
3240         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3241         * maint.c (maintenance_selftest): Update call to run_tests.
3242         (maintenance_info_selftests): New function.
3243         (_initialize_maint_cmds): Register "maintenance info selftests"
3244         command.  Update "maintenance selftest" doc.
3245         * regcache.c (_initialize_regcache): Add names when registering
3246         selftests.
3247         * rust-exp.y (_initialize_rust_exp): Likewise.
3248         * selftest-arch.c (gdbarch_selftest): New struct.
3249         (gdbarch_tests): Remove.
3250         (register_test_foreach_arch): Add name parameter.  Call
3251         register_test.
3252         (tests_with_arch): Remove, move most content to
3253         gdbarch_selftest::operator().
3254         (_initialize_selftests_foreach_arch): Remove.
3255         * selftest-arch.h (register_test_foreach_arch): Add name
3256         parameter.
3257         (run_tests_with_arch): New declaration.
3258         * utils-selftests.c (_initialize_utils_selftests): Add names
3259         when registering selftests.
3260         * utils.c (_initialize_utils): Likewise.
3261         * unittests/array-view-selftests.c
3262         (_initialize_array_view_selftests): Likewise.
3263         * unittests/environ-selftests.c (_initialize_environ_selftests):
3264         Likewise.
3265         * unittests/function-view-selftests.c
3266         (_initialize_function_view_selftests): Likewise.
3267         * unittests/offset-type-selftests.c
3268         (_initialize_offset_type_selftests): Likewise.
3269         * unittests/optional-selftests.c
3270         (_initialize_optional_selftests): Likewise.
3271         * unittests/scoped_restore-selftests.c
3272         (_initialize_scoped_restore_selftests): Likewise.
3273         * NEWS: Document "maintenance selftest" and "maint info
3274         selftests".
3275
3276 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3277
3278         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3279         scoped_restore.
3280
3281 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3282
3283         * mi/mi-main.c (mi_load_progress): Make uiout variable
3284         a unique_ptr.
3285
3286 2017-09-15  Pedro Alves  <palves@redhat.com>
3287
3288         * compile/compile-c-types.c (convert_enum, convert_int)
3289         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3290
3291 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3292
3293         * dwarf2read.c (copy_string): Remove.
3294         (parse_macro_definition): Replace copy_string with savestring.
3295
3296 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3297
3298         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3299         gdb_target_obs.
3300         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3301         Likewise.
3302         (i[34567]86-*-linux*): Likewise.
3303
3304 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3305
3306         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3307         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3308         <stack>: Change type to std::vector.
3309         <stack_len, stack_allocated>: Remove.
3310         <grow_stack>: Remove.
3311         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3312         (dwarf_expr_context::~dwarf_expr_context): Remove.
3313         (dwarf_expr_context::grow_stack): Remove.
3314         (dwarf_expr_context::push): Adjust.
3315         (dwarf_expr_context::pop): Adjust.
3316         (dwarf_expr_context::fetch): Adjust.
3317         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3318         (dwarf_expr_context::stack_empty_p): Adjust.
3319         (dwarf_expr_context::execute_stack_op): Adjust.
3320
3321 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3322
3323         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3324         return type to bool.
3325         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3326
3327 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3328
3329         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3330         Change type to bool.
3331         (dwarf_stack_value) <in_stack_memory>: Likewise.
3332         (dwarf_expr_context) <push_address>: Change parameter type to
3333         bool.
3334         <fetch_in_stack_memory>: Change return type to bool.
3335         <push>: Change parameter type to bool.
3336         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3337         to bool.
3338         (dwarf_expr_context::push_address): Likewise.
3339         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3340         to bool.
3341         (dwarf_expr_context::execute_stack_op): Adjust.
3342         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3343
3344 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3345
3346         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3347         (struct dwarf_expr_context) <n_pieces>: Remove.
3348         <pieces>: Change type to std::vector.
3349         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3350         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3351         pieces.
3352         (dwarf_expr_context::add_piece): Adjust.
3353         * dwarf2loc.c (struct piece_closure): Initialize fields.
3354         <n_pieces>: Remove.
3355         <pieces>: Change type to std::vector.
3356         (allocate_piece_closure): Adjust, change parameter to
3357         std::vector rvalue and std::move it to piece_closure.
3358         (rw_pieced_value): Adjust.
3359         (check_pieced_synthetic_pointer): Adjust.
3360         (indirect_synthetic_pointer): Adjust.
3361         (coerce_pieced_ref): Adjust.
3362         (free_pieced_value_closure):  Adjust.  Use delete to free
3363         piece_closure.
3364         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3365         to allocate_piece_closure.
3366         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3367
3368 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * probe.h (probe_ops_cp): Remove typedef.
3371         (DEF_VEC_P (probe_ops_cp)): Remove.
3372         (all_probe_ops): Change type to std::vector.
3373         * probe.c (info_probes_for_ops): Adjust to vector change.
3374         (probe_linespec_to_ops): Likewise.
3375         (all_probe_ops): Change type to std::vector.
3376         (_initialize_probe): Adjust to vector change.
3377         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3378         * elfread.c (elf_get_probes): Likewise.
3379         * stap-probe.c (_initialize_stap_probe): Likewise.
3380
3381 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3382
3383         * probe.h (struct bound_probe): Define constructors.
3384         * probe.c (bound_probe_s): Remove typedef.
3385         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3386         (collect_probes): Change return type to std::vector, remove
3387         cleanup.
3388         (compare_probes): Return bool, change parameter type.  Change
3389         semantic to "less than".
3390         (gen_ui_out_table_header_info): Change parameter to std::vector
3391         and update.
3392         (exists_probe_with_pops): Likewise.
3393         (info_probes_for_ops): Update to std::vector change.
3394         (enable_probes_command): Likewise.
3395         (disable_probes_command): Likewise.
3396
3397 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3398
3399         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3400         vec to std::vector.
3401         * probe.c (parse_probes_in_pspace): Update.
3402         (find_probes_in_objfile): Update.
3403         (find_probe_by_pc): Update.
3404         (collect_probes): Update.
3405         (probe_any_get_probes): Update.
3406         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3407         return type to reference to std::vector.
3408         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3409         std::vector and update.
3410         (dtrace_process_dof): Likewise.
3411         (dtrace_get_probes): Likewise.
3412         * elfread.c (elf_get_probes): Change return type to std::vector,
3413         store an std::vector in bfd_data.
3414         (probe_key_free): Update to std::vector.
3415         * stap-probe.c (handle_stap_probe): Change parameter to
3416         std::vector and update.
3417         (stap_get_probes): Likewise.
3418         * symfile-debug.c (debug_sym_get_probes): Change return type to
3419         std::vector and update.
3420
3421 2017-09-11  Tom Tromey  <tom@tromey.com>
3422
3423         * breakpoint.c (program_breakpoint_here_p): Update.
3424         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3425         from make_show_memory_breakpoints_cleanup.  Return a
3426         scoped_restore_tmpl<int>.
3427         (restore_show_memory_breakpoints): Remove.
3428         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3429         * mem-break.c (memory_validate_breakpoint): Update.
3430         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3431         (ia64_memory_remove_breakpoint): Update.
3432         (ia64_breakpoint_from_pc): Update.
3433         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3434         from make_show_memory_breakpoints_cleanup.
3435
3436 2017-09-11  Tom Tromey  <tom@tromey.com>
3437
3438         * d-namespace.c (d_lookup_symbol): Use std::string.
3439         (find_symbol_in_baseclass): Likewise.
3440
3441 2017-09-11  Tom Tromey  <tom@tromey.com>
3442
3443         * ctf.c (ctf_start): Use std::string.
3444
3445 2017-09-11  Tom Tromey  <tom@tromey.com>
3446
3447         * ada-lang.c (is_known_support_routine): Update.
3448         (ada_unhandled_exception_name_addr_from_raise): Update.
3449         * guile/scm-frame.c (gdbscm_frame_name): Update.
3450         * python/py-frame.c (frapy_name): Update.
3451         (frapy_function): Update.
3452         * stack.h (find_frame_funname): Update.
3453         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3454         (print_frame): Update.
3455
3456 2017-09-11  Tom Tromey  <tom@tromey.com>
3457
3458         * findcmd.c (put_bits): Take a gdb::byte_vector.
3459         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3460         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3461         cleanups.
3462         (find_command): Update.
3463
3464 2017-09-11  Tom Tromey  <tom@tromey.com>
3465
3466         * cli/cli-script.c (class scoped_restore_hook_in): New.
3467         (clear_hook_in_cleanup): Remove.
3468         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3469         scoped_restore_hook_in.
3470
3471 2017-09-11  Tom Tromey  <tom@tromey.com>
3472
3473         * cli/cli-script.c (restore_interp): Remove.
3474         (read_command_lines): Use scoped_restore_interp.
3475         * interps.c (scoped_restore_interp::set_temp): Rename from
3476         interp_set_temp.
3477         * interps.h (class scoped_restore_interp): New.
3478         (interp_set_temp): Remove.
3479
3480 2017-09-11  Tom Tromey  <tom@tromey.com>
3481
3482         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3483         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3484         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3485         scoped_restore.
3486         (mi_cmd_break_insert_1): Update.
3487         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3488         scoped_restore.
3489
3490 2017-09-11  Tom Tromey  <tom@tromey.com>
3491
3492         * demangle.c (demangle_command): Update.
3493         * breakpoint.c (disable_command): Update.
3494         (enable_command): Update.
3495         (find_location_by_number): Make "number" const.  Use
3496         get_number_trailer.
3497         * cli/cli-utils.c (extract_arg): Return std::string.
3498         * probe.c (parse_probe_linespec): Update.  Change types.
3499         (collect_probes): Take string arguments.
3500         (parse_probe_linespec): Likewise.
3501         (info_probes_for_ops): Update.
3502         (enable_probes_command): Update.
3503         (disable_probes_command): Update.
3504         * break-catch-sig.c (catch_signal_split_args): Update.
3505         * mi/mi-parse.c (mi_parse): Update.
3506
3507 2017-09-11  Tom Tromey  <tom@tromey.com>
3508
3509         * language.h (language_enum): Make argument const.
3510         * language.c (language_enum): Make argument const.
3511
3512 2017-09-11  Tom Tromey  <tom@tromey.com>
3513
3514         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3515         as function.
3516         (skip_to_space): Rename from skip_to_space_const.
3517         * common/common-utils.c (skip_to_space): New function.
3518         (skip_to_space): Rename from skip_to_space_const.
3519         * cli/cli-utils.h (get_number): Rename from get_number_const.
3520         (extract_arg): Rename from extract_arg_const.
3521         * cli/cli-utils.c (get_number): Rename from get_number_const.
3522         (extract_arg): Rename from extract_arg_const.
3523         (number_or_range_parser::get_number): Use ::get_number.
3524         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3525         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3526         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3527         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3528         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3529         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3530         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3531         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3532
3533 2017-09-11  Tom Tromey  <tom@tromey.com>
3534
3535         * python/python.c (do_start_initialization): Use
3536         py-event-types.def to initialize types.
3537         Define all object type structures.
3538         * python/python-internal.h: Don't declare event initialization
3539         functions.
3540         * python/py-threadevent.c (thread_event_object_type): Don't
3541         define.
3542         * python/py-stopevent.c (stop_event_object_type): Don't define.
3543         * python/py-signalevent.c (signal_event_object_type): Don't
3544         declare or define.
3545         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3546         (clear_objfiles_event_object_type): Don't declare or define.
3547         * python/py-infevents.c (inferior_call_pre_event_object_type)
3548         (inferior_call_post_event_object_type)
3549         (register_changed_event_object_type)
3550         (memory_changed_event_object_type): Don't declare or define.
3551         * python/py-inferior.c (new_thread_event_object_type)
3552         (new_inferior_event_object_type)
3553         (inferior_deleted_event_object_type): Don't declare or define.
3554         * python/py-exitedevent.c (exited_event_object_type): Don't
3555         declare or define.
3556         * python/py-evts.c (gdbpy_initialize_py_events): Use
3557         py-all-events.def.
3558         * python/py-events.h (thread_event_object_type): Don't declare.
3559         (events_object): Use py-all-events.def.
3560         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3561         py-event-types.def.
3562         * python/py-event-types.def: New file.
3563         * python/py-continueevent.c (create_continue_event_object): Don't
3564         declare or define.
3565         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3566         declare or define.
3567         * python/py-all-events.def: New file.
3568
3569 2017-09-11  Tom Tromey  <tom@tromey.com>
3570
3571         * python/py-threadevent.c (create_thread_event_object): Return
3572         gdbpy_ref.
3573         * python/py-stopevent.h (create_stop_event_object)
3574         (create_breakpoint_event_object, create_signal_event_object):
3575         Update.
3576         * python/py-stopevent.c (create_stop_event_object): Return
3577         gdbpy_ref.
3578         (emit_stop_event): Update.
3579         * python/py-signalevent.c (create_signal_event_object): Return
3580         gdbpy_ref.
3581         * python/py-infevents.c (create_inferior_call_event_object):
3582         Update.
3583         * python/py-event.h (create_event_object)
3584         (create_thread_event_object): Update.
3585         * python/py-event.c (create_event_object): Return gdbpy_ref.
3586         * python/py-continueevent.c: Return gdbpy_ref.
3587         * python/py-bpevent.c (create_breakpoint_event_object): Return
3588         gdbpy_ref.
3589
3590 2017-09-11  Tom Tromey  <tom@tromey.com>
3591
3592         PR python/15622:
3593         * NEWS: Add entry.
3594         * python/python.c (do_start_initialization): Initialize new event
3595         types.
3596         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3597         (gdbpy_initialize_inferior_deleted_event)
3598         (gdbpy_initialize_new_thread_event): Declare.
3599         * python/py-threadevent.c (create_thread_event_object): Add option
3600         "thread" parameter.
3601         * python/py-inferior.c (new_thread_event_object_type)
3602         (new_inferior_event_object_type)
3603         (inferior_deleted_event_object_type): Declare.
3604         (python_new_inferior, python_inferior_deleted): New functions.
3605         (add_thread_object): Emit new_thread event.
3606         (gdbpy_initialize_inferior): Attach new functions to corresponding
3607         observers.
3608         (new_thread, new_inferior, inferior_deleted): Define new event
3609         types.
3610         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3611         registries.
3612         * python/py-events.h (events_object) <new_inferior,
3613         inferior_deleted, new_thread>: New fields.
3614         * python/py-event.h (create_thread_event_breakpoint): Add optional
3615         "thread" parameter.
3616
3617 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3618
3619         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3620         check current_ui instead.
3621         (internal_vproblem): Likewise.
3622
3623 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3624
3625         * thread.c (print_thread_info_1): Remove unnecessary calls to
3626         uiout->is_mi_like_p.
3627
3628 2017-09-09  Tom Tromey  <tom@tromey.com>
3629
3630         * namespace.h (add_using_directive): Update.
3631         * namespace.c (add_using_directive): Change type of excludes to
3632         std::vector.
3633         * dwarf2read.c (read_import_statement): Use std::vector.
3634         (read_namespace): Update.
3635         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3636
3637 2017-09-09  Tom Tromey  <tom@tromey.com>
3638
3639         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3640
3641 2017-09-09  Tom Tromey  <tom@tromey.com>
3642
3643         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3644
3645 2017-09-09  Tom Tromey  <tom@tromey.com>
3646
3647         * stack.c (func_command): Use gdb::def_vector.
3648
3649 2017-09-09  Tom Tromey  <tom@tromey.com>
3650
3651         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3652         ui_out_emit_list, ui_out_emit_tuple.
3653         (mi_cmd_var_update): Likewise.
3654
3655 2017-09-09  Tom Tromey  <tom@tromey.com>
3656
3657         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3658         ui_out_redirect_pop.
3659         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3660         ui_out_redirect_pop.
3661         * utils.c (do_ui_out_redirect_pop)
3662         (make_cleanup_ui_out_redirect_pop): Remove.
3663         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3664         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3665         * ui-out.h (ui_out_redirect_pop): New class.
3666
3667 2017-09-09  Tom Tromey  <tom@tromey.com>
3668
3669         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3670         (list_available_thread_groups, mi_cmd_list_thread_groups)
3671         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3672         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3673         Likewise.
3674
3675 2017-09-09  Tom Tromey  <tom@tromey.com>
3676
3677         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3678         ui_out_emit_tuple.
3679
3680 2017-09-09  Tom Tromey  <tom@tromey.com>
3681
3682         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3683         * stack.c (print_frame): Use ui_out_emit_tuple.
3684         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3685         (info_spu_mailbox_command, info_spu_dma_command)
3686         (info_spu_proxydma_command): Likewise.
3687         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3688         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3689         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3690         ui_out_emit_tuple.
3691         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3692
3693 2017-09-09  Tom Tromey  <tom@tromey.com>
3694
3695         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3696         (class ui_out_emit_table): Update comment.
3697         * ui-out.c (do_cleanup_table_end)
3698         (make_cleanup_ui_out_table_begin_end): Remove.
3699         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3700         (info_spu_dma_cmdlist): Likewise.
3701         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3702         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3703         ui_out_emit_table.
3704
3705 2017-09-09  Tom Tromey  <tom@tromey.com>
3706
3707         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3708         ui_out_emit_list, gdb::optional.
3709
3710 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3711
3712         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3713         prototype.
3714         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3715         prototype.
3716         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3717         prototype.
3718         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3719         * ada-exp.y: Remove _initialize_ada_exp prototype.
3720         * ada-lang.c: Remove _initialize_ada_language prototype.
3721         * ada-tasks.c: Remove _initialize_tasks prototype.
3722         * addrmap.c: Remove _initialize_addrmap prototype.
3723         * agent.c: Remove _initialize_agent prototype.
3724         * aix-thread.c: Remove _initialize_aix_thread prototype.
3725         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3726         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3727         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3728         prototype.
3729         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3730         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3731         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3732         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3733         prototype.
3734         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3735         prototype.
3736         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3737         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3738         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3739         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3740         prototype.
3741         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3742         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3743         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3744         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3745         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3746         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3747         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3748         prototype.
3749         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3750         prototype.
3751         * annotate.c: Remove _initialize_annotate prototype.
3752         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3753         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3754         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3755         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3756         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3757         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3758         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3759         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3760         prototype.
3761         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3762         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3763         * auto-load.c: Remove _initialize_auto_load prototype.
3764         * auxv.c: Remove _initialize_auxv prototype.
3765         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3766         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3767         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3768         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3769         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3770         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3771         prototype.
3772         * break-catch-throw.c: Remove _initialize_break_catch_throw
3773         prototype.
3774         * breakpoint.c: Remove _initialize_breakpoint prototype.
3775         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3776         * btrace.c: Remove _initialize_btrace prototype.
3777         * charset.c: Remove _initialize_charset prototype.
3778         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3779         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3780         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3781         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3782         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3783         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3784         * coffread.c: Remove _initialize_coffread prototype.
3785         * compile/compile.c: Remove _initialize_compile prototype.
3786         * complaints.c: Remove _initialize_complaints prototype.
3787         * completer.c: Remove _initialize_completer prototype.
3788         * copying.awk: Remove _initialize_copying prototype.
3789         * copying.c: Regenerate.
3790         * core-regset.c: Remove _initialize_core_regset prototype.
3791         * corefile.c: Remove _initialize_core prototype.
3792         * corelow.c: Remove _initialize_corelow prototype.
3793         * cp-abi.c: Remove _initialize_cp_abi prototype.
3794         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3795         * cp-support.c: Remove _initialize_cp_support prototype.
3796         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3797         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3798         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3799         * ctf.c: Remove _initialize_ctf prototype.
3800         * d-lang.c: Remove _initialize_d_language prototype.
3801         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3802         prototype.
3803         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3804         * dbxread.c: Remove _initialize_dbxread prototype.
3805         * dcache.c: Remove _initialize_dcache prototype.
3806         * demangle.c: Remove _initialize_demangler prototype.
3807         * disasm-selftests.c: Remove _initialize_disasm_selftests
3808         prototype.
3809         * disasm.c: Remove _initialize_disasm prototype.
3810         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3811         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3812         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3813         prototype.
3814         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3815         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3816         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3817         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3818         * elfread.c: Remove _initialize_elfread prototype.
3819         * exec.c: Remove _initialize_exec prototype.
3820         * extension.c: Remove _initialize_extension prototype.
3821         * f-lang.c: Remove _initialize_f_language prototype.
3822         * f-valprint.c: Remove _initialize_f_valprint prototype.
3823         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3824         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3825         * filesystem.c: Remove _initialize_filesystem prototype.
3826         * findcmd.c: Remove _initialize_mem_search prototype.
3827         * fork-child.c: Remove _initialize_fork_child prototype.
3828         * frame-base.c: Remove _initialize_frame_base prototype.
3829         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3830         * frame.c: Remove _initialize_frame prototype.
3831         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3832         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3833         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3834         * gcore.c: Remove _initialize_gcore prototype.
3835         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3836         * gdbarch.c: Regenerate.
3837         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3838         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3839         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3840         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3841         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3842         * go-lang.c: Remove _initialize_go_language prototype.
3843         * go32-nat.c: Remove _initialize_go32_nat prototype.
3844         * guile/guile.c: Remove _initialize_guile prototype.
3845         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3846         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3847         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3848         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3849         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3850         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3851         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3852         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3853         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3854         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3855         prototype.
3856         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3857         prototype.
3858         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3859         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3860         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3861         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3862         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3863         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3864         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3865         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3866         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3867         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3868         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3869         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3870         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3871         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3872         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3873         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3874         prototype.
3875         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3876         prototype.
3877         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3878         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3879         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3880         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3881         * infcall.c: Remove _initialize_infcall prototype.
3882         * infcmd.c: Remove _initialize_infcmd prototype.
3883         * inferior.c: Remove _initialize_inferiors prototype.
3884         * inflow.c: Remove _initialize_inflow prototype.
3885         * infrun.c: Remove _initialize_infrun prototype.
3886         * interps.c: Remove _initialize_interpreter prototype.
3887         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3888         * jit.c: Remove _initialize_jit prototype.
3889         * language.c: Remove _initialize_language prototype.
3890         * linux-fork.c: Remove _initialize_linux_fork prototype.
3891         * linux-nat.c: Remove _initialize_linux_nat prototype.
3892         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3893         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3894         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3895         * m2-lang.c: Remove _initialize_m2_language prototype.
3896         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3897         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3898         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3899         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3900         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3901         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3902         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3903         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3904         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3905         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3906         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3907         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3908         * machoread.c: Remove _initialize_machoread prototype.
3909         * macrocmd.c: Remove _initialize_macrocmd prototype.
3910         * macroscope.c: Remove _initialize_macroscope prototype.
3911         * maint.c: Remove _initialize_maint_cmds prototype.
3912         * mdebugread.c: Remove _initialize_mdebugread prototype.
3913         * memattr.c: Remove _initialize_mem prototype.
3914         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3915         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3916         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3917         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3918         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3919         * microblaze-linux-tdep.c: Remove
3920         _initialize_microblaze_linux_tdep prototype.
3921         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3922         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3923         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3924         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3925         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3926         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3927         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3928         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3929         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3930         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3931         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3932         prototype.
3933         * mipsread.c: Remove _initialize_mipsread prototype.
3934         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3935         prototype.
3936         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3937         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3938         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3939         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3940         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3941         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3942         prototype.
3943         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3944         * nto-procfs.c: Remove _initialize_procfs prototype.
3945         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3946         * objc-lang.c: Remove _initialize_objc_language prototype.
3947         * objfiles.c: Remove _initialize_objfiles prototype.
3948         * observer.c: Remove observer_test_first_notification_function,
3949         observer_test_second_notification_function,
3950         observer_test_third_notification_function, and
3951         _initialize_observer prototypes.
3952         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3953         * osabi.c: Remove _initialize_gdb_osabi prototype.
3954         * osdata.c: Remove _initialize_osdata prototype.
3955         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3956         * parse.c: Remove _initialize_parse prototype.
3957         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3958         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3959         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3960         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3961         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3962         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3963         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3964         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3965         * printcmd.c: Remove _initialize_printcmd prototype.
3966         * probe.c: Remove _initialize_probe prototype.
3967         * proc-api.c: Remove _initialize_proc_api prototype.
3968         * proc-events.c: Remove _initialize_proc_events prototype.
3969         * proc-service.c: Remove _initialize_proc_service prototype.
3970         * procfs.c: Remove _initialize_procfs prototype.
3971         * psymtab.c: Remove _initialize_psymtab prototype.
3972         * python/python.c: Remove _initialize_python prototype.
3973         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3974         * record-btrace.c: Remove _initialize_record_btrace prototype.
3975         * record-full.c: Remove _initialize_record_full prototype.
3976         * record.c: Remove _initialize_record prototype.
3977         * regcache.c: Remove _initialize_regcache prototype.
3978         * reggroups.c: Remove _initialize_reggroup prototype.
3979         * remote-notif.c: Remove _initialize_notif prototype.
3980         * remote-sim.c: Remove _initialize_remote_sim prototype.
3981         * remote.c: Remove _initialize_remote prototype.
3982         * reverse.c: Remove _initialize_reverse prototype.
3983         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3984         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3985         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3986         prototype.
3987         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3988         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3989         * rust-exp.y: Remove _initialize_rust_exp prototype.
3990         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3991         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3992         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3993         * score-tdep.c: Remove _initialize_score_tdep prototype.
3994         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3995         prototype.
3996         * ser-go32.c: Remove _initialize_ser_dos prototype.
3997         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3998         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3999         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4000         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4001         * serial.c: Remove _initialize_serial prototype.
4002         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4003         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4004         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4005         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4006         * skip.c: Remove _initialize_step_skip prototype.
4007         * sol-thread.c: Remove _initialize_sol_thread prototype.
4008         * solib-aix.c: Remove _initialize_solib_aix prototype.
4009         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4010         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4011         * solib-frv.c: Remove _initialize_frv_solib prototype.
4012         * solib-spu.c: Remove _initialize_spu_solib prototype.
4013         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4014         * solib-target.c: Remove _initialize_solib_target prototype.
4015         * solib.c: Remove _initialize_solib prototype.
4016         * source.c: Remove _initialize_source prototype.
4017         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4018         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4019         prototype.
4020         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4021         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4022         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4023         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4024         prototype.
4025         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4026         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4027         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4028         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4029         prototype.
4030         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4031         prototype.
4032         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4033         prototype.
4034         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4035         prototype.
4036         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4037         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4038         prototype.
4039         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4040         prototype.
4041         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4042         prototype.
4043         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4044         prototype.
4045         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4046         prototype.
4047         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4048         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4049         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4050         * stabsread.c: Remove _initialize_stabsread prototype.
4051         * stack.c: Remove _initialize_stack prototype.
4052         * stap-probe.c: Remove _initialize_stap_probe prototype.
4053         * std-regs.c: Remove _initialize_frame_reg prototype.
4054         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4055         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4056         * symfile.c: Remove _initialize_symfile prototype.
4057         * symmisc.c: Remove _initialize_symmisc prototype.
4058         * symtab.c: Remove _initialize_symtab prototype.
4059         * target-dcache.c: Remove _initialize_target_dcache prototype.
4060         * target-descriptions.c: Remove _initialize_target_descriptions
4061         prototype.
4062         * thread.c: Remove _initialize_thread prototype.
4063         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4064         prototype.
4065         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4066         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4067         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4068         prototype.
4069         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4070         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4071         * tracefile.c: Remove _initialize_tracefile prototype.
4072         * tracepoint.c: Remove _initialize_tracepoint prototype.
4073         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4074         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4075         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4076         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4077         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4078         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4079         * tui/tui.c: Remove _initialize_tui prototype.
4080         * typeprint.c: Remove _initialize_typeprint prototype.
4081         * user-regs.c: Remove _initialize_user_regs prototype.
4082         * utils.c: Remove _initialize_utils prototype.
4083         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4084         * valarith.c: Remove _initialize_valarith prototype.
4085         * valops.c: Remove _initialize_valops prototype.
4086         * valprint.c: Remove _initialize_valprint prototype.
4087         * value.c: Remove _initialize_values prototype.
4088         * varobj.c: Remove _initialize_varobj prototype.
4089         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4090         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4091         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4092         * windows-nat.c: Remove _initialize_windows_nat,
4093         _initialize_check_for_gdb_ini, and _initialize_loadable
4094         prototypes.
4095         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4096         * xcoffread.c: Remove _initialize_xcoffread prototype.
4097         * xml-support.c: Remove _initialize_xml_support prototype.
4098         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4099         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4100         prototype.
4101         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4102         prototype.
4103         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4104
4105 2017-09-08  Keith Seitz  <keiths@redhat.com>
4106
4107         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4108         field.
4109
4110 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4111
4112         * f-valprint.c (f_val_print): Remove check for one byte
4113         sized integers. Remove printing of character type.
4114
4115 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4116             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4117             Bernhard Heckel  <bernhard.heckel@intel.com>
4118
4119         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4120         to maintain proper indentation when printing pointers/refs.
4121
4122 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4123
4124         GDB 8.0.1 released.
4125
4126 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4127
4128         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4129
4130 2017-09-05  Tom Tromey  <tom@tromey.com>
4131
4132         * parse.c (funcall_chain): Now a std::vector.
4133         (start_arglist, end_arglist): Simplify.
4134         (free_funcalls): Remove.
4135         (parse_exp_in_context_1): Remove cleanup.
4136
4137 2017-09-05  Tom Tromey  <tom@tromey.com>
4138
4139         * go-exp.y (go_parse): Don't create a cleanup.
4140
4141 2017-09-05  Tom Tromey  <tom@tromey.com>
4142
4143         * d-exp.y (PrimaryExpression): Use std::string.
4144         (d_parse): Don't create a cleanup.
4145
4146 2017-09-05  Tom Tromey  <tom@tromey.com>
4147
4148         * utils.c (do_clear_parser_state): Remove.
4149         (make_cleanup_clear_parser_state): Remove.
4150         * p-exp.y (pascal_parse): Use scoped_restore.
4151         * m2-exp.y (m2_parse): Use scoped_restore.
4152         * f-exp.y (f_parse): Use scoped_restore.
4153         * d-exp.y (d_parse): Use scoped_restore.
4154         * c-exp.y (c_parse): Use scoped_restore.
4155         * ada-exp.y (ada_parse): Use scoped_restore.
4156         * utils.h (make_cleanup_clear_parser_state): Remove.
4157
4158 2017-09-06  Keith Seitz  <keiths@redhat.com>
4159
4160         * dwarf2read.c (dw2_linkage_name_attr): New function.
4161         (dw2_linkage_name): New function.
4162         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4163         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4164         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4165
4166 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4167
4168         * config/djgpp/djconfig.sh: Correct shell portability issue.
4169
4170 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4171
4172         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4173
4174 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4175
4176         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4177         * NEWS: Mention new FreeBSD/mips native configuration.
4178         * configure.host: Add aarch64*-*-freebsd*.
4179         * configure.nat: Likewise.
4180         * aarch64-fbsd-nat.c: New file.
4181
4182 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4183
4184         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4185         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4186         * NEWS: Mention new FreeBSD/aarch64 target.
4187         * configure.tgt: Add aarch64*-*-freebsd*.
4188         * aarch64-fbsd-tdep.c: New file.
4189         * aarch64-fbsd-tdep.h: New file.
4190
4191 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4192
4193         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4194
4195 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4196
4197         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4198         of TLS symbols.
4199
4200 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4201
4202         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4203         call.
4204
4205 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4206
4207         * infrun.c (follow_exec): Call add_thread after
4208         target_find_description.
4209
4210 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4211
4212         * infrun.c (handle_inferior_event_1): When exec'ing, read
4213         stop_pc after follow_exec.
4214
4215 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4216
4217         * remote.c (process_g_packet): Update error message.
4218
4219 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4220
4221         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4222         targets.
4223
4224 2017-09-05  Pedro Alves  <palves@redhat.com>
4225
4226         * eval.c (eval_call, evaluate_funcall): New functions, factored
4227         out from ...
4228         (evaluate_subexp_standard): ... this.
4229
4230 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4231
4232         * amd64-tdep.c (amd64_target_description): Create target
4233         descriptions.
4234         (_initialize_amd64_tdep): Don't call functions
4235         initialize_tdesc_amd64_*.  Add self tests.
4236         * arch/amd64.c (amd64_create_target_description): Add parameter
4237         is_linux.  Call set_tdesc_osabi if is_linux is true.
4238         * arch/amd64.h (amd64_create_target_description): Update the
4239         declaration.
4240         * arch/i386.c (i386_create_target_description): Add parameter
4241         is_linux.  Call set_tdesc_osabi if is_linux is true.
4242         * arch/i386.h (i386_create_target_description): Update
4243         declaration.
4244         * configure.tgt: Add i386.o to gdb_target_obs.
4245         * features/Makefile (XMLTOC): Remove i386/*.xml.
4246         * features/i386/amd64-avx-avx512.c: Remove.
4247         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4248         * features/i386/amd64-avx-mpx.c: Remove.
4249         * features/i386/amd64-avx.c: Remove.
4250         * features/i386/amd64-mpx.c: Remove.
4251         * features/i386/amd64.c: Remove.
4252         * features/i386/i386-avx-avx512.c: Remove.
4253         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4254         * features/i386/i386-avx-mpx.c: Remove.
4255         * features/i386/i386-avx.c: Remove.
4256         * features/i386/i386-mmx.c: Remove.
4257         * features/i386/i386-mpx.c: Remove.
4258         * features/i386/i386.c: Remove.
4259         * i386-tdep.c: Don't include features/i386/i386*.c., include
4260         target-descriptions.h and arch/i386.h.
4261         (i386_target_description): Create target descriptions.
4262         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4263         functions.  Do self tests.
4264
4265 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4266
4267         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4268         * features/i386/amd64-avx-avx512-linux.c: Removed.
4269         * features/i386/amd64-avx-linux.c: Removed.
4270         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4271         * features/i386/amd64-avx-mpx-linux.c: Removed.
4272         * features/i386/amd64-linux.c: Removed.
4273         * features/i386/amd64-mpx-linux.c: Removed.
4274         * features/i386/x32-avx-avx512-linux.c: Removed.
4275         * features/i386/x32-avx-linux.c: Removed.
4276         * features/i386/x32-linux.c: Removed.
4277
4278 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4279
4280         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4281         features/i386/*.c.
4282         (amd64_linux_read_description): Call
4283         amd64_create_target_description.
4284         * arch/amd64.c: New file.
4285         * arch/amd64.h: New file.
4286         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4287         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4288
4289 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4290
4291         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4292         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4293         (amd64_linux_read_description): Create target descriptions.
4294         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4295         functions.  Add unit tests.
4296         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4297         x32-core.xml.
4298         * features/i386/64bit-avx.c: Generated.
4299         * features/i386/64bit-avx512.c: Generated.
4300         * features/i386/64bit-core.c: Generated.
4301         * features/i386/64bit-linux.c: Generated.
4302         * features/i386/64bit-mpx.c: Generated.
4303         * features/i386/64bit-pkeys.c: Generated.
4304         * features/i386/64bit-segments.c: Generated.
4305         * features/i386/64bit-sse.c: Generated.
4306         * features/i386/x32-core.c: Generated.
4307         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4308         c files for amd64-linux and x32-linux.
4309
4310 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4311
4312         * amd64-linux-tdep.c (amd64_linux_read_description): New
4313         function.
4314         (amd64_linux_core_read_description): Call
4315         amd64_linux_read_description.
4316         (amd64_linux_init_abi): Likewise.
4317         (amd64_x32_linux_init_abi): Likewise.
4318         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4319         * x86-linux-nat.c (x86_linux_read_description): Call
4320         amd64_linux_read_description.
4321
4322 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4323
4324         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4325         comments.
4326
4327 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4328
4329         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4330         * features/i386/i386-avx-avx512-linux.c: Remove.
4331         * features/i386/i386-avx-linux.c: Remove.
4332         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4333         * features/i386/i386-avx-mpx-linux.c: Remove.
4334         * features/i386/i386-linux.c: Remove.
4335         * features/i386/i386-mmx-linux.c: Remove.
4336         * features/i386/i386-mpx-linux.c: Remove.
4337
4338 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4339
4340         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4341         (SFILES): Add arch/i386.c.
4342         (HFILES_NO_SRCDIR): Add arch/i386.h.
4343         * arch/i386.c: New file.
4344         * arch/i386.h: New file.
4345         * arch/tdesc.h (allocate_target_description): Declare.
4346         (set_tdesc_architecture): Declare.
4347         (set_tdesc_osabi): Declare.
4348         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4349         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4350         include arch/i386.h.
4351         (i386_linux_read_description): Remove code and call
4352         i386_create_target_description.
4353         (set_tdesc_architecture): New function.
4354         (set_tdesc_osabi): New function.
4355         * target-descriptions.h (allocate_target_description): Remove.
4356
4357 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4358
4359         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4360         * target-descriptions.c (tdesc_create_feature): Likewise, and
4361         adjust code.
4362         * features/i386/32bit-avx.c: Re-generated.
4363         * features/i386/32bit-avx512.c: Re-generated.
4364         * features/i386/32bit-core.c: Re-generated.
4365         * features/i386/32bit-linux.c: Re-generated.
4366         * features/i386/32bit-mpx.c: Re-generated.
4367         * features/i386/32bit-pkeys.c: Re-generated.
4368         * features/i386/32bit-sse.c: Re-generated.
4369
4370 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4371
4372         * regformats/regdef.h (struct reg): Override operator == and !=.
4373
4374 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4375
4376         * arch/tdesc.h: New file.
4377         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4378         * target-descriptions.c: Update comments.
4379         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4380         declarations.
4381         * features/i386/32bit-avx.c: Re-generated.
4382         * features/i386/32bit-avx512.c: Re-generated.
4383         * features/i386/32bit-core.c: Re-generated.
4384         * features/i386/32bit-linux.c: Re-generated.
4385         * features/i386/32bit-mpx.c: Re-generated.
4386         * features/i386/32bit-pkeys.c: Re-generated.
4387         * features/i386/32bit-sse.c: Re-generated.
4388
4389 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4390
4391         * regformats/regdat.sh: Update generated code.
4392
4393 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4394
4395         * regformats/regdat.sh: Adjust code order.
4396
4397 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4398
4399         * expprint.c (dump_subexp_body_standard): Use constant format
4400         string in fprintf_filtered call.
4401
4402 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4403
4404         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4405         NetBSD/i386.
4406         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4407
4408 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4409
4410         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4411
4412 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4413
4414         * bsd-kvm.o: Define _KMEMUSER.
4415         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4416         * configure: Regenerate.
4417
4418 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4419
4420         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4421         * i386-fbsd-nat.c: Likewise.
4422
4423 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4424
4425         * unittests/array-view-selftests.c: Add include of <array>.
4426
4427 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4428
4429         * spu-tdep.c (flush_ea_cache): Add missing argument to
4430         call_function_by_hand.
4431
4432 2017-09-04  Pedro Alves  <palves@redhat.com>
4433
4434         * NEWS (Safer support for debugging with no debug info): New.
4435
4436 2017-09-04  Pedro Alves  <palves@redhat.com>
4437
4438         * c-exp.y (function_method, function_method_void): Add current
4439         instance flags to TYPE_INSTANCE.
4440         * dwarf2read.c (check_modifier): New.
4441         (compute_delayed_physnames): Assert that only C++ adds delayed
4442         physnames.  Mark fn_fields as const/volatile depending on
4443         physname.
4444         * eval.c (make_params): New type_instance_flags parameter.  Use
4445         it as the new type's instance flags.
4446         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4447         flags element and pass it to make_params.
4448         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4449         instance flags element.
4450         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4451         * gdbtypes.h: Include "enum-flags.h".
4452         (type_instance_flags): New enum-flags type.
4453         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4454         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4455         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4456         (follow_type_instance_flags): New function.
4457         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4458         * parser-defs.h (follow_type_instance_flags): Declare.
4459         * valops.c (value_struct_elt_for_reference): const/volatile must
4460         match too.
4461
4462 2017-09-04  Pedro Alves  <palves@redhat.com>
4463
4464         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4465         function/method scopes; lookup the nested name as a function local
4466         static variable.
4467
4468 2017-09-04  Pedro Alves  <palves@redhat.com>
4469
4470         (%type <voidval>): Add function_method.
4471         * c-exp.y (exp): New production for calls with no arguments.
4472         (function_method, function_method_void_or_typelist): New
4473         productions.
4474         (exp): New production for "method()::static_var".
4475         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4476         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4477         Handle OP_FUNC_STATIC_VAR.
4478         * parse.c (operator_length_standard):
4479         Handle OP_FUNC_STATIC_VAR.
4480
4481 2017-09-04  Pedro Alves  <palves@redhat.com>
4482
4483         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4484         handling.
4485         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4486         Ditto.
4487         * parse.c (operator_length_standard, operator_check_standard):
4488         Ditto.
4489         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4490
4491 2017-09-04  Pedro Alves  <palves@redhat.com>
4492
4493         * ax-gdb.c: Include "typeprint.h".
4494         (gen_expr_for_cast): New function.
4495         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4496         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4497         type is unknown.
4498         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4499         nodebug_data_symbol.
4500         * eval.c: Include "typeprint.h".
4501         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4502         Error out if symbol has unknown type.
4503         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4504         evaluate_subexp_for_cast.
4505         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4506         OP_VAR_MSYM_VALUE.
4507         (evaluate_subexp_for_cast): New function.
4508         * gdbtypes.c (init_nodebug_var_type): New function.
4509         (objfile_type): Use it to initialize types of variables with no
4510         debug info.
4511         * typeprint.c (error_unknown_type): New.
4512         * typeprint.h (error_unknown_type): New declaration.
4513         * compile/compile-c-types.c (convert_type_basic): Handle
4514         TYPE_CODE_ERROR; warn and fallback to int for variables with
4515         unknown type.
4516
4517 2017-09-04  Pedro Alves  <palves@redhat.com>
4518
4519         * eval.c (evaluate_var_value): New function, factored out from ...
4520         (evaluate_subexp_standard): ... here.
4521
4522 2017-09-04  Pedro Alves  <palves@redhat.com>
4523
4524         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4525         Remove useless assignments to 'op'.
4526
4527 2017-09-04  Pedro Alves  <palves@redhat.com>
4528
4529         * eval.c (eval_skip_value): New function.
4530         (evaluate_subexp_standard): Use it.
4531
4532 2017-09-04  Pedro Alves  <palves@redhat.com>
4533
4534         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4535         function name from symbol/minsym and pass it to
4536         error_call_unknown_return_type.
4537
4538 2017-09-04  Pedro Alves  <palves@redhat.com>
4539
4540         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4541         * ax-gdb.c (gen_msym_var_ref): New function.
4542         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4543         * eval.c (evaluate_var_msym_value): New function.
4544         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4545         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4546         to call_function_by_hand.
4547         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4548         Handle OP_VAR_MSYM_VALUE.
4549         (union exp_element) <msymbol>: New field.
4550         * minsyms.h (struct type): Forward declare.
4551         (find_minsym_type_and_address): Declare.
4552         * parse.c (write_exp_elt_msym): New function.
4553         (write_exp_msymbol): Delete, refactored as ...
4554         (find_minsym_type_and_address): ... this new function.
4555         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4556         (operator_length_standard, operator_check_standard): Handle
4557         OP_VAR_MSYM_VALUE.
4558         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4559
4560 2017-09-04  Pedro Alves  <palves@redhat.com>
4561
4562         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4563         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4564         unknown.
4565         * ada-typeprint.c (print_func_type): Handle functions with unknown
4566         return type.
4567         * c-typeprint.c (c_type_print_base): Handle functions and methods
4568         with unknown return type.
4569         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4570         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4571         * compile/compile-c-types.c: Include "objfiles.h".
4572         (convert_func): For functions with unknown return type, warn and
4573         default to int.
4574         * compile/compile-object-run.c (compile_object_run): Adjust call
4575         to call_function_by_hand_dummy.
4576         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4577         call_function_by_hand.
4578         * eval.c (evaluate_subexp_standard): Adjust calls to
4579         call_function_by_hand.  Handle functions and methods with unknown
4580         return type.  Pass expect_type to call_function_by_hand.
4581         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4582         return type.
4583         * gcore.c (call_target_sbrk): Adjust call to
4584         call_function_by_hand.
4585         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4586         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4587         an integer address type instead of nodebug.
4588         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4589         call_function_by_hand.
4590         * infcall.c (error_call_unknown_return_type): New function.
4591         (call_function_by_hand): New "default_return_type" parameter.
4592         Pass it down.
4593         (call_function_by_hand_dummy): New "default_return_type"
4594         parameter.  Use it instead of defaulting to int.  If there's no
4595         default and the return type is unknown, throw an error.  If
4596         there's a default return type, and the called function has no
4597         debug info, then assume the function is prototyped.
4598         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4599         New "default_return_type" parameter.
4600         (error_call_unknown_return_type): New declaration.
4601         * linux-fork.c (call_lseek): Cast return type of lseek.
4602         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4603         call_function_by_hand.
4604         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4605         calls to call_function_by_hand.
4606         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4607         return type.
4608         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4609         (value_nsstring, print_object_command): Adjust calls to
4610         call_function_by_hand.
4611         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4612         functions with unknown return type.
4613         (pascal_type_print_func_varspec_suffix): New function.
4614         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4615         TYPE_CODE_METHOD>: Use it.
4616         * python/py-value.c (valpy_call): Adjust call to
4617         call_function_by_hand.
4618         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4619         call_function_by_hand.
4620         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4621         call_function_by_hand.
4622         * valops.c (value_allocate_space_in_inferior): Adjust call to
4623         call_function_by_hand.
4624         * typeprint.c (type_print_unknown_return_type): New function.
4625         * typeprint.h (type_print_unknown_return_type): New declaration.
4626
4627 2017-09-04  Pedro Alves  <palves@redhat.com>
4628
4629         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4630         types with more than one parameter as prototyped.
4631
4632 2017-09-04  Pedro Alves  <palves@redhat.com>
4633
4634         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4635         (disassemble_command): Use gdb_disassembly_flags instead of bare
4636         int.
4637         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4638         (dump_insns, do_mixed_source_and_assembly_deprecated)
4639         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4640         Use gdb_disassembly_flags instead of bare int.
4641         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4642         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4643         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4644         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4645         (enum gdb_disassembly_flag): ... values of this new enumeration.
4646         (gdb_disassembly_flags): Define.
4647         (gdb_disassembly)
4648         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4649         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4650         gdb_disassembly_flags instead of bare int.
4651         * record-btrace.c (btrace_insn_history)
4652         (record_btrace_insn_history, record_btrace_insn_history_range)
4653         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4654         instead of bare int.
4655         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4656         Use gdb_disassembly_flags instead of bare int.
4657         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4658         Define.
4659         * target-delegates.c: Regenerate.
4660         * target.c (target_insn_history, target_insn_history_from)
4661         (target_insn_history_range): Use gdb_disassembly_flags instead of
4662         bare int.
4663         * target.h: Include "disasm.h".
4664         (struct target_ops) <to_insn_history, to_insn_history_from,
4665         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4666         int.
4667         (target_insn_history, target_insn_history_from)
4668         (target_insn_history_range): Use gdb_disassembly_flags instead of
4669         bare int.
4670
4671 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4672
4673         * cli/cli-script.c (build_command_line): For if/while commands,
4674         check whether args is empty.
4675
4676 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4677
4678         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4679         (enum command_control_type): Likewise.
4680         (struct command_line): Likewise.
4681         (free_command_lines): Likewise.
4682         (struct command_lines_deleter): Likewise.
4683         (command_line_up): Likewise.
4684         (read_command_lines): Likewise.
4685         (read_command_lines_1): Likewise.
4686         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4687         (enum command_control_type): Likewise.
4688         (struct command_line): Likewise.
4689         (free_command_lines): Likewise.
4690         (struct command_lines_deleter): Likewise.
4691         (command_line_up): Likewise.
4692         (read_command_lines): Likewise.
4693         (read_command_lines_1): Likewise.
4694         * breakpoint.h: Include cli/cli-script.h.
4695         * extension-priv.h: Likewise.
4696         * gdbcmd.h: Likewise.
4697
4698 2017-09-04  Pedro Alves  <palves@redhat.com>
4699
4700         * ada-lang.c (is_known_support_routine): Move sal declaration to
4701         where it is initialized.
4702         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4703         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4704         (clear_command, update_static_tracepoint): Remove init_sal
4705         references.  Move declarations closer to initializations.
4706         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4707         initializations.
4708         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4709         references.  Move sal declarations closer to initializations.
4710         * frame.c (find_frame_sal): Return a symtab_and_line via function
4711         return instead of output parameter.  Remove init_sal references.
4712         * frame.h (find_frame_sal): Return a symtab_and_line via function
4713         return instead of output parameter.
4714         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4715         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4716         instead of memset.
4717         (gdbscm_find_pc_line): Remove init_sal reference.
4718         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4719         references.  Move declarations closer to initializations.
4720         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4721         initializations.
4722         (finish_backward): Remove init_sal references.  Move declarations
4723         closer to initializations.
4724         * infrun.c (process_event_stop_test, handle_step_into_function)
4725         (insert_hp_step_resume_breakpoint_at_frame)
4726         (insert_step_resume_breakpoint_at_caller): Likewise.
4727         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4728         (symbol_to_sal): Likewise.
4729         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4730         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4731         to its initialization.
4732         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4733         init_sal references.  Move declarations closer to initializations.
4734         * source.c (get_current_source_symtab_and_line): Remove brace
4735         initialization.
4736         (set_current_source_symtab_and_line): Now takes the sal by const
4737         reference.  Remove brace initialization.
4738         (line_info): Remove init_sal reference.
4739         * source.h (set_current_source_symtab_and_line): Now takes a
4740         symtab_and_line via const reference.
4741         * stack.c (set_current_sal_from_frame): Adjust.
4742         (print_frame_info): Adjust.
4743         (get_last_displayed_sal): Return the sal via function return
4744         instead of via output parameter.  Simplify.
4745         (frame_info): Adjust.
4746         * stack.h (get_last_displayed_sal): Return the sal via function
4747         return instead of via output parameter.
4748         * symtab.c (init_sal): Delete.
4749         (find_pc_sect_line): Remove init_sal references.  Move
4750         declarations closer to initializations.
4751         (find_function_start_sal): Remove init_sal references.  Move
4752         declarations closer to initializations.
4753         * symtab.h (struct symtab_and_line): In-class initialize all
4754         fields.
4755         * tracepoint.c (set_traceframe_context)
4756         (print_one_static_tracepoint_marker): Remove init_sal references.
4757         Move declarations closer to initializations.
4758         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4759         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4760         declarations closer to initializations.
4761         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4762         init_sal references.  Adjust.
4763
4764 2017-09-04  Pedro Alves  <palves@redhat.com>
4765
4766         * ax-gdb.c (agent_command_1): Use range-for.
4767         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4768         * breakpoint.c: Include "common/array-view.h".
4769         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4770         parameter from struct symtabs_and_lines to
4771         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4772         (breakpoint_sals_to_pc): Change sals parameter from struct
4773         symtabs_and_lines to std::vector reference.
4774         (check_fast_tracepoint_sals): Change sals parameter from struct
4775         symtabs_and_lines to std::array_view.  Use range-for.
4776         (decode_static_tracepoint_spec): Return a std::vector instead of
4777         symtabs_and_lines.  Update.
4778         (create_breakpoint): Update.
4779         (break_range_command, until_break_command, clear_command): Update.
4780         (base_breakpoint_decode_location, bkpt_decode_location)
4781         (bkpt_probe_create_sals_from_location)
4782         (bkpt_probe_decode_location, tracepoint_decode_location)
4783         (tracepoint_probe_decode_location)
4784         (strace_marker_create_sals_from_location): Return a std::vector
4785         instead of symtabs_and_lines.
4786         (strace_marker_create_breakpoints_sal): Update.
4787         (strace_marker_decode_location): Return a std::vector instead of
4788         symtabs_and_lines.  Update.
4789         (update_breakpoint_locations): Change struct symtabs_and_lines
4790         parameters to gdb::array_view.  Adjust.
4791         (location_to_sals): Return a std::vector instead of
4792         symtabs_and_lines.  Update.
4793         (breakpoint_re_set_default): Use std::vector instead of struct
4794         symtabs_and_lines.
4795         (decode_location_default): Return a std::vector instead of
4796         symtabs_and_lines.  Update.
4797         * breakpoint.h: Include "common/array-view.h".
4798         (struct breakpoint_ops) <decode_location>: Now returns a
4799         std::vector instead of returning a symtabs_and_lines via output
4800         parameter.
4801         (update_breakpoint_locations): Change sals parameters to use
4802         gdb::array_view.
4803         * cli/cli-cmds.c (edit_command, list_command): Update to use
4804         std::vector and gdb::array_view.
4805         (ambiguous_line_spec): Adjust to use gdb::array_view and
4806         range-for.
4807         (compare_symtabs): Rename to ...
4808         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4809         const reference and adjust.
4810         (filter_sals): Rewrite using std::vector and standard algorithms.
4811         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4812         (jump_command): Update to use std::vector.
4813         * linespec.c (struct linespec_state) <canonical_names>: Update
4814         comment.
4815         (add_sal_to_sals_basic): Delete.
4816         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4817         (decode_line_2, create_sals_line_offset)
4818         (convert_address_location_to_sals, convert_linespec_to_sals)
4819         (convert_explicit_location_to_sals, parse_linespec)
4820         (event_location_to_sals, decode_line_full, decode_line_1)
4821         (decode_line_with_current_source)
4822         (decode_line_with_last_displayed, decode_objc)
4823         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4824         (linespec_result::~linespec_result): Adjust to use std::vector
4825         instead of symtabs_and_lines.
4826         * linespec.h (linespec_sals::sals): Now a std::vector.
4827         (struct linespec_result): Use std::vector, bool, and in-class
4828         initialization.
4829         (decode_line_1, decode_line_with_current_source)
4830         (decode_line_with_last_displayed): Return std::vector.
4831         * macrocmd.c (info_macros_command): Use std::vector.
4832         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4833         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4834         std::vector.
4835         * probe.h (parse_probes): Return a std::vector.
4836         * python/python.c (gdbpy_decode_line): Use std::vector and
4837         gdb::array_view.
4838         * source.c (select_source_symtab, line_info): Use std::vector.
4839         * stack.c (func_command): Use std::vector.
4840         * symtab.h (struct symtabs_and_lines): Delete.
4841         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4842
4843 2017-09-04  Pedro Alves  <palves@redhat.com>
4844
4845         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4846         unittests/array-view-selftests.c.
4847         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4848         * common/array-view.h: New file.
4849         * unittests/array-view-selftests.c: New file.
4850
4851 2017-09-04  Pedro Alves  <palves@redhat.com>
4852
4853         * cli/cli-cmds.c (edit_command): Pass message to
4854         ambiguous_line_spec.
4855         (list_command): Pass message to ambiguous_line_spec.  Say
4856         "first"/"last" instead of "start" and "end" to be consistent with
4857         the manual.
4858         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4859         them to print formatted message.
4860
4861 2017-09-04  Pedro Alves  <palves@redhat.com>
4862
4863         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4864         ftrace_update_insns by reference instead of pointer.
4865
4866 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4867
4868         * i386-go32-tdep.c: Include x86-xstate.h.
4869         (i386_go32_init_abi): Call i386_target_description.
4870         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4871         if xcr0 is X86_XSTATE_X87_MASK.
4872         * i386-tdep.h (tdesc_i386): Remove the declaration.
4873         (tdesc_i386_mmx): Likewise.
4874
4875 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4876
4877         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4878         X86_XSTATE_SSE_MASK instead of 0.
4879
4880 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4881
4882         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4883         i386_target_description.
4884         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4885         i386_target_description.
4886         * i386-tdep.c (i386_gdbarch_init): Likewise.
4887
4888 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4889
4890         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4891         (x86_darwin_init_abi_64): Call amd64_target_description.
4892         * amd64-dicos-tdep.c: Likewise.
4893         * amd64-fbsd-nat.c: Likewise.
4894         * amd64-fbsd-tdep.c: Likewise.
4895         * amd64-nbsd-tdep.c: Likewise.
4896         * amd64-obsd-tdep.c: Likewise.
4897         * amd64-sol2-tdep.c: Likewise.
4898         * amd64-windows-tdep.c: Likewise.
4899         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4900
4901 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4902
4903         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4904         (btrace_function) <insn>: Change type to use std::vector.
4905         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4906         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4907         ftrace_update_insns, ftrace_compute_global_level_offset,
4908         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4909         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4910         change to std::vector.
4911         (ftrace_update_insns): Adjust to change to std::vector, change
4912         type of INSN parameter.
4913         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4914         * record-btrace.c (btrace_call_history_insn_range,
4915         btrace_compute_src_line_range,
4916         record_btrace_frame_prev_register): Adjust to change to
4917         std::vector.
4918         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4919         to change to std::vector.
4920
4921 2017-09-03  Tom Tromey  <tom@tromey.com>
4922
4923         * corefile.c (reopen_exec_file): Use std::string.
4924
4925 2017-09-03  Tom Tromey  <tom@tromey.com>
4926
4927         * compile/compile.c (compile_register_name_mangled): Return
4928         std::string.
4929         * compile/compile-loc2c.c (pushf_register_address): Update.
4930         (pushf_register): Update.
4931         * compile/compile-c-types.c (convert_array): Update.
4932         * compile/compile-c-symbols.c (generate_vla_size): Update.
4933         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4934         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4935         (convert_one_symbol): Update.
4936         (generate_c_for_for_one_variable): Update.
4937         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4938         std::string.
4939         (generate_register_struct): Update.
4940         * compile/compile-internal.h (c_get_range_decl_name): Return a
4941         std::string.
4942         (compile_register_name_mangled): Return std::string.
4943
4944 2017-09-03  Tom Tromey  <tom@tromey.com>
4945
4946         * utils.c (perror_string): Return a std::string.
4947         (throw_perror_with_name, perror_warning_with_name): Update.
4948
4949 2017-09-03  Tom Tromey  <tom@tromey.com>
4950
4951         * demangle.c (demangle_command): Use std::string,
4952         unique_xmalloc_ptr.
4953
4954 2017-09-03  Tom Tromey  <tom@tromey.com>
4955
4956         * cli/cli-setshow.c (do_set_command): Use std::string.
4957
4958 2017-09-03  Tom Tromey  <tom@tromey.com>
4959
4960         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4961
4962 2017-09-03  Tom Tromey  <tom@tromey.com>
4963
4964         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4965
4966 2017-09-03  Tom Tromey  <tom@tromey.com>
4967
4968         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4969         gdb::unique_xmalloc_ptr.
4970
4971 2017-09-03  Tom Tromey  <tom@tromey.com>
4972
4973         * thread.c (print_thread_info_1): Use string_printf.
4974         (thread_apply_command, thread_apply_all_command): Use
4975         std::string.
4976
4977 2017-09-03  Tom Tromey  <tom@tromey.com>
4978
4979         * valprint.c (val_print_string): Update.
4980         * gdbcore.h (memory_error_message): Return std::string.
4981         * corefile.c (memory_error_message): Return std::string.
4982         (memory_error): Update.
4983         * breakpoint.c (insert_bp_location): Update.
4984
4985 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4986
4987         * target/waitstatus.h (target_waitstatus_to_string): Change
4988         return type to std::string.
4989         * target/waitstatus.c (target_waitstatus_to_string): Return
4990         std::string.
4991         * target.h (target_waitstatus_to_string): Remove declaration.
4992         * infrun.c (resume, clear_proceed_status_thread,
4993         print_target_wait_results, do_target_wait, save_waitstatus,
4994         stop_all_threads): Adjust.
4995         * record-btrace.c (record_btrace_wait): Adjust.
4996         * target-debug.h
4997         (target_debug_print_struct_target_waitstatus_p): Adjust.
4998
4999 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5000
5001         PR gdb/22046
5002         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5003         detection.
5004
5005 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5006
5007         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5008         for setting/unsetting environment variables on the remote target.
5009         (New remote packets): Add entries for QEnvironmentHexEncoded,
5010         QEnvironmentUnset and QEnvironmentReset.
5011         * common/environ.c (gdb_environ::operator=): Extend method to
5012         handle m_user_set_env_list and m_user_unset_env_list.
5013         (gdb_environ::clear): Likewise.
5014         (match_var_in_string): Change type of first parameter from 'char
5015         *' to 'const char *'.
5016         (gdb_environ::set): Extend method to handle
5017         m_user_set_env_list and m_user_unset_env_list.
5018         (gdb_environ::unset): Likewise.
5019         (gdb_environ::clear_user_set_env): New method.
5020         (gdb_environ::user_set_envp): Likewise.
5021         (gdb_environ::user_unset_envp): Likewise.
5022         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5023         m_user_unset_env_list on move constructor/assignment.
5024         (unset): Add new default parameter 'update_unset_list = true'.
5025         (clear_user_set_env): New method.
5026         (user_set_envp): Likewise.
5027         (user_unset_envp): Likewise.
5028         (m_user_set_env_list): New std::set.
5029         (m_user_unset_env_list): Likewise.
5030         * common/rsp-low.c (hex2str): New function.
5031         (bin2hex): New overload for bin2hex function.
5032         * common/rsp-low.c (hex2str): New prototype.
5033         (str2hex): New overload prototype.
5034         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5035         QEnvironmentUnset and QEnvironmentReset.
5036         (remote_protocol_features): Add QEnvironmentHexEncoded,
5037         QEnvironmentUnset and QEnvironmentReset packets.
5038         (send_environment_packet): New function.
5039         (extended_remote_environment_support): Likewise.
5040         (extended_remote_create_inferior): Call
5041         extended_remote_environment_support.
5042         (_initialize_remote): Add QEnvironmentHexEncoded,
5043         QEnvironmentUnset and QEnvironmentReset packet configs.
5044         * unittests/environ-selftests.c (gdb_selftest_env_var):
5045         New variable.
5046         (test_vector_initialization): New function.
5047         (test_init_from_host_environ): Likewise.
5048         (test_reinit_from_host_environ): Likewise.
5049         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5050         Likewise.
5051         (test_unset_set_empty_vector): Likewise.
5052         (test_vector_clear): Likewise.
5053         (test_std_move): Likewise.
5054         (test_move_constructor):
5055         (test_self_move): Likewise.
5056         (test_set_unset_reset): Likewise.
5057         (run_tests): Rewrite in terms of the functions above.
5058
5059 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5060
5061         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5062         (adi_available): Use a temp variable of type CORE_ADDR as argument
5063         3 when calling target_auxv_search.
5064         (adi_normalize_address): Use masks and xor operators to calculate
5065         normalized address.
5066         (adi_read_versions, adi_write_versions, adi_print_versions)
5067         (do_examine, do_assign): Use paddress.
5068
5069 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5070
5071         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5072         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5073         out of loop and add supply of FIR.
5074         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5075         add collect of FIR.
5076
5077 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         PR gdb/21827
5080         * cli/cli-script.c (define_command): Don't convert command name
5081         to lower case.
5082
5083 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5084
5085         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5086         Update all callers accordingly. Remove all code blocks handling
5087         the case where DISPP is not NULL.
5088
5089 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5090
5091         PR symtab/22003
5092         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5093         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5094         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5095
5096 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5097
5098         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5099         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5100         (read_comp_units_from_section): New parameter abbrev_section, use
5101         read_and_check_comp_unit_head, allocate signatured_type if needed.
5102         (create_all_comp_units): Update read_comp_units_from_section caller.
5103
5104 2017-08-23  Pedro Alves  <palves@redhat.com>
5105
5106         PR remote/21852
5107         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5108         to null_ptid and switch to thread without reading the registers
5109         after adding the inferior.
5110
5111 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5112
5113         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5114         compile-gcc.
5115         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5116         (compile_to_object): Implement compile_gcc.
5117         (_initialize_compile): Install "set compile-gcc".  Initialize
5118         compile_gcc.
5119
5120 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5121
5122         * compile/compile.c (compile_to_object): Conditionally call
5123         set_verbose.  Conditionally call compile or compile_v0.
5124
5125 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5126
5127         * sparc64-tdep.h: (adi_normalize_address): New export.
5128         * sparc-nat.h: (open_adi_tag_fd): New export.
5129         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5130         * sparc64-linux-tdep.c:
5131         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5132         (sparc64_linux_handle_segmentation_fault): New function.
5133         (sparc64_linux_init_abi): Register
5134         sparc64_linux_handle_segmentation_fault
5135         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5136         (sparc64_addr_bits_remove): New function.
5137         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5138         (MAX_PROC_NAME_SIZE): New macro.
5139         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5140         (sparc64adilist): New variable.
5141         (adi_proc_list): New variable.
5142         (find_adi_info): New function.
5143         (add_adi_info): New function.
5144         (get_adi_info_proc): New function.
5145         (get_adi_info): New function.
5146         (info_adi_command): New function.
5147         (read_maps_entry): New function.
5148         (adi_available): New function.
5149         (adi_normalize_address): New function.
5150         (adi_align_address): New function.
5151         (adi_convert_byte_count): New function.
5152         (adi_tag_fd): New function.
5153         (adi_is_addr_mapped): New function.
5154         (adi_read_versions): New function.
5155         (adi_write_versions): New function.
5156         (adi_print_versions): New function.
5157         (do_examine): New function.
5158         (do_assign): New function.
5159         (adi_examine_command): New function.
5160         (adi_assign_command): New function.
5161         (_initialize_sparc64_adi_tdep): New function.
5162
5163 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5164
5165         * breakpoint.c (breakpoints_info): Rename to ...
5166         (info_breakpoints_command): ... this.
5167         (watchpoints_info): Rename to ...
5168         (info_watchpoints_command): ... this.
5169         (tracepoints_info): Rename to ...
5170         (info_tracepoints_command): ... this.
5171         (_initialize_breakpoint): Adjust.
5172         * dcache.c (dcache_info): Rename to ...
5173         (info_display_command): ... this.
5174         (_initialize_dcache): Adjust.
5175         * frame.h (args_info): Rename to ...
5176         (info_args_command): ... this.
5177         (locals_info): Rename to ...
5178         (info_locals_command): ... this.
5179         * infcmd.c (nofp_registers_info): Rename to ...
5180         (info_registers_command): ... this.
5181         (float_info): Rename to ...
5182         (info_float_command): ... this.
5183         (program_info): Rename to ...
5184         (info_program_command): ... this.
5185         (all_registers_info): Rename to ...
5186         (info_all_registers_command): ... this.
5187         (vector_info): Rename to ...
5188         (info_vector_command): ... this.
5189         (float_info): Rename to ...
5190         (info_float_command): ... this.
5191         (_initialize_infcmd): Adjust.
5192         * inferior.h (term_info): Rename to ...
5193         (info_terminal_command): ... this.
5194         * inflow.c (term_info): Rename to ...
5195         (info_terminal_command): ... this.
5196         (_initialize_inflow): Adjust.
5197         * infrun.c (signals_info): Rename to ...
5198         (info_signals_command): ... this.
5199         (_initialize_infrun): Adjust.
5200         * objc-lang.c (classes_info): Rename to ...
5201         (info_classes_command): ... this.
5202         (selectors_info): Rename to ...
5203         (info_selectors_command): ... this.
5204         (_initialize_objc_language): Adjust.
5205         * printcmd.c (sym_info): Rename to ...
5206         (info_symbol_command): ... this.
5207         (address_info): Rename to ...
5208         (info_address_command): ... this.
5209         (display_info): Rename to ...
5210         (info_display_command): ... this.
5211         (_initialize_printcmd): Adjust.
5212         * reverse.c (bookmarks_info): Rename to ...
5213         (info_breakpoints_command): ... this.
5214         (_initialize_reverse): Adjust.
5215         * ser-go32.c (dos_info): Rename to ...
5216         (info_serial_command): ... this.
5217         (_initialize_ser_dos): Adjust.
5218         * skip.c (skip_info): Rename to ...
5219         (info_skip_command): ... this.
5220         (_initialize_step_skip): Adjust.
5221         * source.c (line_info): Rename to ...
5222         (info_line_command): ... this.
5223         (source_info): Rename to ...
5224         (info_source_command)
5225         * stack.c (frame_info): Rename to ...
5226         (info_frame_command): ... this.
5227         (locals_info): Rename to ...
5228         (info_locals_command): ... this.
5229         (args_info): Rename to ...
5230         (info_args_command): ... this.
5231         (_initialize_stack): Adjust.
5232         * symtab.c (sources_info): Rename to ...
5233         (info_sources_command): ... this.
5234         (variables_info): Rename to ...
5235         (info_variables_command): ... this.
5236         (functions_info): Rename to ...
5237         (info_functions_command): ... this.
5238         (types_info): Rename to ...
5239         (info_types_command): ... this.
5240         (_initialize_symtab): Adjust.
5241         * target.c (target_info): Rename to ...
5242         (info_target_command): ... this.
5243         (initialize_targets): Adjust.
5244         * tracepoint.c (tvariables_info): Rename to ...
5245         (info_tvariables_command): ... this.
5246         (scope_info): Rename to ...
5247         (info_scope_command): ... this.
5248         (trace_dump_actions): Adjust.
5249         (_initialize_tracepoint): Adjust.
5250
5251 2017-08-22  Tom Tromey  <tom@tromey.com>
5252
5253         * breakpoint.h (install_breakpoint): Update.
5254         * breakpoint.c (add_solib_catchpoint): Update.
5255         (install_breakpoint): Change argument to a std::unique_ptr.
5256         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5257         (create_breakpoint_sal, create_breakpoint): Update.
5258         (watch_command_1, catch_exec_command_1)
5259         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5260         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5261         Return the breakpoint.
5262         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5263         (new_single_step_breakpoint): Update.
5264         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5265         std::unique_ptr.
5266         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5267         std::unique_ptr.
5268         * break-catch-sig.c (create_signal_catchpoint): Use
5269         std::unique_ptr.
5270         * ada-lang.c (create_ada_exception_catchpoint): Use
5271         std::unique_ptr.
5272
5273 2017-08-22  Tom Tromey  <tom@tromey.com>
5274
5275         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5276
5277 2017-08-22  Tom Tromey  <tom@tromey.com>
5278
5279         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5280         (lookup_partial_symbol): Update.
5281
5282 2017-08-22  Tom Tromey  <tom@tromey.com>
5283
5284         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5285         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5286         (find_and_open_source, symtab_to_fullname): Update.
5287         * psymtab.c (psymtab_to_fullname): Update.
5288
5289 2017-08-22  Tom Tromey  <tom@tromey.com>
5290
5291         * exec.c (exec_file_attach): Update.
5292         * linux-thread-db.c (try_thread_db_load): Update.
5293         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5294         * utils.c (gdb_realpath): Change return type.
5295         (gdb_realpath_keepfile): Update.
5296         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5297         (_initialize_utils): Register the new self test.
5298         * source.c (openp): Update.
5299         (find_and_open_source): Update.
5300         * nto-tdep.c (nto_find_and_open_solib): Update.
5301         * main.c (set_gdb_data_directory): Update.
5302         (captured_main_1): Update.
5303         * dwarf2read.c (dwarf2_get_dwz_file): Update
5304         (dw2_map_symbol_filenames): Update.
5305         * auto-load.c (auto_load_safe_path_vec_update): Update.
5306         (filename_is_in_auto_load_safe_path_vec): Change type of
5307         "filename_realp".
5308         (auto_load_objfile_script): Update.
5309         (file_is_auto_load_safe): Update.  Use std::string.
5310         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5311
5312 2017-08-22  Tom Tromey  <tom@tromey.com>
5313
5314         * utils.c (gdb_realpath_keepfile): Return a
5315         gdb::unique_xmalloc_ptr.
5316         * exec.c (exec_file_attach): Update.
5317         * utils.h (gdb_realpath_keepfile): Return a
5318         gdb::unique_xmalloc_ptr.
5319
5320 2017-08-22  Tom Tromey  <tom@tromey.com>
5321
5322         * compile/compile.c (compile_file_command): Use
5323         gdb::unique_xmalloc_ptr, std::string.
5324         * utils.c (gdb_abspath): Change return type.
5325         * source.c (openp): Update.
5326         * objfiles.c (allocate_objfile): Update.
5327         * main.c (set_gdb_data_directory): Update.
5328         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5329
5330 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5331
5332         * cli-cmds.c (list_commands): List actual code around more than
5333         one location.
5334
5335 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5336
5337         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5338
5339 2017-08-21  Pedro Alves  <palves@redhat.com>
5340
5341         PR gdb/19487
5342         * c-exp.y (variable production): Handle function aliases.
5343         * minsyms.c (msymbol_is_text): New function.
5344         * minsyms.h (msymbol_is_text): Declare.
5345         * symtab.c (find_function_alias_target): New function.
5346         * symtab.h (find_function_alias_target): Declare.
5347
5348 2017-08-21  Pedro Alves  <palves@redhat.com>
5349
5350         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5351         typedefs.
5352         * typeprint.c (whatis_exp): If handling "whatis", and expression
5353         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5354         typedefs here.
5355         * valops.c (value_cast): Save "to" type before resolving
5356         stubs/typedefs.  Use that type as resulting value's type.
5357
5358 2017-08-18  Tom Tromey  <tom@tromey.com>
5359             Pedro Alves  <palves@redhat.com>
5360
5361         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5362         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5363         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5364         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5365         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5366         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5367         (linux_get_siginfo_data): Add "thread" argument.  Use
5368         scoped_restore.
5369         * linux-nat.c (linux_child_follow_fork)
5370         (check_stopped_by_watchpoint): Use scoped_restore.
5371         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5372         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5373         (restore_inferior_ptid, save_inferior_ptid): Remove.
5374         * btrace.c (btrace_fetch): Use scoped_restore.
5375         * bsd-uthread.c (bsd_uthread_fetch_registers)
5376         (bsd_uthread_store_registers): Use scoped_restore.
5377         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5378         scoped_restore.
5379         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5380         (aix_thread_xfer_partial): Use scoped_restore.
5381         * inferior.h (save_inferior_ptid): Remove.
5382
5383 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5384
5385         PR tdep/21818
5386         * arm-tdep.c (gdb_print_insn_arm): Mark
5387         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5388
5389 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5390
5391         * NEWS: Mention GDBserver's new option "--selftest".
5392         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5393         * selftest.c: Move it to common/selftest.c.
5394         * selftest.h: Move it to common/selftest.h.
5395         * selftest-arch.c (reset): New function.
5396         (tests_with_arch): Call reset.
5397
5398 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5399
5400         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5401         instead of exception_fprintf and printf_filtered.
5402
5403 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5404
5405         * selftest.c (register_self_test): Rename it to
5406         selftests::register_test.
5407         (run_self_tests): selftest::run_tests.
5408         * selftest.h: Update declarations.
5409         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5410         selftests::register_test_foreach_arch.
5411         * selftest-arch.h: Update declaration.
5412         * aarch64-tdep.c: Update.
5413         * arm-tdep.c: Likewise.
5414         * disasm-selftests.c: Likewise.
5415         * dwarf2loc.c: Likewise.
5416         * dwarf2-frame.c: Likewise.
5417         * findvar.c: Likewise.
5418         * gdbarch-selftests.c: Likewise.
5419         * maint.c (maintenance_selftest): Likewise.
5420         * regcache.c: Likewise.
5421         * rust-exp.y: Likewise.
5422         * selftest-arch.c: Likewise.
5423         * unittests/environ-selftests.c: Likewise.
5424         * unittests/function-view-selftests.c: Likewise.
5425         * unittests/offset-type-selftests.c: Likewise.
5426         * unittests/optional-selftests.c: Likewise.
5427         * unittests/scoped_restore-selftests.c: Likewise.
5428         * utils-selftests.c: Likewise.
5429
5430 2017-08-17  Pedro Alves  <palves@redhat.com>
5431
5432         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5433         local.
5434
5435 2017-08-17  Pedro Alves  <palves@redhat.com>
5436
5437         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5438         field.
5439         (reset_die_in_process): Delete, replaced by ...
5440         (process_die_scope): ... this new class.  Make it responsible for
5441         freeing cu->line_header too.
5442         (process_die): Use process_die_scope.
5443         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5444         cu->line_header_die_owner.  Don't release the line header if it's
5445         owned by the CU.
5446         (setup_type_unit_groups): Make the CU/DIE own the line header.
5447         Don't release the line header here.
5448
5449 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5450
5451         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5452
5453 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5454
5455         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5456         Single-Key mode
5457
5458 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5459
5460         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5461         mode command list.
5462
5463 2017-08-15  Stafford Horne  <shorne@gmail.com>
5464
5465         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5466
5467 2017-08-15  Stafford Horne  <shorne@gmail.com>
5468
5469         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5470
5471 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5472
5473         PR gdb/21954
5474         * infcmd.c (unset_environment_command): Use the 'clear' method on
5475         the environment instead of resetting it.
5476
5477 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5478
5479         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5480         platforms.
5481
5482 2017-08-14  Tom Tromey  <tom@tromey.com>
5483
5484         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5485         (print_binary_chars): Likewise.
5486         (BITS_IN_BYTES): Remove.
5487
5488 2017-08-14  Tom Tromey  <tom@tromey.com>
5489
5490         PR gdb/21675
5491         * valprint.c (LOW_ZERO): Change value to 034.
5492         (print_octal_chars): Add static_asserts for octal constants.
5493         * printcmd.c (print_scalar_formatted): Add 'd' case.
5494
5495 2017-08-11  Tom Tromey  <tom@tromey.com>
5496
5497         * symfile.c (add_symbol_file_command): Use std::vector.
5498
5499 2017-08-14  Tom Tromey  <tom@tromey.com>
5500
5501         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5502         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5503         std::move.
5504         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5505
5506 2017-08-11  Pedro Alves  <palves@redhat.com>
5507
5508         * infrun.c (process_event_stop_test): Adjust
5509         function_name_is_marked_for_skip call.
5510         * skip.c: Include <list>.
5511         (skiplist_entry): Make it a class with private fields, and
5512         getters/setters.
5513         (skiplist_entry_chain): Delete.
5514         (skiplist_entries): New.
5515         (skiplist_entry_count): Delete.
5516         (highest_skiplist_entry_num): New.
5517         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5518         (add_skiplist_entry): Delete.
5519         (skiplist_entry::skiplist_entry): New.
5520         (skiplist_entry::add_entry): New.
5521         (skip_file_command, skip_function): Adjust.
5522         (compile_skip_regexp): Delete.
5523         (skip_command): Don't compile regexp here.  Adjust to use
5524         skiplist_entry::add_entry.
5525         (skip_info): Adjust to use range-for and getters.
5526         (skip_enable_command, skip_disable_command): Adjust to use
5527         range-for and setters.
5528         (skip_delete_command): Adjust to use std::list.
5529         (add_skiplist_entry): Delete.
5530         (skip_file_p): Delete, refactored as ...
5531         (skiplist_entry::do_skip_file_p): ... this new method.
5532         (skip_gfile_p): Delete, refactored as ...
5533         (skiplist_entry::do_gskip_file_p): ... this new method.
5534         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5535         (skiplist_entry::skip_function_p): ... this new method.
5536         (function_name_is_marked_for_skip): Now returns bool, and takes
5537         the function sal by const reference.  Adjust to use range-for and
5538         skiplist_entry methods.
5539         (_initialize_step_skip): Remove references to
5540         skiplist_entry_chain, skiplist_entry_count.
5541         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5542         takes the function sal by const reference.
5543
5544 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5545
5546         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5547         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5548         (dwarf2_frame_cache):
5549         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5550         RETURN_MASK_ALL and set *this_case to NULL.
5551         * frame-unwind.h: Update comments.
5552
5553 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5554
5555         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5556         (dwarf2_frame_state_copy_regs): Remove.
5557         (dwarf2_frame_state_free_regs): Remove.
5558         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5559         (dwarf2_restore_rule): Call method .alloc_regs instead of
5560         dwarf2_frame_state_alloc_regs.
5561         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5562         constructor.  Call std::move.
5563         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5564         (dwarf2_frame_cache): Likewise.
5565
5566         [GDB_SELF_TEST]: Include selftest.h and
5567         selftest-arch.h.
5568         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5569         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5570         execute_cfa_program_test.
5571
5572         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5573         copy ctor, assignment operator, move assignment.
5574         <alloc_regs>: New method.
5575         <swap>: New method.
5576         (struct dwarf2_frame_state): Delete dtor.
5577         (dwarf2_frame_state_alloc_regs): Remove declaration.
5578         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5579         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5580
5581 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5582
5583         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5584         (dwarf2_frame_state::dwarf2_frame_state): New.
5585         (dwarf2_frame_state::~dwarf2_frame_state): New.
5586         (dwarf2_fetch_cfa_info): Update.
5587         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5588         rather than a pointer.  Update code.
5589         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5590         dtor.
5591         <data_align, code_align, retaddr_column>: Change them to const.
5592         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5593         to bool.
5594
5595 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5596
5597         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5598         <loc.exp>: New field.
5599         * dwarf2-frame.c (execute_cfa_program): Update.
5600         (dwarf2_frame_prev_register): Update.
5601
5602 2017-08-10  Pedro Alves  <palves@redhat.com>
5603
5604         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5605
5606 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5607
5608         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5609         (fbsd_pending_children): Use std::list.
5610         (fbsd_remember_child): Likewise.
5611         (fbsd_is_child_pending): Likewise.
5612         (fbsd_pending_vfork_done): Use std::forward_list.
5613         (fbsd_add_vfork_done): Likewise.
5614         (fbsd_is_vfork_done_pending): Likewise.
5615         (fbsd_next_vfork_done): Likewise.
5616
5617 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5618
5619         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5620         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5621         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5622         for `mapfilename'.
5623         (fbsd_xfer_partial): Use gdb::byte_vector.
5624         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5625
5626 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5627
5628         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5629         "filestuff.h".
5630         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5631
5632 2017-08-09  Tom Tromey  <tom@tromey.com>
5633
5634         * skip.c (skiplist_entry): New constructor.
5635         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5636         (skiplist_entry::file_is_glob): Now bool.
5637         (skiplist_entry::file, skiplist_entry::function): Now
5638         std::string.
5639         (make_skip_entry): Return a unique_ptr.  Use new.
5640         (free_skiplist_entry, free_skiplist_entry_cleanup)
5641         (make_free_skiplist_entry_cleanup): Remove.
5642         (skip_command, skip_disable_command, add_skiplist_entry)
5643         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5644         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5645         (function_name_is_marked_for_skip): Update.
5646         (skip_delete_command): Update.  Use delete.
5647
5648 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5649
5650         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5651         (aarch64_linux_core_read_description): New function.
5652         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5653
5654 2017-08-09  Pedro Alves  <palves@redhat.com>
5655
5656         * cp-name-parser.y (cp_comp_to_string): Return a
5657         gdb::unique_xmalloc_ptr<char>.
5658         * cp-support.c (replace_typedefs_qualified_name)
5659         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5660         (cp_canonicalize_string_full): Use op= instead of explicit
5661         convertion.
5662         (cp_class_name_from_physname, method_name_from_physname)
5663         (cp_func_name, cp_remove_params): Adjust to use
5664         gdb::unique_xmalloc_ptr<char>.
5665         * cp-support.h (cp_comp_to_string): Return a
5666         gdb::unique_xmalloc_ptr<char>.
5667         * python/py-type.c (typy_lookup_type): Adjust to use
5668         gdb::unique_xmalloc_ptr<char>.
5669
5670 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5671
5672         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5673
5674 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5675             Yao Qi  <yao.qi@linaro.org>
5676
5677         * cp-support.c (cp_canonicalize_string_full): Use
5678         gdb::unique_xmalloc_ptr<char>.
5679         (cp_canonicalize_string): Likewise.
5680
5681 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5682
5683         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5684         * regformats/i386/amd64-avx-avx512.dat: Remove.
5685         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5686         * regformats/i386/amd64-avx-mpx.dat:Remove.
5687         * regformats/i386/amd64-avx.dat: Remove.
5688         * regformats/i386/amd64-mpx.dat: Remove.
5689         * regformats/i386/i386-avx-avx512.dat: Remove.
5690         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5691         * regformats/i386/i386-avx-mpx.dat: Remove.
5692         * regformats/i386/i386-mmx.dat: Remove.
5693         * regformats/i386/i386-mpx.dat: Remove.
5694
5695 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5696
5697         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5698         * amd64-tdep.c: Don't include features/i386/x32*.c.
5699         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5700         functions.
5701         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5702         and i386/x32-avx-avx512.
5703         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5704         and i386/x32.xml.
5705         * features/i386/x32-avx-avx512.c: Removed.
5706         * features/i386/x32-avx-avx512.xml: Removed.
5707         * features/i386/x32-avx.c: Removed.
5708         * features/i386/x32-avx.xml: Removed.
5709         * features/i386/x32.c: Removed.
5710         * features/i386/x32.xml: Removed.
5711         * regformats/i386/x32-avx-avx512.dat: Removed.
5712         * regformats/i386/x32-avx.dat: Removed.
5713         * regformats/i386/x32.dat: Removed.
5714
5715 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5716
5717         PR breakpoints/21886
5718         * mem-break.c (default_memory_insert_breakpoint): Use
5719         `->placed_address' rather than `->reqstd_address' for the
5720         breakpoint location.
5721
5722 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5723
5724         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5725         assertions.
5726
5727 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5728
5729         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5730         a union of `tdep_info', `tdesc_data' and `id'.
5731         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5732         rather than `info.tdep_info'.
5733         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5734         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5735         * i386-tdep.c (i386_gdbarch_init): Likewise.
5736         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5737         * mips-tdep.c (mips_gdbarch_init): Likewise.
5738         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5739         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5740         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5741         `info.tdep_info'.
5742         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5743         `info.tdep_info'.
5744         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5745         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5746         `info.tdep_info'.
5747         * spu-tdep.c (spu_gdbarch_init): Likewise.
5748         * gdbarch.h: Regenerate.
5749
5750 2017-08-07  Leszek Swirski  <leszeks@google.com>
5751
5752         PR symtab/20899
5753         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5754
5755 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5756
5757         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5758         (gdbsim_open): Rename gdb_argv args object to argv.
5759
5760 2017-08-05  Tom Tromey  <tom@tromey.com>
5761
5762         * compile/compile-object-load.c (compile_object_load): Use
5763         gdb::unique_xmalloc_ptr.
5764         * cli/cli-dump.c (scan_filename): Rename from
5765         scan_filename_with_cleanup.  Change return type.
5766         (scan_expression): Rename from scan_expression_with_cleanup.
5767         Change return type.
5768         (dump_memory_to_file, dump_value_to_file, restore_command):
5769         Use gdb::unique_xmalloc_ptr.  Update.
5770         * cli/cli-cmds.c (find_and_open_script): Use
5771         gdb::unique_xmalloc_ptr.
5772         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5773         * symmisc.c (maintenance_print_symbols)
5774         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5775         * symfile.c (symfile_bfd_open, generic_load)
5776         (add_symbol_file_command, remove_symbol_file_command): Use
5777         gdb::unique_xmalloc_ptr.
5778         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5779         * psymtab.c (maintenance_print_psymbols): Use
5780         gdb::unique_xmalloc_ptr.
5781         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5782         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5783         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5784         (reload_shared_libraries_1): Likewise.
5785
5786 2017-08-05  Tom Tromey  <tom@tromey.com>
5787
5788         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5789         (rust_op_vector, rust_set_vector): New typedefs.
5790         (current_parser): New global.
5791         (work_obstack): Change to pointer type.  Update all users.
5792         (rust_ast, pstate): Remove globals.
5793         (struct rust_parser): New.
5794         (%union) <params, field_inits>: Change type.
5795         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5796         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5797         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5798         (convert_params_to_types, convert_params_to_expression): Change
5799         type of "params".
5800         (ast_string): Change type of "fields".
5801         (rust_parse): Make a rust_parser.  Remove cleanups.
5802         (rust_lex_tests): Make and install an auto_obstack.
5803
5804 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5805
5806         * configure.srv (ipa_x32_linux_regobj): New.
5807         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5808         instead of X86_TDESC_AVX512.
5809         (initialize_low_tracepoint): Call
5810         init_registers_x32_avx_avx512_linux.
5811
5812 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5813
5814         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5815
5816 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5817
5818         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5819
5820 2017-08-03  Tom Tromey  <tom@tromey.com>
5821
5822         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5823         Remove.
5824         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5825
5826 2017-08-03  Tom Tromey  <tom@tromey.com>
5827
5828         * python/py-param.c (compute_enum_values): Use gdb_argv.
5829
5830 2017-08-03  Tom Tromey  <tom@tromey.com>
5831
5832         * utils.h (struct gdb_argv_deleter): New.
5833         (gdb_argv): New class.
5834         * utils.c (gdb_argv::reset): New method.
5835         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5836         * tracefile.c (tsave_command): Use gdb_argv.
5837         * top.c (new_ui_command): Use gdb_argv.
5838         * symmisc.c (maintenance_print_symbols)
5839         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5840         * symfile.c (symbol_file_command, generic_load)
5841         (remove_symbol_file_command): Use gdb_argv.
5842         * stack.c (backtrace_command): Use gdb_argv.
5843         * source.c (add_path, show_substitute_path_command)
5844         (unset_substitute_path_command, set_substitute_path_command):
5845         Use gdb_argv.
5846         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5847         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5848         * remote.c (extended_remote_run, remote_put_command)
5849         (remote_get_command, remote_delete_command): Use gdb_argv.
5850         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5851         (gdbsim_open): Use gdb_argv.
5852         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5853         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5854         * procfs.c (procfs_info_proc): Use gdb_argv.
5855         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5856         * infrun.c (handle_command): Use gdb_argv.
5857         * inferior.c (add_inferior_command, clone_inferior_command):
5858         Use gdb_argv.
5859         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5860         * exec.c (exec_file_command): Use gdb_argv.
5861         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5862         * compile/compile.c (build_argc_argv): Use gdb_argv.
5863
5864 2017-08-03  Tom Tromey  <tom@tromey.com>
5865
5866         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5867
5868 2017-08-03  Tom Tromey  <tom@tromey.com>
5869
5870         * python/python.c (compute_python_string): Return std::string.
5871         (gdbpy_eval_from_control_command): Update.
5872         (do_start_initialization): Use std::string.
5873         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5874         xstrprintf.
5875         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5876         xstrprintf.
5877
5878 2017-08-03  Tom Tromey  <tom@tromey.com>
5879
5880         * top.h (do_restore_instream_cleanup): Remove.
5881         * top.c (do_restore_instream_cleanup): Remove.
5882         (read_command_file): Use scoped_restore.
5883         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5884
5885 2017-08-03  Tom Tromey  <tom@tromey.com>
5886
5887         * cli/cli-script.c (execute_user_command)
5888         (execute_control_command): Use scoped_restore.
5889
5890 2017-08-03  Tom Tromey  <tom@tromey.com>
5891
5892         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5893         (execute_user_command): Remove user_call_depth; use
5894         user_args_stack's size instead.
5895
5896 2017-08-03  Tom Tromey  <tom@tromey.com>
5897
5898         * top.h (in_user_command): Remove.
5899         * top.c (in_user_command): Remove.
5900         * cli/cli-script.c (do_restore_user_call_depth)
5901         (execute_user_command): Update.
5902
5903 2017-08-03  Tom Tromey  <tom@tromey.com>
5904
5905         * valops.c (search_struct_method): Use gdb::byte_vector.
5906         * valarith.c (value_concat): Use std::vector.
5907         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5908         (simple_search_memory): Likewise.
5909         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5910         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5911         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5912         * elfread.c (elf_rel_plt_read): Use std::string.
5913         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5914         * cli/cli-dump.c (restore_section_callback): Use
5915         gdb::byte_vector.
5916
5917 2017-08-03  Tom Tromey  <tom@tromey.com>
5918
5919         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5920
5921 2017-08-03  Tom Tromey  <tom@tromey.com>
5922
5923         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5924         (tui_register_format): Use scoped_restore.
5925
5926 2017-08-03  Tom Tromey  <tom@tromey.com>
5927
5928         * reverse.c (exec_direction_default): Remove.
5929         (exec_reverse_once): Use scoped_restore.
5930         * remote.c (restore_remote_timeout): Remove.
5931         (remote_flash_erase, remote_flash_write, remote_flash_done)
5932         (readchar, remote_serial_write): Use scoped_restore.
5933         * cli/cli-script.c (struct source_cleanup_lines_args)
5934         (source_cleanup_lines): Remove.
5935         (script_from_file): Use scoped_restore.
5936         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5937         (source_command): Use scoped_restore.
5938
5939 2017-08-03  Tom Tromey  <tom@tromey.com>
5940
5941         * utils.h (make_cleanup_free_so): Remove.
5942         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5943         * solist.h (struct so_deleter): New.
5944         (so_list_up): New typedef.
5945         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5946
5947 2017-08-03  Tom Tromey  <tom@tromey.com>
5948
5949         * utils.h (make_cleanup_restore_current_language): Remove.
5950         * utils.c (do_restore_current_language)
5951         (make_cleanup_restore_current_language): Remove.
5952         * parse.c (parse_exp_in_context_1)
5953         (parse_expression_with_language): Use
5954         scoped_restore_current_language.
5955         * mi/mi-main.c (mi_cmd_execute): Use
5956         scoped_restore_current_language.
5957         * language.h (scoped_restore_current_language): New class.
5958
5959 2017-08-03  Tom Tromey  <tom@tromey.com>
5960
5961         * compile/compile.c (cleanup_unlink_file): Remove.
5962         (compile_to_object): Use gdb::unlinker.
5963         (eval_compile_command): Likewise.
5964
5965 2017-08-03  Tom Tromey  <tom@tromey.com>
5966
5967         * utils.h (make_cleanup_fclose): Remove.
5968         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5969
5970 2017-08-03  Tom Tromey  <tom@tromey.com>
5971
5972         * top.c (open_terminal_stream): Return gdb_file_up.
5973         (new_ui_command): Update.
5974
5975 2017-08-03  Tom Tromey  <tom@tromey.com>
5976
5977         * source.c (print_source_lines_base, forward_search_command)
5978         (reverse_search_command): Use gdb_file_up.
5979
5980 2017-08-03  Tom Tromey  <tom@tromey.com>
5981
5982         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5983
5984 2017-08-03  Tom Tromey  <tom@tromey.com>
5985
5986         * cli/cli-cmds.c (find_and_open_script): Change return type.
5987         Remove "streamp" and "full_path" parameters.
5988         (source_script_with_search): Update.
5989         * auto-load.c (source_script_file): Update.
5990         * cli/cli-cmds.h (find_and_open_script): Change type.
5991         (open_script): New struct.
5992
5993 2017-08-03  Tom Tromey  <tom@tromey.com>
5994
5995         * xml-support.c (xml_fetch_content_from_file): Update.
5996         * ui-file.c (stdio_file::open): Update.
5997         * tracefile-tfile.c (tfile_start): Update.
5998         * remote.c (remote_file_put, remote_file_get): Update.
5999         * nat/linux-procfs.c (linux_proc_get_int)
6000         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6001         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6002         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6003         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6004         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6005         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6006         * linux-nat.c (linux_proc_pending_signals): Update.
6007         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6008         (file_closer): Remove.
6009         * compile/compile.c (compile_to_object): Update.
6010         * common/filestuff.h (struct gdb_file_deleter): New.
6011         (gdb_file_up): New typedef.
6012         (gdb_fopen_cloexec): Change return type.
6013         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6014         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6015         (dump_binary_file, restore_binary_file): Update.
6016         * auto-load.c (auto_load_objfile_script_1): Update.
6017
6018 2017-08-03  Tom Tromey  <tom@tromey.com>
6019
6020         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6021         (info_static_tracepoint_markers_command): Likewise.
6022         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6023         * skip.c (skip_info): Use ui_out_emit_table.
6024         * progspace.c (print_program_space): Use ui_out_emit_table.
6025         * osdata.c (info_osdata): Use ui_out_emit_table.
6026         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6027         ui_out_emit_table.
6028         * linux-thread-db.c (info_auto_load_libthread_db): Use
6029         ui_out_emit_table.
6030         * inferior.c (print_inferior): Use ui_out_emit_table.
6031         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6032         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6033         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6034         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6035         * ui-out.h (class ui_out_emit_table): New.
6036
6037 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6038
6039         * mips-tdep.c (mips_fpu_type_str): New function.
6040         (mips_dump_tdep): Call it.
6041
6042 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6043
6044         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6045         `->mips_fpu_type'.
6046
6047 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6048
6049         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6050
6051 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6052
6053         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6054
6055 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6056
6057         * cli/cli-cmds.c (maintenancechecklist): New variable.
6058         * gdbcmd.h (maintenancechecklist): Declare it.
6059         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6060         Call i386_linux_read_description with different masks.
6061         * maint.c (maintenance_check_command): New function.
6062         (_initialize_maint_cmds): Call add_prefix_cmd.
6063         * target-descriptions.c (tdesc_reg): override operator != and ==.
6064         (tdesc_type): Likewise.
6065         (tdesc_feature): Likewise.
6066         (target_desc): Likewise.
6067         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6068         (maintenance_check_xml_descriptions): New function.
6069         (_initialize_target_descriptions) Add command "xml-descriptions".
6070         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6071
6072 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6073
6074         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6075         Include features/i386/32bit-*.c.
6076         (i386_linux_read_description): Generate target description if it
6077         doesn't exist.
6078         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6079         functions.
6080         * features/i386/32bit-linux.c: Re-generated.
6081         * features/i386/32bit-sse.c: Likewise.
6082         * target-descriptions.c (print_c_feature::visit): Print code to
6083         set register number if needed.
6084         (print_c_feature) <m_next_regnum>: New field.
6085
6086 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6087
6088         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6089         (FEATURE_XMLFILES): New.
6090         (FEATURE_CFILES): New.
6091         New rules.
6092         (clean-cfiles): Remove generated c files.
6093         * features/i386/32bit-avx.c: Generated.
6094         * features/i386/32bit-avx512.c: Generated.
6095         * features/i386/32bit-core.c: Generated.
6096         * features/i386/32bit-linux.c: Generated.
6097         * features/i386/32bit-mpx.c: Generated.
6098         * features/i386/32bit-pkeys.c: Generated.
6099         * features/i386/32bit-sse.c: Generated.
6100         * target-descriptions.c: Include algorithm.
6101         (tdesc_element_visitor): Add method visit_end.
6102         (print_c_tdesc): Implement visit_end.
6103         (print_c_tdesc:: m_filename_after_features): Move it to
6104         protected.
6105         (print_c_feature): New class.
6106         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6107         name starts with "i386/32bit-".
6108
6109 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6110
6111         * target-descriptions.c (tdesc_element_visitor): New class.
6112         (tdesc_element): New class.
6113         (tdesc_reg): Inherit from tdesc_element.
6114         (tdesc_reg::accept): New function.
6115         (tdesc_type): Inherit from tdesc_element.
6116         (tdesc_type::accept): New function.
6117         (tdesc_feature): Inherit from tdesc_element.
6118         (tdesc_feature::accept): New function.
6119         (target_desc): Inherit from tdesc_element.
6120         (target_desc::target_desc): New.
6121         (target_desc::~target_desc): New.
6122         (target_desc::accept): New.
6123         (allocate_target_description): Use new.
6124         (free_target_description): Use delete.
6125         (print_c_tdesc): New class.
6126         (maint_print_c_tdesc_cmd): Adjust.
6127
6128         * features/aarch64.c: Re-generated.
6129         * features/arc-arcompact.c: Re-generated.
6130         * features/arc-v2.c: Re-generated.
6131         * features/arm/arm-with-iwmmxt.c: Re-generated.
6132         * features/arm/arm-with-m.c: Re-generated.
6133         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6134         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6135         * features/arm/arm-with-neon.c: Re-generated.
6136         * features/arm/arm-with-vfpv2.c: Re-generated.
6137         * features/arm/arm-with-vfpv3.c: Re-generated.
6138         * features/i386/amd64-avx-avx512.c: Re-generated.
6139         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6140         * features/i386/amd64-avx.c: Re-generated.
6141         * features/i386/amd64-avx-linux.c: Re-generated.
6142         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6143         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6144         * features/i386/amd64-avx-mpx.c: Re-generated.
6145         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6146         * features/i386/amd64.c: Re-generated.
6147         * features/i386/amd64-linux.c: Re-generated.
6148         * features/i386/amd64-mpx.c: Re-generated.
6149         * features/i386/amd64-mpx-linux.c: Re-generated.
6150         * features/i386/i386-avx-avx512.c: Re-generated.
6151         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6152         * features/i386/i386-avx.c: Re-generated.
6153         * features/i386/i386-avx-linux.c: Re-generated.
6154         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6155         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6156         * features/i386/i386-avx-mpx.c: Re-generated.
6157         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6158         * features/i386/i386.c: Re-generated.
6159         * features/i386/i386-linux.c: Re-generated.
6160         * features/i386/i386-mmx.c: Re-generated.
6161         * features/i386/i386-mmx-linux.c: Re-generated.
6162         * features/i386/i386-mpx.c: Re-generated.
6163         * features/i386/i386-mpx-linux.c: Re-generated.
6164         * features/i386/x32-avx-avx512.c: Re-generated.
6165         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6166         * features/i386/x32-avx.c: Re-generated.
6167         * features/i386/x32-avx-linux.c: Re-generated.
6168         * features/i386/x32.c: Re-generated.
6169         * features/i386/x32-linux.c: Re-generated.
6170         * features/microblaze.c: Re-generated.
6171         * features/microblaze-with-stack-protect.c: Re-generated.
6172         * features/mips64-dsp-linux.c: Re-generated.
6173         * features/mips64-linux.c: Re-generated.
6174         * features/mips-dsp-linux.c: Re-generated.
6175         * features/mips-linux.c: Re-generated.
6176         * features/nds32.c: Re-generated.
6177         * features/nios2.c: Re-generated.
6178         * features/nios2-linux.c: Re-generated.
6179         * features/rs6000/powerpc-32.c: Re-generated.
6180         * features/rs6000/powerpc-32l.c: Re-generated.
6181         * features/rs6000/powerpc-403.c: Re-generated.
6182         * features/rs6000/powerpc-403gc.c : Re-generated.
6183         * features/rs6000/powerpc-405.c: Re-generated.
6184         * features/rs6000/powerpc-505.c: Re-generated.
6185         * features/rs6000/powerpc-601.c: Re-generated.
6186         * features/rs6000/powerpc-602.c: Re-generated.
6187         * features/rs6000/powerpc-603.c: Re-generated.
6188         * features/rs6000/powerpc-604.c: Re-generated.
6189         * features/rs6000/powerpc-64.c: Re-generated.
6190         * features/rs6000/powerpc-64l.c: Re-generated.
6191         * features/rs6000/powerpc-7400.c: Re-generated.
6192         * features/rs6000/powerpc-750.c: Re-generated.
6193         * features/rs6000/powerpc-860.c: Re-generated.
6194         * features/rs6000/powerpc-altivec32.c: Re-generated.
6195         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6196         * features/rs6000/powerpc-altivec64.c: Re-generated.
6197         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6198         * features/rs6000/powerpc-cell32l.c: Re-generated.
6199         * features/rs6000/powerpc-cell64l.c: Re-generated.
6200         * features/rs6000/powerpc-e500.c: Re-generated.
6201         * features/rs6000/powerpc-e500l.c: Re-generated.
6202         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6203         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6204         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6205         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6206         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6207         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6208         * features/rs6000/powerpc-vsx32.c: Re-generated.
6209         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6210         * features/rs6000/powerpc-vsx64.c: Re-generated.
6211         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6212         * features/rs6000/rs6000.c: Re-generated.
6213         * features/s390-linux32.c: Re-generated.
6214         * features/s390-linux32v1.c: Re-generated.
6215         * features/s390-linux32v2.c: Re-generated.
6216         * features/s390-linux64.c: Re-generated.
6217         * features/s390-linux64v1.c: Re-generated.
6218         * features/s390-linux64v2.c: Re-generated.
6219         * features/s390-te-linux64.c: Re-generated.
6220         * features/s390-tevx-linux64.c: Re-generated.
6221         * features/s390-vx-linux64.c: Re-generated.
6222         * features/s390x-linux64.c: Re-generated.
6223         * features/s390x-linux64v1.c: Re-generated.
6224         * features/s390x-linux64v2.c: Re-generated.
6225         * features/s390x-te-linux64.c: Re-generated.
6226         * features/s390x-tevx-linux64.c: Re-generated.
6227         * features/s390x-vx-linux64.c: Re-generated.
6228         * features/sparc/sparc32-solaris.c: Re-generated.
6229         * features/sparc/sparc64-solaris.c: Re-generated.
6230         * features/tic6x-c62x.c: Re-generated.
6231         * features/tic6x-c62x-linux.c: Re-generated.
6232         * features/tic6x-c64x.c: Re-generated.
6233         * features/tic6x-c64x-linux.c: Re-generated.
6234         * features/tic6x-c64xp.c: Re-generated.
6235         * features/tic6x-c64xp-linux.c: Re-generated.
6236
6237 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6238
6239         * i386-linux-tdep.c (i386_linux_read_description): New function.
6240         (i386_linux_core_read_description): Call
6241         i386_linux_read_description.
6242         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6243         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6244         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6245         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6246         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6247         * x86-linux-nat.c (x86_linux_read_description): Call
6248         i386_linux_read_description.
6249
6250 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6251
6252         * NEWS: Mention it.
6253         * features/Makefile (%.c: %.xml): Pass the xml file name to
6254         command "maint print c-tdesc".
6255         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6256         name from 'arg'.
6257
6258 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6259
6260         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6261         in-class initialization.
6262         (tdesc_create_feature): Call new instead of XCNEW.
6263         (free_target_description): Ue delete.
6264
6265 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6266
6267         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6268
6269 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6270
6271         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6272         constant.
6273         (amd64_x32_init_abi): Likewise.
6274         * amd64-tdep.h (amd64_init_abi): Update declaration.
6275         (amd64_x32_init_abi): Likewise.
6276
6277 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6278
6279         PR tdep/21717
6280         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6281         condition for FPSCR.
6282         (arm_linux_store_inferior_registers): Likewise.
6283
6284 2017-07-22  Tom Tromey  <tom@tromey.com>
6285
6286         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6287         <syscalls_counts>: Now a std::vector.
6288         (get_catch_syscall_inferior_data): Use "new".
6289         (catch_syscall_inferior_data_cleanup): Use "delete".
6290         (insert_catch_syscall, remove_catch_syscall)
6291         (clear_syscall_counts): Update.
6292
6293 2017-07-22  Tom Tromey  <tom@tromey.com>
6294
6295         * break-catch-syscall.c (syscall_catchpoint)
6296         <syscalls_to_be_caught>: Now a std::vector<int>
6297         (~syscall_catchpoint): Remove.
6298         (insert_catch_syscall, remove_catch_syscall)
6299         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6300         (print_mention_catch_syscall, print_recreate_catch_syscall):
6301         Update.
6302         (create_syscall_event_catchpoint): Change type of "filter"
6303         parameter.
6304         (catch_syscall_split_args): Return a std::vector.
6305         (catch_syscall_command_1, catching_syscall_number_1): Update.
6306
6307 2017-07-22  Tom Tromey  <tom@tromey.com>
6308
6309         * break-catch-throw.c (struct exception_catchpoint)
6310         <exception_rx>: Now a std::string.
6311         (~exception_catchpoint): Remove.
6312         (print_one_detail_exception_catchpoint): Update.
6313         (handle_gnu_v3_exceptions): Change type of except_rx.
6314         (extract_exception_regexp): Return a std::string.
6315         (catch_exception_command_1): Update.
6316
6317 2017-07-22  Tom Tromey  <tom@tromey.com>
6318
6319         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6320         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6321         std::vector.
6322         <catch_all>: Now a bool.
6323         (~signal_catchpoint): Remove.
6324         (signal_catchpoint_insert_location)
6325         (signal_catchpoint_remove_location)
6326         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6327         (signal_catchpoint_print_mention)
6328         (signal_catchpoint_print_recreate)
6329         (signal_catchpoint_explains_signal): Update.
6330         (create_signal_catchpoint): Change type of "filter" and
6331         "catch_all".
6332         (catch_signal_split_args): Return a std::vector.  Change type of
6333         "catch_all".
6334         (catch_signal_command): Update.
6335
6336 2017-07-20  Pedro Alves  <palves@redhat.com>
6337
6338         * ada-lang.c (ada_language_defn): Make extern.
6339         (_initialize_ada_language): Remove add_language call.
6340         * c-lang.c (c_language_defn, cplus_language_defn)
6341         (asm_language_defn, minimal_language_defn): Make extern.
6342         (_initialize_c_language): Delete.
6343         * completer.c (compare_cstrings): Delete, moved to utils.h.
6344         * d-lang.c (d_language_defn): Make extern.
6345         (_initialize_d_language): Remove add_language calls.
6346         * defs.h (enum language): Add comment.
6347         * f-lang.c (f_language_defn): Make extern.
6348         (_initialize_f_language): Remove add_language call.
6349         * go-lang.c (go_language_defn): Make extern.
6350         (_initialize_go_language): Remove add_language call.
6351         * language.c: Include <algorithm>.
6352         (languages): Redefine as const array.
6353         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6354         (set_language_command): Handle "local".  Use for-range loop.
6355         (set_language): Remove loop.
6356         (language_enum): Rewrite.
6357         (language_def, language_str): Remove loops.
6358         (add_language): Delete.
6359         (add_set_language_command): New, based on add_languages.
6360         (skip_language_trampoline): Adjust.
6361         (local_language_defn): Delete.
6362         (language_gdbarch_post_init): Adjust.
6363         (_initialize_language): Remove add_language calls.  Call
6364         add_set_language_command.
6365         * language.h (add_language): Delete.
6366         (auto_language_defn)
6367         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6368         (asm_language_defn, c_language_defn, cplus_language_defn)
6369         (d_language_defn, f_language_defn, go_language_defn)
6370         (m2_language_defn, objc_language_defn, opencl_language_defn)
6371         (pascal_language_defn, rust_language_defn): Declare.
6372         * m2-lang.c (m2_language_defn): Make extern.
6373         (_initialize_m2_language): Remove add_language call.
6374         * objc-lang.c (objc_language_defn): Make extern.
6375         (_initialize_objc_language): Remove add_language call.
6376         * opencl-lang.c (opencl_language_defn): Make extern.
6377         (_initialize_opencl_language): Remove add_language call.
6378         * p-lang.c (pascal_language_defn): Make extern.
6379         (_initialize_pascal_language): Delete.
6380         * rust-lang.c (rust_language_defn): Make extern.
6381         (_initialize_rust_language): Delete.
6382         * utils.h (compare_cstrings): New static inline function.
6383
6384 2017-07-20  Pedro Alves  <palves@redhat.com>
6385
6386         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6387         (get_var_value): Constify parameters.
6388         (get_int_var_value): Change prototype.
6389         (to_fixed_range_type): Adjust.
6390         * ada-lang.h (get_int_var_value): Change prototype.
6391
6392 2017-07-20  Pedro Alves  <palves@redhat.com>
6393
6394         * dwarf2read.c (dw2_lookup_symbol): Use
6395         SYMBOL_MATCHES_SEARCH_NAME.
6396         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6397
6398 2017-07-20  Pedro Alves  <palves@redhat.com>
6399
6400         * block.c (block_iter_name_step, block_iter_name_first)
6401         (block_iter_name_next): Delete.
6402         (block_lookup_symbol_primary): Adjust to use
6403         dict_iter_match_first/dict_iter_match_next.
6404         * block.h (block_iter_name_first, block_iter_name_next): Delete
6405         declarations.
6406         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6407         dict_iter_match_first/dict_iter_match_next.
6408
6409 2017-07-20  Pedro Alves  <palves@redhat.com>
6410
6411         * cp-support.c (cp_find_first_component_aux): Add missing case for
6412         end of string.
6413
6414 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6415
6416         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6417         of dwo_cu's dwo_file.
6418
6419 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6420
6421         * remote.c (store_registers_using_G): Remove one line comment.
6422
6423 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6424
6425         * regcache.c (regcache_cpy): Simplify it.
6426         (regcache::cpy_no_passthrough): Remove it.
6427         * regcache.h (cpy_no_passthrough): Remove it.
6428         (regcache_dup, regcache_cpy): Update comments.
6429
6430 2017-07-18  Pedro Alves  <palves@redhat.com>
6431
6432         * remote-sim.c (sim_command_completer): Adjust to work with a
6433         completion_tracker instead of a VEC.
6434
6435 2017-07-17  Pedro Alves  <palves@redhat.com>
6436
6437         * completer.c (complete_source_filenames): New function.
6438         (complete_address_and_linespec_locations): New function.
6439         (location_completer): Use complete_address_and_linespec_locations.
6440         (completion_tracker::build_completion_result): Honor the tracker's
6441         request to suppress append.
6442         * completer.h (completion_tracker::suppress_append_ws)
6443         (completion_tracker::set_suppress_append_ws): New methods.
6444         (completion_tracker::m_suppress_append_ws): New field.
6445         (complete_source_filenames): New declaration.
6446         * linespec.c (linespec_complete_what): New.
6447         (struct ls_parser) <complete_what, completion_word,
6448         completion_quote_char, completion_quote_end, completion_tracker>:
6449         New fields.
6450         (string_find_incomplete_keyword_at_end): New.
6451         (linespec_lexer_lex_string): Record quote char.  If in completion
6452         mode, don't throw.
6453         (linespec_lexer_consume_token): Advance the completion word point.
6454         (linespec_lexer_peek_token): Save/restore completion info.
6455         (save_stream_and_consume_token): New.
6456         (set_completion_after_number): New.
6457         (linespec_parse_basic): Set what to complete next depending on
6458         token.  Handle function and label completions specially.
6459         (parse_linespec): Disable objc shortcut in completion mode.  Set
6460         what to complete next depending on token type.  Skip keyword if in
6461         completion mode.
6462         (complete_linespec_component, linespec_complete): New.
6463         * linespec.h (linespec_complete): Declare.
6464
6465 2017-07-17  Pedro Alves  <palves@redhat.com>
6466
6467         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6468         Handle 'operator<' / 'operator<<'.
6469
6470 2017-07-17  Pedro Alves  <palves@redhat.com>
6471
6472         * completer.c (collect_explicit_location_matches): Handle
6473         MATCH_LABEL.
6474         (convert_explicit_location_to_linespec): New, factored out from
6475         ...
6476         (convert_explicit_location_to_sals): ... this.
6477         (complete_label): New.
6478         (linespec_complete_label, find_label_symbols_in_block): New.
6479         (find_label_symbols): Add completion_mode parameter and adjust to
6480         call find_label_symbols_in_block.
6481         * linespec.h (linespec_complete_label): Declare.
6482
6483 2017-07-17  Pedro Alves  <palves@redhat.com>
6484
6485         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6486         complete_symbol_mode parameter.
6487         * cli/cli-cmds.c (complete_command): Get the completion result out
6488         of the handle_brkchars tracker if used a custom word point.
6489         * completer.c: Include "linespec.h".
6490         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6491         (advance_to_expression_complete_word_point): New.
6492         (completion_tracker::completes_to_completion_word): New.
6493         (complete_files_symbols): Pass down
6494         complete_symbol_mode::EXPRESSION.
6495         (explicit_options, probe_options): New.
6496         (collect_explicit_location_matches): Complete on the
6497         explictit_loc->foo instead of word.  Use
6498         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6499         keyword and options completions.
6500         (backup_text_ptr): Delete.
6501         (skip_keyword): New.
6502         (complete_explicit_location): Remove 'word' parameter.  Add
6503         language, quoted_arg_start and quoted_arg_end parameters.
6504         Rewrite, parsing left to right.
6505         (location_completer): Rewrite.
6506         (location_completer_handle_brkchars): New function.
6507         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6508         (enum complete_line_internal_reason): Adjust comments.
6509         (completion_tracker::discard_completions): New.
6510         (completer_handle_brkchars_func_for_completer): Handle
6511         location_completer.
6512         (gdb_custom_word_point_brkchars)
6513         (gdb_org_rl_basic_quote_characters): New.
6514         (gdb_completion_word_break_characters_throw)
6515         (completion_find_completion_word): Handle trackers that use a
6516         custom word point.
6517         (completion_tracker::advance_custom_word_point_by): New.
6518         (completion_tracker::build_completion_result): Don't rely on
6519         readline appending the quote char.
6520         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6521         use a custom word point.
6522         (gdb_rl_attempted_completion_function): Restore
6523         rl_basic_quote_characters.
6524         * completer.h (class completion_tracker): Extend intro comment.
6525         (completion_tracker::set_quote_char)
6526         (completion_tracker::quote_char)
6527         (completion_tracker::set_use_custom_word_point)
6528         (completion_tracker::use_custom_word_point)
6529         (completion_tracker::custom_word_point)
6530         (completion_tracker::set_custom_word_point)
6531         (completion_tracker::advance_custom_word_point_by)
6532         (completion_tracker::completes_to_completion_word)
6533         (completion_tracker::discard_completions): New methods.
6534         (completion_tracker::m_quote_char)
6535         (completion_tracker::m_use_custom_word_point)
6536         (completion_tracker::m_custom_word_point): New fields.
6537         (advance_to_expression_complete_word_point): Declare.
6538         * f-lang.c (f_collect_symbol_completion_matches): Add
6539         complete_symbol_mode parameter.
6540         * language.h (struct language_defn)
6541         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6542         parameter.
6543         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6544         (linespec_complete_function): New function.
6545         (linespec_lexer_lex_keyword): Adjust.
6546         * linespec.h (linespec_keywords, linespec_complete_function): New
6547         declarations.
6548         * location.c (find_end_quote): New function.
6549         (explicit_location_lex_one): Add explicit_completion_info
6550         parameter.  Save quoting info.  Don't throw if being called for
6551         completion.  Don't handle Ada operators here.
6552         (is_cp_operator, skip_op_false_positives, first_of)
6553         (explicit_location_lex_one_function): New function.
6554         (string_to_explicit_location): Replace 'dont_throw' parameter with
6555         an explicit_completion_info pointer parameter.  Handle it.  Don't
6556         use explicit_location_lex_one to lex function names.  Use
6557         explicit_location_lex_one_function instead.
6558         * location.h (struct explicit_completion_info): New.
6559         (string_to_explicit_location): Replace 'dont_throw' parameter with
6560         an explicit_completion_info pointer parameter.
6561         * symtab.c (default_collect_symbol_completion_matches_break_on):
6562         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6563         (default_collect_symbol_completion_matches)
6564         (collect_symbol_completion_matches): Add complete_symbol_mode
6565         parameter.
6566         (collect_symbol_completion_matches_type): Pass down
6567         complete_symbol_mode::EXPRESSION.
6568         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6569         parameter.  Handle LINESPEC mode.
6570         * symtab.h (complete_symbol_mode): New.
6571         (default_collect_symbol_completion_matches_break_on)
6572         (default_collect_symbol_completion_matches)
6573         (collect_symbol_completion_matches)
6574         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6575         parameter.
6576
6577 2017-07-17  Pedro Alves  <palves@redhat.com>
6578
6579         * utils.c (enum class strncmp_iw_mode): New.
6580         (strcmp_iw): Rename to ...
6581         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6582         parameters.  Handle them.
6583         (strncmp_iw): New.
6584         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6585         * utils.h (strncmp_iw): Declare.
6586         (strcmp_iw): Move describing comments here.
6587
6588 2017-07-17  Pedro Alves  <palves@redhat.com>
6589
6590         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6591         CP_OPERATOR_STR.
6592         * c-typeprint.c (is_type_conversion_operator): Use
6593         CP_OPERATOR_STR.
6594         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6595         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6596         CP_OPERATOR_LEN.
6597         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6598         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6599         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6600         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6601         CP_OPERATOR_STR.
6602         * location.c: Include "cp-support.h".
6603         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6604         CP_OPERATOR_STR.
6605         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6606         CP_OPERATOR_LEN.
6607
6608 2017-07-17  Pedro Alves  <palves@redhat.com>
6609
6610         * cli/cli-cmds.c (complete_command): Use a completion tracker
6611         along with completion_find_completion_word for handle_brkchars
6612         phase.
6613         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6614         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6615         (struct gdb_rl_completion_word_info): New.
6616         (gdb_rl_find_completion_word): New.
6617         (completion_find_completion_word): New.
6618         * completer.h (completion_find_completion_word): Declare.
6619
6620 2017-07-17  Pedro Alves  <palves@redhat.com>
6621
6622         * ada-lang.c (symbol_completion_match): Adjust comments.
6623         (symbol_completion_add): Replace vector parameter with
6624         completion_tracker parameter.  Use it.
6625         (ada_make_symbol_completion_list): Rename to...
6626         (ada_collect_symbol_completion_matches): ... this.  Add
6627         completion_tracker parameter and use it.
6628         (ada_language_defn): Adjust.
6629         * break-catch-syscall.c (catch_syscall_completer): Adjust
6630         prototype and work with completion_tracker instead of VEC.
6631         * breakpoint.c (condition_completer): Adjust prototype and work
6632         with completion_tracker instead of VEC.
6633         * c-lang.c (c_language_defn, cplus_language_defn)
6634         (asm_language_defn, minimal_language_defn): Adjust to renames.
6635         * cli/cli-cmds.c (complete_command): Rework using
6636         completion_tracker.  Catch exceptions when completing.
6637         * cli/cli-decode.c (integer_unlimited_completer)
6638         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6639         with completion_tracker instead of VEC.
6640         * command.h (struct completion_tracker): Forward declare.
6641         (completer_ftype, completer_handle_brkchars_ftype): Change
6642         types.
6643         (complete_on_cmdlist, complete_on_enum): Adjust.
6644         * completer.c: Include <algorithm>.
6645         (struct gdb_completer_state): New.
6646         (current_completion): New global.
6647         (readline_line_completion_function): Delete.
6648         (noop_completer, filename_completer)
6649         (filename_completer_handle_brkchars, complete_files_symbols)
6650         (linespec_location_completer): Adjust to work with a
6651         completion_tracker instead of a VEC.
6652         (string_or_empty): New.
6653         (collect_explicit_location_matches): Adjust to work with a
6654         completion_tracker instead of a VEC.
6655         (explicit_location_completer): Rename to ...
6656         (complete_explicit_location): ... this and adjust to work with a
6657         completion_tracker instead of a VEC.
6658         (location_completer): Adjust to work with a completion_tracker
6659         instead of a VEC.
6660         (add_struct_fields): Adjust to work with a completion_list instead
6661         of VEC.
6662         (expression_completer): Rename to ...
6663         (complete_expression): ... this and adjust to work with a
6664         completion_tracker instead of a VEC.  Use complete_files_symbols.
6665         (expression_completer): Reimplement on top of complete_expression.
6666         (symbol_completer): Adjust to work with a completion_tracker
6667         instead of a VEC.
6668         (enum complete_line_internal_reason): Add describing comments.
6669         (complete_line_internal_normal_command): Adjust to work with a
6670         completion_tracker instead of a VEC.
6671         (complete_line_internal): Rename to ...
6672         (complete_line_internal_1): ... this and adjust to work with a
6673         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6674         handle_brkchars phase.
6675         (new_completion_tracker): Delete.
6676         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6677         complete_line_internal_1.
6678         (free_completion_tracker): Delete.
6679         (INITIAL_COMPLETION_HTAB_SIZE): New.
6680         (completion_tracker::completion_tracker)
6681         (completion_tracker::~completion_tracker): New.
6682         (maybe_add_completion): Delete.
6683         (completion_tracker::maybe_add_completion)
6684         (completion_tracker::add_completion)
6685         (completion_tracker::add_completions): New.
6686         (throw_max_completions_reached_error): Delete.
6687         (complete_line): Adjust to work with a completion_tracker instead
6688         of a VEC.  Don't create a completion_tracker_t or check for max
6689         completions here.
6690         (command_completer, command_completer_handle_brkchars)
6691         (signal_completer, reg_or_group_completer_1)
6692         (reg_or_group_completer, default_completer_handle_brkchars):
6693         Adjust to work with a completion_tracker.
6694         (gdb_completion_word_break_characters_throw): New.
6695         (gdb_completion_word_break_characters): Reimplement.
6696         (line_completion_function): Delete.
6697         (completion_tracker::recompute_lowest_common_denominator)
6698         (expand_preserving_ws)
6699         (completion_tracker::build_completion_result)
6700         (completion_result::completion_result)
6701         (completion_result::completion_result)
6702         (completion_result::~completion_result)
6703         (completion_result::completion_result)
6704         (completion_result::release_match_list, compare_cstrings)
6705         (completion_result::sort_match_list)
6706         (completion_result::reset_match_list)
6707         (gdb_rl_attempted_completion_function_throw)
6708         (gdb_rl_attempted_completion_function): New.
6709         * completer.h (completion_list, struct completion_result)
6710         (class completion_tracker): New.
6711         (complete_line): Add completion_tracker parameter.
6712         (readline_line_completion_function): Delete.
6713         (gdb_rl_attempted_completion_function): New.
6714         (noop_completer, filename_completer, expression_completer)
6715         (location_completer, symbol_completer, command_completer)
6716         (signal_completer, reg_or_group_completer): Update prototypes.
6717         (completion_tracker_t, new_completion_tracker)
6718         (make_cleanup_free_completion_tracker): Delete.
6719         (enum maybe_add_completion_enum): Delete.
6720         (maybe_add_completion): Delete.
6721         (throw_max_completions_reached_error): Delete.
6722         * corefile.c (complete_set_gnutarget): Adjust to work with a
6723         completion_tracker instead of a VEC.
6724         * cp-abi.c (cp_abi_completer): Adjust to work with a
6725         completion_tracker instead of a VEC.
6726         * d-lang.c (d_language_defn): Adjust.
6727         * disasm.c (disassembler_options_completer): Adjust to work with a
6728         completion_tracker instead of a VEC.
6729         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6730         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6731         with a completion_tracker instead of a VEC.
6732         (f_language_defn): Adjust.
6733         * go-lang.c (go_language_defn): Adjust.
6734         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6735         Adjust to work with a completion_tracker instead of a VEC.
6736         * infrun.c (handle_completer): Likewise.
6737         * interps.c (interpreter_completer): Likewise.
6738         * interps.h (interpreter_completer): Likewise.
6739         * language.c (unknown_language_defn, auto_language_defn)
6740         (local_language_defn): Adjust.
6741         * language.h (language_defn::la_make_symbol_completion_list):
6742         Rename to ...
6743         (language_defn::la_collect_symbol_completion_matches): ... this
6744         and adjust to work with a completion_tracker instead of a VEC.
6745         * m2-lang.c (m2_language_defn): Adjust.
6746         * objc-lang.c (objc_language_defn): Adjust.
6747         * opencl-lang.c (opencl_language_defn): Adjust.
6748         * p-lang.c (pascal_language_defn): Adjust.
6749         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6750         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6751         with a completion_tracker.
6752         * rust-lang.c (rust_language_defn): Adjust.
6753         * symtab.c (free_completion_list, do_free_completion_list)
6754         (return_val, completion_tracker): Delete.
6755         (completion_list_add_name, completion_list_add_symbol)
6756         (completion_list_add_msymbol, completion_list_objc_symbol)
6757         (completion_list_add_fields, add_symtab_completions): Add
6758         completion_tracker parameter and use it.
6759         (default_make_symbol_completion_list_break_on_1): Rename to...
6760         (default_collect_symbol_completion_matches_break_on): ... this.
6761         Add completion_tracker parameter and use it instead of allocating
6762         a completion tracker here.
6763         (default_make_symbol_completion_list_break_on): Delete old
6764         implementation.
6765         (default_make_symbol_completion_list): Delete.
6766         (default_collect_symbol_completion_matches): New.
6767         (make_symbol_completion_list): Delete.
6768         (collect_symbol_completion_matches): New.
6769         (make_symbol_completion_type): Rename to ...
6770         (collect_symbol_completion_matches_type): ... this.  Add
6771         completion_tracker parameter and use it instead of VEC.
6772         (make_file_symbol_completion_list_1): Rename to...
6773         (collect_file_symbol_completion_matches): ... this.  Add
6774         completion_tracker parameter and use it instead of VEC.
6775         (make_file_symbol_completion_list): Delete.
6776         (add_filename_to_list): Use completion_list instead of a VEC.
6777         (add_partial_filename_data::list): Now a completion_list.
6778         (make_source_files_completion_list): Work with a completion_list
6779         instead of a VEC.
6780         * symtab.h: Include "completer.h".
6781         (default_make_symbol_completion_list_break_on)
6782         (default_make_symbol_completion_list, make_symbol_completion_list)
6783         (make_symbol_completion_type, make_file_symbol_completion_list)
6784         (make_source_files_completion_list): Delete.
6785         (default_collect_symbol_completion_matches_break_on)
6786         (default_collect_symbol_completion_matches)
6787         (collect_symbol_completion_matches)
6788         (collect_symbol_completion_matches_type)
6789         (collect_file_symbol_completion_matches)
6790         (make_source_files_completion_list): New.
6791         * top.c (init_main): Don't install a rl_completion_entry_function
6792         hook.  Install a rl_attempted_completion_function hook instead.
6793         * tui/tui-layout.c (layout_completer): Adjust to work with a
6794         completion_tracker.
6795         * tui/tui-regs.c (tui_reggroup_completer):
6796         * tui/tui-win.c (window_name_completer, focus_completer)
6797         (winheight_completer): Adjust to work with a completion_tracker.
6798         * value.c: Include "completer.h".
6799         (complete_internalvar): Adjust to work with a completion_tracker.
6800         * value.h (complete_internalvar): Likewise.
6801
6802 2017-07-17  Pedro Alves  <palves@redhat.com>
6803
6804         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6805         renames.
6806         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6807         comments to completer_ftype's declaration.
6808         <completer_handle_brkchars>: Change type to
6809         completer_handle_brkchars_ftype.
6810         * command.h (completer_ftype): Add describing comment and give
6811         names to parameters.
6812         (completer_ftype_void): Rename to ...
6813         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6814         (set_cmd_completer_handle_brkchars): Adjust.
6815         * completer.c (filename_completer_handle_brkchars): New function.
6816         (complete_line_internal_normal_command): New function, factored
6817         out from ...
6818         (complete_line_internal): ... here.
6819         (command_completer_handle_brkchars)
6820         (default_completer_handle_brkchars)
6821         (completer_handle_brkchars_func_for_completer): New functions.
6822         * completer.h (set_gdb_completion_word_break_characters): Delete
6823         declaration.
6824         (completer_handle_brkchars_func_for_completer): New declaration.
6825         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6826         completer_handle_brkchars_func_for_completer.
6827
6828 2017-07-17  Pedro Alves  <palves@redhat.com>
6829
6830         * completer.c (symbol_completer): New function, based on
6831         make_symbol_completion_list_fn.
6832         * completer.h (symbol_completer): New declaration.
6833         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6834         * python/py-cmd.c (completers): Adjust.
6835         * symtab.c (make_symbol_completion_list_fn): Delete.
6836         * symtab.h (make_symbol_completion_list_fn): Delete.
6837         * cli/cli-decode.c (add_cmd): Adjust.
6838
6839 2017-07-17  Pedro Alves  <palves@redhat.com>
6840
6841         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6842         * dwarf2read.c: Include "filename-seen-cache.h".
6843         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6844         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6845         * filename-seen-cache.c: New file.
6846         * filename-seen-cache.h: New file.
6847         * symtab.c: Include "filename-seen-cache.h".
6848         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6849         (create_filename_seen_cache, clear_filename_seen_cache)
6850         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6851         to filename-seen-cache.h/filename-seen-cache.c.
6852         (output_source_filename, sources_info)
6853         (maybe_add_partial_symtab_filename)
6854         (make_source_files_completion_list): Adjust to use
6855         filename_seen_cache.
6856
6857 2017-07-17  Pedro Alves  <palves@redhat.com>
6858
6859         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6860         fields.
6861         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6862         dwarf2_debug_sections*)): New.
6863         (dwarf2_per_objfile::dwarf2_per_objfile(const
6864         dwarf2_per_objfile&)): Declare as deleted.
6865         (dwarf2_per_objfile::operator=): Declare as deleted.
6866         (dwarf2_per_objfile::dwarf2_per_objfile)
6867         (dwarf2_per_objfile::~dwarf2_per_objfile)
6868         (dwarf2_per_objfile::free_cached_comp_units): New.
6869         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6870         ctor.  Call dwarf2_per_objfile's ctor manually.
6871         (dwarf2_locate_sections): Deleted/refactored as ...
6872         (dwarf2_per_objfile::locate_sections): ... this new method.
6873         (free_cached_comp_units): Defer to
6874         dwarf2_per_objfile::free_cached_comp_units.
6875         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6876
6877 2017-07-14  Tom Tromey  <tom@tromey.com>
6878
6879         PR rust/21764:
6880         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6881         parameter.
6882         <UNOP_SIZEOF>: Split into separate case.
6883         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6884
6885 2017-07-14  Tom Tromey  <tom@tromey.com>
6886
6887         PR rust/21763:
6888         * symtab.c (symbol_matches_domain): Add language_rust to special
6889         case.
6890         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6891         treat LOC_TYPEDEF symbols as variables.
6892
6893 2017-07-14  Pedro Alves  <palves@redhat.com>
6894
6895         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6896         symtabs matching all symtabs with SRCFILE as file name instead of
6897         only considering the first hit, with lookup_symtab.
6898
6899 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6900
6901         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6902         operator_name parameters.
6903         (gen_expr): Update function call.
6904
6905 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6906
6907         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6908         parameter.
6909         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6910         Likewise.
6911         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6912         parameter, use agent_expr::gdbarch instead, update function
6913         calls.
6914         (locexpr_tracepoint_var_ref): Likewise.
6915         (loclist_tracepoint_var_ref): Likewise.
6916         * ax-gdb.c (gen_trace_static_fields): Likewise.
6917         (gen_traced_pop): Likewise.
6918         (gen_frame_args_address): Likewise.
6919         (gen_frame_locals_address): Likewise.
6920         (gen_var_ref): Likewise.
6921         (gen_struct_ref_recursive): Likewise.
6922         (gen_static_field): Likewise.
6923         (gen_maybe_namespace_elt): Likewise.
6924         (gen_expr): Likewise.
6925         (gen_trace_for_var): Likewise.
6926         (gen_trace_for_expr): Likewise.
6927         (gen_trace_for_return_address): Likewise.
6928
6929 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6930
6931         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6932         parameter.
6933         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6934
6935 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6936
6937         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6938         from ax, update calls.
6939         (gen_usual_arithmetic): Likewise.
6940         (gen_integral_promotions): Likewise.
6941         (gen_bitfield_ref): Likewise.
6942         (gen_primitive_field): Likewise.
6943         (gen_struct_ref_recursive): Likewise.
6944         (gen_struct_ref): Likewise.
6945         (gen_maybe_namespace_elt): Likewise.
6946         (gen_struct_elt_for_reference): Likewise.
6947         (gen_namespace_elt): Likewise.
6948         (gen_aggregate_elt_ref): Likewise.
6949         (gen_expr): Get gdbarch from ax, update calls.
6950         (gen_expr_binop_rest): Likewise.
6951
6952 2017-07-13  Pedro Alves  <palves@redhat.com>
6953
6954         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6955         as default tdesc.
6956         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6957         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6958         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6959         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6960         tdep.
6961         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6962         Get final tdesc from the tdep.
6963         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6964         default tdesc.
6965         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6966         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6967         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6968         Use it as default tdesc.
6969         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6970         down to amd_init_abi.  No longer handle fallback tdesc here.
6971         * amd64-tdep.h (tdesc_x32): Declare.
6972         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6973         parameter.
6974         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6975         as default tdesc.
6976
6977 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6978
6979         * s390-linux-tdep.c (s390_process_record): Add support for
6980         instructions new in arch12.
6981
6982 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6983
6984         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6985         PT_GETFSBASE and PT_GETGSBASE.
6986         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6987         PT_SETGSBASE.
6988
6989 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6990
6991         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6992         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6993         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6994         those rules.
6995         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6996         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6997         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6998         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6999         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7000         * features/i386/amd64.xml: Add 64bit-segments.xml.
7001         * features/i386/amd64-avx-avx512.c: Regenerated.
7002         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7003         * features/i386/amd64-avx-mpx.c: Regenerated.
7004         * features/i386/amd64-avx.c: Regenerated.
7005         * features/i386/amd64-mpx.c: Regenerated.
7006         * features/i386/amd64.c: Regenerated.
7007         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7008         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7009         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7010         * regformats/i386/amd64-avx.dat: Regenerated.
7011         * regformats/i386/amd64-mpx.dat: Regenerated.
7012         * regformats/i386/amd64.dat: Regenerated.
7013
7014 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7015
7016         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7017         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7018
7019 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7020
7021         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7022         unsetenv.
7023         * gnulib/aclocal.m4: Regenerate.
7024         * gnulib/config.in: Regenerate.
7025         * gnulib/configure: Regenerate.
7026         * gnulib/import/Makefile.am: Regenerate.
7027         * gnulib/import/Makefile.in: Regenerate.
7028         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7029         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7030         * gnulib/import/m4/environ.m4: New file.
7031         * gnulib/import/m4/setenv.m4: New file.
7032         * gnulib/import/setenv.c: New file.
7033         * gnulib/import/unsetenv.c: New file.
7034
7035 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7036
7037         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7038         address when op is DW_OP_addr.
7039
7040 2017-07-09  Tom Tromey  <tom@tromey.com>
7041
7042         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7043         check and apply to outer type.
7044
7045 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7046
7047         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7048         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7049         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7050         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7051
7052 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7053
7054         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7055
7056 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7057
7058         * corelow.c (get_core_siginfo): Remove.
7059         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7060         instead of get_core_siginfo.
7061         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7062         * gdbarch.h: Re-generate.
7063         * gdbarch.c: Re-generate.
7064         * linux-tdep.c (linux_core_xfer_siginfo): New.
7065         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7066
7067 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7068
7069         * corelow.c (thread_section_name): Move to ...
7070         * gdbcore.h (thread_section_name): ... here.
7071
7072 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7073
7074         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7075         (struct siginfo32): New.
7076         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7077         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7078         via ptrace(PT_LWPINFO).
7079
7080 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7081
7082         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7083         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7084         (fbsd_get_siginfo_type): New.
7085         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7086         (_initialize_fbsd_tdep): New.
7087
7088 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7089
7090         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7091         a singular dwo_unit*) to support multiple CUs in the same way that
7092         multiple TUs are supported.
7093         (create_cus_hash_table): Replace create_dwo_cu with a function for
7094         parsing multiple CUs from a DWO file.
7095         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7096         create_dwo_cu.
7097         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7098         htab_find, rather than comparing the signature to a singleton CU in
7099         the dwo_file.
7100
7101 2017-07-06  Pedro Alves  <palves@redhat.com>
7102
7103         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7104
7105 2017-07-04  Pedro Alves  <palves@redhat.com>
7106
7107         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7108         * gdbtypes.h (TYPE_STATIC): Delete.
7109         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7110         is_synchronized, is_native>: Delete.
7111         <dummy>: Bump.
7112         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7113         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7114         (TYPE_FN_FIELD_ABSTRACT): Delete.
7115
7116 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7117
7118         * buffer.h (buffer_finish): Fix spelling mistakes.
7119
7120 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7121
7122         * .dir-locals.el: Automatically switch to C-style comments in
7123         versions of Emacs that support the feature.
7124
7125 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7126             Pedro Alves  <palves@redhat.com>
7127
7128         PR cli/21688
7129         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7130         (process_next_line): New variable 'inline_cmd'.
7131         Adjust 'if' clauses for "python", "compile" and "guile" to use
7132         'command_name_equals' and check for '!inline_cmd'.
7133
7134 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7135
7136         PR cli/21688
7137         * cli/cli-script.c (command_name_equals_not_inline): New function.
7138         (process_next_line): Adjust 'if' clauses for "python", "compile"
7139         and "guile" to use command_name_equals_not_inline.
7140
7141 2017-06-29  Pedro Alves  <palves@redhat.com>
7142
7143         * completer.c (expression_completer): Call
7144         linespec_location_completer instead of location_completer.
7145
7146 2017-06-29  Pedro Alves  <palves@redhat.com>
7147
7148         * completer.c (expression_completer): Remove code that recomputes
7149         'text' from 'word'.
7150
7151 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7152
7153         * regformats/regdat.sh: Generate code with
7154         "ifndef IN_PROCESS_AGENT".
7155
7156 2017-06-28  Pedro Alves  <palves@redhat.com>
7157
7158         * command.h: Include "common/scoped_restore.h".
7159
7160 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7161
7162         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7163         instead of obstack_grow.
7164
7165 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7166
7167         PR gdb/21337
7168         * symfile.c (reread_symbols): Call objfiles_changed just before
7169         read_symbols.
7170
7171 2017-06-27  Pedro Alves  <palves@redhat.com>
7172
7173         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7174         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7175         (completion_list_add_symbol, completion_list_add_msymbol):
7176         ... these new functions.
7177         (add_symtab_completions)
7178         (default_make_symbol_completion_list_break_on_1): Adjust.
7179
7180 2017-06-27  Pedro Alves  <palves@redhat.com>
7181
7182         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7183         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7184         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7185         dtor.
7186         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7187         'storage_obstack' field an auto_obstack.  In-class initialize all
7188         non-bitfield fields.  Make minsyms_read bool.
7189         * symfile.c (read_symbols): Adjust.
7190
7191 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7192
7193         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7194         (gdbsim_store_register): Likewise.
7195
7196 2017-06-27  Pedro Alves  <palves@redhat.com>
7197
7198         * c-exp.y (name_obstack): Now an auto_obstack.
7199         (yylex): Use auto_obstack::clear.
7200         (c_parse): Use auto_obstack::clear instead of reinitializing and
7201         freeing the obstack.
7202         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7203         * d-exp.y (name_obstack): Now an auto_obstack.
7204         (yylex): Use auto_obstack::clear.
7205         (d_parse): Use auto_obstack::clear instead of reinitializing and
7206         freeing the obstack.
7207         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7208         auto_obstack.
7209         * dwarf2read.c (create_addrmap_from_index)
7210         (dwarf2_build_psymtabs_hard)
7211         (update_enumeration_type_from_children): Likewise.
7212         * gdb_obstack.h (auto_obstack): New type.
7213         * go-exp.y (name_obstack): Now an auto_obstack.
7214         (build_packaged_name): Use auto_obstack::clear.
7215         (go_parse): Use auto_obstack::clear instead of reinitializing and
7216         freeing the obstack.
7217         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7218         auto_obstack.
7219         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7220         * rust-exp.y (work_obstack): Now an auto_obstack.
7221         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7222         reinitializing and freeing the obstack.
7223         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7224         (host_char_to_target): Use auto_obstack.
7225         * utils.h (make_cleanup_obstack_free): Delete declaration.
7226         * valprint.c (generic_emit_char, generic_printstr): Use
7227         auto_obstack.
7228
7229 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7230
7231         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7232         thread.
7233         (darwin_init_thread_list): Don't update dummy thread.
7234         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7235
7236 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7237
7238         * record-full.c (netorder16): Remove.
7239
7240 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7241
7242         * common/diagnostics.h: Define macros for GCC.
7243         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7244         * common/vec.h: Include diagnostics.h.
7245         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7246         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7247         warning.
7248
7249 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7250
7251         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7252         New macro.
7253         * ada-lex.l: Ignore deprecated register warnings.
7254
7255 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7256
7257         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7258         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7259
7260 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7261
7262         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7263         its own line.
7264
7265 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7266
7267         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7268
7269 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7270
7271         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7272         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7273         (xtensa_register_read_masked): Likewise.
7274
7275 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7276
7277         * common/environ.c (gdb_environ::unset): Update comment.
7278
7279 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7280
7281         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7282         registers.
7283
7284 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7285
7286         * record-full.c (record_full_exec_insn): Use byte_vector.
7287
7288 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7289
7290         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7291         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7292
7293 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7294
7295         * remote.c (cached_reg): Move from here...
7296         * regcache.h (cached_reg): ...to here.
7297         * python/py-unwind.c (struct reg_info): Remove.
7298         (cached_frame_info): Use cached_reg_t.
7299         (pyuw_prev_register): Likewise.
7300         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7301         (pyuw_dealloc_cache): Free all registers.
7302
7303 2017-06-22  Pedro Alves  <palves@redhat.com>
7304             Simon Marchi  <simon.marchi@ericsson.com>
7305
7306         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7307         warning.
7308         * common/diagnostics.h: New file.
7309
7310 2017-06-22  Pedro Alves  <palves@redhat.com>
7311
7312         * common/agent.h: Add include guards.
7313
7314 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7315
7316         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7317         talk about addressable units instead of bytes.
7318
7319 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7320
7321         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7322         of '::const_iterator'.
7323
7324 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7325
7326         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7327         'unittests/environ-selftests.c'.
7328         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7329         * charset.c (find_charset_names): Declare object 'iconv_env'.
7330         Update code to use 'iconv_env' object.  Remove call to
7331         'free_environ'.
7332         * common/environ.c: Include <utility>.
7333         (make_environ): Delete function.
7334         (free_environ): Delete function.
7335         (gdb_environ::clear): New function.
7336         (gdb_environ::operator=): New function.
7337         (gdb_environ::get): Likewise.
7338         (environ_vector): Delete function.
7339         (set_in_environ): Delete function.
7340         (gdb_environ::set): New function.
7341         (unset_in_environ): Delete function.
7342         (gdb_environ::unset): New function.
7343         (gdb_environ::envp): Likewise.
7344         * common/environ.h: Include <vector>.
7345         (struct gdb_environ): Delete; transform into...
7346         (class gdb_environ): ... this class.
7347         (free_environ): Delete prototype.
7348         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7349         environ_vector): Likewise.
7350         * infcmd.c (run_command_1): Update code to call
7351         'envp' from 'gdb_environ' class.
7352         (environment_info): Update code to call methods from 'gdb_environ'
7353         class.
7354         (unset_environment_command): Likewise.
7355         (path_info): Likewise.
7356         (path_command): Likewise.
7357         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7358         (inferior::inferior): Initialize 'environment' using the host's
7359         information.
7360         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7361         Include "environ.h".
7362         (class inferior) <environment>: Change type from 'struct
7363         gdb_environ' to 'gdb_environ'.
7364         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7365         methods from 'gdb_environ' class.
7366         * solib.c (solib_find_1): Likewise
7367         * unittests/environ-selftests.c: New file.
7368
7369 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7370
7371         * features/i386/i386-linux.xml: Exchange the order of including
7372         32bit-linux.xml and 32bit-sse.xml.
7373         * features/i386/i386-linux.c: Regenerated.
7374
7375 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7376
7377         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7378         Delete copy ctor and assignment operator.
7379         (tdesc_type): Likewise.
7380         (tdesc_feature): Likewise.
7381         (tdesc_free_reg): Remove.
7382         (tdesc_create_reg): Use new.
7383         (tdesc_free_type): Remove.
7384         (tdesc_create_vector): Use new.
7385         (tdesc_create_union): Likewise.
7386         (tdesc_create_flags): Likewise.
7387         (tdesc_create_enum): Likewise.
7388         (tdesc_free_feature): Delete.
7389         (free_target_description): Use delete.
7390
7391 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7392
7393         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7394         registers.
7395
7396 2017-06-19  Pedro Alves  <palves@redhat.com>
7397
7398         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7399         after gdb::unlinker.
7400
7401 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7402
7403         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7404         gdb_environ to access an environment variable.
7405
7406 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7407
7408         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7409         gdb_byte*.
7410
7411 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7412
7413         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7414
7415 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7416
7417         * configure: Re-generate.
7418         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7419
7420 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7421
7422         * configure: Re-generate.
7423         * warning.m4: Pass -Werror to compiler when checking for
7424         supported warning flags.
7425
7426 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * Makefile.in (COMPILE.pre): Add "-x c++".
7429
7430 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7431             Pedro Alves  <palves@redhat.com>
7432             Yao Qi  <yao.qi@linaro.org>
7433
7434         * defs.h (RequireLongest): New.
7435         (extract_integer): Declare function template.
7436         (extract_signed_integer): Remove the declaration, but define it
7437         static inline.
7438         (extract_unsigned_integer): Likewise.
7439         (store_integer): Declare function template.
7440         (store_signed_integer): Remove the declaration, but define it
7441         static inline.
7442         (store_unsigned_integer): Likewise.
7443         * findvar.c (extract_integer): New function template.
7444         (extract_signed_integer): Remove.
7445         (extract_unsigned_integer): Remove.
7446         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7447         instantiations.
7448         (store_integer): New function template.
7449         (store_signed_integer): Remove.
7450         (store_unsigned_integer): Remove.
7451         (store_integer): Explicit instantiations.
7452         * regcache.c (regcache_raw_read_signed): Update.
7453         (regcache::raw_read): New function.
7454         (regcache::raw_read_signed): Remove.
7455         (regcache::raw_read_unsigned): Remove.
7456         (regcache_raw_read_unsigned): Update.
7457         (regcache_raw_write_unsigned): Update.
7458         (regcache::raw_write_signed): Remove.
7459         (regcache::raw_write): New function.
7460         (regcache_cooked_read_signed): Update.
7461         (regcache::raw_write_unsigned): Remove.
7462         (regcache::cooked_read_signed): Remove.
7463         (regcache_cooked_read_unsigned): Update.
7464         (regcache::cooked_read_unsigned): Remove.
7465         (regcache_cooked_write_signed): Update.
7466         (regcache_cooked_write_unsigned): Update.
7467         * regcache.h (regcache) <raw_read_signed>: Remove.
7468         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7469         <raw_read, raw_write>: New.
7470         <cooked_read_signed, cooked_write_signed>: Remove.
7471         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7472         <cooked_read, cooked_write>: New.
7473         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7474         (sh64_pseudo_register_write): Update.
7475
7476 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7477
7478         * arc-tdep.c (arc_disassembler_options): New variable.
7479         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7480         of default_print_insn.
7481         (arc_delayed_print_insn): Set info->section when needed,
7482         use default_print_insn to retrieve a disassembler.
7483
7484 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7485
7486         PR gdb/21574
7487         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7488         to mention $SHELL and startup-with-shell.
7489
7490 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7491
7492         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7493
7494 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7495
7496         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7497         default_print_insn instead of print_insn_aarch64.
7498         * arm-tdep.c (gdb_print_insn_arm): Call
7499         default_print_insn instead of print_insn_big_arm
7500         and print_insn_little_arm.
7501         * i386-tdep.c (i386_print_insn): Call default_print_insn
7502         instead of print_insn_i386.
7503         * ia64-tdep.c (ia64_print_insn): Call
7504         default_print_insn instead of print_insn_ia64.
7505         * mips-tdep.c (gdb_print_insn_mips): Call
7506         default_print_insn instead of print_insn_big_mips
7507         and print_insn_little_mips.
7508         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7509         instead of print_insn_spu.
7510
7511 2017-06-14  Pedro Alves  <palves@redhat.com>
7512
7513         * ada-lang.c: Include "common/byte-vector.h".
7514         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7515         * charset.c (wchar_iterator::iterate): Resize the vector instead
7516         of reserving it.
7517         * common/byte-vector.h: Include "common/def-vector.h".
7518         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7519         * cli/cli-dump.c: Include "common/byte-vector.h".
7520         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7521         * common/byte-vector.h: New file.
7522         * common/def-vector.h: New file.
7523         * common/default-init-alloc.h: New file.
7524         * dwarf2loc.c: Include "common/byte-vector.h".
7525         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7526         instead of reserving it.
7527         * dwarf2read.c: Include "common/byte-vector.h".
7528         (data_buf::m_vec): Now a gdb::byte_vector.
7529         * gdb_regex.c: Include "common/def-vector.h".
7530         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7531         * mi/mi-main.c: Include "common/byte-vector.h".
7532         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7533         * printcmd.c: Include "common/byte-vector.h".
7534         (print_scalar_formatted): Use gdb::byte_vector.
7535         * valprint.c: Include "common/byte-vector.h".
7536         (maybe_negate_by_bytes, print_decimal_chars): Use
7537         gdb::byte_vector.
7538
7539 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7540
7541         * darwin-nat.c: Include "nat/fork-inferior.h".
7542
7543 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7544
7545         * configure.nat: Factor out Darwin bits that are not
7546         architecture-specific.  Add fork-inferior.o.
7547
7548 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7549
7550         * configure.nat: Factor out AIX bits that are not
7551         architecture-specific.  Add fork-inferior.o.
7552
7553 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7554
7555         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7556         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7557         wrappers that just call rw_pieced_value.
7558
7559 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7560
7561         * dwarf2loc.c (write_pieced_value): When writing the data for a
7562         memory piece, use write_memory_with_notification instead of
7563         write_memory.
7564
7565 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7566
7567         * valops.c (read_value_memory): Change embedded_offset to
7568         represent a bit offset instead of a byte offset.
7569         * value.h (read_value_memory): Adjust comment.
7570
7571 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7572
7573         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7574         dest_offset_bits and source_offset_bits.
7575         (write_pieced_value): Likewise.
7576
7577 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7578
7579         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7580         given by DW_OP_bit_piece.
7581         (write_pieced_value): Likewise.
7582
7583 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7584
7585         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7586         some other preparations to the places where sufficient information
7587         is available.
7588         (write_pieced_value): Likewise.
7589
7590 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7591
7592         * dwarf2loc.c (bits_to_bytes): New function.
7593         (read_pieced_value): Fix offset calculations for register pieces
7594         on big-endian targets.
7595         (write_pieced_value): Likewise.
7596
7597 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7598
7599         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7600         (write_pieced_value): Likewise.
7601
7602 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7603
7604         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7605         transfer the source value's least significant bits, instead of its
7606         lowest-addressed ones.  Rename type_len to max_offset.
7607         (read_pieced_value): Mirror above changes to write_pieced_value as
7608         applicable.
7609
7610 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7611
7612         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7613         truncate full bytes from dest_offset_bits before using it as an
7614         offset into the buffer.
7615
7616 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7617
7618         * dwarf2loc.c (write_pieced_value): Include transfer size in
7619         byte-wise check.
7620
7621 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7622
7623         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7624         calculation of this_size.
7625
7626 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7627
7628         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7629         when targeting a bit-field.
7630         (write_pieced_value): Likewise.
7631
7632 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7633
7634         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7635         (allocate_piece_closure): Drop addr_size parameter.
7636         (dwarf2_evaluate_loc_desc_full): Adjust call to
7637         allocate_piece_closure.
7638
7639 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7640
7641         PR gdb/21226
7642         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7643         the LSB end, independent of endianness.
7644
7645 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7646
7647         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7648         size capping.
7649
7650 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7651
7652         * mips-linux-nat.c: Move include features/mips*-linux.c to
7653         mips-linux-tdep.c.
7654         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7655         to mips-linux-tdep.c.
7656         * mips-linux-tdep.c: Include features/mips*-linux.c
7657         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7658         functions.
7659         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7660         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7661         (tdesc_mips64_dsp_linux): Declare.
7662
7663 2017-06-12  Tom Tromey  <tom@tromey.com>
7664
7665         * valprint.h (val_print_type_code_int): Remove.
7666         * valprint.c (generic_val_print_int): Always call
7667         val_print_scalar_formatted.
7668         (val_print_type_code_int): Remove.
7669         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7670         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7671         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7672         * ada-valprint.c (ada_val_print_num): Use
7673         val_print_scalar_formatted.
7674
7675 2017-06-12  Tom Tromey  <tom@tromey.com>
7676
7677         * printcmd.c (print_scalar_formatted): Unify the two switches.
7678         Don't convert scalars to LONGEST.
7679
7680 2017-06-12  Tom Tromey  <tom@tromey.com>
7681
7682         PR exp/16225:
7683         * valprint.h (print_decimal_chars): Update.
7684         * valprint.c (maybe_negate_by_bytes): New function.
7685         (print_decimal_chars): Add "is_signed" argument.
7686         * printcmd.c (print_scalar_formatted): Update.
7687
7688 2017-06-12  Tom Tromey  <tom@tromey.com>
7689
7690         PR exp/16225:
7691         * valprint.h (print_binary_chars, print_hex_chars): Update.
7692         * valprint.c (val_print_type_code_int): Update.
7693         (print_binary_chars): Add "zero_pad" argument.
7694         (emit_octal_digit): New function.
7695         (print_octal_chars): Don't zero-pad.
7696         (print_decimal_chars): Likewise.
7697         (print_hex_chars): Add "zero_pad" argument.
7698         * sh64-tdep.c (sh64_do_fp_register): Update.
7699         * regcache.c (regcache::dump): Update.
7700         * printcmd.c (print_scalar_formatted): Update.
7701         * infcmd.c (default_print_one_register_info): Update.
7702
7703 2017-06-12  Pedro Alves  <palves@redhat.com>
7704             Alan Hayward  <alan.hayward@arm.com>
7705
7706         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7707         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7708         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7709         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7710         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7711
7712 2017-06-12  Pedro Alves  <palves@redhat.com>
7713
7714         * dwarf2read.c (mapped_symtab::data): Now a vector of
7715         symtab_index_entry instead of vector of
7716         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7717         whether an element's name is NULL instead of checking whether the
7718         element itself is NULL.
7719         (find_slot): Change return type.  Adjust.
7720         (hash_expand, , add_index_entry, uniquify_cu_indices)
7721         (write_hash_table): Adjust.
7722
7723 2017-06-12  Pedro Alves  <palves@redhat.com>
7724
7725         * dwarf2read.c (recursively_count_psymbols): New function.
7726         (write_psymtabs_to_index): Call it to compute number of psyms and
7727         pass estimate size of psyms_seen to unordered_set's ctor.
7728
7729 2017-06-12  Pedro Alves  <palves@redhat.com>
7730
7731         * dwarf2read.c (write_hash_table): Check if key already exists
7732         before emplacing.
7733
7734 2017-06-12  Pedro Alves  <palves@redhat.com>
7735
7736         * dwarf2read.c (data_buf::append_space): Rename to...
7737         (data_buf::grow): ... this, and make private.  Adjust all callers.
7738         (data_buf::append_uint): New method.
7739         (add_address_entry, write_one_signatured_type)
7740         (write_psymtabs_to_index): Use it.
7741
7742 2017-06-12  Pedro Alves  <palves@redhat.com>
7743
7744         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7745         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7746         (data_buf::file_write): Call ::fwrite directly.
7747
7748 2017-06-12  Pedro Alves  <palves@redhat.com>
7749
7750         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7751         std::vector::erase.
7752
7753 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7754
7755         Code cleanup: C++ify .gdb_index producer.
7756         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7757         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7758         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7759         (create_strtab, add_string): Remove.
7760         (file_write, data_buf): New.
7761         (struct symtab_index_entry): Use std::vector for cu_indices.
7762         (struct mapped_symtab): Use std::vector for data.
7763         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7764         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7765         Remove.
7766         (find_slot): Change return type.  Update it to the new data structures.
7767         (hash_expand, add_index_entry): Update it to the new data structures.
7768         (offset_type_compare): Remove.
7769         (uniquify_cu_indices): Update it to the new data structures.
7770         (c_str_view, c_str_view_hasher, vector_hasher): New.
7771         (add_indices_to_cpool): Remove.
7772         (write_hash_table): Update it to the new data structures.
7773         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7774         (eq_psymtab_cu_index): Remove.
7775         (psym_index_map): New typedef.
7776         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7777         reference and std::unordered_map for cu_index_htab.
7778         (add_address_entry, add_address_entry_worker, write_address_map)
7779         (write_psymbols): Update it to the new data structures.
7780         (write_obstack): Remove.
7781         (struct signatured_type_index_data): Change types_list to a data_buf
7782         reference and psyms_seen to a std::unordered_set reference.
7783         (write_one_signatured_type, recursively_write_psymbols)
7784         (write_psymtabs_to_index): Update it to the new data structures.
7785
7786 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7789         separate-debug-file commands.
7790         * symfile.h (separate_debug_file_debug): New global.
7791         * symfile.c (separate_debug_file_debug): New global.
7792         (separate_debug_file_exists, find_separate_debug_file): Add
7793         debug output.
7794         (_initialize_symfile): Add "set debug separate-debug-file"
7795         command.
7796         * build-id.c (build_id_to_debug_bfd,
7797         find_separate_debug_file_by_buildid): Add debug output.
7798
7799 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7800
7801         * gdbarch.sh (displaced_step_free_closure): Remove.
7802         * gdbarch.h, gdbarch.c: Re-generate.
7803         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7804         displaced_step_free_closure.
7805         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7806         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7807         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7808         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7809         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7810         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7811         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7812         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7813         * infrun.c (displaced_step_clear): Call xfree instead of
7814         gdbarch_displaced_step_free_closure.
7815
7816 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7817
7818         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7819         NULL".
7820
7821 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7822
7823         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7824         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7825         (mn10300_push_dummy_call): Likewise.
7826
7827 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7828
7829         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7830
7831 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7832
7833         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7834
7835 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7836
7837         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7838         able to start inferiors using a shell.
7839         (New remote packets): Announce new packet "QStartupWithShell".
7840         * remote.c: Add PACKET_QStartupWithShell.
7841         (extended_remote_create_inferior): Handle new
7842         PACKET_QStartupWithShell.
7843         (remote_protocol_features) <QStartupWithShell>: New entry for
7844         PACKET_QStartupWithShell.
7845         (_initialize_remote): Call "add_packet_config_cmd" for
7846         QStartupShell.
7847
7848 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7849             Pedro Alves  <palves@redhat.com>
7850
7851         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7852         and "nat/fork-inferior.h".
7853         * common/common-inferior.h: New file, with contents from
7854         "gdb/inferior.h".
7855         * commom/common-utils.c: Include "common-utils.h".
7856         (stringify_argv): New function.
7857         * common/common-utils.h (stringify_argv): New prototype.
7858         * configure.nat: Add "fork-inferior.o" as a dependency for
7859         "*linux*", "fbsd*" and "nbsd*" hosts.
7860         * corefile.c (get_exec_file): Update comment.
7861         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7862         instead of "startup_inferior".
7863         (darwin_create_inferior): Call "add_thread_silent" after
7864         "fork_inferior".
7865         * fork-child.c: Cleanup unnecessary includes.
7866         (SHELL_FILE): Move to "common/common-fork-child.c".
7867         (environ): Likewise.
7868         (exec_wrapper): Initialize.
7869         (get_exec_wrapper): New function.
7870         (breakup_args): Move to "common/common-fork-child.c"; rename to
7871         "breakup_args_for_exec".
7872         (escape_bang_in_quoted_argument): Move to
7873         "common/common-fork-child.c".
7874         (saved_ui): New variable.
7875         (prefork_hook): New function.
7876         (postfork_hook): Likewise.
7877         (postfork_child_hook): Likewise.
7878         (gdb_startup_inferior): Likewise.
7879         (fork_inferior): Move to "common/common-fork-child.c".  Update
7880         function to support gdbserver.
7881         (startup_inferior): Likewise.
7882         * gdbcore.h (get_exec_file): Remove declaration.
7883         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7884         instead of "startup_inferior".  Call "add_thread_silent" after
7885         "fork_inferior".
7886         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7887         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7888         instead of "startup_inferior".  Call "add_thread_silent" after
7889         "fork_inferior".
7890         * inferior.h: Include "common-inferior.h".
7891         (trace_start_error): Move to "common/common-utils.h".
7892         (trace_start_error_with_name): Likewise.
7893         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7894         (startup_inferior): Likewise.
7895         (gdb_startup_inferior): New prototype.
7896         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7897         * nat/fork-inferior.h: New file.
7898         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7899         instead of "startup_inferior".  Call "add_thread_silent" after
7900         "fork_inferior".
7901         * target.h (target_terminal_init): Move prototype to
7902         "target/target.h".
7903         (target_terminal_inferior): Likewise.
7904         (target_terminal_ours): Likewise.
7905         * target/target.h (target_terminal_init): New prototype, moved
7906         from "target.h".
7907         (target_terminal_inferior): Likewise.
7908         (target_terminal_ours): Likewise.
7909         * utils.c (gdb_flush_out_err): New function.
7910
7911 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7912
7913         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7914         * common/common-gdbthread.h: New file, with parts from
7915         "gdb/gdbthread.h".
7916         * gdbthread.h: Include "common-gdbthread.h".
7917         (switch_to_thread): Moved to "common/common-gdbthread.h".
7918
7919 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7920
7921         * Makefile.in (SFILES): Add "common/job-control.c".
7922         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7923         (COMMON_OBS): Add "job-control.o".
7924         * common/job-control.c: New file, with contents from
7925         "gdb/inflow.c".
7926         * common/job-control.h: New file, with contents from "terminal.h".
7927         * fork-child.c: Include "job-control.h".
7928         * inflow.c: Include "job-control.h".
7929         (gdb_setpgid): Move to "common/common-inflow.c".
7930         (_initialize_inflow): Move setting of "job_control" to
7931         "handle_job_control".
7932         * terminal.h (job_control): Moved to "common/common-terminal.h".
7933         (gdb_setpgid): Likewise.
7934         * top.c: Include "job_control.h".
7935         * utils.c: Likewise.
7936         (job_control): Moved to "job-control.c".
7937
7938 2017-06-07  Pedro Alves  <palves@redhat.com>
7939
7940         * Makefile.in (SFILES): Add gdb_regex.c.
7941         (COMMON_OBS): Add gdb_regex.o.
7942         * ada-lang.c (ada_add_standard_exceptions)
7943         (ada_add_exceptions_from_frame, name_matches_regex)
7944         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7945         parameter type to compiled_regex.  Adjust.
7946         (ada_exceptions_list): Use compiled_regex.
7947         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7948         std::unique_ptr<compiled_regex>.
7949         (exception_catchpoint::~exception_catchpoint): Remove regfree
7950         call.
7951         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7952         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7953         * breakpoint.c (solib_catchpoint::compiled): Now a
7954         std::unique_ptr<compiled_regex>.
7955         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7956         (check_status_catch_solib): Adjust to use compiled_regex.
7957         (add_solib_catchpoint): Adjust to use compiled_regex.
7958         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7959         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7960         compiled_regex reference.  Adjust to use it.
7961         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7962         declaration.  Include "gdb_regex.h".
7963         (apropos_cmd): Change regex parameter to compiled_regex reference.
7964         * gdb_regex.c: New file.
7965         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7966         declarations.
7967         (class compiled_regex): New.
7968         * linux-tdep.c: Include "common/gdb_optional.h".
7969         (struct mapping_regexes): New, factored out from
7970         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7971         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7972         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7973         * probe.c: Include "common/gdb_optional.h".
7974         (collect_probes): Use compiled_regex and gdb::optional and remove
7975         cleanups.
7976         * skip.c: Include "common/gdb_optional.h".
7977         (skiplist_entry::compiled_function_regexp): Now a
7978         gdb::optional<compiled_regex>.
7979         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7980         (free_skiplist_entry): Remove regfree call.
7981         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7982         compiled_regex and gdb::optional.
7983         * symtab.c: Include "common/gdb_optional.h".
7984         (search_symbols): Use compiled_regex and gdb::optional.
7985         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7986         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7987         to gdb_regex.c.
7988
7989 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7990
7991         * regcache.c (regcache::save): Avoid buffer use.
7992         (regcache::dump): Likewise.
7993
7994 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7995
7996         * sh-tdep.c (sh_pseudo_register_read): Remove
7997         MAX_REGISTER_SIZE.
7998         (sh_pseudo_register_write): Likewise.
7999         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8000         (sh64_pseudo_register_write): Likewise
8001
8002 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8003
8004         * aarch64-tdep.c (aarch64_store_return_value): Use
8005         V_REGISTER_SIZE.
8006         (aarch64_pseudo_read_value): Likewise.
8007         (aarch64_pseudo_write): Likewise.
8008
8009 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8010
8011         * regformats/regdef.h (set_register_cache): Remove the
8012         declaration.
8013
8014 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8015
8016         * frame.c (frame_unwind_register_signed): Use
8017         frame_unwind_register_value.
8018
8019 2017-06-06  Pedro Alves  <palves@redhat.com>
8020
8021         PR breakpoints/21553
8022         * breakpoint.c (create_breakpoints_sal_default)
8023         (init_breakpoint_sal, create_breakpoint_sal): Use
8024         gdb::unique_xmalloc_ptr for string parameters.
8025         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8026         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8027         (base_breakpoint_create_breakpoints_sal)
8028         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8029         (strace_marker_create_breakpoints_sal)
8030         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8031         string parameters.
8032         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8033         gdb::unique_xmalloc_ptr for string parameters.
8034         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8035         parameters.
8036
8037 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8038
8039         * alpha-tdep.c (alpha_register_to_value): Use
8040         get_frame_register_value.
8041         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8042
8043 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8044
8045         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8046         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8047         (ia64_value_to_register): Likewise.
8048         (ia64_extract_return_value): Likewise.
8049         (ia64_store_return_value): Likewise.
8050         (ia64_push_dummy_call): Likewise.
8051
8052 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8053
8054         GDB 8.0 released.
8055
8056 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8057
8058         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8059
8060 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8061
8062         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8063         parameter.
8064         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8065
8066 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8067
8068         * event-loop.c (poll_timers): Unallocate timer using delete
8069         instead of xfree.
8070
8071 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8072
8073         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8074         (struct breakpoint) <~breakpoint>: New.
8075         (struct watchpoint): Inherit from breakpoint.
8076         <~watchpoint>: New.
8077         <base>: Remove.
8078         (struct tracepoint): Inherit from breakpoint.
8079         <base>: Remove.
8080         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8081         (struct longjmp_breakpoint): Inherit from breakpoint.
8082         <~longjmp_breakpoint>: New.
8083         <base>: Remove.
8084         (new_breakpoint_from_type): Remove casts.
8085         (watchpoint_in_thread_scope): Remove reference to base field.
8086         (watchpoint_del_at_next_stop): Likewise.
8087         (update_watchpoint): Likewise.
8088         (watchpoint_check): Likewise.
8089         (bpstat_check_watchpoint): Likewise.
8090         (set_longjmp_breakpoint): Likewise.
8091         (struct fork_catchpoint): Inherit from breakpoint.
8092         <base>: Remove.
8093         (struct solib_catchpoint): Inherit from breakpoint.
8094         <~solib_catchpoint>: New.
8095         <base>: Remove.
8096         (dtor_catch_solib): Change to ...
8097         (solib_catchpoint::~solib_catchpoint): ... this.
8098         (breakpoint_hit_catch_solib): Remove reference to base field.
8099         (add_solib_catchpoint): Likewise.
8100         (create_fork_vfork_event_catchpoint): Likewise.
8101         (struct exec_catchpoint): Inherit from breakpoint.
8102         <~exec_catchpoint>: New.
8103         <base>: Remove.
8104         (dtor_catch_exec): Change to ...
8105         (exec_catchpoint::~exec_catchpoint): ... this.
8106         (dtor_watchpoint): Change to ...
8107         (watchpoint::~watchpoint): ... this.
8108         (watch_command_1): Remove reference to base field.
8109         (catch_exec_command_1): Likewise.
8110         (base_breakpoint_dtor): Change to ...
8111         (breakpoint::~breakpoint): ... this.
8112         (base_breakpoint_ops): Remove dtor field value.
8113         (longjmp_bkpt_dtor): Change to ...
8114         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8115         (strace_marker_create_breakpoints_sal): Remove reference to base
8116         field.
8117         (delete_breakpoint): Don't manually call breakpoint destructor.
8118         (create_tracepoint_from_upload): Remove reference to base field.
8119         (trace_pass_set_count): Likewise.
8120         (initialize_breakpoint_ops): Don't initialize
8121         momentary_breakpoint_ops, don't set dtors.
8122         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8123         <~ada_catchpoint>: New.
8124         <base>: Remove.
8125         (create_excep_cond_exprs): Remove reference to base field.
8126         (dtor_exception): Change to ...
8127         (ada_catchpoint::~ada_catchpoint): ... this.
8128         (dtor_catch_exception): Remove.
8129         (dtor_catch_exception_unhandled): Remove.
8130         (dtor_catch_assert): Remove.
8131         (create_ada_exception_catchpoint): Remove reference to base
8132         field.
8133         (initialize_ada_catchpoint_ops): Don't set dtors.
8134         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8135         breakpoint.
8136         <~signal_catchpoint>: New.
8137         <base>: Remove.
8138         (signal_catchpoint_dtor): Change to ...
8139         (signal_catchpoint::~signal_catchpoint): ... this.
8140         (create_signal_catchpoint): Remove reference to base field.
8141         (initialize_signal_catchpoint_ops): Don't set dtor.
8142         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8143         from breakpoint.
8144         <~syscall_catchpoint>: New.
8145         <base>: Remove.
8146         (dtor_catch_syscall): Change to ...
8147         (syscall_catchpoint::~syscall_catchpoint): ... this.
8148         (create_syscall_event_catchpoint): Remove reference to base
8149         field.
8150         (initialize_syscall_catchpoint_ops): Don't set dtor.
8151         * break-catch-throw.c (struct exception_catchpoint): Inherit
8152         from breakpoint.
8153         <~exception_catchpoint>: New.
8154         <base>: Remove.
8155         (dtor_exception_catchpoint): Change to ...
8156         (exception_catchpoint::~exception_catchpoint): ... this.
8157         (handle_gnu_v3_exceptions): Remove reference to base field.
8158         (initialize_throw_catchpoint_ops): Don't set dtor.
8159         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8160         field.
8161         * remote.c (remote_get_tracepoint_status): Likewise.
8162         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8163         * tracefile.c (tracefile_fetch_registers): Likewise.
8164         * tracepoint.c (actions_command): Likewise.
8165         (validate_actionline): Likewise.
8166         (tfind_1): Likewise.
8167         (get_traceframe_location): Likewise.
8168         (find_matching_tracepoint_location): Likewise.
8169         (parse_tracepoint_status): Likewise.
8170         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8171
8172 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8173
8174         * breakpoint.c (struct longjmp_breakpoint): New struct.
8175         (is_tracepoint_type): Change return type to bool.
8176         (is_longjmp_type): New function.
8177         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8178         (set_raw_breakpoint_without_location): Use
8179         new_breakpoint_from_type.
8180         (set_raw_breakpoint): Likewise.
8181
8182 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8183
8184         * breakpoint.c (new_breakpoint_from_type): New function.
8185         (create_breakpoint_sal): Use new_breakpoint_from_type and
8186         unique_ptr.
8187         (create_breakpoint): Likewise.
8188
8189 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8190
8191         * memattr.c (mem_info_command): Rename to ...
8192         (info_mem_command): ... this.
8193         (mem_enable_command): Rename to ...
8194         (enable_mem_command): ... this.
8195         (mem_disable_command): Rename to ...
8196         (disable_mem_command): ... this.
8197         (mem_delete_command): Rename to ...
8198         (delete_mem_command): ... this.
8199         (_initialize_mem): Adjust function names.
8200
8201 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8202
8203         * btrace.c (handle_pt_insn_events): New.
8204         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8205         STATUS.  Split into this and ...
8206         (handle_pt_insn_event_flags): ... this.
8207
8208 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8209
8210         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8211         and struct pt_insn.resynced.
8212         * configure: Regenerated.
8213         * config.in: Regenerated.
8214
8215 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8216
8217         * btrace.c (ftrace_find_call_by_number): New function.
8218         (ftrace_new_function): Store objects, not pointers.
8219         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8220         ftrace_new_gap, ftrace_update_function,
8221         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8222         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8223         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8224         btrace_ends_with_single_insn, btrace_call_get): Account for
8225         btrace_thread_info::functions now storing objects.
8226         * btrace.h (struct btrace_thread_info): Add constructor.
8227         (struct btrace_thread_info) <functions>: Make std::vector.
8228         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8229         Initialize with default values.
8230         * record-btrace.c (record_btrace_frame_sniffer): Account for
8231         btrace_thread_info::functions now storing objects.
8232
8233 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8234
8235         * btrace.c: Remove typedef bfun_s.
8236         (ftrace_new_gap): Directly add gaps to the list of gaps.
8237         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8238         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8239         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8240         instead of gdb VEC.
8241
8242 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8243
8244         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8245         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8246         with btrace_thread_info::next_segment and
8247         btrace_thread_info::prev_segment.
8248         * btrace.h: Remove struct btrace_func_link.
8249         (struct btrace_function): Replace pair of function segment pointers
8250         with pair of indices.
8251         * python/py-record-btrace.c (btpy_call_prev_sibling,
8252         btpy_call_next_sibling): Replace references to
8253         btrace_thread_info::segment with btrace_thread_info::next_segment and
8254         btrace_thread_info::prev_segment.
8255         * record-btrace.c (record_btrace_frame_this_id): Use
8256         btrace_find_call_by_number.
8257
8258 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8259
8260         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8261         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8262         btrace_insn_next, btrace_insn_prev): Remove references to
8263         btrace_thread_info::flow.
8264         * btrace.h (struct btrace_function): Remove FLOW.
8265
8266 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8267
8268         * btrace.c (ftrace_find_call_by_number): New function.
8269         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8270         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8271         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8272         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8273         index.
8274         * btrace.h (struct btrace_function): Turn UP into an index.
8275         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8276         as an index.
8277         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8278         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8279         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8280
8281 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8282
8283         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8284         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8285         ftrace_update_function, ftrace_compute_global_level_offset,
8286         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8287         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8288         btrace_insn_end, btrace_is_empty): Remove references to
8289         btrace_thread_info::begin and btrace_thread_info::end.
8290         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8291         (struct btrace_thread_info) <functions>: Adjust comment.
8292         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8293         btrace_thread_info::begin.
8294
8295 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8296
8297         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8298         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8299         ftrace_update_function): Remove arguments that implicitly were always
8300         BTINFO->END.
8301         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8302         Don't pass BTINFO->END.
8303
8304 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8305
8306         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8307         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8308         btrace_find_insn_by_number): Replace function segment pointer with
8309         index.
8310         (btrace_insn_cmp): Simplify.
8311         * btrace.h: (struct btrace_insn_iterator) Rename index to
8312         insn_index.  Replace function segment pointer with index into function
8313         segment vector.
8314         * record-btrace.c (record_btrace_call_history): Replace function
8315         segment pointer use with index.
8316         (record_btrace_frame_sniffer): Retrieve function call segment through
8317         vector.
8318         (record_btrace_set_replay): Remove defunc't safety check.
8319
8320 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8321
8322         * btrace.c (btrace_ends_with_single_insn): New function.
8323         (btrace_call_get, btrace_call_number, btrace_call_begin,
8324         btrace_call_end, btrace_call_next, btrace_call_prev,
8325         btrace_find_call_by_number): Use index into call segment vector
8326         instead of pointer.
8327         (btrace_call_cmp): Simplify.
8328         * btrace.h (struct btrace_call_iterator): Replace function call segment
8329         pointer with index into vector.
8330         * record-btrace.c (record_btrace_call_history): Use index instead of
8331         pointer.
8332
8333 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8334
8335         * btrace.c (btrace_insn_begin, btrace_insn_end,
8336         btrace_find_insn_by_number): Add btinfo to iterator.
8337         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8338
8339 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8340
8341         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8342         and save pointers directly.
8343         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8344         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8345         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8346         changed signature of functions.
8347         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8348         (btrace_fetch): Remove code that adds btrace_function pointers to
8349         vector of btrace_functions.
8350         (btrace_clear): Simplify freeing vector of btrace_functions.
8351
8352 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8353
8354         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8355         Replace VEC_* with std::vector functions.
8356         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8357         (struct btrace_thread_info)<functions>: Change type to std::vector.
8358
8359 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8360
8361         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8362         "Removed targets and native configurations" up.  Merge duplicate
8363         "New commands" sub-sections.  Add "New options" sub-sections.
8364
8365 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8366
8367         * defs.h (copy_integer_to_size): New declaration.
8368         * findvar.c (copy_integer_to_size): New function.
8369         (do_cint_test): New selftest function.
8370         (copy_integer_to_size_test): Likewise.
8371         (_initialize_findvar): Likewise.
8372         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8373         (mips_fbsd_collect_reg): Use raw_collect_integer.
8374         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8375         (mips64_fill_gregset): Use raw_collect_integer
8376         (mips64_fill_fpregset): Use raw_supply_integer.
8377         * regcache.c (regcache::raw_supply_integer): New function.
8378         (regcache::raw_collect_integer): Likewise.
8379         * regcache.h: (regcache::raw_supply_integer): New declaration.
8380         (regcache::raw_collect_integer): Likewise.
8381
8382 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8383
8384         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8385         (COMMON_OBS): Add gdbarch-selftests.o.
8386         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8387         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8388         * gdbarch-selftests.c: New file.
8389         * regcache.h (regcache) <~regcache>: Mark it virtual if
8390         GDB_SELF_TEST.
8391         <raw_write>: Likewise.
8392
8393 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8394
8395         * regcache.c (current_regcache): Change it to
8396         regcache::current_regcache.
8397         (regcache_observer_target_changed): Update.
8398         (regcache_thread_ptid_changed): Make it a regcache static
8399         method.
8400         (regcache_thread_ptid_changed): Update.
8401         (class regcache_access): New.
8402         (current_regcache_test): Update.
8403         (_initialize_regcache): Update.
8404         * regcache.h: Include forward_list.
8405         (regcache): Declare regcache_thread_ptid_changed and declare
8406         registers_changed_ptid as friend.
8407
8408 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8409
8410         * i387-tdep.c (i387_register_to_value): Use register_size
8411         instead of TYPE_LENGTH.
8412         * m68k-tdep.c (m68k_register_to_value): Likewise.
8413
8414 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8415
8416         * i387-tdep.c (i387_convert_register_p): Return false if type
8417         code isn't TYPE_CODE_FLT.
8418
8419 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8420
8421         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8422         length is 4.
8423         (alpha_register_to_value): Remove type length check.
8424         (alpha_value_to_register): Likewise.
8425
8426 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8427
8428         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8429         TYPE_CODE_FLT.
8430
8431 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8432
8433         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8434         TYPE_CODE_FLT or not.
8435
8436 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8437
8438         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8439         * avr-tdep.c (avr_gdbarch_init): Likewise.
8440         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8441         * cris-tdep.c (cris_gdbarch_init): Likewise.
8442         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8443         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8444         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8445         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8446         * mep-tdep.c (mep_gdbarch_init): Likewise.
8447         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8448         * mips-tdep.c (mips_gdbarch_init): Likewise.
8449         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8450         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8451         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8452         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8453         * v850-tdep.c (v850_gdbarch_init): Likewise.
8454
8455 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8456
8457         * selftest-arch.c (tests_with_arch): Call registers_changed
8458         and reinit_frame_cache.
8459         * selftest.c (run_self_tests): Likewise.
8460
8461 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8462
8463         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8464         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8465
8466 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8467
8468         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8469         set_gdbarch_print_insn.
8470
8471 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8472
8473         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8474         set_gdbarch_print_insn.
8475
8476 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8477
8478         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8479         set_gdbarch_print_insn.
8480         * arc-tdep.c (arc_gdbarch_init): Likewise.
8481         * arch-utils.c: include dis-asm.h.
8482         (default_print_insn): New function.
8483         * arch-utils.h (default_print_insn): Declare.
8484         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8485         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8486         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8487         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8488         * frv-tdep.c (frv_gdbarch_init): Likewise.
8489         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8490         * gdbarch.sh (print_insn): Use default_print_insn.
8491         * gdbarch.c: Regenerated.
8492         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8493         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8494         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8495         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8496         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8497         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8498         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8499         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8500         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8501         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8502         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8503         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8504         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8505         * mt-tdep.c (mt_gdbarch_init): Likewise.
8506         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8507         * nios2-tdep.c (nios2_print_insn): Remove.
8508         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8509         * rx-tdep.c (rx_gdbarch_init): Likewise.
8510         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8511         * score-tdep.c (score_print_insn): Remove.
8512         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8513         * sh-tdep.c (sh_gdbarch_init): Likewise.
8514         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8515         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8516         * tic6x-tdep.c (tic6x_print_insn): Remove.
8517         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8518         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8519         * v850-tdep.c (v850_gdbarch_init): Likewise.
8520         * vax-tdep.c (vax_gdbarch_init): Likewise.
8521         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8522         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8523
8524 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8525
8526         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8527         (MIPS_FP0_REGNUM): Remove.
8528         (MIPS_FSR_REGNUM): Remove.
8529         (mips_fbsd_supply_fpregs): Use mips_regnum.
8530         (mips_fbsd_supply_gregs): Likewise.
8531         (mips_fbsd_collect_fpregs): Likewise.
8532         (mips_fbsd_collect_gregs): Likewise.
8533
8534 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8535
8536         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8537         (getpfpregs_supplies): New function.
8538         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8539         getfpregs_supplies.
8540         (mips_fbsd_store_inferior_registers): Likewise.
8541
8542 2017-05-22  Pedro Alves <palves@redhat.com>
8543
8544         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8545         maintainer.
8546
8547 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8548
8549         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8550         (store_register): Likewise.
8551         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8552         (get_decimal_float_return_value): Likewise.
8553         (do_ppc_sysv_return_value): Likewise.
8554         (ppc64_sysv_abi_push_integer): Likewise.
8555         (ppc64_sysv_abi_push_freg): Likewise.
8556         (ppc64_sysv_abi_return_value_base): Likewise.
8557         (ppc64_sysv_abi_return_value): Likewise.
8558         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8559         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8560         * rs6000-nat.c: Likewise.
8561         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8562         (rs6000_value_to_register): Likewise.
8563         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8564
8565 2017-05-21  Tom Tromey  <tom@tromey.com>
8566
8567         PR rust/21466:
8568         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8569         arrays as "[T]", not "[T; ]".
8570
8571 2017-05-19  Tom Tromey  <tom@tromey.com>
8572
8573         PR rust/21484:
8574         * rust-lang.c (exp_descriptor_rust): New function.
8575         (rust_language_defn): Use it.
8576         * p-lang.c (pascal_language_defn): Update.
8577         * opencl-lang.c (opencl_language_defn): Update.
8578         * objc-lang.c (objc_language_defn): Update.
8579         * m2-lang.c (m2_language_defn): Update.
8580         * language.h (struct language_defn)
8581         <la_watch_location_expression>: New member.
8582         * language.c (unknown_language_defn, auto_language_defn)
8583         (local_language_defn): Update.
8584         * go-lang.c (go_language_defn): Update.
8585         * f-lang.c (f_language_defn): Update.
8586         * d-lang.c (d_language_defn): Update.
8587         * c-lang.h (c_watch_location_expression): Declare.
8588         * c-lang.c (c_watch_location_expression): New function.
8589         (c_language_defn, cplus_language_defn, asm_language_defn)
8590         (minimal_language_defn): Use it.
8591         * breakpoint.c (watch_command_1): Call
8592         la_watch_location_expression.
8593         * ada-lang.c (ada_language_defn): Update.
8594
8595 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8596
8597         PR tui/21482
8598         * gdb_curses.h (NOMACROS): Define.
8599         (NCURSES_NOMACROS): Define.
8600
8601 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8602
8603         PR tui/21482
8604         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8605         arg to char *.
8606         * tui/tui-wingeneral.c (box_win): Likewise.
8607         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8608         (tui_show_source_line): Likewise.
8609         (tui_show_exec_info_content): Likewise.
8610
8611 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8612
8613         * sparc-tdep.c (sparc_structure_return_p)
8614         (sparc_arg_on_registers_p): New functions.
8615         (sparc32_store_arguments): Use them.
8616         * sparc64-tdep.c (sparc64_16_byte_align_p)
8617         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8618         Handle TYPE_CODE_ARRAY.
8619
8620 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8621
8622         * cli/cli-decode.c (add_alias_cmd): New function.
8623         * command.h (add_alias_cmd): Declare.
8624         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8625         instead call add_alias_cmd.
8626
8627 2017-05-17  Pedro Alves  <palves@redhat.com>
8628
8629         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8630         (nat_makefile_frag): ... this.  All references updated.
8631         * configure.ac: Likewise.
8632         * configure.nat: Likewise.  Enhance comments.
8633         * configure: Regenerate.
8634
8635 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8636
8637         * procfs.c (procfs_create_inferior): Change prototype to match
8638         definition.
8639
8640 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8641
8642         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8643         C++ compiler warning.
8644
8645 2017-05-12  Tom Tromey  <tom@tromey.com>
8646
8647         PR rust/21483:
8648         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8649         recurse, just call value_struct_elt directly.
8650
8651 2017-05-12  Tom Tromey  <tom@tromey.com>
8652
8653         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8654         OP_RUST_ARRAY>: Fix.
8655
8656 2017-05-12  Tom Tromey  <tom@tromey.com>
8657
8658         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8659
8660 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8661
8662         * regcache.c: Include <forward_list>.
8663         (struct regcache_list): Remove.
8664         (current_regcache): Update.
8665         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8666         (regcache_thread_ptid_changed): Likewise.
8667         (registers_changed_ptid): Likewise.
8668         (current_regcache_size): Likewise.
8669
8670 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8671
8672         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8673         (current_regcache_size): New function.
8674         (current_regcache_test): New function.
8675         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8676
8677 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8678
8679         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8680         (print_gp_register_row): Use get_frame_register_value.
8681
8682 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8683
8684         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8685         (mips_supply_fpregset): Likewise.
8686         (mips64_supply_gregset): Likewise.
8687
8688 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8689
8690         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8691         regcache->raw_supply_zeroed.
8692
8693 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8694
8695         * configure.nat: Rearrange 'case' statements to match
8696         host before cpu.
8697
8698 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8699
8700         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8701         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8702         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8703         "@nat_extra_makefile_frag@".
8704         (Makefile): Remove dependency on "@frags@".
8705         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8706         (data-directory/Makefile): Likewise.
8707         * config/aarch64/linux.mh: Deleted; moved contents to
8708         "gdb/configure.nat".
8709         * config/alpha/alpha-linux.mh: Likewise.
8710         * config/alpha/nbsd.mh: Likewise.
8711         * config/arm/linux.mh: Likewise.
8712         * config/arm/nbsdelf.mh: Likewise.
8713         * config/i386/cygwin.mh: Likewise.
8714         * config/i386/cygwin64.mh: Likewise.
8715         * config/i386/darwin.mh: Likewise.
8716         * config/i386/fbsd.mh: Likewise.
8717         * config/i386/fbsd64.mh: Likewise.
8718         * config/i386/go32.mh: Likewise.
8719         * config/i386/i386gnu.mh: Likewise.
8720         * config/i386/i386sol2.mh: Likewise.
8721         * config/i386/linux.mh: Likewise.
8722         * config/i386/linux64.mh: Likewise.
8723         * config/i386/mingw.mh: Likewise.
8724         * config/i386/mingw64.mh: Likewise.
8725         * config/i386/nbsd64.mh: Likewise.
8726         * config/i386/nbsdelf.mh: Likewise.
8727         * config/i386/nto.mh: Likewise.
8728         * config/i386/obsd.mh: Likewise.
8729         * config/i386/obsd64.mh: Likewise.
8730         * config/i386/sol2-64.mh: Likewise.
8731         * config/ia64/linux.mh: Likewise.
8732         * config/m32r/linux.mh: Likewise.
8733         * config/m68k/linux.mh: Likewise.
8734         * config/m68k/nbsdelf.mh: Likewise.
8735         * config/m68k/obsd.mh: Likewise.
8736         * config/m88k/obsd.mh: Likewise.
8737         * config/mips/fbsd.mh: Likewise.
8738         * config/mips/linux.mh: Likewise.
8739         * config/mips/nbsd.mh: Likewise.
8740         * config/mips/obsd64.mh: Likewise.
8741         * config/pa/linux.mh: Likewise.
8742         * config/pa/nbsd.mh: Likewise.
8743         * config/pa/obsd.mh: Likewise.
8744         * config/powerpc/aix.mh: Likewise.
8745         * config/powerpc/fbsd.mh: Likewise.
8746         * config/powerpc/linux.mh: Likewise.
8747         * config/powerpc/nbsd.mh: Likewise.
8748         * config/powerpc/obsd.mh: Likewise.
8749         * config/powerpc/ppc64-linux.mh: Likewise.
8750         * config/powerpc/spu-linux.mh: Likewise.
8751         * config/s390/linux.mh: Likewise.
8752         * config/sh/nbsd.mh: Likewise.
8753         * config/sparc/fbsd.mh: Likewise.
8754         * config/sparc/linux.mh: Likewise.
8755         * config/sparc/linux64.mh: Likewise.
8756         * config/sparc/nbsd64.mh: Likewise.
8757         * config/sparc/nbsdelf.mh: Likewise.
8758         * config/sparc/obsd64.mh: Likewise.
8759         * config/sparc/sol2.mh: Likewise.
8760         * config/tilegx/linux.mh: Likewise.
8761         * config/vax/nbsdelf.mh: Likewise.
8762         * config/vax/obsd.mh: Likewise.
8763         * config/xtensa/linux.mh: Likewise.
8764         * config/i386/i386gnu.mn: New file, with excerpts from
8765         "config/i386/i386gnu.mh".
8766         * configure: Regenerate.
8767         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8768         *.mh files under "gdb/config".
8769         * configure.nat: New file, with contents from the
8770         "gdb/config/*/*.mh" files.
8771
8772 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8773
8774         * btrace.c (btrace_clear): Free insn vector.
8775
8776 2017-05-05  Pedro Alves  <palves@redhat.com>
8777
8778         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8779         * configure: Regenerate.
8780
8781 2017-05-04  Pedro Alves  <palves@redhat.com>
8782
8783         * Makefile.in (SFILES): Add progspace-and-thread.c.
8784         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8785         (COMMON_OBS): Add progspace-and-thread.o.
8786         * breakpoint.c: Include "progspace-and-thread.h".
8787         (update_inserted_breakpoint_locations)
8788         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8789         Use scoped_restore_current_pspace_and_thread.
8790         (create_std_terminate_master_breakpoint): Use
8791         scoped_restore_current_program_space.
8792         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8793         (print_breakpoint_location): Use
8794         scoped_restore_current_program_space.
8795         (bp_loc_is_permanent): Use
8796         scoped_restore_current_pspace_and_thread.
8797         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8798         (download_tracepoint_locations): Use
8799         scoped_restore_current_pspace_and_thread.
8800         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8801         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8802         (enum step_over_calls_kind): Moved from inferior.h.
8803         (class scoped_restore_current_thread): New class.
8804         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8805         declaration.
8806         (scoped_restore_current_thread): New class.
8807         * infcmd.c: Include "common/gdb_optional.h".
8808         (continue_1, proceed_after_attach): Use
8809         scoped_restore_current_thread.
8810         (notice_new_inferior): Use scoped_restore_current_thread.
8811         * inferior.c: Include "progspace-and-thread.h".
8812         (restore_inferior, save_current_inferior): Delete.
8813         (add_inferior_command, clone_inferior_command): Use
8814         scoped_restore_current_pspace_and_thread.
8815         * inferior.h (scoped_restore_current_inferior): New class.
8816         * infrun.c: Include "progspace-and-thread.h" and
8817         "common/gdb_optional.h".
8818         (follow_fork_inferior): Use
8819         scoped_restore_current_pspace_and_thread.
8820         (scoped_restore_exited_inferior): New class.
8821         (handle_vfork_child_exec_or_exit): Use
8822         scoped_restore_exited_inferior,
8823         scoped_restore_current_pspace_and_thread,
8824         scoped_restore_current_thread and scoped_restore.
8825         (fetch_inferior_event): Use scoped_restore_current_thread.
8826         * linespec.c (decode_line_full, decode_line_1): Use
8827         scoped_restore_current_program_space.
8828         * mi/mi-main.c: Include "progspace-and-thread.h".
8829         (exec_continue): Use scoped_restore_current_thread.
8830         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8831         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8832         * proc-service.c (ps_pglobal_lookup): Use
8833         scoped_restore_current_program_space.
8834         * progspace-and-thread.c: New file.
8835         * progspace-and-thread.h: New file.
8836         * progspace.c (release_program_space, clone_program_space): Use
8837         scoped_restore_current_program_space.
8838         (restore_program_space, save_current_program_space)
8839         (save_current_space_and_thread): Delete.
8840         (switch_to_program_space_and_thread): Moved to
8841         progspace-and-thread.c.
8842         * progspace.h (save_current_program_space)
8843         (save_current_space_and_thread): Delete declarations.
8844         (scoped_restore_current_program_space): New class.
8845         * remote.c (remote_btrace_maybe_reopen): Use
8846         scoped_restore_current_thread.
8847         * symtab.c: Include "progspace-and-thread.h".
8848         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8849         * thread.c (print_thread_info_1): Use
8850         scoped_restore_current_thread.
8851         (struct current_thread_cleanup): Delete.
8852         (do_restore_current_thread_cleanup)
8853         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8854         (scoped_restore_current_thread::~scoped_restore_current_thread):
8855         ... this new dtor.
8856         (make_cleanup_restore_current_thread): Rename/convert to ...
8857         (scoped_restore_current_thread::scoped_restore_current_thread):
8858         ... this new ctor.
8859         (thread_apply_all_command): Use scoped_restore_current_thread.
8860         (thread_apply_command): Use scoped_restore_current_thread.
8861         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8862         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8863
8864 2017-05-04  Pedro Alves  <palves@redhat.com>
8865
8866         * thread.c (make_cleanup_restore_current_thread): Move
8867         find_thread_ptid call before the is_stopped call.  Assert that the
8868         thread is found.  Replace is_stopped call by checking the thread's
8869         state directly.  Remove unnecessary NULL-thread check.
8870
8871 2017-05-04  Pedro Alves  <palves@redhat.com>
8872
8873         * corelow.c (thread_section_name): New class.
8874         (get_core_register_section, get_core_siginfo): Use it.
8875
8876 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8877
8878         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8879         (get_core_register_section): Remove xfree of NULL pointer.
8880
8881 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8882
8883         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8884         * regcache.c (regcache::raw_supply_zeroed): New function.
8885         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8886
8887 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8888
8889         * gdbarch.sh: Remove commented out definition of
8890         TARGET_CHAR_BIT.
8891         * gdbarch.h: Re-generate.
8892
8893 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8894
8895         * configure: Regenerate.
8896
8897 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8898
8899         * solib-target.c (solib_target_relocate_section_addresses):
8900         Remove num_section_bases, num_bases, segment_bases variables.
8901
8902 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8903
8904         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8905
8906 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8907
8908         * solib-target.c: Include <vector>
8909         (struct lm_info_target) <~lm_info_target>: Remove.
8910         <segment_bases, section_bases>: Change type to
8911         std::vector<CORE_ADDR>.
8912         (library_list_start_segment, library_list_start_section,
8913         library_list_end_library,
8914         solib_target_relocate_section_addresses): Adjust.
8915
8916 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8917
8918         * gdbarch.sh (software_single_step): Change return type to
8919         std::vector<CORE_ADDR>.
8920         * gdbarch.c, gdbarch.h: Re-generate.
8921         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8922         Adjust.
8923         (arm_deal_with_atomic_sequence_raw): Adjust.
8924         (thumb_get_next_pcs_raw): Adjust.
8925         (arm_get_next_pcs_raw): Adjust.
8926         (arm_get_next_pcs): Adjust.
8927         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8928         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8929         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8930         (alpha_software_single_step): Adjust.
8931         * alpha-tdep.h (alpha_software_single_step): Adjust.
8932         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8933         * arm-tdep.c (arm_software_single_step): Adjust.
8934         (arm_breakpoint_kind_from_current_state): Adjust.
8935         * arm-tdep.h (arm_software_single_step): Adjust.
8936         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8937         * cris-tdep.c (cris_software_single_step): Adjust.
8938         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8939         (micromips_deal_with_atomic_sequence): Adjust.
8940         (deal_with_atomic_sequence): Adjust.
8941         (mips_software_single_step): Adjust.
8942         * mips-tdep.h (mips_software_single_step): Adjust.
8943         * moxie-tdep.c (moxie_software_single_step): Adjust.
8944         * nios2-tdep.c (nios2_software_single_step): Adjust.
8945         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8946         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8947         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8948         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8949         * sparc-tdep.c (sparc_software_single_step): Adjust.
8950         * spu-tdep.c (spu_software_single_step): Adjust.
8951         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8952
8953 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8954
8955         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8956         * gdbarch.h: Re-generate.
8957
8958 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8959
8960         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8961         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8962         * python/py-instruction.c, python/py-instruction.h: New file.
8963         * python/py-record.c: Add py-instruction.h include.
8964         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8965         gdb.RecordInstruction.
8966         * python/python-internal.h: Add gdbpy_initialize_instruction
8967         declaration.
8968         * python/python.c (do_start_initialization): Add
8969         gdbpy_initialize_instruction.
8970
8971 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8972
8973         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8974         Remove.
8975         (btrace_func_from_recpy_func): New function.
8976         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8977         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8978         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8979         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8980         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8981         Also, use new helper functions.
8982         (btpy_list_item): Use new helper functions.
8983         (recpy_bt_function_call_history): Use new type name.
8984         (btpy_call_getset): Remove.
8985         (gdbpy_initialize_btrace): Remove code to initialize
8986         gdb.BtraceFunctionCall.
8987         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8988         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8989         recpy_bt_func_prev, recpy_bt_func_next): New export.
8990         * python/py-record.c (recpy_func_type): New static object.
8991         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8992         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8993         recpy_func_next): New function.
8994         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8995         (recpy_func_getset): New static object.
8996         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8997         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8998
8999 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9000
9001         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9002         (btpy_object, btpy_insn_type, btpy_new): Remove.
9003         (btpy_list_object): Use gdb.RecordInstruction type instead of
9004         gdb.BtraceInstruction type.
9005         (btrace_insn_from_recpy_insn): New function.
9006         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9007         btpy_new.
9008         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9009         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9010         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9011         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9012         instead of btpy_object.
9013         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9014         btpy_insn_data, btpy_insn_decode): Rename to ...
9015         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9016         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9017         recpy_bt_insn_decode): This.  Also, use new helper functions.
9018         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9019         recpy_insn_type.
9020         (btpy_insn_getset): Remove.
9021         (gdbpy_initialize_btrace): Remove code to initialize
9022         gdb.BtraceInstruction.  Use recpy_element_object.
9023         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9024         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9025         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9026         * python/py-record.c (recpy_insn_type): New static object.
9027         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9028         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9029         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9030         New function.
9031         (recpy_insn_getset): New static object.
9032         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9033         * python/py-record.h (recpy_element_object): New typedef.
9034         (recpy_insn_type, recpy_insn_new): New export.
9035
9036 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9037
9038         * py-record-btrace.c (btpy_insn_new): Removed.
9039         (btpy_insn_or_gap_new): New function.
9040         (btpy_insn_error): Removed.
9041         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9042         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9043         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9044         btpy_insn_or_gap_new instead of btpy_insn_new.
9045         (btpy_insn_getset): Remove btpy_insn_error.
9046         * py-record.c (recpy_gap_type): New static object.
9047         (recpy_gap_object): New typedef.
9048         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9049         recpy_gap_reason_string): New function.
9050         (recpy_gap_getset): New static object.
9051         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9052         * py-record.h (recpy_gap_new): New export.
9053
9054 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9055
9056         * python/py-record.c (recpy_ptid): Remove.
9057         (recpy_record_getset): Remove recpy_ptid.
9058
9059 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9060
9061         * btrace.c (btrace_fetch): Set inferior_ptid.
9062         * python/py-record-btrace.c: Add "py-record.h" include.
9063         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9064         recpy_bt_end, recpy_bt_instruction_history,
9065         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9066         in gdb.Record object instead of current ptid.
9067         * python/py-record.c: Include new "py-record.h" file.
9068         (recpy_record_object): Moved to py-record.h.
9069         * python/py-record.h: New file.
9070
9071 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9072
9073         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9074         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9075         indentation.
9076
9077 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9078
9079         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9080         the past maintainers section.
9081
9082 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9083
9084         * infcmd.c (get_return_value): Use regcache ctor, and remove
9085         cleanup.
9086
9087 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9088             Pedro Alves  <palves@redhat.com>
9089
9090         * regcache.c (regcache::regcache): New tag dispatch ctor.
9091         (do_cooked_read): Moved above.
9092         (regcache_dup): Use the tag dispatch ctor..
9093         * regcache.h (regcache): Declare ctor, delete copy ctor and
9094         assignment operator, remove friend regcache_dup.
9095
9096 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9097
9098         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9099         call method save instead of regcache_cpy.
9100         * regcache.h (struct regcache): Make regcache_dup a friend.
9101
9102 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9103
9104         * regcache.c (struct regcache): Move to regcache.h
9105         (regcache::arch): New method.
9106         (regcache_get_ptid): Update.
9107         (get_regcache_arch): Call arch method.
9108         (get_regcache_aspace): Call method aspace.
9109         (register_buffer): Change it to method.
9110         (regcache_save): Change it to regcache::save.
9111         (regcache_restore): Likewise.
9112         (regcache_cpy_no_passthrough): Remove the declaration.
9113         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9114         (regcache_cpy_no_passthrough): Change it to method
9115         cpy_no_passthrough.
9116         (regcache_register_status): Change it to method
9117         get_register_status.
9118         (regcache_invalidate): Change it to method invalidate.
9119         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9120         (regcache_raw_update): Change it to method raw_update.
9121         (regcache_raw_read): Likewise.
9122         (regcache_raw_read_signed): Likewise.
9123         (regcache_raw_read_unsigned): Likewise.
9124         (regcache_raw_write_signed): Likewise.
9125         (regcache_raw_write_unsigned): Likewise.
9126         (regcache_cooked_read): Likewise.
9127         (regcache_cooked_read_value): Likewise.
9128         (regcache_cooked_read_signed): Likewise.
9129         (regcache_cooked_read_unsigned): Likewise.
9130         (regcache_cooked_write_signed): Likewise.
9131         (regcache_cooked_write_unsigned): Likewise.
9132         (regcache_raw_set_cached_value): Likewise.
9133         (regcache_raw_write): Likewise.
9134         (regcache_cooked_write): Likewise.
9135         (regcache_xfer_part): Likewise.
9136         (regcache_raw_read_part): Likewise.
9137         (regcache_raw_write_part): Likewise.
9138         (regcache_cooked_read_part): Likewise.
9139         (regcache_cooked_write_part): Likewise.
9140         (regcache_raw_supply): Likewise.
9141         (regcache_raw_collect): Likewise.
9142         (regcache_transfer_regset): Likewise.
9143         (regcache_supply_regset): Likewise.
9144         (regcache_collect_regset): Likewise.
9145         (regcache_debug_print_register): Likewise.
9146         (enum regcache_dump_what): Move it to regcache.h.
9147         (regcache_dump): Change it to method dump.
9148         * regcache.h (enum regcache_dump_what): New.
9149         (class regcache): New.
9150         * target.c (target_fetch_registers): Call method
9151         debug_print_register.
9152         (target_store_registers): Likewise.
9153
9154 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9155
9156         * windows-nat.c (struct lm_info_windows): Initialize field.
9157         (windows_make_so): Allocate lm_info_windows with new.
9158         (windows_free_so): Free lm_info_windows with delete.
9159
9160 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9161
9162         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9163         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9164         cleanup.
9165         (darwin_free_so): Free lm_info_darwin with delete.
9166
9167 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9168
9169         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9170         <l_addr_p>: Change type to bool.
9171         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9172         (svr4_free_so): Free lm_info_svr4 with delete.
9173         (svr4_copy_library_list): Replace memcpy with call to copy
9174         constructor.
9175         (library_list_start_library, svr4_default_sos): Allocate
9176         lm_info_svr4 with new.
9177
9178 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9179
9180         * solib-target.c (struct lm_info_target): Add destructor,
9181         initialize fields.
9182         <name>: Change type to std::string.
9183         (library_list_start_library): Allocate lm_info_target with new.
9184         (solib_target_free_library_list): Free lm_info_target with
9185         delete.
9186         (solib_target_current_sos): Adapt to std::string.
9187         (solib_target_free_so): Free lm_info_target with delete.
9188
9189 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9190
9191         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9192         fields.
9193         (frv_current_sos): Allocate lm_info_frv with new.
9194         (frv_relocate_main_executable): Free lm_info_frv with delete,
9195         allocate with new.
9196         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9197
9198 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9199
9200         * solib-frv.c (struct lm_info_frv): Fix indentation.
9201
9202 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9205         map field.
9206         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9207         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9208         and allocate with new.
9209         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9210
9211 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9212
9213         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9214         <filename, member_name>: Change type to std::string.
9215         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9216         (library_list_start_library): Allocate lm_info_aix with new.
9217         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9218         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9219         with copy constructor.
9220
9221 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9222
9223         * solist.h (struct lm_info): Remove.
9224         (struct lm_info_base): New class.
9225         (struct so_list) <lm_info>: Change type to lm_info_base *.
9226         * nto-tdep.c (struct lm_info): Remove.
9227         (lm_addr): Adjust.
9228         * solib-aix.c (struct lm_info): Rename to ...
9229         (struct lm_info_aix): ... this.  Extend lm_info_base.
9230         (lm_info_p): Rename to ...
9231         (lm_info_aix_p): ... this, and adjust.
9232         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9233         solib_aix_parse_libraries, library_list_start_library,
9234         solib_aix_free_library_list, solib_aix_parse_libraries,
9235         solib_aix_get_library_list,
9236         solib_aix_relocate_section_addresses, solib_aix_free_so,
9237         solib_aix_get_section_offsets,
9238         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9239         Adjust.
9240         (struct solib_aix_inferior_data) <library_list>: Adjust.
9241         * solib-darwin.c (struct lm_info): Rename to ...
9242         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9243         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9244         * solib-dsbt.c (struct lm_info): Rename to ...
9245         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9246         (struct dsbt_info) <main_executable_lm_info): Adjust.
9247         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9248         dsbt_relocate_section_addresses): Adjust.
9249         * solib-frv.c (struct lm_info): Rename to ...
9250         (struct lm_info_frv): ... this.  Extend lm_info_base.
9251         (main_executable_lm_info): Adjust.
9252         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9253         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9254         find_canonical_descriptor_in_load_object,
9255         frv_fdpic_find_canonical_descriptor): Adjust.
9256         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9257         to lm_info_svr4.
9258         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9259         svr4_clear_so, svr4_copy_library_list,
9260         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9261         svr4_current_sos, svr4_fetch_objfile_link_map,
9262         solist_update_incremental): Adjust.
9263         * solib-svr4.h (struct lm_info_svr4): Move here from
9264         solib-svr4.c.
9265         * solib-target.c (struct lm_info): Rename to ...
9266         (struct lm_info_target): ... this.  Extend lm_info_base.
9267         (lm_info_p): Rename to ...
9268         (lm_info_target_p): ... this.
9269         (solib_target_parse_libraries, library_list_start_segment,
9270         library_list_start_section, library_list_start_library,
9271         library_list_end_library, solib_target_free_library_list,
9272         solib_target_current_sos, solib_target_free_so,
9273         solib_target_relocate_section_addresses): Adjust.
9274         * windows-nat.c (struct lm_info): Rename to ...
9275         (struct lm_info_windows): ... this.  Extend lm_info_base.
9276         (windows_make_so, handle_load_dll, handle_unload_dll,
9277         windows_xfer_shared_libraries): Adjust.
9278
9279 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9280
9281         * solib-darwin.c (struct darwin_so_list): Remove.
9282         (darwin_current_sos): Allocate an so_list object instead of a
9283         darwin_so_list, separately allocate an lm_info object.
9284         (darwin_free_so): Free lm_info.
9285
9286 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9287
9288         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9289         with fprintf_filtered.
9290
9291 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9292
9293         * regcache.c (regcache::regcache): New function.
9294         (regcache::~regcache): New function.
9295         (regcache_xmalloc_1): Remove.
9296         (regcache_xmalloc): Call new regcache.
9297         (regcache_xfree): Call delete regcache.
9298         (get_thread_arch_aspace_regcache): Call new regcache.
9299
9300 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9301
9302         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9303         lwp instead of ptid_get_lwp.
9304
9305 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9306
9307         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9308         lwp_info instead of getting from inferior_ptid.
9309
9310 2017-04-27  Keith Seitz  <keiths@redhat.com>
9311
9312         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9313         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9314         (CV_CONVERSION_BADNESS): Define.
9315         (rank_one_type): Remove overly restrictive rvalue reference
9316         rank checks.
9317         Add cv-qualifier checks and subranks for type equality.
9318         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9319         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9320         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9321
9322 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9323
9324         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9325         count when creating the object.
9326
9327 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9328             Ulrich Weigand  <uweigand@de.ibm.com>
9329
9330         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9331         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9332         is used in AIX.
9333         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9334         (process_xcoff_symbol): Likewise.
9335         (scan_xcoff_symtab): Likewise.
9336
9337 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9338
9339         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9340         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9341         (ia64_access_reg): Use get_frame_register_unsigned.
9342         (ia64_access_rse_reg): Likewise.
9343         (ia64_libunwind_frame_prev_register): Likewise.
9344
9345 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9346
9347         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9348         * gdbarch.c: Regenerated.
9349         * gdbarch.h: Regenerated.
9350         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9351         visibility external.
9352         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9353         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9354         (enum cfa_how_kind): Move to ...
9355         (struct dwarf2_frame_state_reg_info): Likewise.
9356         (struct dwarf2_frame_state): Likewise.
9357         * dwarf2-frame.h: ... here.
9358         (dwarf2_frame_state_alloc_regs): New declaration.
9359         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9360         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9361
9362 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9363
9364         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9365         regcache_raw_read_unsigned.
9366         (xtensa_pseudo_register_write): Likewise.
9367
9368 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9369
9370         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9371         (nds32_pseudo_register_write): Likewise.
9372
9373 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9374
9375         * regcache.c (struct regcache) <readonly_p>: Change its type
9376         to bool.
9377         (regcache_xmalloc_1): Update parameter type and callers update.
9378
9379 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9380
9381         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9382         set_gdbarch_wchar_bit.
9383         * arm-tdep.c (arm_gdbarch_init): Likewise.
9384
9385 2017-04-25  Pedro Alves  <palves@redhat.com>
9386
9387         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9388         (BothAreRelocatable, memcopy, memmove): Don't define.
9389         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9390         macros.
9391
9392 2017-04-25  Pedro Alves  <palves@redhat.com>
9393
9394         * common/common-defs.h: Include "common/poison.h".
9395         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9396         and adjust.
9397         * common/poison.h: New file.
9398         * common/traits.h: Include <type_traits>.
9399         (Not, Or, Requires): New, moved from common/function-view.h.
9400
9401 2017-04-25  Pedro Alves  <palves@redhat.com>
9402
9403         * breakpoint.h (struct breakpoint): In-class initialize all
9404         fields.  Make boolean fields "bool".
9405         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9406         memset call and initializations no longer necessary.
9407
9408 2017-04-25  Pedro Alves  <palves@redhat.com>
9409
9410         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9411         reference.
9412         (pt_btrace_insn): New function.
9413         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9414
9415 2017-04-25  Pedro Alves  <palves@redhat.com>
9416
9417         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9418         "base" field and inherit from "bp_location" instead.  Add
9419         non-default ctor.
9420         (allocate_location_exception): Use new non-default ctor.
9421         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9422         (init_bp_location): Convert to ...
9423         (bp_location::bp_location): ... this new ctor, and remove memset
9424         call.
9425         (base_breakpoint_allocate_location): Use the new non-default ctor.
9426         * breakpoint.h (bp_location): Now a class.  Declare default and
9427         non-default ctors.  In-class initialize all members.
9428         (init_bp_location): Remove declaration.
9429
9430 2017-04-25  Pedro Alves  <palves@redhat.com>
9431
9432         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9433         assignment operator.
9434
9435 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9436
9437         * doublest.c (convert_doublest_to_floatformat): Call
9438         floatformat_totalsize_bytes.
9439
9440 2017-04-22  Tom Tromey  <tom@tromey.com>
9441
9442         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9443         ui_out_emit_list.
9444         * stack.c (print_frame): Use ui_out_emit_list.
9445         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9446         ui_out_emit_list.
9447         * mi/mi-main.c (print_one_inferior)
9448         (mi_cmd_data_list_register_names)
9449         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9450         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9451         ui_out_emit_list.
9452         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9453         (mi_output_solib_attribs): Use ui_out_emit_list,
9454         ui_out_emit_tuple.
9455         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9456         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9457         (mi_cmd_stack_list_args, list_args_or_locals): Use
9458         ui_out_emit_list.
9459         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9460         * breakpoint.c (print_solib_event, output_thread_groups): Use
9461         ui_out_emit_list.
9462
9463 2017-04-22  Tom Tromey  <tom@tromey.com>
9464
9465         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9466         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9467         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9468
9469 2017-04-22  Tom Tromey  <tom@tromey.com>
9470
9471         * tracepoint.c (tvariables_info_1)
9472         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9473
9474 2017-04-22  Tom Tromey  <tom@tromey.com>
9475
9476         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9477         annotate_arg_emitter.
9478         * breakpoint.c (print_mention_watchpoint)
9479         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9480         * annotate.h (struct annotate_arg_emitter): New.
9481
9482 2017-04-22  Tom Tromey  <tom@tromey.com>
9483
9484         * record-btrace.c (record_btrace_insn_history)
9485         (record_btrace_insn_history_range, record_btrace_call_history)
9486         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9487         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9488         ui_out_emit_tuple.
9489         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9490         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9491         * skip.c (skip_info): Use ui_out_emit_tuple.
9492         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9493         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9494         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9495         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9496         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9497         ui_out_emit_tuple.
9498         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9499         (output_register, mi_cmd_data_read_memory)
9500         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9501         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9502         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9503         Use ui_out_emit_tuple.
9504         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9505         ui_out_emit_tuple.
9506         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9507         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9508         * linux-thread-db.c (info_auto_load_libthread_db): Use
9509         ui_out_emit_tuple.
9510         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9511         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9512         * disasm.c (do_mixed_source_and_assembly_deprecated)
9513         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9514         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9515         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9516         * breakpoint.c (print_one_breakpoint_location)
9517         (print_one_breakpoint): Use ui_out_emit_tuple.
9518         * auto-load.c (print_script, info_auto_load_cmd): Use
9519         ui_out_emit_tuple.
9520         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9521
9522 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9523
9524         * thread.c (print_thread_info_1): Remove dead code.
9525
9526 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9527
9528         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9529         GDB_SELF_TEST.
9530         * arm-tdep.c (selftests::arm_record_test): Likewise.
9531
9532 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9533
9534         * regcache.c (regcache_restore): Remove argument 2.  Replace
9535         argument 3 with regcache.  Get register status from
9536         src->register_status and get register contents from
9537         register_buffer (src, regnum).
9538         (regcache_cpy): Update.
9539
9540 2017-04-19  Pedro Alves  <palves@redhat.com>
9541
9542         * gdbthread.h (thread): Add missing closing parenthesis in
9543         comment.
9544
9545 2017-04-19  Pedro Alves  <palves@redhat.com>
9546
9547         * common/refcounted-object.h: New file.
9548         * gdbthread.h: Include "common/refcounted-object.h".
9549         (thread_info): Inherit from refcounted_object and add comments.
9550         (thread_info::incref, thread_info::decref)
9551         (thread_info::m_refcount): Delete.
9552         (thread_info::deletable): Use the refcounted_object::refcount()
9553         method.
9554         * inferior.c (current_inferior_): Add comment.
9555         (set_current_inferior): Increment/decrement refcounts.
9556         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9557         not-deletable instead of comparing with the current inferior.
9558         (initialize_inferiors): Increment the initial inferior's refcount.
9559         * inferior.h (struct inferior): Forward declare.
9560         Include "common/refcounted-object.h".
9561         (current_inferior, set_current_inferior): Move declaration to
9562         before struct inferior's definition, and fix comment.
9563         (inferior): Inherit from refcounted_object.  Add comments.
9564         * thread.c (switch_to_thread_no_regs): Reference the thread's
9565         inferior pointer directly instead of doing a ptid lookup.
9566         (switch_to_no_thread): New function.
9567         (switch_to_thread(thread_info *)): New function, factored out
9568         from ...
9569         (switch_to_thread(ptid_t)): ... this.
9570         (restore_current_thread): Delete.
9571         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9572         fields, and add 'inf' field.
9573         (do_restore_current_thread_cleanup): Check whether old->inf is
9574         alive instead of looking up an inferior by ptid.  Use
9575         switch_to_thread and switch_to_no_thread.
9576         (restore_current_thread_cleanup_dtor): Use old->inf directly
9577         instead of lookup up an inferior by id.  Decref the inferior.
9578         Don't restore 'removable'.
9579         (make_cleanup_restore_current_thread): Same the inferior pointer
9580         in old, instead of the inferior number.  Incref the inferior.
9581         Don't save/clear 'removable'.
9582
9583 2017-04-19  Pedro Alves  <palves@redhat.com>
9584
9585         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9586         unittests/scoped_restore-selftests.c.
9587         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9588         * common/scoped_restore.h (scoped_restore_base): Make "class".
9589         (scoped_restore_base::release): New public method.
9590         (scoped_restore_base::scoped_restore_base): New protected ctor.
9591         (scoped_restore_base::m_saved_var): New protected field.
9592         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9593         scoped_restore_base base class instead of m_saved_var directly.
9594         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9595         (scoped_restore_tmpl::scoped_restore_tmpl(const
9596         scoped_restore_tmpl<T>&)): Likewise.
9597         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9598         method.
9599         (scoped_restore_tmpl::saved_var): New method.
9600         (scoped_restore_tmpl::m_saved_var): Delete.
9601         * inferior.h (inferior::detaching): Now a bool.
9602         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9603         cleanup.
9604         * unittests/scoped_restore-selftests.c: New file.
9605
9606 2017-04-19  Pedro Alves  <palves@redhat.com>
9607
9608         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9609         Re-sort in alphabetic order.
9610
9611 2017-04-18  Pedro Alves  <palves@redhat.com>
9612
9613         * xml-support.c (obstack_xml_printf): Delete.
9614         * xml-support.h (obstack_xml_printf): Delete.
9615
9616 2017-04-18  Pedro Alves  <palves@redhat.com>
9617
9618         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9619         vdebug, verror, body_text, start_element, end_element, name,
9620         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9621         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9622         is_xinclude>: Make private and add m_ prefix.
9623         (gdb_xml_parser::body_text): New method, based on ...
9624         (gdb_xml_body_text): ... this.  Adjust.
9625         (gdb_xml_parser::vdebug): New method, based on ...
9626         (gdb_xml_debug): ... this.  Adjust.
9627         (gdb_xml_parser::verror): New method, based on ...
9628         (gdb_xml_error): ... this.  Adjust.
9629         (gdb_xml_parser::start_element): New method, based on ...
9630         (gdb_xml_start_element): ... this.  Adjust.
9631         (gdb_xml_start_element_wrapper): Defer to
9632         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9633         (gdb_xml_parser::end_element): New method, based on ...
9634         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9635         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9636         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9637         (gdb_xml_parser::use_dtd): New method, based on ...
9638         (gdb_xml_use_dtd): ... this.  Adjust.
9639         (gdb_xml_parser::parse): New method, based on ...
9640         (gdb_xml_parse): ... this.  Adjust.
9641         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9642         (xinclude_start_include): Adjust to call the parser's name method.
9643         (xml_xinclude_default, xml_xinclude_start_doctype)
9644         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9645         method.
9646         (xml_process_xincludes): Adjust to call parser methods.
9647         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9648         declarations.
9649
9650 2017-04-18  Pedro Alves  <palves@redhat.com>
9651
9652         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9653         gdb::optional<std::string>.
9654         * xml-support.c: Include <string>.
9655         (scope_level::scope_level(scope_level &&))
9656         (scope_level::~scope_level): Delete.
9657         (scope_level::body): Now a std::string.
9658         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9659         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9660         parameter.
9661         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9662         (xinclude_parsing_data::output): Now a std::string reference.
9663         (xinclude_start_include): Adjust.
9664         (xml_xinclude_default): Adjust.
9665         (xml_process_xincludes): Add 'output' parameter, and return bool.
9666         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9667         and return bool.
9668         * xml-tdesc.c: Include <unordered_map> and <string>.
9669         (tdesc_xml_cache): Delete.
9670         (tdesc_xml_cache_s): Delete.
9671         (xml_cache): Now an std::unordered_map.
9672         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9673         (target_fetch_description_xml): Change return type to
9674         gdb::optional<std::string>, and adjust.
9675         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9676         (target_fetch_description_xml): Change return type to
9677         gdb::optional<std::string>.
9678
9679 2017-04-18  Pedro Alves  <palves@redhat.com>
9680
9681         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9682         unittests/optional-selftests.c.
9683         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9684         * unittests/optional-selftests.c: New file.
9685         * unittests/optional/assignment/1.cc: New file.
9686         * unittests/optional/assignment/2.cc: New file.
9687         * unittests/optional/assignment/3.cc: New file.
9688         * unittests/optional/assignment/4.cc: New file.
9689         * unittests/optional/assignment/5.cc: New file.
9690         * unittests/optional/assignment/6.cc: New file.
9691         * unittests/optional/assignment/7.cc: New file.
9692         * unittests/optional/cons/copy.cc: New file.
9693         * unittests/optional/cons/default.cc: New file.
9694         * unittests/optional/cons/move.cc: New file.
9695         * unittests/optional/cons/value.cc: New file.
9696         * unittests/optional/in_place.cc: New file.
9697         * unittests/optional/observers/1.cc: New file.
9698         * unittests/optional/observers/2.cc: New file.
9699
9700 2017-04-18  Pedro Alves  <palves@redhat.com>
9701
9702         * common/gdb_optional.h: Include common/traits.h.
9703         (in_place_t): New type.
9704         (in_place): New constexpr variable.
9705         (optional::optional): Remove member initialization of
9706         m_instantiated.
9707         (optional::optional(in_place_t...)): New constructor.
9708         (optional::~optional): Use reset.
9709         (optional::optional(const optional&)): New.
9710         (optional::optional(const optional&&)): New.
9711         (optional::optional(T &)): New.
9712         (optional::optional(T &&)): New.
9713         (operator::operator=(const optional &)): New.
9714         (operator::operator=(optional &&)): New.
9715         (operator::operator= (const T &))
9716         (operator::operator= (T &&))
9717         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9718         (operator::reset): New.
9719         (operator::m_instantiated):: Add in-class initializer.
9720         * common/traits.h: Include <type_traits>.
9721         (struct And): New types.
9722
9723 2017-04-18  Pedro Alves  <palves@redhat.com>
9724
9725         * xml-support.c: Include <vector>.
9726         (scope_level::scope_level(const gdb_xml_element *))
9727         (scope_level::scope_level(scope_level&&)): New.
9728         (scope_level::~scope_level): New.
9729         (scope_level_s): Delete.
9730         (gdb_xml_parser::scopes): Now a std::vector.
9731         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9732         Use std::vector.
9733         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9734         scope cleanup code.
9735         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9736         of the scopes member.  Use std::vector::emplace_back.
9737
9738 2017-04-18  Pedro Alves  <palves@redhat.com>
9739
9740         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9741         a bool.
9742         (gdb_xml_end_element): Change type of first parameter.
9743         (gdb_xml_cleanup): Rename to ...
9744         (gdb_xml_parser::~gdb_xml_parser): ... this.
9745         (gdb_xml_create_parser_and_cleanup): Delete with ...
9746         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9747         to this new ctor.
9748         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9749         using gdb_xml_create_parser_and_cleanup.
9750         (xinclude_parsing_data): Add ctor/dtor.
9751         (xml_xinclude_cleanup): Delete.
9752         (xml_process_xincludes): Create a local xinclude_parsing_data
9753         instead of heap-allocating one.  Create a local gdb_xml_parser
9754         instead of heap-allocating one with
9755         gdb_xml_create_parser_and_cleanup.
9756
9757 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9758
9759         PR threads/20743
9760         * fbsd-nat.c (resume_one_thread_cb): Remove.
9761         (resume_all_threads_cb): Remove.
9762         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9763         iterate_over_threads.
9764
9765 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9766
9767         * NEWS: Create a new section for the next release branch.
9768         Rename the section of the current branch, now that it has
9769         been cut.
9770
9771 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9772
9773         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9774         * version.in: Bump version to 8.0.50.DATE-git.
9775
9776 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9777
9778         PR gdb/21385
9779         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9780         independently of the host, and fix build breakage on Cygwin.
9781
9782 2017-04-13  Pedro Alves  <palves@redhat.com>
9783
9784         * inferior.c (free_inferior): Convert to ...
9785         (inferior::~inferior): ... this dtor.
9786         (inferior::inferior): New ctor, factored out from ...
9787         (add_inferior_silent): ... here.  Allocate the inferior with a new
9788         expression.
9789         (delete_inferior): Call delete instead of free_inferior.
9790         * inferior.h (gdb_environ, continuation): Forward declare.
9791         (inferior): Now a class.  Add in-class initialization to all
9792         members.  Make boolean fields bool, except 'detaching'.
9793         (inferior::inferior): New explicit ctor.
9794         (inferior::~inferior): New.
9795
9796 2017-04-13  Pedro Alves  <palves@redhat.com>
9797
9798         * inferior.c (init_inferior_list): Delete.
9799         * inferior.h (init_inferior_list): Delete.
9800
9801 2017-04-13  Pedro Alves  <palves@redhat.com>
9802
9803         PR threads/13217
9804         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9805         (top level): Call it twice, with different thread sets.
9806
9807 2017-04-13  Pedro Alves  <palves@redhat.com>
9808
9809         * thread.c: Include <algorithm>.
9810         (thread_array_cleanup): Delete.
9811         (scoped_inc_dec_ref): New class.
9812         (live_threads_count): New function.
9813         (set_thread_refcount): Delete.
9814         (tp_array_compar_ascending): Now a bool.
9815         (tp_array_compar): Convert to a std::sort comparison function.
9816         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9817         and live_threads_count.
9818
9819 2017-04-13  Pedro Alves  <palves@redhat.com>
9820
9821         * infrun.c (follow_fork_inferior): Also switch the current
9822         inferior.
9823
9824 2017-04-13  Pedro Alves  <palves@redhat.com>
9825
9826         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9827         before calling create_internal_breakpoint.
9828
9829 2017-04-13  Pedro Alves  <palves@redhat.com>
9830
9831         * fork-child.c (execv_argv): New class.
9832         (breakup_args): Refactored as ...
9833         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9834         Copy arguments to storage and replace separators with NULL
9835         terminators in place.
9836         (escape_bang_in_quoted_argument): Adjust to return bool.
9837         (execv_argv::execv_argv): New ctor.
9838         (execv_argv::init_for_shell): New method, factored out from
9839         fork_inferior.  Don't strdup strings into the vector.
9840         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9841         Remove free_vector_argv call.
9842
9843 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9844
9845         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9846         tdep->rx_psw_type.
9847
9848 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9849
9850         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9851         * rx-tdep.c (rx_gdbarch_init): Likewise.
9852
9853 2017-04-13  Pedro Alves  <palves@redhat.com>
9854
9855         * breakpoint.h (struct breakpoint): Reindent.
9856
9857 2017-04-13  Pedro Alves  <palves@redhat.com>
9858
9859         * breakpoint.c (bp_location): Rename to ...
9860         (bp_locations): ... this.  All references updated.
9861         (bp_location_count): Rename to ...
9862         (bp_locations_count): ... this.  All references updated.
9863         (bp_location_placed_address_before_address_max): Rename to ...
9864         (bp_locations_placed_address_before_address_max): ... this.  All
9865         references updated.
9866         (bp_location_shadow_len_after_address_max): Rename to ...
9867         (bp_locations_shadow_len_after_address_max): ... this.  All
9868         references updated.
9869         (bp_location_compare_addrs): Rename to ...
9870         (bp_locations_compare_addrs): ... this.  All references updated.
9871         (bp_location_compare):Rename to ...
9872         (bp_locations_compare): ... this.  All references updated.
9873         (bp_location_target_extensions_update): Rename to ...
9874         (bp_locations_target_extensions_update): ... this.  All references
9875         updated.
9876
9877 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9878
9879         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9880         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9881         'sgtty.h'.
9882         * common/gdb_termios.h: New file, with parts of "terminal.h".
9883         * inflow.c: Include "gdb_termios.h".
9884         * ser-unix.c: Include "gdb_termios.h".
9885         * terminal.h: Move terminal-related defines to
9886         "common/gdb_termios.h".
9887
9888 2017-04-12  Tom Tromey  <tom@tromey.com>
9889
9890         * probe.c (parse_probes): Update.
9891         * location.h (delete_event_location): Don't declare.
9892         (event_location_deleter::operator()): Update.
9893         * location.c (event_location_deleter::operator()): Rename from
9894         delete_event_location.
9895         * linespec.h (linespec_result) <location>: Change type to
9896         event_location_up.
9897         * linespec.c (canonicalize_linespec, event_location_to_sals)
9898         (decode_objc): Update.
9899         (linespec_result): Don't call delete_event_location.
9900         * breakpoint.c (create_breakpoints_sal)
9901         (bkpt_probe_create_sals_from_location)
9902         (strace_marker_create_sals_from_location): Update.
9903
9904 2017-04-12  Tom Tromey  <tom@tromey.com>
9905
9906         * linespec.h (struct linespec_result): Add constructor and
9907         destructor.
9908         (init_linespec_result, destroy_linespec_result)
9909         (make_cleanup_destroy_linespec_result): Don't declare.
9910         * linespec.c (init_linespec_result): Remove.
9911         (linespec_result::~linespec_result): Rename from
9912         destroy_linespec_result.  Update.
9913         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9914         Remove.
9915         * breakpoint.c (create_breakpoint, break_range_command)
9916         (decode_location_default): Update.
9917         * ax-gdb.c (agent_command_1): Update.
9918
9919 2017-04-12  Tom Tromey  <tom@tromey.com>
9920
9921         * remote.c (remote_download_tracepoint): Update.
9922         * python/py-breakpoint.c (bppy_get_location): Update.
9923         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9924         (gdbscm_breakpoint_location): Update.
9925         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9926         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9927         Change type to event_location_up.
9928         * breakpoint.c (create_overlay_event_breakpoint)
9929         (create_longjmp_master_breakpoint)
9930         (create_std_terminate_master_breakpoint)
9931         (create_exception_master_breakpoint)
9932         (breakpoint_event_location_empty_p, print_breakpoint_location)
9933         (print_one_breakpoint_location, create_thread_event_breakpoint)
9934         (init_breakpoint_sal, create_breakpoint)
9935         (print_recreate_ranged_breakpoint, break_range_command)
9936         (init_ada_exception_breakpoint, say_where): Update.
9937         (base_breakpoint_dtor): Don't call delete_event_location.
9938         (bkpt_print_recreate, tracepoint_print_recreate)
9939         (dprintf_print_recreate, update_static_tracepoint)
9940         (breakpoint_re_set_default): Update.
9941
9942 2017-04-12  Tom Tromey  <tom@tromey.com>
9943
9944         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9945         type of "to_do".  Update.
9946         (compute_stack_depth): Use std::vector.
9947
9948 2017-04-12  Tom Tromey  <tom@tromey.com>
9949
9950         * printcmd.c (find_instruction_backward): Use std::vector.
9951
9952 2017-04-12  Tom Tromey  <tom@tromey.com>
9953
9954         * symfile.c (objfilep): Remove typedef.
9955         (reread_symbols): Use a std::vector.
9956
9957 2017-04-12  Tom Tromey  <tom@tromey.com>
9958
9959         * mi/mi-main.c (exec_direction_forward): Remove.
9960         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9961         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9962         scoped_restore.
9963         * guile/guile.c (guile_repl_command, guile_command)
9964         (gdbscm_execute_gdb_command): Use scoped_restore.
9965         * go-exp.y (go_parse): Use scoped_restore.
9966         * d-exp.y (d_parse): Use scoped_restore.
9967         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9968         * c-exp.y (c_parse): Use scoped_restore.
9969
9970 2017-04-12  Tom Tromey  <tom@tromey.com>
9971
9972         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9973         (mi_parse): Update return type.
9974         (mi_parse_free): Remove.
9975         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9976         (mi_parse::~mi_parse): Rename from mi_parse_free.
9977         (mi_parse_cleanup): Remove.
9978         (mi_parse): Return a unique_ptr.  Use new.
9979         * mi/mi-main.c (mi_execute_command): Update.
9980
9981 2017-04-12  Tom Tromey  <tom@tromey.com>
9982
9983         * location.c (explicit_location_lex_one): Return a
9984         unique_xmalloc_ptr.
9985         (string_to_explicit_location): Update.  Remove cleanups.
9986
9987 2017-04-12  Tom Tromey  <tom@tromey.com>
9988
9989         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9990         (compare_value_and_voffset): Change type.  Update.
9991         (compute_vtable_size): Change type of "offset_vec".
9992         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9993         (gnuv3_get_typeid): Remove extraneous declaration.
9994
9995 2017-04-12  Tom Tromey  <tom@tromey.com>
9996
9997         * charset.h (wchar_iterator): Fix comment.
9998
9999 2017-04-12  Tom Tromey  <tom@tromey.com>
10000
10001         * charset.c (iconv_wrapper): New class.
10002         (cleanup_iconv): Remove.
10003         (convert_between_encodings): Use it.
10004
10005 2017-04-12  Tom Tromey  <tom@tromey.com>
10006
10007         * symfile.h (increment_reading_symtab): Update type.
10008         * symfile.c (decrement_reading_symtab): Remove.
10009         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10010         * psymtab.c (psymtab_to_symtab): Update.
10011         * dwarf2read.c (dw2_instantiate_symtab): Update.
10012
10013 2017-04-12  Tom Tromey  <tom@tromey.com>
10014
10015         * jit.c (struct jit_reader): Declare separately.  Add constructor
10016         and destructor.  Change type of "handle".
10017         (loaded_jit_reader): Define separately.
10018         (jit_reader_load): Update.  New "new".
10019         (jit_reader_unload_command): Use "delete".
10020         * gdb-dlfcn.h (struct dlclose_deleter): New.
10021         (gdb_dlhandle_up): New typedef.
10022         (gdb_dlopen, gdb_dlsym): Update types.
10023         (gdb_dlclose): Remove.
10024         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10025         (gdb_dlsym): Change type of "handle".
10026         (make_cleanup_dlclose): Remove.
10027         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10028         * compile/compile-c-support.c (load_libcc): Update.
10029
10030 2017-04-12  Tom Tromey  <tom@tromey.com>
10031
10032         * symtab.h (find_pcs_for_symtab_line): Change return type.
10033         * symtab.c (find_pcs_for_symtab_line): Change return type.
10034         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10035         type of "vec".  Update.
10036         (ltpy_get_pcs_for_line): Update.
10037         * linespec.c (decode_digits_ordinary): Update.
10038
10039 2017-04-12  Tom Tromey  <tom@tromey.com>
10040
10041         * tracepoint.c (actions_command): Update.
10042         * python/python.c (python_command, python_interactive_command):
10043         Update.
10044         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10045         * guile/guile.c (guile_command): Update.
10046         * defs.h (read_command_lines, read_command_lines_1): Return
10047         command_line_up.
10048         (command_lines_deleter): New struct.
10049         (command_line_up): New typedef.
10050         * compile/compile.c (compile_code_command)
10051         (compile_print_command): Update.
10052         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10053         command_line_up.
10054         (make_cleanup_free_command_lines): Remove.
10055         * cli/cli-script.c (get_command_line, read_command_lines_1)
10056         (copy_command_lines): Return command_line_up.
10057         (while_command, if_command, read_command_lines, define_command)
10058         (document_command): Update.
10059         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10060         Remove.
10061         * breakpoint.h (breakpoint_set_commands): Change type of
10062         "commands".
10063         * breakpoint.c (breakpoint_set_commands): Change type of
10064         "commands".  Update.
10065         (do_map_commands_command, update_dprintf_command_list)
10066         (create_tracepoint_from_upload): Update.
10067
10068 2017-04-12  Tom Tromey  <tom@tromey.com>
10069
10070         * tracepoint.c (scope_info): Update.
10071         * spu-tdep.c (spu_catch_start): Update.
10072         * python/python.c (gdbpy_decode_line): Update.
10073         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10074         * python/py-breakpoint.c (bppy_init): Update.
10075         * probe.c (parse_probes): Update.
10076         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10077         * location.h (event_location_deleter): New struct.
10078         (event_location_up): New typedef.
10079         (new_linespec_location, new_address_location, new_probe_location)
10080         (new_explicit_location, copy_event_location)
10081         (string_to_event_location, string_to_event_location_basic)
10082         (string_to_explicit_location): Update return type.
10083         (make_cleanup_delete_event_location): Remove.
10084         * location.c (new_linespec_location, new_address_location)
10085         (new_probe_location, new_explicit_location, copy_event_location):
10086         Return event_location_up.
10087         (delete_event_location_cleanup)
10088         (make_cleanup_delete_event_location): Remove.
10089         (string_to_explicit_location, string_to_event_location_basic)
10090         (string_to_event_location): Return event_location_up.
10091         * linespec.c (canonicalize_linespec, event_location_to_sals)
10092         (decode_line_with_current_source)
10093         (decode_line_with_last_displayed, decode_objc): Update.
10094         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10095         * completer.c (location_completer): Update.
10096         * cli/cli-cmds.c (edit_command, list_command): Update.
10097         * breakpoint.c (create_overlay_event_breakpoint)
10098         (create_longjmp_master_breakpoint)
10099         (create_std_terminate_master_breakpoint)
10100         (create_exception_master_breakpoint)
10101         (create_thread_event_breakpoint): Update.
10102         (init_breakpoint_sal): Update.  Remove some dead code.
10103         (create_breakpoint_sal): Change type of "location".  Update.
10104         (create_breakpoints_sal, create_breakpoint, break_command_1)
10105         (dprintf_command, break_range_command, until_break_command)
10106         (init_ada_exception_breakpoint)
10107         (strace_marker_create_sals_from_location)
10108         (update_static_tracepoint, trace_command, ftrace_command)
10109         (strace_command, create_tracepoint_from_upload): Update.
10110         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10111         * ax-gdb.c (agent_command_1): Update.
10112
10113 2017-04-12  Pedro Alves  <palves@redhat.com>
10114
10115         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10116         * configure.tgt: Handle i[34567]86-*-go32* and
10117         i[34567]86-*-msdosdjgpp*.
10118         * i386-tdep.c (i386_svr4_reg_to_regnum):
10119         Make extern.
10120         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10121         i386-go32-tdep.c.
10122         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10123         * i386-go32-tdep.c: New file.
10124         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10125         declarations.
10126
10127 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10128
10129         * aix-thread.c (pd_status2str): Change return type to const char *.
10130
10131 2017-04-12  Pedro Alves  <palves@redhat.com>
10132
10133         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10134         calls to set_gdbarch_gnu_triplet_regexp.
10135
10136 2017-04-12  Pedro Alves  <palves@redhat.com>
10137
10138         PR gdb/21323
10139         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10140         New enum value.
10141         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10142         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10143         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10144         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10145         * gdbarch.h, gdbarch.c: Regenerate.
10146         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10147         gdbarch_wchar_bit and gdbarch_wchar_signed.
10148         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10149         * arm-tdep.c (arm_gdbarch_init): Likewise.
10150         * avr-tdep.c (avr_gdbarch_init): Likewise.
10151         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10152         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10153         * i386-tdep.c (i386_go32_init_abi): Likewise.
10154         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10155         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10156         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10157         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10158         * sh-tdep.c (sh_gdbarch_init): Likewise.
10159         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10160         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10161         * windows-tdep.c (windows_init_abi): Likewise.
10162         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10163
10164 2017-04-12  Pedro Alves  <palves@redhat.com>
10165
10166         PR c++/21323
10167         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10168         cplus_primitive_type_char32_t>: New enum values.
10169         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10170         and cplus_primitive_type_char32_t.
10171         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10172         32, use the archtecture's built-in type for char16_t and char32_t,
10173         respectively.  Otherwise, fallback to init_integer_type as before,
10174         but make the type unsigned, and issue a complaint.
10175         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10176
10177 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10178
10179         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10180         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10181
10182 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10183
10184         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10185         'const char *'.
10186
10187 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10188
10189         * common/common-utils.c (free_vector_argv): New function.
10190         * common/common-utils.h: Include <vector>.
10191         (free_vector_argv): New prototype.
10192         * darwin-nat.c (darwin_create_inferior): Rewrite function
10193         prototype in order to constify "exec_file" and accept a
10194         "std::string" for "allargs".
10195         * fork-child.c: Include <vector>.
10196         (breakup_args): Rewrite function, using C++.
10197         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10198         and accept "std::string" for "allargs".  Update the code to
10199         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10200         and "execvp".
10201         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10202         order to constify "exec_file" and accept a "std::string" for
10203         "allargs".
10204         * go32-nat.c (go32_create_inferior): Likewise.
10205         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10206         * infcmd.c (run_command_1): Constify "exec_file".  Use
10207         "std::string" for inferior arguments.
10208         * inferior.h (fork_inferior): Update prototype.
10209         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10210         prototype in order to constify "exec_file" and accept a
10211         "std::string" for "allargs".
10212         * nto-procfs.c (procfs_create_inferior): Likewise.
10213         * procfs.c (procfs_create_inferior): Likewise.
10214         * remote-sim.c (gdbsim_create_inferior): Likewise.
10215         * remote.c (extended_remote_run): Update code to accept
10216         "std::string" as argument.
10217         (extended_remote_create_inferior): Rewrite function prototype in
10218         order to constify "exec_file" and accept a "std::string" for
10219         "allargs".
10220         * rs6000-nat.c (super_create_inferior): Likewise.
10221         (rs6000_create_inferior): Likewise.
10222         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10223         * windows-nat.c (windows_create_inferior): Likewise.
10224
10225 2017-04-11  Pedro Alves  <palves@redhat.com>
10226
10227         * thread.c: Fix whitespace throughout.
10228
10229 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10230
10231         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10232
10233 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10234
10235         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10236
10237 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10238
10239         PR gdb/21364
10240         * osdata.c (info_osdata): Check if 'type' is an empty string
10241         instead of NULL.
10242
10243 2017-04-10  Pedro Alves  <palves@redhat.com>
10244
10245         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10246         (ptid_to_global_thread_id, in_thread_list)
10247         (do_captured_list_thread_ids, set_resumed, set_running)
10248         (set_executing, set_stop_requested, finish_thread_state)
10249         (validate_registers_access, can_access_registers_ptid)
10250         (print_thread_info_1, switch_to_thread)
10251         (do_restore_current_thread_cleanup)
10252         (make_cleanup_restore_current_thread, thread_command)
10253         (thread_name_command): Use operator== instead of ptid_equal.
10254
10255 2017-04-10  Pedro Alves  <palves@redhat.com>
10256
10257         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10258         (current_thread_cleanup_chain): Delete.
10259         (restore_current_thread_cleanup_dtor)
10260         (make_cleanup_restore_current_thread): Remove references to
10261         current_thread_cleanup_chain.
10262
10263 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10264
10265         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10266         REG_UNKNOWN.
10267
10268 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10269
10270         PR gdb/19942
10271         * gdbthread.h (thread_info::deletable): New method.
10272         (thread_info::incref): New method.
10273         (thread_info::decref): New method.
10274         (thread_info::refcount): Move it to private.
10275         * infrun.c (save_stop_context): Call inc_refcount.
10276         (release_stop_context_cleanup): Likewise.
10277         * thread.c (set_thread_exited): New function.
10278         (init_thread_list): Delete "tp" only it is deletable, otherwise
10279         call set_thread_exited.
10280         (delete_thread_1): Call set_thread_exited.
10281         (current_thread_cleanup) <inferior_pid>: Remove.
10282         <thread>: New field.
10283         (restore_current_thread_ptid_changed): Removed.
10284         (do_restore_current_thread_cleanup): Adjust.
10285         (restore_current_thread_cleanup_dtor): Don't call
10286         find_thread_ptid.
10287         (set_thread_refcount): Use dec_refcount.
10288         (make_cleanup_restore_current_thread): Adjust.
10289         (thread_apply_all_command): Call inc_refcount.
10290         (_initialize_thread): Don't call
10291         observer_attach_thread_ptid_changed.
10292
10293 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10294
10295         * thread.c (delete_thread_1): Hoist code on marking thread as
10296         exited.
10297
10298 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10299
10300         * windows-nat.c (windows_detach): Initialize ptid with
10301         minus_one_ptid.
10302
10303 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10304
10305         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10306
10307 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10308
10309         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10310         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10311         (bfin_pseudo_register_write): Likewise
10312
10313 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10314
10315         * common/ptid.h (struct ptid): Change to...
10316         (class ptid_t): ... this.
10317         <ptid_t>: New constructors.
10318         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10319         matches>: New methods.
10320         <make_null, make_minus_one>: New static methods.
10321         <pid>: Rename to...
10322         <m_pid>: ...this.
10323         <lwp>: Rename to...
10324         <m_lwp>: ...this.
10325         <tid>: Rename to...
10326         <m_tid>: ...this.
10327         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10328         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10329         as references, move comment to class ptid_t.
10330         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10331         ptid_t static methods.
10332         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10333         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10334         Take ptid arguments as references, implement using ptid_t methods.
10335         * unittests/ptid-selftests.c: New file.
10336         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10337         unittests/ptid-selftests.c.
10338         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10339
10340 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10341
10342         * python/python.c (python_run_simple_file): Cast mode literal to
10343         non-const char pointer as expected by PyFile_FromString.
10344
10345 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10346
10347         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10348         minus_one_ptid and null_ptid.
10349
10350 2017-04-05  Pedro Alves  <palves@redhat.com>
10351
10352         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10353         * configure: Regenerate.
10354
10355 2017-04-05  Pedro Alves  <palves@redhat.com>
10356
10357         * ada-exp.y (yyerror): Constify.
10358         * ada-lang.c (bound_name, get_selections)
10359         (ada_variant_discrim_type)
10360         (ada_variant_discrim_name, ada_value_struct_elt)
10361         (ada_lookup_struct_elt_type, is_unchecked_variant)
10362         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10363         (catch_ada_exception_command_split)
10364         (catch_ada_assert_command_split, catch_assert_command)
10365         (ada_op_name): Constify.
10366         * ada-lang.h (ada_yyerror, get_selections)
10367         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10368         * arc-tdep.c (arc_print_frame_cache): Constify.
10369         * arm-tdep.c (arm_skip_stub): Constify.
10370         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10371         (gen_aggregate_elt_ref): Constify.
10372         * bcache.c (print_bcache_statistics): Constify.
10373         * bcache.h (print_bcache_statistics): Constify.
10374         * break-catch-throw.c (catch_exception_command_1):
10375         * breakpoint.c (struct ep_type_description::description):
10376         Constify.
10377         (add_solib_catchpoint): Constify.
10378         (catch_fork_command_1): Add cast.
10379         (add_catch_command): Constify.
10380         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10381         Constify.
10382         * bsd-uthread.c (bsd_uthread_state): Constify.
10383         * buildsym.c (patch_subfile_names): Constify.
10384         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10385         Constify.
10386         * c-exp.y (yyerror): Constify.
10387         (token::oper): Constify.
10388         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10389         * c-varobj.c (cplus_describe_child): Constify.
10390         * charset.c (find_charset_names): Add cast.
10391         (find_charset_names): Constify array and add const_cast.
10392         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10393         (edit_command): Constify.
10394         * cli/cli-decode.c (lookup_cmd): Constify.
10395         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10396         Constify.
10397         (struct dump_context): Constify.
10398         (add_dump_command, restore_command): Constify.
10399         * cli/cli-script.c (get_command_line): Constify.
10400         * cli/cli-script.h (get_command_line): Constify.
10401         * cli/cli-utils.c (check_for_argument): Constify.
10402         * cli/cli-utils.h (check_for_argument): Constify.
10403         * coff-pe-read.c (struct read_pe_section_data): Constify.
10404         * command.h (lookup_cmd): Constify.
10405         * common/print-utils.c (decimal2str): Constify.
10406         * completer.c (gdb_print_filename): Constify.
10407         * corefile.c (set_gnutarget): Constify.
10408         * cp-name-parser.y (yyerror): Constify.
10409         * cp-valprint.c (cp_print_class_member): Constify.
10410         * cris-tdep.c (cris_register_name, crisv32_register_name):
10411         Constify.
10412         * d-exp.y (yyerror): Constify.
10413         (struct token::oper): Constify.
10414         * d-lang.h (d_yyerror): Constify.
10415         * dbxread.c (struct header_file_location::name): Constify.
10416         (add_old_header_file, add_new_header_file, last_function_name)
10417         (dbx_next_symbol_text, add_bincl_to_list)
10418         (find_corresponding_bincl_psymtab, set_namestring)
10419         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10420         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10421         * defs.h (command_line_input, print_address_symbolic)
10422         (deprecated_readline_begin_hook): Constify.
10423         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10424         Constify.
10425         * event-top.c (handle_line_of_input): Constify and add cast.
10426         * exceptions.c (catch_errors): Constify.
10427         * exceptions.h (catch_errors): Constify.
10428         * expprint.c (print_subexp_standard, op_string, op_name)
10429         (op_name_standard, dump_raw_expression, dump_raw_expression):
10430         * expression.h (op_name, op_string, dump_raw_expression):
10431         Constify.
10432         * f-exp.y (yyerror): Constify.
10433         (struct token::oper): Constify.
10434         (struct f77_boolean_val::name): Constify.
10435         * f-lang.c (f_word_break_characters): Constify.
10436         * f-lang.h (f_yyerror): Constify.
10437         * fork-child.c (fork_inferior): Add cast.
10438         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10439         (new_variant): Constify.
10440         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10441         * gdbarch.c: Regenerate.
10442         * gdbcore.h (set_gnutarget): Constify.
10443         * go-exp.y (yyerror): Constify.
10444         (token::oper): Constify.
10445         * go-lang.h (go_yyerror): Constify.
10446         * go32-nat.c (go32_sysinfo): Constify.
10447         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10448         * guile/scm-cmd.c (cmdscm_function): Constify.
10449         * guile/scm-param.c (pascm_param_value): Constify.
10450         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10451         (h8300sx_register_name): Constify.
10452         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10453         Constify.
10454         * ia64-tdep.c (ia64_register_names): Constify.
10455         * infcmd.c (construct_inferior_arguments): Constify.
10456         (path_command, attach_post_wait): Constify.
10457         * language.c (show_range_command, show_case_command)
10458         (unk_lang_error): Constify.
10459         * language.h (language_defn::la_error)
10460         (language_defn::la_name_of_this): Constify.
10461         * linespec.c (decode_line_2): Constify.
10462         * linux-thread-db.c (thread_db_err_str): Constify.
10463         * lm32-tdep.c (lm32_register_name): Constify.
10464         * m2-exp.y (yyerror): Constify.
10465         * m2-lang.h (m2_yyerror): Constify.
10466         * m32r-tdep.c (m32r_register_names): Constify and make static.
10467         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10468         * m88k-tdep.c (m88k_register_name): Constify.
10469         * macroexp.c (appendmem): Constify.
10470         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10471         (upgrade_type, parse_external, parse_partial_symbols)
10472         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10473         (new_symbol): Constify.
10474         * memattr.c (mem_info_command): Constify.
10475         * mep-tdep.c (register_name_from_keyword): Constify.
10476         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10477         Constify.
10478         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10479         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10480         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10481         cast.
10482         (mi_execute_async_cli_command): Constify.
10483         * mips-tdep.c (mips_register_name): Constify.
10484         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10485         (am33_register_name, am33_2_register_name)
10486         * moxie-tdep.c (moxie_register_names): Constify.
10487         * nat/linux-osdata.c (osdata_type): Constify fields.
10488         * nto-tdep.c (nto_parse_redirection): Constify.
10489         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10490         (lookup_child_selector): Constify.
10491         (objc_methcall::name): Constify.
10492         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10493         (lookup_struct_typedef): Constify.
10494         * objfiles.c (pc_in_section): Constify.
10495         * objfiles.h (pc_in_section): Constify.
10496         * p-exp.y (struct token::oper): Constify.
10497         (yyerror): Constify.
10498         * p-lang.h (pascal_yyerror): Constify.
10499         * parser-defs.h (op_name_standard): Constify.
10500         (op_print::string): Constify.
10501         (exp_descriptor::op_name): Constify.
10502         * printcmd.c (print_address_symbolic): Constify.
10503         * psymtab.c (print_partial_symbols): Constify.
10504         * python/py-breakpoint.c (stop_func): Constify.
10505         (bppy_get_expression): Constify.
10506         * python/py-cmd.c (cmdpy_completer::name): Constify.
10507         (cmdpy_function): Constify.
10508         * python/py-event.c (evpy_add_attribute)
10509         (gdbpy_initialize_event_generic): Constify.
10510         * python/py-event.h (evpy_add_attribute)
10511         (gdbpy_initialize_event_generic): Constify.
10512         * python/py-evts.c (add_new_registry): Constify.
10513         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10514         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10515         * python/py-inferior.c (get_buffer): Add cast.
10516         * python/py-param.c (parm_constant::name): Constify.
10517         * python/py-unwind.c (fprint_frame_id): Constify.
10518         * python/python.c (gdbpy_parameter_value): Constify.
10519         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10520         * remote.c (memory_packet_config::name): Constify.
10521         (show_packet_config_cmd, remote_write_bytes)
10522         (remote_buffer_add_string):
10523         * reverse.c (exec_reverse_once): Constify.
10524         * rs6000-tdep.c (variant::name, variant::description): Constify.
10525         * rust-exp.y (rustyyerror): Constify.
10526         * rust-lang.c (rust_op_name): Constify.
10527         * rust-lang.h (rustyyerror): Constify.
10528         * serial.h (serial_ops::name): Constify.
10529         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10530         (sh_sh3e_register_name, sh_sh2e_register_name)
10531         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10532         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10533         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10534         (sh_sh4al_dsp_register_name): Constify.
10535         * sh64-tdep.c (sh64_register_name): Constify.
10536         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10537         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10538         * stabsread.c (patch_block_stabs, read_type_number)
10539         (ref_map::stabs, ref_add, process_reference)
10540         (symbol_reference_defined, define_symbol, define_symbol)
10541         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10542         (read_one_struct_field, read_struct_fields, read_baseclasses)
10543         (read_tilde_fields, read_struct_type, read_array_type)
10544         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10545         (read_huge_number, read_range_type, read_args, common_block_start)
10546         (find_name_end): Constify.
10547         * stabsread.h (common_block_start, define_symbol)
10548         (process_one_symbol, symbol_reference_defined, ref_add):
10549         * symfile.c (get_section_index, add_symbol_file_command):
10550         * symfile.h (get_section_index): Constify.
10551         * target-descriptions.c (tdesc_type::name): Constify.
10552         (tdesc_free_type): Add cast.
10553         * target.c (find_default_run_target):
10554         (add_deprecated_target_alias, find_default_run_target)
10555         (target_announce_detach): Constify.
10556         (do_option): Constify.
10557         * target.h (add_deprecated_target_alias): Constify.
10558         * thread.c (print_thread_info_1): Constify.
10559         * top.c (deprecated_readline_begin_hook, command_line_input):
10560         Constify.
10561         (init_main): Add casts.
10562         * top.h (handle_line_of_input): Constify.
10563         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10564         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10565         (tfind_command): Rename to ...
10566         (tfind_command_1): ... this and constify.
10567         (tfind_command): New function.
10568         (tfind_end_command, tfind_start_command): Adjust.
10569         (encode_source_string): Constify.
10570         * tracepoint.h (encode_source_string): Constify.
10571         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10572         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10573         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10574         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10575         * tui/tui-win.c (parse_scrolling_args): Constify.
10576         * tui/tui-windata.c (tui_erase_data_content): Constify.
10577         * tui/tui-windata.h (tui_erase_data_content): Constify.
10578         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10579         * tui/tui.c (tui_enable): Add cast.
10580         * utils.c (defaulted_query): Constify.
10581         (init_page_info): Add cast.
10582         (puts_debug, subset_compare): Constify.
10583         * utils.h (subset_compare): Constify.
10584         * varobj.c (varobj_format_string): Constify.
10585         * varobj.h (varobj_format_string): Constify.
10586         * vax-tdep.c (vax_register_name): Constify.
10587         * windows-nat.c (windows_detach): Constify.
10588         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10589         * xml-support.c (gdb_xml_end_element): Constify.
10590         * xml-tdesc.c (tdesc_start_reg): Constify.
10591         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10592         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10593         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10594
10595 2017-04-05  Pedro Alves  <palves@redhat.com>
10596
10597         * proc-api.c (struct trans): Constify.
10598         (procfs_note): Constify.
10599         * proc-events.c (struct trans, syscall_table):
10600         * proc-flags.c (struct trans): Constify.
10601         * proc-utils.h (procfs_note): Constify.
10602         * proc-why.c (struct trans): Constify.
10603         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10604         (procfs_detach): Constify.
10605         * sol-thread.c (struct string_map): Constify.
10606         (td_err_string, td_state_string): Constify.
10607
10608 2017-04-05  Pedro Alves  <palves@redhat.com>
10609
10610         * proc-api.c (procfs_filename): Don't initialize
10611         procfs_filename.
10612         (prepare_to_trace): Assume procfs_filename is non-NULL.
10613         (_initialize_proc_api): Give procfs_filename a default value here.
10614
10615 2017-04-05  Pedro Alves  <palves@redhat.com>
10616
10617         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10618         'cond_string' parameter.
10619         (extract_exception_regexp): Constify 'string' parameter.
10620         (catch_exception_command_1): Constify.
10621         * breakpoint.c (init_catchpoint)
10622         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10623         parameter.
10624         (ep_parse_optional_if_clause, catch_fork_command_1)
10625         (catch_exec_command_1): Constify.
10626         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10627         parameter.
10628         (ep_parse_optional_if_clause): Constify.
10629         * cli/cli-utils.c (remove_trailing_whitespace)
10630         (check_for_argument): Constify.
10631         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10632         non-const overload.
10633         (check_for_argument): Likewise.
10634
10635 2017-04-05  Pedro Alves  <palves@redhat.com>
10636
10637         * event-top.c (command_line_handler): Add cast to execute_command
10638         call.
10639         * record-btrace.c (cmd_record_btrace_bts_start)
10640         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10641         (cmd_record_btrace_start): Add cast to execute_command call.
10642         * record-full.c (record_full_goto_insn):
10643         * record.c (record_start, record_stop): Add cast to
10644         execute_command_to_string calls.
10645         (cmd_record_start): Add cast to execute_command calls.
10646
10647 2017-04-05  Pedro Alves  <palves@redhat.com>
10648
10649         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10650         static inline function.
10651         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10652         array and use gdb_PyArg_ParseTupleAndKeywords.
10653         * python/py-cmd.c (cmdpy_init): Likewise.
10654         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10655         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10656         (infpy_search_memory): Likewise.
10657         * python/py-objfile.c (objfpy_add_separate_debug_file)
10658         (gdbpy_lookup_objfile): Likewise.
10659         * python/py-symbol.c (gdbpy_lookup_symbol)
10660         (gdbpy_lookup_global_symbol): Likewise.
10661         * python/py-type.c (gdbpy_lookup_type): Likewise.
10662         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10663         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10664         Likewise.
10665
10666 2017-04-05  Pedro Alves  <palves@redhat.com>
10667
10668         * python/python-internal.h (gdb_PyGetSetDef): New type.
10669         * python/py-block.c (block_object_getset)
10670         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10671         * python/py-event.c (event_object_getset)
10672         (finish_breakpoint_object_getset): Likewise.
10673         * python/py-inferior.c (inferior_object_getset): Likewise.
10674         * python/py-infthread.c (thread_object_getset): Likewise.
10675         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10676         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10677         * python/py-objfile.c (objfile_getset): Likewise.
10678         * python/py-progspace.c (pspace_getset): Likewise.
10679         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10680         Likewise.
10681         * python/py-record.c (recpy_record_getset): Likewise.
10682         * python/py-symbol.c (symbol_object_getset): Likewise.
10683         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10684         Likewise.
10685         * python/py-type.c (type_object_getset, field_object_getset):
10686         Likewise.
10687         * python/py-value.c (value_object_getset): Likewise.
10688
10689 2017-04-05  Pedro Alves  <palves@redhat.com>
10690
10691         * python/python-internal.h (gdb_PyObject_CallMethod)
10692         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10693         New functions.
10694         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10695         (PySys_GetObject, PySys_SetPath): New macros.
10696
10697 2017-04-05  Pedro Alves  <palves@redhat.com>
10698
10699         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10700         info_osdata_command.
10701         * osdata.c (info_osdata_command): Rename to ...
10702         (info_osdata): ... this.  Constify 'type' parameter, and remove
10703         the 'from_tty' parameter.  Accept NULL TYPE.
10704         (info_osdata_command): New function.
10705         * osdata.h (info_osdata_command): Remove declaration.
10706         (info_osdata): New declaration.
10707
10708 2017-04-05  Pedro Alves  <palves@redhat.com>
10709
10710         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10711         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10712         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10713         parameter.
10714         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10715         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10716         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10717         parameter.
10718         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10719         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10720         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10721         (mi_cmd_file_list_exec_source_files)
10722         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10723         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10724         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10725         parameter.
10726         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10727         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10728         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10729         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10730         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10731         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10732         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10733         'command' parameter.
10734         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10735         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10736         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10737         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10738         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10739         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10740         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10741         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10742         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10743         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10744         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10745         parameter.
10746         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10747         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10748         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10749         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10750         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10751         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10752         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10753         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10754         (mi_cmd_data_list_changed_registers)
10755         (mi_cmd_data_write_register_values)
10756         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10757         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10758         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10759         (mi_cmd_list_features, mi_cmd_list_target_features)
10760         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10761         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10762         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10763         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10764         (mi_cmd_trace_frame_collected): Constify 'command'
10765         parameter.
10766         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10767         'command' parameter.
10768
10769 2017-04-05  Pedro Alves  <palves@redhat.com>
10770
10771         * ada-lang.c (ada_completer_word_break_characters): Now a const
10772         array.
10773         (ada_get_gdb_completer_word_break_characters): Constify.
10774         * completer.c (gdb_completer_command_word_break_characters)
10775         (gdb_completer_file_name_break_characters)
10776         (gdb_completer_quote_characters): Now const arrays.
10777         (get_gdb_completer_quote_characters): Constify.
10778         (set_rl_completer_word_break_characters): New function.
10779         (set_gdb_completion_word_break_characters)
10780         (complete_line_internal): Use it.
10781         * completer.h (get_gdb_completer_quote_characters): Constify.
10782         (set_rl_completer_word_break_characters): Declare.
10783         * f-lang.c (f_word_break_characters): Constify.
10784         * language.c (default_word_break_characters): Constify.
10785         * language.h (language_defn::la_word_break_characters): Constify.
10786         (default_word_break_characters): Constify.
10787         * top.c (init_main): Use set_rl_completer_word_break_characters.
10788
10789 2017-04-05  Pedro Alves  <palves@redhat.com>
10790
10791         * aix-thread.c (aix_thread_pid_to_str)
10792         (aix_thread_extra_thread_info): Constify.
10793         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10794         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10795         (bsd_uthread_pid_to_str): Constify.
10796         * corelow.c (core_pid_to_str): Constify.
10797         * darwin-nat.c (darwin_pid_to_str): Constify.
10798         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10799         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10800         Constify.
10801         * gnu-nat.c (gnu_pid_to_str): Constify.
10802         * go32-nat.c (go32_pid_to_str): Constify.
10803         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10804         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10805         * inferior.c (inferior_pid_to_str): Constify.
10806         * linux-nat.c (linux_nat_pid_to_str): Constify.
10807         * linux-tdep.c (linux_core_pid_to_str): Constify.
10808         * linux-thread-db.c (thread_db_pid_to_str)
10809         (thread_db_extra_thread_info): Constify.
10810         * nto-tdep.c (nto_extra_thread_info): Constify.
10811         * nto-tdep.h (nto_extra_thread_info): Constify.
10812         * obsd-nat.c (obsd_pid_to_str): Constify.
10813         * procfs.c (procfs_pid_to_str): Constify.
10814         * ravenscar-thread.c (ravenscar_extra_thread_info)
10815         (ravenscar_pid_to_str): Constify.
10816         * remote-sim.c (gdbsim_pid_to_str): Constify.
10817         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10818         Constify.
10819         * sol-thread.c (solaris_pid_to_str): Constify.
10820         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10821         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10822         * target.c (default_pid_to_str, target_pid_to_str)
10823         (normal_pid_to_str, default_pid_to_str): Constify.
10824         * target.h (target_ops::to_pid_to_str)
10825         (target_ops::to_extra_thread_info): Constify.
10826         (target_pid_to_str, normal_pid_to_str): Constify.
10827         * windows-nat.c (windows_pid_to_str): Constify.
10828         * gdbarch.sh (core_pid_to_str): Constify.
10829         * target-delegates.c: Regenerate.
10830         * gdbarch.h, gdbarch.c: Regenerate.
10831
10832 2017-04-05  Pedro Alves  <palves@redhat.com>
10833
10834         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10835         the memory of the temporary warning_pre_print override.
10836         * utils.c (warning_pre_print): Constify.
10837         * utils.h (warning_pre_print): Constify.
10838
10839 2017-04-05  Pedro Alves  <palves@redhat.com>
10840
10841         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10842         (shell_command): New function.
10843         (make_command): Use std::string.
10844         (init_cli_cmds): Register shell_command instead of shell_escape.
10845
10846 2017-04-05  Pedro Alves  <palves@redhat.com>
10847
10848         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10849         * tracepoint.c (default_collect): Don't initialize.
10850
10851 2017-04-05  Pedro Alves  <palves@redhat.com>
10852
10853         * macroexp.c (macro_buffer::shared): Now a bool.
10854         (init_buffer): Update.
10855         (init_shared_buffer): Constify 'addr' parameter.
10856         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10857         casts.
10858
10859 2017-04-05  Pedro Alves  <palves@redhat.com>
10860
10861         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10862         * disasm.c (set_disassembler_options): Constify local.
10863         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10864
10865 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10866
10867         PR gdb/21352
10868         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10869         option.
10870
10871 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10872
10873         * frame.c (frame_unwind_register_unsigned): Call
10874         frame_unwind_register_value.
10875
10876 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10877
10878         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10879         Use gdb_test_multiple, and don't match anchor.
10880
10881 2017-04-05  Pedro Alves  <palves@redhat.com>
10882
10883         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10884         (Write After Approval): Remove Simon Marchi.
10885
10886 2017-04-05  Pedro Alves  <palves@redhat.com>
10887
10888         * common/gdb_optional.h (optional::optional): Make constexpr and
10889         initialize m_dummy.
10890
10891 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10892
10893         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10894         (amd64fbsd_jmp_buf_reg_offset): Remove.
10895         (amd64fbsd_supply_uthread): Remove function.
10896         (amd64fbsd_collect_uthread): Remove function.
10897         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10898         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10899         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10900         (fbsd-nat.c): Update comment.
10901         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10902         (i386fbsd_jmp_buf_reg_offset): Remove.
10903         (i386fbsd_supply_uthread): Remove function.
10904         (i386fbsd_collect_uthread): Remove function.
10905         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10906
10907 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10908
10909         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10910         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10911         * NEWS: Mention that support for FreeBSD/alpha was removed.
10912         * alpha-fbsd-tdep.c: Delete file.
10913         * config/alpha/fbsd.mh: Delete file.
10914         * configure.host: Delete alpha*-*-freebsd* and
10915         alpha*-*-kfreebsd*-gnu.
10916         * configure.tgt: Delete alpha*-*-freebsd* and
10917         alpha*-*-kfreebsd*-gnu.
10918
10919 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10920
10921         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10922         amd64bsd_store_inferior_registers): Use ptid from regcache.
10923
10924 2017-04-04  Pedro Alves  <palves@redhat.com>
10925
10926         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10927         data fields, make them private and add "m_" prefixes.
10928         (lnp_state_machine::lnp_state_machine): New ctor.
10929         (record_line, check_line_address, handle_set_discriminator)
10930         (handle_set_address, handle_advance_pc, handle_special_opcode)
10931         (handle_advance_line, handle_set_file, handle_negate_stmt)
10932         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10933         (end_sequence, advance_line): New methods.
10934         (m_gdbarch, m_record_lines_p): New fields.
10935         (lnp_reader_state): Delete.
10936         (dwarf_record_line): Rename to ...
10937         (lnp_state_machine::record_line): ... adjust.
10938         (init_lnp_state_machine): Delete.
10939         (lnp_state_machine::lnp_state_machine): New.
10940         (check_line_address): Rename to ...
10941         (lnp_state_machine::check_line_address): This.
10942         (dwarf_decode_lines_1): Remove reference to "reader_state".
10943         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10944         State machine internal state manipulation moved to
10945         lnp_state_machine methods.
10946
10947 2017-04-04  Pedro Alves  <palves@redhat.com>
10948
10949         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10950         unittests/offset-type-selftests.c.
10951         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10952         * common/offset-type.h: New file.
10953         * common/preprocessor.h: New file.
10954         * common/traits.h: New file.
10955         * common/valid-expr.h: New file.
10956         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10957         sect_offset and cu_offset strong typedefs throughout.
10958         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10959         typedefs throughout.
10960         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10961         sect_offset and cu_offset strong typedefs throughout.
10962         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10963         typedefs throughout.
10964         * gdbtypes.h: Include "common/offset-type.h".
10965         (cu_offset): Now an offset type (strong typedef) instead of a
10966         struct.
10967         (sect_offset): Likewise.
10968         (union call_site_parameter_u): Rename "param_offset" field to
10969         "param_cu_off".
10970         * unittests/offset-type-selftests.c: New file.
10971
10972 2017-04-04  Pedro Alves  <palves@redhat.com>
10973
10974         * common/underlying.h: New file.
10975         * dwarf2read.c: Include "common/gdb_optional.h" and
10976         "common/underlying.h".
10977         (dir_index, file_name_index): New types.
10978         (file_entry): Use them.
10979         (file_entry::include): Use to_underlying.
10980         (line_header::add_file_name): Use dir_index.
10981         (read_formatted_entries): Use gdb::optional.  Read form before
10982         writting to file_entry.
10983         (dwarf_decode_line_header): Use dir_index.
10984         (lnp_state_machine::current_file): Use to_underlying.
10985         (lnp_state_machine::file): Change type to file_name_index.
10986         (dwarf_record_line): Use to_underlying.
10987         (init_lnp_state_machine): Use file_name_index.
10988         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10989
10990 2017-04-04  Pedro Alves  <palves@redhat.com>
10991
10992         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10993         operator bool, has_value and get methods.
10994
10995 2017-04-04  Pedro Alves  <palves@redhat.com>
10996
10997         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10998         fields.
10999         (line_header): Initialize all data fields.  Change type of
11000         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11001         Change type of include_dirs to std::vector<const char *>.  Remove
11002         num_include_dirs, include_dirs_size.  Change type of file_names to
11003         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11004         (line_header::line_header): New.
11005         (line_header::add_include_dir, line_header::add_file_name): New
11006         methods.
11007         (line_header::include_dir_at): Remove NULL check.
11008         (line_header::file_name_at): Add const overload.
11009         (line_header_up): New unique_ptr typedef.
11010         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11011         std::vector.  Remove free_line_header call.
11012         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11013         free_line_header call.
11014         (free_cu_line_header): Delete.
11015         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11016         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11017         Adjust to use std::vector.
11018         (free_line_header): Delete.
11019         (free_line_header_voidp): Use delete.
11020         (add_include_dir): Replace with ...
11021         (line_header::add_include_dir): ... this method.  Use std::vector.
11022         (add_file_name): Replace with ...
11023         (line_header::add_file_name): ... this method.  Use std::vector.
11024         (add_include_dir_stub): Delete.
11025         (read_formatted_entries): Remove memset.
11026         (dwarf_decode_line_header): Return a line_header_up instead of a
11027         raw pointer.  Remove cleanup handling.  Pass lambdas to
11028         read_formatted_entries.  Adjust to use line_header methods.
11029         (dwarf_decode_lines_1): Adjust to use line_header methods.
11030         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11031         use std::vector.
11032
11033 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11034
11035         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11036         instead of struct ptid.
11037
11038 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11039
11040         * frame.c (get_frame_register_bytes): Unwind using value.
11041         (put_frame_register_bytes): Likewise.
11042
11043 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11044
11045         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11046         aggregate-like.
11047
11048 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11049
11050         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11051
11052 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11053
11054         * gdbthread.h (struct thread_info): Declare constructor and
11055         destructor.  Add some in-class member initializers.
11056         * thread.c (free_thread): Remove.
11057         (init_thread_list): Call delete instead of free_thread.
11058         (new_thread): Call thread_info constructor.
11059         (thread_info::thread_info): New function.
11060         (thread_info::~thread_info): New function.
11061         (delete_thread_1): Call delete instead of free_thread.
11062         (make_cleanup_restore_current_thread): Move tp and frame to
11063         inner block.
11064
11065 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11066
11067         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11068         (arc_skip_prologue): Likewise.
11069         (arc_make_frame_cache): Likewise.
11070         (arc_pv_get_operand): New function.
11071         (arc_is_in_prologue): Likewise.
11072         (arc_analyze_prologue): Likewise.
11073         (arc_print_frame_cache): Likewise.
11074         (MAX_PROLOGUE_LENGTH): New constant.
11075
11076 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11077
11078         * configure.tgt: Add arc-insn.o.
11079         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11080         (dump_arc_instruction_command): New function.
11081         (arc_fprintf_disasm): Likewise.
11082         (arc_disassemble_info): Likewise.
11083         (arc_insn_get_operand_value): Likewise.
11084         (arc_insn_get_operand_value_signed): Likewise.
11085         (arc_insn_get_memory_base_reg): Likewise.
11086         (arc_insn_get_memory_offset): Likewise.
11087         (arc_insn_get_branch_target): Likewise.
11088         (arc_insn_dump): Likewise.
11089         (arc_insn_get_linear_next_pc): Likewise.
11090         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11091         (arc_disassemble_info): Likewise.
11092         (arc_insn_get_branch_target): Likewise.
11093         (arc_insn_get_linear_next_pc): Likewise.
11094         * NEWS: Mention new "maint print arc arc-instruction".
11095
11096 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11097
11098         * arc-tdep (maintenance_print_arc_list): New variable.
11099         (maintenance_print_arc_command): New function.
11100
11101 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11102
11103         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11104         Add "limm" and "reserved".
11105         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11106         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11107         * arc-tdep.h (arc_regnum): Likewise.
11108
11109 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11110
11111         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11112         for THREADPTR register.
11113         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11114         register.
11115         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11116         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11117         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11118
11119 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11120
11121         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11122         registers above gdbarch_num_regs (gdbarch) as privileged in
11123         call0 ABI.
11124
11125 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11126
11127         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11128         for a single specified register or for all registers in
11129         a0_base..a0_base + C0_NREGS range.
11130         (supply_gregset_reg): Call regcache_raw_supply for a single
11131         specified register or for all registers in a0_base..a0_base +
11132         C0_NREGS range.
11133
11134 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11135
11136         * arch/xtensa.h (C0_NREGS): Add definition.
11137         * xtensa-tdep.c (C0_NREGS): Remove definition.
11138
11139 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11140
11141         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11142         Drop xtensa_default_isa initialization.
11143         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11144
11145 2017-03-27  Pedro Alves  <palves@redhat.com>
11146
11147         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11148         (file_entry::include_dir): New method.
11149         (line_header::include_dir_at, line_header::file_name_at): New
11150         methods.
11151         (setup_type_unit_groups, setup_type_unit_groups)
11152         (psymtab_include_file_name): Simplify using the new methods.
11153         (lnp_state_machine) <the_line_header>: New field.
11154         <file>: Add comment.
11155         (lnp_state_machine::current_file): New method.
11156         (dwarf_record_line): Simplify using the new methods.
11157         (init_lnp_state_machine): Initialize the "the_line_header" field.
11158         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11159         Simplify using the new methods.
11160
11161 2017-03-27  Pedro Alves  <palves@redhat.com>
11162
11163         * cp-name-parser.y (make_empty): Delete.
11164         (demangler_special, nested_name, ptr_operator, array_indicator)
11165         (direct_declarator, declarator_1): Use fill_comp instead of
11166         make_empty.
11167
11168 2017-03-27  Pedro Alves  <palves@redhat.com>
11169
11170         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11171         to ATTRIBUTE_PRINTF.
11172         * solib-target.c (library_list_start_list): Print "string" not
11173         "version".
11174         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11175         gdb_xml_error call.
11176
11177 2017-03-27  Pedro Alves  <palves@redhat.com>
11178
11179         * dwarf2read.c (struct file_and_directory): New.
11180         (dwarf2_get_dwz_file): Adjust to use std::string.
11181         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11182         (find_file_and_directory): Adjust to return a file_and_directory
11183         object.
11184         (read_file_scope): Adjust to use file_and_directory.  Remove
11185         make_cleanup/do_cleanups calls.
11186         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11187         make_cleanup/do_cleanups calls.
11188         * python/python.c (do_start_initialization): Adjust to ldirname
11189         returning a std::string.
11190         * utils.c (ldirname): Now returns a std::string.
11191         * utils.h (ldirname): Change return type to std::string.
11192         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11193         returning a std::string.
11194         * xml-tdesc.c (file_read_description_xml): Likewise.
11195
11196 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11197
11198         * regcache.c (regcache_debug_print_register): New function.
11199         * regcache.h (regcache_debug_print_register): New declaration.
11200         * target.c (debug_print_register): Remove.
11201         (target_fetch_registers): Call regcache_debug_print_register.
11202         (target_store_registers): Likewise.
11203
11204 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11205
11206         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11207         reference beyond the 'lh->include_dirs' array before accessing to
11208         it.
11209         (psymtab_include_file_name): Likewise.
11210         (dwarf_decode_lines_1): Likewise.
11211         (dwarf_decode_lines): Likewise.
11212         (file_file_name): Likewise.
11213
11214 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11215
11216         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11217         inferior_ptid.
11218         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11219         ps_lsetfpregs): Likewise.
11220         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11221         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11222         ps_lsetfpregs): Likewise.
11223         * target.c (target_fetch_registers, target_store_registers):
11224         Remove asserts.
11225
11226 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11227
11228         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11229
11230 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11231
11232         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11233         (_initialize_aarch64_tdep): Register it.
11234         (aarch64_record_load_store): Handle PRFM instruction.
11235         (aarch64_process_record_test): New function.
11236
11237 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11238
11239         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11240         indentation.
11241
11242 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11243
11244         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11245
11246 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11247
11248         python/python.c (do_start_initialization): Fix memory leak.
11249
11250 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11251
11252         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11253         using get_ptrace_pid.
11254         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11255         inferior_ptid.
11256         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11257         inferior_ptid instead of pid.
11258
11259 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11260
11261         * aarch64-tdep.c: Wrap locally used classes in anonymous
11262         namespace.
11263         * arm-tdep.c: Likewise.
11264         * linespec.c: Likewise.
11265         * ui-out.c: Likewise.
11266
11267 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11268
11269         PR gdb/19637
11270         * python/lib/gdb/printer/bound_registers.py: Import sys.
11271
11272 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11273
11274         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11275         windows_thread_info parameter and use it instead of
11276         current_thread.
11277         (windows_fetch_inferior_registers): Don't set current_thread,
11278         pass the thread to do_windows_fetch_inferior_registers.  Use
11279         ptid from regcache instead of inferior_ptid.
11280         (do_windows_store_inferior_registers): Add windows_thread_info
11281         parameter and use it instead of current_thread.
11282         (windows_store_inferior_registers): Don't set current_thread,
11283         pass the thread to do_windows_store_inferior_registers.  Use
11284         ptid from regcache instead of inferior_ptid.
11285
11286 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11287
11288         * ser-mingw.c (ser_windows_raw): Remove reference to
11289         struct serial::current_timeout.
11290
11291 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11292
11293         PR tdep/20928
11294         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11295         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11296         (sparc64_fsr_type): Fix %fsr decoding.
11297
11298 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11299
11300         * python/py-record-btrace.c (btpy_insn_data): Change return type
11301         for Python 2.
11302
11303 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11304
11305         * spu-linux-nat.c (spu_fetch_inferior_registers,
11306         spu_store_inferior_registers): Use ptid from regcache, set and
11307         restore inferior_ptid.
11308         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11309         Likewise.
11310
11311 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11312
11313         * i386-linux-nat.c (fetch_register, store_register,
11314         i386_linux_fetch_inferior_registers,
11315         i386_linux_store_inferior_registers): Use ptid from regcache.
11316         * ia64-linux-nat.c (ia64_linux_fetch_register,
11317         ia64_linux_store_register): Likewise.
11318         * inf-ptrace.c (inf_ptrace_fetch_register,
11319         inf_ptrace_store_register): Likewise.
11320         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11321         m32r_linux_store_inferior_registers): Likewise.
11322         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11323         m68kbsd_store_inferior_registers): Likewise.
11324         * m68k-linux-nat.c (fetch_register, store_register,
11325         m68k_linux_fetch_inferior_registers,
11326         m68k_linux_store_inferior_registers): Likewise.
11327         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11328         m88kbsd_store_inferior_registers): Likewise.
11329         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11330         mips_fbsd_store_inferior_registers): Likewise.
11331         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11332         mips64_linux_regsets_store_registers): Likewise.
11333         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11334         mipsnbsd_store_inferior_registers): Likewise.
11335         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11336         mips64obsd_store_inferior_registers): Likewise.
11337         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11338         Likewise.
11339         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11340         ppcfbsd_store_inferior_registers): Likewise.
11341         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11342         ppc_linux_store_inferior_registers): Likewise.
11343         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11344         ppcnbsd_store_inferior_registers): Likewise.
11345         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11346         ppcobsd_store_registers): Likewise.
11347         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11348         Likewise.
11349         * ravenscar-thread.c (ravenscar_fetch_registers,
11350         ravenscar_store_registers, ravenscar_prepare_to_store):
11351         Likewise.
11352         * record-btrace.c (record_btrace_fetch_registers,
11353         record_btrace_store_registers, record_btrace_prepare_to_store):
11354         Likewise.
11355         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11356         Lookup inferior using ptid from regcache, instead of
11357         current_inferior.
11358         * remote.c (remote_fetch_registers, remote_store_registers): Use
11359         ptid from regcache.
11360         * rs6000-nat.c (fetch_register, store_register): Likewise.
11361         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11362         s390_linux_store_inferior_registers): Likewise.
11363         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11364         shnbsd_store_inferior_registers): Likewise.
11365         * sol-thread.c (sol_thread_fetch_registers,
11366         sol_thread_store_registers): Likewise.
11367         * sparc-nat.c (sparc_fetch_inferior_registers,
11368         sparc_store_inferior_registers): Likewise.
11369         * tilegx-linux-nat.c (fetch_inferior_registers,
11370         store_inferior_registers): Likewise.
11371         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11372         vaxbsd_store_inferior_registers): Likewise.
11373         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11374         store_xtregs): Likewise.
11375
11376 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11377
11378         PR gdb/14441
11379         * NEWS: Mention support for rvalue references in GDB and python.
11380         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11381         supports both lvalue and rvalue references.
11382
11383 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11384
11385         PR gdb/14441
11386         * gdbtypes.c (rank_one_type): Implement overloading
11387         resolution rules regarding rvalue references.
11388
11389 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11390
11391         PR gdb/14441
11392         * aarch64-tdep.c (aarch64_type_align)
11393         (aarch64_extract_return_value, aarch64_store_return_value): Change
11394         lvalue reference type checks to general reference type checks.
11395         * amd64-tdep.c (amd64_classify): Likewise.
11396         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11397         Likewise.
11398         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11399         (arm_store_return_value): Likewise.
11400         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11401         * c-typeprint.c (c_print_type): Likewise.
11402         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11403         (cplus_number_of_children, cplus_describe_child): Likewise.
11404         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11405         * completer.c (expression_completer): Likewise.
11406         * cp-support.c (make_symbol_overload_list_adl_namespace):
11407         Likewise.
11408         * darwin-nat-info.c (info_mach_region_command): Likewise.
11409         * dwarf2loc.c (entry_data_value_coerce_ref)
11410         (value_of_dwarf_reg_entry): Likewise.
11411         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11412         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11413         Likewise.
11414         * findvar.c (extract_typed_address, store_typed_address):
11415         Likewise.
11416         * gdbtypes.c (rank_one_type): Likewise.
11417         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11418         * infcall.c (value_arg_coerce): Likewise.
11419         * language.c (pointer_type): Likewise.
11420         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11421         Likewise.
11422         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11423         * mn10300-tdep.c (mn10300_type_align): Likewise.
11424         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11425         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11426         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11427         Likewise.
11428         * printcmd.c (print_formatted, x_command): Likewise.
11429         * python/py-type.c (typy_get_composite, typy_template_argument):
11430         Likewise.
11431         * python/py-value.c (valpy_referenced_value)
11432         (valpy_get_dynamic_type, value_has_field): Likewise.
11433         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11434         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11435         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11436         * spu-tdep.c (spu_scalar_value_p): Likewise.
11437         * symtab.c (lookup_symbol_aux): Likewise.
11438         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11439         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11440         Likewise.
11441         * valops.c (value_cast_pointers, value_cast)
11442         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11443         (value_struct_elt, value_struct_elt_bitpos)
11444         (value_find_oload_method_list, find_overload_match)
11445         (value_rtti_indirect_type): Likewise.
11446         * valprint.c (val_print_scalar_type_p, generic_val_print):
11447         Likewise.
11448         * value.c (value_actual_type, value_as_address, unpack_long)
11449         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11450         (coerce_ref): Likewise.
11451         * varobj.c (varobj_get_value_type): Likewise.
11452
11453 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11454
11455         PR gdb/14441
11456         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11457         table of constants.
11458         * python/lib/gdb/command/explore.py: Support exploring values
11459         of rvalue reference types.
11460         * python/lib/gdb/types.py: Implement get_basic_type() for
11461         rvalue reference types.
11462         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11463         constant.
11464         * python/py-value.c (valpy_getitem): Add an rvalue reference
11465         check.
11466         (valpy_reference_value): Add new parameter "refcode".
11467         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11468         New wrappers for valpy_reference_value().
11469         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11470         (gdbpy_invoke_xmethod): Likewise.
11471
11472 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11473
11474         PR gdb/14441
11475         * dwarf2read.c (process_die, read_type_die_1): Handle the
11476         DW_TAG_rvalue_reference_type DIE.
11477         (read_tag_reference_type): Add new parameter "refcode".
11478
11479 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11480
11481         PR gdb/14441
11482         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11483         (c_type_print_modifier, c_type_print_varspec_suffix)
11484         (c_type_print_base): Support printing rvalue reference types.
11485         * c-valprint.c (c_val_print, c_value_print): Support printing
11486         rvalue reference values.
11487
11488 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11489
11490         PR gdb/14441
11491         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11492         typename.
11493         * cp-support.c (replace_typedefs): Handle
11494         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11495         * python/py-type.c (typy_lookup_type): Likewise.
11496
11497 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11498
11499         PR gdb/14441
11500         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11501         * parse.c (insert_type): Change assert statement.
11502         (follow_types): Handle rvalue reference types.
11503         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11504         constant.
11505
11506 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11507
11508         PR gdb/14441
11509         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11510         value_ref() interface.
11511         * c-valprint.c (c_value_print): Likewise.
11512         * infcall.c (value_arg_coerce): Likewise.
11513         * python/py-value.c (valpy_reference_value): Likewise.
11514         * valops.c (value_cast, value_reinterpret_cast)
11515         (value_dynamic_cast, typecmp): Likewise.
11516         (value_ref): Parameterize by kind of return value reference type.
11517         * value.h (value_ref): Add new parameter "refcode".
11518
11519 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11520
11521         PR gdb/14441
11522         * dwarf2read.c (read_tag_reference_type): Use
11523         lookup_lvalue_reference_type() instead of lookup_reference_type().
11524         * eval.c (evaluate_subexp_standard): Likewise.
11525         * f-exp.y: Likewise.
11526         * gdbtypes.c (make_reference_type, lookup_reference_type):
11527         Generalize with rvalue reference types.
11528         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11529         convenience wrappers for lookup_reference_type().
11530         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11531         reference kind parameter.
11532         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11533         wrappers for lookup_reference_type().
11534         * guile/scm-type.c (gdbscm_type_reference): Use
11535         lookup_lvalue_reference_type() instead of lookup_reference_type().
11536         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11537         * parse.c (follow_types): Likewise.
11538         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11539         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11540         Likewise.
11541         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11542         (gdbpy_invoke_xmethod): Likewise.
11543         * stabsread.c: Provide extra argument to make_reference_type()
11544         call.
11545         * valops.c (value_ref, value_rtti_indirect_type): Use
11546         lookup_lvalue_reference_type() instead of lookup_reference_type().
11547
11548 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11549
11550         PR gdb/14441
11551         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11552         (TYPE_IS_REFERENCE): New macro.
11553         (struct type): Add rvalue_reference_type field.
11554         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11555
11556 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11557
11558         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11559         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11560         New function definition.
11561         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11562         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11563         New function declaration.
11564         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11565         * mi/mi-interp.h: New file.
11566         * solib.c (info_sharedlibrary_command): Replace for loop with
11567         ALL_SO_LIBS macro
11568         * solib.h (update_solib_list): New function declaration.
11569         (so_list_head): Move macro.
11570         * solist.h (ALL_SO_LIBS): New macro.
11571
11572 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11573
11574         * infcmd.c (post_create_inferior): Remove unused argument in
11575         call to solib_add.
11576         * remote.c (remote_start_remote): Likewise.
11577         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11578         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11579         (enable_break): Likewise.
11580         * solib.c (update_solib_list): Remove unused target argument
11581         and its documentation.
11582         (solib_add): Remove unused target argument.  Remove unused
11583         argument in call to update_solib_list.
11584         (info_sharedlibrary_command): Remove unused argument in call
11585         to update_solib_list.
11586         (sharedlibrary_command): Remove unused argument in call to
11587         solib_add.
11588         (handle_solib_event): Likewise.
11589         (reload_shared_libraries): Likewise.
11590         * solib.h (solib_add): Remove unused target argument.
11591
11592 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11593
11594         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11595         (s390_displaced_step_fixup): Cover relative branches with the
11596         default fixup handling.  This fixes lack of support for some
11597         relative branch instructions.
11598
11599 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11600
11601         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11602         ptid from regcache.
11603
11604 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11605
11606         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11607         i386_darwin_store_inferior_registers): Use ptid from regcache.
11608
11609 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11610
11611         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11612         i386bsd_store_inferior_registers): Use ptid from regcache.
11613
11614 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11617         hppaobsd_store_registers): Use ptid from regcache.
11618
11619 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11620
11621         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11622         hppanbsd_store_registers): Use ptid from regcache.
11623
11624 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11625
11626         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11627         from regcache.  Use get_ptrace_pid.
11628
11629 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11630
11631         * corelow.c (get_core_register_section): Use ptid from regcache,
11632         update doc.
11633
11634 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11635
11636         * bsd-uthread.c (bsd_uthread_fetch_registers,
11637         bsd_uthread_store_registers): Use ptid from regcache, set and
11638         restore inferior_ptid.
11639
11640 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11641
11642         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11643         fetch_fp_regs, store_register, store_regs, store_fp_register,
11644         store_fp_regs): Use ptid from regcache.
11645
11646 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11647
11648         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11649         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11650         store_vfp_regs): Use ptid from regcache.
11651
11652 2017-03-17  Pedro Alves  <palves@redhat.com>
11653
11654         PR remote/21188
11655         * ser-base.c (ser_base_wait_for): Add comment.
11656         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11657         version.
11658         * ser-unix.c (hardwire_raw): Remove reference to
11659         scb->current_timeout.
11660         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11661         (hardwire_ops): Install ser_base_readchar instead of
11662         hardwire_readchar.
11663         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11664         Remove fields.
11665
11666 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11667
11668         PR gdb/19637
11669         * python/lib/gdb/printer/bound_registers.py: Add support for
11670         Python 3.
11671
11672 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11673
11674         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11675         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11676         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11677         byte_offset to subobj_byte_offset.  Fix the handling of
11678         DWARF_VALUE_STACK on big-endian targets when coming via an
11679         implicit pointer.
11680         (dwarf2_evaluate_loc_desc): Adjust call to
11681         dwarf2_evaluate_loc_desc_full.
11682         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11683         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11684
11685 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11686
11687         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11688         and REVSH instructions.
11689
11690 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11691
11692         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11693         (arm_record_test): Declare.
11694         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11695         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11696         align with the manual.
11697         (thumb_record_misc): Adjust the code order to align with the
11698         manual.
11699         (thumb2_record_decode_insn_handler): Fix instruction matching.
11700         (instruction_reader_thumb): New class.
11701         (arm_record_test): New function.
11702
11703 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11704
11705         * arm-tdep.c (abstract_memory_reader): New class.
11706         (instruction_reader): New class.
11707         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11708         (decode_insn): Likewise.
11709
11710 2017-03-16  Doug Evans  <dje@google.com>
11711
11712         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11713         member.  Change type of TYPE member to SCM.  All uses updated.
11714         (lsscm_make_lazy_string_smob): Add assert.
11715         (lsscm_make_lazy_string): Flag bad length values.
11716         (lsscm_elt_type): New function.
11717         (gdbscm_lazy_string_to_value): Rewrite to use
11718         lsscm_safe_lazy_string_to_value.
11719         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11720         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11721         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11722         in incoming type.
11723         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11724         * guile/scm-type.c (tyscm_scm_to_type): New function.
11725
11726 2017-03-15  Doug Evans  <dje@google.com>
11727
11728         PR python/17728, python/18439, python/18779
11729         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11730         member.  Change type of TYPE member to PyObject *.  All uses updated.
11731         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11732         (gdbpy_create_lazy_string_object): Flag bad length values.
11733         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11734         Handle typedefs in incoming type.
11735         (stpy_lazy_string_elt_type): New function.
11736         (gdbpy_extract_lazy_string): Call it.
11737         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11738         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11739         typedefs in incoming type.
11740
11741 2017-03-16  Doug Evans  <dje@google.com>
11742
11743         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11744         * guile/scm-type.c (tyscm_scm_to_type): New function.
11745
11746 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11747
11748         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11749         "ULONGEST" for "skip".
11750
11751 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11752
11753         PR gdb/21220
11754         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11755         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11756         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11757         over ptrace peek/poke until end of buffer or error.
11758
11759 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11760
11761         * parse.c (length_of_subexp): Make static.
11762         * parser-defs.h (length_of_subexp): Remove.
11763
11764 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11765
11766         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11767         as well.
11768
11769 2017-03-14  Pedro Alves  <palves@redhat.com>
11770
11771         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11772         (main): Use std::unique_ptr.  Remove calls to
11773         cp_demangled_name_parse_free.
11774
11775 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11776
11777         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11778         alphabsd_store_inferior_registers): Use regcache->ptid instead
11779         of inferior_ptid.
11780
11781 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11782
11783         * aix-thread.c (aix_thread_fetch_registers,
11784         aix_thread_store_registers): Use regcache->ptid instead of
11785         inferior_ptid.
11786
11787 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11788
11789         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11790         store_gregs_to_thread, fetch_fpregs_from_thread,
11791         store_fpregs_to_thread): Use regcache->ptid instead of
11792         inferior_ptid.
11793
11794 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11795
11796         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11797         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11798         instead of inferior_ptid.
11799
11800 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11801
11802         * target.c (target_fetch_registers, target_store_registers): Add
11803         assert.
11804
11805 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11806
11807         * regcache.h (regcache_get_ptid): New function.
11808         * regcache.c (regcache_get_ptid): New function.
11809
11810 2017-03-13  Mark Wielaard  <mark@klomp.org>
11811
11812         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11813
11814 2017-03-10  Keith Seitz  <keiths@redhat.com>
11815
11816         PR c++/8218
11817         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11818
11819 2017-03-08  Pedro Alves  <palves@redhat.com>
11820
11821         PR gdb/18360
11822         * infrun.c (start_step_over, do_target_resume, resume)
11823         (restart_threads): Assert we're not resuming a thread that is
11824         meant to be stopped.
11825         (infrun_thread_stop_requested_callback): Delete.
11826         (infrun_thread_stop_requested): If the thread is internally
11827         stopped, queue a pending stop event and clear the thread's
11828         inline-frame state.
11829         (handle_stop_requested): New function.
11830         (handle_syscall_event, handle_inferior_event_1): Use
11831         handle_stop_requested.
11832         (handle_stop_requested): New function.
11833         (handle_signal_stop): Set the thread's stop_signal here instead of
11834         at caller.
11835         (finish_step_over): Clear step over info unconditionally.
11836         (handle_signal_stop): If the user had interrupted the event
11837         thread, consider the stop a random signal.
11838         (handle_signal_stop) <signal arrived while stepping over
11839         breakpoint>: Don't restart threads here.
11840         (stop_waiting): Don't clear step-over info here.
11841
11842 2017-03-08  Pedro Alves  <palves@redhat.com>
11843
11844         PR 21206
11845         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11846         goes to argument 2, not 1.
11847
11848 2017-03-08  Pedro Alves  <palves@redhat.com>
11849
11850         PR cli/21218
11851         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11852         display_gdb_prompt.
11853         (command_line_input): Add comment.
11854
11855 2017-03-08  Pedro Alves  <palves@redhat.com>
11856
11857         PR tui/21216
11858         * tui/tui-file.c (tui_file::write): New.
11859         * tui/tui-file.h (tui_file): Override "write".
11860         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11861         factored out from ...
11862         (tui_puts): ... here.
11863         (tui_putc): Use them.
11864         (tui_write): New function.
11865         * tui/tui-io.h (tui_write): Declare.
11866
11867 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11868
11869         * Makefile.in (SFILES): Replace "environ.c" with
11870         "common/environ.c".
11871         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11872         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11873         to...
11874         * common/environ.c: ... here.
11875         * environ.h: Moved to...
11876         * common/environ.h: ... here.
11877
11878 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11879
11880         * gdbarch.sh (pstring_ptr): New static function.
11881         (gdbarch_disassembler_options): Use it.
11882         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11883         not valid_disassembler_option->name.
11884         * gdbarch.c: Regenerate.
11885
11886 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11887
11888         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11889
11890 2017-03-07  Pedro Alves  <palves@redhat.com>
11891
11892         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11893
11894 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11895
11896         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11897         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11898         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11899         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11900
11901 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11902
11903         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11904
11905 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11906
11907         * remote.c (remote_add_target_side_commands): Use range-based
11908         for loop.
11909
11910 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11911
11912         PR gdb/21165
11913         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11914         value is lazy.
11915         * valprint.c (common_val_print): Likewise.
11916
11917 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11918
11919         * NEWS: Mention new set/show disassembler-options commands.
11920         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11921         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11922         (prospective_options): New static variable.
11923         (gdb_disassembler::gdb_disassembler): Initialize
11924         m_di.disassembler_options.
11925         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11926         (get_disassembler_options): New function.
11927         (set_disassembler_options): Likewise.
11928         (set_disassembler_options_sfunc): Likewise.
11929         (show_disassembler_options_sfunc): Likewise.
11930         (disassembler_options_completer): Likewise.
11931         (_initialize_disasm): Likewise.
11932         * disasm.h (get_disassembler_options): New prototype.
11933         (set_disassembler_options): Likewise.
11934         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11935         (gdbarch_verify_disassembler_options): Likewise.
11936         * gdbarch.c: Regenerate.
11937         * gdbarch.h: Likewise.
11938         * arm-tdep.c (num_disassembly_options): Delete.
11939         (set_disassembly_style): Likewise.
11940         (arm_disassembler_options): New static variable.
11941         (set_disassembly_style_sfunc): Convert short style name into long
11942         option name.  Call set_disassembler_options.
11943         (show_disassembly_style_sfunc): New function.
11944         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11945         set_gdbarch_verify_disassembler_options.
11946         (_initialize_arm_tdep): Delete regnames variable and update callers.
11947         (arm_disassembler_options): Initialize.
11948         (disasm_options): New variable.
11949         (num_disassembly_options): Rename from this...
11950         (num_disassembly_styles): ...to this.  Compute by scanning through
11951         disasm_options.
11952         (valid_disassembly_styles): Initialize using disasm_options.
11953         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11954         set_arm_regname_option.
11955         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11956         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11957         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11958         set_gdbarch_verify_disassembler_options.
11959         * s390-tdep.c (s390_disassembler_options): New static variable.
11960         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11961         set_gdbarch_verify_disassembler_options.
11962
11963 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11964
11965         * remote.c (remote_add_target_side_condition): Remove "struct"
11966         keyword from range-based for loop.
11967
11968 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11969
11970         * remote.c (remote_add_target_side_condition): Use range-based
11971         for loop.  Update comment.
11972
11973 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11974
11975         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11976
11977 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11978
11979         * regcache.c (regcache_raw_update): New function.
11980         (regcache_raw_read): Move code to regcache_raw_update.
11981         * regcache.h (regcache_raw_update): New declaration.
11982         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11983
11984 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11985
11986         * dwarf2read.c (create_debug_type_hash_table): Initialize
11987         header.signature and header.type_offset_in_tu.
11988
11989 2017-02-24  Pedro Alves  <palves@redhat.com>
11990
11991         * symtab.c (make_file_symbol_completion_list_1): Use
11992         add_symtab_completions.
11993
11994 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11995
11996         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11997
11998 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11999
12000         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12001         I386_MAX_REGISTER_SIZE.
12002         (i386_pseudo_register_write): Likewise.
12003         (i386_process_record): Likewise.
12004         * i387-tdep.c (i387_supply_xsave): Likewise.
12005         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12006         (store_register): Likewise.
12007
12008 2017-02-23  Pedro Alves  <palves@redhat.com>
12009
12010         * ada-lang.c: Include "common/function-view.h".
12011         (ada_iterate_over_symbols): Adjust to use function_view as
12012         callback type.
12013         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12014         (ada_make_symbol_completion_list): Use a lambda.
12015         (ada_exc_search_name_matches): Delete.
12016         (name_matches_regex): New.
12017         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12018         * compile/compile-c-support.c: Include "common/function-view.h".
12019         (print_one_macro): Change prototype to accept a ui_file pointer.
12020         (write_macro_definitions): Use a lambda.
12021         * dwarf2read.c: Include "common/function-view.h".
12022         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12023         (dw2_expand_symtabs_matching): Adjust to use function_view as
12024         callback type.
12025         * language.h: Include "common/function-view.h".
12026         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12027         function_view as callback type.
12028         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12029         * linespec.c: Include "common/function-view.h".
12030         (collect_info::add_symbol): New method.
12031         (struct symbol_and_data_callback, iterate_inline_only, struct
12032         symbol_matcher_data, iterate_name_matcher): Delete.
12033         (iterate_over_all_matching_symtabs): Adjust to use function_view
12034         as callback type and lambdas.
12035         (iterate_over_file_blocks): Adjust to use function_view as
12036         callback type.
12037         (decode_compound_collector): Now a class with private fields.
12038         (decode_compound_collector::release_symbols): New method.
12039         (collect_one_symbol): Rename to...
12040         (decode_compound_collector::operator()): ... this and adjust.
12041         (lookup_prefix_sym): decode_compound_collector construction bits
12042         move to decode_compound_collector ctor.  Pass the
12043         decode_compound_collector object directly as callback.  Remove
12044         cleanups and use decode_compound_collector::release_symbols
12045         instead.
12046         (symtab_collector): Now a class with private fields.
12047         (symtab_collector::release_symtabs): New method.
12048         (add_symtabs_to_list): Rename to...
12049         (symtab_collector::operator()): ... this and adjust.
12050         (collect_symtabs_from_filename): symtab_collector construction
12051         bits move to symtab_collector ctor.  Pass the symtab_collector
12052         object directly as callback.  Remove cleanups and use
12053         symtab_collector::release_symtabs instead.
12054         (collect_symbols): Delete.
12055         (add_matching_symbols_to_info): Use lambdas.
12056         * macrocmd.c (print_macro_callback): Delete.
12057         (info_macro_command): Use a lambda.
12058         (info_macros_command): Pass print_macro_definition as callable
12059         directly.
12060         (print_one_macro): Remove 'ignore' parameter.
12061         (macro_list_command): Adjust.
12062         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12063         (macro_for_each_data::user_data): Delete field.
12064         (foreach_macro): Adjust to call the function_view.
12065         (macro_for_each): Adjust to use function_view as callback type.
12066         (foreach_macro_in_scope): Adjust to call the function_view.
12067         (macro_for_each_in_scope): Adjust to use function_view as callback
12068         type.
12069         * macrotab.h: Include "common/function-view.h".
12070         (macro_callback_fn): Declare a prototype instead of a pointer.
12071         Remove "user_data" parameter.
12072         (macro_for_each, macro_for_each_in_scope): Adjust to use
12073         function_view as callback type.
12074         * psymtab.c (partial_map_expand_apply)
12075         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12076         Adjust to use function_view as callback type and to return bool.
12077         (psym_expand_symtabs_matching): Adjust to use function_view as
12078         callback types.
12079         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12080         to use function_view as callback type and to return bool.
12081         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12082         callback types.
12083         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12084         as callback types.
12085         * symfile.h: Include "common/function-view.h".
12086         (expand_symtabs_file_matcher_ftype)
12087         (expand_symtabs_symbol_matcher_ftype)
12088         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12089         return bool.
12090         (quick_symbol_functions::map_symtabs_matching_filename)
12091         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12092         function_view as callback type and return bool.
12093         (expand_symtabs_matching): Adjust to use function_view as callback
12094         type.
12095         (maintenance_expand_name_matcher)
12096         (maintenance_expand_file_matcher): Delete.
12097         (maintenance_expand_symtabs): Use lambdas.
12098         * symtab.c (iterate_over_some_symtabs): Adjust to use
12099         function_view as callback types and return bool.
12100         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12101         of a cleanup.
12102         (lookup_symtab_callback): Delete.
12103         (lookup_symtab): Use a lambda.
12104         (iterate_over_symbols): Adjust to use function_view as callback
12105         type.
12106         (struct search_symbols_data, search_symbols_file_matches)
12107         (search_symbols_name_matches): Delete.
12108         (search_symbols): Use a pair of lambdas.
12109         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12110         (symtab_expansion_callback): Delete.
12111         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12112         * symtab.h: Include "common/function-view.h".
12113         (iterate_over_some_symtabs): Adjust to use function_view as
12114         callback type and return bool.
12115         (iterate_over_symtabs): Adjust to use function_view as callback
12116         type.
12117         (symbol_found_callback_ftype): Remove 'data' parameter and return
12118         bool.
12119         (iterate_over_symbols): Adjust to use function_view as callback
12120         type.
12121
12122 2017-02-23  Pedro Alves  <palves@redhat.com>
12123
12124         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12125         (%.o) <unittests/%.c>: New pattern.
12126         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12127         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12128         * common/function-view.h: New file.
12129         * unittests/function-view-selftests.c: New file.
12130         * configure: Regenerate.
12131
12132 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12133
12134         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12135         inferior_ptid.
12136         * go32-nat.c (go32_thread_alive): Likewise.
12137
12138 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12139
12140         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12141         delete.
12142
12143 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12144
12145         * varobj.c (varobj_clear_saved_item): Use delete instead of
12146         xfree.
12147         (update_dynamic_varobj_children): Likewise.
12148
12149 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12150
12151         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12152
12153 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12154
12155         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12156         m_enum_value to 0 in default constructor.
12157
12158 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12159
12160         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12161         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12162         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12163         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12164         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12165         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12166         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12167         IS_STORE_CONDITIONAL_INSN.
12168
12169 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12170
12171         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12172
12173 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12174
12175         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12176
12177 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12178
12179         * dwarf2read.c (skip_one_die, read_attribute_value)
12180         (dwarf2_const_value_attr, dump_die_shallow)
12181         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12182         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12183
12184 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12185
12186         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12187         (dwarf_parse_macro_header): Accept DWARF version 5.
12188         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12189
12190 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12191
12192         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12193         DW_AT_GNU_*.
12194         * common/common-exceptions.h (enum errors): Likewise.
12195         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12196         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12197         (dwarf_expr_context::execute_stack_op): Likewise.
12198         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12199         Likewise.
12200         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12201         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12202         (show_entry_values_debug, call_site_to_target_addr)
12203         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12204         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12205         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12206         (value_of_dwarf_block_entry, indirect_pieced_value)
12207         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12208         (disassemble_dwarf_expression): Likewise.
12209         * dwarf2read.c (process_die, inherit_abstract_dies)
12210         (read_call_site_scope): Likewise.
12211         * gdbtypes.h (struct func_type, struct call_site_parameter)
12212         (struct call_site): Likewise.
12213         * stack.c (read_frame_arg): Likewise.
12214         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12215
12216 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12217
12218         * defs.h (read_unsigned_leb128): New declaration.
12219         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12220         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12221         (dwarf2_find_location_expression): Call also
12222         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12223         * dwarf2loc.h (dwarf2_version): New declaration.
12224         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12225         rnglists.
12226         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12227         .debug_rnglists.
12228         (struct dwop_section_names): Add loclists_dwo.
12229         (dwop_section_names): Add .debug_loclists.dwo.
12230         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12231         (struct dwarf2_per_cu_data): Add dwarf_version.
12232         (struct dwo_sections): Add loclists.
12233         (struct attr_abbrev): Add implicit_const.
12234         (read_indirect_line_string): New declaration.
12235         (read_unsigned_leb128): Delete declaration.
12236         (rcuh_kind): New definition.
12237         (read_and_check_comp_unit_head): Change parameter
12238         is_debug_types_section to section_kind.
12239         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12240         (read_comp_unit_head): Change parameter abfd to section, add parameter
12241         section_kind.  Handle DWARF-5.
12242         (error_check_comp_unit_head): Accept also DWARF version 5.
12243         (read_and_check_comp_unit_head): Change parameter
12244         is_debug_types_section to section_kind.
12245         (read_and_check_type_unit_head): Delete function.
12246         (read_abbrev_offset): Handle DWARF-5.
12247         (create_debug_type_hash_table): Add parameter section_kind.  Process
12248         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12249         comp_unit_head.
12250         (create_debug_types_hash_table): Update create_debug_type_hash_table
12251         caller.
12252         (create_all_type_units): Call create_debug_type_hash_table.
12253         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12254         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12255         caller.
12256         (skip_one_die): Handle DW_FORM_implicit_const.
12257         (dwarf2_rnglists_process): New function.
12258         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12259         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12260         (read_attribute_value): Handle DW_FORM_implicit_const,
12261         DW_FORM_line_strp.
12262         (read_attribute): Handle DW_FORM_implicit_const.
12263         (read_indirect_string_at_offset_from): New function from
12264         read_indirect_string_at_offset.
12265         (read_indirect_string_at_offset): Call
12266         read_indirect_string_at_offset_from.
12267         (read_indirect_line_string_at_offset): New function.
12268         (read_indirect_string): New function comment.
12269         (read_indirect_line_string): New function.
12270         (read_unsigned_leb128): Make it global.
12271         (dwarf2_string_attr): Handle DWARF-5.
12272         (add_include_dir_stub, read_formatted_entries): New functions.
12273         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12274         Handle DWARF-5.
12275         (per_cu_header_read_in): Update read_comp_unit_head caller.
12276         (dwarf2_version): New function.
12277         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12278         rnglists.
12279         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12280         fields.
12281
12282 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12283
12284         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12285
12286 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12287
12288         * dwarf2read.c (dwarf2_ranges_process): New function from
12289         dwarf2_ranges_read.
12290         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12291         dwarf2_ranges_process.
12292
12293 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12294
12295         * dwarf2read.c (create_debug_type_hash_table): New function from
12296         create_debug_types_hash_table.
12297         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12298         (create_all_type_units, open_and_init_dwo_file): Update
12299         create_debug_types_hash_table callers.
12300
12301 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12302
12303         PR gdb/16188
12304         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12305         refer to 'ap', not 'args'.
12306
12307 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12308             Pedro Alves  <palves@redhat.com>
12309
12310         PR gdb/16188
12311         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12312         calls succeeded.
12313         * fork-child.c (trace_start_error): New function.
12314         (trace_start_error_with_name): Likewise.
12315         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12316         * inf-ptrace.c (inf_ptrace_me): Likewise.
12317         * inferior.h (trace_start_error): New prototype.
12318         (trace_start_error_with_name): Likewise.
12319
12320 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12321
12322         PR gdb/21164
12323         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12324         NULL before using it.
12325         * symmisc.c (maintenance_print_symbols): Likewise.
12326         (maintenance_print_msymbols): Likewise.
12327
12328 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12329
12330         * NEWS: Add record Python bindings entry.
12331
12332 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12333
12334         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12335         py-record-full.o.
12336         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12337         * python/py-record-btrace.c, python/py-record-btrace.h,
12338         python/py-record-full.c, python/py-record-full.h: New file.
12339         * python/py-record.c: Add include for py-record-btrace.h and
12340         py-record-full.h.
12341         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12342         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12343         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12344         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12345         New definition.
12346         (gdbpy_initialize_btrace): New export.
12347         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12348
12349 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12350
12351         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12352         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12353         * python/py-record.c: New file.
12354         * python/python-internal.h (gdbpy_start_recording,
12355         gdbpy_current_recording, gdpy_stop_recording,
12356         gdbpy_initialize_record): New export.
12357         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12358         (python_GdbMethods): Add gdbpy_start_recording,
12359         gdbpy_current_recording and gdbpy_stop_recording.
12360
12361 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12362
12363         * record-btrace.c (record_btrace_record_method): New function.
12364         (init_record_btrace_ops): Initialize to_record_method.
12365         * record-full.c (record_full_record_method): New function.
12366         (init_record_full_ops, init_record_full_core_ops): Add
12367         record_full_record_method.
12368         * record.h (enum record_method): New enum.
12369         * target-debug.h (target_debug_print_enum_record_method: New define.
12370         * target-delegates.c: Regenerate.
12371         * target.c (target_record_method): New function.
12372         * target.h: Include record.h.
12373         (struct target_ops) <to_record_method>: New field.
12374         (target_record_method): New export.
12375
12376 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12377
12378         * record.h (record_start, record_stop): New export.
12379         * record.c (record_start, record_stop): New function.
12380
12381 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12382
12383         * btrace.c (btrace_fetch): Copy function call segments pointer
12384         into a vector.
12385         (btrace_clear): Clear the vector.
12386         (btrace_find_insn_by_number): Use binary search to find the correct
12387         function call segment.
12388         * btrace.h (brace_fun_p): New typedef.
12389         (struct btrace_thread_info) <functions>: New field.
12390
12391 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12392
12393         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12394         * btrace.c (btrace_decode_error): ... here.  New function.
12395         * btrace.h (btrace_decode_error): New export.
12396
12397 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12398
12399         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12400         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12401         btrace_find_insn_by_number): Remove special case for gaps.
12402         * btrace.h (btrace_insn_get_error): New export.
12403         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12404         * record-btrace.c (btrace_insn_history): Print number for gaps.
12405         (record_btrace_info, record_btrace_goto): Handle gaps.
12406
12407 2017-02-14  Tom Tromey  <tom@tromey.com>
12408
12409         PR python/13598:
12410         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12411         event.
12412         * python/py-evts.c (gdbpy_initialize_py_events): Add
12413         before_prompt registry.
12414         * python/py-events.h (events_object) <before_prompt>: New field.
12415
12416 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12417
12418         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12419
12420 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12421
12422         * symfile (_initialize_symfile): Add usage text to the load command's
12423         help text.
12424
12425 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12426
12427         * utils.c (defaulted_query): Don't query on secondary UIs.
12428
12429 2017-02-10  Tom Tromey  <tom@tromey.com>
12430
12431         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12432
12433 2017-02-10  Tom Tromey  <tom@tromey.com>
12434
12435         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12436         "cleanup" local.
12437         * python/py-type.c (typy_legacy_template_argument): Remove
12438         unnecessary "cleanup" local.
12439
12440 2017-02-10  Tom Tromey  <tom@tromey.com>
12441
12442         * python/python.c (do_start_initialization): New function, from
12443         _initialize_python.
12444         (_initialize_python): Call do_start_initialization.
12445         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12446         goto.
12447
12448 2017-02-10  Tom Tromey  <tom@tromey.com>
12449
12450         * python/py-prettyprint.c (pretty_print_one_value): Use
12451         gdbpy_ref.
12452
12453 2017-02-10  Tom Tromey  <tom@tromey.com>
12454
12455         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12456         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12457         gdbpy_ref.
12458         * python/py-type.c (field_new): Use gdbpy_ref.
12459         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12460         gdbpy_ref.
12461         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12462         (py_free_pspace): Likewise.
12463         (pspace_to_pspace_object): Likewise.
12464         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12465         (py_free_objfile): Likewise.
12466         (objfile_to_objfile_object): Likewise.
12467         * python/py-inferior.c (delete_thread_object): Use
12468         gdbpy_ref.
12469         (infpy_read_memory): Likewise.
12470         (py_free_inferior): Likewise.
12471         * python/py-evtregistry.c (create_eventregistry_object): Use
12472         gdbpy_ref.
12473         * python/py-event.c (create_event_object): Use gdbpy_ref.
12474
12475 2017-02-10  Tom Tromey  <tom@tromey.com>
12476
12477         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12478         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12479         used.
12480         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12481         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12482         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12483         python/py-framefilter.c, python/py-function.c,
12484         python/py-inferior.c, python/py-infevents.c,
12485         python/py-linetable.c, python/py-newobjfileevent.c,
12486         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12487         python/py-signalevent.c, python/py-stopevent.c,
12488         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12489         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12490         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12491         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12492
12493 2017-02-10  Tom Tromey  <tom@tromey.com>
12494
12495         * ui-out.h (ui_out_emit_type): New class.
12496         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12497         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12498         and ui_out_emit_tuple.
12499         (enumerate_locals): Likewise.
12500         (py_mi_print_variables, py_print_locals, py_print_args): Use
12501         ui_out_emit_list.
12502         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12503         ui_out_emit_list.
12504         * common/gdb_optional.h: New file.
12505
12506 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12507
12508         * MAINTAINERS (Write After Approval): Update my e-mail address.
12509
12510 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12511
12512         PR gdb/21122
12513         * breakpoint.c (_initialize_breakpoint): Update the help description
12514         of the 'commands' command to indicate that it takes a list argument.
12515
12516 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12517
12518         * interps.c (current_interp_set_logging): Remove "return".
12519
12520 2017-02-09  Gary Benson  <gbenson@redhat.com>
12521
12522         * symtab.c (add_symtab_completions): Prevent NULL pointer
12523         dereference.
12524
12525 2017-02-08  Pedro Alves  <palves@redhat.com>
12526
12527         * interps.c (interp::interp): Remove reference to quiet_p.
12528         (interp_set): Make static.  Remove dead "Switching to" output
12529         code.
12530         (interp_quiet_p, interp_set_quiet): Delete.
12531         (interpreter_exec_cmd): Don't set the interpreter quiet.
12532         * interps.h (interp_quiet_p): Make static.
12533         (class interp) <quiet_p>: Remove field
12534
12535 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12536
12537         * cli/cli-decode.c (find_command_name_length): Make it extern.
12538         * cli/cli-decode.h (find_command_name_length): Declare.
12539         * cli/cli-script.c (command_name_equals, line_first_arg):
12540         New functions.
12541         (process_next_line): Use cli-decode to parse command names.
12542         (build_command_line): Make args a constant pointer.
12543
12544 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12545
12546         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12547         Remove case-insensitive search.
12548
12549 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12550
12551         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12552         at the end of the line.  Avoids an ARI warning.
12553
12554 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12555
12556         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12557         rdseed instructions.
12558         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12559
12560 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12561
12562         PR tdep/20936
12563         Provide and use sparc32 and sparc64 target description XML files.
12564         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12565         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12566         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12567         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12568         * features/sparc/sparc32-solaris.xml: New file.
12569         * features/sparc/sparc64-solaris.xml: New file.
12570         * features/sparc/sparc32-solaris.c: Generated.
12571         * features/sparc/sparc64-solaris.c: Generated.
12572         * sparc-tdep.h: Account for differences in target descriptions.
12573         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12574         (sparc32_register_type): Use target provided registers.
12575         (validate_tdesc_registers): New function.
12576         (sparc32_gdbarch_init): Use tdesc_has_registers.
12577         Set pseudoregister functions.
12578         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12579         (sparc64_register_type): Use target provided registers.
12580         (sparc64_init_abi): Set pseudoregister functions.
12581
12582 2017-02-03  Tom Tromey  <tom@tromey.com>
12583
12584         PR rust/21097:
12585         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12586         with a single member.
12587
12588 2017-02-03  Pedro Alves  <palves@redhat.com>
12589
12590         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12591         (cli_interp_base::~cli_interp_base): New.
12592         (cli_interp): New struct.
12593         (as_cli_interp): Cast the interp itself to cli_interp.
12594         (cli_interpreter_pre_command_loop): Rename to ...
12595         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12596         parameter.
12597         (cli_interpreter_init): Rename to ...
12598         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12599         boolean.  Make extern.
12600         (cli_interpreter_resume): Rename to ...
12601         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12602         extern.
12603         (cli_interpreter_suspend): Rename to ...
12604         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12605         extern.
12606         (cli_interpreter_exec): Rename to ...
12607         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12608         extern.
12609         (cli_interpreter_supports_command_editing): Rename to ...
12610         (cli_interp_base::supports_command_editing): ... this.  Remove
12611         'interp' parameter.  Make extern.
12612         (cli_ui_out): Rename to ...
12613         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12614         Make extern.
12615         (cli_set_logging): Rename to ...
12616         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12617         parameter.  Make extern.
12618         (cli_interp_procs): Delete.
12619         (cli_interp_factory): Adjust to use "new".
12620         * cli/cli-interp.h: Include "interps.h".
12621         (struct cli_interp_base): New struct.
12622         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12623         (interp_new): Delete.
12624         (interp::interp, interp::~interp): New.
12625         (interp_set): Use bool, and return void.  Assume the interpreter
12626         has suspend, init and resume methods, and that the all return
12627         void.
12628         (set_top_level_interpreter): interp_set returns void.
12629         (interp_ui_out): Adapt.
12630         (current_interp_set_logging): Adapt.
12631         (interp_data): Delete.
12632         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12633         (interp_exec): Adapt.
12634         (top_level_interpreter_data): Delete.
12635         * interps.h (interp_init_ftype, interp_resume_ftype)
12636         (interp_suspend_ftype, interp_exec_ftype)
12637         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12638         (class interp): New.
12639         (interp_new): Delete.
12640         (interp_set): Now returns void.  Use bool.
12641         (interp_data, top_level_interpreter_data): Delete.
12642         * mi/mi-common.h: Include interps.h.
12643         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12644         init, resume, suspect, exec, interp_ui_out, set_logging and
12645         pre_command_loop methods.
12646         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12647         (mi_interpreter_init): Rename to ...
12648         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12649         bool, return void and make extern.  Adjust.
12650         (mi_interpreter_resume): ... Rename to ...
12651         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12652         return void and make extern.  Adjust.
12653         (mi_interpreter_suspend): ... Rename to ...
12654         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12655         return void and make extern.  Adjust.
12656         (mi_interpreter_exec): ... Rename to ...
12657         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12658         extern.  Adjust.
12659         (mi_interpreter_pre_command_loop): ... Rename to ...
12660         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12661         parameter and make extern.
12662         (mi_on_normal_stop_1): Adjust.
12663         (mi_ui_out): Rename to ...
12664         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12665         parameter and make extern.  Adjust.
12666         (mi_set_logging): Rename to ...
12667         (mi_interp::set_logging): ... this.  Remove the 'interp'
12668         parameter and make extern.  Adjust.
12669         (mi_interp_procs): Delete.
12670         (mi_interp_factory): Adjust to use 'new'.
12671         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12672         (mi_print_exception, mi_execute_command, mi_load_progress):
12673         Adjust.
12674         * tui/tui-interp.c (tui_interp): New class.
12675         (as_tui_interp): Return a tui_interp pointer.
12676         (tui_on_normal_stop, tui_on_signal_received)
12677         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12678         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12679         to use interp::interp_ui_out.
12680         (tui_init): Rename to ...
12681         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12682         bool, return void and make extern.  Adjust.
12683         (tui_resume): Rename to ...
12684         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12685         return void and make extern.  Adjust.
12686         (tui_suspend): Rename to ...
12687         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12688         return void and make extern.  Adjust.
12689         (tui_ui_out): Rename to ...
12690         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12691         parameter, and make extern.  Adjust.
12692         (tui_exec): Rename to ...
12693         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12694         make extern.
12695         (tui_interp_procs): Delete.
12696         (tui_interp_factory): Use "new".
12697
12698 2017-02-02  Tom Tromey  <tom@tromey.com>
12699
12700         * rust-exp.y (ends_raw_string, space_then_number)
12701         (rust_identifier_start_p): Return bool.
12702         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12703         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12704         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12705         (rust_chartype_p): Return bool.
12706         (val_print_struct, rust_print_struct_def, rust_print_type):
12707         Update.
12708         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12709         Return bool.
12710
12711 2017-02-02  Tom Tromey  <tom@tromey.com>
12712
12713         * rust-lang.c: Reindent.
12714
12715 2017-02-02  Tom Tromey  <tom@tromey.com>
12716
12717         * rust-lang.h (rust_crate_for_block): Update.
12718         * rust-lang.c (rust_crate_for_block): Return std::string.
12719         (rust_get_disr_info): Use std:;string, not
12720         gdb::unique_xmalloc_ptr.
12721         * rust-exp.y (crate_name): Update.
12722
12723 2017-02-02  Pedro Alves  <palves@redhat.com>
12724
12725         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12726         field out of gdb_disassembler_test and make it static.
12727
12728 2017-02-02  Pedro Alves  <palves@redhat.com>
12729
12730         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12731         mi1_interp and mi_interp fields.
12732
12733 2017-02-02  Pedro Alves  <palves@redhat.com>
12734
12735         * cli/cli-interp.c (struct saved_output_files, saved_output):
12736         Moved from cli/cli-logging.c.
12737         (cli_set_logging): New function.
12738         (cli_interp_procs): Install cli_set_logging.
12739         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12740         Declare.
12741         * cli/cli-logging.c (struct saved_output_files, saved_output):
12742         Moved to cli/cli-interp.c.
12743         (pop_output_files): Don't save outputs here.
12744         (make_logging_output): New function.
12745         (handle_redirections): Don't build tee nor save previous outputs
12746         here.
12747         * interps.c (current_interp_set_logging): Change prototype.
12748         Assume there's always a set_logging_proc method installed.
12749         * interps.h (interp_set_logging_ftype): Change prototype.
12750         (current_interp_set_logging): Change prototype and adjust comment.
12751         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12752         use make_logging_output.
12753         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12754 2017-02-02  Pedro Alves  <palves@redhat.com>
12755
12756         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12757         from ...
12758         (set_logging_overwrite): ... here.
12759         (logging_no_redirect_file): Delete.
12760         (set_logging_redirect): Don't handle redirection on the fly.
12761         Instead warn that "logging off" / "logging on" is necessary.
12762         (pop_output_files): Delete references to logging_no_redirect_file.
12763         (show_logging_command): Always speak in terms of what will happen
12764         once logging is reenabled.
12765
12766 2017-02-02  Pedro Alves  <palves@redhat.com>
12767
12768         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12769
12770 2017-02-02  Pedro Alves  <palves@redhat.com>
12771
12772         * disasm.c (gdb_pretty_print_insn): Rename to ...
12773         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12774         Remove gdbarch parameter.  Adapt to clear the object's buffers
12775         instead of allocating new buffers, and to print using the object's
12776         gdb_disassembler instead of calling gdb_print_insn.
12777         (dump_insns): Use gdb_pretty_print_disassembler.
12778         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12779         (gdb_pretty_print_disassembler): New class.
12780         * record-btrace.c (btrace_insn_history): Use
12781         gdb_pretty_print_disassembler.
12782
12783 2017-02-02  Pedro Alves  <palves@redhat.com>
12784
12785         * ada-lang.c (type_as_string): Use string_file.
12786         * ada-valprint.c (ada_print_floating): Use string_file.
12787         * ada-varobj.c (ada_varobj_scalar_image)
12788         (ada_varobj_get_value_image): Use string_file.
12789         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12790         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12791         * breakpoint.c (update_inserted_breakpoint_locations)
12792         (insert_breakpoint_locations, reattach_breakpoints)
12793         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12794         (print_it_watchpoint): Use string_file.
12795         (save_breakpoints): Use stdio_file.
12796         * c-exp.y (oper): Use string_file.
12797         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12798         tee_file.
12799         (pop_output_files): Use delete.
12800         (handle_redirections): Use stdio_file and tee_file.
12801         * cli/cli-setshow.c (do_show_command): Use string_file.
12802         * compile/compile-c-support.c (c_compute_program): Use
12803         string_file.
12804         * compile/compile-c-symbols.c (generate_vla_size): Take a
12805         'string_file &' instead of a 'ui_file *'.
12806         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12807         of a 'ui_file *'.  Use string_file.
12808         (generate_c_for_variable_locations): Take a 'string_file &'
12809         instead of a 'ui_file *'.
12810         * compile/compile-internal.h (generate_c_for_for_one_variable):
12811         Take a 'string_file &' instead of a 'ui_file *'.
12812         * compile/compile-loc2c.c (push, pushf, unary, binary)
12813         (print_label, pushf_register_address, pushf_register)
12814         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12815         'ui_file *'.  Adjust.
12816         * compile/compile.c (compile_to_object): Use string_file.
12817         * compile/compile.h (compile_dwarf_expr_to_c)
12818         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12819         'ui_file *'.
12820         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12821         (replace_typedefs_qualified_name): Use string_file and
12822         obstack_copy0.
12823         * disasm.c (gdb_pretty_print_insn): Use string_file.
12824         (gdb_disassembly): Adjust reference the null_stream global.
12825         (do_ui_file_delete): Delete.
12826         (gdb_insn_length): Use null_stream.
12827         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12828         * dwarf2loc.c (dwarf2_compile_property_to_c)
12829         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12830         'string_file &' instead of a 'ui_file *'.
12831         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12832         * dwarf2read.c (do_ui_file_peek_last): Delete.
12833         (dwarf2_compute_name): Use string_file.
12834         * event-top.c (gdb_setup_readline): Use stdio_file.
12835         * gdbarch.sh (verify_gdbarch): Use string_file.
12836         * gdbtypes.c (safe_parse_type): Use null_stream.
12837         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12838         string_file.
12839         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12840         'string_file *' instead of a 'ui_file *'.
12841         (gdbscm_arch_disassemble): Use string_file.
12842         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12843         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12844         inherits from ui_file.
12845         (ioscm_file_port_delete, ioscm_file_port_rewind)
12846         (ioscm_file_port_put): Delete.
12847         (ioscm_file_port_write): Rename to ...
12848         (ioscm_file_port::write): ... this.  Remove file_port_magic
12849         checks.
12850         (ioscm_file_port_new): Delete.
12851         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12852         ui_file_up.
12853         * guile/scm-type.c (tyscm_type_name): Use string_file.
12854         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12855         Use string_file.
12856         * infcmd.c (print_return_value_1): Use string_file.
12857         * infrun.c (print_target_wait_results): Use string_file.
12858         * language.c (add_language): Use string_file.
12859         * location.c (explicit_to_string_internal): Use string_file.
12860         * main.c (captured_main_1): Use null_file.
12861         * maint.c (maintenance_print_architecture): Use stdio_file.
12862         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12863         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12864         event_channel>: Change type to mi_console_file pointer.
12865         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12866         (mi_console_file_delete): Delete.
12867         (struct mi_console_file): Delete.
12868         (mi_console_file_magic): Delete.
12869         (mi_console_file_new): Delete.
12870         (mi_console_file::mi_console_file): New.
12871         (mi_console_file_delete): Delete.
12872         (mi_console_file_fputs): Delete.
12873         (mi_console_file::write): New.
12874         (mi_console_raw_packet): Delete.
12875         (mi_console_file::flush): New.
12876         (mi_console_file_flush): Delete.
12877         (mi_console_set_raw): Rename to ...
12878         (mi_console_file::set_raw): ... this.
12879         * mi/mi-console.h (class mi_console_file): New class.
12880         (mi_console_file_new, mi_console_set_raw): Delete.
12881         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12882         (mi_set_logging): Use delete and tee_file.  Adjust.
12883         * mi/mi-main.c (output_register): Use string_file.
12884         (mi_cmd_data_evaluate_expression): Use string_file.
12885         (mi_cmd_data_read_memory): Use string_file.
12886         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12887         * mi/mi-out.c (mi_ui_out::main_stream): New.
12888         (mi_ui_out::rewind): Use main_stream and
12889         string_file.
12890         (mi_ui_out::put): Use main_stream and string_file.
12891         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12892         Allocate a 'string_file' instead.
12893         (mi_out_new): Don't allocate a mem_fileopen stream here.
12894         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12895         (mi_ui_out::main_stream): Declare method.
12896         * printcmd.c (eval_command): Use string_file.
12897         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12898         * python/py-arch.c (archpy_disassemble): Use string_file.
12899         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12900         * python/py-frame.c (frapy_str): Use string_file.
12901         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12902         Use string_file.
12903         * python/py-type.c (typy_str): Use string_file.
12904         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12905         * python/py-value.c (valpy_str): Use string_file.
12906         * record-btrace.c (btrace_insn_history): Use string_file.
12907         * regcache.c (regcache_print): Use stdio_file.
12908         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12909         * remote.c (escape_buffer): Use string_file.
12910         * rust-lang.c (rust_get_disr_info): Use string_file.
12911         * serial.c (serial_open_ops_1): Use stdio_file.
12912         (do_serial_close): Use delete.
12913         * stack.c (print_frame_arg): Use string_file.
12914         (print_frame_args): Remove local mem_fileopen stream, not used.
12915         (print_frame): Use string_file.
12916         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12917         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12918         Take a 'string_file *' instead of a 'ui_file *'.
12919         * top.c (new_ui): Use stdio_file and stderr_file.
12920         (free_ui): Use delete.
12921         (execute_command_to_string): Use string_file.
12922         (quit_confirm): Use string_file.
12923         * tracepoint.c (collection_list::append_exp): Use string_file.
12924         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12925         * tui/tui-file.c: Don't include "ui-file.h".
12926         (enum streamtype, struct tui_stream): Delete.
12927         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12928         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12929         (tui_file::tui_file): New method.
12930         (tui_file_fputs): Delete.
12931         (tui_file_get_strbuf): Delete.
12932         (tui_file::puts): New method.
12933         (tui_file_adjust_strbuf): Delete.
12934         (tui_file_flush): Delete.
12935         (tui_file::flush): New method.
12936         * tui/tui-file.h: Tweak intro comment.
12937         Include ui-file.h.
12938         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12939         (tui_file_adjust_strbuf): Delete declarations.
12940         (class tui_file): New class.
12941         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12942         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12943         (tui_register_format): Use string_stream.
12944         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12945         (tui_get_function_from_frame): Use string_file.
12946         * typeprint.c (type_to_string): Use string_file.
12947         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12948         (null_stream): New global.
12949         (ui_file_delete): Delete.
12950         (ui_file::ui_file): New.
12951         (null_file_isatty): Delete.
12952         (ui_file::~ui_file): New.
12953         (null_file_rewind): Delete.
12954         (ui_file::printf): New.
12955         (null_file_put): Delete.
12956         (null_file_flush): Delete.
12957         (ui_file::putstr): New.
12958         (null_file_write): Delete.
12959         (ui_file::putstrn): New.
12960         (null_file_read): Delete.
12961         (ui_file::putc): New.
12962         (null_file_fputs): Delete.
12963         (null_file_write_async_safe): Delete.
12964         (ui_file::vprintf): New.
12965         (null_file_delete): Delete.
12966         (null_file::write): New.
12967         (null_file_fseek): Delete.
12968         (null_file::puts): New.
12969         (ui_file_data): Delete.
12970         (null_file::write_async_safe): New.
12971         (gdb_flush, ui_file_isatty): Adjust.
12972         (ui_file_put, ui_file_rewind): Delete.
12973         (ui_file_write): Adjust.
12974         (ui_file_write_for_put): Delete.
12975         (ui_file_write_async_safe, ui_file_read): Adjust.
12976         (ui_file_fseek): Delete.
12977         (fputs_unfiltered): Adjust.
12978         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12979         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12980         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12981         (set_ui_file_data): Delete.
12982         (string_file::~string_file, string_file::write)
12983         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12984         (do_ui_file_as_string, ui_file_as_string): Delete.
12985         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12986         (struct mem_file): Delete.
12987         (mem_file_new): Delete.
12988         (stdio_file::stdio_file): New.
12989         (mem_file_delete): Delete.
12990         (stdio_file::stdio_file): New.
12991         (mem_fileopen): Delete.
12992         (stdio_file::~stdio_file): New.
12993         (mem_file_rewind): Delete.
12994         (stdio_file::set_stream): New.
12995         (mem_file_put): Delete.
12996         (stdio_file::open): New.
12997         (mem_file_write): Delete.
12998         (stdio_file_magic, struct stdio_file): Delete.
12999         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13000         (stdio_file::flush): New.
13001         (stdio_file_read): Rename to ...
13002         (stdio_file::read): ... this.  Adjust.
13003         (stdio_file_write): Rename to ...
13004         (stdio_file::write): ... this.  Adjust.
13005         (stdio_file_write_async_safe): Rename to ...
13006         (stdio_file::write_async_safe) ... this.  Adjust.
13007         (stdio_file_fputs): Rename to ...
13008         (stdio_file::puts) ... this.  Adjust.
13009         (stdio_file_isatty): Delete.
13010         (stdio_file_fseek): Delete.
13011         (stdio_file::isatty): New.
13012         (stderr_file_write): Rename to ...
13013         (stderr_file::write) ... this.  Adjust.
13014         (stderr_file_fputs): Rename to ...
13015         (stderr_file::puts) ... this.  Adjust.
13016         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13017         (stderr_file::stderr_file): New.
13018         (tee_file_magic): Delete.
13019         (struct tee_file): Delete.
13020         (tee_file::tee_file): New.
13021         (tee_file_new): Delete.
13022         (tee_file::~tee_file): New.
13023         (tee_file_delete): Delete.
13024         (tee_file_flush): Rename to ...
13025         (tee_file::flush): ... this.  Adjust.
13026         (tee_file_write): Rename to ...
13027         (tee_file::write): ... this.  Adjust.
13028         (tee_file::write_async_safe): New.
13029         (tee_file_fputs): Rename to ...
13030         (tee_file::puts): ... this.  Adjust.
13031         (tee_file_isatty): Rename to ...
13032         (tee_file::isatty): ... this.  Adjust.
13033         * ui-file.h (struct obstack, struct ui_file): Don't
13034         forward-declare.
13035         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13036         (ui_file_write_ftype)
13037         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13038         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13039         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13040         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13041         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13042         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13043         (set_ui_file_fseek): Delete.
13044         (ui_file_data, ui_file_delete, ui_file_rewind)
13045         (struct ui_file): New.
13046         (ui_file_up): New.
13047         (class null_file): New.
13048         (null_stream): Declare.
13049         (ui_file_write_for_put, ui_file_put): Delete.
13050         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13051         Delete.
13052         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13053         (gdb_fopen, tee_file_new): Delete.
13054         (struct string_file): New.
13055         (struct stdio_file): New.
13056         (stdio_file_up): New.
13057         (struct stderr_file): New.
13058         (class tee_file): New.
13059         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13060         of a 'ui_file *'.  Adjust.
13061         * ui-out.h (class ui_out) <field_stream>: Likewise.
13062         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13063         (null_stream): Delete.
13064         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13065         Adjust.
13066         * utils.h (struct ui_file): Delete forward declaration..
13067         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13068         (error_stream): Take a 'string_file &' instead of a
13069         'ui_file *'.
13070         * varobj.c (varobj_value_get_print_value): Use string_file.
13071         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13072         * gdbarch.c: Regenerate.
13073
13074 2017-02-02  Pedro Alves  <palves@redhat.com>
13075
13076         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13077         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13078         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13079         Adjust to call gdb_print_insn instead of
13080         gdb_disassembler::print_insn.
13081         (dump_insns, do_mixed_source_and_assembly_deprecated)
13082         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13083         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13084         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13085         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13086         declaration.
13087         (gdb_pretty_print_insn): Re-add declaration.
13088         * record-btrace.c (btrace_insn_history): Don't allocate a
13089         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13090
13091 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13092
13093         * disasm.h (gdb_disassembly): Remove file_string parameter.
13094         * disasm.c (gdb_disassembly): Likewise.
13095         * cli/cli-cmds.c (print_disassembly): Adapt.
13096         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13097         * stack.c (do_gdb_disassembly): Likewise.
13098
13099 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13100
13101         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13102         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13103         targets.  And if the implicit value is longer than needed, extract
13104         the first bytes instead of the "least significant" ones.
13105
13106 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13107
13108         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13109         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13110         (btrace_fetch): Assert can_access_registers_ptid.
13111         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13112         validate_registers_access.
13113
13114 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13115
13116         * gdbthread.h (can_access_registers_ptid): New.
13117         * thread.c (can_access_registers_ptid): New.
13118
13119 2017-02-01  Pedro Alves  <palves@redhat.com>
13120
13121         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13122
13123 2017-01-31  Pedro Alves  <palves@redhat.com>
13124
13125         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13126         Fix typos.
13127
13128 2017-01-31  Pedro Alves  <palves@redhat.com>
13129
13130         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13131         not used.
13132
13133 2017-01-31  Pedro Alves  <palves@redhat.com>
13134
13135         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13136
13137 2017-01-31  Pedro Alves  <palves@redhat.com>
13138
13139         * common/scoped_restore.h
13140         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13141         change the value's parameter type to T2.
13142         (make_scoped_restore): Likewise.
13143
13144 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13145             Richard Henderson  <rth@redhat.com>
13146
13147         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13148         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13149         GS_BASE for older kernels.
13150         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13151         GS_BASE for older kernels.
13152         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13153         and GS_BASE to the offset table.
13154         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13155         system register group.
13156         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13157         for older kernels.
13158         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13159         amd64 ABI.
13160         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13161         AMD64_GSBASE_REGNUM.
13162         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13163         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13164         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13165         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13166         i386/64bit-segments.xml in those rules.
13167         * features/i386/64bit-segments.xml: New file.
13168         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13169         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13170         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13171         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13172         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13173         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13174         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13175         * features/i386/amd64-avx-linux.c: Regenerated.
13176         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13177         * features/i386/amd64-avx-mpx.c: Regenerated.
13178         * features/i386/amd64-avx512-linux.c: Regenerated.
13179         * features/i386/amd64-linux.c: Regenerated.
13180         * features/i386/amd64-mpx-linux.c: Regenerated.
13181         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13182         * features/i386/i386-avx-mpx.c: Regenerated.
13183         * features/i386/x32-avx-linux.c: Regenerated.
13184         * features/i386/x32-avx512-linux.c: Regenerated.
13185         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13186         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13187         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13188         * regformats/i386/amd64-linux.dat: Regenerated.
13189         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13190         * regformats/i386/x32-avx-linux.dat: Regenerated.
13191         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13192         * regformats/i386/x32-linux.dat: Regenerated.
13193
13194 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13195
13196         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13197         Set to AMD64_NUM_REGS.
13198
13199 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13200
13201         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13202         that checks validity of a register number.
13203
13204 2017-01-27  Kees Cook  <keescook@google.com>
13205
13206         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13207         fetch_fpregs if target has fpa registers.
13208         (arm_linux_store_inferior_registers): Call store_fpregs if target
13209         has fpa registers.
13210
13211 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13212
13213         * cris-tdep.c (cris_gdbarch_init): Remove check for
13214         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13215
13216 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13217
13218         * corelow.c (get_core_register_section): Check for regset
13219         existence before checking for REGSET_VARIABLE_SIZE.
13220
13221 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13222             Pedro Alves  <palves@redhat.com>
13223
13224         PR gdb/20939
13225         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13226         call memory_error, save memaddr instead.
13227         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13228         negative, cal memory_error.
13229         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13230
13231 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13232
13233         * disasm-selftests.c (memory_error_test): New function.
13234         (_initialize_disasm_selftests): Register memory_error_test.
13235
13236 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13237
13238         * Makefile.in (SFILES): Add disasm-selftests.c and
13239         selftest-arch.c.
13240         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13241         * disasm-selftests.c: New file.
13242         * selftest-arch.c: New file.
13243         * selftest-arch.h: New file.
13244
13245 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13246
13247         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13248         to bfd_arch_mep.  Don't return 0 if section is not
13249         found.  Call print_insn_mep.
13250
13251 2017-01-26  Pedro Alves  <palves@redhat.com>
13252             Yao Qi  <yao.qi@linaro.org>
13253
13254         * arm-tdep.c: Include "disasm.h".
13255         (gdb_print_insn_arm): Update code to get gdbarch.
13256         * disasm.c (dis_asm_read_memory): Change it to
13257         gdb_disassembler::dis_asm_read_memory.
13258         (dis_asm_memory_error): Likewise.
13259         (dis_asm_print_address): Likewise.
13260         (gdb_pretty_print_insn): Change it to
13261         gdb_disassembler::pretty_print_insn.
13262         (dump_insns): Add one argument gdb_disassemlber.  All
13263         callers updated.
13264         (do_mixed_source_and_assembly_deprecated): Likewise.
13265         (do_mixed_source_and_assembly): Likewise.
13266         (do_assembly_only): Likewise.
13267         (gdb_disassembler::gdb_disassembler): New.
13268         (gdb_disassembler::print_insn): New.
13269         * disasm.h (class gdb_disassembler): New.
13270         (gdb_pretty_print_insn): Remove declaration.
13271         (gdb_disassemble_info): Likewise.
13272         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13273         (gdbscm_disasm_read_memory_worker): Update.
13274         (gdbscm_disasm_read_memory): Update.
13275         (gdbscm_disasm_memory_error): Remove.
13276         (gdbscm_disasm_print_address): Remove.
13277         (gdbscm_disassembler::gdbscm_disassembler): New.
13278         (gdbscm_print_insn_from_port): Update.
13279         * mips-tdep.c: Include disasm.h.
13280         (gdb_print_insn_mips): Update code to get gdbarch.
13281         * record-btrace.c (btrace_insn_history): Update.
13282         * spu-tdep.c: Include disasm.h.
13283         (struct spu_dis_asm_data): Remove.
13284         (struct spu_dis_asm_info): New.
13285         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13286         SPU id.
13287         (gdb_print_insn_spu): Cast disassemble_info to
13288         spu_dis_asm_info.
13289
13290 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13291
13292         * disasm.c (do_ui_file_delete): Delete.
13293         (gdb_insn_length): Move code creating stream to ...
13294         * utils.c (null_stream): ... here.  New function.
13295         * utils.h (null_stream): Declare.
13296
13297 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13298
13299         * python/py-inferior.c (find_thread_object): Return directly
13300         from the loop.  Remove "found" variable.
13301
13302 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13303
13304         GDB 7.12.1 released.
13305
13306 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13307
13308         * python/py-function.c (fnpy_call): Reorder declarations to have
13309         the gdbpy_enter object declared first.
13310         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13311
13312 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13313
13314         PR python/21068
13315         * python/python-internal.h (PyMem_RawMalloc): Define for
13316         Python < 3.4.
13317         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13318         PyMem_RawMalloc instead of PyMem_Malloc.
13319
13320 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13321             Luis Machado  <lgustavo@codesourcery.com>
13322
13323         * NEWS (New commands): Mention flash-erase.
13324         (New MI commands): Mention target-flash-erase.
13325         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13326         command.
13327         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13328         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13329         * target.c (flash_erase_command): New function.
13330         (initialize_targets): Add new flash-erase command.
13331         * target.h (flash_erase_command): New declaration.
13332
13333 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13334
13335         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13336         HAVE_SYS_PROCFS_H is defined.
13337
13338 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13339
13340         * remote.c (struct cached_reg): Change data into a pointer.
13341         * (stop_reply_dtr): Free data pointers before deleting vector.
13342         (process_stop_reply): Likewise.
13343         (remote_parse_stop_reply): Allocate space for data
13344
13345 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13346
13347         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13348         MAX_REGISTER_SIZE.
13349         (amd64_pseudo_register_read_value): Likewise.
13350         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13351         (store_register_using_P): Likewise.
13352         * regcache.c (regcache_xfer_part): Likewise.
13353
13354 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13355
13356         Split real and pseudo registers.
13357         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13358         (sparc32_pseudo_regnum): New enum.
13359         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13360         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13361         (SPARC32_CP0_REGISTERS): New macro.
13362         (sparc32_pseudo_register_name): New function.
13363         (sparc32_register_name): Use sparc32_pseudo_register_name.
13364         (sparc32_pseudo_register_type): New function.
13365         (sparc32_register_type): Use sparc32_pseudo_register_type.
13366         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13367         pseudo register numbers.
13368         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13369         (SPARC64_CP0_REGISTERS): New macro.
13370         (sparc64_pseudo_register_name): New function.
13371         (sparc64_register_name): Use sparc64_pseudo_register_name.
13372         (sparc64_pseudo_register_type): New function.
13373         (sparc64_register_type): Use sparc64_pseudo_register_type.
13374         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13375         pseudo register numbers.
13376         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13377         sparc64_store_arguments): Handle pseudo register numbers.
13378
13379 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13380
13381         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13382         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13383         output.
13384         (getpkt_or_notif_sane_1): Likewise.
13385
13386 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13387
13388         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13389         of CC.  Pass "-x c++-header" instead of "-x c".
13390
13391 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13392
13393         * remote.c (remote_can_async_p): Update comment.
13394
13395 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13396
13397         * linux-nat.c (linux_nat_can_async_p): Update comment.
13398
13399 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13400
13401         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13402
13403 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13404
13405         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13406
13407 2017-01-10  Tom Tromey  <tom@tromey.com>
13408
13409         * python/py-type.c (typy_legacy_template_argument): Update.
13410         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13411         ~demangle_parse_info): Declare new members.
13412         (cp_demangled_name_to_comp): Return unique_ptr.
13413         (cp_demangled_name_parse_free)
13414         (make_cleanup_cp_demangled_name_parse_free)
13415         (cp_new_demangle_parse_info): Remove.
13416         * cp-support.c (do_demangled_name_parse_free_cleanup)
13417         (make_cleanup_cp_demangled_name_parse_free): Remove.
13418         (inspect_type, cp_canonicalize_string_full)
13419         (cp_canonicalize_string): Update.
13420         (mangled_name_to_comp): Change return type.
13421         (cp_class_name_from_physname, method_name_from_physname)
13422         (cp_func_name, cp_remove_params): Update.
13423         * cp-name-parser.y (demangle_parse_info): New constructor, from
13424         cp_new_demangle_parse_info.
13425         (~demangle_parse_info): New destructor, from
13426         cp_demangled_name_parse_free.
13427         (cp_merge_demangle_parse_infos): Update.
13428         (cp_demangled_name_to_comp): Change return type.
13429
13430 2017-01-10  Tom Tromey  <tom@tromey.com>
13431
13432         * top.c (prevent_dont_repeat): Change return type.
13433         * python/python.c (execute_gdb_command): Use std::string.
13434         Update.
13435         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13436         * command.h (prevent_dont_repeat): Change return type.
13437         * breakpoint.c (bpstat_do_actions_1): Update.
13438
13439 2017-01-10  Tom Tromey  <tom@tromey.com>
13440
13441         * value.h (scoped_value_mark::~scoped_value_mark): Call
13442         free_to_mark.
13443         (scoped_value_mark::free_to_mark): New method.
13444         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13445         scoped_value_mark.
13446
13447 2017-01-10  Tom Tromey  <tom@tromey.com>
13448
13449         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13450         (valpy_reference_value, valpy_const_value, valpy_get_address)
13451         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13452         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13453         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13454         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13455         scoped_value_mark.
13456         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13457         * value.h (scoped_value_mark): New class.
13458
13459 2017-01-10  Tom Tromey  <tom@tromey.com>
13460
13461         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13462         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13463         * psymtab.c (discard_psymtabs_upto): Remove.
13464         (make_cleanup_discard_psymtabs): Remove.
13465         (struct psymtab_state): Remove.
13466
13467 2017-01-10  Tom Tromey  <tom@tromey.com>
13468
13469         * record-full.c (record_full_save_cleanups): Remove.
13470         (record_full_save): Use gdb::unlinker.
13471         * gcore.c (do_bfd_delete_cleanup): Remove.
13472         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13473         cleanups.
13474         * dwarf2read.c (unlink_if_set): Remove.
13475         (write_psymtabs_to_index): Use gdb::unlinker.
13476         * common/gdb_unlinker.h: New file.
13477
13478 2017-01-10  Tom Tromey  <tom@tromey.com>
13479
13480         * windows-tdep.c (windows_xfer_shared_library): Update.
13481         * windows-nat.c (windows_make_so): Update.
13482         * utils.h (make_cleanup_bfd_unref): Remove.
13483         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13484         * symfile.h (symfile_bfd_open)
13485         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13486         * symfile.c (read_symbols, symbol_file_add)
13487         (separate_debug_file_exists): Update.
13488         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13489         (generic_load, reread_symbols): Update.
13490         * symfile-mem.c (symbol_file_add_from_memory): Update.
13491         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13492         (spu_symbol_file_add_from_memory): Update.
13493         * solist.h (struct target_so_ops) <bfd_open>: Return
13494         gdb_bfd_ref_ptr.
13495         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13496         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13497         gdb_bfd_ref_ptr.
13498         (solib_map_sections, reload_shared_libraries_1): Update.
13499         * solib-svr4.c (enable_break): Update.
13500         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13501         * solib-frv.c (enable_break2): Update.
13502         * solib-dsbt.c (enable_break): Update.
13503         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13504         gdb_bfd_ref_ptr.
13505         (darwin_solib_get_all_image_info_addr_at_init): Update.
13506         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13507         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13508         * record-full.c (record_full_save): Update.
13509         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13510         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13511         * minidebug.c (find_separate_debug_file_in_section): Return
13512         gdb_bfd_ref_ptr.
13513         * machoread.c (macho_add_oso_symfile): Change abfd to
13514         gdb_bfd_ref_ptr.
13515         (macho_symfile_read_all_oso): Update.
13516         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13517         (macho_symfile_read): Update.
13518         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13519         (jit_bfd_try_read_symtab): Update.
13520         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13521         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13522         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13523         gdb_bfd_ref_ptr.
13524         (gdb_bfd_ref_policy): New struct.
13525         (gdb_bfd_ref_ptr): New typedef.
13526         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13527         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13528         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13529         gdb_bfd_ref_ptr.
13530         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13531         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13532         (gcore_command): Update.
13533         * exec.c (exec_file_attach): Update.
13534         * elfread.c (elf_symfile_read): Update.
13535         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13536         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13537         (open_and_init_dwo_file): Update.
13538         (open_dwp_file): Return gdb_bfd_ref_ptr.
13539         (open_and_init_dwp_file): Update.
13540         * corelow.c (core_open): Update.
13541         * compile/compile-object-load.c (compile_object_load): Update.
13542         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13543         * coffread.c (coff_symfile_read): Update.
13544         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13545         gdb_bfd_ref_ptr.  Rename.
13546         (dump_bfd_file, restore_command): Update.
13547         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13548         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13549         (find_separate_debug_file_by_buildid): Update.
13550
13551 2017-01-10  Tom Tromey  <tom@tromey.com>
13552
13553         * common/gdb_ref_ptr.h: New file.
13554         * python/py-ref.h (struct gdbpy_ref_policy): New.
13555         (gdbpy_ref): Now a typedef.
13556
13557 2017-01-10  Tom Tromey  <tom@tromey.com>
13558
13559         * utils.h (make_cleanup_htab_delete): Don't declare.
13560         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13561         Remove.
13562         * linespec.c (decode_compound_collector): Add constructor,
13563         destructor.
13564         (lookup_prefix_sym): Remove cleanup.
13565         (symtab_collector): Add constructor, destructor.
13566         (collect_symtabs_from_filename): Remove cleanup.
13567         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13568         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13569         Use htab_up.
13570         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13571         * dwarf2read.c (dw2_expand_symtabs_matching)
13572         (dw2_map_symbol_filenames, dwarf_decode_macros)
13573         (write_psymtabs_to_index): Use htab_up.
13574         * dwarf2loc.c (func_verify_no_selftailcall)
13575         (call_site_find_chain_1, func_verify_no_selftailcall)
13576         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13577         std::vector, gdb::unique_xmalloc_ptr.
13578         (call_sitep): Remove typedef.
13579         (dwarf2_locexpr_baton_eval): Remove unused variable.
13580
13581 2017-01-10  Tom Tromey  <tom@tromey.com>
13582
13583         * python/python-internal.h (make_cleanup_py_decref)
13584         (make_cleanup_py_xdecref): Don't declare.
13585         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13586         (py_xdecref, make_cleanup_py_xdecref): Remove.
13587
13588 2017-01-10  Tom Tromey  <tom@tromey.com>
13589
13590         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13591         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13592
13593 2017-01-10  Tom Tromey  <tom@tromey.com>
13594
13595         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13596
13597 2017-01-10  Tom Tromey  <tom@tromey.com>
13598
13599         * python/py-utils.c (unicode_to_encoded_string)
13600         (python_string_to_target_string)
13601         (python_string_to_target_python_string)
13602         (python_string_to_host_string, gdbpy_obj_to_string)
13603         (get_addr_from_python): Use gdbpy_ref.
13604
13605 2017-01-10  Tom Tromey  <tom@tromey.com>
13606
13607         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13608         gdbpy_ref.
13609
13610 2017-01-10  Tom Tromey  <tom@tromey.com>
13611
13612         * python/python.c (eval_python_command, gdbpy_decode_line)
13613         (gdbpy_run_events, gdbpy_start_type_printers)
13614         (gdbpy_apply_type_printers): Use gdbpy_ref.
13615
13616 2017-01-10  Tom Tromey  <tom@tromey.com>
13617
13618         * python/py-param.c (get_doc_string, compute_enum_values): Use
13619         gdbpy_ref.
13620
13621 2017-01-10  Tom Tromey  <tom@tromey.com>
13622
13623         * python/py-inferior.c (find_thread_object, build_inferior_list):
13624         Use gdbpy_ref.
13625
13626 2017-01-10  Tom Tromey  <tom@tromey.com>
13627
13628         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13629
13630 2017-01-10  Tom Tromey  <tom@tromey.com>
13631
13632         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13633         gdbpy_ref.
13634
13635 2017-01-10  Tom Tromey  <tom@tromey.com>
13636
13637         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13638         extra incref.
13639         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13640         Use gdbpy_ref.
13641
13642 2017-01-10  Tom Tromey  <tom@tromey.com>
13643
13644         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13645         gdbpy_ref.
13646
13647 2017-01-10  Tom Tromey  <tom@tromey.com>
13648
13649         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13650         decref results of PyArg_ParseTupleAndKeywords.
13651
13652 2017-01-10  Tom Tromey  <tom@tromey.com>
13653
13654         * python/python.c (python_run_simple_file): Use
13655         unique_xmalloc_ptr, gdbpy_ref.
13656
13657 2017-01-10  Tom Tromey  <tom@tromey.com>
13658
13659         * python/py-prettyprint.c (print_stack_unless_memory_error)
13660         (print_string_repr, print_children): Use gdbpy_ref.
13661         (dummy_python_frame): New class.
13662         (dummy_python_frame::dummy_python_frame): Rename from
13663         push_dummy_python_frame.
13664         (py_restore_tstate): Remove.
13665
13666 2017-01-10  Tom Tromey  <tom@tromey.com>
13667
13668         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13669
13670 2017-01-10  Tom Tromey  <tom@tromey.com>
13671
13672         * python/python.c (ensure_python_env, restore_python_env):
13673         Remove.
13674         * python/python-internal.h (ensure_python_env): Don't declare.
13675         * varobj.h (varobj_ensure_python_env): Don't declare.
13676         * varobj.c (varobj_ensure_python_env): Remove.
13677
13678 2017-01-10  Tom Tromey  <tom@tromey.com>
13679
13680         * varobj.c (varobj_value_get_print_value): Use
13681         gdbpy_enter_varobj.
13682
13683 2017-01-10  Tom Tromey  <tom@tromey.com>
13684
13685         * python/py-prettyprint.c (print_string_repr, print_children):
13686         Update.
13687         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13688         of "encoding".
13689         * varobj.c (varobj_value_get_print_value): Update.
13690         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13691
13692 2017-01-10  Tom Tromey  <tom@tromey.com>
13693
13694         * varobj.c (varobj_get_display_hint)
13695         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13696         (varobj_set_visualizer, free_variable): Use
13697         gdbpy_enter_varobj.
13698
13699 2017-01-10  Tom Tromey  <tom@tromey.com>
13700
13701         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13702         (do_finish_initialization): New function.  Use gdbpy_ref.
13703         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13704         do_finish_initialization.
13705
13706 2017-01-10  Tom Tromey  <tom@tromey.com>
13707
13708         * python/py-param.c (get_set_value, get_show_value): Use
13709         gdbpy_enter, gdbpy_ref.
13710
13711 2017-01-10  Tom Tromey  <tom@tromey.com>
13712
13713         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13714
13715 2017-01-10  Tom Tromey  <tom@tromey.com>
13716
13717         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13718
13719 2017-01-10  Tom Tromey  <tom@tromey.com>
13720
13721         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13722         Use gdbpy_enter_varobj.
13723
13724 2017-01-10  Tom Tromey  <tom@tromey.com>
13725
13726         * varobj.c (gdbpy_enter_varobj): New constructor.
13727         * python/python-internal.h (gdbpy_enter_varobj): New class.
13728         * python/py-varobj.c (py_varobj_get_iterator): Use
13729         gdbpy_enter_varobj.
13730
13731 2017-01-10  Tom Tromey  <tom@tromey.com>
13732
13733         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13734         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13735         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13736         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13737         unique_xmalloc_ptr.
13738         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13739
13740 2017-01-10  Tom Tromey  <tom@tromey.com>
13741
13742         * python/py-xmethods.c (invoke_match_method): Use
13743         gdbpy_ref.
13744
13745 2017-01-10  Tom Tromey  <tom@tromey.com>
13746
13747         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13748         gdbpy_enter, gdbpy_ref.
13749
13750 2017-01-10  Tom Tromey  <tom@tromey.com>
13751
13752         * python/python.c (python_interactive_command): Use gdbpy_enter.
13753
13754 2017-01-10  Tom Tromey  <tom@tromey.com>
13755
13756         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13757         gdbpy_ref.
13758
13759 2017-01-10  Tom Tromey  <tom@tromey.com>
13760
13761         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13762         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13763
13764 2017-01-10  Tom Tromey  <tom@tromey.com>
13765
13766         * utils.h (htab_deleter): New struct.
13767         (htab_up): New typedef.
13768         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13769         gdbpy_enter, gdbpy_ref, htab_up.
13770
13771 2017-01-10  Tom Tromey  <tom@tromey.com>
13772
13773         * python/py-unwind.c (pending_frame_invalidate): Remove.
13774         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13775
13776 2017-01-10  Tom Tromey  <tom@tromey.com>
13777
13778         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13779         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13780
13781 2017-01-10  Tom Tromey  <tom@tromey.com>
13782
13783         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13784
13785 2017-01-10  Tom Tromey  <tom@tromey.com>
13786
13787         * python/python.c (gdbpy_eval_from_control_command)
13788         (gdbpy_source_script, gdbpy_run_events)
13789         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13790         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13791         gdbpy_enter.
13792
13793 2017-01-10  Tom Tromey  <tom@tromey.com>
13794
13795         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13796
13797 2017-01-10  Tom Tromey  <tom@tromey.com>
13798
13799         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13800
13801 2017-01-10  Tom Tromey  <tom@tromey.com>
13802
13803         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13804         (python_on_inferior_call_pre, python_on_inferior_call_post)
13805         (python_on_memory_change, python_on_register_change)
13806         (python_inferior_exit, python_new_objfile, add_thread_object)
13807         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13808
13809 2017-01-10  Tom Tromey  <tom@tromey.com>
13810
13811         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13812         (bpfinishpy_handle_exit): Use gdbpy_enter.
13813
13814 2017-01-10  Tom Tromey  <tom@tromey.com>
13815
13816         * python/py-cmd.c (cmdpy_destroyer)
13817         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13818         gdbpy_enter.
13819
13820 2017-01-10  Tom Tromey  <tom@tromey.com>
13821
13822         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13823         gdbpy_enter.
13824         (gdbpy_breakpoint_has_cond): Likewise.
13825
13826 2017-01-10  Tom Tromey  <tom@tromey.com>
13827
13828         * python/python.c (gdbpy_enter): New constructor.
13829         (~gdbpy_enter): New destructor.
13830         (restore_python_env, ensure_python_env): Rewrite.
13831         * python/python-internal.h (gdbpy_enter): New class.
13832
13833 2017-01-10  Tom Tromey  <tom@tromey.com>
13834
13835         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13836
13837 2017-01-10  Tom Tromey  <tom@tromey.com>
13838
13839         * python/py-value.c (value_has_field, get_field_flag)
13840         (get_field_type, valpy_getitem, convert_value_from_python): Use
13841         gdbpy_ref.
13842
13843 2017-01-10  Tom Tromey  <tom@tromey.com>
13844
13845         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13846         gdbpy_ref.
13847
13848 2017-01-10  Tom Tromey  <tom@tromey.com>
13849
13850         * python/py-prettyprint.c (search_pp_list)
13851         (find_pretty_printer_from_objfiles)
13852         (find_pretty_printer_from_progspace)
13853         (find_pretty_printer_from_gdb, find_pretty_printer)
13854         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13855         gdbpy_ref.
13856
13857 2017-01-10  Tom Tromey  <tom@tromey.com>
13858
13859         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13860
13861 2017-01-10  Tom Tromey  <tom@tromey.com>
13862
13863         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13864         (ltpy_get_all_source_lines): Use gdbpy_ref.
13865
13866 2017-01-10  Tom Tromey  <tom@tromey.com>
13867
13868         * python/py-framefilter.c (extract_sym, extract_value)
13869         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13870         gdbpy_ref.
13871
13872 2017-01-10  Tom Tromey  <tom@tromey.com>
13873
13874         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13875
13876 2017-01-10  Tom Tromey  <tom@tromey.com>
13877
13878         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13879
13880 2017-01-10  Tom Tromey  <tom@tromey.com>
13881
13882         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13883         gdbpy_ref.
13884
13885 2017-01-10  Tom Tromey  <tom@tromey.com>
13886
13887         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13888
13889 2017-01-10  Tom Tromey  <tom@tromey.com>
13890
13891         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13892         (typy_range): Use gdbpy_ref.
13893
13894 2017-01-10  Tom Tromey  <tom@tromey.com>
13895
13896         * python/py-threadevent.c (create_thread_event_object): Use
13897         gdbpy_ref.
13898         * python/py-stopevent.c (create_stop_event_object): Simplify.
13899         (emit_stop_event): Use gdbpy_ref.
13900         * python/py-signalevent.c (create_signal_event_object): Use
13901         gdbpy_ref.
13902         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13903         (emit_new_objfile_event, create_clear_objfiles_event_object)
13904         (emit_clear_objfiles_event): Use gdbpy_ref.
13905         * python/py-infevents.c (create_inferior_call_event_object)
13906         (create_register_changed_event_object)
13907         (create_memory_changed_event_object, emit_inferior_call_event)
13908         (emit_memory_changed_event, emit_register_changed_event): Use
13909         gdbpy_ref.
13910         * python/py-exitedevent.c (create_exited_event_object)
13911         (emit_exited_event): Use gdbpy_ref.
13912         * python/py-event.h (evpy_emit_event): Remove
13913         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13914         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13915         * python/py-continueevent.c (emit_continue_event): Use
13916         gdbpy_ref.
13917         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13918         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13919         gdbpy_ref.
13920         * python/py-bpevent.c (create_breakpoint_event_object): Use
13921         gdbpy_ref.
13922
13923 2017-01-10  Tom Tromey  <tom@tromey.com>
13924
13925         * python/py-ref.h: New file.
13926
13927 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13928
13929         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13930         void.
13931         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13932         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13933         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13934         * ui-out.c (ui_out::redirect): Likewise.
13935         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13936         * cli/cli-logging.c (set_logging_redirect): Update call site of
13937         ui_out::redirect.
13938         (handle_redirections): Likewise.
13939         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13940         * top.c (execute_command_to_string): Likewise.
13941         * utils.c (do_ui_out_redirect_pop): Likewise.
13942
13943 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13944
13945         * stack.c (_initialize_stack): Update "frame" command help message.
13946
13947 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13948
13949         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13950
13951 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13952
13953         * x86-linux-nat.h: Include gdb_proc_service.h.
13954
13955 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13956
13957         * ser-base.h: Include serial.h.
13958
13959 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13960
13961         * ppc-linux-tdep.h: Include ppc-tdep.h.
13962
13963 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13964
13965         * nat/amd64-linux-siginfo.h: Include signal.h.
13966
13967 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13968
13969         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13970
13971 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13972
13973         * mi/mi-parse.h: Include mi-cmds.h.
13974
13975 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13976
13977         * inf-loop.c: Don't include "target.h".
13978         * inf-loop.h: Include it here.
13979
13980 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13981
13982         * dfp.h: Include "dboulest.h" and "expression.h".
13983
13984 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13985
13986         * ax-gdb.h: Include "ax.h".
13987
13988 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13989
13990         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13991         with nat/gdb_ptrace.h.
13992
13993 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13994
13995         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13996         new line.
13997         (mips64_fbsd_sigframe_init): Likewise.
13998
13999 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14000
14001         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14002         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14003
14004 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14005
14006         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14007         * NEWS: Mention new FreeBSD/mips native configuration.
14008         * config/mips/fbsd.mh: New file.
14009         * configure.host: Add mips*-*-freebsd*.
14010         * mips-fbsd-nat.c: New file.
14011
14012 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14013
14014         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14015         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14016         * NEWS: Mention new FreeBSD/mips target.
14017         * configure.tgt: Add mips*-*-freebsd*.
14018         * mips-fbsd-tdep.c: New file.
14019         * mips-fbsd-tdep.h: New file.
14020
14021 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14022
14023         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14024         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14025
14026 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14027
14028         Update copyright year range in all GDB files.
14029
14030 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14031
14032         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14033
14034 For older changes see ChangeLog-2016.
14035 \f
14036 Local Variables:
14037 mode: change-log
14038 left-margin: 8
14039 fill-column: 74
14040 version-control: never
14041 coding: utf-8
14042 End: