s/get_regcache_arch (regcache)/regcache->arch ()/g
[external/binutils.git] / gdb / ChangeLog
1 2017-10-25  Yao Qi  <yao.qi@linaro.org>
2
3         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4         regcache->arch () instead get_regcache_arch.
5         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
6         Likewise.
7         (aarch64_fbsd_store_inferior_registers): Likewise.
8         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
9         (store_gregs_to_thread): Likewise.
10         (fetch_fpregs_from_thread): Likewise.
11         (store_fpregs_to_thread): Likewise.
12         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
13         (aarch64_store_return_value): Likewise.
14         (aarch64_software_single_step): Likewise.
15         * aix-thread.c (aix_thread_wait): Likewise.
16         (supply_reg32): Likewise.
17         (supply_sprs64): Likewise.
18         (supply_sprs32): Likewise.
19         (fill_gprs64): Likewise.
20         (fill_gprs32): Likewise.
21         (fill_sprs64): Likewise.
22         (fill_sprs32): Likewise.
23         (store_regs_user_thread): Likewise.
24         (store_regs_kernel_thread): Likewise.
25         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
26         (alphabsd_store_inferior_registers): Likewise.
27         * alpha-tdep.c (alpha_extract_return_value): Likewise.
28         (alpha_store_return_value): Likewise.
29         (alpha_deal_with_atomic_sequence): Likewise.
30         (alpha_next_pc): Likewise.
31         (alpha_software_single_step): Likewise.
32         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
33         (amd64bsd_store_inferior_registers): Likewise.
34         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
35         Likewise.
36         (amd64_linux_store_inferior_registers): Likewise.
37         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
38         (amd64_collect_native_gregset): Likewise.
39         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
40         (amd64obsd_collect_uthread): Likewise.
41         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
42         (amd64_collect_fpregset): Likewise.
43         (amd64_supply_fxsave): Likewise.
44         (amd64_supply_xsave): Likewise.
45         (amd64_collect_fxsave): Likewise.
46         (amd64_collect_xsave): Likewise.
47         * arc-tdep.c (arc_write_pc): Likewise.
48         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
49         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
50         (arm_fbsd_store_inferior_registers): Likewise.
51         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
52         (store_vfp_regs): Likewise.
53         (arm_linux_fetch_inferior_registers): Likewise.
54         (arm_linux_store_inferior_registers): Likewise.
55         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
56         (arm_linux_sigreturn_next_pc): Likewise.
57         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
58         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
59         (fetch_register): Likewise.
60         (store_register): Likewise.
61         * arm-tdep.c (arm_is_thumb): Likewise.
62         (displaced_in_arm_mode): Likewise.
63         (bx_write_pc): Likewise.
64         (arm_get_next_pcs_addr_bits_remove): Likewise.
65         (arm_software_single_step): Likewise.
66         (arm_extract_return_value): Likewise.
67         (arm_store_return_value): Likewise.
68         (arm_write_pc): Likewise.
69         * bfin-tdep.c (bfin_extract_return_value): Likewise.
70         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
71         (bsd_uthread_store_registers): Likewise.
72         * core-regset.c (fetch_core_registers): Likewise.
73         * corelow.c (get_core_registers): Likewise.
74         * cris-tdep.c (cris_store_return_value): Likewise.
75         (cris_extract_return_value): Likewise.
76         (find_step_target): Likewise.
77         (find_step_target): Likewise.
78         (cris_software_single_step): Likewise.
79         * ctf.c (ctf_fetch_registers): Likewise.
80         * darwin-nat.c (cancel_breakpoint): Likewise.
81         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
82         * frv-tdep.c (frv_extract_return_value): Likewise.
83         * ft32-tdep.c (ft32_store_return_value): Likewise.
84         (ft32_extract_return_value): Likewise.
85         * go32-nat.c (fetch_register): Likewise.
86         (go32_fetch_registers): Likewise.
87         (go32_store_registers): Likewise.
88         (store_register): Likewise.
89         * h8300-tdep.c (h8300_extract_return_value): Likewise.
90         (h8300_store_return_value): Likewise.
91         * hppa-linux-nat.c (fetch_register): Likewise.
92         (store_register): Likewise.
93         (hppa_linux_fetch_inferior_registers): Likewise.
94         (hppa_linux_store_inferior_registers): Likewise.
95         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
96         (i386_darwin_store_inferior_registers): Likewise.
97         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
98         (gnu_store_registers): Likewise.
99         * i386-linux-nat.c (fetch_register): Likewise.
100         (store_register): Likewise.
101         (supply_gregset): Likewise.
102         (fill_gregset): Likewise.
103         (i386_linux_fetch_inferior_registers): Likewise.
104         (i386_linux_store_inferior_registers): Likewise.
105         (i386_linux_resume): Likewise.
106         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
107         Likewise.
108         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
109         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
110         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
111         (i386obsd_collect_uthread): Likewise.
112         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
113         (i386_supply_gregset): Likewise.
114         (i386_collect_gregset): Likewise.
115         (i386_supply_fpregset): Likewise.
116         (i386_collect_fpregset): Likewise.
117         (i386_mpx_bd_base): Likewise.
118         * i386-v4-nat.c (supply_fpregset): Likewise.
119         (fill_fpregset): Likewise.
120         * i387-tdep.c (i387_supply_fsave): Likewise.
121         (i387_collect_fsave): Likewise.
122         (i387_supply_fxsave): Likewise.
123         (i387_collect_fxsave): Likewise.
124         (i387_supply_xsave): Likewise.
125         (i387_collect_xsave): Likewise.
126         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
127         (ia64_linux_store_registers): Likewise.
128         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
129         (ia64_extract_return_value): Likewise.
130         (ia64_store_return_value): Likewise.
131         (find_func_descr): Likewise.
132         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
133         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
134         (inf_ptrace_store_registers): Likewise.
135         * infrun.c (use_displaced_stepping): Likewise.
136         (displaced_step_prepare_throw): Likewise.
137         (resume): Likewise.
138         (proceed): Likewise.
139         (do_target_wait): Likewise.
140         (adjust_pc_after_break): Likewise.
141         (handle_inferior_event_1): Likewise.
142         (handle_signal_stop): Likewise.
143         (save_infcall_suspend_state): Likewise.
144         (restore_infcall_suspend_state): Likewise.
145         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
146         * jit.c (jit_frame_prev_register): Likewise.
147         * linux-nat.c (save_stop_reason): Likewise.
148         (linux_nat_wait_1): Likewise.
149         (resume_stopped_resumed_lwps): Likewise.
150         * linux-record.c (record_linux_sockaddr): Likewise.
151         (record_linux_msghdr): Likewise.
152         (record_linux_system_call): Likewise.
153         * linux-tdep.c (linux_collect_thread_registers): Likewise.
154         * lm32-tdep.c (lm32_extract_return_value): Likewise.
155         (lm32_store_return_value): Likewise.
156         * m32c-tdep.c (m32c_read_flg): Likewise.
157         (m32c_pseudo_register_read): Likewise.
158         (m32c_pseudo_register_write): Likewise.
159         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
160         (m32r_linux_collect_gregset): Likewise.
161         * m32r-tdep.c (m32r_store_return_value): Likewise.
162         (m32r_extract_return_value): Likewise.
163         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
164         (m68kbsd_collect_fpregset): Likewise.
165         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
166         * m68k-linux-nat.c (fetch_register): Likewise.
167         (old_fetch_inferior_registers): Likewise.
168         (old_store_inferior_registers): Likewise.
169         (store_regs): Likewise.
170         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
171         (m68k_svr4_store_return_value): Likewise.
172         * m88k-tdep.c (m88k_store_arguments): Likewise.
173         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
174         (mi_cmd_data_write_register_values): Likewise.
175         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
176         (mips_fbsd_store_inferior_registers): Likewise.
177         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
178         (mips_fbsd_supply_gregs): Likewise.
179         (mips_fbsd_collect_fpregs): Likewise.
180         (mips_fbsd_collect_gregs): Likewise.
181         (mips_fbsd_supply_fpregset): Likewise.
182         (mips_fbsd_collect_fpregset): Likewise.
183         (mips_fbsd_supply_gregset): Likewise.
184         (mips_fbsd_collect_gregset): Likewise.
185         * mips-linux-nat.c (supply_gregset): Likewise.
186         (fill_gregset): Likewise.
187         (supply_fpregset): Likewise.
188         (fill_fpregset): Likewise.
189         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
190         (mips_fill_gregset): Likewise.
191         (mips_supply_fpregset): Likewise.
192         (mips_fill_fpregset): Likewise.
193         (mips64_supply_gregset): Likewise.
194         (micromips_linux_sigframe_validate): Likewise.
195         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
196         (mipsnbsd_fetch_inferior_registers): Likewise.
197         (mipsnbsd_store_inferior_registers): Likewise.
198         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
199         (mipsnbsd_supply_gregset): Likewise.
200         (mipsnbsd_iterate_over_regset_sections): Likewise.
201         (mipsnbsd_supply_reg): Likewise.
202         (mipsnbsd_supply_fpreg): Likewise.
203         * mips-tdep.c (mips_in_frame_stub): Likewise.
204         (mips_dummy_id): Likewise.
205         (is_octeon_bbit_op): Likewise.
206         (micromips_bc1_pc): Likewise.
207         (extended_mips16_next_pc): Likewise.
208         (mips16_next_pc): Likewise.
209         (deal_with_atomic_sequence): Likewise.
210         * moxie-tdep.c (moxie_process_readu): Likewise.
211         * nios2-tdep.c (nios2_get_next_pc): Likewise.
212         * nto-procfs.c (procfs_store_registers): Likewise.
213         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
214         (ppcfbsd_store_inferior_registers): Likewise.
215         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
216         (fetch_altivec_register): Likewise.
217         (get_spe_registers): Likewise.
218         (fetch_spe_register): Likewise.
219         (fetch_altivec_registers): Likewise.
220         (fetch_all_gp_regs): Likewise.
221         (fetch_all_fp_regs): Likewise.
222         (store_vsx_register): Likewise.
223         (store_altivec_register): Likewise.
224         (set_spe_registers): Likewise.
225         (store_spe_register): Likewise.
226         (store_altivec_registers): Likewise.
227         (store_all_gp_regs): Likewise.
228         (store_all_fp_regs): Likewise.
229         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
230         (ppc_linux_collect_gregset): Likewise.
231         (ppc_canonicalize_syscall): Likewise.
232         (ppc_linux_record_signal): Likewise.
233         (ppu2spu_prev_register): Likewise.
234         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
235         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
236         (ppcobsd_store_registers): Likewise.
237         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
238         Likewise.
239         (ppc_ravenscar_generic_store_registers): Likewise.
240         * procfs.c (procfs_fetch_registers): Likewise.
241         (procfs_store_registers): Likewise.
242         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
243         (ravenscar_store_registers): Likewise.
244         (ravenscar_prepare_to_store): Likewise.
245         * record-btrace.c (record_btrace_fetch_registers): Likewise.
246         * record-full.c (record_full_wait_1): Likewise.
247         (record_full_registers_change): Likewise.
248         (record_full_store_registers): Likewise.
249         (record_full_core_fetch_registers): Likewise.
250         (record_full_save): Likewise.
251         (record_full_goto_insn): Likewise.
252         * regcache.c (regcache_register_size): Likewise.
253         (get_regcache_arch): Remove.
254         (regcache_read_pc): Likewise.
255         * regcache.h (get_regcache_arch): Remove.
256         * remote-sim.c (gdbsim_fetch_register): Likewise.
257         (gdbsim_store_register): Likewise.
258         * remote.c (fetch_register_using_p): Likewise.
259         (send_g_packet): Likewise.
260         (remote_prepare_to_store): Likewise.
261         (store_registers_using_G): Likewise.
262         * reverse.c (save_bookmark_command): Likewise.
263         (goto_bookmark_command): Likewise.
264         * rs6000-aix-tdep.c (branch_dest): Likewise.
265         * rs6000-nat.c (rs6000_ptrace64): Likewise.
266         (fetch_register): Likewise.
267         * rs6000-tdep.c (ppc_supply_reg): Likewise.
268         (ppc_collect_reg): Likewise.
269         (ppc_collect_gregset): Likewise.
270         (ppc_collect_fpregset): Likewise.
271         (ppc_collect_vsxregset): Likewise.
272         (ppc_collect_vrregset): Likewise.
273         (ppc_displaced_step_hw_singlestep): Likewise.
274         (rs6000_pseudo_register_read): Likewise.
275         (rs6000_pseudo_register_write): Likewise.
276         * s390-linux-nat.c (supply_gregset): Likewise.
277         (fill_gregset): Likewise.
278         (s390_linux_fetch_inferior_registers): Likewise.
279         * s390-linux-tdep.c (s390_write_pc): Likewise.
280         (s390_software_single_step): Likewise.
281         (s390_all_but_pc_registers_record): Likewise.
282         (s390_linux_syscall_record): Likewise.
283         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
284         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
285         (shnbsd_store_inferior_registers): Likewise.
286         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
287         (sh_extract_return_value_fpu): Likewise.
288         (sh_store_return_value_nofpu): Likewise.
289         (sh_corefile_supply_regset): Likewise.
290         (sh_corefile_collect_regset): Likewise.
291         * sh64-tdep.c (sh64_extract_return_value): Likewise.
292         (sh64_store_return_value): Likewise.
293         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
294         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
295         (sparc_store_inferior_registers): Likewise.
296         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
297         (sparc_ravenscar_prepare_to_store): Likewise.
298         * sparc-tdep.c (sparc32_store_arguments): Likewise.
299         (sparc_analyze_control_transfer): Likewise.
300         (sparc_step_trap): Likewise.
301         (sparc_software_single_step): Likewise.
302         (sparc32_gdbarch_init): Likewise.
303         (sparc_supply_rwindow): Likewise.
304         (sparc_collect_rwindow): Likewise.
305         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
306         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
307         (sparc64nbsd_collect_gregset): Likewise.
308         (sparc64nbsd_supply_fpregset): Likewise.
309         (sparc64nbsd_collect_fpregset): Likewise.
310         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
311         (sparc64_supply_gregset): Likewise.
312         (sparc64_collect_gregset): Likewise.
313         (sparc64_supply_fpregset): Likewise.
314         (sparc64_collect_fpregset): Likewise.
315         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
316         * spu-tdep.c (spu_unwind_sp): Likewise.
317         (spu2ppu_prev_register): Likewise.
318         (spu_memory_remove_breakpoint): Likewise.
319         * stack.c (return_command): Likewise.
320         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
321         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
322         * tracefile.c (trace_save_ctf): Likewise.
323         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
324         (do_windows_store_inferior_registers): Likewise.
325         (windows_resume): Likewise.
326         * xtensa-linux-nat.c (fill_gregset): Likewise.
327         (supply_gregset_reg): Likewise.
328         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
329         (xtensa_register_read_masked): Likewise.
330         (xtensa_supply_gregset): Likewise.
331         (xtensa_extract_return_value): Likewise.
332         (xtensa_store_return_value): Likewise.
333
334 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
335
336         * doublest.c (floatformat_from_string): New function.
337         * doublest.h (floatformat_from_string): Add prototype.
338
339         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
340         (OP_FLOAT): ... this.
341         * expression.h: Do not include "doublest.h".
342         (union exp_element): Replace doubleconst and decfloatconst by
343         new element floatconst.
344         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
345         (ada_evaluate_subexp): Likewise.
346         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
347         OP_DOUBLE and OP_DECFLOAT.
348         * expprint.c (print_subexp_standard): Likewise.
349         (dump_subexp_body_standard): Likewise.
350         * breakpoint.c (watchpoint_exp_is_const): Likewise.
351
352         * parse.c: Include "dfp.h".
353         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
354         (write_exp_elt_floatcst): New function.
355         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
356         and OP_DECFLOAT.
357         (operator_check_standard): Likewise.
358         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
359         Return target format buffer instead of host DOUBLEST.
360         Use floatformat_from_string and decimal_from_string to parse
361         either binary or decimal floating-point types.
362         (parse_c_float): Remove.
363         * parser-defs.h: Do not include "doublest.h".
364         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
365         (write_exp_elt_floatcst): Add prototype.
366         (parse_float): Update prototype.
367         (parse_c_float): Remove.
368
369         * c-exp.y: Do not include "dfp.h".
370         (typed_val_float): Use byte buffer instead of DOUBLEST.
371         (typed_val_decfloat): Remove.
372         (DECFLOAT): Remove.
373         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
374         (parse_number): Update to new parse_float interface.
375         Parse suffixes and determine type before calling parse_float.
376         Handle decimal and binary FP types the same way.
377
378         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
379         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
380         (parse_number): Update to new parse_float interface.
381         Parse suffixes and determine type before calling parse_float.
382
383         * f-exp.y: Replace dval by typed_val_float.
384         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
385         (parse_number): Use parse_float instead of atof.
386
387         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
388         (parse_go_float): Remove.
389         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
390         (parse_number): Call parse_float instead of parse_go_float.
391         Parse suffixes and determine type before calling parse_float.
392
393         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
394         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
395         (parse_number): Update to new parse_float interface.
396         Parse suffixes and determine type before calling parse_float.
397
398         * m2-exp.y: Replace dval by byte buffer val.
399         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
400         (parse_number): Call parse_float instead of atof.
401
402         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
403         (lex_number): Call parse_float instead of strtod.
404         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
405         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
406         Use write_exp_elt_floatcst.
407         (unit_testing): Remove static variable.
408         (rust_type): Do not check unit_testing.
409         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
410
411         * ada-exp.y (type_float, type_double): Remove.
412         (typed_val_float): Use byte buffer instead of DOUBLEST.
413         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
414         * ada-lex.l (processReal): Use parse_float instead of sscanf.
415
416 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
417
418         * aarch64-tdep.h (enum aarch64_regnum): Remove.
419         * arch/aarch64.h: New file.
420
421 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
422
423         * dfp.h (decimal_from_string): Use const reference for argument.
424         * dfp.c (decimal_from_string): Likewise.
425
426 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
427
428         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
429         * sh64-tdep.c (sh64_do_fp_register): Likewise.
430         * mips-tdep.c (mips_print_fp_register): Likewise.
431
432 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
433
434         * common/format.h (enum argclass): Replace decfloat_arg by
435         dec32float_arg, dec64float_arg, and dec128float_arg.
436         * common/format.c (parse_format_string): Update to return
437         new decimal float argument classes.
438
439         * printcmd.c (printf_decfloat): Rename to ...
440         (printf_floating): ... this.  Add argclass argument, and use it
441         instead of parsing the format string again.  Add support for
442         binary floating-point values, using floatformat_to_string.
443         Convert value to the target format if it doesn't already match.
444         (ui_printf): Call printf_floating instead of printf_decfloat,
445         also for double_arg / long_double_arg.  Pass argclass.
446
447         * dfp.c (decimal_to_string): Add format string argument.
448         * dfp.h (decimal_to_string): Likewise.
449
450         * doublest.c (floatformat_to_string): Add format string argument.
451         * doublest.h (floatformat_to_string): Likewise.
452
453 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
454
455         * doublest.c (floatformat_precision): New routine.
456         (floatformat_to_string): Likewise.
457         * doublest.c (floatformat_to_string): Add prototype.
458
459         * printcmd.c (print_scalar_formatted): Only call print_floating
460         on floating-point types.
461         * valprint.c: Do not include "floatformat.h".
462         (generic_val_print_decfloat): Remove.
463         (generic_val_print): Call generic_val_print_float for both
464         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
465         (print_floating): Use floatformat_to_string.  Handle decimal float.
466         (print_decimal_floating): Remove, merge into floatformat_to_string.
467         * value.h (print_decimal_floating): Remove.
468
469         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
470
471 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
472
473         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
474
475 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
476
477         * memattr.h: Don't include vec.h.
478         (struct mem_attrib): Initialize fields.
479         <unknown>: New static method.
480         (struct mem_region): Add constructors, operator<, initialize
481         fields.
482         * memattr.c: Include algorithm.
483         (default_mem_attrib, unknown_mem_attrib): Remove.
484         (user_mem_region_list): New global.
485         (target_mem_region_list, mem_region_list): Change type to
486         std::vector<mem_region>.
487         (mem_use_target): Now a function.
488         (target_mem_regions_valid): Change type to bool.
489         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
490         (require_user_regions): Adjust.
491         (require_target_regions): Adjust.
492         (create_mem_region): Adjust.
493         (lookup_mem_region): Adjust.
494         (invalidate_target_mem_regions): Adjust.
495         (mem_clear): Rename to...
496         (user_mem_clear): ... this, and adjust.
497         (mem_command): Adjust.
498         (info_mem_command): Adjust.
499         (mem_enable, enable_mem_command, mem_disable,
500         disable_mem_command): Adjust.
501         (mem_delete): Adjust.
502         (delete_mem_command): Adjust.
503         * memory-map.h (parse_memory_map): Return an std::vector.
504         * memory-map.c (parse_memory_map): Likewise.
505         (struct memory_map_parsing_data): Add constructor.
506         <memory_map>: Point to std::vector.
507         (memory_map_start_memory): Adjust.
508         (memory_map_end_memory): Adjust.
509         (memory_map_end_property): Adjust.
510         (clear_result): Remove.
511         * remote.c (remote_memory_map): Return an std::vector.
512         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
513         Remove.
514         (target_debug_print_mem_region_vector): New.
515         * target-delegates.c: Regenerate.
516         * target.h (mem_region_vector): New typedef.
517         (to_memory_map): Return mem_region_vector.
518         (target_memory_map): Return an std::vector.
519         * target.c (target_memory_map): Return an std::vector.
520         (flash_erase_command): Adjust.
521
522 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
523
524         * memory-map.c (struct memory_map_parsing_data) <property_name>:
525         Change type to std::string.
526         (memory_map_start_property): Adjust.
527         (memory_map_end_property): Adjust.
528
529 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
530
531         * infrun.h: Include common/byte-vector.h.
532         (struct displaced_step_closure): New struct.
533         (struct buf_displaced_step_closure): New struct.
534         * infrun.c (displaced_step_closure::~displaced_step_closure):
535         Provide default implementation.
536         (displaced_step_clear): Deallocate step closure with delete.
537         * aarch64-tdep.c (displaced_step_closure): Rename to ...
538         (aarch64_displaced_step_closure): ... this, extend
539         displaced_step_closure.
540         (aarch64_displaced_step_data) <dsc>: Change type to
541         aarch64_displaced_step_closure.
542         (aarch64_displaced_step_copy_insn): Adjust to type change, use
543         unique_ptr.
544         (aarch64_displaced_step_fixup): Add cast for displaced step
545         closure.
546         * amd64-tdep.c (displaced_step_closure): Rename to ...
547         (amd64_displaced_step_closure): ... this, extend
548         displaced_step_closure.
549         <insn_buf>: Change type to std::vector<gdb_byte>.
550         <max_len>: Remove.
551         (fixup_riprel): Change type of DSC parameter, adjust to type
552         change of insn_buf.
553         (fixup_displaced_copy): Change type of DSC parameter.
554         (amd64_displaced_step_copy_insn): Instantiate
555         amd64_displaced_step_closure.
556         (amd64_displaced_step_fixup): Add cast for closure type, adjust
557         to type change of insn_buf.
558         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
559         parameter DSC.
560         (arm_linux_copy_svc): Likewise.
561         (cleanup_kernel_helper_return): Likewise.
562         (arm_catch_kernel_helper_return): Likewise.
563         (arm_linux_displaced_step_copy_insn): Instantiate
564         arm_displaced_step_closure.
565         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
566         (displaced_read_reg): Change type of parameter DSC.
567         (branch_write_pc): Likewise.
568         (load_write_pc): Likewise.
569         (alu_write_pc): Likewise.
570         (displaced_write_reg): Likewise.
571         (arm_copy_unmodified): Likewise.
572         (thumb_copy_unmodified_32bit): Likewise.
573         (thumb_copy_unmodified_16bit): Likewise.
574         (cleanup_preload): Likewise.
575         (install_preload): Likewise.
576         (arm_copy_preload): Likewise.
577         (thumb2_copy_preload): Likewise.
578         (install_preload_reg): Likewise.
579         (arm_copy_preload_reg): Likewise.
580         (cleanup_copro_load_store): Likewise.
581         (install_copro_load_store): Likewise.
582         (arm_copy_copro_load_store) Likewise.
583         (thumb2_copy_copro_load_store): Likewise.
584         (cleanup_branch): Likewise.
585         (install_b_bl_blx): Likewise.
586         (arm_copy_b_bl_blx): Likewise.
587         (thumb2_copy_b_bl_blx): Likewise.
588         (thumb_copy_b): Likewise.
589         (install_bx_blx_reg): Likewise.
590         (arm_copy_bx_blx_reg): Likewise.
591         (thumb_copy_bx_blx_reg): Likewise.
592         (cleanup_alu_imm): Likewise.
593         (arm_copy_alu_imm): Likewise.
594         (thumb2_copy_alu_imm): Likewise.
595         (cleanup_alu_reg): Likewise.
596         (install_alu_reg): Likewise.
597         (arm_copy_alu_reg): Likewise.
598         (thumb_copy_alu_reg): Likewise.
599         (cleanup_alu_shifted_reg): Likewise.
600         (install_alu_shifted_reg): Likewise.
601         (arm_copy_alu_shifted_reg): Likewise.
602         (cleanup_load): Likewise.
603         (cleanup_store): Likewise.
604         (arm_copy_extra_ld_st): Likewise.
605         (install_load_store): Likewise.
606         (thumb2_copy_load_literal): Likewise.
607         (thumb2_copy_load_reg_imm): Likewise.
608         (arm_copy_ldr_str_ldrb_strb): Likewise.
609         (cleanup_block_load_all): Likewise.
610         (cleanup_block_store_pc): Likewise.
611         (cleanup_block_load_pc): Likewise.
612         (arm_copy_block_xfer): Likewise.
613         (thumb2_copy_block_xfer): Likewise.
614         (cleanup_svc): Likewise.
615         (install_svc): Likewise.
616         (arm_copy_svc): Likewise.
617         (thumb_copy_svc): Likewise.
618         (arm_copy_undef): Likewise.
619         (thumb_32bit_copy_undef): Likewise.
620         (arm_copy_unpred): Likewise.
621         (arm_decode_misc_memhint_neon): Likewise.
622         (arm_decode_unconditional): Likewise.
623         (arm_decode_miscellaneous): Likewise.
624         (arm_decode_dp_misc): Likewise.
625         (arm_decode_ld_st_word_ubyte): Likewise.
626         (arm_decode_media): Likewise.
627         (arm_decode_b_bl_ldmstm): Likewise.
628         (arm_decode_ext_reg_ld_st): Likewise.
629         (thumb2_decode_dp_shift_reg): Likewise.
630         (thumb2_decode_ext_reg_ld_st): Likewise.
631         (arm_decode_svc_copro): Likewise.
632         (thumb2_decode_svc_copro): Likewise.
633         (install_pc_relative): Likewise.
634         (thumb_copy_pc_relative_16bit): Likewise.
635         (thumb_decode_pc_relative_16bit): Likewise.
636         (thumb_copy_pc_relative_32bit): Likewise.
637         (thumb_copy_16bit_ldr_literal): Likewise.
638         (thumb_copy_cbnz_cbz): Likewise.
639         (thumb2_copy_table_branch): Likewise.
640         (cleanup_pop_pc_16bit_all): Likewise.
641         (thumb_copy_pop_pc_16bit): Likewise.
642         (thumb_process_displaced_16bit_insn): Likewise.
643         (decode_thumb_32bit_ld_mem_hints): Likewise.
644         (thumb_process_displaced_32bit_insn): Likewise.
645         (thumb_process_displaced_insn): Likewise.
646         (arm_process_displaced_insn): Likewise.
647         (arm_displaced_init_closure): Likewise.
648         (arm_displaced_step_fixup): Add cast for closure.
649         * arm-tdep.h: Include infrun.h.
650         (displaced_step_closure): Rename to ...
651         (arm_displaced_step_closure): ... this, extend
652         displaced_step_closure.
653         <u::svc::copy_svc_os>: Change type of parameter DSC.
654         <cleanup>: Likewise.
655         (arm_process_displaced_insn): Likewise.
656         (arm_displaced_init_closure): Likewise.
657         (displaced_read_reg): Likewise.
658         (displaced_write_reg): Likewise.
659         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
660         Adjust.
661         * i386-tdep.h: Include infrun.h.
662         (i386_displaced_step_closure): New typedef.
663         * i386-tdep.c (i386_displaced_step_copy_insn): Use
664         i386_displaced_step_closure.
665         (i386_displaced_step_fixup): Adjust.
666         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
667         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
668         and unique_ptr.
669         (ppc_displaced_step_fixup): Adjust.
670         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
671         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
672         and unique_ptr.
673         (s390_displaced_step_fixup): Adjust.
674
675 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
676
677         * interps.h (interp_resume, interp_suspend, interp_set_temp):
678         Remove declarations.
679
680 2017-10-20  Tom Tromey  <tom@tromey.com>
681
682         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
683         std::vector.
684         (gdb_bfd_record_inclusion): Update.
685         (bfdp): Remove typedef.
686
687 2017-10-20  Tom Tromey  <tom@tromey.com>
688
689         * gdb_bfd.c (gdb_bfd_ref): Use new.
690         (struct gdb_bfd_data): Add constructor, destructor, and member
691         initializers.
692         (gdb_bfd_unref): Use delete.
693
694 2017-10-20  Tom Tromey  <tom@tromey.com>
695
696         * exec.c (exec_file_attach): Use new_bfd_ref.
697         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
698         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
699         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
700         new_bfd_ref.
701         * gdb_bfd.h (new_bfd_ref): New function.
702
703 2017-10-20  Pedro Alves  <palves@redhat.com>
704
705         * main.c (captured_command_loop): Add attribute noinline.
706
707 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
708
709         * interps.c (struct interp_factory): Add constructor.
710         (interp_factory_p): Remove typedef.
711         (DEF_VEC_P(interp_factory_p)): Remove.
712         (interpreter_factories): Change type to std::vector.
713         (interp_factory_register): Adjust.
714         (interp_lookup): Adjust.
715         (interpreter_completer): Adjust.
716
717 2017-10-19  Tom Tromey  <tom@tromey.com>
718
719         * break-catch-syscall.c (catch_syscall_completer): Use
720         std::string, gdb::unique_xmalloc_ptr.
721
722 2017-10-19  Tom Tromey  <tom@tromey.com>
723
724         * infcall.c (call_function_by_hand_dummy): Use std::string.
725
726 2017-10-19  Tom Tromey  <tom@tromey.com>
727
728         * mi/mi-main.c (mi_cmd_execute): Update.
729         * top.h (prepare_execute_command): Return scoped_value_mark.
730         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
731         Add move constructor.
732         * top.c (prepare_execute_command): Return scoped_value_mark.
733         (execute_command): Update.
734
735 2017-10-19  Pedro Alves  <palves@redhat.com>
736
737         * xml-support.c (xml_fetch_content_from_file): Check fread's
738         return.
739
740 2017-10-19  Pedro Alves  <palves@redhat.com>
741
742         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
743         async.
744         (handle_error_fd): New function.
745         (ser_base_async): Add/delete an event loop file handler for
746         error_fd.
747
748 2017-10-19  Pedro Alves  <palves@redhat.com>
749
750         * xml-support.c (xml_fetch_content_from_file): Don't read in
751         chunks.  Instead use fseek to determine the file's size, and read
752         it in one go.
753
754 2017-11-18  Keith Seitz  <keiths@redhat.com>
755
756         * c-exp.y (oper): Canonicalize conversion operators of user-defined
757         types.
758         Add whitespace to front of type name.
759
760 2017-10-18  Keith Seitz  <keiths@redhat.com>
761
762         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
763         DW_AT_accessibility.
764
765 2017-10-18  Yao Qi  <yao.qi@linaro.org>
766
767         * features/tic6x-c62x-linux.c: Remove.
768
769 2017-10-17  Tom Tromey  <tom@tromey.com>
770
771         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
772         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
773         (do_mixed_source_and_assembly): Likewise.
774
775 2017-10-17  Tom Tromey  <tom@tromey.com>
776
777         * regcache.c (regcache::xfer_part): Remove assertion.
778
779 2017-10-17  Pedro Alves  <palves@redhat.com>
780
781         * xml-support.c (xml_fetch_content_from_file): Call
782         unique_ptr::release() instead unique_ptr::get() when passing
783         through xrealloc.
784
785 2017-10-17  Yao Qi  <yao.qi@linaro.org>
786
787         * regcache.c (regcache::xfer_part): Remove parameters read and
788         write, add parameter is_raw.  All callers are updated.
789
790 2017-10-16  Keith Seitz  <keiths@redhat.com>
791
792         * c-typeprint.c (enum access_specifier): Moved here from
793         c_type_print_base.
794         (output_access_specifier): New function.
795         (c_type_print_base): Consider typedefs when assessing
796         whether access labels are needed.
797         Use output_access_specifier as needed.
798         Output access specifier for typedefs, if needed.
799         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
800         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
801         fields.
802         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
803         accessor macros.
804
805 2017-10-16  Tom Tromey  <tom@tromey.com>
806
807         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
808         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
809         * target.c (target_fileio_read_stralloc): Update.
810         * sparc64-tdep.c (adi_is_addr_mapped): Update.
811         * target.h (target_fileio_read_stralloc): Return
812         unique_xmalloc_ptr.
813
814 2017-10-16  Tom Tromey  <tom@tromey.com>
815
816         * xml-syscall.c (xml_init_syscalls_info): Update.
817         * xml-support.c (xinclude_start_include): Update.
818         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
819         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
820         (xml_fetch_content_from_file): Likewise.
821         * osdata.c (get_osdata): Update.
822         * target.h (target_read_stralloc, target_get_osdata): Return
823         unique_xmalloc_ptr.
824         * solib-aix.c (solib_aix_get_library_list): Update.
825         * solib-target.c (solib_target_current_sos): Update.
826         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
827         * xml-tdesc.c (fetch_available_features_from_target): Update.
828         (target_fetch_description_xml): Update.
829         (file_read_description_xml): Update.
830         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
831         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
832         (remote_pid_to_exec_file): Update.
833         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
834         (target_get_osdata): Likewise.
835
836 2017-10-16  Tom Tromey  <tom@tromey.com>
837
838         * remote.c (remote_register_number_and_offset): Use std::vector.
839         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
840         (putpkt_binary): Use gdb::def_vector.
841         (compare_sections_command): Use gdb::byte_vector.
842
843 2017-10-16  Tom Tromey  <tom@tromey.com>
844
845         * ppc-linux-nat.c (hwdebug_insert_point): Use
846         gdb::unique_xmalloc_ptr, XDUP.
847
848 2017-10-16  Tom Tromey  <tom@tromey.com>
849
850         * probe.c (parse_probes): Use std::string.
851         (info_probes_for_ops, enable_probes_command)
852         (disable_probes_command): Remove cleanups.
853
854 2017-10-16  Tom Tromey  <tom@tromey.com>
855
856         * buildsym.c (block_compar): Remove.
857         (end_symtab_get_static_block): Use std::vector.
858
859 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
860
861         * memrange.h (struct mem_range): Define operator< and operator==.
862         (mem_range_s): Remove.
863         (DEF_VEC_O (mem_range_s)): Remove.
864         (normalize_mem_ranges): Change parameter type to std::vector.
865         * memrange.c (compare_mem_ranges): Remove.
866         (normalize_mem_ranges): Change parameter type to std::vector,
867         adjust to vector change.
868         * exec.c (section_table_available_memory): Return vector, remove
869         parameter.
870         (section_table_read_available_memory): Adjust to std::vector
871         change.
872         * remote.c (remote_read_bytes): Adjust to std::vector
873         change.
874         * tracepoint.h (traceframe_available_memory): Change parameter
875         type to std::vector.
876         * tracepoint.c (traceframe_available_memory): Change parameter
877         type to std::vector, adjust.
878         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
879         std::vector change.
880         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
881         unittests/memrange-selftests.c.
882         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
883         * gdb/unittests/memrange-selftests.c: New file.
884
885 2017-10-16  Pedro Alves  <palves@redhat.com>
886
887         * elfread.c (probe_key_free): Rename range-for variable.
888         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
889         (find_probe_by_pc, collect_probes): Rename range-for variable.
890
891 2017-10-16  Yao Qi  <yao.qi@linaro.org>
892
893         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
894         * features/tic6x-c62x.c: Remove.
895         * features/tic6x-c64x-linux.c: Remove.
896         * features/tic6x-c64x.c: Remove.
897         * features/tic6x-c64xp-linux.c: Remove.
898         * features/tic6x-c64xp.c: Remove.
899         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
900         initialize_tdesc_tic6x_*_linux functions.
901         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
902         initialize_tdesc_tic6x_* functions.
903
904 2017-10-16  Yao Qi  <yao.qi@linaro.org>
905
906         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
907         tic6x-c62x.
908         * regformats/tic6x-c62x.dat: Remove.
909         * regformats/tic6x-c64x.dat: Remove.
910         * regformats/tic6x-c64xp.dat: Remove.
911
912 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
913
914         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
915         (the !HAVE_LIBEXPAT version).
916
917 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
918
919         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
920         const.
921
922 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
923
924         * target.h: Include tracepoint.h.
925         (enum trace_find_type): Move to tracepoint.h.
926         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
927         * tracepoint.h: Don't include target.h
928         (enum trace_find_type): Move from target.h.
929         (parse_traceframe_info): Return a unique ptr.
930         * tracepoint.c (current_traceframe_info): Change type to unique
931         ptr.
932         (free_traceframe_info): Remove.
933         (clear_traceframe_info): Don't manually free
934         current_traceframe_info.
935         (free_result): Remove.
936         (parse_traceframe_info): Return a unique ptr.
937         (get_traceframe_info): Adjust to unique ptr.
938         * ctf.c (ctf_traceframe_info): Return a unique ptr.
939         * remote.c (remote_traceframe_info): Return a unique ptr.
940         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
941         ptr.
942         * target-debug.h (target_debug_print_traceframe_info_up): New
943         macro.
944         * target-delegates.c: Regenerate.
945
946 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
947
948         * memrange.h (struct mem_range): Add constructors.
949         * tracepoint.h (struct traceframe_info) <memory>: Change type to
950         std::vector<mem_range>.
951         * tracepoint.c (free_traceframe_info): Don't manually free
952         vector.
953         (traceframe_info_start_memory): Adjust to vector change.
954         (traceframe_available_memory): Likewise.
955         * tracefile-tfile.c (build_traceframe_info): Likewise.
956         * ctf.c (ctf_traceframe_info): Likewise.
957
958 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
959
960         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
961         std::vector<int>.
962         * tracepoint.c (free_traceframe_info): Deallocate with delete.
963         (traceframe_info_start_tvar): Adjust to vector change.
964         (parse_traceframe_info): Allocate with new.
965         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
966         vector change.
967         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
968         change.
969         tfile_traceframe_info): Allocate with new.
970         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
971         change.
972
973 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
974
975         * tracepoint.c (traceframe_info): Rename to...
976         (current_traceframe_info): ...this.
977         (clear_traceframe_info): Adjust.
978         (get_traceframe_info): Adjust.
979
980 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
981
982         * nat/linux-osdata.c: Include algorithm.
983         (compare_processes): Remove.
984         (struct pid_pgid_entry): New struct.
985         (linux_xfer_osdata_processgroups): Use std::vector instead of
986         XNEWVEC.
987
988 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
989
990         * objfiles.h: Don't include symfile.h.
991         (struct partial_symbol): Remove forward-declaration.
992         (struct objfile) <global_psymbols, static_psymbols>: Change type
993         to std::vector<partial_symbol *>.
994         * objfiles.c (objfile::objfile): Don't memset those fields.
995         (objfile::~objfile): Don't free those fields.
996         * psympriv.h (struct psymbol_allocation_list): Remove
997         forward-declaration.
998         (add_psymbol_to_list): Change psymbol_allocation_list parameter
999         to std::vector.
1000         (start_psymtab_common): Change parameters to std::vector.
1001         * psymtab.c: Include algorithm.
1002         (require_partial_symbols): Call shrink_to_fit.
1003         (find_pc_sect_psymbol): Adjust to vector change.
1004         (match_partial_symbol): Likewise.
1005         (lookup_partial_symbol): Likewise.
1006         (psym_relocate): Likewise.
1007         (dump_psymtab): Likewise.
1008         (recursively_search_psymtabs): Likewise.
1009         (compare_psymbols): Remove.
1010         (sort_pst_symbols): Adjust to vector change.
1011         (start_psymtab_common): Likewise.
1012         (end_psymtab_common): Likewise.
1013         (psymbol_bcache_full): De-constify return value.
1014         (add_psymbol_to_bcache): Likewise.
1015         (extend_psymbol_list): Remove.
1016         (append_psymbol_to_list): Adjust to vector change.
1017         (add_psymbol_to_list): Likewise.
1018         (init_psymbol_list): Likewise.
1019         (maintenance_info_psymtabs): Likewise.
1020         (maintenance_check_psymtabs): Likewise.
1021         * symfile.h (struct psymbol_allocation_list): Remove.
1022         * symfile.c (reread_symbols): Adjust to vector change.
1023         * dbxread.c (start_psymtab): Change type of parameters.
1024         (dbx_symfile_read): Adjust to vector change.
1025         (read_dbx_symtab): Likewise.
1026         (start_psymtab): Change type of parameters.
1027         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1028         (create_partial_symtab): Likewise.
1029         (add_partial_symbol): Likewise.
1030         (write_one_signatured_type): Likewise.
1031         (recursively_write_psymbols): Likewise.
1032         * mdebugread.c (parse_partial_symbols): Likewise.
1033         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1034         (scan_xcoff_symtab): Adjust to vector change.
1035         (xcoff_initial_scan): Likewise.
1036
1037 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1038
1039         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1040
1041 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1042
1043         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1044         Remove s390x-*-expedite, add s390x-expedite.
1045
1046 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1047
1048         * features/s390-gs-linux64.c: Regenerated.
1049         * features/s390x-gs-linux64.c: Regenerated.
1050
1051 2017-10-13  Tom Tromey  <tom@tromey.com>
1052
1053         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1054         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1055         delete.
1056         * symfile.c (symbol_file_add_with_addrs): Use new.
1057         (symbol_file_add_separate): Update comment.
1058         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1059         * jit.c (jit_object_close_impl): Use new.
1060         (jit_unregister_code): Use delete.
1061         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1062         (~objfile): Rename from free_objfile.
1063         (free_objfile_separate_debug, do_free_objfile_cleanup)
1064         (free_all_objfiles, objfile_purge_solibs): Use delete.
1065         * objfiles.h (struct objfile): Add constructor and destructor.
1066         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1067         (allocate_objfile, free_objfile): Don't declare.
1068         (struct objstats): Add initializers.
1069
1070 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1071
1072         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1073         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1074         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1075         * gdbarch.h: Regenerate.
1076         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1077         Adjust comment.
1078         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1079         (i386_displaced_step_fixup): Adjust comment.
1080         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1081
1082 2017-10-12  Tom Tromey  <tom@tromey.com>
1083
1084         * prologue-value.h (pv_area::store_would_trash): Return bool.
1085         (pv_area::find_reg): Likewise.
1086         * prologue-value.c (pv_area::store_would_trash): Return bool.
1087         (pv_area::find_reg): Likewise.
1088
1089 2017-10-12  Tom Tromey  <tom@tromey.com>
1090
1091         * s390-linux-tdep.c (s390_store, s390_load)
1092         (s390_check_for_saved, s390_analyze_prologue): Update.
1093         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1094         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1095         * prologue-value.h (class pv_area): Move from prologue-value.c.
1096         Change names of members.  Add constructor, destructor, member
1097         functions.
1098         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1099         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1100         (pv_area_fetch, pv_area_scan): Don't declare.
1101         * prologue-value.c (struct pv_area::area_entry): Now member of
1102         pv_area.
1103         (struct pv_area): Move to prologue-value.h.
1104         (pv_area::pv_area): Rename from make_pv_area.
1105         (pv_area::~pv_area): Rename from free_pv_area.
1106         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1107         (clear_entries, find_entry, overlaps, store_would_trash, store)
1108         (fetch, find_reg, scan): Now member of pv_area.
1109         Remove "area" argument.  Update.
1110         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1111         Update.
1112         * mn10300-tdep.c (push_reg, check_for_saved)
1113         (mn10300_analyze_prologue): Update.
1114         * mep-tdep.c (is_arg_spill, check_for_saved)
1115         (mep_analyze_prologue): Update.
1116         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1117         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1118         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1119         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1120         Update.
1121         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1122         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1123
1124 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1125
1126         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1127         * linux-nat.c (linux_nat_delete_thread): New variable.
1128         (lwp_free): Invoke linux_nat_delete_thread if set.
1129         (linux_nat_set_delete_thread): New function.
1130         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1131         thread delete callback.
1132         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1133         (_initialize_arm_linux_nat): Assign thread delete callback.
1134         * s390-linux-nat.c (s390_delete_thread): New function.
1135         (_initialize_s390_nat): Assign thread delete callback.
1136         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1137         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1138         function.
1139         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1140         declaration.
1141         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1142         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1143
1144 2017-10-09  Tom Tromey  <tom@tromey.com>
1145
1146         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1147         std::string.
1148         * tui/tui-layout.c (enum tui_status): Use std::string.
1149
1150 2017-10-11  Tom Tromey  <tom@tromey.com>
1151
1152         * gdbthread.h (thread_command): Constify.
1153         * inferior.h (detach_command): Constify.
1154         * top.h (set_history, show_history): Constify.
1155         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1156         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1157         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1158         * printcmd.c (set_command): Constify.
1159         (non_const_set_command): New function.
1160         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1161         * breakpoint.c (enable_command, disable_command, delete_command)
1162         (catch_command, tcatch_command, set_breakpoint_cmd)
1163         (show_breakpoint_cmd): Constify.
1164         * macrocmd.c (macro_command): Constify.
1165         * infcmd.c (unset_command, kill_command, detach_command)
1166         (info_proc_cmd): Constify.
1167         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1168         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1169         (info_auto_load_cmd): Constify.
1170         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1171         (unset_tdesc_cmd): Constify.
1172         * ada-lang.c (set_ada_command, show_ada_command)
1173         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1174         * guile/guile.c (set_guile_command, show_guile_command)
1175         (info_guile_command): Constify.
1176         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1177         Constify.
1178         * skip.c (skip_command): Constify.
1179         * compile/compile.c (_initialize_compile): Constify.
1180         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1181         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1182         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1183         (maint_btrace_pt_show_cmd): Constify.
1184         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1185         Constify.
1186         * python/python.c (user_show_python, user_set_python): Constify.
1187         * mips-tdep.c (set_mips_command, show_mips_command)
1188         (set_mipsfpu_command): Constify.
1189         * record-btrace.c (cmd_record_btrace_start)
1190         (cmd_set_record_btrace, cmd_show_record_btrace)
1191         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1192         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1193         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1194         Constify.
1195         * symfile.c (overlay_command): Constify.
1196         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1197         * cli/cli-logging.c (set_logging_command, show_logging_command):
1198         Constify.
1199         * cli/cli-dump.c (dump_command, append_command)
1200         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1201         (tekhex_dump_command, binary_dump_command)
1202         (binary_append_command): Constify.
1203         * cli/cli-decode.c (struct cmd_list_element): Change type of
1204         "fun".
1205         * cli/cli-cmds.c (info_command, show_command, set_debug)
1206         (show_debug): Constify.
1207         (show_command): Add non-const overload.
1208         * top.c (set_history, show_history): Constify.
1209         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1210         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1211         * target.c (target_command): Constify.
1212         * sparc64-tdep.c (info_adi_command): Constify.
1213         * record-full.c (cmd_record_full_start): Constify.
1214         (set_record_full_command): Constify.  Fix typo.
1215         (show_record_full_command): Constify.
1216         * thread.c (thread_command, thread_apply_command): Constify.
1217         * memattr.c (dummy_cmd): Constify.
1218         * value.c (function_command): Constify.
1219         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1220         * probe.c (info_probes_command): Constify.
1221         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1222         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1223         (show_thread_cmd, set_thread_default_cmd)
1224         (show_thread_default_cmd): Constify.
1225         (check_empty): Constify.
1226         * tracepoint.c (tfind_command): Constify.
1227         * cp-support.c (maint_cplus_command): Constify.
1228         * windows-tdep.c (info_w32_command): Constify.
1229         * record.c (cmd_record_start, set_record_command)
1230         (show_record_command, info_record_command, cmd_record_goto):
1231         Constify.
1232         * ravenscar-thread.c (set_ravenscar_command)
1233         (show_ravenscar_command): Constify.
1234         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1235         Constify.
1236         (add_internal_problem_command): Remove casts.
1237         * arc-tdep.c (maintenance_print_arc_command): Constify.
1238         * valprint.c (set_print, show_print, set_print_raw)
1239         (show_print_raw): Constify.
1240         * maint.c (maintenance_command, maintenance_info_command)
1241         (maintenance_print_command, maintenance_set_cmd)
1242         (maintenance_show_cmd, set_per_command_cmd)
1243         (show_per_command_cmd, maintenance_check_command): Constify.
1244         * language.c (set_check, show_check): Constify.
1245         * typeprint.c (show_print_type, set_print_type): Constify.
1246         * go32-nat.c (go32_info_dos_command): Constify.
1247
1248 2017-10-11  Tom Tromey  <tom@tromey.com>
1249
1250         * breakpoint.c (prepare_re_set_context): Remove.
1251         (breakpoint_re_set_one): Update.  Don't use cleanups.
1252         (breakpoint_re_set): Use scoped_restore, std::string, and
1253         scoped_restore_current_language.
1254
1255 2017-10-11  Tom Tromey  <tom@tromey.com>
1256
1257         * breakpoint.c (commands_command_1): Use std::string.
1258         (cleanup_executing_breakpoints): Remove.
1259         (bpstat_do_actions_1): Use scoped_restore.
1260         (bpstat_check_watchpoint): Use std::string.
1261         (decode_static_tracepoint_spec): Likewise.
1262         (break_range_command): Likewise.
1263         (watch_command_1): Likewise.
1264         (compare_breakpoints): Change argument types.
1265         (clear_command): Use std::vector.
1266         (cleanup_executing_breakpoints): Remove.
1267         (update_global_location_list): Use unique_xmalloc_ptr.
1268         (strace_command): Remove unused declaration.
1269
1270 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1271
1272         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1273         * NEWS: Mention new FreeBSD/arm native configuration.
1274         * configure.host: Add arm*-*-freebsd*.
1275         * configure.nat: Likewise.
1276         * arm-fbsd-nat.c: New file.
1277
1278 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1279
1280         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1281         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1282         * NEWS: Mention new FreeBSD/arm target.
1283         * configure.tgt: Add arm*-*-freebsd*.
1284         * arm-fbsd-tdep.c: New file.
1285         * arm-fbsd-tdep.h: New file.
1286
1287 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1288
1289         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1290         `gdbarch_elfcore_write_linux_prpsinfo'.
1291         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1292         method.
1293         (elf_internal_linux_prpsinfo): Remove declaration.
1294         * gdbarch.h: Regenerate.
1295         * gdbarch.c: Regenerate.
1296
1297 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1298
1299         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1300         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1301
1302 2017-10-11  Pedro Alves  <palves@redhat.com>
1303
1304         * breakpoint.c (reattach_breakpoints): Delete.
1305         * breakpoint.h (reattach_breakpoints): Delete.
1306
1307 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1308
1309         * symfile.c (registered_sym_fns): Make struct, not typedef.
1310         (DEF_VEC_O (registered_sym_fns)): Remove.
1311         (symtab_fns): Change type to std::vector.
1312         (add_symtab_fns): Adjust.
1313         (find_sym_fns): Adjust.
1314
1315 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1316
1317         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1318         * arc-tdep.h (arc_arch_is_em): New function.
1319         (arc_arch_is_hs): Likewise.
1320
1321 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1322
1323         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1324         parentheses in the declaration.
1325         (macro_lookup_inclusion): Likewise.
1326         (macro_lookup_definition): Likewise.
1327         * p-lang.h (pascal_builtin_types): Likewise.
1328         * tui/tui-data.c (tui_win_list): Likewise.
1329         * tui/tui-data.h (tui_win_list): Likewise.
1330         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1331
1332 2017-10-11  Mark Rages  <markrages@gmail.com>
1333
1334         * target-memory.c (block_boundaries): Fix for block address not
1335         aligned on block size.
1336
1337 2017-10-10  Pedro Alves <palves@redhat.com>
1338             Tom Tromey  <tom@tromey.com>
1339
1340         * breakpoint.c (struct captured_breakpoint_query_args)
1341         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1342         (print_breakpoint): New.
1343         * breakpoint.h (print_breakpoint): Declare.
1344         * common/common-exceptions.h (enum return_reason): Remove
1345         references to catch_exceptions.
1346         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1347         Delete.
1348         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1349         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1350         * gdb.h: Delete.
1351         * gdbthread.h (thread_select): Declare.
1352         * mi/mi-cmd-break.c: Don't include gdb.h.
1353         (breakpoint_notify): Use print_breakpoint.
1354         * mi/mi-cmd-catch.c: Don't include gdb.h.
1355         * mi/mi-interp.c: Don't include gdb.h.
1356         (mi_print_breakpoint_for_event): New.
1357         (mi_breakpoint_created, mi_breakpoint_modified): Use
1358         mi_print_breakpoint_for_event.
1359         * mi/mi-main.c: Don't include gdb.h.
1360         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1361         thread_select instead of gdb_thread_select.
1362         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1363         of using gdb_list_thread_ids.
1364         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1365         FILEIO_ENOSYS here.
1366         (remote_fileio_request): Use TRY/CATCH instead of
1367         catch_exceptions.
1368         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1369         (symbol_file_add_from_memory_wrapper): Delete.
1370         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1371         * thread.c: Don't include gdb.h.
1372         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1373         (thread_alive): Use thread_select.
1374         (do_captured_thread_select): Delete, parts salvaged as ...
1375         (thread_select): ... this new function.
1376         (gdb_thread_select): Delete.
1377
1378 2017-10-10  Pedro Alves  <palves@redhat.com>
1379             Tom Tromey  <tom@tromey.com>
1380
1381         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1382         and reverse logic.
1383         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1384         No longer macros.  Instead ...
1385         (enum wp_check_result): They're now values of this new
1386         enumeration.
1387         (watchpoint_check): Change return type to wp_check_result and
1388         parameter type to bpstat.
1389         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1390         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1391         catch_errors.  Reverse logic of watchpoint_check call.
1392         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1393         pointer as parameter.
1394         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1395         * common/common-exceptions.c (throw_exception_sjlj): Update
1396         comments to avoid mentioning catch_errors.
1397         * exceptions.c (catch_errors): Delete.
1398         * exceptions.h: Update comments to avoid mentioning catch_errors.
1399         (catch_errors_ftype, catch_errors): Delete.
1400         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1401         (hook_stop_stub): Delete.
1402         (restore_selected_frame): Change return type to void, and
1403         parameter type to const frame_id &.
1404         (restore_infcall_control_state): Use TRY/CATCH instead of
1405         catch_errors.
1406         * main.c (captured_command_loop): Return void and remove
1407         parameter.  Remove references to catch_errors.
1408         (captured_main): Use TRY/CATCH instead of catch_errors.
1409         * objc-lang.c (objc_submethod_helper_data)
1410         (find_objc_msgcall_submethod_helper): Delete.
1411         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1412         catch_errors.
1413         * record-full.c (record_full_message): Return void.
1414         (record_full_message_args, record_full_message_wrapper): Delete.
1415         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1416         instead of catch_errors.
1417         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1418         parameter type to int.
1419         * solib-darwin.c (open_symbol_file_object): Ditto.
1420         * solib-dsbt.c (open_symbol_file_object): Ditto.
1421         * solib-frv.c (open_symbol_file_object): Ditto.
1422         * solib-svr4.c (open_symbol_file_object): Ditto.
1423         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1424         * solib.c (update_solib_list): Use TRY/CATCH instead of
1425         catch_errors.
1426         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1427         Change type.
1428         * symmisc.c (struct print_symbol_args): Remove.
1429         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1430         (print_symbol): Change type.
1431         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1432         and remove parameters.
1433         (catch_errors): New.
1434         (get_windows_debug_event): Adjust.
1435
1436 2017-10-09  Tom Tromey  <tom@tromey.com>
1437
1438         * mi/mi-main.c (free_splay_tree): Remove.
1439         (list_available_thread_groups): Use splay_tree_up.
1440         * common/gdb_splay_tree.h: New file.
1441
1442 2017-10-09  Tom Tromey  <tom@tromey.com>
1443
1444         * mi/mi-main.c (do_nothing): Remove.
1445         (list_available_thread_groups): Update.
1446
1447 2017-10-09  Pedro Alves  <palves@redhat.com>
1448
1449         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1450         reading registers when switching context.
1451
1452 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1453
1454         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1455         (fbsd_convert_siginfo): Likewise.
1456         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1457
1458 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1459
1460         * configure.ac (try_guile_versions): Remove guile-2.2.
1461         * configure: Regenerate.
1462
1463 2017-10-09  Tom Tromey  <tom@tromey.com>
1464
1465         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1466         (COMPILE.pre): Use $(CXX).
1467
1468 2017-10-09  Pedro Alves  <palves@redhat.com>
1469
1470         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1471         Use bool.
1472         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1473         * cp-support.h (cp_remove_params): Now returns a
1474         gdb::unique_xmalloc_ptr.
1475         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1476         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1477         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1478         returning a gdb::unique_xmalloc_ptr.
1479         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1480         * stack.c (find_frame_funname): Adjust to cp_remove_params
1481         returning a gdb::unique_xmalloc_ptr.
1482
1483 2017-10-08  Tom Tromey  <tom@tromey.com>
1484
1485         * dwarf2read.c (dwarf2_get_dwz_file): Use
1486         gdb::unique_xmalloc_ptr.
1487         (find_slot_in_mapped_hash): Likewise.
1488         (dwarf2_physname): Likewise.
1489         (create_dwo_unit_in_dwp_v1): Use std::string.
1490         (create_dwo_unit_in_dwp_v2): Likewise.
1491         (lookup_dwo_cutu): Likewise.
1492         (inherit_abstract_dies): Use std::vector.
1493         (read_array_type): Likewise.
1494         (dwarf_decode_macros): Remove unused declaration.
1495         (unsigned_int_compar): Remove.
1496         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1497         (psymtabs_addrmap_cleanup): Remove.
1498
1499 2017-10-08  Tom Tromey  <tom@tromey.com>
1500
1501         * frame-unwind.c (frame_unwind_try_unwinder): Update.
1502         * frame.h (frame_cleanup_after_sniffer): Declare.
1503         (frame_prepare_for_sniffer): Return void.
1504         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
1505         type of argument.
1506         (frame_prepare_for_sniffer): Return void.
1507
1508 2017-10-08  Tom Tromey  <tom@tromey.com>
1509
1510         * utils.h (make_cleanup_value_free): Remove.
1511         * utils.c (do_value_free, struct cleanup): Remove.
1512         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1513         Use gdb_value_up.
1514         * value.h (struct value_deleter): New.
1515         (gdb_value_up): New typedef.
1516
1517 2017-10-08  Tom Tromey  <tom@tromey.com>
1518
1519         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1520         (make_cleanup_free_search_symbols): Remove.
1521         (search_symbols): Return std::vector.
1522         (symbol_search::compare_search_syms): Now member of
1523         symbol_search.  Change arguments.
1524         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
1525         (symtab_symbol_info, rbreak_command): Update.
1526         * symtab.h (struct symbol_search) <next>: Remove.
1527         Add constructors.
1528         (symbol_search::operator<): New function.
1529         (symbol_search::operator==): New function.
1530         (search_symbols): Remove std::vector.
1531         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1532         (symbol_search::compare_search_syms): Declare.
1533
1534 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1535
1536         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1537         arch/aarch64-insn.o.
1538         Remove one rule.
1539         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1540
1541 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1542
1543         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1544         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1545         arch/arm-linux.o respectively.
1546         * configure.tgt: Likewise.
1547
1548 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1549
1550         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1551         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1552
1553 2017-10-06  Pedro Alves  <palves@redhat.com>
1554
1555         * windows-nat.c: Include <algorithm>.
1556
1557 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1558
1559         * configure.tgt (i386_tobjs): New variable.
1560         (amd64_tobjs): New variable.
1561         Set $cpu_obs and $os_obs.
1562
1563 2017-10-06  Yao Qi  <yao.qi@linaro.org>
1564
1565         * Makefile.in (CONFIG_SRC_SUBDIR): New.
1566         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1567         (clean): Remove object files and dependency files.
1568         (distclean): Remove the directory.
1569         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1570         * configure: Re-generated.
1571         * configure.tgt: Replace amd64.o with arch/amd64.o.
1572
1573 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
1574
1575         PR build/22188
1576         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1577         and SETEND.
1578
1579 2017-10-05  Pedro Alves  <palves@redhat.com>
1580
1581         * linux-nat.c (linux_child_follow_fork): When following the parent
1582         and detaching the child, consult the parent thread's architecture
1583         instead of the child's.
1584
1585 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1586
1587         * ax.h: Do not include "doublest.h".
1588         (union agent_val): Remove.
1589
1590 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1591
1592         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1593         (decimal_to_string): Return std::string object.
1594         (decimal_from_string): Accept std::string object.  Return bool.
1595         (decimal_from_integral, decimal_from_doublest): Remove.
1596         (decimal_from_longest): Add prototype.
1597         (decimal_from_ulongest): Likewise.
1598         (decimal_to_longest): Likewise.
1599         (decimal_from_doublest): Likewise.
1600         * dfp.c: Do not include "gdbtypes.h" or "value.h".
1601         (MAX_DECIMAL_STRING): Move here.
1602         (decimal_to_string): Return std::string object.
1603         (decimal_from_string): Accept std::string object.  Return bool.
1604         (decimal_from_integral): Remove, replace by ...
1605         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1606         (decimal_to_longest): New function.
1607         (decimal_from_floating): Remove, replace by ...
1608         (decimal_from_doublest): ... this new function.
1609         (decimal_to_doublest): Update to new decimal_to_string interface.
1610
1611         * value.c (unpack_long): Use decimal_to_longest.
1612         * valops.c (value_cast): Use decimal_from_doublest instead of
1613         decimal_from_floating.  Use decimal_from_[u]longest isntead of
1614         decimal_from_integral.
1615         * valarith.c (value_args_as_decimal): Likewise.
1616         * valprint.c (print_decimal_floating): Update to new
1617         decimal_to_string interface.
1618         * printcmd.c (printf_decfloat): Likewise.
1619         * c-exp.y (parse_number): Update to new decimal_from_string interface.
1620
1621 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
1622
1623         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
1624         * gdbtypes.c: Include "floatformat.h".
1625         * value.c: Likewise.
1626         * m68k-tdep.c: Likewise.
1627
1628         * findvar.c: Do not include "floatformat.h".
1629         * amd64-darwin-tdep.c: Likewise.
1630         * arm-linux-tdep.c: Likewise.
1631         * i386-darwin-tdep.c: Likewise.
1632         * i387-tdep.c: Likewise.
1633         * m68k-linux-tdep.c: Likewise.
1634         * mep-tdep.c: Likewise.
1635         * mips-tdep.c: Likewise.
1636         * nios2-tdep.c: Likewise.
1637         * s390-linux-tdep.c: Likewise.
1638         * sparc-obsd-tdep.c: Likewise.
1639         * sparc-tdep.c: Likewise.
1640         * sparc64-tdep.c: Likewise.
1641         * spu-tdep.c: Likewise.
1642         * tic6x-tdep.c: Likewise.
1643         * tilegx-tdep.c: Likewise.
1644         * vax-tdep.c: Likewise.
1645         * xstormy16-tdep.c: Likewise.
1646         * xtensa-tdep.c: Likewise.
1647
1648         * top.c: Do not include "doublest.h".
1649         * aarch64-tdep.c: Likewise.
1650         * alpha-tdep.c: Likewise.
1651         * arm-linux-tdep.c: Likewise.
1652         * m68k-linux-tdep.c: Likewise.
1653         * tilegx-tdep.c: Likewise.
1654         * xstormy16-tdep.c: Likewise.
1655
1656 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1657
1658         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1659         (mipsn32_fbsd_sigframe): Define.
1660         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1661         for FreeBSD/mipsn32.
1662
1663 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
1664
1665         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1666         AT_HWCAP.
1667
1668 2017-10-05  Tristan Gingold  <tgingold@free.fr>
1669
1670         * MAINTAINERS (Misc): Update my email address.
1671
1672 2017-10-04  Pedro Alves  <palves@redhat.com>
1673
1674         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
1675         it instead of target_gdbarch.
1676         (get_remote_state, get_remote_packet_size): Adjust
1677         get_remote_arch_state calls, passing down target_gdbarch
1678         explicitly.
1679         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1680         'gdbarch' and use it instead of target_gdbarch.
1681         (get_memory_packet_size): Adjust get_remote_arch_state calls,
1682         passing down target_gdbarch explicitly.
1683         (struct stop_reply) <arch>: New field.
1684         (remote_parse_stop_reply): Use the stopped thread's architecture,
1685         not the current inferior's.  Save the architecture in the
1686         stop_reply.
1687         (process_stop_reply): Use the stop reply's architecture.
1688         (process_g_packet, remote_fetch_registers)
1689         (remote_prepare_to_store, store_registers_using_G)
1690         (remote_store_registers): Adjust get_remote_arch_state calls,
1691         using the regcache's architecture.
1692         (remote_get_trace_status): Adjust get_remote_arch_state calls,
1693         passing down target_gdbarch explicitly.
1694         * spu-multiarch.c (spu_thread_architecture): Defer to the target
1695         beneath instead of calling target_gdbarch.
1696         * target.c (default_thread_architecture): Use the specified
1697         inferior's architecture, instead of the current inferior's
1698         architecture (via target_gdbarch).
1699
1700 2017-10-04  Pedro Alves  <palves@redhat.com>
1701
1702         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1703         case.
1704         (regcache_print): Handle !target_has_registers here instead.
1705
1706 2017-10-04  Pedro Alves  <palves@redhat.com>
1707
1708         * frame.c (create_test_frame): Delete.
1709         * frame.h (create_test_frame): Delete.
1710         * gdbarch-selftests.c: Include gdbthread.h and target.h.
1711         (class regcache_test): Delete.
1712         (test_target_has_registers, test_target_has_stack)
1713         (test_target_has_memory, test_target_prepare_to_store)
1714         (test_target_store_registers): New functions.
1715         (test_target_ops): New class.
1716         (register_to_value_test): Error out if there's already a
1717         process_stratum (or higher) target pushed.  Create a fuller mock
1718         environment, with mock target_ops, inferior, address space, thread
1719         and inferior_ptid.
1720         * progspace.c (struct address_space): Move to ...
1721         * progspace.h (struct address_space): ... here.
1722         * regcache.h (regcache::~regcache, regcache::raw_write)
1723         [GDB_SELF_TEST]: No longer virtual.
1724
1725 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1726
1727         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1728
1729 2017-10-04  Pedro Alves  <palves@redhat.com>
1730
1731         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1732         out of 'between TRY and CATCH'.
1733
1734 2017-10-04  Pedro Alves  <palves@redhat.com>
1735
1736         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1737         * common/common-exceptions.h (TRY): Open an outermost scope.
1738         Expand intro comment.
1739         (CATCH): Reindent.
1740         (END_CATCH): Close the outermost scope.
1741         * completer.c (complete_line_internal): Add missing END_CATCH.
1742
1743 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1744
1745         * NEWS (Changes since GDB 8.0): Add entry about new
1746         'set-cwd-on-gdbserver' feature.
1747         (New remote packets): Add entry for QSetWorkingDir.
1748         * common/common-inferior.h (set_inferior_cwd): New prototype.
1749         * infcmd.c (set_inferior_cwd): Remove "static".
1750         (show_cwd_command): Expand text to include remote debugging.
1751         * remote.c: Add PACKET_QSetWorkingDir.
1752         (remote_protocol_features) <QSetWorkingDir>: New entry for
1753         PACKET_QSetWorkingDir.
1754         (extended_remote_set_inferior_cwd): New function.
1755         (extended_remote_create_inferior): Call
1756         "extended_remote_set_inferior_cwd".
1757         (_initialize_remote): Call "add_packet_config_cmd" for
1758         QSetWorkingDir.
1759
1760 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1761
1762         * NEWS (New commands): Mention "set/show cwd".
1763         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1764         "cd" command's help text.
1765         * common/common-inferior.h (get_inferior_cwd): New prototype.
1766         * infcmd.c (inferior_cwd_scratch): New global variable.
1767         (set_inferior_cwd): New function.
1768         (get_inferior_cwd): Likewise.
1769         (set_cwd_command): Likewise.
1770         (show_cwd_command): Likewise.
1771         (_initialize_infcmd): Add "set/show cwd" commands.
1772         * inferior.h (class inferior) <cwd>: New field.
1773         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1774         (fork_inferior): Change inferior's cwd before its execution.
1775         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1776         to CreateProcess.
1777
1778 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1779
1780         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1781         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1782         (COMMON_OBS): Add gdb_tilde_expand.o.
1783         * common/gdb_tilde_expand.c: New file.
1784         * common/gdb_tilde_expand.h: Likewise.
1785
1786 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
1787
1788         * gdbarch.sh (objfile): Remove duplicate declaration.
1789         * gdbarch.h: Regenerate.
1790
1791 2017-10-03  Tom Tromey  <tom@tromey.com>
1792
1793         * utils.c (internal_vproblem): Use string_vprintf.
1794
1795 2017-10-03  Tom Tromey  <tom@tromey.com>
1796
1797         * printcmd.c (info_symbol_command): Use std::string.
1798
1799 2017-10-03  Tom Tromey  <tom@tromey.com>
1800
1801         * top.c (gdb_safe_append_history): Use std::string.
1802
1803 2017-10-03  Tom Tromey  <tom@tromey.com>
1804
1805         * event-top.c (stdin_event_handler): Update.
1806         * main.c (captured_main_1): Update.
1807         * top.h (make_delete_ui_cleanup): Remove.
1808         (struct ui): Add constructor and destructor.
1809         (new_ui, delete_ui): Remove.
1810         * top.c (make_delete_ui_cleanup): Remove.
1811         (new_ui_command): Use std::unique_ptr.
1812         (delete_ui_cleanup): Remove.
1813         (ui::ui): Rename from new_ui.  Update.
1814         (free_ui): Remove.
1815         (ui::~ui): Rename from delete_ui.  Update.
1816
1817 2017-10-03  Tom Tromey  <tom@tromey.com>
1818
1819         * symfile.c (load_progress): Use gdb::byte_vector.
1820
1821 2017-10-03  Tom Tromey  <tom@tromey.com>
1822
1823         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1824         declaration.
1825         * printcmd.c (x_command): Remove unused declaration.
1826         * symfile.c (symbol_file_command): Remove unused declaration.
1827
1828 2017-10-03  Tom Tromey  <tom@tromey.com>
1829
1830         * utils.c (internal_vproblem): Use std::string.
1831         (defaulted_query): Likewise.
1832
1833 2017-10-03  Tom Tromey  <tom@tromey.com>
1834
1835         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1836         * top.c (execute_command_to_string): Update.
1837         * utils.c (make_cleanup_restore_page_info): Remove.
1838         (do_restore_page_info_cleanup): Remove.
1839         (set_batch_flag_and_restore_page_info):
1840         New.
1841         (make_cleanup_restore_page_info): Remove.
1842         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1843         (~set_batch_flag_and_restore_page_info): New
1844         (make_cleanup_restore_uinteger): Remove.
1845         (make_cleanup_restore_integer): Remove.
1846         (struct restore_integer_closure): Remove.
1847         (restore_integer): Remove.
1848         * utils.h (struct set_batch_flag_and_restore_page_info): New
1849         class.
1850         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1851         (make_cleanup_restore_page_info): Remove.
1852         (make_cleanup_restore_uinteger) Remove.
1853         (make_cleanup_restore_integer) Remove.
1854
1855 2017-10-03  Tom Tromey  <tom@tromey.com>
1856
1857         * record-full.h (record_full_gdb_operation_disable_set): Return
1858         scoped_restore_tmpl<int>.
1859         * infrun.c (adjust_pc_after_break): Update.
1860         (handle_signal_stop): Update.
1861         * record-full.c (record_full_gdb_operation_disable_set): Return
1862         scoped_restore_tmpl<int>.
1863         (record_full_wait_1, record_full_insert_breakpoint)
1864         (record_full_remove_breakpoint, record_full_save)
1865         (record_full_goto_insn): Update.
1866
1867 2017-10-02  Tom Tromey  <tom@tromey.com>
1868
1869         PR rust/22236:
1870         * rust-lang.c (rust_val_print_str): New function.
1871         (val_print_struct): Call it.
1872         (rust_subscript): Preserve name of slice type.
1873
1874 2017-10-02  Tom Tromey  <tom@tromey.com>
1875
1876         * rust-lang.c (rust_subscript): Handle slices in
1877         EVAL_AVOID_SIDE_EFFECTS case.
1878
1879 2017-10-02  Tom Tromey  <tom@tromey.com>
1880
1881         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1882
1883 2017-10-02  Tom Tromey  <tom@tromey.com>
1884
1885         * rust-lang.h (rust_slice_type): Add "extern".
1886
1887 2017-10-02  Tom Tromey  <tom@tromey.com>
1888             Pedro Alves  <palves@redhat.com>
1889
1890         * ada-lang.h (ada_exc_info::operator<): Make const.
1891         (ada_exc_info::operator==): Make const.
1892         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1893         Make const.
1894
1895 2017-09-29  Tom Tromey  <tom@tromey.com>
1896
1897         * target.c (read_whatever_is_readable): Change type of "result".
1898         Update.
1899         (free_memory_read_result_vector): Remove.
1900         (read_memory_robust): Change return type.  Update.
1901         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1902         bin2hex, std::string.
1903         * target.h (memory_read_result_s): Remove typedef.
1904         (free_memory_read_result_vector): Remove.
1905         (read_memory_robust): Return std::vector.
1906
1907 2017-09-29  Tom Tromey  <tom@tromey.com>
1908
1909         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1910
1911 2017-09-29  Tom Tromey  <tom@tromey.com>
1912
1913         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1914         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1915         operator< and operator==.
1916         (ada_exceptions_list): Return a std::vector.
1917         * ada-lang.c (ada_exc_info::operator<): Rename from
1918         compare_ada_exception_info.
1919         (ada_exc_info::operator==): New.
1920         (sort_remove_dups_ada_exceptions_list): Change type of
1921         "exceptions".
1922         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1923         (ada_add_global_exceptions): Likewise.
1924         (ada_exceptions_list_1): Return a std::vector.
1925         (ada_exceptions_list): Likewise.
1926
1927 2017-09-29  Tom Tromey  <tom@tromey.com>
1928
1929         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1930         'std::set *'.
1931         (print_one_inferior): Update.
1932         (free_vector_of_ints): Remove.
1933         (list_available_thread_groups): Change "ids" to std::set.
1934         (mi_cmd_list_thread_groups): Update.
1935         (struct collect_cores_data) <core>: Now a std::set.
1936         (collect_cores): Update.
1937         (unique): Remove.
1938         (print_one_inferior): Update.
1939
1940 2017-09-29  Tom Tromey  <tom@tromey.com>
1941
1942         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1943         (mi_execute_async_cli_command): Likewise.
1944         (mi_cmd_trace_frame_collected): Use field_fmt.
1945
1946 2017-09-29  Tom Tromey  <tom@tromey.com>
1947
1948         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1949         gdb::byte_vector.
1950
1951 2017-09-29  Tom Tromey  <tom@tromey.com>
1952
1953         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1954
1955 2017-09-29  Tom Tromey  <tom@tromey.com>
1956
1957         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1958
1959 2017-09-29  Tom Tromey  <tom@tromey.com>
1960
1961         * varobj.h (varobj_gen_name): Return std::string.
1962         * varobj.c (varobj_gen_name): Return std::string.
1963         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1964         (mi_cmd_var_delete): Don't copy "name".
1965
1966 2017-09-29  Tom Tromey  <tom@tromey.com>
1967
1968         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1969         (mi_cmd_break_insert_1): Update.
1970
1971 2017-09-29  Tom Tromey  <tom@tromey.com>
1972
1973         * target.h (make_scoped_defer_target_commit_resume): Update.
1974         * target.c (make_scoped_defer_target_commit_resume): Rename from
1975         make_cleanup_defer_target_commit_resume.  Return a
1976         scoped_restore.
1977         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1978
1979 2017-09-29  Tom Tromey  <tom@tromey.com>
1980
1981         * main.c (captured_main_1): Remove unused declaration.
1982         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1983
1984 2017-09-29  Tom Tromey  <tom@tromey.com>
1985
1986         * symtab.c (search_symbols): Remove unused outer cleanup.
1987         (make_source_files_completion_list): Remove unused declaration.
1988
1989 2017-09-29  Tom Tromey  <tom@tromey.com>
1990
1991         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1992
1993 2017-09-29  Tom Tromey  <tom@tromey.com>
1994
1995         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1996         gdb::byte_vector.
1997
1998 2017-09-29  Tom Tromey  <tom@tromey.com>
1999
2000         * complaints.c (vcomplaint): Use std::string.
2001
2002 2017-09-29  Tom Tromey  <tom@tromey.com>
2003
2004         * tracepoint.c (trace_variable_command): Use std::string.
2005         (encode_actions_1): Remove unused declarations.
2006         (create_tsv_from_upload): Use std::string.
2007
2008 2017-09-29  Tom Tromey  <tom@tromey.com>
2009
2010         * cp-support.c (gdb_demangle): Use std::string.
2011
2012 2017-09-29  Tom Tromey  <tom@tromey.com>
2013
2014         * stack.c (parse_frame_specification): Use std::string
2015         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2016
2017 2017-09-29  Tom Tromey  <tom@tromey.com>
2018
2019         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2020
2021 2017-09-29  Tom Tromey  <tom@tromey.com>
2022
2023         * utils.c (vfprintf_maybe_filtered): Use std::string.
2024         (vfprintf_unfiltered): Likewise.
2025
2026 2017-09-29  Tom Tromey  <tom@tromey.com>
2027
2028         * event-top.c (top_level_prompt): Return std::string.
2029         (display_gdb_prompt): Update.
2030
2031 2017-09-29  Tom Tromey  <tom@tromey.com>
2032
2033         * unittests/common-utils-selftests.c (format): New function.
2034         (string_vprintf_tests): New function.
2035         (_initialize_common_utils_selftests): Register new tests.
2036         * common/common-utils.c (string_vprintf): New function.
2037         * common/common-utils.h (string_vprintf): Declare.
2038
2039 2017-09-29  Pedro Alves  <palves@redhat.com>
2040
2041         * common/rsp-low.c (unpack_varlen_hex): Constify.
2042         * common/rsp-low.h (unpack_varlen_hex): Constify.
2043         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2044         Constify.
2045         * remote.c (remote_set_permissions, read_ptid)
2046         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2047         (remote_static_tracepoint_marker_at)
2048         (remote_static_tracepoint_markers_by_strid)
2049         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2050         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2051         (parse_tracepoint_definition, parse_tsv_definition)
2052         (parse_static_tracepoint_marker_definition): Constify.
2053         * tracepoint.h (parse_static_tracepoint_marker_definition)
2054         (parse_trace_status, parse_tracepoint_status)
2055         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2056
2057 2017-09-29  Pedro Alves  <palves@redhat.com>
2058
2059         * remote.c (target_buf, target_buf_size): Delete.
2060         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2061         Use the connection's packet buffer instead.
2062         All callers adjusted.
2063         (_initialize_remote): Remove references to target_buf and
2064         target_buf_size.
2065
2066 2017-09-28  Pedro Alves  <palves@redhat.com>
2067
2068         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2069         unittests/common-utils-selftests.c.
2070         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2071         (COMMON_OBS): Remove utils-selftests.o.
2072         * utils-selftests.c: Move to ...
2073         * unittests/common-utils-selftests.c: ... here and rename self
2074         test to "string_printf".
2075
2076 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2077
2078         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2079         having NULL cus or tus.
2080
2081 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2082
2083         * arm-tdep.c: (convert_from_extended): Remove.
2084         (convert_to_extended): Likewise.
2085         (arm_extract_return_value): Use convert_typed_floating.
2086         (arm_store_return_value): Likewise.
2087
2088         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2089         * sh-tdep.c: Do not include "floatformat.h".
2090         (sh_littlebyte_bigword_type): New function.
2091         (sh_register_convert_to_virtual): Use convert_typed_floating.
2092         (sh_register_convert_to_raw): Likewise.
2093         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2094         (sh64_littlebyte_bigword_type): New function.
2095         (sh64_extract_return_value): Use convert_typed_floating.
2096         (sh64_register_convert_to_virtual): Likewise.
2097         (sh64_register_convert_to_raw): Likewise.
2098
2099 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2100
2101         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2102         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2103
2104         * gdbtypes.h (union type_specific): Make field floatformat hold
2105         just a single struct floatformat, not an array.
2106         (floatformat_from_type): Move here.
2107         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2108         changed TYPE_FLOATFORMAT definition.
2109         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2110         (recursive_dump_type): Likewise.
2111         (init_float_type): Install correct floatformat for byte order.
2112         (arch_float_type): Likewise.
2113
2114 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2115
2116         * gdbtypes.c (init_type): Change incoming argument from
2117         length-in-bytes to length-in-bits.  Assert length is a
2118         multiple of TARGET_CHAR_BITS.
2119         (arch_type, arch_flags_type): Likewise.
2120         (init_integer_type): Update call to init_type.
2121         (init_character_type): Likewise.
2122         (init_boolean_type): Likewise.
2123         (init_float_type): Likewise.
2124         (init_decfloat_type): Likewise.
2125         (init_complex_type): Likewise.
2126         (init_pointer_type): Likewise.
2127         (objfile_type): Likewise.
2128         (arch_integer_type): Update call to arch_type.
2129         (arch_character_type): Likewise.
2130         (arch_boolean_type): Likewise.
2131         (arch_float_type): Likewise.
2132         (arch_decfloat_type): Likewise.
2133         (arch_complex_type): Likewise.
2134         (arch_pointer_type): Likewise.
2135         (gdbtypes_post_init): Likewise.
2136
2137         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2138         (read_base_type): Likewise.
2139         * mdebugread.c (basic_type): Likewise.
2140         * stabsread.c (dbx_init_float_type): Likewise.
2141         (rs6000_builtin_type): Likewise.
2142         (read_range_type): Likewise.  Also, fix call to init_integer_type
2143         with erroneous length argument.
2144
2145         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2146         * d-lang.c (build_d_types): Likewise.
2147         * f-lang.c (build_fortran_types): Likewise.
2148         * go-lang.c (build_go_types): Likewise.
2149         * opencl-lang.c (build_opencl_types): Likewise.
2150         * jit.c (finalize_symtab): Likewise.
2151         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2152         (build_std_type_info_type): Likewise.
2153         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2154         update call to arch_flags_type.
2155
2156         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2157         arch_type.
2158         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2159         * windows-tdep.c (windows_get_tlb_type): Likewise.
2160
2161         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2162         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2163         * m32c-tdep.c (make_types): Likewise.
2164         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2165         (rl78_psw_type): Update call to arch_flags_type.
2166         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2167         * rx-tdep.c (rx_psw_type): Likewise.
2168         (rx_fpsw_type): Likewise.
2169         * sparc-tdep.c (sparc_psr_type): Likewise.
2170         (sparc_fsr_type): Likewise.
2171         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2172         (sparc64_ccr_type): Likewise.
2173         (sparc64_fsr_type): Likewise.
2174         (sparc64_fprs_type): Likewise.
2175
2176 2017-09-27  Tom Tromey  <tom@tromey.com>
2177
2178         * findcmd.c (find_command): Constify.
2179
2180 2017-09-27  Tom Tromey  <tom@tromey.com>
2181
2182         * ada-tasks.c (task_command_1, task_command): Constify.
2183
2184 2017-09-27  Tom Tromey  <tom@tromey.com>
2185
2186         * symtab.c (maintenance_print_symbol_cache)
2187         (maintenance_flush_symbol_cache)
2188         (maintenance_print_symbol_cache_statistics): Constify.
2189
2190 2017-09-27  Tom Tromey  <tom@tromey.com>
2191
2192         * inferior.c (detach_inferior_command, kill_inferior_command)
2193         (inferior_command): Constify.
2194
2195 2017-09-27  Tom Tromey  <tom@tromey.com>
2196
2197         * regcache.c (regcache_print, maintenance_print_registers)
2198         (maintenance_print_raw_registers)
2199         (maintenance_print_cooked_registers)
2200         (maintenance_print_register_groups)
2201         (maintenance_print_remote_registers): Constify.
2202
2203 2017-09-27  Tom Tromey  <tom@tromey.com>
2204
2205         * printcmd.c (map_display_numbers, undisplay_command)
2206         (enable_disable_display_command, enable_display_command)
2207         (disable_display_command): Constify.
2208
2209 2017-09-27  Tom Tromey  <tom@tromey.com>
2210
2211         * breakpoint.h (delete_command): Don't declare.
2212         * breakpoint.c (delete_command, enable_once_command)
2213         (enable_count_command, enable_delete_command, breakpoint_1)
2214         (maintenance_info_breakpoints, stopin_command, stopat_command)
2215         (delete_command, delete_trace_command, save_breakpoints)
2216         (save_breakpoints_command, save_tracepoints_command): Constify.
2217
2218 2017-09-27  Tom Tromey  <tom@tromey.com>
2219
2220         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2221         (skip_ws, extract_identifier, macro_define_command)
2222         (macro_undef_command, macro_list_command): Constify.
2223
2224 2017-09-27  Tom Tromey  <tom@tromey.com>
2225
2226         * infcmd.c (environment_info, set_environment_command)
2227         (unset_environment_command, path_info, info_proc_cmd_1)
2228         (info_proc_cmd_mappings, info_proc_cmd_stat)
2229         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2230         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2231
2232 2017-09-27  Tom Tromey  <tom@tromey.com>
2233
2234         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2235         Constify.
2236
2237 2017-09-27  Tom Tromey  <tom@tromey.com>
2238
2239         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2240
2241 2017-09-27  Tom Tromey  <tom@tromey.com>
2242
2243         * demangle.c (demangle_command): Constify.
2244
2245 2017-09-27  Tom Tromey  <tom@tromey.com>
2246
2247         * progspace.c (maintenance_info_program_spaces_command):
2248         Constify.
2249
2250 2017-09-27  Tom Tromey  <tom@tromey.com>
2251
2252         * compile/compile.c (check_raw_argument, compile_file_command)
2253         (compile_code_command, compile_print_command): Constify.
2254
2255 2017-09-27  Tom Tromey  <tom@tromey.com>
2256
2257         * reggroups.c (maintenance_print_reggroups): Constify.
2258
2259 2017-09-27  Tom Tromey  <tom@tromey.com>
2260
2261         * dwarf2read.c (save_gdb_index_command): Constify.
2262
2263 2017-09-27  Tom Tromey  <tom@tromey.com>
2264
2265         * stap-probe.c (info_probes_stap_command): Constify.
2266
2267 2017-09-27  Tom Tromey  <tom@tromey.com>
2268
2269         * fork-child.c (unset_exec_wrapper_command): Constify.
2270
2271 2017-09-27  Tom Tromey  <tom@tromey.com>
2272
2273         * btrace.c (get_uint, get_context_size, no_chunk)
2274         (maint_btrace_packet_history_cmd)
2275         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2276         (maint_info_btrace_cmd): Constify.
2277
2278 2017-09-27  Tom Tromey  <tom@tromey.com>
2279
2280         * reverse.c (delete_bookmark_command): Constify.
2281
2282 2017-09-27  Tom Tromey  <tom@tromey.com>
2283
2284         * remote.c (set_memory_packet_size)
2285         (set_memory_write_packet_size, show_memory_write_packet_size)
2286         (set_memory_read_packet_size, show_memory_read_packet_size)
2287         (compare_sections_command, packet_command, remote_put_command)
2288         (remote_get_command, remote_delete_command): Constify.
2289
2290 2017-09-27  Tom Tromey  <tom@tromey.com>
2291
2292         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2293         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2294         (set_mipsfpu_auto_command): Constify.
2295
2296 2017-09-27  Tom Tromey  <tom@tromey.com>
2297
2298         * cli/cli-cmds.h (cd_command): Constify.
2299         * cli/cli-cmds.c (cd_command): Constify.
2300
2301 2017-09-27  Tom Tromey  <tom@tromey.com>
2302
2303         * thread.c (thread_name_command, thread_find_command): Constify.
2304
2305 2017-09-27  Tom Tromey  <tom@tromey.com>
2306
2307         * probe.c (enable_probes_command, disable_probes_command):
2308         Constify.
2309
2310 2017-09-27  Tom Tromey  <tom@tromey.com>
2311
2312         * symfile.c (symbol_file_command): Constify.
2313         * gdbcore.h (deprecated_file_changed_hook): Constify.
2314         * exec.c (deprecated_file_changed_hook, exec_file_command)
2315         (file_command): Constify.
2316         * defs.h (symbol_file_command): Constify.
2317
2318 2017-09-27  Tom Tromey  <tom@tromey.com>
2319
2320         * remote-fileio.c (set_system_call_allowed)
2321         (show_system_call_allowed): Constify.
2322
2323 2017-09-27  Tom Tromey  <tom@tromey.com>
2324
2325         * tracepoint.c (delete_trace_variable_command)
2326         (tfind_end_command, tfind_start_command, tfind_pc_command)
2327         (tfind_tracepoint_command, tfind_line_command)
2328         (tfind_range_command, tfind_outside_command): Constify.
2329
2330 2017-09-27  Tom Tromey  <tom@tromey.com>
2331
2332         * ax-gdb.c (maint_agent_printf_command, agent_command)
2333         (agent_eval_command): Constify.
2334
2335 2017-09-27  Tom Tromey  <tom@tromey.com>
2336
2337         * tracepoint.c (info_scope_command): Constify.
2338         * python/python.c (gdbpy_decode_line): Constify.
2339         * python/py-breakpoint.c (bppy_init): Constify.
2340         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2341         * location.h: (new_linespec_location)
2342         (string_to_event_location_basic, string_to_event_location):
2343         Constify.
2344         * location.c (new_linespec_location)
2345         (string_to_event_location_basic, string_to_event_location):
2346         Constify.
2347         * linespec.h (decode_line_with_current_source)
2348         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2349         * linespec.c (linespec_lex_to_end)
2350         (decode_line_with_current_source)
2351         (decode_line_with_last_displayed): Constify.
2352         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2353         Constify.
2354         * cli/cli-cmds.c (edit_command, list_command): Constify.
2355         * breakpoint.h (until_break_command, watch_command_wrapper)
2356         (awatch_command_wrapper, rwatch_command_wrapper)
2357         (init_ada_exception_breakpoint): Constify.
2358         * breakpoint.c (break_command_1, dprintf_command)
2359         (break_range_command, watch_command_wrapper)
2360         (rwatch_command_wrapper, awatch_command_wrapper)
2361         (until_break_command, init_ada_exception_breakpoint)
2362         (strace_marker_create_sals_from_location, trace_command)
2363         (ftrace_command, strace_command, struct tracepoint): Constify.
2364         * ax-gdb.c (agent_command_1): Constify.
2365         * ada-lang.c (ada_exception_sal): Constify.
2366
2367 2017-09-27  Tom Tromey  <tom@tromey.com>
2368
2369         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2370         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2371         (get_context_size, no_chunk, get_insn_history_modifiers)
2372         (cmd_record_insn_history, get_call_history_modifiers)
2373         (cmd_record_call_history): Constify.
2374
2375 2017-09-27  Tom Tromey  <tom@tromey.com>
2376
2377         * source.c (show_substitute_path_command)
2378         (unset_substitute_path_command, set_substitute_path_command):
2379         Constify.
2380
2381 2017-09-27  Tom Tromey  <tom@tromey.com>
2382
2383         * typeprint.c (maintenance_print_type): Constify.
2384         * maint.c (maintenance_dump_me, maintenance_demangle)
2385         (maintenance_time_display, maintenance_info_sections)
2386         (maintenance_print_statistics, maintenance_deprecate)
2387         (maintenance_undeprecate): Constify.
2388         (maintenance_do_deprecate): Constify.  Use std::string.
2389         (maintenance_selftest): Constify.
2390         * gdbtypes.h (maintenance_print_type): Constify.
2391
2392 2017-09-27  Tom Tromey  <tom@tromey.com>
2393
2394         * hppa-tdep.c (unwind_command): Constify.
2395
2396 2017-09-27  Tom Tromey  <tom@tromey.com>
2397
2398         * target-descriptions.c (unset_tdesc_filename_cmd)
2399         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2400         Constify.
2401
2402 2017-09-27  Tom Tromey  <tom@tromey.com>
2403
2404         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2405
2406 2017-09-27  Tom Tromey  <tom@tromey.com>
2407
2408         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2409
2410 2017-09-27  Tom Tromey  <tom@tromey.com>
2411
2412         * tui/tui-regs.c (tui_reg_command): Constify.
2413
2414 2017-09-27  Tom Tromey  <tom@tromey.com>
2415
2416         * skip.c (skip_file_command, skip_function_command)
2417         (skip_enable_command, skip_disable_command, skip_delete_command):
2418         Constify.
2419
2420 2017-09-27  Tom Tromey  <tom@tromey.com>
2421
2422         * record-btrace.c (cmd_record_btrace_bts_start)
2423         (cmd_record_btrace_pt_start): Constify.
2424
2425 2017-09-27  Tom Tromey  <tom@tromey.com>
2426
2427         * symmisc.c (maintenance_print_symbols)
2428         (maintenance_print_msymbols, maintenance_print_objfiles)
2429         (maintenance_info_symtabs, maintenance_check_symtabs)
2430         (maintenance_expand_symtabs, maintenance_info_line_tables):
2431         Constify.
2432
2433 2017-09-27  Tom Tromey  <tom@tromey.com>
2434
2435         * top.c (new_ui_command): Constify.
2436
2437 2017-09-27  Tom Tromey  <tom@tromey.com>
2438
2439         * symfile.c (add_symbol_file_command)
2440         (remove_symbol_file_command, list_overlays_command)
2441         (map_overlay_command, unmap_overlay_command)
2442         (overlay_auto_command, overlay_manual_command)
2443         (overlay_off_command, overlay_load_command): Constify.
2444
2445 2017-09-27  Tom Tromey  <tom@tromey.com>
2446
2447         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2448         (info_spu_mailbox_command, info_spu_dma_command)
2449         (info_spu_proxydma_command): Constify.
2450
2451 2017-09-27  Tom Tromey  <tom@tromey.com>
2452
2453         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2454
2455 2017-09-27  Tom Tromey  <tom@tromey.com>
2456
2457         * cli/cli-script.c (user_defined_command): Constify.
2458
2459 2017-09-27  Tom Tromey  <tom@tromey.com>
2460
2461         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2462         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2463         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2464         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2465         (dump_binary_value, append_binary_memory, append_binary_value):
2466         Constify.
2467         (struct dump_context) <func>: Constify.
2468         (add_dump_command): Update.
2469
2470 2017-09-27  Tom Tromey  <tom@tromey.com>
2471
2472         * cli/cli-cmds.c (show_version, show_configuration)
2473         (source_command, show_user): Constify.
2474
2475 2017-09-27  Tom Tromey  <tom@tromey.com>
2476
2477         * target.c (maintenance_print_target_stack): Constify.
2478
2479 2017-09-27  Tom Tromey  <tom@tromey.com>
2480
2481         * interps.c (interpreter_exec_cmd): Constify.
2482
2483 2017-09-27  Tom Tromey  <tom@tromey.com>
2484
2485         * record-full.c (cmd_record_full_restore): Constify.
2486
2487 2017-09-27  Tom Tromey  <tom@tromey.com>
2488
2489         * memattr.c (enable_mem_command, disable_mem_command)
2490         (delete_mem_command): Constify.
2491
2492 2017-09-27  Tom Tromey  <tom@tromey.com>
2493
2494         * value.c (show_convenience): Constify.
2495
2496 2017-09-27  Tom Tromey  <tom@tromey.com>
2497
2498         * gdbcore.h (core_file_command): Update.
2499         * corefile.c (core_file_command): Constify.
2500
2501 2017-09-27  Tom Tromey  <tom@tromey.com>
2502
2503         * user-regs.c (maintenance_print_user_registers): Constify.
2504
2505 2017-09-27  Tom Tromey  <tom@tromey.com>
2506
2507         * cp-namespace.c (maintenance_cplus_namespace): Constify.
2508
2509 2017-09-27  Tom Tromey  <tom@tromey.com>
2510
2511         * cp-support.c (first_component_command): Constify.
2512
2513 2017-09-27  Tom Tromey  <tom@tromey.com>
2514
2515         * psymtab.c (maintenance_print_psymbols)
2516         (maintenance_info_psymtabs, maintenance_check_psymtabs):
2517         Constify.
2518
2519 2017-09-27  Tom Tromey  <tom@tromey.com>
2520
2521         * windows-tdep.c (display_tib): Constify.
2522
2523 2017-09-27  Tom Tromey  <tom@tromey.com>
2524
2525         * linux-fork.c (delete_checkpoint_command)
2526         (detach_checkpoint_command): Constify.
2527
2528 2017-09-27  Tom Tromey  <tom@tromey.com>
2529
2530         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2531
2532 2017-09-27  Tom Tromey  <tom@tromey.com>
2533
2534         * arc-tdep.c (dump_arc_instruction_command): Constify.
2535
2536 2017-09-27  Tom Tromey  <tom@tromey.com>
2537
2538         * valprint.c (set_radix, show_radix): Constify.
2539
2540 2017-09-27  Tom Tromey  <tom@tromey.com>
2541
2542         * dtrace-probe.c (info_probes_dtrace_command): Constify.
2543
2544 2017-09-27  Tom Tromey  <tom@tromey.com>
2545
2546         * command.h (not_just_help_class_command): Update.
2547         * cli/cli-decode.h (not_just_help_class_command): Update.
2548         * cli/cli-decode.c (not_just_help_class_command): Constify.
2549
2550 2017-09-27  Tom Tromey  <tom@tromey.com>
2551
2552         * gdb_bfd.c (maintenance_info_bfds): Constify.
2553
2554 2017-09-27  Tom Tromey  <tom@tromey.com>
2555
2556         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2557         overloads.
2558         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
2559         (do_const_cfunc): New function.
2560         (cmd_cfunc_eq): New overload.
2561         (cli_user_command_p): Check do_const_cfunc.
2562         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2563         const_cfunc.
2564         * command.h (add_cmd): Add const overload and no-function
2565         overload.
2566         (set_cmd_cfunc): Add const overload.
2567         (cmd_const_cfunc_ftype): Declare.
2568         (cmd_cfunc_eq): Add const overload.
2569         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2570         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2571         overload.
2572
2573 2017-09-27  Tom Tromey  <tom@tromey.com>
2574
2575         * macroexp.c (get_next_token_for_substitution): New function.
2576         (substitute_args): Call it.  Check for __VA_OPT__.
2577
2578 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2579             Pedro Alves <palves@redhat.com>
2580
2581         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2582         producer_is_icc_lt_14.
2583         (producer_is_icc_lt_14): New function.
2584         (check_producer): Add code for checking version of ICC.
2585         (producer_is_icc): Move to producer.c.
2586         (read_structure_type): Restrict ICC workaround to ICC<14.
2587         * producer.c: Include selftest.h.
2588         (producer_is_icc, producer_parsing_tests, _initialize_producer):
2589         New functions.
2590         * producer.h (producer_is_icc): New declaration.
2591
2592 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2593
2594         * Makefile.in (SFILES): Add producer.c.
2595         (COMMON_OBS): Add producer.o
2596         * amd64-tdep.c (producer.h): Add new include.
2597         * dwarf2read.c (producer.h): Add new include.
2598         * producer.c: New file.
2599         * producer.h: New file.
2600         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2601         producer.c.
2602         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2603         producer.h.
2604
2605 2017-09-26  Matthias Klose  <doko@ubuntu.com>
2606
2607         * configure.ac: Search ncursesw before ncurses.
2608         Check ncursesw/ncurses.h before ncurses/ncurses.h.
2609         * gdb_curses.h: Include <ncursesw/ncurses.h>
2610         * config.in, configure: Regenerate.
2611
2612 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2613
2614         PR gdb/22185
2615         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2616         obsolete.
2617         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2618         Remove i386sol2 support.
2619         * configure.nat <i386sol2>: Remove.
2620         <sol2-64>: Fold into ...
2621         <sol2>: ... this.
2622         Move common settings to default section.
2623         Add sol-thread.o.
2624         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2625         x86_64-*-solaris2.1[0-9]*>: Rename to ...
2626         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2627         <i[34567]86-*-solaris*>: Remove.
2628         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2629
2630         * configure.ac: Remove wctype in libw check.
2631         (_MSE_INT_H): Don't define on Solaris 7-9.
2632         <solaris*>: Remove libthread_db.so.1 check.
2633         * configure: Regenerate.
2634         * config.in: Regenerate.
2635
2636         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2637         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2638         (gdb_ps_size_t): Remove.
2639         Use base types in users.
2640         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2641
2642         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2643
2644 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2645
2646         PR build/22206
2647         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2648         (adi_is_addr_mapped): Likewise.
2649         (PSR_ICC): Don't redefine.
2650         (PSR_IMPL): Likewise.
2651
2652 2017-09-25  Tom Tromey  <tom@tromey.com>
2653
2654         * regcache.c (regcache::dump): Use string_printf.
2655
2656 2017-09-25  Tom Tromey  <tom@tromey.com>
2657
2658         * regcache.c (class regcache_invalidator): New.
2659         (struct register_to_invalidate): Remove.
2660         (make_cleanup_regcache_invalidate): Remove.
2661         (regcache::raw_write): Use regcache_invalidator.
2662
2663 2017-09-25  Tom Tromey  <tom@tromey.com>
2664
2665         * spu-tdep.c (spu2ppu_sniffer): Update.
2666         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2667         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2668         Remove.
2669         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2670         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2671         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2672         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2673         (frame_pop): Update.
2674
2675 2017-09-25  Tom Tromey  <tom@tromey.com>
2676
2677         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2678         * regcache.h (regcache_xfree): Don't declare.
2679         * regcache.c (regcache_xfree): Remove.
2680         (do_regcache_xfree): Use delete.
2681         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2682         * linux-fork.c (free_fork): Use delete.
2683         (fork_save_infrun_state): Likewise.
2684         * jit.c (jit_dealloc_cache): Use delete.
2685         * infrun.c (discard_infcall_suspend_state): Use delete.
2686
2687 2017-09-25  Tom Tromey  <tom@tromey.com>
2688
2689         * regcache.h (regcache_xmalloc): Don't declare.
2690         (regcache_raw_set_cached_value): Update comment.
2691         * regcache.c (regcache_xmalloc): Remove.
2692         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2693         * jit.c (jit_frame_sniffer): Use new.
2694         * frame.c (frame_save_as_regcache): Use new.
2695
2696 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2697
2698         * NEWS: Advertise support for guarded-storage registers on IBM z.
2699
2700 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2701
2702         * s390-linux-nat.c (have_regset_gs): New static variable.
2703         (s390_linux_fetch_inferior_registers): Handle guarded-storage
2704         control block and guarded-storage broadcast control regsets.
2705         (s390_read_description): Detect whether the target has
2706         guarded-storage support, return appropriate tdesc.
2707         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2708         (features/s390x-gs-linux64.c): Likewise.
2709         (struct gdbarch_tdep) <have_gs>: New field.
2710         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2711         (s390_gsbc_regset): New variables.
2712         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2713         and s390_gsbc_regset, if applicable.
2714         (s390_core_read_description): Check whether core file was from a
2715         target with guarded-storage support; include appropriate regsets.
2716         (s390_gdbarch_init): Add registers for guarded-storage support.
2717         (_initialize_s390_tdep): Initialize new target descriptions that
2718         include registers for guarded-storage support.
2719         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2720         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2721         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2722         (S390_NUM_REGS): Adjust macro definition.
2723         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2724         (tdesc_s390x_gs_linux64): New declarations.
2725
2726 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2727
2728         * features/s390-gs-linux64.xml: New file.
2729         * features/s390-gs.xml: New file.
2730         * features/s390-gsbc.xml: New file.
2731         * features/s390x-gs-linux64.xml: New file.
2732         * features/Makefile (WHICH): Add s390-gs-linux64 and
2733         s390x-gs-linux64.
2734         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2735         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2736         * features/s390-gs-linux64.c: New generated file.
2737         * features/s390x-gs-linux64.c: New file.
2738         * regformats/s390-gs-linux64.dat: New file.
2739         * regformats/s390x-gs-linux64.dat: New file.
2740
2741 2017-09-23  Tom Tromey  <tom@tromey.com>
2742
2743         * defs.h (make_cleanup_override_quit_handler): Don't declare.
2744
2745 2017-09-22  Tom Tromey  <tom@tromey.com>
2746
2747         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2748         type to scoped_restore_tmpl.
2749         <scoped_input_handler>: Initialize m_quit_handler directly.
2750
2751 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2752
2753         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2754         (cd_command): Likewise.  Free "current_directory" before
2755         assigning to it.
2756         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2757         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2758         * top.c (gdb_dirbuf): Remove global declaration.
2759         * top.h (gdb_dirbuf): Likewise.
2760
2761 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2762
2763         * gnulib/aclocal.m4: Regenerate.
2764         * gnulib/config.in: Regenerate.
2765         * gnulib/configure: Regenerate.
2766         * gnulib/import/Makefile.am: Regenerate.
2767         * gnulib/import/Makefile.in: Regenerate.
2768         * gnulib/import/assure.h: New file.
2769         * gnulib/import/at-func.c: Likewise
2770         * gnulib/import/chdir-long.c: New file.
2771         * gnulib/import/chdir-long.h: New file.
2772         * gnulib/import/cloexec.c: New file.
2773         * gnulib/import/cloexec.h: New file.
2774         * gnulib/import/close.c: New file.
2775         * gnulib/import/closedir.c: New file.
2776         * gnulib/import/dirent-private.h: New file.
2777         * gnulib/import/dup-safer.c: New file.
2778         * gnulib/import/dup.c: New file.
2779         * gnulib/import/dup2.c: New file.
2780         * gnulib/import/error.c: New file.
2781         * gnulib/import/error.h: New file.
2782         * gnulib/import/exitfail.c: New file.
2783         * gnulib/import/exitfail.h: New file.
2784         * gnulib/import/fchdir.c: New file.
2785         * gnulib/import/fcntl.c: New file.
2786         * gnulib/import/fcntl.in.h: New file.
2787         * gnulib/import/fd-hook.c: New file.
2788         * gnulib/import/fd-hook.h: New file.
2789         * gnulib/import/fd-safer.c: New file.
2790         * gnulib/import/fdopendir.c: New file.
2791         * gnulib/import/filename.h: New file.
2792         * gnulib/import/filenamecat-lgpl.c: New file.
2793         * gnulib/import/filenamecat.h: New file.
2794         * gnulib/import/fstat.c: New file.
2795         * gnulib/import/fstatat.c: New file.
2796         * gnulib/import/getcwd-lgpl.c: New file.
2797         * gnulib/import/getcwd.c: New file.
2798         * gnulib/import/getdtablesize.c: New file.
2799         * gnulib/import/getlogin_r.c: New file.
2800         * gnulib/import/getprogname.c: New file.
2801         * gnulib/import/getprogname.h: New file.
2802         * gnulib/import/gettext.h: New file.
2803         * gnulib/import/glob-libc.h: New file.
2804         * gnulib/import/glob.c: New file.
2805         * gnulib/import/glob.in.h: New file.
2806         * gnulib/import/intprops.h: New file.
2807         * gnulib/import/m4/chdir-long.m4: New file.
2808         * gnulib/import/m4/close.m4: New file.
2809         * gnulib/import/m4/closedir.m4: New file.
2810         * gnulib/import/m4/d-ino.m4: New file.
2811         * gnulib/import/m4/d-type.m4: New file.
2812         * gnulib/import/m4/dup.m4: New file.
2813         * gnulib/import/m4/dup2.m4: New file.
2814         * gnulib/import/m4/error.m4: New file.
2815         * gnulib/import/m4/fchdir.m4: New file.
2816         * gnulib/import/m4/fcntl.m4: New file.
2817         * gnulib/import/m4/fcntl_h.m4: New file.
2818         * gnulib/import/m4/fdopendir.m4: New file.
2819         * gnulib/import/m4/filenamecat.m4: New file.
2820         * gnulib/import/m4/fstat.m4: New file.
2821         * gnulib/import/m4/fstatat.m4: New file.
2822         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2823         * gnulib/import/m4/getcwd-path-max.m4: New file.
2824         * gnulib/import/m4/getcwd.m4: New file.
2825         * gnulib/import/m4/getdtablesize.m4: New file.
2826         * gnulib/import/m4/getlogin_r.m4: New file.
2827         * gnulib/import/m4/getprogname.m4: New file.
2828         * gnulib/import/m4/glob.m4: New file.
2829         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2830         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2831         * gnulib/import/m4/mempcpy.m4: New file.
2832         * gnulib/import/m4/memrchr.m4: New file.
2833         * gnulib/import/m4/mode_t.m4: New file.
2834         * gnulib/import/m4/msvc-inval.m4: New file.
2835         * gnulib/import/m4/msvc-nothrow.m4: New file.
2836         * gnulib/import/m4/open.m4: New file.
2837         * gnulib/import/m4/openat.m4: New file.
2838         * gnulib/import/m4/opendir.m4: New file.
2839         * gnulib/import/m4/readdir.m4: New file.
2840         * gnulib/import/m4/realloc.m4: New file.
2841         * gnulib/import/m4/rewinddir.m4: New file.
2842         * gnulib/import/m4/save-cwd.m4: New file.
2843         * gnulib/import/m4/strdup.m4: New file.
2844         * gnulib/import/m4/strerror.m4: New file.
2845         * gnulib/import/m4/unistd-safer.m4: New file.
2846         * gnulib/import/mempcpy.c: New file.
2847         * gnulib/import/memrchr.c: New file.
2848         * gnulib/import/msvc-inval.c: New file.
2849         * gnulib/import/msvc-inval.h: New file.
2850         * gnulib/import/msvc-nothrow.c: New file.
2851         * gnulib/import/msvc-nothrow.h: New file.
2852         * gnulib/import/open.c: New file.
2853         * gnulib/import/openat-die.c: New file.
2854         * gnulib/import/openat-priv.h: New file.
2855         * gnulib/import/openat-proc.c: New file.
2856         * gnulib/import/openat.c: New file.
2857         * gnulib/import/openat.h: New file.
2858         * gnulib/import/opendir.c: New file.
2859         * gnulib/import/pipe-safer.c: New file.
2860         * gnulib/import/readdir.c: New file.
2861         * gnulib/import/realloc.c: New file.
2862         * gnulib/import/rewinddir.c: New file.
2863         * gnulib/import/save-cwd.c: New file.
2864         * gnulib/import/save-cwd.h: New file.
2865         * gnulib/import/strdup.c: New file.
2866         * gnulib/import/strerror-override.c: New file.
2867         * gnulib/import/strerror-override.h: New file.
2868         * gnulib/import/strerror.c: New file.
2869         * gnulib/import/unistd--.h: New file.
2870         * gnulib/import/unistd-safer.h: New file.
2871         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2872         "getcwd" and "glob".
2873         * ser-tcp.c: Undefine "close" before redefining it.
2874
2875 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2876
2877         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2878         get rid of res_val.
2879
2880 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2881
2882         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2883         <sol2,sparc>: Likewise.
2884         <sol2-64,i386>: Likewise.
2885
2886         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2887         -Wdeprecated-declarations on *-*-solaris*.
2888         * configure: Regenerate.
2889
2890         * procfs.c: Include "nat/inferior.h".
2891         (procfs_info_proc): Fix typo.
2892
2893 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2894
2895         * remote.c (vector): Include.
2896         (struct private_thread_info): Add field, thread_handle.
2897         (free_private_thread_info): Deallocate storage associated with
2898         thread handle.
2899         (get_private_info_thread): Initialize `thread_handle' field.
2900         (struct thread_item): Add field, thread_handle.
2901         (clear_threads_listing_context): Deallocate storage associated
2902         with thread handle.
2903         (start_thread): Add support for "handle" attribute.
2904         (thread_attributes): Add "handle".
2905         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2906         field.
2907         (remote_update_thread_list): Update thread_handle.
2908         (remote_thread_handle_to_thread_info): New function.
2909         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2910
2911 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2912
2913         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2914         function.
2915         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2916         * python/python-internal.h (thread_object_type): Declare.
2917
2918 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2919
2920         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2921         (target_thread_handle_to_thread_info): Declare.
2922         * target.c (target_thread_handle_to_thread_info): New function.
2923         * target-delegates.c: Regenerate.
2924         * gdbthread.h (find_thread_by_handle): Declare.
2925         * thread.c (find_thread_by_handle): New function.
2926         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2927         function.
2928         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2929
2930 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2931
2932         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2933
2934 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2935
2936         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2937
2938 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2939
2940         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2941         to gdb_target_obs.
2942
2943 2017-09-20  Tom Tromey  <tom@tromey.com>
2944
2945         * breakpoint.c (struct counted_command_line): Remove.
2946         (breakpoint_commands): Update.
2947         (alloc_counted_command_line, incref_counted_command_line)
2948         (decref_counted_command_line, do_cleanup_counted_command_line)
2949         (make_cleanup_decref_counted_command_line): Remove.
2950         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2951         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2952         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2953         (save_breakpoints): Update.
2954         * breakpoint.h (counted_command_line): Now a typedef to
2955         shared_ptr.
2956         (struct breakpoint) <commands>: Now a counted_command_line.
2957         (struct bpstats) <command>: Likewise.
2958
2959 2017-09-20  Tom Tromey  <tom@tromey.com>
2960
2961         * breakpoint.c (struct commands_info, do_map_commands_command):
2962         Remove.
2963         (commands_command_1): Update.
2964         (iterate_over_related_breakpoints): Take a function_view.
2965         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2966         (delete_command): Update.
2967         (map_breakpoint_numbers): Take a function_view.
2968         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2969         (disable_command): Update.
2970         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2971         (enable_command): Update.
2972         (struct disp_data, do_enable_breakpoint_disp)
2973         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2974         (do_map_enable_delete_breakpoint): Remove.
2975         (enable_once_command, enable_count_command, enable_delete_command)
2976         (delete_trace_variable_command): Update.
2977
2978 2017-09-20  Tom Tromey  <tom@tromey.com>
2979
2980         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2981         (bpstat_clear): Use delete.
2982         (bpstats): New constructors.
2983         (bpstat_copy, bpstat_stop_status): Use new.
2984         (dprintf_after_condition_true): Update.
2985         * breakpoint.h (bpstats::bpstats): Add constructors.
2986         (bpstats::~bpstats): Add destructor.
2987
2988 2017-09-20  Pedro Alves  <palves@redhat.com>
2989
2990         * eval.c (make_params): Delete, refactored as ...
2991         (class fake_method): ... this new type's ctor.
2992         (fake_method::~fake_method): New.
2993         (evaluate_subexp_standard): Use 'fake_method'.
2994
2995 2017-09-20  Tom Tromey  <tom@tromey.com>
2996
2997         * windows-nat.c (get_windows_debug_event, windows_wait)
2998         (do_initial_windows_stuff, windows_attach): Update.
2999         * utils.c (vwarning, internal_vproblem): Update.
3000         (ui_unregister_input_event_handler_cleanup)
3001         (prepare_to_handle_input): Remove.
3002         (class scoped_input_handler): New.
3003         (defaulted_query, prompt_for_continue): Update.
3004         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3005         Update.
3006         * top.c (undo_terminal_modifications_before_exit): Update.
3007         * target/target.h (target_terminal_init, target_terminal_inferior)
3008         (target_terminal_ours): Don't declare.
3009         (class target_terminal): New.
3010         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3011         (target_terminal_ours_for_output)
3012         (make_cleanup_restore_target_terminal): Don't declare.
3013         (target_terminal_info): Remove.
3014         * target.c (enum terminal_state, terminal_state): Remove.
3015         (target_terminal::terminal_state): Define.
3016         (target_terminal::init): Rename from target_terminal_init.
3017         (target_terminal::inferior): Rename from
3018         target_terminal_inferior.
3019         (target_terminal::ours): Rename from target_terminal_ours.
3020         (target_terminal::ours_for_output): Rename from
3021         target_terminal_ours_for_output.
3022         (target_terminal::info): New method.
3023         (cleanup_restore_target_terminal)
3024         (make_cleanup_restore_target_terminal): Remove.
3025         * solib.c (handle_solib_event): Update.
3026         * remote.c (remote_serial_quit_handler): Update.
3027         (remote_terminal_inferior, remote_wait_as): Update.
3028         * record-full.c (record_full_wait_1): Update.
3029         * nto-procfs.c (procfs_create_inferior): Update.
3030         * nat/fork-inferior.c (startup_inferior): Update.
3031         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3032         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3033         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3034         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3035         (mi_breakpoint_created, mi_breakpoint_deleted)
3036         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3037         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3038         (mi_user_selected_context_changed, report_initial_inferior):
3039         Update.
3040         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3041         (linux_nat_terminal_inferior): Update.
3042         * infrun.c (follow_fork_inferior)
3043         (handle_vfork_child_exec_or_exit, do_target_resume)
3044         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3045         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3046         Update.
3047         * inflow.c (child_terminal_init, info_terminal_command): Update.
3048         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3049         (attach_command): Update.
3050         * infcall.c (call_thread_fsm_should_stop): Update.
3051         * gnu-nat.c (gnu_attach): Update.
3052         * extension.c (struct active_ext_lang_state)
3053         (restore_active_ext_lang): Update.
3054         * exceptions.c (print_flush): Update.
3055         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3056         (struct quit_handler_cleanup_data, restore_quit_handler)
3057         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3058         Remove.
3059         * cp-support.c (gdb_demangle): Update.
3060         * breakpoint.c (update_inserted_breakpoint_locations)
3061         (insert_breakpoint_locations, handle_jit_event)
3062         (disable_breakpoints_in_unloaded_shlib): Update.
3063         * annotate.c (annotate_breakpoints_invalid)
3064         (annotate_frames_invalid): Update.
3065
3066 2017-09-20  Tom Tromey  <tom@tromey.com>
3067
3068         * main.c (catch_command_errors): Rename from
3069         catch_command_errors_const.
3070         (captured_main_1): Update.
3071
3072 2017-09-20  Pedro Alves  <palves@redhat.com>
3073
3074         * cli/cli-cmds.c (list_command): Use print_sal_location.
3075         (print_sal_location): New function.
3076         (ambiguous_line_spec): Use print_sal_location.
3077         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3078         * symtab.c (find_function_start_sal): Likewise.
3079         * symtab.h (symtab_and_line::symbol): New field.
3080
3081 2017-09-20  Pedro Alves  <palves@redhat.com>
3082
3083         * linespec.c (minsym_found): Handle non-text minsyms.
3084         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3085
3086 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3087
3088         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3089         backslash.
3090
3091 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3092
3093         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3094         vmovups instead vmovaps.
3095         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3096
3097 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3098
3099         * NEWS (Changes since GDB 8.0): Add starti.
3100         * infcmd.c (enum run_break): New.
3101         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3102         case.
3103         (run_command): Use enum run_how.
3104         (start_command): Likewise.
3105         (starti_command): New function.
3106         (RUN_ARGS_HELP): New macro.
3107         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3108         commands.  Add starti command.
3109
3110 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3111
3112         * Makefile.in (monitor.o): Remove the rule.
3113
3114 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3115
3116         * annotate.h (struct annotate_arg_emitter): Use
3117         DISABLE_COPY_AND_ASSIGN.
3118         * common/refcounted-object.h (refcounted_object): Likewise.
3119         * completer.h (struct completion_result): Likewise.
3120         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3121         * filename-seen-cache.h (filename_seen_cache): Likewise.
3122         * gdbcore.h (thread_section_name): Likewise.
3123         * gdb_regex.h (compiled_regex): Likewise.
3124         * gdbthread.h (scoped_restore_current_thread): Likewise.
3125         * inferior.h (scoped_restore_current_inferior): Likewise.
3126         * jit.c (jit_reader): Likewise.
3127         * linespec.h (struct linespec_result): Likewise.
3128         * mi/mi-parse.h (struct mi_parse): Likewise.
3129         * nat/fork-inferior.c (execv_argv): Likewise.
3130         * progspace.h (scoped_restore_current_program_space): Likewise.
3131         * python/python-internal.h (class gdbpy_enter): Likewise.
3132         * regcache.h (regcache): Likewise.
3133         * target-descriptions.c (struct tdesc_reg): Likewise.
3134         (struct tdesc_type): Likewise.
3135         (struct tdesc_feature): Likewise.
3136         * ui-out.h (ui_out_emit_type): Likewise.
3137
3138 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3139
3140         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3141         label abort_expression.
3142
3143 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3144
3145         * common/buffer.c (buffer_xml_printf): Adjust.
3146         * common/xml-utils.c (xml_escape_text): Change return type to
3147         std::string, update code accordingly.
3148         * common/xml-utils.h (xml_escape_text): Change return type to
3149         std::string.
3150         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3151         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3152         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3153         Adjust.
3154
3155 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3156
3157         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3158         (SUBDIR_UNITTESTS_OBS): Add new object file.
3159         * unittests/xml-utils-selftests.c: New file.
3160
3161 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3162
3163         * common/selftest.h (selftest): New struct/interface.
3164         (register_test): Add name parameter, add new overload.
3165         (run_tests): Add filter parameter.
3166         (for_each_selftest_ftype): New typedef.
3167         (for_each_selftest): New declaration.
3168         * common/selftest.c (tests): Change type to
3169         map<string, unique_ptr<selftest>>.
3170         (simple_selftest): New struct.
3171         (register_test): New function.
3172         (register_test): Add name parameter and use it.
3173         (run_tests): Add filter parameter and use it.  Add prints.
3174         Adjust to vector -> map change.
3175         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3176         registering selftests.
3177         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3178         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3179         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3180         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3181         * findvar.c (_initialize_findvar): Likewise.
3182         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3183         * maint.c (maintenance_selftest): Update call to run_tests.
3184         (maintenance_info_selftests): New function.
3185         (_initialize_maint_cmds): Register "maintenance info selftests"
3186         command.  Update "maintenance selftest" doc.
3187         * regcache.c (_initialize_regcache): Add names when registering
3188         selftests.
3189         * rust-exp.y (_initialize_rust_exp): Likewise.
3190         * selftest-arch.c (gdbarch_selftest): New struct.
3191         (gdbarch_tests): Remove.
3192         (register_test_foreach_arch): Add name parameter.  Call
3193         register_test.
3194         (tests_with_arch): Remove, move most content to
3195         gdbarch_selftest::operator().
3196         (_initialize_selftests_foreach_arch): Remove.
3197         * selftest-arch.h (register_test_foreach_arch): Add name
3198         parameter.
3199         (run_tests_with_arch): New declaration.
3200         * utils-selftests.c (_initialize_utils_selftests): Add names
3201         when registering selftests.
3202         * utils.c (_initialize_utils): Likewise.
3203         * unittests/array-view-selftests.c
3204         (_initialize_array_view_selftests): Likewise.
3205         * unittests/environ-selftests.c (_initialize_environ_selftests):
3206         Likewise.
3207         * unittests/function-view-selftests.c
3208         (_initialize_function_view_selftests): Likewise.
3209         * unittests/offset-type-selftests.c
3210         (_initialize_offset_type_selftests): Likewise.
3211         * unittests/optional-selftests.c
3212         (_initialize_optional_selftests): Likewise.
3213         * unittests/scoped_restore-selftests.c
3214         (_initialize_scoped_restore_selftests): Likewise.
3215         * NEWS: Document "maintenance selftest" and "maint info
3216         selftests".
3217
3218 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3219
3220         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3221         scoped_restore.
3222
3223 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3224
3225         * mi/mi-main.c (mi_load_progress): Make uiout variable
3226         a unique_ptr.
3227
3228 2017-09-15  Pedro Alves  <palves@redhat.com>
3229
3230         * compile/compile-c-types.c (convert_enum, convert_int)
3231         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3232
3233 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3234
3235         * dwarf2read.c (copy_string): Remove.
3236         (parse_macro_definition): Replace copy_string with savestring.
3237
3238 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3239
3240         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3241         gdb_target_obs.
3242         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3243         Likewise.
3244         (i[34567]86-*-linux*): Likewise.
3245
3246 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3247
3248         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3249         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3250         <stack>: Change type to std::vector.
3251         <stack_len, stack_allocated>: Remove.
3252         <grow_stack>: Remove.
3253         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3254         (dwarf_expr_context::~dwarf_expr_context): Remove.
3255         (dwarf_expr_context::grow_stack): Remove.
3256         (dwarf_expr_context::push): Adjust.
3257         (dwarf_expr_context::pop): Adjust.
3258         (dwarf_expr_context::fetch): Adjust.
3259         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3260         (dwarf_expr_context::stack_empty_p): Adjust.
3261         (dwarf_expr_context::execute_stack_op): Adjust.
3262
3263 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3264
3265         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3266         return type to bool.
3267         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3268
3269 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3270
3271         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3272         Change type to bool.
3273         (dwarf_stack_value) <in_stack_memory>: Likewise.
3274         (dwarf_expr_context) <push_address>: Change parameter type to
3275         bool.
3276         <fetch_in_stack_memory>: Change return type to bool.
3277         <push>: Change parameter type to bool.
3278         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3279         to bool.
3280         (dwarf_expr_context::push_address): Likewise.
3281         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3282         to bool.
3283         (dwarf_expr_context::execute_stack_op): Adjust.
3284         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3285
3286 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3287
3288         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3289         (struct dwarf_expr_context) <n_pieces>: Remove.
3290         <pieces>: Change type to std::vector.
3291         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3292         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3293         pieces.
3294         (dwarf_expr_context::add_piece): Adjust.
3295         * dwarf2loc.c (struct piece_closure): Initialize fields.
3296         <n_pieces>: Remove.
3297         <pieces>: Change type to std::vector.
3298         (allocate_piece_closure): Adjust, change parameter to
3299         std::vector rvalue and std::move it to piece_closure.
3300         (rw_pieced_value): Adjust.
3301         (check_pieced_synthetic_pointer): Adjust.
3302         (indirect_synthetic_pointer): Adjust.
3303         (coerce_pieced_ref): Adjust.
3304         (free_pieced_value_closure):  Adjust.  Use delete to free
3305         piece_closure.
3306         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3307         to allocate_piece_closure.
3308         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3309
3310 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3311
3312         * probe.h (probe_ops_cp): Remove typedef.
3313         (DEF_VEC_P (probe_ops_cp)): Remove.
3314         (all_probe_ops): Change type to std::vector.
3315         * probe.c (info_probes_for_ops): Adjust to vector change.
3316         (probe_linespec_to_ops): Likewise.
3317         (all_probe_ops): Change type to std::vector.
3318         (_initialize_probe): Adjust to vector change.
3319         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3320         * elfread.c (elf_get_probes): Likewise.
3321         * stap-probe.c (_initialize_stap_probe): Likewise.
3322
3323 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3324
3325         * probe.h (struct bound_probe): Define constructors.
3326         * probe.c (bound_probe_s): Remove typedef.
3327         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3328         (collect_probes): Change return type to std::vector, remove
3329         cleanup.
3330         (compare_probes): Return bool, change parameter type.  Change
3331         semantic to "less than".
3332         (gen_ui_out_table_header_info): Change parameter to std::vector
3333         and update.
3334         (exists_probe_with_pops): Likewise.
3335         (info_probes_for_ops): Update to std::vector change.
3336         (enable_probes_command): Likewise.
3337         (disable_probes_command): Likewise.
3338
3339 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3340
3341         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3342         vec to std::vector.
3343         * probe.c (parse_probes_in_pspace): Update.
3344         (find_probes_in_objfile): Update.
3345         (find_probe_by_pc): Update.
3346         (collect_probes): Update.
3347         (probe_any_get_probes): Update.
3348         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3349         return type to reference to std::vector.
3350         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3351         std::vector and update.
3352         (dtrace_process_dof): Likewise.
3353         (dtrace_get_probes): Likewise.
3354         * elfread.c (elf_get_probes): Change return type to std::vector,
3355         store an std::vector in bfd_data.
3356         (probe_key_free): Update to std::vector.
3357         * stap-probe.c (handle_stap_probe): Change parameter to
3358         std::vector and update.
3359         (stap_get_probes): Likewise.
3360         * symfile-debug.c (debug_sym_get_probes): Change return type to
3361         std::vector and update.
3362
3363 2017-09-11  Tom Tromey  <tom@tromey.com>
3364
3365         * breakpoint.c (program_breakpoint_here_p): Update.
3366         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3367         from make_show_memory_breakpoints_cleanup.  Return a
3368         scoped_restore_tmpl<int>.
3369         (restore_show_memory_breakpoints): Remove.
3370         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3371         * mem-break.c (memory_validate_breakpoint): Update.
3372         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3373         (ia64_memory_remove_breakpoint): Update.
3374         (ia64_breakpoint_from_pc): Update.
3375         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3376         from make_show_memory_breakpoints_cleanup.
3377
3378 2017-09-11  Tom Tromey  <tom@tromey.com>
3379
3380         * d-namespace.c (d_lookup_symbol): Use std::string.
3381         (find_symbol_in_baseclass): Likewise.
3382
3383 2017-09-11  Tom Tromey  <tom@tromey.com>
3384
3385         * ctf.c (ctf_start): Use std::string.
3386
3387 2017-09-11  Tom Tromey  <tom@tromey.com>
3388
3389         * ada-lang.c (is_known_support_routine): Update.
3390         (ada_unhandled_exception_name_addr_from_raise): Update.
3391         * guile/scm-frame.c (gdbscm_frame_name): Update.
3392         * python/py-frame.c (frapy_name): Update.
3393         (frapy_function): Update.
3394         * stack.h (find_frame_funname): Update.
3395         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3396         (print_frame): Update.
3397
3398 2017-09-11  Tom Tromey  <tom@tromey.com>
3399
3400         * findcmd.c (put_bits): Take a gdb::byte_vector.
3401         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3402         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3403         cleanups.
3404         (find_command): Update.
3405
3406 2017-09-11  Tom Tromey  <tom@tromey.com>
3407
3408         * cli/cli-script.c (class scoped_restore_hook_in): New.
3409         (clear_hook_in_cleanup): Remove.
3410         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3411         scoped_restore_hook_in.
3412
3413 2017-09-11  Tom Tromey  <tom@tromey.com>
3414
3415         * cli/cli-script.c (restore_interp): Remove.
3416         (read_command_lines): Use scoped_restore_interp.
3417         * interps.c (scoped_restore_interp::set_temp): Rename from
3418         interp_set_temp.
3419         * interps.h (class scoped_restore_interp): New.
3420         (interp_set_temp): Remove.
3421
3422 2017-09-11  Tom Tromey  <tom@tromey.com>
3423
3424         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3425         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3426         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3427         scoped_restore.
3428         (mi_cmd_break_insert_1): Update.
3429         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3430         scoped_restore.
3431
3432 2017-09-11  Tom Tromey  <tom@tromey.com>
3433
3434         * demangle.c (demangle_command): Update.
3435         * breakpoint.c (disable_command): Update.
3436         (enable_command): Update.
3437         (find_location_by_number): Make "number" const.  Use
3438         get_number_trailer.
3439         * cli/cli-utils.c (extract_arg): Return std::string.
3440         * probe.c (parse_probe_linespec): Update.  Change types.
3441         (collect_probes): Take string arguments.
3442         (parse_probe_linespec): Likewise.
3443         (info_probes_for_ops): Update.
3444         (enable_probes_command): Update.
3445         (disable_probes_command): Update.
3446         * break-catch-sig.c (catch_signal_split_args): Update.
3447         * mi/mi-parse.c (mi_parse): Update.
3448
3449 2017-09-11  Tom Tromey  <tom@tromey.com>
3450
3451         * language.h (language_enum): Make argument const.
3452         * language.c (language_enum): Make argument const.
3453
3454 2017-09-11  Tom Tromey  <tom@tromey.com>
3455
3456         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3457         as function.
3458         (skip_to_space): Rename from skip_to_space_const.
3459         * common/common-utils.c (skip_to_space): New function.
3460         (skip_to_space): Rename from skip_to_space_const.
3461         * cli/cli-utils.h (get_number): Rename from get_number_const.
3462         (extract_arg): Rename from extract_arg_const.
3463         * cli/cli-utils.c (get_number): Rename from get_number_const.
3464         (extract_arg): Rename from extract_arg_const.
3465         (number_or_range_parser::get_number): Use ::get_number.
3466         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3467         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3468         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3469         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3470         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3471         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3472         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3473         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3474
3475 2017-09-11  Tom Tromey  <tom@tromey.com>
3476
3477         * python/python.c (do_start_initialization): Use
3478         py-event-types.def to initialize types.
3479         Define all object type structures.
3480         * python/python-internal.h: Don't declare event initialization
3481         functions.
3482         * python/py-threadevent.c (thread_event_object_type): Don't
3483         define.
3484         * python/py-stopevent.c (stop_event_object_type): Don't define.
3485         * python/py-signalevent.c (signal_event_object_type): Don't
3486         declare or define.
3487         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3488         (clear_objfiles_event_object_type): Don't declare or define.
3489         * python/py-infevents.c (inferior_call_pre_event_object_type)
3490         (inferior_call_post_event_object_type)
3491         (register_changed_event_object_type)
3492         (memory_changed_event_object_type): Don't declare or define.
3493         * python/py-inferior.c (new_thread_event_object_type)
3494         (new_inferior_event_object_type)
3495         (inferior_deleted_event_object_type): Don't declare or define.
3496         * python/py-exitedevent.c (exited_event_object_type): Don't
3497         declare or define.
3498         * python/py-evts.c (gdbpy_initialize_py_events): Use
3499         py-all-events.def.
3500         * python/py-events.h (thread_event_object_type): Don't declare.
3501         (events_object): Use py-all-events.def.
3502         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
3503         py-event-types.def.
3504         * python/py-event-types.def: New file.
3505         * python/py-continueevent.c (create_continue_event_object): Don't
3506         declare or define.
3507         * python/py-bpevent.c (breakpoint_event_object_type): Don't
3508         declare or define.
3509         * python/py-all-events.def: New file.
3510
3511 2017-09-11  Tom Tromey  <tom@tromey.com>
3512
3513         * python/py-threadevent.c (create_thread_event_object): Return
3514         gdbpy_ref.
3515         * python/py-stopevent.h (create_stop_event_object)
3516         (create_breakpoint_event_object, create_signal_event_object):
3517         Update.
3518         * python/py-stopevent.c (create_stop_event_object): Return
3519         gdbpy_ref.
3520         (emit_stop_event): Update.
3521         * python/py-signalevent.c (create_signal_event_object): Return
3522         gdbpy_ref.
3523         * python/py-infevents.c (create_inferior_call_event_object):
3524         Update.
3525         * python/py-event.h (create_event_object)
3526         (create_thread_event_object): Update.
3527         * python/py-event.c (create_event_object): Return gdbpy_ref.
3528         * python/py-continueevent.c: Return gdbpy_ref.
3529         * python/py-bpevent.c (create_breakpoint_event_object): Return
3530         gdbpy_ref.
3531
3532 2017-09-11  Tom Tromey  <tom@tromey.com>
3533
3534         PR python/15622:
3535         * NEWS: Add entry.
3536         * python/python.c (do_start_initialization): Initialize new event
3537         types.
3538         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3539         (gdbpy_initialize_inferior_deleted_event)
3540         (gdbpy_initialize_new_thread_event): Declare.
3541         * python/py-threadevent.c (create_thread_event_object): Add option
3542         "thread" parameter.
3543         * python/py-inferior.c (new_thread_event_object_type)
3544         (new_inferior_event_object_type)
3545         (inferior_deleted_event_object_type): Declare.
3546         (python_new_inferior, python_inferior_deleted): New functions.
3547         (add_thread_object): Emit new_thread event.
3548         (gdbpy_initialize_inferior): Attach new functions to corresponding
3549         observers.
3550         (new_thread, new_inferior, inferior_deleted): Define new event
3551         types.
3552         * python/py-evts.c (gdbpy_initialize_py_events): Add new
3553         registries.
3554         * python/py-events.h (events_object) <new_inferior,
3555         inferior_deleted, new_thread>: New fields.
3556         * python/py-event.h (create_thread_event_breakpoint): Add optional
3557         "thread" parameter.
3558
3559 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3560
3561         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3562         check current_ui instead.
3563         (internal_vproblem): Likewise.
3564
3565 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3566
3567         * thread.c (print_thread_info_1): Remove unnecessary calls to
3568         uiout->is_mi_like_p.
3569
3570 2017-09-09  Tom Tromey  <tom@tromey.com>
3571
3572         * namespace.h (add_using_directive): Update.
3573         * namespace.c (add_using_directive): Change type of excludes to
3574         std::vector.
3575         * dwarf2read.c (read_import_statement): Use std::vector.
3576         (read_namespace): Update.
3577         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3578
3579 2017-09-09  Tom Tromey  <tom@tromey.com>
3580
3581         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3582
3583 2017-09-09  Tom Tromey  <tom@tromey.com>
3584
3585         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3586
3587 2017-09-09  Tom Tromey  <tom@tromey.com>
3588
3589         * stack.c (func_command): Use gdb::def_vector.
3590
3591 2017-09-09  Tom Tromey  <tom@tromey.com>
3592
3593         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3594         ui_out_emit_list, ui_out_emit_tuple.
3595         (mi_cmd_var_update): Likewise.
3596
3597 2017-09-09  Tom Tromey  <tom@tromey.com>
3598
3599         * mi/mi-interp.c (mi_user_selected_context_changed): Use
3600         ui_out_redirect_pop.
3601         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3602         ui_out_redirect_pop.
3603         * utils.c (do_ui_out_redirect_pop)
3604         (make_cleanup_ui_out_redirect_pop): Remove.
3605         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3606         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3607         * ui-out.h (ui_out_redirect_pop): New class.
3608
3609 2017-09-09  Tom Tromey  <tom@tromey.com>
3610
3611         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3612         (list_available_thread_groups, mi_cmd_list_thread_groups)
3613         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3614         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3615         Likewise.
3616
3617 2017-09-09  Tom Tromey  <tom@tromey.com>
3618
3619         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3620         ui_out_emit_tuple.
3621
3622 2017-09-09  Tom Tromey  <tom@tromey.com>
3623
3624         * target.c (flash_erase_command): Use ui_out_emit_tuple.
3625         * stack.c (print_frame): Use ui_out_emit_tuple.
3626         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3627         (info_spu_mailbox_command, info_spu_dma_command)
3628         (info_spu_proxydma_command): Likewise.
3629         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3630         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3631         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3632         ui_out_emit_tuple.
3633         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3634
3635 2017-09-09  Tom Tromey  <tom@tromey.com>
3636
3637         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3638         (class ui_out_emit_table): Update comment.
3639         * ui-out.c (do_cleanup_table_end)
3640         (make_cleanup_ui_out_table_begin_end): Remove.
3641         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3642         (info_spu_dma_cmdlist): Likewise.
3643         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3644         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3645         ui_out_emit_table.
3646
3647 2017-09-09  Tom Tromey  <tom@tromey.com>
3648
3649         * thread.c (print_thread_info_1): Use ui_out_emit_table,
3650         ui_out_emit_list, gdb::optional.
3651
3652 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
3653
3654         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3655         prototype.
3656         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3657         prototype.
3658         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3659         prototype.
3660         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3661         * ada-exp.y: Remove _initialize_ada_exp prototype.
3662         * ada-lang.c: Remove _initialize_ada_language prototype.
3663         * ada-tasks.c: Remove _initialize_tasks prototype.
3664         * addrmap.c: Remove _initialize_addrmap prototype.
3665         * agent.c: Remove _initialize_agent prototype.
3666         * aix-thread.c: Remove _initialize_aix_thread prototype.
3667         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3668         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3669         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3670         prototype.
3671         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3672         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3673         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3674         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3675         prototype.
3676         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3677         prototype.
3678         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3679         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3680         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3681         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3682         prototype.
3683         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3684         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3685         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3686         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3687         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3688         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3689         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3690         prototype.
3691         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3692         prototype.
3693         * annotate.c: Remove _initialize_annotate prototype.
3694         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3695         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3696         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3697         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3698         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3699         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3700         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3701         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3702         prototype.
3703         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3704         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3705         * auto-load.c: Remove _initialize_auto_load prototype.
3706         * auxv.c: Remove _initialize_auxv prototype.
3707         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3708         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3709         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3710         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3711         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3712         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3713         prototype.
3714         * break-catch-throw.c: Remove _initialize_break_catch_throw
3715         prototype.
3716         * breakpoint.c: Remove _initialize_breakpoint prototype.
3717         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3718         * btrace.c: Remove _initialize_btrace prototype.
3719         * charset.c: Remove _initialize_charset prototype.
3720         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3721         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3722         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3723         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3724         * cli/cli-script.c: Remove _initialize_cli_script prototype.
3725         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3726         * coffread.c: Remove _initialize_coffread prototype.
3727         * compile/compile.c: Remove _initialize_compile prototype.
3728         * complaints.c: Remove _initialize_complaints prototype.
3729         * completer.c: Remove _initialize_completer prototype.
3730         * copying.awk: Remove _initialize_copying prototype.
3731         * copying.c: Regenerate.
3732         * core-regset.c: Remove _initialize_core_regset prototype.
3733         * corefile.c: Remove _initialize_core prototype.
3734         * corelow.c: Remove _initialize_corelow prototype.
3735         * cp-abi.c: Remove _initialize_cp_abi prototype.
3736         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3737         * cp-support.c: Remove _initialize_cp_support prototype.
3738         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3739         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3740         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3741         * ctf.c: Remove _initialize_ctf prototype.
3742         * d-lang.c: Remove _initialize_d_language prototype.
3743         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3744         prototype.
3745         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3746         * dbxread.c: Remove _initialize_dbxread prototype.
3747         * dcache.c: Remove _initialize_dcache prototype.
3748         * demangle.c: Remove _initialize_demangler prototype.
3749         * disasm-selftests.c: Remove _initialize_disasm_selftests
3750         prototype.
3751         * disasm.c: Remove _initialize_disasm prototype.
3752         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3753         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3754         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3755         prototype.
3756         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3757         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3758         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3759         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3760         * elfread.c: Remove _initialize_elfread prototype.
3761         * exec.c: Remove _initialize_exec prototype.
3762         * extension.c: Remove _initialize_extension prototype.
3763         * f-lang.c: Remove _initialize_f_language prototype.
3764         * f-valprint.c: Remove _initialize_f_valprint prototype.
3765         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3766         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3767         * filesystem.c: Remove _initialize_filesystem prototype.
3768         * findcmd.c: Remove _initialize_mem_search prototype.
3769         * fork-child.c: Remove _initialize_fork_child prototype.
3770         * frame-base.c: Remove _initialize_frame_base prototype.
3771         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3772         * frame.c: Remove _initialize_frame prototype.
3773         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3774         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3775         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3776         * gcore.c: Remove _initialize_gcore prototype.
3777         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3778         * gdbarch.c: Regenerate.
3779         * gdbarch.sh: Remove _initialize_gdbarch prototype.
3780         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3781         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3782         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3783         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3784         * go-lang.c: Remove _initialize_go_language prototype.
3785         * go32-nat.c: Remove _initialize_go32_nat prototype.
3786         * guile/guile.c: Remove _initialize_guile prototype.
3787         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3788         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3789         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3790         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3791         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3792         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3793         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3794         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3795         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3796         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3797         prototype.
3798         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3799         prototype.
3800         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3801         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3802         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3803         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3804         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3805         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3806         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3807         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3808         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3809         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3810         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3811         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3812         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3813         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3814         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3815         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3816         prototype.
3817         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3818         prototype.
3819         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3820         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3821         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3822         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3823         * infcall.c: Remove _initialize_infcall prototype.
3824         * infcmd.c: Remove _initialize_infcmd prototype.
3825         * inferior.c: Remove _initialize_inferiors prototype.
3826         * inflow.c: Remove _initialize_inflow prototype.
3827         * infrun.c: Remove _initialize_infrun prototype.
3828         * interps.c: Remove _initialize_interpreter prototype.
3829         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3830         * jit.c: Remove _initialize_jit prototype.
3831         * language.c: Remove _initialize_language prototype.
3832         * linux-fork.c: Remove _initialize_linux_fork prototype.
3833         * linux-nat.c: Remove _initialize_linux_nat prototype.
3834         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3835         * linux-thread-db.c: Remove _initialize_thread_db prototype.
3836         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3837         * m2-lang.c: Remove _initialize_m2_language prototype.
3838         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3839         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3840         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3841         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3842         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3843         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3844         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3845         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3846         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3847         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3848         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3849         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3850         * machoread.c: Remove _initialize_machoread prototype.
3851         * macrocmd.c: Remove _initialize_macrocmd prototype.
3852         * macroscope.c: Remove _initialize_macroscope prototype.
3853         * maint.c: Remove _initialize_maint_cmds prototype.
3854         * mdebugread.c: Remove _initialize_mdebugread prototype.
3855         * memattr.c: Remove _initialize_mem prototype.
3856         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3857         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3858         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3859         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3860         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3861         * microblaze-linux-tdep.c: Remove
3862         _initialize_microblaze_linux_tdep prototype.
3863         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3864         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3865         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3866         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3867         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3868         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3869         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3870         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3871         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3872         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3873         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3874         prototype.
3875         * mipsread.c: Remove _initialize_mipsread prototype.
3876         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3877         prototype.
3878         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3879         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3880         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3881         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3882         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3883         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3884         prototype.
3885         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3886         * nto-procfs.c: Remove _initialize_procfs prototype.
3887         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3888         * objc-lang.c: Remove _initialize_objc_language prototype.
3889         * objfiles.c: Remove _initialize_objfiles prototype.
3890         * observer.c: Remove observer_test_first_notification_function,
3891         observer_test_second_notification_function,
3892         observer_test_third_notification_function, and
3893         _initialize_observer prototypes.
3894         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3895         * osabi.c: Remove _initialize_gdb_osabi prototype.
3896         * osdata.c: Remove _initialize_osdata prototype.
3897         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3898         * parse.c: Remove _initialize_parse prototype.
3899         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3900         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3901         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3902         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3903         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3904         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3905         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3906         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3907         * printcmd.c: Remove _initialize_printcmd prototype.
3908         * probe.c: Remove _initialize_probe prototype.
3909         * proc-api.c: Remove _initialize_proc_api prototype.
3910         * proc-events.c: Remove _initialize_proc_events prototype.
3911         * proc-service.c: Remove _initialize_proc_service prototype.
3912         * procfs.c: Remove _initialize_procfs prototype.
3913         * psymtab.c: Remove _initialize_psymtab prototype.
3914         * python/python.c: Remove _initialize_python prototype.
3915         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3916         * record-btrace.c: Remove _initialize_record_btrace prototype.
3917         * record-full.c: Remove _initialize_record_full prototype.
3918         * record.c: Remove _initialize_record prototype.
3919         * regcache.c: Remove _initialize_regcache prototype.
3920         * reggroups.c: Remove _initialize_reggroup prototype.
3921         * remote-notif.c: Remove _initialize_notif prototype.
3922         * remote-sim.c: Remove _initialize_remote_sim prototype.
3923         * remote.c: Remove _initialize_remote prototype.
3924         * reverse.c: Remove _initialize_reverse prototype.
3925         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3926         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3927         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3928         prototype.
3929         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3930         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3931         * rust-exp.y: Remove _initialize_rust_exp prototype.
3932         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3933         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3934         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3935         * score-tdep.c: Remove _initialize_score_tdep prototype.
3936         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3937         prototype.
3938         * ser-go32.c: Remove _initialize_ser_dos prototype.
3939         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3940         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3941         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3942         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3943         * serial.c: Remove _initialize_serial prototype.
3944         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3945         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3946         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3947         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3948         * skip.c: Remove _initialize_step_skip prototype.
3949         * sol-thread.c: Remove _initialize_sol_thread prototype.
3950         * solib-aix.c: Remove _initialize_solib_aix prototype.
3951         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3952         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3953         * solib-frv.c: Remove _initialize_frv_solib prototype.
3954         * solib-spu.c: Remove _initialize_spu_solib prototype.
3955         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3956         * solib-target.c: Remove _initialize_solib_target prototype.
3957         * solib.c: Remove _initialize_solib prototype.
3958         * source.c: Remove _initialize_source prototype.
3959         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3960         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3961         prototype.
3962         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3963         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3964         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3965         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3966         prototype.
3967         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3968         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3969         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3970         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3971         prototype.
3972         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3973         prototype.
3974         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3975         prototype.
3976         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3977         prototype.
3978         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3979         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3980         prototype.
3981         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3982         prototype.
3983         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3984         prototype.
3985         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3986         prototype.
3987         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3988         prototype.
3989         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3990         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3991         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3992         * stabsread.c: Remove _initialize_stabsread prototype.
3993         * stack.c: Remove _initialize_stack prototype.
3994         * stap-probe.c: Remove _initialize_stap_probe prototype.
3995         * std-regs.c: Remove _initialize_frame_reg prototype.
3996         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3997         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3998         * symfile.c: Remove _initialize_symfile prototype.
3999         * symmisc.c: Remove _initialize_symmisc prototype.
4000         * symtab.c: Remove _initialize_symtab prototype.
4001         * target-dcache.c: Remove _initialize_target_dcache prototype.
4002         * target-descriptions.c: Remove _initialize_target_descriptions
4003         prototype.
4004         * thread.c: Remove _initialize_thread prototype.
4005         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4006         prototype.
4007         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4008         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4009         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4010         prototype.
4011         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4012         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4013         * tracefile.c: Remove _initialize_tracefile prototype.
4014         * tracepoint.c: Remove _initialize_tracepoint prototype.
4015         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4016         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4017         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4018         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4019         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4020         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4021         * tui/tui.c: Remove _initialize_tui prototype.
4022         * typeprint.c: Remove _initialize_typeprint prototype.
4023         * user-regs.c: Remove _initialize_user_regs prototype.
4024         * utils.c: Remove _initialize_utils prototype.
4025         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4026         * valarith.c: Remove _initialize_valarith prototype.
4027         * valops.c: Remove _initialize_valops prototype.
4028         * valprint.c: Remove _initialize_valprint prototype.
4029         * value.c: Remove _initialize_values prototype.
4030         * varobj.c: Remove _initialize_varobj prototype.
4031         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4032         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4033         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4034         * windows-nat.c: Remove _initialize_windows_nat,
4035         _initialize_check_for_gdb_ini, and _initialize_loadable
4036         prototypes.
4037         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4038         * xcoffread.c: Remove _initialize_xcoffread prototype.
4039         * xml-support.c: Remove _initialize_xml_support prototype.
4040         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4041         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4042         prototype.
4043         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4044         prototype.
4045         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4046
4047 2017-09-08  Keith Seitz  <keiths@redhat.com>
4048
4049         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4050         field.
4051
4052 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4053
4054         * f-valprint.c (f_val_print): Remove check for one byte
4055         sized integers. Remove printing of character type.
4056
4057 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4058             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4059             Bernhard Heckel  <bernhard.heckel@intel.com>
4060
4061         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4062         to maintain proper indentation when printing pointers/refs.
4063
4064 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4065
4066         GDB 8.0.1 released.
4067
4068 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4069
4070         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4071
4072 2017-09-05  Tom Tromey  <tom@tromey.com>
4073
4074         * parse.c (funcall_chain): Now a std::vector.
4075         (start_arglist, end_arglist): Simplify.
4076         (free_funcalls): Remove.
4077         (parse_exp_in_context_1): Remove cleanup.
4078
4079 2017-09-05  Tom Tromey  <tom@tromey.com>
4080
4081         * go-exp.y (go_parse): Don't create a cleanup.
4082
4083 2017-09-05  Tom Tromey  <tom@tromey.com>
4084
4085         * d-exp.y (PrimaryExpression): Use std::string.
4086         (d_parse): Don't create a cleanup.
4087
4088 2017-09-05  Tom Tromey  <tom@tromey.com>
4089
4090         * utils.c (do_clear_parser_state): Remove.
4091         (make_cleanup_clear_parser_state): Remove.
4092         * p-exp.y (pascal_parse): Use scoped_restore.
4093         * m2-exp.y (m2_parse): Use scoped_restore.
4094         * f-exp.y (f_parse): Use scoped_restore.
4095         * d-exp.y (d_parse): Use scoped_restore.
4096         * c-exp.y (c_parse): Use scoped_restore.
4097         * ada-exp.y (ada_parse): Use scoped_restore.
4098         * utils.h (make_cleanup_clear_parser_state): Remove.
4099
4100 2017-09-06  Keith Seitz  <keiths@redhat.com>
4101
4102         * dwarf2read.c (dw2_linkage_name_attr): New function.
4103         (dw2_linkage_name): New function.
4104         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4105         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4106         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4107
4108 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4109
4110         * config/djgpp/djconfig.sh: Correct shell portability issue.
4111
4112 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4113
4114         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4115
4116 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4117
4118         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4119         * NEWS: Mention new FreeBSD/mips native configuration.
4120         * configure.host: Add aarch64*-*-freebsd*.
4121         * configure.nat: Likewise.
4122         * aarch64-fbsd-nat.c: New file.
4123
4124 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4125
4126         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4127         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4128         * NEWS: Mention new FreeBSD/aarch64 target.
4129         * configure.tgt: Add aarch64*-*-freebsd*.
4130         * aarch64-fbsd-tdep.c: New file.
4131         * aarch64-fbsd-tdep.h: New file.
4132
4133 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4134
4135         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4136
4137 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4138
4139         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4140         of TLS symbols.
4141
4142 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4143
4144         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4145         call.
4146
4147 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4148
4149         * infrun.c (follow_exec): Call add_thread after
4150         target_find_description.
4151
4152 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4153
4154         * infrun.c (handle_inferior_event_1): When exec'ing, read
4155         stop_pc after follow_exec.
4156
4157 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4158
4159         * remote.c (process_g_packet): Update error message.
4160
4161 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4162
4163         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4164         targets.
4165
4166 2017-09-05  Pedro Alves  <palves@redhat.com>
4167
4168         * eval.c (eval_call, evaluate_funcall): New functions, factored
4169         out from ...
4170         (evaluate_subexp_standard): ... this.
4171
4172 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4173
4174         * amd64-tdep.c (amd64_target_description): Create target
4175         descriptions.
4176         (_initialize_amd64_tdep): Don't call functions
4177         initialize_tdesc_amd64_*.  Add self tests.
4178         * arch/amd64.c (amd64_create_target_description): Add parameter
4179         is_linux.  Call set_tdesc_osabi if is_linux is true.
4180         * arch/amd64.h (amd64_create_target_description): Update the
4181         declaration.
4182         * arch/i386.c (i386_create_target_description): Add parameter
4183         is_linux.  Call set_tdesc_osabi if is_linux is true.
4184         * arch/i386.h (i386_create_target_description): Update
4185         declaration.
4186         * configure.tgt: Add i386.o to gdb_target_obs.
4187         * features/Makefile (XMLTOC): Remove i386/*.xml.
4188         * features/i386/amd64-avx-avx512.c: Remove.
4189         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4190         * features/i386/amd64-avx-mpx.c: Remove.
4191         * features/i386/amd64-avx.c: Remove.
4192         * features/i386/amd64-mpx.c: Remove.
4193         * features/i386/amd64.c: Remove.
4194         * features/i386/i386-avx-avx512.c: Remove.
4195         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4196         * features/i386/i386-avx-mpx.c: Remove.
4197         * features/i386/i386-avx.c: Remove.
4198         * features/i386/i386-mmx.c: Remove.
4199         * features/i386/i386-mpx.c: Remove.
4200         * features/i386/i386.c: Remove.
4201         * i386-tdep.c: Don't include features/i386/i386*.c., include
4202         target-descriptions.h and arch/i386.h.
4203         (i386_target_description): Create target descriptions.
4204         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4205         functions.  Do self tests.
4206
4207 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4208
4209         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4210         * features/i386/amd64-avx-avx512-linux.c: Removed.
4211         * features/i386/amd64-avx-linux.c: Removed.
4212         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4213         * features/i386/amd64-avx-mpx-linux.c: Removed.
4214         * features/i386/amd64-linux.c: Removed.
4215         * features/i386/amd64-mpx-linux.c: Removed.
4216         * features/i386/x32-avx-avx512-linux.c: Removed.
4217         * features/i386/x32-avx-linux.c: Removed.
4218         * features/i386/x32-linux.c: Removed.
4219
4220 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4221
4222         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4223         features/i386/*.c.
4224         (amd64_linux_read_description): Call
4225         amd64_create_target_description.
4226         * arch/amd64.c: New file.
4227         * arch/amd64.h: New file.
4228         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4229         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4230
4231 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4232
4233         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4234         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4235         (amd64_linux_read_description): Create target descriptions.
4236         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4237         functions.  Add unit tests.
4238         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4239         x32-core.xml.
4240         * features/i386/64bit-avx.c: Generated.
4241         * features/i386/64bit-avx512.c: Generated.
4242         * features/i386/64bit-core.c: Generated.
4243         * features/i386/64bit-linux.c: Generated.
4244         * features/i386/64bit-mpx.c: Generated.
4245         * features/i386/64bit-pkeys.c: Generated.
4246         * features/i386/64bit-segments.c: Generated.
4247         * features/i386/64bit-sse.c: Generated.
4248         * features/i386/x32-core.c: Generated.
4249         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4250         c files for amd64-linux and x32-linux.
4251
4252 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4253
4254         * amd64-linux-tdep.c (amd64_linux_read_description): New
4255         function.
4256         (amd64_linux_core_read_description): Call
4257         amd64_linux_read_description.
4258         (amd64_linux_init_abi): Likewise.
4259         (amd64_x32_linux_init_abi): Likewise.
4260         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4261         * x86-linux-nat.c (x86_linux_read_description): Call
4262         amd64_linux_read_description.
4263
4264 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4265
4266         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4267         comments.
4268
4269 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4270
4271         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4272         * features/i386/i386-avx-avx512-linux.c: Remove.
4273         * features/i386/i386-avx-linux.c: Remove.
4274         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4275         * features/i386/i386-avx-mpx-linux.c: Remove.
4276         * features/i386/i386-linux.c: Remove.
4277         * features/i386/i386-mmx-linux.c: Remove.
4278         * features/i386/i386-mpx-linux.c: Remove.
4279
4280 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4281
4282         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4283         (SFILES): Add arch/i386.c.
4284         (HFILES_NO_SRCDIR): Add arch/i386.h.
4285         * arch/i386.c: New file.
4286         * arch/i386.h: New file.
4287         * arch/tdesc.h (allocate_target_description): Declare.
4288         (set_tdesc_architecture): Declare.
4289         (set_tdesc_osabi): Declare.
4290         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4291         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4292         include arch/i386.h.
4293         (i386_linux_read_description): Remove code and call
4294         i386_create_target_description.
4295         (set_tdesc_architecture): New function.
4296         (set_tdesc_osabi): New function.
4297         * target-descriptions.h (allocate_target_description): Remove.
4298
4299 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4300
4301         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4302         * target-descriptions.c (tdesc_create_feature): Likewise, and
4303         adjust code.
4304         * features/i386/32bit-avx.c: Re-generated.
4305         * features/i386/32bit-avx512.c: Re-generated.
4306         * features/i386/32bit-core.c: Re-generated.
4307         * features/i386/32bit-linux.c: Re-generated.
4308         * features/i386/32bit-mpx.c: Re-generated.
4309         * features/i386/32bit-pkeys.c: Re-generated.
4310         * features/i386/32bit-sse.c: Re-generated.
4311
4312 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4313
4314         * regformats/regdef.h (struct reg): Override operator == and !=.
4315
4316 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4317
4318         * arch/tdesc.h: New file.
4319         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4320         * target-descriptions.c: Update comments.
4321         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4322         declarations.
4323         * features/i386/32bit-avx.c: Re-generated.
4324         * features/i386/32bit-avx512.c: Re-generated.
4325         * features/i386/32bit-core.c: Re-generated.
4326         * features/i386/32bit-linux.c: Re-generated.
4327         * features/i386/32bit-mpx.c: Re-generated.
4328         * features/i386/32bit-pkeys.c: Re-generated.
4329         * features/i386/32bit-sse.c: Re-generated.
4330
4331 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4332
4333         * regformats/regdat.sh: Update generated code.
4334
4335 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4336
4337         * regformats/regdat.sh: Adjust code order.
4338
4339 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4340
4341         * expprint.c (dump_subexp_body_standard): Use constant format
4342         string in fprintf_filtered call.
4343
4344 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4345
4346         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4347         NetBSD/i386.
4348         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4349
4350 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4351
4352         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4353
4354 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4355
4356         * bsd-kvm.o: Define _KMEMUSER.
4357         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4358         * configure: Regenerate.
4359
4360 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4361
4362         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4363         * i386-fbsd-nat.c: Likewise.
4364
4365 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4366
4367         * unittests/array-view-selftests.c: Add include of <array>.
4368
4369 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4370
4371         * spu-tdep.c (flush_ea_cache): Add missing argument to
4372         call_function_by_hand.
4373
4374 2017-09-04  Pedro Alves  <palves@redhat.com>
4375
4376         * NEWS (Safer support for debugging with no debug info): New.
4377
4378 2017-09-04  Pedro Alves  <palves@redhat.com>
4379
4380         * c-exp.y (function_method, function_method_void): Add current
4381         instance flags to TYPE_INSTANCE.
4382         * dwarf2read.c (check_modifier): New.
4383         (compute_delayed_physnames): Assert that only C++ adds delayed
4384         physnames.  Mark fn_fields as const/volatile depending on
4385         physname.
4386         * eval.c (make_params): New type_instance_flags parameter.  Use
4387         it as the new type's instance flags.
4388         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4389         flags element and pass it to make_params.
4390         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4391         instance flags element.
4392         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4393         * gdbtypes.h: Include "enum-flags.h".
4394         (type_instance_flags): New enum-flags type.
4395         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4396         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4397         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4398         (follow_type_instance_flags): New function.
4399         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4400         * parser-defs.h (follow_type_instance_flags): Declare.
4401         * valops.c (value_struct_elt_for_reference): const/volatile must
4402         match too.
4403
4404 2017-09-04  Pedro Alves  <palves@redhat.com>
4405
4406         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4407         function/method scopes; lookup the nested name as a function local
4408         static variable.
4409
4410 2017-09-04  Pedro Alves  <palves@redhat.com>
4411
4412         (%type <voidval>): Add function_method.
4413         * c-exp.y (exp): New production for calls with no arguments.
4414         (function_method, function_method_void_or_typelist): New
4415         productions.
4416         (exp): New production for "method()::static_var".
4417         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4418         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4419         Handle OP_FUNC_STATIC_VAR.
4420         * parse.c (operator_length_standard):
4421         Handle OP_FUNC_STATIC_VAR.
4422
4423 2017-09-04  Pedro Alves  <palves@redhat.com>
4424
4425         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4426         handling.
4427         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4428         Ditto.
4429         * parse.c (operator_length_standard, operator_check_standard):
4430         Ditto.
4431         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4432
4433 2017-09-04  Pedro Alves  <palves@redhat.com>
4434
4435         * ax-gdb.c: Include "typeprint.h".
4436         (gen_expr_for_cast): New function.
4437         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4438         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4439         type is unknown.
4440         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4441         nodebug_data_symbol.
4442         * eval.c: Include "typeprint.h".
4443         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4444         Error out if symbol has unknown type.
4445         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4446         evaluate_subexp_for_cast.
4447         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4448         OP_VAR_MSYM_VALUE.
4449         (evaluate_subexp_for_cast): New function.
4450         * gdbtypes.c (init_nodebug_var_type): New function.
4451         (objfile_type): Use it to initialize types of variables with no
4452         debug info.
4453         * typeprint.c (error_unknown_type): New.
4454         * typeprint.h (error_unknown_type): New declaration.
4455         * compile/compile-c-types.c (convert_type_basic): Handle
4456         TYPE_CODE_ERROR; warn and fallback to int for variables with
4457         unknown type.
4458
4459 2017-09-04  Pedro Alves  <palves@redhat.com>
4460
4461         * eval.c (evaluate_var_value): New function, factored out from ...
4462         (evaluate_subexp_standard): ... here.
4463
4464 2017-09-04  Pedro Alves  <palves@redhat.com>
4465
4466         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4467         Remove useless assignments to 'op'.
4468
4469 2017-09-04  Pedro Alves  <palves@redhat.com>
4470
4471         * eval.c (eval_skip_value): New function.
4472         (evaluate_subexp_standard): Use it.
4473
4474 2017-09-04  Pedro Alves  <palves@redhat.com>
4475
4476         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4477         function name from symbol/minsym and pass it to
4478         error_call_unknown_return_type.
4479
4480 2017-09-04  Pedro Alves  <palves@redhat.com>
4481
4482         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4483         * ax-gdb.c (gen_msym_var_ref): New function.
4484         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4485         * eval.c (evaluate_var_msym_value): New function.
4486         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4487         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4488         to call_function_by_hand.
4489         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4490         Handle OP_VAR_MSYM_VALUE.
4491         (union exp_element) <msymbol>: New field.
4492         * minsyms.h (struct type): Forward declare.
4493         (find_minsym_type_and_address): Declare.
4494         * parse.c (write_exp_elt_msym): New function.
4495         (write_exp_msymbol): Delete, refactored as ...
4496         (find_minsym_type_and_address): ... this new function.
4497         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4498         (operator_length_standard, operator_check_standard): Handle
4499         OP_VAR_MSYM_VALUE.
4500         * std-operator.def (OP_VAR_MSYM_VALUE): New.
4501
4502 2017-09-04  Pedro Alves  <palves@redhat.com>
4503
4504         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4505         TYPE_GNU_IFUNC specially here.  Throw error if return type is
4506         unknown.
4507         * ada-typeprint.c (print_func_type): Handle functions with unknown
4508         return type.
4509         * c-typeprint.c (c_type_print_base): Handle functions and methods
4510         with unknown return type.
4511         * compile/compile-c-symbols.c (convert_symbol_bmsym)
4512         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4513         * compile/compile-c-types.c: Include "objfiles.h".
4514         (convert_func): For functions with unknown return type, warn and
4515         default to int.
4516         * compile/compile-object-run.c (compile_object_run): Adjust call
4517         to call_function_by_hand_dummy.
4518         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4519         call_function_by_hand.
4520         * eval.c (evaluate_subexp_standard): Adjust calls to
4521         call_function_by_hand.  Handle functions and methods with unknown
4522         return type.  Pass expect_type to call_function_by_hand.
4523         * f-typeprint.c (f_type_print_base): Handle functions with unknown
4524         return type.
4525         * gcore.c (call_target_sbrk): Adjust call to
4526         call_function_by_hand.
4527         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4528         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
4529         an integer address type instead of nodebug.
4530         * guile/scm-value.c (gdbscm_value_call): Adjust call to
4531         call_function_by_hand.
4532         * infcall.c (error_call_unknown_return_type): New function.
4533         (call_function_by_hand): New "default_return_type" parameter.
4534         Pass it down.
4535         (call_function_by_hand_dummy): New "default_return_type"
4536         parameter.  Use it instead of defaulting to int.  If there's no
4537         default and the return type is unknown, throw an error.  If
4538         there's a default return type, and the called function has no
4539         debug info, then assume the function is prototyped.
4540         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4541         New "default_return_type" parameter.
4542         (error_call_unknown_return_type): New declaration.
4543         * linux-fork.c (call_lseek): Cast return type of lseek.
4544         (inferior_call_waitpid, checkpoint_command): Adjust calls to
4545         call_function_by_hand.
4546         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4547         calls to call_function_by_hand.
4548         * m2-typeprint.c (m2_procedure): Handle functions with unknown
4549         return type.
4550         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4551         (value_nsstring, print_object_command): Adjust calls to
4552         call_function_by_hand.
4553         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4554         functions with unknown return type.
4555         (pascal_type_print_func_varspec_suffix): New function.
4556         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4557         TYPE_CODE_METHOD>: Use it.
4558         * python/py-value.c (valpy_call): Adjust call to
4559         call_function_by_hand.
4560         * rust-lang.c (rust_evaluate_funcall): Adjust call to
4561         call_function_by_hand.
4562         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4563         call_function_by_hand.
4564         * valops.c (value_allocate_space_in_inferior): Adjust call to
4565         call_function_by_hand.
4566         * typeprint.c (type_print_unknown_return_type): New function.
4567         * typeprint.h (type_print_unknown_return_type): New declaration.
4568
4569 2017-09-04  Pedro Alves  <palves@redhat.com>
4570
4571         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4572         types with more than one parameter as prototyped.
4573
4574 2017-09-04  Pedro Alves  <palves@redhat.com>
4575
4576         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4577         (disassemble_command): Use gdb_disassembly_flags instead of bare
4578         int.
4579         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4580         (dump_insns, do_mixed_source_and_assembly_deprecated)
4581         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4582         Use gdb_disassembly_flags instead of bare int.
4583         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4584         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4585         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4586         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
4587         (enum gdb_disassembly_flag): ... values of this new enumeration.
4588         (gdb_disassembly_flags): Define.
4589         (gdb_disassembly)
4590         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4591         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4592         gdb_disassembly_flags instead of bare int.
4593         * record-btrace.c (btrace_insn_history)
4594         (record_btrace_insn_history, record_btrace_insn_history_range)
4595         (record_btrace_insn_history_from): Use gdb_disassembly_flags
4596         instead of bare int.
4597         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4598         Use gdb_disassembly_flags instead of bare int.
4599         * target-debug.h (target_debug_print_gdb_disassembly_flags):
4600         Define.
4601         * target-delegates.c: Regenerate.
4602         * target.c (target_insn_history, target_insn_history_from)
4603         (target_insn_history_range): Use gdb_disassembly_flags instead of
4604         bare int.
4605         * target.h: Include "disasm.h".
4606         (struct target_ops) <to_insn_history, to_insn_history_from,
4607         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4608         int.
4609         (target_insn_history, target_insn_history_from)
4610         (target_insn_history_range): Use gdb_disassembly_flags instead of
4611         bare int.
4612
4613 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4614
4615         * cli/cli-script.c (build_command_line): For if/while commands,
4616         check whether args is empty.
4617
4618 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4619
4620         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4621         (enum command_control_type): Likewise.
4622         (struct command_line): Likewise.
4623         (free_command_lines): Likewise.
4624         (struct command_lines_deleter): Likewise.
4625         (command_line_up): Likewise.
4626         (read_command_lines): Likewise.
4627         (read_command_lines_1): Likewise.
4628         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4629         (enum command_control_type): Likewise.
4630         (struct command_line): Likewise.
4631         (free_command_lines): Likewise.
4632         (struct command_lines_deleter): Likewise.
4633         (command_line_up): Likewise.
4634         (read_command_lines): Likewise.
4635         (read_command_lines_1): Likewise.
4636         * breakpoint.h: Include cli/cli-script.h.
4637         * extension-priv.h: Likewise.
4638         * gdbcmd.h: Likewise.
4639
4640 2017-09-04  Pedro Alves  <palves@redhat.com>
4641
4642         * ada-lang.c (is_known_support_routine): Move sal declaration to
4643         where it is initialized.
4644         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4645         (parse_breakpoint_sals, decode_static_tracepoint_spec)
4646         (clear_command, update_static_tracepoint): Remove init_sal
4647         references.  Move declarations closer to initializations.
4648         * cli/cli-cmds.c (list_command): Move sal declarations closer to
4649         initializations.
4650         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4651         references.  Move sal declarations closer to initializations.
4652         * frame.c (find_frame_sal): Return a symtab_and_line via function
4653         return instead of output parameter.  Remove init_sal references.
4654         * frame.h (find_frame_sal): Return a symtab_and_line via function
4655         return instead of output parameter.
4656         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4657         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4658         instead of memset.
4659         (gdbscm_find_pc_line): Remove init_sal reference.
4660         * infcall.c (call_function_by_hand_dummy): Remove init_sal
4661         references.  Move declarations closer to initializations.
4662         * infcmd.c (set_step_frame): Update.  Move declarations closer to
4663         initializations.
4664         (finish_backward): Remove init_sal references.  Move declarations
4665         closer to initializations.
4666         * infrun.c (process_event_stop_test, handle_step_into_function)
4667         (insert_hp_step_resume_breakpoint_at_frame)
4668         (insert_step_resume_breakpoint_at_caller): Likewise.
4669         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4670         (symbol_to_sal): Likewise.
4671         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4672         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4673         to its initialization.
4674         * reverse.c (save_bookmark_command): Use new/delete.  Remove
4675         init_sal references.  Move declarations closer to initializations.
4676         * source.c (get_current_source_symtab_and_line): Remove brace
4677         initialization.
4678         (set_current_source_symtab_and_line): Now takes the sal by const
4679         reference.  Remove brace initialization.
4680         (line_info): Remove init_sal reference.
4681         * source.h (set_current_source_symtab_and_line): Now takes a
4682         symtab_and_line via const reference.
4683         * stack.c (set_current_sal_from_frame): Adjust.
4684         (print_frame_info): Adjust.
4685         (get_last_displayed_sal): Return the sal via function return
4686         instead of via output parameter.  Simplify.
4687         (frame_info): Adjust.
4688         * stack.h (get_last_displayed_sal): Return the sal via function
4689         return instead of via output parameter.
4690         * symtab.c (init_sal): Delete.
4691         (find_pc_sect_line): Remove init_sal references.  Move
4692         declarations closer to initializations.
4693         (find_function_start_sal): Remove init_sal references.  Move
4694         declarations closer to initializations.
4695         * symtab.h (struct symtab_and_line): In-class initialize all
4696         fields.
4697         * tracepoint.c (set_traceframe_context)
4698         (print_one_static_tracepoint_marker): Remove init_sal references.
4699         Move declarations closer to initializations.
4700         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4701         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
4702         declarations closer to initializations.
4703         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4704         init_sal references.  Adjust.
4705
4706 2017-09-04  Pedro Alves  <palves@redhat.com>
4707
4708         * ax-gdb.c (agent_command_1): Use range-for.
4709         * break-catch-throw.c (re_set_exception_catchpoint): Update.
4710         * breakpoint.c: Include "common/array-view.h".
4711         (init_breakpoint_sal, create_breakpoint_sal): Change sals
4712         parameter from struct symtabs_and_lines to
4713         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
4714         (breakpoint_sals_to_pc): Change sals parameter from struct
4715         symtabs_and_lines to std::vector reference.
4716         (check_fast_tracepoint_sals): Change sals parameter from struct
4717         symtabs_and_lines to std::array_view.  Use range-for.
4718         (decode_static_tracepoint_spec): Return a std::vector instead of
4719         symtabs_and_lines.  Update.
4720         (create_breakpoint): Update.
4721         (break_range_command, until_break_command, clear_command): Update.
4722         (base_breakpoint_decode_location, bkpt_decode_location)
4723         (bkpt_probe_create_sals_from_location)
4724         (bkpt_probe_decode_location, tracepoint_decode_location)
4725         (tracepoint_probe_decode_location)
4726         (strace_marker_create_sals_from_location): Return a std::vector
4727         instead of symtabs_and_lines.
4728         (strace_marker_create_breakpoints_sal): Update.
4729         (strace_marker_decode_location): Return a std::vector instead of
4730         symtabs_and_lines.  Update.
4731         (update_breakpoint_locations): Change struct symtabs_and_lines
4732         parameters to gdb::array_view.  Adjust.
4733         (location_to_sals): Return a std::vector instead of
4734         symtabs_and_lines.  Update.
4735         (breakpoint_re_set_default): Use std::vector instead of struct
4736         symtabs_and_lines.
4737         (decode_location_default): Return a std::vector instead of
4738         symtabs_and_lines.  Update.
4739         * breakpoint.h: Include "common/array-view.h".
4740         (struct breakpoint_ops) <decode_location>: Now returns a
4741         std::vector instead of returning a symtabs_and_lines via output
4742         parameter.
4743         (update_breakpoint_locations): Change sals parameters to use
4744         gdb::array_view.
4745         * cli/cli-cmds.c (edit_command, list_command): Update to use
4746         std::vector and gdb::array_view.
4747         (ambiguous_line_spec): Adjust to use gdb::array_view and
4748         range-for.
4749         (compare_symtabs): Rename to ...
4750         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
4751         const reference and adjust.
4752         (filter_sals): Rewrite using std::vector and standard algorithms.
4753         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4754         (jump_command): Update to use std::vector.
4755         * linespec.c (struct linespec_state) <canonical_names>: Update
4756         comment.
4757         (add_sal_to_sals_basic): Delete.
4758         (add_sal_to_sals, filter_results, convert_results_to_lsals)
4759         (decode_line_2, create_sals_line_offset)
4760         (convert_address_location_to_sals, convert_linespec_to_sals)
4761         (convert_explicit_location_to_sals, parse_linespec)
4762         (event_location_to_sals, decode_line_full, decode_line_1)
4763         (decode_line_with_current_source)
4764         (decode_line_with_last_displayed, decode_objc)
4765         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4766         (linespec_result::~linespec_result): Adjust to use std::vector
4767         instead of symtabs_and_lines.
4768         * linespec.h (linespec_sals::sals): Now a std::vector.
4769         (struct linespec_result): Use std::vector, bool, and in-class
4770         initialization.
4771         (decode_line_1, decode_line_with_current_source)
4772         (decode_line_with_last_displayed): Return std::vector.
4773         * macrocmd.c (info_macros_command): Use std::vector.
4774         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4775         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4776         std::vector.
4777         * probe.h (parse_probes): Return a std::vector.
4778         * python/python.c (gdbpy_decode_line): Use std::vector and
4779         gdb::array_view.
4780         * source.c (select_source_symtab, line_info): Use std::vector.
4781         * stack.c (func_command): Use std::vector.
4782         * symtab.h (struct symtabs_and_lines): Delete.
4783         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4784
4785 2017-09-04  Pedro Alves  <palves@redhat.com>
4786
4787         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4788         unittests/array-view-selftests.c.
4789         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4790         * common/array-view.h: New file.
4791         * unittests/array-view-selftests.c: New file.
4792
4793 2017-09-04  Pedro Alves  <palves@redhat.com>
4794
4795         * cli/cli-cmds.c (edit_command): Pass message to
4796         ambiguous_line_spec.
4797         (list_command): Pass message to ambiguous_line_spec.  Say
4798         "first"/"last" instead of "start" and "end" to be consistent with
4799         the manual.
4800         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
4801         them to print formatted message.
4802
4803 2017-09-04  Pedro Alves  <palves@redhat.com>
4804
4805         * btrace.c (ftrace_add_pt): Pass btrace_insn to
4806         ftrace_update_insns by reference instead of pointer.
4807
4808 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4809
4810         * i386-go32-tdep.c: Include x86-xstate.h.
4811         (i386_go32_init_abi): Call i386_target_description.
4812         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4813         if xcr0 is X86_XSTATE_X87_MASK.
4814         * i386-tdep.h (tdesc_i386): Remove the declaration.
4815         (tdesc_i386_mmx): Likewise.
4816
4817 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4818
4819         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4820         X86_XSTATE_SSE_MASK instead of 0.
4821
4822 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4823
4824         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4825         i386_target_description.
4826         * i386-fbsd-nat.c (i386fbsd_read_description): Call
4827         i386_target_description.
4828         * i386-tdep.c (i386_gdbarch_init): Likewise.
4829
4830 2017-09-04  Yao Qi  <yao.qi@linaro.org>
4831
4832         * amd64-darwin-tdep.c: Include "x86-xstate.h".
4833         (x86_darwin_init_abi_64): Call amd64_target_description.
4834         * amd64-dicos-tdep.c: Likewise.
4835         * amd64-fbsd-nat.c: Likewise.
4836         * amd64-fbsd-tdep.c: Likewise.
4837         * amd64-nbsd-tdep.c: Likewise.
4838         * amd64-obsd-tdep.c: Likewise.
4839         * amd64-sol2-tdep.c: Likewise.
4840         * amd64-windows-tdep.c: Likewise.
4841         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4842
4843 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4846         (btrace_function) <insn>: Change type to use std::vector.
4847         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4848         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4849         ftrace_update_insns, ftrace_compute_global_level_offset,
4850         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4851         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4852         change to std::vector.
4853         (ftrace_update_insns): Adjust to change to std::vector, change
4854         type of INSN parameter.
4855         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4856         * record-btrace.c (btrace_call_history_insn_range,
4857         btrace_compute_src_line_range,
4858         record_btrace_frame_prev_register): Adjust to change to
4859         std::vector.
4860         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4861         to change to std::vector.
4862
4863 2017-09-03  Tom Tromey  <tom@tromey.com>
4864
4865         * corefile.c (reopen_exec_file): Use std::string.
4866
4867 2017-09-03  Tom Tromey  <tom@tromey.com>
4868
4869         * compile/compile.c (compile_register_name_mangled): Return
4870         std::string.
4871         * compile/compile-loc2c.c (pushf_register_address): Update.
4872         (pushf_register): Update.
4873         * compile/compile-c-types.c (convert_array): Update.
4874         * compile/compile-c-symbols.c (generate_vla_size): Update.
4875         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4876         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4877         (convert_one_symbol): Update.
4878         (generate_c_for_for_one_variable): Update.
4879         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4880         std::string.
4881         (generate_register_struct): Update.
4882         * compile/compile-internal.h (c_get_range_decl_name): Return a
4883         std::string.
4884         (compile_register_name_mangled): Return std::string.
4885
4886 2017-09-03  Tom Tromey  <tom@tromey.com>
4887
4888         * utils.c (perror_string): Return a std::string.
4889         (throw_perror_with_name, perror_warning_with_name): Update.
4890
4891 2017-09-03  Tom Tromey  <tom@tromey.com>
4892
4893         * demangle.c (demangle_command): Use std::string,
4894         unique_xmalloc_ptr.
4895
4896 2017-09-03  Tom Tromey  <tom@tromey.com>
4897
4898         * cli/cli-setshow.c (do_set_command): Use std::string.
4899
4900 2017-09-03  Tom Tromey  <tom@tromey.com>
4901
4902         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4903
4904 2017-09-03  Tom Tromey  <tom@tromey.com>
4905
4906         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4907
4908 2017-09-03  Tom Tromey  <tom@tromey.com>
4909
4910         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4911         gdb::unique_xmalloc_ptr.
4912
4913 2017-09-03  Tom Tromey  <tom@tromey.com>
4914
4915         * thread.c (print_thread_info_1): Use string_printf.
4916         (thread_apply_command, thread_apply_all_command): Use
4917         std::string.
4918
4919 2017-09-03  Tom Tromey  <tom@tromey.com>
4920
4921         * valprint.c (val_print_string): Update.
4922         * gdbcore.h (memory_error_message): Return std::string.
4923         * corefile.c (memory_error_message): Return std::string.
4924         (memory_error): Update.
4925         * breakpoint.c (insert_bp_location): Update.
4926
4927 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * target/waitstatus.h (target_waitstatus_to_string): Change
4930         return type to std::string.
4931         * target/waitstatus.c (target_waitstatus_to_string): Return
4932         std::string.
4933         * target.h (target_waitstatus_to_string): Remove declaration.
4934         * infrun.c (resume, clear_proceed_status_thread,
4935         print_target_wait_results, do_target_wait, save_waitstatus,
4936         stop_all_threads): Adjust.
4937         * record-btrace.c (record_btrace_wait): Adjust.
4938         * target-debug.h
4939         (target_debug_print_struct_target_waitstatus_p): Adjust.
4940
4941 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4942
4943         PR gdb/22046
4944         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4945         detection.
4946
4947 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4948
4949         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4950         for setting/unsetting environment variables on the remote target.
4951         (New remote packets): Add entries for QEnvironmentHexEncoded,
4952         QEnvironmentUnset and QEnvironmentReset.
4953         * common/environ.c (gdb_environ::operator=): Extend method to
4954         handle m_user_set_env_list and m_user_unset_env_list.
4955         (gdb_environ::clear): Likewise.
4956         (match_var_in_string): Change type of first parameter from 'char
4957         *' to 'const char *'.
4958         (gdb_environ::set): Extend method to handle
4959         m_user_set_env_list and m_user_unset_env_list.
4960         (gdb_environ::unset): Likewise.
4961         (gdb_environ::clear_user_set_env): New method.
4962         (gdb_environ::user_set_envp): Likewise.
4963         (gdb_environ::user_unset_envp): Likewise.
4964         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4965         m_user_unset_env_list on move constructor/assignment.
4966         (unset): Add new default parameter 'update_unset_list = true'.
4967         (clear_user_set_env): New method.
4968         (user_set_envp): Likewise.
4969         (user_unset_envp): Likewise.
4970         (m_user_set_env_list): New std::set.
4971         (m_user_unset_env_list): Likewise.
4972         * common/rsp-low.c (hex2str): New function.
4973         (bin2hex): New overload for bin2hex function.
4974         * common/rsp-low.c (hex2str): New prototype.
4975         (str2hex): New overload prototype.
4976         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4977         QEnvironmentUnset and QEnvironmentReset.
4978         (remote_protocol_features): Add QEnvironmentHexEncoded,
4979         QEnvironmentUnset and QEnvironmentReset packets.
4980         (send_environment_packet): New function.
4981         (extended_remote_environment_support): Likewise.
4982         (extended_remote_create_inferior): Call
4983         extended_remote_environment_support.
4984         (_initialize_remote): Add QEnvironmentHexEncoded,
4985         QEnvironmentUnset and QEnvironmentReset packet configs.
4986         * unittests/environ-selftests.c (gdb_selftest_env_var):
4987         New variable.
4988         (test_vector_initialization): New function.
4989         (test_init_from_host_environ): Likewise.
4990         (test_reinit_from_host_environ): Likewise.
4991         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4992         Likewise.
4993         (test_unset_set_empty_vector): Likewise.
4994         (test_vector_clear): Likewise.
4995         (test_std_move): Likewise.
4996         (test_move_constructor):
4997         (test_self_move): Likewise.
4998         (test_set_unset_reset): Likewise.
4999         (run_tests): Rewrite in terms of the functions above.
5000
5001 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5002
5003         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5004         (adi_available): Use a temp variable of type CORE_ADDR as argument
5005         3 when calling target_auxv_search.
5006         (adi_normalize_address): Use masks and xor operators to calculate
5007         normalized address.
5008         (adi_read_versions, adi_write_versions, adi_print_versions)
5009         (do_examine, do_assign): Use paddress.
5010
5011 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5012
5013         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5014         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5015         out of loop and add supply of FIR.
5016         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5017         add collect of FIR.
5018
5019 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5020
5021         PR gdb/21827
5022         * cli/cli-script.c (define_command): Don't convert command name
5023         to lower case.
5024
5025 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5026
5027         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5028         Update all callers accordingly. Remove all code blocks handling
5029         the case where DISPP is not NULL.
5030
5031 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5032
5033         PR symtab/22003
5034         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5035         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5036         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5037
5038 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5039
5040         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5041         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5042         (read_comp_units_from_section): New parameter abbrev_section, use
5043         read_and_check_comp_unit_head, allocate signatured_type if needed.
5044         (create_all_comp_units): Update read_comp_units_from_section caller.
5045
5046 2017-08-23  Pedro Alves  <palves@redhat.com>
5047
5048         PR remote/21852
5049         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5050         to null_ptid and switch to thread without reading the registers
5051         after adding the inferior.
5052
5053 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5054
5055         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5056         compile-gcc.
5057         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5058         (compile_to_object): Implement compile_gcc.
5059         (_initialize_compile): Install "set compile-gcc".  Initialize
5060         compile_gcc.
5061
5062 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5063
5064         * compile/compile.c (compile_to_object): Conditionally call
5065         set_verbose.  Conditionally call compile or compile_v0.
5066
5067 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5068
5069         * sparc64-tdep.h: (adi_normalize_address): New export.
5070         * sparc-nat.h: (open_adi_tag_fd): New export.
5071         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5072         * sparc64-linux-tdep.c:
5073         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5074         (sparc64_linux_handle_segmentation_fault): New function.
5075         (sparc64_linux_init_abi): Register
5076         sparc64_linux_handle_segmentation_fault
5077         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5078         (sparc64_addr_bits_remove): New function.
5079         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5080         (MAX_PROC_NAME_SIZE): New macro.
5081         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5082         (sparc64adilist): New variable.
5083         (adi_proc_list): New variable.
5084         (find_adi_info): New function.
5085         (add_adi_info): New function.
5086         (get_adi_info_proc): New function.
5087         (get_adi_info): New function.
5088         (info_adi_command): New function.
5089         (read_maps_entry): New function.
5090         (adi_available): New function.
5091         (adi_normalize_address): New function.
5092         (adi_align_address): New function.
5093         (adi_convert_byte_count): New function.
5094         (adi_tag_fd): New function.
5095         (adi_is_addr_mapped): New function.
5096         (adi_read_versions): New function.
5097         (adi_write_versions): New function.
5098         (adi_print_versions): New function.
5099         (do_examine): New function.
5100         (do_assign): New function.
5101         (adi_examine_command): New function.
5102         (adi_assign_command): New function.
5103         (_initialize_sparc64_adi_tdep): New function.
5104
5105 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5106
5107         * breakpoint.c (breakpoints_info): Rename to ...
5108         (info_breakpoints_command): ... this.
5109         (watchpoints_info): Rename to ...
5110         (info_watchpoints_command): ... this.
5111         (tracepoints_info): Rename to ...
5112         (info_tracepoints_command): ... this.
5113         (_initialize_breakpoint): Adjust.
5114         * dcache.c (dcache_info): Rename to ...
5115         (info_display_command): ... this.
5116         (_initialize_dcache): Adjust.
5117         * frame.h (args_info): Rename to ...
5118         (info_args_command): ... this.
5119         (locals_info): Rename to ...
5120         (info_locals_command): ... this.
5121         * infcmd.c (nofp_registers_info): Rename to ...
5122         (info_registers_command): ... this.
5123         (float_info): Rename to ...
5124         (info_float_command): ... this.
5125         (program_info): Rename to ...
5126         (info_program_command): ... this.
5127         (all_registers_info): Rename to ...
5128         (info_all_registers_command): ... this.
5129         (vector_info): Rename to ...
5130         (info_vector_command): ... this.
5131         (float_info): Rename to ...
5132         (info_float_command): ... this.
5133         (_initialize_infcmd): Adjust.
5134         * inferior.h (term_info): Rename to ...
5135         (info_terminal_command): ... this.
5136         * inflow.c (term_info): Rename to ...
5137         (info_terminal_command): ... this.
5138         (_initialize_inflow): Adjust.
5139         * infrun.c (signals_info): Rename to ...
5140         (info_signals_command): ... this.
5141         (_initialize_infrun): Adjust.
5142         * objc-lang.c (classes_info): Rename to ...
5143         (info_classes_command): ... this.
5144         (selectors_info): Rename to ...
5145         (info_selectors_command): ... this.
5146         (_initialize_objc_language): Adjust.
5147         * printcmd.c (sym_info): Rename to ...
5148         (info_symbol_command): ... this.
5149         (address_info): Rename to ...
5150         (info_address_command): ... this.
5151         (display_info): Rename to ...
5152         (info_display_command): ... this.
5153         (_initialize_printcmd): Adjust.
5154         * reverse.c (bookmarks_info): Rename to ...
5155         (info_breakpoints_command): ... this.
5156         (_initialize_reverse): Adjust.
5157         * ser-go32.c (dos_info): Rename to ...
5158         (info_serial_command): ... this.
5159         (_initialize_ser_dos): Adjust.
5160         * skip.c (skip_info): Rename to ...
5161         (info_skip_command): ... this.
5162         (_initialize_step_skip): Adjust.
5163         * source.c (line_info): Rename to ...
5164         (info_line_command): ... this.
5165         (source_info): Rename to ...
5166         (info_source_command)
5167         * stack.c (frame_info): Rename to ...
5168         (info_frame_command): ... this.
5169         (locals_info): Rename to ...
5170         (info_locals_command): ... this.
5171         (args_info): Rename to ...
5172         (info_args_command): ... this.
5173         (_initialize_stack): Adjust.
5174         * symtab.c (sources_info): Rename to ...
5175         (info_sources_command): ... this.
5176         (variables_info): Rename to ...
5177         (info_variables_command): ... this.
5178         (functions_info): Rename to ...
5179         (info_functions_command): ... this.
5180         (types_info): Rename to ...
5181         (info_types_command): ... this.
5182         (_initialize_symtab): Adjust.
5183         * target.c (target_info): Rename to ...
5184         (info_target_command): ... this.
5185         (initialize_targets): Adjust.
5186         * tracepoint.c (tvariables_info): Rename to ...
5187         (info_tvariables_command): ... this.
5188         (scope_info): Rename to ...
5189         (info_scope_command): ... this.
5190         (trace_dump_actions): Adjust.
5191         (_initialize_tracepoint): Adjust.
5192
5193 2017-08-22  Tom Tromey  <tom@tromey.com>
5194
5195         * breakpoint.h (install_breakpoint): Update.
5196         * breakpoint.c (add_solib_catchpoint): Update.
5197         (install_breakpoint): Change argument to a std::unique_ptr.
5198         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5199         (create_breakpoint_sal, create_breakpoint): Update.
5200         (watch_command_1, catch_exec_command_1)
5201         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5202         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5203         Return the breakpoint.
5204         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5205         (new_single_step_breakpoint): Update.
5206         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5207         std::unique_ptr.
5208         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5209         std::unique_ptr.
5210         * break-catch-sig.c (create_signal_catchpoint): Use
5211         std::unique_ptr.
5212         * ada-lang.c (create_ada_exception_catchpoint): Use
5213         std::unique_ptr.
5214
5215 2017-08-22  Tom Tromey  <tom@tromey.com>
5216
5217         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5218
5219 2017-08-22  Tom Tromey  <tom@tromey.com>
5220
5221         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5222         (lookup_partial_symbol): Update.
5223
5224 2017-08-22  Tom Tromey  <tom@tromey.com>
5225
5226         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5227         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5228         (find_and_open_source, symtab_to_fullname): Update.
5229         * psymtab.c (psymtab_to_fullname): Update.
5230
5231 2017-08-22  Tom Tromey  <tom@tromey.com>
5232
5233         * exec.c (exec_file_attach): Update.
5234         * linux-thread-db.c (try_thread_db_load): Update.
5235         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5236         * utils.c (gdb_realpath): Change return type.
5237         (gdb_realpath_keepfile): Update.
5238         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5239         (_initialize_utils): Register the new self test.
5240         * source.c (openp): Update.
5241         (find_and_open_source): Update.
5242         * nto-tdep.c (nto_find_and_open_solib): Update.
5243         * main.c (set_gdb_data_directory): Update.
5244         (captured_main_1): Update.
5245         * dwarf2read.c (dwarf2_get_dwz_file): Update
5246         (dw2_map_symbol_filenames): Update.
5247         * auto-load.c (auto_load_safe_path_vec_update): Update.
5248         (filename_is_in_auto_load_safe_path_vec): Change type of
5249         "filename_realp".
5250         (auto_load_objfile_script): Update.
5251         (file_is_auto_load_safe): Update.  Use std::string.
5252         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5253
5254 2017-08-22  Tom Tromey  <tom@tromey.com>
5255
5256         * utils.c (gdb_realpath_keepfile): Return a
5257         gdb::unique_xmalloc_ptr.
5258         * exec.c (exec_file_attach): Update.
5259         * utils.h (gdb_realpath_keepfile): Return a
5260         gdb::unique_xmalloc_ptr.
5261
5262 2017-08-22  Tom Tromey  <tom@tromey.com>
5263
5264         * compile/compile.c (compile_file_command): Use
5265         gdb::unique_xmalloc_ptr, std::string.
5266         * utils.c (gdb_abspath): Change return type.
5267         * source.c (openp): Update.
5268         * objfiles.c (allocate_objfile): Update.
5269         * main.c (set_gdb_data_directory): Update.
5270         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5271
5272 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5273
5274         * cli-cmds.c (list_commands): List actual code around more than
5275         one location.
5276
5277 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5278
5279         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5280
5281 2017-08-21  Pedro Alves  <palves@redhat.com>
5282
5283         PR gdb/19487
5284         * c-exp.y (variable production): Handle function aliases.
5285         * minsyms.c (msymbol_is_text): New function.
5286         * minsyms.h (msymbol_is_text): Declare.
5287         * symtab.c (find_function_alias_target): New function.
5288         * symtab.h (find_function_alias_target): Declare.
5289
5290 2017-08-21  Pedro Alves  <palves@redhat.com>
5291
5292         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5293         typedefs.
5294         * typeprint.c (whatis_exp): If handling "whatis", and expression
5295         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5296         typedefs here.
5297         * valops.c (value_cast): Save "to" type before resolving
5298         stubs/typedefs.  Use that type as resulting value's type.
5299
5300 2017-08-18  Tom Tromey  <tom@tromey.com>
5301             Pedro Alves  <palves@redhat.com>
5302
5303         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5304         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5305         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5306         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5307         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5308         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5309         (linux_get_siginfo_data): Add "thread" argument.  Use
5310         scoped_restore.
5311         * linux-nat.c (linux_child_follow_fork)
5312         (check_stopped_by_watchpoint): Use scoped_restore.
5313         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5314         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5315         (restore_inferior_ptid, save_inferior_ptid): Remove.
5316         * btrace.c (btrace_fetch): Use scoped_restore.
5317         * bsd-uthread.c (bsd_uthread_fetch_registers)
5318         (bsd_uthread_store_registers): Use scoped_restore.
5319         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5320         scoped_restore.
5321         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5322         (aix_thread_xfer_partial): Use scoped_restore.
5323         * inferior.h (save_inferior_ptid): Remove.
5324
5325 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5326
5327         PR tdep/21818
5328         * arm-tdep.c (gdb_print_insn_arm): Mark
5329         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5330
5331 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5332
5333         * NEWS: Mention GDBserver's new option "--selftest".
5334         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5335         * selftest.c: Move it to common/selftest.c.
5336         * selftest.h: Move it to common/selftest.h.
5337         * selftest-arch.c (reset): New function.
5338         (tests_with_arch): Call reset.
5339
5340 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5341
5342         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5343         instead of exception_fprintf and printf_filtered.
5344
5345 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5346
5347         * selftest.c (register_self_test): Rename it to
5348         selftests::register_test.
5349         (run_self_tests): selftest::run_tests.
5350         * selftest.h: Update declarations.
5351         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5352         selftests::register_test_foreach_arch.
5353         * selftest-arch.h: Update declaration.
5354         * aarch64-tdep.c: Update.
5355         * arm-tdep.c: Likewise.
5356         * disasm-selftests.c: Likewise.
5357         * dwarf2loc.c: Likewise.
5358         * dwarf2-frame.c: Likewise.
5359         * findvar.c: Likewise.
5360         * gdbarch-selftests.c: Likewise.
5361         * maint.c (maintenance_selftest): Likewise.
5362         * regcache.c: Likewise.
5363         * rust-exp.y: Likewise.
5364         * selftest-arch.c: Likewise.
5365         * unittests/environ-selftests.c: Likewise.
5366         * unittests/function-view-selftests.c: Likewise.
5367         * unittests/offset-type-selftests.c: Likewise.
5368         * unittests/optional-selftests.c: Likewise.
5369         * unittests/scoped_restore-selftests.c: Likewise.
5370         * utils-selftests.c: Likewise.
5371
5372 2017-08-17  Pedro Alves  <palves@redhat.com>
5373
5374         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5375         local.
5376
5377 2017-08-17  Pedro Alves  <palves@redhat.com>
5378
5379         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5380         field.
5381         (reset_die_in_process): Delete, replaced by ...
5382         (process_die_scope): ... this new class.  Make it responsible for
5383         freeing cu->line_header too.
5384         (process_die): Use process_die_scope.
5385         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5386         cu->line_header_die_owner.  Don't release the line header if it's
5387         owned by the CU.
5388         (setup_type_unit_groups): Make the CU/DIE own the line header.
5389         Don't release the line header here.
5390
5391 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5392
5393         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5394
5395 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5396
5397         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5398         Single-Key mode
5399
5400 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5401
5402         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5403         mode command list.
5404
5405 2017-08-15  Stafford Horne  <shorne@gmail.com>
5406
5407         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5408
5409 2017-08-15  Stafford Horne  <shorne@gmail.com>
5410
5411         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5412
5413 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5414
5415         PR gdb/21954
5416         * infcmd.c (unset_environment_command): Use the 'clear' method on
5417         the environment instead of resetting it.
5418
5419 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5420
5421         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5422         platforms.
5423
5424 2017-08-14  Tom Tromey  <tom@tromey.com>
5425
5426         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5427         (print_binary_chars): Likewise.
5428         (BITS_IN_BYTES): Remove.
5429
5430 2017-08-14  Tom Tromey  <tom@tromey.com>
5431
5432         PR gdb/21675
5433         * valprint.c (LOW_ZERO): Change value to 034.
5434         (print_octal_chars): Add static_asserts for octal constants.
5435         * printcmd.c (print_scalar_formatted): Add 'd' case.
5436
5437 2017-08-11  Tom Tromey  <tom@tromey.com>
5438
5439         * symfile.c (add_symbol_file_command): Use std::vector.
5440
5441 2017-08-14  Tom Tromey  <tom@tromey.com>
5442
5443         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5444         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5445         std::move.
5446         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5447
5448 2017-08-11  Pedro Alves  <palves@redhat.com>
5449
5450         * infrun.c (process_event_stop_test): Adjust
5451         function_name_is_marked_for_skip call.
5452         * skip.c: Include <list>.
5453         (skiplist_entry): Make it a class with private fields, and
5454         getters/setters.
5455         (skiplist_entry_chain): Delete.
5456         (skiplist_entries): New.
5457         (skiplist_entry_count): Delete.
5458         (highest_skiplist_entry_num): New.
5459         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5460         (add_skiplist_entry): Delete.
5461         (skiplist_entry::skiplist_entry): New.
5462         (skiplist_entry::add_entry): New.
5463         (skip_file_command, skip_function): Adjust.
5464         (compile_skip_regexp): Delete.
5465         (skip_command): Don't compile regexp here.  Adjust to use
5466         skiplist_entry::add_entry.
5467         (skip_info): Adjust to use range-for and getters.
5468         (skip_enable_command, skip_disable_command): Adjust to use
5469         range-for and setters.
5470         (skip_delete_command): Adjust to use std::list.
5471         (add_skiplist_entry): Delete.
5472         (skip_file_p): Delete, refactored as ...
5473         (skiplist_entry::do_skip_file_p): ... this new method.
5474         (skip_gfile_p): Delete, refactored as ...
5475         (skiplist_entry::do_gskip_file_p): ... this new method.
5476         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5477         (skiplist_entry::skip_function_p): ... this new method.
5478         (function_name_is_marked_for_skip): Now returns bool, and takes
5479         the function sal by const reference.  Adjust to use range-for and
5480         skiplist_entry methods.
5481         (_initialize_step_skip): Remove references to
5482         skiplist_entry_chain, skiplist_entry_count.
5483         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5484         takes the function sal by const reference.
5485
5486 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5487
5488         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5489         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5490         (dwarf2_frame_cache):
5491         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5492         RETURN_MASK_ALL and set *this_case to NULL.
5493         * frame-unwind.h: Update comments.
5494
5495 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5496
5497         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5498         (dwarf2_frame_state_copy_regs): Remove.
5499         (dwarf2_frame_state_free_regs): Remove.
5500         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5501         (dwarf2_restore_rule): Call method .alloc_regs instead of
5502         dwarf2_frame_state_alloc_regs.
5503         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
5504         constructor.  Call std::move.
5505         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5506         (dwarf2_frame_cache): Likewise.
5507
5508         [GDB_SELF_TEST]: Include selftest.h and
5509         selftest-arch.h.
5510         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5511         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5512         execute_cfa_program_test.
5513
5514         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5515         copy ctor, assignment operator, move assignment.
5516         <alloc_regs>: New method.
5517         <swap>: New method.
5518         (struct dwarf2_frame_state): Delete dtor.
5519         (dwarf2_frame_state_alloc_regs): Remove declaration.
5520         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5521         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5522
5523 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5524
5525         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5526         (dwarf2_frame_state::dwarf2_frame_state): New.
5527         (dwarf2_frame_state::~dwarf2_frame_state): New.
5528         (dwarf2_fetch_cfa_info): Update.
5529         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
5530         rather than a pointer.  Update code.
5531         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5532         dtor.
5533         <data_align, code_align, retaddr_column>: Change them to const.
5534         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5535         to bool.
5536
5537 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5538
5539         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5540         <loc.exp>: New field.
5541         * dwarf2-frame.c (execute_cfa_program): Update.
5542         (dwarf2_frame_prev_register): Update.
5543
5544 2017-08-10  Pedro Alves  <palves@redhat.com>
5545
5546         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5547
5548 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5549
5550         * fbsd-nat.c (struct fbsd_fork_info): Remove.
5551         (fbsd_pending_children): Use std::list.
5552         (fbsd_remember_child): Likewise.
5553         (fbsd_is_child_pending): Likewise.
5554         (fbsd_pending_vfork_done): Use std::forward_list.
5555         (fbsd_add_vfork_done): Likewise.
5556         (fbsd_is_vfork_done_pending): Likewise.
5557         (fbsd_next_vfork_done): Likewise.
5558
5559 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5560
5561         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5562         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5563         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5564         for `mapfilename'.
5565         (fbsd_xfer_partial): Use gdb::byte_vector.
5566         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5567
5568 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
5569
5570         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5571         "filestuff.h".
5572         (fbsd_find_memory_regions): Fix `mapfile' initialization.
5573
5574 2017-08-09  Tom Tromey  <tom@tromey.com>
5575
5576         * skip.c (skiplist_entry): New constructor.
5577         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5578         (skiplist_entry::file_is_glob): Now bool.
5579         (skiplist_entry::file, skiplist_entry::function): Now
5580         std::string.
5581         (make_skip_entry): Return a unique_ptr.  Use new.
5582         (free_skiplist_entry, free_skiplist_entry_cleanup)
5583         (make_free_skiplist_entry_cleanup): Remove.
5584         (skip_command, skip_disable_command, add_skiplist_entry)
5585         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5586         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5587         (function_name_is_marked_for_skip): Update.
5588         (skip_delete_command): Update.  Use delete.
5589
5590 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
5591
5592         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5593         (aarch64_linux_core_read_description): New function.
5594         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5595
5596 2017-08-09  Pedro Alves  <palves@redhat.com>
5597
5598         * cp-name-parser.y (cp_comp_to_string): Return a
5599         gdb::unique_xmalloc_ptr<char>.
5600         * cp-support.c (replace_typedefs_qualified_name)
5601         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5602         (cp_canonicalize_string_full): Use op= instead of explicit
5603         convertion.
5604         (cp_class_name_from_physname, method_name_from_physname)
5605         (cp_func_name, cp_remove_params): Adjust to use
5606         gdb::unique_xmalloc_ptr<char>.
5607         * cp-support.h (cp_comp_to_string): Return a
5608         gdb::unique_xmalloc_ptr<char>.
5609         * python/py-type.c (typy_lookup_type): Adjust to use
5610         gdb::unique_xmalloc_ptr<char>.
5611
5612 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5613
5614         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5615
5616 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
5617             Yao Qi  <yao.qi@linaro.org>
5618
5619         * cp-support.c (cp_canonicalize_string_full): Use
5620         gdb::unique_xmalloc_ptr<char>.
5621         (cp_canonicalize_string): Likewise.
5622
5623 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5624
5625         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5626         * regformats/i386/amd64-avx-avx512.dat: Remove.
5627         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5628         * regformats/i386/amd64-avx-mpx.dat:Remove.
5629         * regformats/i386/amd64-avx.dat: Remove.
5630         * regformats/i386/amd64-mpx.dat: Remove.
5631         * regformats/i386/i386-avx-avx512.dat: Remove.
5632         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5633         * regformats/i386/i386-avx-mpx.dat: Remove.
5634         * regformats/i386/i386-mmx.dat: Remove.
5635         * regformats/i386/i386-mpx.dat: Remove.
5636
5637 2017-08-09  Yao Qi  <yao.qi@linaro.org>
5638
5639         * amd64-tdep.h (tdesc_x32): Remove the declaration.
5640         * amd64-tdep.c: Don't include features/i386/x32*.c.
5641         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5642         functions.
5643         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5644         and i386/x32-avx-avx512.
5645         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5646         and i386/x32.xml.
5647         * features/i386/x32-avx-avx512.c: Removed.
5648         * features/i386/x32-avx-avx512.xml: Removed.
5649         * features/i386/x32-avx.c: Removed.
5650         * features/i386/x32-avx.xml: Removed.
5651         * features/i386/x32.c: Removed.
5652         * features/i386/x32.xml: Removed.
5653         * regformats/i386/x32-avx-avx512.dat: Removed.
5654         * regformats/i386/x32-avx.dat: Removed.
5655         * regformats/i386/x32.dat: Removed.
5656
5657 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5658
5659         PR breakpoints/21886
5660         * mem-break.c (default_memory_insert_breakpoint): Use
5661         `->placed_address' rather than `->reqstd_address' for the
5662         breakpoint location.
5663
5664 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5665
5666         * arch-utils.c (default_print_insn): Remove arch/mach/endian
5667         assertions.
5668
5669 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
5670
5671         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5672         a union of `tdep_info', `tdesc_data' and `id'.
5673         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5674         rather than `info.tdep_info'.
5675         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5676         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5677         * i386-tdep.c (i386_gdbarch_init): Likewise.
5678         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5679         * mips-tdep.c (mips_gdbarch_init): Likewise.
5680         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5681         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5682         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5683         `info.tdep_info'.
5684         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5685         `info.tdep_info'.
5686         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5687         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5688         `info.tdep_info'.
5689         * spu-tdep.c (spu_gdbarch_init): Likewise.
5690         * gdbarch.h: Regenerate.
5691
5692 2017-08-07  Leszek Swirski  <leszeks@google.com>
5693
5694         PR symtab/20899
5695         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5696
5697 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5698
5699         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5700         (gdbsim_open): Rename gdb_argv args object to argv.
5701
5702 2017-08-05  Tom Tromey  <tom@tromey.com>
5703
5704         * compile/compile-object-load.c (compile_object_load): Use
5705         gdb::unique_xmalloc_ptr.
5706         * cli/cli-dump.c (scan_filename): Rename from
5707         scan_filename_with_cleanup.  Change return type.
5708         (scan_expression): Rename from scan_expression_with_cleanup.
5709         Change return type.
5710         (dump_memory_to_file, dump_value_to_file, restore_command):
5711         Use gdb::unique_xmalloc_ptr.  Update.
5712         * cli/cli-cmds.c (find_and_open_script): Use
5713         gdb::unique_xmalloc_ptr.
5714         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5715         * symmisc.c (maintenance_print_symbols)
5716         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5717         * symfile.c (symfile_bfd_open, generic_load)
5718         (add_symbol_file_command, remove_symbol_file_command): Use
5719         gdb::unique_xmalloc_ptr.
5720         * source.c (openp): Use gdb::unique_xmalloc_ptr.
5721         * psymtab.c (maintenance_print_psymbols): Use
5722         gdb::unique_xmalloc_ptr.
5723         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5724         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5725         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5726         (reload_shared_libraries_1): Likewise.
5727
5728 2017-08-05  Tom Tromey  <tom@tromey.com>
5729
5730         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5731         (rust_op_vector, rust_set_vector): New typedefs.
5732         (current_parser): New global.
5733         (work_obstack): Change to pointer type.  Update all users.
5734         (rust_ast, pstate): Remove globals.
5735         (struct rust_parser): New.
5736         (%union) <params, field_inits>: Change type.
5737         (start, tuple_expr, unit_expr, struct_expr_list, literal)
5738         (field_expr, expr_list, maybe_expr_list, type_list): Update.
5739         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5740         (convert_params_to_types, convert_params_to_expression): Change
5741         type of "params".
5742         (ast_string): Change type of "fields".
5743         (rust_parse): Make a rust_parser.  Remove cleanups.
5744         (rust_lex_tests): Make and install an auto_obstack.
5745
5746 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5747
5748         * configure.srv (ipa_x32_linux_regobj): New.
5749         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5750         instead of X86_TDESC_AVX512.
5751         (initialize_low_tracepoint): Call
5752         init_registers_x32_avx_avx512_linux.
5753
5754 2017-08-04  Yao Qi  <yao.qi@linaro.org>
5755
5756         * utils.h (gdb_argv): Add namespace std for nullptr_t.
5757
5758 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5759
5760         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5761
5762 2017-08-03  Tom Tromey  <tom@tromey.com>
5763
5764         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5765         Remove.
5766         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5767
5768 2017-08-03  Tom Tromey  <tom@tromey.com>
5769
5770         * python/py-param.c (compute_enum_values): Use gdb_argv.
5771
5772 2017-08-03  Tom Tromey  <tom@tromey.com>
5773
5774         * utils.h (struct gdb_argv_deleter): New.
5775         (gdb_argv): New class.
5776         * utils.c (gdb_argv::reset): New method.
5777         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5778         * tracefile.c (tsave_command): Use gdb_argv.
5779         * top.c (new_ui_command): Use gdb_argv.
5780         * symmisc.c (maintenance_print_symbols)
5781         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5782         * symfile.c (symbol_file_command, generic_load)
5783         (remove_symbol_file_command): Use gdb_argv.
5784         * stack.c (backtrace_command): Use gdb_argv.
5785         * source.c (add_path, show_substitute_path_command)
5786         (unset_substitute_path_command, set_substitute_path_command):
5787         Use gdb_argv.
5788         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
5789         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5790         * remote.c (extended_remote_run, remote_put_command)
5791         (remote_get_command, remote_delete_command): Use gdb_argv.
5792         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5793         (gdbsim_open): Use gdb_argv.
5794         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5795         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5796         * procfs.c (procfs_info_proc): Use gdb_argv.
5797         * interps.c (interpreter_exec_cmd): Use gdb_argv.
5798         * infrun.c (handle_command): Use gdb_argv.
5799         * inferior.c (add_inferior_command, clone_inferior_command):
5800         Use gdb_argv.
5801         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5802         * exec.c (exec_file_command): Use gdb_argv.
5803         * cli/cli-cmds.c (alias_command): Use gdb_argv.
5804         * compile/compile.c (build_argc_argv): Use gdb_argv.
5805
5806 2017-08-03  Tom Tromey  <tom@tromey.com>
5807
5808         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5809
5810 2017-08-03  Tom Tromey  <tom@tromey.com>
5811
5812         * python/python.c (compute_python_string): Return std::string.
5813         (gdbpy_eval_from_control_command): Update.
5814         (do_start_initialization): Use std::string.
5815         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5816         xstrprintf.
5817         * python/py-breakpoint.c (local_setattro): Use string_printf, not
5818         xstrprintf.
5819
5820 2017-08-03  Tom Tromey  <tom@tromey.com>
5821
5822         * top.h (do_restore_instream_cleanup): Remove.
5823         * top.c (do_restore_instream_cleanup): Remove.
5824         (read_command_file): Use scoped_restore.
5825         * cli/cli-script.c (execute_user_command): Use scoped_restore.
5826
5827 2017-08-03  Tom Tromey  <tom@tromey.com>
5828
5829         * cli/cli-script.c (execute_user_command)
5830         (execute_control_command): Use scoped_restore.
5831
5832 2017-08-03  Tom Tromey  <tom@tromey.com>
5833
5834         * cli/cli-script.c (do_restore_user_call_depth): Remove.
5835         (execute_user_command): Remove user_call_depth; use
5836         user_args_stack's size instead.
5837
5838 2017-08-03  Tom Tromey  <tom@tromey.com>
5839
5840         * top.h (in_user_command): Remove.
5841         * top.c (in_user_command): Remove.
5842         * cli/cli-script.c (do_restore_user_call_depth)
5843         (execute_user_command): Update.
5844
5845 2017-08-03  Tom Tromey  <tom@tromey.com>
5846
5847         * valops.c (search_struct_method): Use gdb::byte_vector.
5848         * valarith.c (value_concat): Use std::vector.
5849         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5850         (simple_search_memory): Likewise.
5851         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5852         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5853         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5854         * elfread.c (elf_rel_plt_read): Use std::string.
5855         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5856         * cli/cli-dump.c (restore_section_callback): Use
5857         gdb::byte_vector.
5858
5859 2017-08-03  Tom Tromey  <tom@tromey.com>
5860
5861         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5862
5863 2017-08-03  Tom Tromey  <tom@tromey.com>
5864
5865         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5866         (tui_register_format): Use scoped_restore.
5867
5868 2017-08-03  Tom Tromey  <tom@tromey.com>
5869
5870         * reverse.c (exec_direction_default): Remove.
5871         (exec_reverse_once): Use scoped_restore.
5872         * remote.c (restore_remote_timeout): Remove.
5873         (remote_flash_erase, remote_flash_write, remote_flash_done)
5874         (readchar, remote_serial_write): Use scoped_restore.
5875         * cli/cli-script.c (struct source_cleanup_lines_args)
5876         (source_cleanup_lines): Remove.
5877         (script_from_file): Use scoped_restore.
5878         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5879         (source_command): Use scoped_restore.
5880
5881 2017-08-03  Tom Tromey  <tom@tromey.com>
5882
5883         * utils.h (make_cleanup_free_so): Remove.
5884         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5885         * solist.h (struct so_deleter): New.
5886         (so_list_up): New typedef.
5887         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5888
5889 2017-08-03  Tom Tromey  <tom@tromey.com>
5890
5891         * utils.h (make_cleanup_restore_current_language): Remove.
5892         * utils.c (do_restore_current_language)
5893         (make_cleanup_restore_current_language): Remove.
5894         * parse.c (parse_exp_in_context_1)
5895         (parse_expression_with_language): Use
5896         scoped_restore_current_language.
5897         * mi/mi-main.c (mi_cmd_execute): Use
5898         scoped_restore_current_language.
5899         * language.h (scoped_restore_current_language): New class.
5900
5901 2017-08-03  Tom Tromey  <tom@tromey.com>
5902
5903         * compile/compile.c (cleanup_unlink_file): Remove.
5904         (compile_to_object): Use gdb::unlinker.
5905         (eval_compile_command): Likewise.
5906
5907 2017-08-03  Tom Tromey  <tom@tromey.com>
5908
5909         * utils.h (make_cleanup_fclose): Remove.
5910         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5911
5912 2017-08-03  Tom Tromey  <tom@tromey.com>
5913
5914         * top.c (open_terminal_stream): Return gdb_file_up.
5915         (new_ui_command): Update.
5916
5917 2017-08-03  Tom Tromey  <tom@tromey.com>
5918
5919         * source.c (print_source_lines_base, forward_search_command)
5920         (reverse_search_command): Use gdb_file_up.
5921
5922 2017-08-03  Tom Tromey  <tom@tromey.com>
5923
5924         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5925
5926 2017-08-03  Tom Tromey  <tom@tromey.com>
5927
5928         * cli/cli-cmds.c (find_and_open_script): Change return type.
5929         Remove "streamp" and "full_path" parameters.
5930         (source_script_with_search): Update.
5931         * auto-load.c (source_script_file): Update.
5932         * cli/cli-cmds.h (find_and_open_script): Change type.
5933         (open_script): New struct.
5934
5935 2017-08-03  Tom Tromey  <tom@tromey.com>
5936
5937         * xml-support.c (xml_fetch_content_from_file): Update.
5938         * ui-file.c (stdio_file::open): Update.
5939         * tracefile-tfile.c (tfile_start): Update.
5940         * remote.c (remote_file_put, remote_file_get): Update.
5941         * nat/linux-procfs.c (linux_proc_get_int)
5942         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5943         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5944         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5945         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5946         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5947         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5948         * linux-nat.c (linux_proc_pending_signals): Update.
5949         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5950         (file_closer): Remove.
5951         * compile/compile.c (compile_to_object): Update.
5952         * common/filestuff.h (struct gdb_file_deleter): New.
5953         (gdb_file_up): New typedef.
5954         (gdb_fopen_cloexec): Change return type.
5955         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5956         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5957         (dump_binary_file, restore_binary_file): Update.
5958         * auto-load.c (auto_load_objfile_script_1): Update.
5959
5960 2017-08-03  Tom Tromey  <tom@tromey.com>
5961
5962         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5963         (info_static_tracepoint_markers_command): Likewise.
5964         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5965         * skip.c (skip_info): Use ui_out_emit_table.
5966         * progspace.c (print_program_space): Use ui_out_emit_table.
5967         * osdata.c (info_osdata): Use ui_out_emit_table.
5968         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5969         ui_out_emit_table.
5970         * linux-thread-db.c (info_auto_load_libthread_db): Use
5971         ui_out_emit_table.
5972         * inferior.c (print_inferior): Use ui_out_emit_table.
5973         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5974         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5975         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5976         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5977         * ui-out.h (class ui_out_emit_table): New.
5978
5979 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5980
5981         * mips-tdep.c (mips_fpu_type_str): New function.
5982         (mips_dump_tdep): Call it.
5983
5984 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5985
5986         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5987         `->mips_fpu_type'.
5988
5989 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5990
5991         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5992
5993 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5994
5995         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5996
5997 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5998
5999         * cli/cli-cmds.c (maintenancechecklist): New variable.
6000         * gdbcmd.h (maintenancechecklist): Declare it.
6001         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6002         Call i386_linux_read_description with different masks.
6003         * maint.c (maintenance_check_command): New function.
6004         (_initialize_maint_cmds): Call add_prefix_cmd.
6005         * target-descriptions.c (tdesc_reg): override operator != and ==.
6006         (tdesc_type): Likewise.
6007         (tdesc_feature): Likewise.
6008         (target_desc): Likewise.
6009         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6010         (maintenance_check_xml_descriptions): New function.
6011         (_initialize_target_descriptions) Add command "xml-descriptions".
6012         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6013
6014 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6015
6016         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6017         Include features/i386/32bit-*.c.
6018         (i386_linux_read_description): Generate target description if it
6019         doesn't exist.
6020         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6021         functions.
6022         * features/i386/32bit-linux.c: Re-generated.
6023         * features/i386/32bit-sse.c: Likewise.
6024         * target-descriptions.c (print_c_feature::visit): Print code to
6025         set register number if needed.
6026         (print_c_feature) <m_next_regnum>: New field.
6027
6028 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6029
6030         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6031         (FEATURE_XMLFILES): New.
6032         (FEATURE_CFILES): New.
6033         New rules.
6034         (clean-cfiles): Remove generated c files.
6035         * features/i386/32bit-avx.c: Generated.
6036         * features/i386/32bit-avx512.c: Generated.
6037         * features/i386/32bit-core.c: Generated.
6038         * features/i386/32bit-linux.c: Generated.
6039         * features/i386/32bit-mpx.c: Generated.
6040         * features/i386/32bit-pkeys.c: Generated.
6041         * features/i386/32bit-sse.c: Generated.
6042         * target-descriptions.c: Include algorithm.
6043         (tdesc_element_visitor): Add method visit_end.
6044         (print_c_tdesc): Implement visit_end.
6045         (print_c_tdesc:: m_filename_after_features): Move it to
6046         protected.
6047         (print_c_feature): New class.
6048         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6049         name starts with "i386/32bit-".
6050
6051 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6052
6053         * target-descriptions.c (tdesc_element_visitor): New class.
6054         (tdesc_element): New class.
6055         (tdesc_reg): Inherit from tdesc_element.
6056         (tdesc_reg::accept): New function.
6057         (tdesc_type): Inherit from tdesc_element.
6058         (tdesc_type::accept): New function.
6059         (tdesc_feature): Inherit from tdesc_element.
6060         (tdesc_feature::accept): New function.
6061         (target_desc): Inherit from tdesc_element.
6062         (target_desc::target_desc): New.
6063         (target_desc::~target_desc): New.
6064         (target_desc::accept): New.
6065         (allocate_target_description): Use new.
6066         (free_target_description): Use delete.
6067         (print_c_tdesc): New class.
6068         (maint_print_c_tdesc_cmd): Adjust.
6069
6070         * features/aarch64.c: Re-generated.
6071         * features/arc-arcompact.c: Re-generated.
6072         * features/arc-v2.c: Re-generated.
6073         * features/arm/arm-with-iwmmxt.c: Re-generated.
6074         * features/arm/arm-with-m.c: Re-generated.
6075         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6076         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6077         * features/arm/arm-with-neon.c: Re-generated.
6078         * features/arm/arm-with-vfpv2.c: Re-generated.
6079         * features/arm/arm-with-vfpv3.c: Re-generated.
6080         * features/i386/amd64-avx-avx512.c: Re-generated.
6081         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6082         * features/i386/amd64-avx.c: Re-generated.
6083         * features/i386/amd64-avx-linux.c: Re-generated.
6084         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6085         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6086         * features/i386/amd64-avx-mpx.c: Re-generated.
6087         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6088         * features/i386/amd64.c: Re-generated.
6089         * features/i386/amd64-linux.c: Re-generated.
6090         * features/i386/amd64-mpx.c: Re-generated.
6091         * features/i386/amd64-mpx-linux.c: Re-generated.
6092         * features/i386/i386-avx-avx512.c: Re-generated.
6093         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6094         * features/i386/i386-avx.c: Re-generated.
6095         * features/i386/i386-avx-linux.c: Re-generated.
6096         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6097         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6098         * features/i386/i386-avx-mpx.c: Re-generated.
6099         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6100         * features/i386/i386.c: Re-generated.
6101         * features/i386/i386-linux.c: Re-generated.
6102         * features/i386/i386-mmx.c: Re-generated.
6103         * features/i386/i386-mmx-linux.c: Re-generated.
6104         * features/i386/i386-mpx.c: Re-generated.
6105         * features/i386/i386-mpx-linux.c: Re-generated.
6106         * features/i386/x32-avx-avx512.c: Re-generated.
6107         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6108         * features/i386/x32-avx.c: Re-generated.
6109         * features/i386/x32-avx-linux.c: Re-generated.
6110         * features/i386/x32.c: Re-generated.
6111         * features/i386/x32-linux.c: Re-generated.
6112         * features/microblaze.c: Re-generated.
6113         * features/microblaze-with-stack-protect.c: Re-generated.
6114         * features/mips64-dsp-linux.c: Re-generated.
6115         * features/mips64-linux.c: Re-generated.
6116         * features/mips-dsp-linux.c: Re-generated.
6117         * features/mips-linux.c: Re-generated.
6118         * features/nds32.c: Re-generated.
6119         * features/nios2.c: Re-generated.
6120         * features/nios2-linux.c: Re-generated.
6121         * features/rs6000/powerpc-32.c: Re-generated.
6122         * features/rs6000/powerpc-32l.c: Re-generated.
6123         * features/rs6000/powerpc-403.c: Re-generated.
6124         * features/rs6000/powerpc-403gc.c : Re-generated.
6125         * features/rs6000/powerpc-405.c: Re-generated.
6126         * features/rs6000/powerpc-505.c: Re-generated.
6127         * features/rs6000/powerpc-601.c: Re-generated.
6128         * features/rs6000/powerpc-602.c: Re-generated.
6129         * features/rs6000/powerpc-603.c: Re-generated.
6130         * features/rs6000/powerpc-604.c: Re-generated.
6131         * features/rs6000/powerpc-64.c: Re-generated.
6132         * features/rs6000/powerpc-64l.c: Re-generated.
6133         * features/rs6000/powerpc-7400.c: Re-generated.
6134         * features/rs6000/powerpc-750.c: Re-generated.
6135         * features/rs6000/powerpc-860.c: Re-generated.
6136         * features/rs6000/powerpc-altivec32.c: Re-generated.
6137         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6138         * features/rs6000/powerpc-altivec64.c: Re-generated.
6139         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6140         * features/rs6000/powerpc-cell32l.c: Re-generated.
6141         * features/rs6000/powerpc-cell64l.c: Re-generated.
6142         * features/rs6000/powerpc-e500.c: Re-generated.
6143         * features/rs6000/powerpc-e500l.c: Re-generated.
6144         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6145         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6146         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6147         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6148         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6149         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6150         * features/rs6000/powerpc-vsx32.c: Re-generated.
6151         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6152         * features/rs6000/powerpc-vsx64.c: Re-generated.
6153         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6154         * features/rs6000/rs6000.c: Re-generated.
6155         * features/s390-linux32.c: Re-generated.
6156         * features/s390-linux32v1.c: Re-generated.
6157         * features/s390-linux32v2.c: Re-generated.
6158         * features/s390-linux64.c: Re-generated.
6159         * features/s390-linux64v1.c: Re-generated.
6160         * features/s390-linux64v2.c: Re-generated.
6161         * features/s390-te-linux64.c: Re-generated.
6162         * features/s390-tevx-linux64.c: Re-generated.
6163         * features/s390-vx-linux64.c: Re-generated.
6164         * features/s390x-linux64.c: Re-generated.
6165         * features/s390x-linux64v1.c: Re-generated.
6166         * features/s390x-linux64v2.c: Re-generated.
6167         * features/s390x-te-linux64.c: Re-generated.
6168         * features/s390x-tevx-linux64.c: Re-generated.
6169         * features/s390x-vx-linux64.c: Re-generated.
6170         * features/sparc/sparc32-solaris.c: Re-generated.
6171         * features/sparc/sparc64-solaris.c: Re-generated.
6172         * features/tic6x-c62x.c: Re-generated.
6173         * features/tic6x-c62x-linux.c: Re-generated.
6174         * features/tic6x-c64x.c: Re-generated.
6175         * features/tic6x-c64x-linux.c: Re-generated.
6176         * features/tic6x-c64xp.c: Re-generated.
6177         * features/tic6x-c64xp-linux.c: Re-generated.
6178
6179 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6180
6181         * i386-linux-tdep.c (i386_linux_read_description): New function.
6182         (i386_linux_core_read_description): Call
6183         i386_linux_read_description.
6184         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6185         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6186         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6187         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6188         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6189         * x86-linux-nat.c (x86_linux_read_description): Call
6190         i386_linux_read_description.
6191
6192 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6193
6194         * NEWS: Mention it.
6195         * features/Makefile (%.c: %.xml): Pass the xml file name to
6196         command "maint print c-tdesc".
6197         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6198         name from 'arg'.
6199
6200 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6201
6202         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6203         in-class initialization.
6204         (tdesc_create_feature): Call new instead of XCNEW.
6205         (free_target_description): Ue delete.
6206
6207 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6208
6209         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6210
6211 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6212
6213         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6214         constant.
6215         (amd64_x32_init_abi): Likewise.
6216         * amd64-tdep.h (amd64_init_abi): Update declaration.
6217         (amd64_x32_init_abi): Likewise.
6218
6219 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6220
6221         PR tdep/21717
6222         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6223         condition for FPSCR.
6224         (arm_linux_store_inferior_registers): Likewise.
6225
6226 2017-07-22  Tom Tromey  <tom@tromey.com>
6227
6228         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6229         <syscalls_counts>: Now a std::vector.
6230         (get_catch_syscall_inferior_data): Use "new".
6231         (catch_syscall_inferior_data_cleanup): Use "delete".
6232         (insert_catch_syscall, remove_catch_syscall)
6233         (clear_syscall_counts): Update.
6234
6235 2017-07-22  Tom Tromey  <tom@tromey.com>
6236
6237         * break-catch-syscall.c (syscall_catchpoint)
6238         <syscalls_to_be_caught>: Now a std::vector<int>
6239         (~syscall_catchpoint): Remove.
6240         (insert_catch_syscall, remove_catch_syscall)
6241         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6242         (print_mention_catch_syscall, print_recreate_catch_syscall):
6243         Update.
6244         (create_syscall_event_catchpoint): Change type of "filter"
6245         parameter.
6246         (catch_syscall_split_args): Return a std::vector.
6247         (catch_syscall_command_1, catching_syscall_number_1): Update.
6248
6249 2017-07-22  Tom Tromey  <tom@tromey.com>
6250
6251         * break-catch-throw.c (struct exception_catchpoint)
6252         <exception_rx>: Now a std::string.
6253         (~exception_catchpoint): Remove.
6254         (print_one_detail_exception_catchpoint): Update.
6255         (handle_gnu_v3_exceptions): Change type of except_rx.
6256         (extract_exception_regexp): Return a std::string.
6257         (catch_exception_command_1): Update.
6258
6259 2017-07-22  Tom Tromey  <tom@tromey.com>
6260
6261         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6262         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6263         std::vector.
6264         <catch_all>: Now a bool.
6265         (~signal_catchpoint): Remove.
6266         (signal_catchpoint_insert_location)
6267         (signal_catchpoint_remove_location)
6268         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6269         (signal_catchpoint_print_mention)
6270         (signal_catchpoint_print_recreate)
6271         (signal_catchpoint_explains_signal): Update.
6272         (create_signal_catchpoint): Change type of "filter" and
6273         "catch_all".
6274         (catch_signal_split_args): Return a std::vector.  Change type of
6275         "catch_all".
6276         (catch_signal_command): Update.
6277
6278 2017-07-20  Pedro Alves  <palves@redhat.com>
6279
6280         * ada-lang.c (ada_language_defn): Make extern.
6281         (_initialize_ada_language): Remove add_language call.
6282         * c-lang.c (c_language_defn, cplus_language_defn)
6283         (asm_language_defn, minimal_language_defn): Make extern.
6284         (_initialize_c_language): Delete.
6285         * completer.c (compare_cstrings): Delete, moved to utils.h.
6286         * d-lang.c (d_language_defn): Make extern.
6287         (_initialize_d_language): Remove add_language calls.
6288         * defs.h (enum language): Add comment.
6289         * f-lang.c (f_language_defn): Make extern.
6290         (_initialize_f_language): Remove add_language call.
6291         * go-lang.c (go_language_defn): Make extern.
6292         (_initialize_go_language): Remove add_language call.
6293         * language.c: Include <algorithm>.
6294         (languages): Redefine as const array.
6295         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6296         (set_language_command): Handle "local".  Use for-range loop.
6297         (set_language): Remove loop.
6298         (language_enum): Rewrite.
6299         (language_def, language_str): Remove loops.
6300         (add_language): Delete.
6301         (add_set_language_command): New, based on add_languages.
6302         (skip_language_trampoline): Adjust.
6303         (local_language_defn): Delete.
6304         (language_gdbarch_post_init): Adjust.
6305         (_initialize_language): Remove add_language calls.  Call
6306         add_set_language_command.
6307         * language.h (add_language): Delete.
6308         (auto_language_defn)
6309         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6310         (asm_language_defn, c_language_defn, cplus_language_defn)
6311         (d_language_defn, f_language_defn, go_language_defn)
6312         (m2_language_defn, objc_language_defn, opencl_language_defn)
6313         (pascal_language_defn, rust_language_defn): Declare.
6314         * m2-lang.c (m2_language_defn): Make extern.
6315         (_initialize_m2_language): Remove add_language call.
6316         * objc-lang.c (objc_language_defn): Make extern.
6317         (_initialize_objc_language): Remove add_language call.
6318         * opencl-lang.c (opencl_language_defn): Make extern.
6319         (_initialize_opencl_language): Remove add_language call.
6320         * p-lang.c (pascal_language_defn): Make extern.
6321         (_initialize_pascal_language): Delete.
6322         * rust-lang.c (rust_language_defn): Make extern.
6323         (_initialize_rust_language): Delete.
6324         * utils.h (compare_cstrings): New static inline function.
6325
6326 2017-07-20  Pedro Alves  <palves@redhat.com>
6327
6328         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6329         (get_var_value): Constify parameters.
6330         (get_int_var_value): Change prototype.
6331         (to_fixed_range_type): Adjust.
6332         * ada-lang.h (get_int_var_value): Change prototype.
6333
6334 2017-07-20  Pedro Alves  <palves@redhat.com>
6335
6336         * dwarf2read.c (dw2_lookup_symbol): Use
6337         SYMBOL_MATCHES_SEARCH_NAME.
6338         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6339
6340 2017-07-20  Pedro Alves  <palves@redhat.com>
6341
6342         * block.c (block_iter_name_step, block_iter_name_first)
6343         (block_iter_name_next): Delete.
6344         (block_lookup_symbol_primary): Adjust to use
6345         dict_iter_match_first/dict_iter_match_next.
6346         * block.h (block_iter_name_first, block_iter_name_next): Delete
6347         declarations.
6348         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6349         dict_iter_match_first/dict_iter_match_next.
6350
6351 2017-07-20  Pedro Alves  <palves@redhat.com>
6352
6353         * cp-support.c (cp_find_first_component_aux): Add missing case for
6354         end of string.
6355
6356 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6357
6358         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6359         of dwo_cu's dwo_file.
6360
6361 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6362
6363         * remote.c (store_registers_using_G): Remove one line comment.
6364
6365 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6366
6367         * regcache.c (regcache_cpy): Simplify it.
6368         (regcache::cpy_no_passthrough): Remove it.
6369         * regcache.h (cpy_no_passthrough): Remove it.
6370         (regcache_dup, regcache_cpy): Update comments.
6371
6372 2017-07-18  Pedro Alves  <palves@redhat.com>
6373
6374         * remote-sim.c (sim_command_completer): Adjust to work with a
6375         completion_tracker instead of a VEC.
6376
6377 2017-07-17  Pedro Alves  <palves@redhat.com>
6378
6379         * completer.c (complete_source_filenames): New function.
6380         (complete_address_and_linespec_locations): New function.
6381         (location_completer): Use complete_address_and_linespec_locations.
6382         (completion_tracker::build_completion_result): Honor the tracker's
6383         request to suppress append.
6384         * completer.h (completion_tracker::suppress_append_ws)
6385         (completion_tracker::set_suppress_append_ws): New methods.
6386         (completion_tracker::m_suppress_append_ws): New field.
6387         (complete_source_filenames): New declaration.
6388         * linespec.c (linespec_complete_what): New.
6389         (struct ls_parser) <complete_what, completion_word,
6390         completion_quote_char, completion_quote_end, completion_tracker>:
6391         New fields.
6392         (string_find_incomplete_keyword_at_end): New.
6393         (linespec_lexer_lex_string): Record quote char.  If in completion
6394         mode, don't throw.
6395         (linespec_lexer_consume_token): Advance the completion word point.
6396         (linespec_lexer_peek_token): Save/restore completion info.
6397         (save_stream_and_consume_token): New.
6398         (set_completion_after_number): New.
6399         (linespec_parse_basic): Set what to complete next depending on
6400         token.  Handle function and label completions specially.
6401         (parse_linespec): Disable objc shortcut in completion mode.  Set
6402         what to complete next depending on token type.  Skip keyword if in
6403         completion mode.
6404         (complete_linespec_component, linespec_complete): New.
6405         * linespec.h (linespec_complete): Declare.
6406
6407 2017-07-17  Pedro Alves  <palves@redhat.com>
6408
6409         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6410         Handle 'operator<' / 'operator<<'.
6411
6412 2017-07-17  Pedro Alves  <palves@redhat.com>
6413
6414         * completer.c (collect_explicit_location_matches): Handle
6415         MATCH_LABEL.
6416         (convert_explicit_location_to_linespec): New, factored out from
6417         ...
6418         (convert_explicit_location_to_sals): ... this.
6419         (complete_label): New.
6420         (linespec_complete_label, find_label_symbols_in_block): New.
6421         (find_label_symbols): Add completion_mode parameter and adjust to
6422         call find_label_symbols_in_block.
6423         * linespec.h (linespec_complete_label): Declare.
6424
6425 2017-07-17  Pedro Alves  <palves@redhat.com>
6426
6427         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6428         complete_symbol_mode parameter.
6429         * cli/cli-cmds.c (complete_command): Get the completion result out
6430         of the handle_brkchars tracker if used a custom word point.
6431         * completer.c: Include "linespec.h".
6432         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6433         (advance_to_expression_complete_word_point): New.
6434         (completion_tracker::completes_to_completion_word): New.
6435         (complete_files_symbols): Pass down
6436         complete_symbol_mode::EXPRESSION.
6437         (explicit_options, probe_options): New.
6438         (collect_explicit_location_matches): Complete on the
6439         explictit_loc->foo instead of word.  Use
6440         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6441         keyword and options completions.
6442         (backup_text_ptr): Delete.
6443         (skip_keyword): New.
6444         (complete_explicit_location): Remove 'word' parameter.  Add
6445         language, quoted_arg_start and quoted_arg_end parameters.
6446         Rewrite, parsing left to right.
6447         (location_completer): Rewrite.
6448         (location_completer_handle_brkchars): New function.
6449         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6450         (enum complete_line_internal_reason): Adjust comments.
6451         (completion_tracker::discard_completions): New.
6452         (completer_handle_brkchars_func_for_completer): Handle
6453         location_completer.
6454         (gdb_custom_word_point_brkchars)
6455         (gdb_org_rl_basic_quote_characters): New.
6456         (gdb_completion_word_break_characters_throw)
6457         (completion_find_completion_word): Handle trackers that use a
6458         custom word point.
6459         (completion_tracker::advance_custom_word_point_by): New.
6460         (completion_tracker::build_completion_result): Don't rely on
6461         readline appending the quote char.
6462         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6463         use a custom word point.
6464         (gdb_rl_attempted_completion_function): Restore
6465         rl_basic_quote_characters.
6466         * completer.h (class completion_tracker): Extend intro comment.
6467         (completion_tracker::set_quote_char)
6468         (completion_tracker::quote_char)
6469         (completion_tracker::set_use_custom_word_point)
6470         (completion_tracker::use_custom_word_point)
6471         (completion_tracker::custom_word_point)
6472         (completion_tracker::set_custom_word_point)
6473         (completion_tracker::advance_custom_word_point_by)
6474         (completion_tracker::completes_to_completion_word)
6475         (completion_tracker::discard_completions): New methods.
6476         (completion_tracker::m_quote_char)
6477         (completion_tracker::m_use_custom_word_point)
6478         (completion_tracker::m_custom_word_point): New fields.
6479         (advance_to_expression_complete_word_point): Declare.
6480         * f-lang.c (f_collect_symbol_completion_matches): Add
6481         complete_symbol_mode parameter.
6482         * language.h (struct language_defn)
6483         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6484         parameter.
6485         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6486         (linespec_complete_function): New function.
6487         (linespec_lexer_lex_keyword): Adjust.
6488         * linespec.h (linespec_keywords, linespec_complete_function): New
6489         declarations.
6490         * location.c (find_end_quote): New function.
6491         (explicit_location_lex_one): Add explicit_completion_info
6492         parameter.  Save quoting info.  Don't throw if being called for
6493         completion.  Don't handle Ada operators here.
6494         (is_cp_operator, skip_op_false_positives, first_of)
6495         (explicit_location_lex_one_function): New function.
6496         (string_to_explicit_location): Replace 'dont_throw' parameter with
6497         an explicit_completion_info pointer parameter.  Handle it.  Don't
6498         use explicit_location_lex_one to lex function names.  Use
6499         explicit_location_lex_one_function instead.
6500         * location.h (struct explicit_completion_info): New.
6501         (string_to_explicit_location): Replace 'dont_throw' parameter with
6502         an explicit_completion_info pointer parameter.
6503         * symtab.c (default_collect_symbol_completion_matches_break_on):
6504         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
6505         (default_collect_symbol_completion_matches)
6506         (collect_symbol_completion_matches): Add complete_symbol_mode
6507         parameter.
6508         (collect_symbol_completion_matches_type): Pass down
6509         complete_symbol_mode::EXPRESSION.
6510         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6511         parameter.  Handle LINESPEC mode.
6512         * symtab.h (complete_symbol_mode): New.
6513         (default_collect_symbol_completion_matches_break_on)
6514         (default_collect_symbol_completion_matches)
6515         (collect_symbol_completion_matches)
6516         (collect_file_symbol_completion_matches): Add complete_symbol_mode
6517         parameter.
6518
6519 2017-07-17  Pedro Alves  <palves@redhat.com>
6520
6521         * utils.c (enum class strncmp_iw_mode): New.
6522         (strcmp_iw): Rename to ...
6523         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
6524         parameters.  Handle them.
6525         (strncmp_iw): New.
6526         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6527         * utils.h (strncmp_iw): Declare.
6528         (strcmp_iw): Move describing comments here.
6529
6530 2017-07-17  Pedro Alves  <palves@redhat.com>
6531
6532         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6533         CP_OPERATOR_STR.
6534         * c-typeprint.c (is_type_conversion_operator): Use
6535         CP_OPERATOR_STR.
6536         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6537         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6538         CP_OPERATOR_LEN.
6539         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6540         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6541         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6542         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6543         CP_OPERATOR_STR.
6544         * location.c: Include "cp-support.h".
6545         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6546         CP_OPERATOR_STR.
6547         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6548         CP_OPERATOR_LEN.
6549
6550 2017-07-17  Pedro Alves  <palves@redhat.com>
6551
6552         * cli/cli-cmds.c (complete_command): Use a completion tracker
6553         along with completion_find_completion_word for handle_brkchars
6554         phase.
6555         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6556         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6557         (struct gdb_rl_completion_word_info): New.
6558         (gdb_rl_find_completion_word): New.
6559         (completion_find_completion_word): New.
6560         * completer.h (completion_find_completion_word): Declare.
6561
6562 2017-07-17  Pedro Alves  <palves@redhat.com>
6563
6564         * ada-lang.c (symbol_completion_match): Adjust comments.
6565         (symbol_completion_add): Replace vector parameter with
6566         completion_tracker parameter.  Use it.
6567         (ada_make_symbol_completion_list): Rename to...
6568         (ada_collect_symbol_completion_matches): ... this.  Add
6569         completion_tracker parameter and use it.
6570         (ada_language_defn): Adjust.
6571         * break-catch-syscall.c (catch_syscall_completer): Adjust
6572         prototype and work with completion_tracker instead of VEC.
6573         * breakpoint.c (condition_completer): Adjust prototype and work
6574         with completion_tracker instead of VEC.
6575         * c-lang.c (c_language_defn, cplus_language_defn)
6576         (asm_language_defn, minimal_language_defn): Adjust to renames.
6577         * cli/cli-cmds.c (complete_command): Rework using
6578         completion_tracker.  Catch exceptions when completing.
6579         * cli/cli-decode.c (integer_unlimited_completer)
6580         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6581         with completion_tracker instead of VEC.
6582         * command.h (struct completion_tracker): Forward declare.
6583         (completer_ftype, completer_handle_brkchars_ftype): Change
6584         types.
6585         (complete_on_cmdlist, complete_on_enum): Adjust.
6586         * completer.c: Include <algorithm>.
6587         (struct gdb_completer_state): New.
6588         (current_completion): New global.
6589         (readline_line_completion_function): Delete.
6590         (noop_completer, filename_completer)
6591         (filename_completer_handle_brkchars, complete_files_symbols)
6592         (linespec_location_completer): Adjust to work with a
6593         completion_tracker instead of a VEC.
6594         (string_or_empty): New.
6595         (collect_explicit_location_matches): Adjust to work with a
6596         completion_tracker instead of a VEC.
6597         (explicit_location_completer): Rename to ...
6598         (complete_explicit_location): ... this and adjust to work with a
6599         completion_tracker instead of a VEC.
6600         (location_completer): Adjust to work with a completion_tracker
6601         instead of a VEC.
6602         (add_struct_fields): Adjust to work with a completion_list instead
6603         of VEC.
6604         (expression_completer): Rename to ...
6605         (complete_expression): ... this and adjust to work with a
6606         completion_tracker instead of a VEC.  Use complete_files_symbols.
6607         (expression_completer): Reimplement on top of complete_expression.
6608         (symbol_completer): Adjust to work with a completion_tracker
6609         instead of a VEC.
6610         (enum complete_line_internal_reason): Add describing comments.
6611         (complete_line_internal_normal_command): Adjust to work with a
6612         completion_tracker instead of a VEC.
6613         (complete_line_internal): Rename to ...
6614         (complete_line_internal_1): ... this and adjust to work with a
6615         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
6616         handle_brkchars phase.
6617         (new_completion_tracker): Delete.
6618         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6619         complete_line_internal_1.
6620         (free_completion_tracker): Delete.
6621         (INITIAL_COMPLETION_HTAB_SIZE): New.
6622         (completion_tracker::completion_tracker)
6623         (completion_tracker::~completion_tracker): New.
6624         (maybe_add_completion): Delete.
6625         (completion_tracker::maybe_add_completion)
6626         (completion_tracker::add_completion)
6627         (completion_tracker::add_completions): New.
6628         (throw_max_completions_reached_error): Delete.
6629         (complete_line): Adjust to work with a completion_tracker instead
6630         of a VEC.  Don't create a completion_tracker_t or check for max
6631         completions here.
6632         (command_completer, command_completer_handle_brkchars)
6633         (signal_completer, reg_or_group_completer_1)
6634         (reg_or_group_completer, default_completer_handle_brkchars):
6635         Adjust to work with a completion_tracker.
6636         (gdb_completion_word_break_characters_throw): New.
6637         (gdb_completion_word_break_characters): Reimplement.
6638         (line_completion_function): Delete.
6639         (completion_tracker::recompute_lowest_common_denominator)
6640         (expand_preserving_ws)
6641         (completion_tracker::build_completion_result)
6642         (completion_result::completion_result)
6643         (completion_result::completion_result)
6644         (completion_result::~completion_result)
6645         (completion_result::completion_result)
6646         (completion_result::release_match_list, compare_cstrings)
6647         (completion_result::sort_match_list)
6648         (completion_result::reset_match_list)
6649         (gdb_rl_attempted_completion_function_throw)
6650         (gdb_rl_attempted_completion_function): New.
6651         * completer.h (completion_list, struct completion_result)
6652         (class completion_tracker): New.
6653         (complete_line): Add completion_tracker parameter.
6654         (readline_line_completion_function): Delete.
6655         (gdb_rl_attempted_completion_function): New.
6656         (noop_completer, filename_completer, expression_completer)
6657         (location_completer, symbol_completer, command_completer)
6658         (signal_completer, reg_or_group_completer): Update prototypes.
6659         (completion_tracker_t, new_completion_tracker)
6660         (make_cleanup_free_completion_tracker): Delete.
6661         (enum maybe_add_completion_enum): Delete.
6662         (maybe_add_completion): Delete.
6663         (throw_max_completions_reached_error): Delete.
6664         * corefile.c (complete_set_gnutarget): Adjust to work with a
6665         completion_tracker instead of a VEC.
6666         * cp-abi.c (cp_abi_completer): Adjust to work with a
6667         completion_tracker instead of a VEC.
6668         * d-lang.c (d_language_defn): Adjust.
6669         * disasm.c (disassembler_options_completer): Adjust to work with a
6670         completion_tracker instead of a VEC.
6671         * f-lang.c (f_make_symbol_completion_list): Rename to ...
6672         (f_collect_symbol_completion_matches): ... this.  Adjust to work
6673         with a completion_tracker instead of a VEC.
6674         (f_language_defn): Adjust.
6675         * go-lang.c (go_language_defn): Adjust.
6676         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6677         Adjust to work with a completion_tracker instead of a VEC.
6678         * infrun.c (handle_completer): Likewise.
6679         * interps.c (interpreter_completer): Likewise.
6680         * interps.h (interpreter_completer): Likewise.
6681         * language.c (unknown_language_defn, auto_language_defn)
6682         (local_language_defn): Adjust.
6683         * language.h (language_defn::la_make_symbol_completion_list):
6684         Rename to ...
6685         (language_defn::la_collect_symbol_completion_matches): ... this
6686         and adjust to work with a completion_tracker instead of a VEC.
6687         * m2-lang.c (m2_language_defn): Adjust.
6688         * objc-lang.c (objc_language_defn): Adjust.
6689         * opencl-lang.c (opencl_language_defn): Adjust.
6690         * p-lang.c (pascal_language_defn): Adjust.
6691         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6692         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6693         with a completion_tracker.
6694         * rust-lang.c (rust_language_defn): Adjust.
6695         * symtab.c (free_completion_list, do_free_completion_list)
6696         (return_val, completion_tracker): Delete.
6697         (completion_list_add_name, completion_list_add_symbol)
6698         (completion_list_add_msymbol, completion_list_objc_symbol)
6699         (completion_list_add_fields, add_symtab_completions): Add
6700         completion_tracker parameter and use it.
6701         (default_make_symbol_completion_list_break_on_1): Rename to...
6702         (default_collect_symbol_completion_matches_break_on): ... this.
6703         Add completion_tracker parameter and use it instead of allocating
6704         a completion tracker here.
6705         (default_make_symbol_completion_list_break_on): Delete old
6706         implementation.
6707         (default_make_symbol_completion_list): Delete.
6708         (default_collect_symbol_completion_matches): New.
6709         (make_symbol_completion_list): Delete.
6710         (collect_symbol_completion_matches): New.
6711         (make_symbol_completion_type): Rename to ...
6712         (collect_symbol_completion_matches_type): ... this.  Add
6713         completion_tracker parameter and use it instead of VEC.
6714         (make_file_symbol_completion_list_1): Rename to...
6715         (collect_file_symbol_completion_matches): ... this.  Add
6716         completion_tracker parameter and use it instead of VEC.
6717         (make_file_symbol_completion_list): Delete.
6718         (add_filename_to_list): Use completion_list instead of a VEC.
6719         (add_partial_filename_data::list): Now a completion_list.
6720         (make_source_files_completion_list): Work with a completion_list
6721         instead of a VEC.
6722         * symtab.h: Include "completer.h".
6723         (default_make_symbol_completion_list_break_on)
6724         (default_make_symbol_completion_list, make_symbol_completion_list)
6725         (make_symbol_completion_type, make_file_symbol_completion_list)
6726         (make_source_files_completion_list): Delete.
6727         (default_collect_symbol_completion_matches_break_on)
6728         (default_collect_symbol_completion_matches)
6729         (collect_symbol_completion_matches)
6730         (collect_symbol_completion_matches_type)
6731         (collect_file_symbol_completion_matches)
6732         (make_source_files_completion_list): New.
6733         * top.c (init_main): Don't install a rl_completion_entry_function
6734         hook.  Install a rl_attempted_completion_function hook instead.
6735         * tui/tui-layout.c (layout_completer): Adjust to work with a
6736         completion_tracker.
6737         * tui/tui-regs.c (tui_reggroup_completer):
6738         * tui/tui-win.c (window_name_completer, focus_completer)
6739         (winheight_completer): Adjust to work with a completion_tracker.
6740         * value.c: Include "completer.h".
6741         (complete_internalvar): Adjust to work with a completion_tracker.
6742         * value.h (complete_internalvar): Likewise.
6743
6744 2017-07-17  Pedro Alves  <palves@redhat.com>
6745
6746         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6747         renames.
6748         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6749         comments to completer_ftype's declaration.
6750         <completer_handle_brkchars>: Change type to
6751         completer_handle_brkchars_ftype.
6752         * command.h (completer_ftype): Add describing comment and give
6753         names to parameters.
6754         (completer_ftype_void): Rename to ...
6755         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
6756         (set_cmd_completer_handle_brkchars): Adjust.
6757         * completer.c (filename_completer_handle_brkchars): New function.
6758         (complete_line_internal_normal_command): New function, factored
6759         out from ...
6760         (complete_line_internal): ... here.
6761         (command_completer_handle_brkchars)
6762         (default_completer_handle_brkchars)
6763         (completer_handle_brkchars_func_for_completer): New functions.
6764         * completer.h (set_gdb_completion_word_break_characters): Delete
6765         declaration.
6766         (completer_handle_brkchars_func_for_completer): New declaration.
6767         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6768         completer_handle_brkchars_func_for_completer.
6769
6770 2017-07-17  Pedro Alves  <palves@redhat.com>
6771
6772         * completer.c (symbol_completer): New function, based on
6773         make_symbol_completion_list_fn.
6774         * completer.h (symbol_completer): New declaration.
6775         * guile/scm-cmd.c (cmdscm_completers): Adjust.
6776         * python/py-cmd.c (completers): Adjust.
6777         * symtab.c (make_symbol_completion_list_fn): Delete.
6778         * symtab.h (make_symbol_completion_list_fn): Delete.
6779         * cli/cli-decode.c (add_cmd): Adjust.
6780
6781 2017-07-17  Pedro Alves  <palves@redhat.com>
6782
6783         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6784         * dwarf2read.c: Include "filename-seen-cache.h".
6785         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6786         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6787         * filename-seen-cache.c: New file.
6788         * filename-seen-cache.h: New file.
6789         * symtab.c: Include "filename-seen-cache.h".
6790         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6791         (create_filename_seen_cache, clear_filename_seen_cache)
6792         (delete_filename_seen_cache, filename_seen): Delete, parts moved
6793         to filename-seen-cache.h/filename-seen-cache.c.
6794         (output_source_filename, sources_info)
6795         (maybe_add_partial_symtab_filename)
6796         (make_source_files_completion_list): Adjust to use
6797         filename_seen_cache.
6798
6799 2017-07-17  Pedro Alves  <palves@redhat.com>
6800
6801         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6802         fields.
6803         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6804         dwarf2_debug_sections*)): New.
6805         (dwarf2_per_objfile::dwarf2_per_objfile(const
6806         dwarf2_per_objfile&)): Declare as deleted.
6807         (dwarf2_per_objfile::operator=): Declare as deleted.
6808         (dwarf2_per_objfile::dwarf2_per_objfile)
6809         (dwarf2_per_objfile::~dwarf2_per_objfile)
6810         (dwarf2_per_objfile::free_cached_comp_units): New.
6811         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6812         ctor.  Call dwarf2_per_objfile's ctor manually.
6813         (dwarf2_locate_sections): Deleted/refactored as ...
6814         (dwarf2_per_objfile::locate_sections): ... this new method.
6815         (free_cached_comp_units): Defer to
6816         dwarf2_per_objfile::free_cached_comp_units.
6817         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6818
6819 2017-07-14  Tom Tromey  <tom@tromey.com>
6820
6821         PR rust/21764:
6822         * rust-exp.y (convert_ast_to_expression): Add "want_type"
6823         parameter.
6824         <UNOP_SIZEOF>: Split into separate case.
6825         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
6826
6827 2017-07-14  Tom Tromey  <tom@tromey.com>
6828
6829         PR rust/21763:
6830         * symtab.c (symbol_matches_domain): Add language_rust to special
6831         case.
6832         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6833         treat LOC_TYPEDEF symbols as variables.
6834
6835 2017-07-14  Pedro Alves  <palves@redhat.com>
6836
6837         * symtab.c (make_file_symbol_completion_list_1): Iterate over
6838         symtabs matching all symtabs with SRCFILE as file name instead of
6839         only considering the first hit, with lookup_symtab.
6840
6841 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6842
6843         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6844         operator_name parameters.
6845         (gen_expr): Update function call.
6846
6847 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6848
6849         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6850         parameter.
6851         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6852         Likewise.
6853         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6854         parameter, use agent_expr::gdbarch instead, update function
6855         calls.
6856         (locexpr_tracepoint_var_ref): Likewise.
6857         (loclist_tracepoint_var_ref): Likewise.
6858         * ax-gdb.c (gen_trace_static_fields): Likewise.
6859         (gen_traced_pop): Likewise.
6860         (gen_frame_args_address): Likewise.
6861         (gen_frame_locals_address): Likewise.
6862         (gen_var_ref): Likewise.
6863         (gen_struct_ref_recursive): Likewise.
6864         (gen_static_field): Likewise.
6865         (gen_maybe_namespace_elt): Likewise.
6866         (gen_expr): Likewise.
6867         (gen_trace_for_var): Likewise.
6868         (gen_trace_for_expr): Likewise.
6869         (gen_trace_for_return_address): Likewise.
6870
6871 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6872
6873         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6874         parameter.
6875         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6876
6877 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6878
6879         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6880         from ax, update calls.
6881         (gen_usual_arithmetic): Likewise.
6882         (gen_integral_promotions): Likewise.
6883         (gen_bitfield_ref): Likewise.
6884         (gen_primitive_field): Likewise.
6885         (gen_struct_ref_recursive): Likewise.
6886         (gen_struct_ref): Likewise.
6887         (gen_maybe_namespace_elt): Likewise.
6888         (gen_struct_elt_for_reference): Likewise.
6889         (gen_namespace_elt): Likewise.
6890         (gen_aggregate_elt_ref): Likewise.
6891         (gen_expr): Get gdbarch from ax, update calls.
6892         (gen_expr_binop_rest): Likewise.
6893
6894 2017-07-13  Pedro Alves  <palves@redhat.com>
6895
6896         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6897         as default tdesc.
6898         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6899         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6900         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6901         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6902         tdep.
6903         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6904         Get final tdesc from the tdep.
6905         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6906         default tdesc.
6907         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6908         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6909         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6910         Use it as default tdesc.
6911         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6912         down to amd_init_abi.  No longer handle fallback tdesc here.
6913         * amd64-tdep.h (tdesc_x32): Declare.
6914         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6915         parameter.
6916         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6917         as default tdesc.
6918
6919 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6920
6921         * s390-linux-tdep.c (s390_process_record): Add support for
6922         instructions new in arch12.
6923
6924 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6925
6926         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6927         PT_GETFSBASE and PT_GETGSBASE.
6928         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6929         PT_SETGSBASE.
6930
6931 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6932
6933         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6934         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6935         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6936         those rules.
6937         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6938         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6939         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6940         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6941         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6942         * features/i386/amd64.xml: Add 64bit-segments.xml.
6943         * features/i386/amd64-avx-avx512.c: Regenerated.
6944         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6945         * features/i386/amd64-avx-mpx.c: Regenerated.
6946         * features/i386/amd64-avx.c: Regenerated.
6947         * features/i386/amd64-mpx.c: Regenerated.
6948         * features/i386/amd64.c: Regenerated.
6949         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6950         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6951         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6952         * regformats/i386/amd64-avx.dat: Regenerated.
6953         * regformats/i386/amd64-mpx.dat: Regenerated.
6954         * regformats/i386/amd64.dat: Regenerated.
6955
6956 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6957
6958         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6959         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6960
6961 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6962
6963         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6964         unsetenv.
6965         * gnulib/aclocal.m4: Regenerate.
6966         * gnulib/config.in: Regenerate.
6967         * gnulib/configure: Regenerate.
6968         * gnulib/import/Makefile.am: Regenerate.
6969         * gnulib/import/Makefile.in: Regenerate.
6970         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6971         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6972         * gnulib/import/m4/environ.m4: New file.
6973         * gnulib/import/m4/setenv.m4: New file.
6974         * gnulib/import/setenv.c: New file.
6975         * gnulib/import/unsetenv.c: New file.
6976
6977 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6978
6979         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6980         address when op is DW_OP_addr.
6981
6982 2017-07-09  Tom Tromey  <tom@tromey.com>
6983
6984         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6985         check and apply to outer type.
6986
6987 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6988
6989         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6990         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6991         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6992         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6993
6994 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6995
6996         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6997
6998 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6999
7000         * corelow.c (get_core_siginfo): Remove.
7001         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7002         instead of get_core_siginfo.
7003         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7004         * gdbarch.h: Re-generate.
7005         * gdbarch.c: Re-generate.
7006         * linux-tdep.c (linux_core_xfer_siginfo): New.
7007         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7008
7009 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7010
7011         * corelow.c (thread_section_name): Move to ...
7012         * gdbcore.h (thread_section_name): ... here.
7013
7014 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7015
7016         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7017         (struct siginfo32): New.
7018         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7019         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7020         via ptrace(PT_LWPINFO).
7021
7022 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7023
7024         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7025         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7026         (fbsd_get_siginfo_type): New.
7027         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7028         (_initialize_fbsd_tdep): New.
7029
7030 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7031
7032         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7033         a singular dwo_unit*) to support multiple CUs in the same way that
7034         multiple TUs are supported.
7035         (create_cus_hash_table): Replace create_dwo_cu with a function for
7036         parsing multiple CUs from a DWO file.
7037         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7038         create_dwo_cu.
7039         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7040         htab_find, rather than comparing the signature to a singleton CU in
7041         the dwo_file.
7042
7043 2017-07-06  Pedro Alves  <palves@redhat.com>
7044
7045         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7046
7047 2017-07-04  Pedro Alves  <palves@redhat.com>
7048
7049         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7050         * gdbtypes.h (TYPE_STATIC): Delete.
7051         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7052         is_synchronized, is_native>: Delete.
7053         <dummy>: Bump.
7054         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7055         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7056         (TYPE_FN_FIELD_ABSTRACT): Delete.
7057
7058 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7059
7060         * buffer.h (buffer_finish): Fix spelling mistakes.
7061
7062 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7063
7064         * .dir-locals.el: Automatically switch to C-style comments in
7065         versions of Emacs that support the feature.
7066
7067 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7068             Pedro Alves  <palves@redhat.com>
7069
7070         PR cli/21688
7071         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7072         (process_next_line): New variable 'inline_cmd'.
7073         Adjust 'if' clauses for "python", "compile" and "guile" to use
7074         'command_name_equals' and check for '!inline_cmd'.
7075
7076 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7077
7078         PR cli/21688
7079         * cli/cli-script.c (command_name_equals_not_inline): New function.
7080         (process_next_line): Adjust 'if' clauses for "python", "compile"
7081         and "guile" to use command_name_equals_not_inline.
7082
7083 2017-06-29  Pedro Alves  <palves@redhat.com>
7084
7085         * completer.c (expression_completer): Call
7086         linespec_location_completer instead of location_completer.
7087
7088 2017-06-29  Pedro Alves  <palves@redhat.com>
7089
7090         * completer.c (expression_completer): Remove code that recomputes
7091         'text' from 'word'.
7092
7093 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7094
7095         * regformats/regdat.sh: Generate code with
7096         "ifndef IN_PROCESS_AGENT".
7097
7098 2017-06-28  Pedro Alves  <palves@redhat.com>
7099
7100         * command.h: Include "common/scoped_restore.h".
7101
7102 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7103
7104         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7105         instead of obstack_grow.
7106
7107 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7108
7109         PR gdb/21337
7110         * symfile.c (reread_symbols): Call objfiles_changed just before
7111         read_symbols.
7112
7113 2017-06-27  Pedro Alves  <palves@redhat.com>
7114
7115         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7116         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7117         (completion_list_add_symbol, completion_list_add_msymbol):
7118         ... these new functions.
7119         (add_symtab_completions)
7120         (default_make_symbol_completion_list_break_on_1): Adjust.
7121
7122 2017-06-27  Pedro Alves  <palves@redhat.com>
7123
7124         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7125         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7126         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7127         dtor.
7128         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7129         'storage_obstack' field an auto_obstack.  In-class initialize all
7130         non-bitfield fields.  Make minsyms_read bool.
7131         * symfile.c (read_symbols): Adjust.
7132
7133 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7134
7135         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7136         (gdbsim_store_register): Likewise.
7137
7138 2017-06-27  Pedro Alves  <palves@redhat.com>
7139
7140         * c-exp.y (name_obstack): Now an auto_obstack.
7141         (yylex): Use auto_obstack::clear.
7142         (c_parse): Use auto_obstack::clear instead of reinitializing and
7143         freeing the obstack.
7144         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7145         * d-exp.y (name_obstack): Now an auto_obstack.
7146         (yylex): Use auto_obstack::clear.
7147         (d_parse): Use auto_obstack::clear instead of reinitializing and
7148         freeing the obstack.
7149         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7150         auto_obstack.
7151         * dwarf2read.c (create_addrmap_from_index)
7152         (dwarf2_build_psymtabs_hard)
7153         (update_enumeration_type_from_children): Likewise.
7154         * gdb_obstack.h (auto_obstack): New type.
7155         * go-exp.y (name_obstack): Now an auto_obstack.
7156         (build_packaged_name): Use auto_obstack::clear.
7157         (go_parse): Use auto_obstack::clear instead of reinitializing and
7158         freeing the obstack.
7159         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7160         auto_obstack.
7161         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7162         * rust-exp.y (work_obstack): Now an auto_obstack.
7163         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7164         reinitializing and freeing the obstack.
7165         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7166         (host_char_to_target): Use auto_obstack.
7167         * utils.h (make_cleanup_obstack_free): Delete declaration.
7168         * valprint.c (generic_emit_char, generic_printstr): Use
7169         auto_obstack.
7170
7171 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7172
7173         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7174         thread.
7175         (darwin_init_thread_list): Don't update dummy thread.
7176         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7177
7178 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7179
7180         * record-full.c (netorder16): Remove.
7181
7182 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7183
7184         * common/diagnostics.h: Define macros for GCC.
7185         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7186         * common/vec.h: Include diagnostics.h.
7187         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7188         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7189         warning.
7190
7191 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7192
7193         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7194         New macro.
7195         * ada-lex.l: Ignore deprecated register warnings.
7196
7197 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7198
7199         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7200         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7201
7202 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7203
7204         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7205         its own line.
7206
7207 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7208
7209         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7210
7211 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7212
7213         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7214         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7215         (xtensa_register_read_masked): Likewise.
7216
7217 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7218
7219         * common/environ.c (gdb_environ::unset): Update comment.
7220
7221 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7222
7223         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7224         registers.
7225
7226 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7227
7228         * record-full.c (record_full_exec_insn): Use byte_vector.
7229
7230 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7231
7232         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7233         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7234
7235 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7236
7237         * remote.c (cached_reg): Move from here...
7238         * regcache.h (cached_reg): ...to here.
7239         * python/py-unwind.c (struct reg_info): Remove.
7240         (cached_frame_info): Use cached_reg_t.
7241         (pyuw_prev_register): Likewise.
7242         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7243         (pyuw_dealloc_cache): Free all registers.
7244
7245 2017-06-22  Pedro Alves  <palves@redhat.com>
7246             Simon Marchi  <simon.marchi@ericsson.com>
7247
7248         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7249         warning.
7250         * common/diagnostics.h: New file.
7251
7252 2017-06-22  Pedro Alves  <palves@redhat.com>
7253
7254         * common/agent.h: Add include guards.
7255
7256 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7257
7258         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7259         talk about addressable units instead of bytes.
7260
7261 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7262
7263         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7264         of '::const_iterator'.
7265
7266 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7267
7268         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7269         'unittests/environ-selftests.c'.
7270         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7271         * charset.c (find_charset_names): Declare object 'iconv_env'.
7272         Update code to use 'iconv_env' object.  Remove call to
7273         'free_environ'.
7274         * common/environ.c: Include <utility>.
7275         (make_environ): Delete function.
7276         (free_environ): Delete function.
7277         (gdb_environ::clear): New function.
7278         (gdb_environ::operator=): New function.
7279         (gdb_environ::get): Likewise.
7280         (environ_vector): Delete function.
7281         (set_in_environ): Delete function.
7282         (gdb_environ::set): New function.
7283         (unset_in_environ): Delete function.
7284         (gdb_environ::unset): New function.
7285         (gdb_environ::envp): Likewise.
7286         * common/environ.h: Include <vector>.
7287         (struct gdb_environ): Delete; transform into...
7288         (class gdb_environ): ... this class.
7289         (free_environ): Delete prototype.
7290         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7291         environ_vector): Likewise.
7292         * infcmd.c (run_command_1): Update code to call
7293         'envp' from 'gdb_environ' class.
7294         (environment_info): Update code to call methods from 'gdb_environ'
7295         class.
7296         (unset_environment_command): Likewise.
7297         (path_info): Likewise.
7298         (path_command): Likewise.
7299         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7300         (inferior::inferior): Initialize 'environment' using the host's
7301         information.
7302         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7303         Include "environ.h".
7304         (class inferior) <environment>: Change type from 'struct
7305         gdb_environ' to 'gdb_environ'.
7306         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7307         methods from 'gdb_environ' class.
7308         * solib.c (solib_find_1): Likewise
7309         * unittests/environ-selftests.c: New file.
7310
7311 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7312
7313         * features/i386/i386-linux.xml: Exchange the order of including
7314         32bit-linux.xml and 32bit-sse.xml.
7315         * features/i386/i386-linux.c: Regenerated.
7316
7317 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7318
7319         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7320         Delete copy ctor and assignment operator.
7321         (tdesc_type): Likewise.
7322         (tdesc_feature): Likewise.
7323         (tdesc_free_reg): Remove.
7324         (tdesc_create_reg): Use new.
7325         (tdesc_free_type): Remove.
7326         (tdesc_create_vector): Use new.
7327         (tdesc_create_union): Likewise.
7328         (tdesc_create_flags): Likewise.
7329         (tdesc_create_enum): Likewise.
7330         (tdesc_free_feature): Delete.
7331         (free_target_description): Use delete.
7332
7333 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7334
7335         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7336         registers.
7337
7338 2017-06-19  Pedro Alves  <palves@redhat.com>
7339
7340         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7341         after gdb::unlinker.
7342
7343 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7344
7345         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7346         gdb_environ to access an environment variable.
7347
7348 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7349
7350         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7351         gdb_byte*.
7352
7353 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7354
7355         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7356
7357 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7358
7359         * configure: Re-generate.
7360         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7361
7362 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7363
7364         * configure: Re-generate.
7365         * warning.m4: Pass -Werror to compiler when checking for
7366         supported warning flags.
7367
7368 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7369
7370         * Makefile.in (COMPILE.pre): Add "-x c++".
7371
7372 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7373             Pedro Alves  <palves@redhat.com>
7374             Yao Qi  <yao.qi@linaro.org>
7375
7376         * defs.h (RequireLongest): New.
7377         (extract_integer): Declare function template.
7378         (extract_signed_integer): Remove the declaration, but define it
7379         static inline.
7380         (extract_unsigned_integer): Likewise.
7381         (store_integer): Declare function template.
7382         (store_signed_integer): Remove the declaration, but define it
7383         static inline.
7384         (store_unsigned_integer): Likewise.
7385         * findvar.c (extract_integer): New function template.
7386         (extract_signed_integer): Remove.
7387         (extract_unsigned_integer): Remove.
7388         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7389         instantiations.
7390         (store_integer): New function template.
7391         (store_signed_integer): Remove.
7392         (store_unsigned_integer): Remove.
7393         (store_integer): Explicit instantiations.
7394         * regcache.c (regcache_raw_read_signed): Update.
7395         (regcache::raw_read): New function.
7396         (regcache::raw_read_signed): Remove.
7397         (regcache::raw_read_unsigned): Remove.
7398         (regcache_raw_read_unsigned): Update.
7399         (regcache_raw_write_unsigned): Update.
7400         (regcache::raw_write_signed): Remove.
7401         (regcache::raw_write): New function.
7402         (regcache_cooked_read_signed): Update.
7403         (regcache::raw_write_unsigned): Remove.
7404         (regcache::cooked_read_signed): Remove.
7405         (regcache_cooked_read_unsigned): Update.
7406         (regcache::cooked_read_unsigned): Remove.
7407         (regcache_cooked_write_signed): Update.
7408         (regcache_cooked_write_unsigned): Update.
7409         * regcache.h (regcache) <raw_read_signed>: Remove.
7410         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7411         <raw_read, raw_write>: New.
7412         <cooked_read_signed, cooked_write_signed>: Remove.
7413         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7414         <cooked_read, cooked_write>: New.
7415         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7416         (sh64_pseudo_register_write): Update.
7417
7418 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7419
7420         * arc-tdep.c (arc_disassembler_options): New variable.
7421         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7422         of default_print_insn.
7423         (arc_delayed_print_insn): Set info->section when needed,
7424         use default_print_insn to retrieve a disassembler.
7425
7426 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7427
7428         PR gdb/21574
7429         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7430         to mention $SHELL and startup-with-shell.
7431
7432 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7433
7434         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7435
7436 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7437
7438         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7439         default_print_insn instead of print_insn_aarch64.
7440         * arm-tdep.c (gdb_print_insn_arm): Call
7441         default_print_insn instead of print_insn_big_arm
7442         and print_insn_little_arm.
7443         * i386-tdep.c (i386_print_insn): Call default_print_insn
7444         instead of print_insn_i386.
7445         * ia64-tdep.c (ia64_print_insn): Call
7446         default_print_insn instead of print_insn_ia64.
7447         * mips-tdep.c (gdb_print_insn_mips): Call
7448         default_print_insn instead of print_insn_big_mips
7449         and print_insn_little_mips.
7450         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7451         instead of print_insn_spu.
7452
7453 2017-06-14  Pedro Alves  <palves@redhat.com>
7454
7455         * ada-lang.c: Include "common/byte-vector.h".
7456         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7457         * charset.c (wchar_iterator::iterate): Resize the vector instead
7458         of reserving it.
7459         * common/byte-vector.h: Include "common/def-vector.h".
7460         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7461         * cli/cli-dump.c: Include "common/byte-vector.h".
7462         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7463         * common/byte-vector.h: New file.
7464         * common/def-vector.h: New file.
7465         * common/default-init-alloc.h: New file.
7466         * dwarf2loc.c: Include "common/byte-vector.h".
7467         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7468         instead of reserving it.
7469         * dwarf2read.c: Include "common/byte-vector.h".
7470         (data_buf::m_vec): Now a gdb::byte_vector.
7471         * gdb_regex.c: Include "common/def-vector.h".
7472         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7473         * mi/mi-main.c: Include "common/byte-vector.h".
7474         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7475         * printcmd.c: Include "common/byte-vector.h".
7476         (print_scalar_formatted): Use gdb::byte_vector.
7477         * valprint.c: Include "common/byte-vector.h".
7478         (maybe_negate_by_bytes, print_decimal_chars): Use
7479         gdb::byte_vector.
7480
7481 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7482
7483         * darwin-nat.c: Include "nat/fork-inferior.h".
7484
7485 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7486
7487         * configure.nat: Factor out Darwin bits that are not
7488         architecture-specific.  Add fork-inferior.o.
7489
7490 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7491
7492         * configure.nat: Factor out AIX bits that are not
7493         architecture-specific.  Add fork-inferior.o.
7494
7495 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7496
7497         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
7498         (read_pieced_value, write_pieced_value): ...here.  Reduce to
7499         wrappers that just call rw_pieced_value.
7500
7501 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7502
7503         * dwarf2loc.c (write_pieced_value): When writing the data for a
7504         memory piece, use write_memory_with_notification instead of
7505         write_memory.
7506
7507 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7508
7509         * valops.c (read_value_memory): Change embedded_offset to
7510         represent a bit offset instead of a byte offset.
7511         * value.h (read_value_memory): Adjust comment.
7512
7513 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7514
7515         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7516         dest_offset_bits and source_offset_bits.
7517         (write_pieced_value): Likewise.
7518
7519 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7520
7521         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7522         given by DW_OP_bit_piece.
7523         (write_pieced_value): Likewise.
7524
7525 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7526
7527         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7528         some other preparations to the places where sufficient information
7529         is available.
7530         (write_pieced_value): Likewise.
7531
7532 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7533
7534         * dwarf2loc.c (bits_to_bytes): New function.
7535         (read_pieced_value): Fix offset calculations for register pieces
7536         on big-endian targets.
7537         (write_pieced_value): Likewise.
7538
7539 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7540
7541         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7542         (write_pieced_value): Likewise.
7543
7544 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7545
7546         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7547         transfer the source value's least significant bits, instead of its
7548         lowest-addressed ones.  Rename type_len to max_offset.
7549         (read_pieced_value): Mirror above changes to write_pieced_value as
7550         applicable.
7551
7552 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7553
7554         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7555         truncate full bytes from dest_offset_bits before using it as an
7556         offset into the buffer.
7557
7558 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7559
7560         * dwarf2loc.c (write_pieced_value): Include transfer size in
7561         byte-wise check.
7562
7563 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7564
7565         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7566         calculation of this_size.
7567
7568 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7569
7570         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7571         when targeting a bit-field.
7572         (write_pieced_value): Likewise.
7573
7574 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7575
7576         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7577         (allocate_piece_closure): Drop addr_size parameter.
7578         (dwarf2_evaluate_loc_desc_full): Adjust call to
7579         allocate_piece_closure.
7580
7581 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7582
7583         PR gdb/21226
7584         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7585         the LSB end, independent of endianness.
7586
7587 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7588
7589         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7590         size capping.
7591
7592 2017-06-13  Yao Qi  <yao.qi@linaro.org>
7593
7594         * mips-linux-nat.c: Move include features/mips*-linux.c to
7595         mips-linux-tdep.c.
7596         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7597         to mips-linux-tdep.c.
7598         * mips-linux-tdep.c: Include features/mips*-linux.c
7599         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7600         functions.
7601         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7602         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7603         (tdesc_mips64_dsp_linux): Declare.
7604
7605 2017-06-12  Tom Tromey  <tom@tromey.com>
7606
7607         * valprint.h (val_print_type_code_int): Remove.
7608         * valprint.c (generic_val_print_int): Always call
7609         val_print_scalar_formatted.
7610         (val_print_type_code_int): Remove.
7611         * printcmd.c (print_scalar_formatted): Handle options->format==0.
7612         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7613         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7614         * ada-valprint.c (ada_val_print_num): Use
7615         val_print_scalar_formatted.
7616
7617 2017-06-12  Tom Tromey  <tom@tromey.com>
7618
7619         * printcmd.c (print_scalar_formatted): Unify the two switches.
7620         Don't convert scalars to LONGEST.
7621
7622 2017-06-12  Tom Tromey  <tom@tromey.com>
7623
7624         PR exp/16225:
7625         * valprint.h (print_decimal_chars): Update.
7626         * valprint.c (maybe_negate_by_bytes): New function.
7627         (print_decimal_chars): Add "is_signed" argument.
7628         * printcmd.c (print_scalar_formatted): Update.
7629
7630 2017-06-12  Tom Tromey  <tom@tromey.com>
7631
7632         PR exp/16225:
7633         * valprint.h (print_binary_chars, print_hex_chars): Update.
7634         * valprint.c (val_print_type_code_int): Update.
7635         (print_binary_chars): Add "zero_pad" argument.
7636         (emit_octal_digit): New function.
7637         (print_octal_chars): Don't zero-pad.
7638         (print_decimal_chars): Likewise.
7639         (print_hex_chars): Add "zero_pad" argument.
7640         * sh64-tdep.c (sh64_do_fp_register): Update.
7641         * regcache.c (regcache::dump): Update.
7642         * printcmd.c (print_scalar_formatted): Update.
7643         * infcmd.c (default_print_one_register_info): Update.
7644
7645 2017-06-12  Pedro Alves  <palves@redhat.com>
7646             Alan Hayward  <alan.hayward@arm.com>
7647
7648         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7649         (mips_eabi_push_dummy_call): Rename local 'regsize' to
7650         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
7651         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7652         Assert that abi_regsize bytes fit in 'ref_valbuf'.
7653
7654 2017-06-12  Pedro Alves  <palves@redhat.com>
7655
7656         * dwarf2read.c (mapped_symtab::data): Now a vector of
7657         symtab_index_entry instead of vector of
7658         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
7659         whether an element's name is NULL instead of checking whether the
7660         element itself is NULL.
7661         (find_slot): Change return type.  Adjust.
7662         (hash_expand, , add_index_entry, uniquify_cu_indices)
7663         (write_hash_table): Adjust.
7664
7665 2017-06-12  Pedro Alves  <palves@redhat.com>
7666
7667         * dwarf2read.c (recursively_count_psymbols): New function.
7668         (write_psymtabs_to_index): Call it to compute number of psyms and
7669         pass estimate size of psyms_seen to unordered_set's ctor.
7670
7671 2017-06-12  Pedro Alves  <palves@redhat.com>
7672
7673         * dwarf2read.c (write_hash_table): Check if key already exists
7674         before emplacing.
7675
7676 2017-06-12  Pedro Alves  <palves@redhat.com>
7677
7678         * dwarf2read.c (data_buf::append_space): Rename to...
7679         (data_buf::grow): ... this, and make private.  Adjust all callers.
7680         (data_buf::append_uint): New method.
7681         (add_address_entry, write_one_signatured_type)
7682         (write_psymtabs_to_index): Use it.
7683
7684 2017-06-12  Pedro Alves  <palves@redhat.com>
7685
7686         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7687         (file_write (FILE *, const std::vector<Elem>&)): Delete.
7688         (data_buf::file_write): Call ::fwrite directly.
7689
7690 2017-06-12  Pedro Alves  <palves@redhat.com>
7691
7692         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7693         std::vector::erase.
7694
7695 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7696
7697         Code cleanup: C++ify .gdb_index producer.
7698         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7699         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7700         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7701         (create_strtab, add_string): Remove.
7702         (file_write, data_buf): New.
7703         (struct symtab_index_entry): Use std::vector for cu_indices.
7704         (struct mapped_symtab): Use std::vector for data.
7705         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7706         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7707         Remove.
7708         (find_slot): Change return type.  Update it to the new data structures.
7709         (hash_expand, add_index_entry): Update it to the new data structures.
7710         (offset_type_compare): Remove.
7711         (uniquify_cu_indices): Update it to the new data structures.
7712         (c_str_view, c_str_view_hasher, vector_hasher): New.
7713         (add_indices_to_cpool): Remove.
7714         (write_hash_table): Update it to the new data structures.
7715         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7716         (eq_psymtab_cu_index): Remove.
7717         (psym_index_map): New typedef.
7718         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7719         reference and std::unordered_map for cu_index_htab.
7720         (add_address_entry, add_address_entry_worker, write_address_map)
7721         (write_psymbols): Update it to the new data structures.
7722         (write_obstack): Remove.
7723         (struct signatured_type_index_data): Change types_list to a data_buf
7724         reference and psyms_seen to a std::unordered_set reference.
7725         (write_one_signatured_type, recursively_write_psymbols)
7726         (write_psymtabs_to_index): Update it to the new data structures.
7727
7728 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7729
7730         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7731         separate-debug-file commands.
7732         * symfile.h (separate_debug_file_debug): New global.
7733         * symfile.c (separate_debug_file_debug): New global.
7734         (separate_debug_file_exists, find_separate_debug_file): Add
7735         debug output.
7736         (_initialize_symfile): Add "set debug separate-debug-file"
7737         command.
7738         * build-id.c (build_id_to_debug_bfd,
7739         find_separate_debug_file_by_buildid): Add debug output.
7740
7741 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7742
7743         * gdbarch.sh (displaced_step_free_closure): Remove.
7744         * gdbarch.h, gdbarch.c: Re-generate.
7745         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7746         displaced_step_free_closure.
7747         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7748         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7749         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7750         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7751         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7752         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7753         * arch-utils.h (simple_displaced_step_free_closure): Remove.
7754         * arch-utils.c (simple_displaced_step_free_closure): Remove.
7755         * infrun.c (displaced_step_clear): Call xfree instead of
7756         gdbarch_displaced_step_free_closure.
7757
7758 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
7759
7760         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7761         NULL".
7762
7763 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
7764
7765         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7766         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7767         (mn10300_push_dummy_call): Likewise.
7768
7769 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7770
7771         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7772
7773 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
7774
7775         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7776
7777 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7778
7779         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7780         able to start inferiors using a shell.
7781         (New remote packets): Announce new packet "QStartupWithShell".
7782         * remote.c: Add PACKET_QStartupWithShell.
7783         (extended_remote_create_inferior): Handle new
7784         PACKET_QStartupWithShell.
7785         (remote_protocol_features) <QStartupWithShell>: New entry for
7786         PACKET_QStartupWithShell.
7787         (_initialize_remote): Call "add_packet_config_cmd" for
7788         QStartupShell.
7789
7790 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7791             Pedro Alves  <palves@redhat.com>
7792
7793         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7794         and "nat/fork-inferior.h".
7795         * common/common-inferior.h: New file, with contents from
7796         "gdb/inferior.h".
7797         * commom/common-utils.c: Include "common-utils.h".
7798         (stringify_argv): New function.
7799         * common/common-utils.h (stringify_argv): New prototype.
7800         * configure.nat: Add "fork-inferior.o" as a dependency for
7801         "*linux*", "fbsd*" and "nbsd*" hosts.
7802         * corefile.c (get_exec_file): Update comment.
7803         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7804         instead of "startup_inferior".
7805         (darwin_create_inferior): Call "add_thread_silent" after
7806         "fork_inferior".
7807         * fork-child.c: Cleanup unnecessary includes.
7808         (SHELL_FILE): Move to "common/common-fork-child.c".
7809         (environ): Likewise.
7810         (exec_wrapper): Initialize.
7811         (get_exec_wrapper): New function.
7812         (breakup_args): Move to "common/common-fork-child.c"; rename to
7813         "breakup_args_for_exec".
7814         (escape_bang_in_quoted_argument): Move to
7815         "common/common-fork-child.c".
7816         (saved_ui): New variable.
7817         (prefork_hook): New function.
7818         (postfork_hook): Likewise.
7819         (postfork_child_hook): Likewise.
7820         (gdb_startup_inferior): Likewise.
7821         (fork_inferior): Move to "common/common-fork-child.c".  Update
7822         function to support gdbserver.
7823         (startup_inferior): Likewise.
7824         * gdbcore.h (get_exec_file): Remove declaration.
7825         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7826         instead of "startup_inferior".  Call "add_thread_silent" after
7827         "fork_inferior".
7828         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7829         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7830         instead of "startup_inferior".  Call "add_thread_silent" after
7831         "fork_inferior".
7832         * inferior.h: Include "common-inferior.h".
7833         (trace_start_error): Move to "common/common-utils.h".
7834         (trace_start_error_with_name): Likewise.
7835         (fork_inferior): Move prototype to "nat/fork-inferior.h".
7836         (startup_inferior): Likewise.
7837         (gdb_startup_inferior): New prototype.
7838         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7839         * nat/fork-inferior.h: New file.
7840         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7841         instead of "startup_inferior".  Call "add_thread_silent" after
7842         "fork_inferior".
7843         * target.h (target_terminal_init): Move prototype to
7844         "target/target.h".
7845         (target_terminal_inferior): Likewise.
7846         (target_terminal_ours): Likewise.
7847         * target/target.h (target_terminal_init): New prototype, moved
7848         from "target.h".
7849         (target_terminal_inferior): Likewise.
7850         (target_terminal_ours): Likewise.
7851         * utils.c (gdb_flush_out_err): New function.
7852
7853 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7854
7855         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7856         * common/common-gdbthread.h: New file, with parts from
7857         "gdb/gdbthread.h".
7858         * gdbthread.h: Include "common-gdbthread.h".
7859         (switch_to_thread): Moved to "common/common-gdbthread.h".
7860
7861 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7862
7863         * Makefile.in (SFILES): Add "common/job-control.c".
7864         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7865         (COMMON_OBS): Add "job-control.o".
7866         * common/job-control.c: New file, with contents from
7867         "gdb/inflow.c".
7868         * common/job-control.h: New file, with contents from "terminal.h".
7869         * fork-child.c: Include "job-control.h".
7870         * inflow.c: Include "job-control.h".
7871         (gdb_setpgid): Move to "common/common-inflow.c".
7872         (_initialize_inflow): Move setting of "job_control" to
7873         "handle_job_control".
7874         * terminal.h (job_control): Moved to "common/common-terminal.h".
7875         (gdb_setpgid): Likewise.
7876         * top.c: Include "job_control.h".
7877         * utils.c: Likewise.
7878         (job_control): Moved to "job-control.c".
7879
7880 2017-06-07  Pedro Alves  <palves@redhat.com>
7881
7882         * Makefile.in (SFILES): Add gdb_regex.c.
7883         (COMMON_OBS): Add gdb_regex.o.
7884         * ada-lang.c (ada_add_standard_exceptions)
7885         (ada_add_exceptions_from_frame, name_matches_regex)
7886         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7887         parameter type to compiled_regex.  Adjust.
7888         (ada_exceptions_list): Use compiled_regex.
7889         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7890         std::unique_ptr<compiled_regex>.
7891         (exception_catchpoint::~exception_catchpoint): Remove regfree
7892         call.
7893         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7894         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7895         * breakpoint.c (solib_catchpoint::compiled): Now a
7896         std::unique_ptr<compiled_regex>.
7897         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7898         (check_status_catch_solib): Adjust to use compiled_regex.
7899         (add_solib_catchpoint): Adjust to use compiled_regex.
7900         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7901         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7902         compiled_regex reference.  Adjust to use it.
7903         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7904         declaration.  Include "gdb_regex.h".
7905         (apropos_cmd): Change regex parameter to compiled_regex reference.
7906         * gdb_regex.c: New file.
7907         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7908         declarations.
7909         (class compiled_regex): New.
7910         * linux-tdep.c: Include "common/gdb_optional.h".
7911         (struct mapping_regexes): New, factored out from
7912         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7913         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7914         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7915         * probe.c: Include "common/gdb_optional.h".
7916         (collect_probes): Use compiled_regex and gdb::optional and remove
7917         cleanups.
7918         * skip.c: Include "common/gdb_optional.h".
7919         (skiplist_entry::compiled_function_regexp): Now a
7920         gdb::optional<compiled_regex>.
7921         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7922         (free_skiplist_entry): Remove regfree call.
7923         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7924         compiled_regex and gdb::optional.
7925         * symtab.c: Include "common/gdb_optional.h".
7926         (search_symbols): Use compiled_regex and gdb::optional.
7927         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7928         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7929         to gdb_regex.c.
7930
7931 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7932
7933         * regcache.c (regcache::save): Avoid buffer use.
7934         (regcache::dump): Likewise.
7935
7936 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7937
7938         * sh-tdep.c (sh_pseudo_register_read): Remove
7939         MAX_REGISTER_SIZE.
7940         (sh_pseudo_register_write): Likewise.
7941         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7942         (sh64_pseudo_register_write): Likewise
7943
7944 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7945
7946         * aarch64-tdep.c (aarch64_store_return_value): Use
7947         V_REGISTER_SIZE.
7948         (aarch64_pseudo_read_value): Likewise.
7949         (aarch64_pseudo_write): Likewise.
7950
7951 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7952
7953         * regformats/regdef.h (set_register_cache): Remove the
7954         declaration.
7955
7956 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7957
7958         * frame.c (frame_unwind_register_signed): Use
7959         frame_unwind_register_value.
7960
7961 2017-06-06  Pedro Alves  <palves@redhat.com>
7962
7963         PR breakpoints/21553
7964         * breakpoint.c (create_breakpoints_sal_default)
7965         (init_breakpoint_sal, create_breakpoint_sal): Use
7966         gdb::unique_xmalloc_ptr for string parameters.
7967         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7968         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7969         (base_breakpoint_create_breakpoints_sal)
7970         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7971         (strace_marker_create_breakpoints_sal)
7972         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7973         string parameters.
7974         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7975         gdb::unique_xmalloc_ptr for string parameters.
7976         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7977         parameters.
7978
7979 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7980
7981         * alpha-tdep.c (alpha_register_to_value): Use
7982         get_frame_register_value.
7983         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7984
7985 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7986
7987         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7988         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7989         (ia64_value_to_register): Likewise.
7990         (ia64_extract_return_value): Likewise.
7991         (ia64_store_return_value): Likewise.
7992         (ia64_push_dummy_call): Likewise.
7993
7994 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7995
7996         GDB 8.0 released.
7997
7998 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7999
8000         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8001
8002 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8003
8004         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8005         parameter.
8006         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8007
8008 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8009
8010         * event-loop.c (poll_timers): Unallocate timer using delete
8011         instead of xfree.
8012
8013 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8014
8015         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8016         (struct breakpoint) <~breakpoint>: New.
8017         (struct watchpoint): Inherit from breakpoint.
8018         <~watchpoint>: New.
8019         <base>: Remove.
8020         (struct tracepoint): Inherit from breakpoint.
8021         <base>: Remove.
8022         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8023         (struct longjmp_breakpoint): Inherit from breakpoint.
8024         <~longjmp_breakpoint>: New.
8025         <base>: Remove.
8026         (new_breakpoint_from_type): Remove casts.
8027         (watchpoint_in_thread_scope): Remove reference to base field.
8028         (watchpoint_del_at_next_stop): Likewise.
8029         (update_watchpoint): Likewise.
8030         (watchpoint_check): Likewise.
8031         (bpstat_check_watchpoint): Likewise.
8032         (set_longjmp_breakpoint): Likewise.
8033         (struct fork_catchpoint): Inherit from breakpoint.
8034         <base>: Remove.
8035         (struct solib_catchpoint): Inherit from breakpoint.
8036         <~solib_catchpoint>: New.
8037         <base>: Remove.
8038         (dtor_catch_solib): Change to ...
8039         (solib_catchpoint::~solib_catchpoint): ... this.
8040         (breakpoint_hit_catch_solib): Remove reference to base field.
8041         (add_solib_catchpoint): Likewise.
8042         (create_fork_vfork_event_catchpoint): Likewise.
8043         (struct exec_catchpoint): Inherit from breakpoint.
8044         <~exec_catchpoint>: New.
8045         <base>: Remove.
8046         (dtor_catch_exec): Change to ...
8047         (exec_catchpoint::~exec_catchpoint): ... this.
8048         (dtor_watchpoint): Change to ...
8049         (watchpoint::~watchpoint): ... this.
8050         (watch_command_1): Remove reference to base field.
8051         (catch_exec_command_1): Likewise.
8052         (base_breakpoint_dtor): Change to ...
8053         (breakpoint::~breakpoint): ... this.
8054         (base_breakpoint_ops): Remove dtor field value.
8055         (longjmp_bkpt_dtor): Change to ...
8056         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8057         (strace_marker_create_breakpoints_sal): Remove reference to base
8058         field.
8059         (delete_breakpoint): Don't manually call breakpoint destructor.
8060         (create_tracepoint_from_upload): Remove reference to base field.
8061         (trace_pass_set_count): Likewise.
8062         (initialize_breakpoint_ops): Don't initialize
8063         momentary_breakpoint_ops, don't set dtors.
8064         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8065         <~ada_catchpoint>: New.
8066         <base>: Remove.
8067         (create_excep_cond_exprs): Remove reference to base field.
8068         (dtor_exception): Change to ...
8069         (ada_catchpoint::~ada_catchpoint): ... this.
8070         (dtor_catch_exception): Remove.
8071         (dtor_catch_exception_unhandled): Remove.
8072         (dtor_catch_assert): Remove.
8073         (create_ada_exception_catchpoint): Remove reference to base
8074         field.
8075         (initialize_ada_catchpoint_ops): Don't set dtors.
8076         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8077         breakpoint.
8078         <~signal_catchpoint>: New.
8079         <base>: Remove.
8080         (signal_catchpoint_dtor): Change to ...
8081         (signal_catchpoint::~signal_catchpoint): ... this.
8082         (create_signal_catchpoint): Remove reference to base field.
8083         (initialize_signal_catchpoint_ops): Don't set dtor.
8084         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8085         from breakpoint.
8086         <~syscall_catchpoint>: New.
8087         <base>: Remove.
8088         (dtor_catch_syscall): Change to ...
8089         (syscall_catchpoint::~syscall_catchpoint): ... this.
8090         (create_syscall_event_catchpoint): Remove reference to base
8091         field.
8092         (initialize_syscall_catchpoint_ops): Don't set dtor.
8093         * break-catch-throw.c (struct exception_catchpoint): Inherit
8094         from breakpoint.
8095         <~exception_catchpoint>: New.
8096         <base>: Remove.
8097         (dtor_exception_catchpoint): Change to ...
8098         (exception_catchpoint::~exception_catchpoint): ... this.
8099         (handle_gnu_v3_exceptions): Remove reference to base field.
8100         (initialize_throw_catchpoint_ops): Don't set dtor.
8101         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8102         field.
8103         * remote.c (remote_get_tracepoint_status): Likewise.
8104         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8105         * tracefile.c (tracefile_fetch_registers): Likewise.
8106         * tracepoint.c (actions_command): Likewise.
8107         (validate_actionline): Likewise.
8108         (tfind_1): Likewise.
8109         (get_traceframe_location): Likewise.
8110         (find_matching_tracepoint_location): Likewise.
8111         (parse_tracepoint_status): Likewise.
8112         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8113
8114 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8115
8116         * breakpoint.c (struct longjmp_breakpoint): New struct.
8117         (is_tracepoint_type): Change return type to bool.
8118         (is_longjmp_type): New function.
8119         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8120         (set_raw_breakpoint_without_location): Use
8121         new_breakpoint_from_type.
8122         (set_raw_breakpoint): Likewise.
8123
8124 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8125
8126         * breakpoint.c (new_breakpoint_from_type): New function.
8127         (create_breakpoint_sal): Use new_breakpoint_from_type and
8128         unique_ptr.
8129         (create_breakpoint): Likewise.
8130
8131 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8132
8133         * memattr.c (mem_info_command): Rename to ...
8134         (info_mem_command): ... this.
8135         (mem_enable_command): Rename to ...
8136         (enable_mem_command): ... this.
8137         (mem_disable_command): Rename to ...
8138         (disable_mem_command): ... this.
8139         (mem_delete_command): Rename to ...
8140         (delete_mem_command): ... this.
8141         (_initialize_mem): Adjust function names.
8142
8143 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8144
8145         * btrace.c (handle_pt_insn_events): New.
8146         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8147         STATUS.  Split into this and ...
8148         (handle_pt_insn_event_flags): ... this.
8149
8150 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8151
8152         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8153         and struct pt_insn.resynced.
8154         * configure: Regenerated.
8155         * config.in: Regenerated.
8156
8157 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8158
8159         * btrace.c (ftrace_find_call_by_number): New function.
8160         (ftrace_new_function): Store objects, not pointers.
8161         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8162         ftrace_new_gap, ftrace_update_function,
8163         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8164         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8165         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8166         btrace_ends_with_single_insn, btrace_call_get): Account for
8167         btrace_thread_info::functions now storing objects.
8168         * btrace.h (struct btrace_thread_info): Add constructor.
8169         (struct btrace_thread_info) <functions>: Make std::vector.
8170         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8171         Initialize with default values.
8172         * record-btrace.c (record_btrace_frame_sniffer): Account for
8173         btrace_thread_info::functions now storing objects.
8174
8175 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8176
8177         * btrace.c: Remove typedef bfun_s.
8178         (ftrace_new_gap): Directly add gaps to the list of gaps.
8179         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8180         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8181         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8182         instead of gdb VEC.
8183
8184 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8185
8186         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8187         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8188         with btrace_thread_info::next_segment and
8189         btrace_thread_info::prev_segment.
8190         * btrace.h: Remove struct btrace_func_link.
8191         (struct btrace_function): Replace pair of function segment pointers
8192         with pair of indices.
8193         * python/py-record-btrace.c (btpy_call_prev_sibling,
8194         btpy_call_next_sibling): Replace references to
8195         btrace_thread_info::segment with btrace_thread_info::next_segment and
8196         btrace_thread_info::prev_segment.
8197         * record-btrace.c (record_btrace_frame_this_id): Use
8198         btrace_find_call_by_number.
8199
8200 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8201
8202         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8203         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8204         btrace_insn_next, btrace_insn_prev): Remove references to
8205         btrace_thread_info::flow.
8206         * btrace.h (struct btrace_function): Remove FLOW.
8207
8208 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8209
8210         * btrace.c (ftrace_find_call_by_number): New function.
8211         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8212         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8213         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8214         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8215         index.
8216         * btrace.h (struct btrace_function): Turn UP into an index.
8217         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8218         as an index.
8219         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8220         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8221         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8222
8223 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8224
8225         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8226         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8227         ftrace_update_function, ftrace_compute_global_level_offset,
8228         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8229         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8230         btrace_insn_end, btrace_is_empty): Remove references to
8231         btrace_thread_info::begin and btrace_thread_info::end.
8232         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8233         (struct btrace_thread_info) <functions>: Adjust comment.
8234         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8235         btrace_thread_info::begin.
8236
8237 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8238
8239         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8240         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8241         ftrace_update_function): Remove arguments that implicitly were always
8242         BTINFO->END.
8243         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8244         Don't pass BTINFO->END.
8245
8246 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8247
8248         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8249         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8250         btrace_find_insn_by_number): Replace function segment pointer with
8251         index.
8252         (btrace_insn_cmp): Simplify.
8253         * btrace.h: (struct btrace_insn_iterator) Rename index to
8254         insn_index.  Replace function segment pointer with index into function
8255         segment vector.
8256         * record-btrace.c (record_btrace_call_history): Replace function
8257         segment pointer use with index.
8258         (record_btrace_frame_sniffer): Retrieve function call segment through
8259         vector.
8260         (record_btrace_set_replay): Remove defunc't safety check.
8261
8262 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8263
8264         * btrace.c (btrace_ends_with_single_insn): New function.
8265         (btrace_call_get, btrace_call_number, btrace_call_begin,
8266         btrace_call_end, btrace_call_next, btrace_call_prev,
8267         btrace_find_call_by_number): Use index into call segment vector
8268         instead of pointer.
8269         (btrace_call_cmp): Simplify.
8270         * btrace.h (struct btrace_call_iterator): Replace function call segment
8271         pointer with index into vector.
8272         * record-btrace.c (record_btrace_call_history): Use index instead of
8273         pointer.
8274
8275 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8276
8277         * btrace.c (btrace_insn_begin, btrace_insn_end,
8278         btrace_find_insn_by_number): Add btinfo to iterator.
8279         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8280
8281 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8282
8283         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8284         and save pointers directly.
8285         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8286         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8287         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8288         changed signature of functions.
8289         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8290         (btrace_fetch): Remove code that adds btrace_function pointers to
8291         vector of btrace_functions.
8292         (btrace_clear): Simplify freeing vector of btrace_functions.
8293
8294 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8295
8296         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8297         Replace VEC_* with std::vector functions.
8298         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8299         (struct btrace_thread_info)<functions>: Change type to std::vector.
8300
8301 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8302
8303         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8304         "Removed targets and native configurations" up.  Merge duplicate
8305         "New commands" sub-sections.  Add "New options" sub-sections.
8306
8307 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8308
8309         * defs.h (copy_integer_to_size): New declaration.
8310         * findvar.c (copy_integer_to_size): New function.
8311         (do_cint_test): New selftest function.
8312         (copy_integer_to_size_test): Likewise.
8313         (_initialize_findvar): Likewise.
8314         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8315         (mips_fbsd_collect_reg): Use raw_collect_integer.
8316         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8317         (mips64_fill_gregset): Use raw_collect_integer
8318         (mips64_fill_fpregset): Use raw_supply_integer.
8319         * regcache.c (regcache::raw_supply_integer): New function.
8320         (regcache::raw_collect_integer): Likewise.
8321         * regcache.h: (regcache::raw_supply_integer): New declaration.
8322         (regcache::raw_collect_integer): Likewise.
8323
8324 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8325
8326         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8327         (COMMON_OBS): Add gdbarch-selftests.o.
8328         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8329         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8330         * gdbarch-selftests.c: New file.
8331         * regcache.h (regcache) <~regcache>: Mark it virtual if
8332         GDB_SELF_TEST.
8333         <raw_write>: Likewise.
8334
8335 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8336
8337         * regcache.c (current_regcache): Change it to
8338         regcache::current_regcache.
8339         (regcache_observer_target_changed): Update.
8340         (regcache_thread_ptid_changed): Make it a regcache static
8341         method.
8342         (regcache_thread_ptid_changed): Update.
8343         (class regcache_access): New.
8344         (current_regcache_test): Update.
8345         (_initialize_regcache): Update.
8346         * regcache.h: Include forward_list.
8347         (regcache): Declare regcache_thread_ptid_changed and declare
8348         registers_changed_ptid as friend.
8349
8350 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8351
8352         * i387-tdep.c (i387_register_to_value): Use register_size
8353         instead of TYPE_LENGTH.
8354         * m68k-tdep.c (m68k_register_to_value): Likewise.
8355
8356 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8357
8358         * i387-tdep.c (i387_convert_register_p): Return false if type
8359         code isn't TYPE_CODE_FLT.
8360
8361 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8362
8363         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8364         length is 4.
8365         (alpha_register_to_value): Remove type length check.
8366         (alpha_value_to_register): Likewise.
8367
8368 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8369
8370         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8371         TYPE_CODE_FLT.
8372
8373 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8374
8375         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8376         TYPE_CODE_FLT or not.
8377
8378 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8379
8380         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8381         * avr-tdep.c (avr_gdbarch_init): Likewise.
8382         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8383         * cris-tdep.c (cris_gdbarch_init): Likewise.
8384         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8385         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8386         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8387         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8388         * mep-tdep.c (mep_gdbarch_init): Likewise.
8389         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8390         * mips-tdep.c (mips_gdbarch_init): Likewise.
8391         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8392         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8393         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8394         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8395         * v850-tdep.c (v850_gdbarch_init): Likewise.
8396
8397 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8398
8399         * selftest-arch.c (tests_with_arch): Call registers_changed
8400         and reinit_frame_cache.
8401         * selftest.c (run_self_tests): Likewise.
8402
8403 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8404
8405         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8406         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8407
8408 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8409
8410         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8411         set_gdbarch_print_insn.
8412
8413 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8414
8415         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8416         set_gdbarch_print_insn.
8417
8418 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8419
8420         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8421         set_gdbarch_print_insn.
8422         * arc-tdep.c (arc_gdbarch_init): Likewise.
8423         * arch-utils.c: include dis-asm.h.
8424         (default_print_insn): New function.
8425         * arch-utils.h (default_print_insn): Declare.
8426         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8427         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8428         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8429         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8430         * frv-tdep.c (frv_gdbarch_init): Likewise.
8431         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8432         * gdbarch.sh (print_insn): Use default_print_insn.
8433         * gdbarch.c: Regenerated.
8434         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8435         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8436         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8437         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8438         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8439         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8440         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8441         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8442         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8443         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8444         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8445         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8446         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8447         * mt-tdep.c (mt_gdbarch_init): Likewise.
8448         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8449         * nios2-tdep.c (nios2_print_insn): Remove.
8450         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8451         * rx-tdep.c (rx_gdbarch_init): Likewise.
8452         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8453         * score-tdep.c (score_print_insn): Remove.
8454         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8455         * sh-tdep.c (sh_gdbarch_init): Likewise.
8456         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8457         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8458         * tic6x-tdep.c (tic6x_print_insn): Remove.
8459         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8460         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8461         * v850-tdep.c (v850_gdbarch_init): Likewise.
8462         * vax-tdep.c (vax_gdbarch_init): Likewise.
8463         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8464         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8465
8466 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8467
8468         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8469         (MIPS_FP0_REGNUM): Remove.
8470         (MIPS_FSR_REGNUM): Remove.
8471         (mips_fbsd_supply_fpregs): Use mips_regnum.
8472         (mips_fbsd_supply_gregs): Likewise.
8473         (mips_fbsd_collect_fpregs): Likewise.
8474         (mips_fbsd_collect_gregs): Likewise.
8475
8476 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8477
8478         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8479         (getpfpregs_supplies): New function.
8480         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8481         getfpregs_supplies.
8482         (mips_fbsd_store_inferior_registers): Likewise.
8483
8484 2017-05-22  Pedro Alves <palves@redhat.com>
8485
8486         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8487         maintainer.
8488
8489 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8490
8491         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8492         (store_register): Likewise.
8493         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8494         (get_decimal_float_return_value): Likewise.
8495         (do_ppc_sysv_return_value): Likewise.
8496         (ppc64_sysv_abi_push_integer): Likewise.
8497         (ppc64_sysv_abi_push_freg): Likewise.
8498         (ppc64_sysv_abi_return_value_base): Likewise.
8499         (ppc64_sysv_abi_return_value): Likewise.
8500         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8501         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8502         * rs6000-nat.c: Likewise.
8503         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8504         (rs6000_value_to_register): Likewise.
8505         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8506
8507 2017-05-21  Tom Tromey  <tom@tromey.com>
8508
8509         PR rust/21466:
8510         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8511         arrays as "[T]", not "[T; ]".
8512
8513 2017-05-19  Tom Tromey  <tom@tromey.com>
8514
8515         PR rust/21484:
8516         * rust-lang.c (exp_descriptor_rust): New function.
8517         (rust_language_defn): Use it.
8518         * p-lang.c (pascal_language_defn): Update.
8519         * opencl-lang.c (opencl_language_defn): Update.
8520         * objc-lang.c (objc_language_defn): Update.
8521         * m2-lang.c (m2_language_defn): Update.
8522         * language.h (struct language_defn)
8523         <la_watch_location_expression>: New member.
8524         * language.c (unknown_language_defn, auto_language_defn)
8525         (local_language_defn): Update.
8526         * go-lang.c (go_language_defn): Update.
8527         * f-lang.c (f_language_defn): Update.
8528         * d-lang.c (d_language_defn): Update.
8529         * c-lang.h (c_watch_location_expression): Declare.
8530         * c-lang.c (c_watch_location_expression): New function.
8531         (c_language_defn, cplus_language_defn, asm_language_defn)
8532         (minimal_language_defn): Use it.
8533         * breakpoint.c (watch_command_1): Call
8534         la_watch_location_expression.
8535         * ada-lang.c (ada_language_defn): Update.
8536
8537 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8538
8539         PR tui/21482
8540         * gdb_curses.h (NOMACROS): Define.
8541         (NCURSES_NOMACROS): Define.
8542
8543 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8544
8545         PR tui/21482
8546         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8547         arg to char *.
8548         * tui/tui-wingeneral.c (box_win): Likewise.
8549         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8550         (tui_show_source_line): Likewise.
8551         (tui_show_exec_info_content): Likewise.
8552
8553 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8554
8555         * sparc-tdep.c (sparc_structure_return_p)
8556         (sparc_arg_on_registers_p): New functions.
8557         (sparc32_store_arguments): Use them.
8558         * sparc64-tdep.c (sparc64_16_byte_align_p)
8559         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8560         Handle TYPE_CODE_ARRAY.
8561
8562 2017-05-17  Yao Qi  <yao.qi@linaro.org>
8563
8564         * cli/cli-decode.c (add_alias_cmd): New function.
8565         * command.h (add_alias_cmd): Declare.
8566         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8567         instead call add_alias_cmd.
8568
8569 2017-05-17  Pedro Alves  <palves@redhat.com>
8570
8571         * Makefile.in (nat_extra_makefile_frag): Rename to ...
8572         (nat_makefile_frag): ... this.  All references updated.
8573         * configure.ac: Likewise.
8574         * configure.nat: Likewise.  Enhance comments.
8575         * configure: Regenerate.
8576
8577 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8578
8579         * procfs.c (procfs_create_inferior): Change prototype to match
8580         definition.
8581
8582 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
8583
8584         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8585         C++ compiler warning.
8586
8587 2017-05-12  Tom Tromey  <tom@tromey.com>
8588
8589         PR rust/21483:
8590         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8591         recurse, just call value_struct_elt directly.
8592
8593 2017-05-12  Tom Tromey  <tom@tromey.com>
8594
8595         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8596         OP_RUST_ARRAY>: Fix.
8597
8598 2017-05-12  Tom Tromey  <tom@tromey.com>
8599
8600         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8601
8602 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8603
8604         * regcache.c: Include <forward_list>.
8605         (struct regcache_list): Remove.
8606         (current_regcache): Update.
8607         (get_thread_arch_aspace_regcache): Update for std::forward_list.
8608         (regcache_thread_ptid_changed): Likewise.
8609         (registers_changed_ptid): Likewise.
8610         (current_regcache_size): Likewise.
8611
8612 2017-05-09  Yao Qi  <yao.qi@linaro.org>
8613
8614         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8615         (current_regcache_size): New function.
8616         (current_regcache_test): New function.
8617         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8618
8619 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8620
8621         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8622         (print_gp_register_row): Use get_frame_register_value.
8623
8624 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8625
8626         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8627         (mips_supply_fpregset): Likewise.
8628         (mips64_supply_gregset): Likewise.
8629
8630 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
8631
8632         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
8633         regcache->raw_supply_zeroed.
8634
8635 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8636
8637         * configure.nat: Rearrange 'case' statements to match
8638         host before cpu.
8639
8640 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8641
8642         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
8643         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8644         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
8645         "@nat_extra_makefile_frag@".
8646         (Makefile): Remove dependency on "@frags@".
8647         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8648         (data-directory/Makefile): Likewise.
8649         * config/aarch64/linux.mh: Deleted; moved contents to
8650         "gdb/configure.nat".
8651         * config/alpha/alpha-linux.mh: Likewise.
8652         * config/alpha/nbsd.mh: Likewise.
8653         * config/arm/linux.mh: Likewise.
8654         * config/arm/nbsdelf.mh: Likewise.
8655         * config/i386/cygwin.mh: Likewise.
8656         * config/i386/cygwin64.mh: Likewise.
8657         * config/i386/darwin.mh: Likewise.
8658         * config/i386/fbsd.mh: Likewise.
8659         * config/i386/fbsd64.mh: Likewise.
8660         * config/i386/go32.mh: Likewise.
8661         * config/i386/i386gnu.mh: Likewise.
8662         * config/i386/i386sol2.mh: Likewise.
8663         * config/i386/linux.mh: Likewise.
8664         * config/i386/linux64.mh: Likewise.
8665         * config/i386/mingw.mh: Likewise.
8666         * config/i386/mingw64.mh: Likewise.
8667         * config/i386/nbsd64.mh: Likewise.
8668         * config/i386/nbsdelf.mh: Likewise.
8669         * config/i386/nto.mh: Likewise.
8670         * config/i386/obsd.mh: Likewise.
8671         * config/i386/obsd64.mh: Likewise.
8672         * config/i386/sol2-64.mh: Likewise.
8673         * config/ia64/linux.mh: Likewise.
8674         * config/m32r/linux.mh: Likewise.
8675         * config/m68k/linux.mh: Likewise.
8676         * config/m68k/nbsdelf.mh: Likewise.
8677         * config/m68k/obsd.mh: Likewise.
8678         * config/m88k/obsd.mh: Likewise.
8679         * config/mips/fbsd.mh: Likewise.
8680         * config/mips/linux.mh: Likewise.
8681         * config/mips/nbsd.mh: Likewise.
8682         * config/mips/obsd64.mh: Likewise.
8683         * config/pa/linux.mh: Likewise.
8684         * config/pa/nbsd.mh: Likewise.
8685         * config/pa/obsd.mh: Likewise.
8686         * config/powerpc/aix.mh: Likewise.
8687         * config/powerpc/fbsd.mh: Likewise.
8688         * config/powerpc/linux.mh: Likewise.
8689         * config/powerpc/nbsd.mh: Likewise.
8690         * config/powerpc/obsd.mh: Likewise.
8691         * config/powerpc/ppc64-linux.mh: Likewise.
8692         * config/powerpc/spu-linux.mh: Likewise.
8693         * config/s390/linux.mh: Likewise.
8694         * config/sh/nbsd.mh: Likewise.
8695         * config/sparc/fbsd.mh: Likewise.
8696         * config/sparc/linux.mh: Likewise.
8697         * config/sparc/linux64.mh: Likewise.
8698         * config/sparc/nbsd64.mh: Likewise.
8699         * config/sparc/nbsdelf.mh: Likewise.
8700         * config/sparc/obsd64.mh: Likewise.
8701         * config/sparc/sol2.mh: Likewise.
8702         * config/tilegx/linux.mh: Likewise.
8703         * config/vax/nbsdelf.mh: Likewise.
8704         * config/vax/obsd.mh: Likewise.
8705         * config/xtensa/linux.mh: Likewise.
8706         * config/i386/i386gnu.mn: New file, with excerpts from
8707         "config/i386/i386gnu.mh".
8708         * configure: Regenerate.
8709         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8710         *.mh files under "gdb/config".
8711         * configure.nat: New file, with contents from the
8712         "gdb/config/*/*.mh" files.
8713
8714 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
8715
8716         * btrace.c (btrace_clear): Free insn vector.
8717
8718 2017-05-05  Pedro Alves  <palves@redhat.com>
8719
8720         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8721         * configure: Regenerate.
8722
8723 2017-05-04  Pedro Alves  <palves@redhat.com>
8724
8725         * Makefile.in (SFILES): Add progspace-and-thread.c.
8726         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8727         (COMMON_OBS): Add progspace-and-thread.o.
8728         * breakpoint.c: Include "progspace-and-thread.h".
8729         (update_inserted_breakpoint_locations)
8730         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8731         Use scoped_restore_current_pspace_and_thread.
8732         (create_std_terminate_master_breakpoint): Use
8733         scoped_restore_current_program_space.
8734         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8735         (print_breakpoint_location): Use
8736         scoped_restore_current_program_space.
8737         (bp_loc_is_permanent): Use
8738         scoped_restore_current_pspace_and_thread.
8739         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8740         (download_tracepoint_locations): Use
8741         scoped_restore_current_pspace_and_thread.
8742         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8743         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8744         (enum step_over_calls_kind): Moved from inferior.h.
8745         (class scoped_restore_current_thread): New class.
8746         * gdbthread.h (make_cleanup_restore_current_thread): Delete
8747         declaration.
8748         (scoped_restore_current_thread): New class.
8749         * infcmd.c: Include "common/gdb_optional.h".
8750         (continue_1, proceed_after_attach): Use
8751         scoped_restore_current_thread.
8752         (notice_new_inferior): Use scoped_restore_current_thread.
8753         * inferior.c: Include "progspace-and-thread.h".
8754         (restore_inferior, save_current_inferior): Delete.
8755         (add_inferior_command, clone_inferior_command): Use
8756         scoped_restore_current_pspace_and_thread.
8757         * inferior.h (scoped_restore_current_inferior): New class.
8758         * infrun.c: Include "progspace-and-thread.h" and
8759         "common/gdb_optional.h".
8760         (follow_fork_inferior): Use
8761         scoped_restore_current_pspace_and_thread.
8762         (scoped_restore_exited_inferior): New class.
8763         (handle_vfork_child_exec_or_exit): Use
8764         scoped_restore_exited_inferior,
8765         scoped_restore_current_pspace_and_thread,
8766         scoped_restore_current_thread and scoped_restore.
8767         (fetch_inferior_event): Use scoped_restore_current_thread.
8768         * linespec.c (decode_line_full, decode_line_1): Use
8769         scoped_restore_current_program_space.
8770         * mi/mi-main.c: Include "progspace-and-thread.h".
8771         (exec_continue): Use scoped_restore_current_thread.
8772         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8773         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8774         * proc-service.c (ps_pglobal_lookup): Use
8775         scoped_restore_current_program_space.
8776         * progspace-and-thread.c: New file.
8777         * progspace-and-thread.h: New file.
8778         * progspace.c (release_program_space, clone_program_space): Use
8779         scoped_restore_current_program_space.
8780         (restore_program_space, save_current_program_space)
8781         (save_current_space_and_thread): Delete.
8782         (switch_to_program_space_and_thread): Moved to
8783         progspace-and-thread.c.
8784         * progspace.h (save_current_program_space)
8785         (save_current_space_and_thread): Delete declarations.
8786         (scoped_restore_current_program_space): New class.
8787         * remote.c (remote_btrace_maybe_reopen): Use
8788         scoped_restore_current_thread.
8789         * symtab.c: Include "progspace-and-thread.h".
8790         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8791         * thread.c (print_thread_info_1): Use
8792         scoped_restore_current_thread.
8793         (struct current_thread_cleanup): Delete.
8794         (do_restore_current_thread_cleanup)
8795         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8796         (scoped_restore_current_thread::~scoped_restore_current_thread):
8797         ... this new dtor.
8798         (make_cleanup_restore_current_thread): Rename/convert to ...
8799         (scoped_restore_current_thread::scoped_restore_current_thread):
8800         ... this new ctor.
8801         (thread_apply_all_command): Use scoped_restore_current_thread.
8802         (thread_apply_command): Use scoped_restore_current_thread.
8803         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8804         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8805
8806 2017-05-04  Pedro Alves  <palves@redhat.com>
8807
8808         * thread.c (make_cleanup_restore_current_thread): Move
8809         find_thread_ptid call before the is_stopped call.  Assert that the
8810         thread is found.  Replace is_stopped call by checking the thread's
8811         state directly.  Remove unnecessary NULL-thread check.
8812
8813 2017-05-04  Pedro Alves  <palves@redhat.com>
8814
8815         * corelow.c (thread_section_name): New class.
8816         (get_core_register_section, get_core_siginfo): Use it.
8817
8818 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8819
8820         * corelow.c (sniff_core_bfd): Remove extra semicolon.
8821         (get_core_register_section): Remove xfree of NULL pointer.
8822
8823 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
8824
8825         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8826         * regcache.c (regcache::raw_supply_zeroed): New function.
8827         * regcache.h (regcache::raw_supply_zeroed): New declaration.
8828
8829 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8830
8831         * gdbarch.sh: Remove commented out definition of
8832         TARGET_CHAR_BIT.
8833         * gdbarch.h: Re-generate.
8834
8835 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
8836
8837         * configure: Regenerate.
8838
8839 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
8840
8841         * solib-target.c (solib_target_relocate_section_addresses):
8842         Remove num_section_bases, num_bases, segment_bases variables.
8843
8844 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8845
8846         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8847
8848 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8849
8850         * solib-target.c: Include <vector>
8851         (struct lm_info_target) <~lm_info_target>: Remove.
8852         <segment_bases, section_bases>: Change type to
8853         std::vector<CORE_ADDR>.
8854         (library_list_start_segment, library_list_start_section,
8855         library_list_end_library,
8856         solib_target_relocate_section_addresses): Adjust.
8857
8858 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8859
8860         * gdbarch.sh (software_single_step): Change return type to
8861         std::vector<CORE_ADDR>.
8862         * gdbarch.c, gdbarch.h: Re-generate.
8863         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8864         Adjust.
8865         (arm_deal_with_atomic_sequence_raw): Adjust.
8866         (thumb_get_next_pcs_raw): Adjust.
8867         (arm_get_next_pcs_raw): Adjust.
8868         (arm_get_next_pcs): Adjust.
8869         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8870         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8871         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8872         (alpha_software_single_step): Adjust.
8873         * alpha-tdep.h (alpha_software_single_step): Adjust.
8874         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8875         * arm-tdep.c (arm_software_single_step): Adjust.
8876         (arm_breakpoint_kind_from_current_state): Adjust.
8877         * arm-tdep.h (arm_software_single_step): Adjust.
8878         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8879         * cris-tdep.c (cris_software_single_step): Adjust.
8880         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8881         (micromips_deal_with_atomic_sequence): Adjust.
8882         (deal_with_atomic_sequence): Adjust.
8883         (mips_software_single_step): Adjust.
8884         * mips-tdep.h (mips_software_single_step): Adjust.
8885         * moxie-tdep.c (moxie_software_single_step): Adjust.
8886         * nios2-tdep.c (nios2_software_single_step): Adjust.
8887         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8888         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8889         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8890         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8891         * sparc-tdep.c (sparc_software_single_step): Adjust.
8892         * spu-tdep.c (spu_software_single_step): Adjust.
8893         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8894
8895 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8898         * gdbarch.h: Re-generate.
8899
8900 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8901
8902         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8903         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8904         * python/py-instruction.c, python/py-instruction.h: New file.
8905         * python/py-record.c: Add py-instruction.h include.
8906         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8907         gdb.RecordInstruction.
8908         * python/python-internal.h: Add gdbpy_initialize_instruction
8909         declaration.
8910         * python/python.c (do_start_initialization): Add
8911         gdbpy_initialize_instruction.
8912
8913 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8914
8915         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8916         Remove.
8917         (btrace_func_from_recpy_func): New function.
8918         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8919         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8920         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8921         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8922         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8923         Also, use new helper functions.
8924         (btpy_list_item): Use new helper functions.
8925         (recpy_bt_function_call_history): Use new type name.
8926         (btpy_call_getset): Remove.
8927         (gdbpy_initialize_btrace): Remove code to initialize
8928         gdb.BtraceFunctionCall.
8929         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8930         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8931         recpy_bt_func_prev, recpy_bt_func_next): New export.
8932         * python/py-record.c (recpy_func_type): New static object.
8933         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8934         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8935         recpy_func_next): New function.
8936         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8937         (recpy_func_getset): New static object.
8938         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8939         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8940
8941 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8942
8943         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8944         (btpy_object, btpy_insn_type, btpy_new): Remove.
8945         (btpy_list_object): Use gdb.RecordInstruction type instead of
8946         gdb.BtraceInstruction type.
8947         (btrace_insn_from_recpy_insn): New function.
8948         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8949         btpy_new.
8950         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8951         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8952         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8953         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8954         instead of btpy_object.
8955         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8956         btpy_insn_data, btpy_insn_decode): Rename to ...
8957         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8958         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8959         recpy_bt_insn_decode): This.  Also, use new helper functions.
8960         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8961         recpy_insn_type.
8962         (btpy_insn_getset): Remove.
8963         (gdbpy_initialize_btrace): Remove code to initialize
8964         gdb.BtraceInstruction.  Use recpy_element_object.
8965         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8966         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8967         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8968         * python/py-record.c (recpy_insn_type): New static object.
8969         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8970         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8971         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8972         New function.
8973         (recpy_insn_getset): New static object.
8974         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8975         * python/py-record.h (recpy_element_object): New typedef.
8976         (recpy_insn_type, recpy_insn_new): New export.
8977
8978 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8979
8980         * py-record-btrace.c (btpy_insn_new): Removed.
8981         (btpy_insn_or_gap_new): New function.
8982         (btpy_insn_error): Removed.
8983         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8984         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8985         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8986         btpy_insn_or_gap_new instead of btpy_insn_new.
8987         (btpy_insn_getset): Remove btpy_insn_error.
8988         * py-record.c (recpy_gap_type): New static object.
8989         (recpy_gap_object): New typedef.
8990         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8991         recpy_gap_reason_string): New function.
8992         (recpy_gap_getset): New static object.
8993         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8994         * py-record.h (recpy_gap_new): New export.
8995
8996 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8997
8998         * python/py-record.c (recpy_ptid): Remove.
8999         (recpy_record_getset): Remove recpy_ptid.
9000
9001 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9002
9003         * btrace.c (btrace_fetch): Set inferior_ptid.
9004         * python/py-record-btrace.c: Add "py-record.h" include.
9005         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9006         recpy_bt_end, recpy_bt_instruction_history,
9007         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9008         in gdb.Record object instead of current ptid.
9009         * python/py-record.c: Include new "py-record.h" file.
9010         (recpy_record_object): Moved to py-record.h.
9011         * python/py-record.h: New file.
9012
9013 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9014
9015         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9016         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9017         indentation.
9018
9019 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9020
9021         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9022         the past maintainers section.
9023
9024 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9025
9026         * infcmd.c (get_return_value): Use regcache ctor, and remove
9027         cleanup.
9028
9029 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9030             Pedro Alves  <palves@redhat.com>
9031
9032         * regcache.c (regcache::regcache): New tag dispatch ctor.
9033         (do_cooked_read): Moved above.
9034         (regcache_dup): Use the tag dispatch ctor..
9035         * regcache.h (regcache): Declare ctor, delete copy ctor and
9036         assignment operator, remove friend regcache_dup.
9037
9038 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9039
9040         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9041         call method save instead of regcache_cpy.
9042         * regcache.h (struct regcache): Make regcache_dup a friend.
9043
9044 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9045
9046         * regcache.c (struct regcache): Move to regcache.h
9047         (regcache::arch): New method.
9048         (regcache_get_ptid): Update.
9049         (get_regcache_arch): Call arch method.
9050         (get_regcache_aspace): Call method aspace.
9051         (register_buffer): Change it to method.
9052         (regcache_save): Change it to regcache::save.
9053         (regcache_restore): Likewise.
9054         (regcache_cpy_no_passthrough): Remove the declaration.
9055         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9056         (regcache_cpy_no_passthrough): Change it to method
9057         cpy_no_passthrough.
9058         (regcache_register_status): Change it to method
9059         get_register_status.
9060         (regcache_invalidate): Change it to method invalidate.
9061         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9062         (regcache_raw_update): Change it to method raw_update.
9063         (regcache_raw_read): Likewise.
9064         (regcache_raw_read_signed): Likewise.
9065         (regcache_raw_read_unsigned): Likewise.
9066         (regcache_raw_write_signed): Likewise.
9067         (regcache_raw_write_unsigned): Likewise.
9068         (regcache_cooked_read): Likewise.
9069         (regcache_cooked_read_value): Likewise.
9070         (regcache_cooked_read_signed): Likewise.
9071         (regcache_cooked_read_unsigned): Likewise.
9072         (regcache_cooked_write_signed): Likewise.
9073         (regcache_cooked_write_unsigned): Likewise.
9074         (regcache_raw_set_cached_value): Likewise.
9075         (regcache_raw_write): Likewise.
9076         (regcache_cooked_write): Likewise.
9077         (regcache_xfer_part): Likewise.
9078         (regcache_raw_read_part): Likewise.
9079         (regcache_raw_write_part): Likewise.
9080         (regcache_cooked_read_part): Likewise.
9081         (regcache_cooked_write_part): Likewise.
9082         (regcache_raw_supply): Likewise.
9083         (regcache_raw_collect): Likewise.
9084         (regcache_transfer_regset): Likewise.
9085         (regcache_supply_regset): Likewise.
9086         (regcache_collect_regset): Likewise.
9087         (regcache_debug_print_register): Likewise.
9088         (enum regcache_dump_what): Move it to regcache.h.
9089         (regcache_dump): Change it to method dump.
9090         * regcache.h (enum regcache_dump_what): New.
9091         (class regcache): New.
9092         * target.c (target_fetch_registers): Call method
9093         debug_print_register.
9094         (target_store_registers): Likewise.
9095
9096 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9097
9098         * windows-nat.c (struct lm_info_windows): Initialize field.
9099         (windows_make_so): Allocate lm_info_windows with new.
9100         (windows_free_so): Free lm_info_windows with delete.
9101
9102 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9103
9104         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9105         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9106         cleanup.
9107         (darwin_free_so): Free lm_info_darwin with delete.
9108
9109 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9110
9111         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9112         <l_addr_p>: Change type to bool.
9113         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9114         (svr4_free_so): Free lm_info_svr4 with delete.
9115         (svr4_copy_library_list): Replace memcpy with call to copy
9116         constructor.
9117         (library_list_start_library, svr4_default_sos): Allocate
9118         lm_info_svr4 with new.
9119
9120 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9121
9122         * solib-target.c (struct lm_info_target): Add destructor,
9123         initialize fields.
9124         <name>: Change type to std::string.
9125         (library_list_start_library): Allocate lm_info_target with new.
9126         (solib_target_free_library_list): Free lm_info_target with
9127         delete.
9128         (solib_target_current_sos): Adapt to std::string.
9129         (solib_target_free_so): Free lm_info_target with delete.
9130
9131 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9132
9133         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9134         fields.
9135         (frv_current_sos): Allocate lm_info_frv with new.
9136         (frv_relocate_main_executable): Free lm_info_frv with delete,
9137         allocate with new.
9138         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9139
9140 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9141
9142         * solib-frv.c (struct lm_info_frv): Fix indentation.
9143
9144 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9145
9146         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9147         map field.
9148         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9149         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9150         and allocate with new.
9151         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9152
9153 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9154
9155         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9156         <filename, member_name>: Change type to std::string.
9157         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9158         (library_list_start_library): Allocate lm_info_aix with new.
9159         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9160         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9161         with copy constructor.
9162
9163 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9164
9165         * solist.h (struct lm_info): Remove.
9166         (struct lm_info_base): New class.
9167         (struct so_list) <lm_info>: Change type to lm_info_base *.
9168         * nto-tdep.c (struct lm_info): Remove.
9169         (lm_addr): Adjust.
9170         * solib-aix.c (struct lm_info): Rename to ...
9171         (struct lm_info_aix): ... this.  Extend lm_info_base.
9172         (lm_info_p): Rename to ...
9173         (lm_info_aix_p): ... this, and adjust.
9174         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9175         solib_aix_parse_libraries, library_list_start_library,
9176         solib_aix_free_library_list, solib_aix_parse_libraries,
9177         solib_aix_get_library_list,
9178         solib_aix_relocate_section_addresses, solib_aix_free_so,
9179         solib_aix_get_section_offsets,
9180         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9181         Adjust.
9182         (struct solib_aix_inferior_data) <library_list>: Adjust.
9183         * solib-darwin.c (struct lm_info): Rename to ...
9184         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9185         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9186         * solib-dsbt.c (struct lm_info): Rename to ...
9187         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9188         (struct dsbt_info) <main_executable_lm_info): Adjust.
9189         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9190         dsbt_relocate_section_addresses): Adjust.
9191         * solib-frv.c (struct lm_info): Rename to ...
9192         (struct lm_info_frv): ... this.  Extend lm_info_base.
9193         (main_executable_lm_info): Adjust.
9194         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9195         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9196         find_canonical_descriptor_in_load_object,
9197         frv_fdpic_find_canonical_descriptor): Adjust.
9198         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9199         to lm_info_svr4.
9200         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9201         svr4_clear_so, svr4_copy_library_list,
9202         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9203         svr4_current_sos, svr4_fetch_objfile_link_map,
9204         solist_update_incremental): Adjust.
9205         * solib-svr4.h (struct lm_info_svr4): Move here from
9206         solib-svr4.c.
9207         * solib-target.c (struct lm_info): Rename to ...
9208         (struct lm_info_target): ... this.  Extend lm_info_base.
9209         (lm_info_p): Rename to ...
9210         (lm_info_target_p): ... this.
9211         (solib_target_parse_libraries, library_list_start_segment,
9212         library_list_start_section, library_list_start_library,
9213         library_list_end_library, solib_target_free_library_list,
9214         solib_target_current_sos, solib_target_free_so,
9215         solib_target_relocate_section_addresses): Adjust.
9216         * windows-nat.c (struct lm_info): Rename to ...
9217         (struct lm_info_windows): ... this.  Extend lm_info_base.
9218         (windows_make_so, handle_load_dll, handle_unload_dll,
9219         windows_xfer_shared_libraries): Adjust.
9220
9221 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9222
9223         * solib-darwin.c (struct darwin_so_list): Remove.
9224         (darwin_current_sos): Allocate an so_list object instead of a
9225         darwin_so_list, separately allocate an lm_info object.
9226         (darwin_free_so): Free lm_info.
9227
9228 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9229
9230         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9231         with fprintf_filtered.
9232
9233 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9234
9235         * regcache.c (regcache::regcache): New function.
9236         (regcache::~regcache): New function.
9237         (regcache_xmalloc_1): Remove.
9238         (regcache_xmalloc): Call new regcache.
9239         (regcache_xfree): Call delete regcache.
9240         (get_thread_arch_aspace_regcache): Call new regcache.
9241
9242 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9243
9244         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9245         lwp instead of ptid_get_lwp.
9246
9247 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9248
9249         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9250         lwp_info instead of getting from inferior_ptid.
9251
9252 2017-04-27  Keith Seitz  <keiths@redhat.com>
9253
9254         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9255         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9256         (CV_CONVERSION_BADNESS): Define.
9257         (rank_one_type): Remove overly restrictive rvalue reference
9258         rank checks.
9259         Add cv-qualifier checks and subranks for type equality.
9260         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9261         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9262         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9263
9264 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9265
9266         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9267         count when creating the object.
9268
9269 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9270             Ulrich Weigand  <uweigand@de.ibm.com>
9271
9272         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9273         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9274         is used in AIX.
9275         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9276         (process_xcoff_symbol): Likewise.
9277         (scan_xcoff_symtab): Likewise.
9278
9279 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9280
9281         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9282         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9283         (ia64_access_reg): Use get_frame_register_unsigned.
9284         (ia64_access_rse_reg): Likewise.
9285         (ia64_libunwind_frame_prev_register): Likewise.
9286
9287 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9288
9289         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9290         * gdbarch.c: Regenerated.
9291         * gdbarch.h: Regenerated.
9292         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9293         visibility external.
9294         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9295         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9296         (enum cfa_how_kind): Move to ...
9297         (struct dwarf2_frame_state_reg_info): Likewise.
9298         (struct dwarf2_frame_state): Likewise.
9299         * dwarf2-frame.h: ... here.
9300         (dwarf2_frame_state_alloc_regs): New declaration.
9301         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9302         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9303
9304 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9305
9306         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9307         regcache_raw_read_unsigned.
9308         (xtensa_pseudo_register_write): Likewise.
9309
9310 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9311
9312         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9313         (nds32_pseudo_register_write): Likewise.
9314
9315 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9316
9317         * regcache.c (struct regcache) <readonly_p>: Change its type
9318         to bool.
9319         (regcache_xmalloc_1): Update parameter type and callers update.
9320
9321 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9322
9323         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9324         set_gdbarch_wchar_bit.
9325         * arm-tdep.c (arm_gdbarch_init): Likewise.
9326
9327 2017-04-25  Pedro Alves  <palves@redhat.com>
9328
9329         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9330         (BothAreRelocatable, memcopy, memmove): Don't define.
9331         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9332         macros.
9333
9334 2017-04-25  Pedro Alves  <palves@redhat.com>
9335
9336         * common/common-defs.h: Include "common/poison.h".
9337         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9338         and adjust.
9339         * common/poison.h: New file.
9340         * common/traits.h: Include <type_traits>.
9341         (Not, Or, Requires): New, moved from common/function-view.h.
9342
9343 2017-04-25  Pedro Alves  <palves@redhat.com>
9344
9345         * breakpoint.h (struct breakpoint): In-class initialize all
9346         fields.  Make boolean fields "bool".
9347         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9348         memset call and initializations no longer necessary.
9349
9350 2017-04-25  Pedro Alves  <palves@redhat.com>
9351
9352         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9353         reference.
9354         (pt_btrace_insn): New function.
9355         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9356
9357 2017-04-25  Pedro Alves  <palves@redhat.com>
9358
9359         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9360         "base" field and inherit from "bp_location" instead.  Add
9361         non-default ctor.
9362         (allocate_location_exception): Use new non-default ctor.
9363         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9364         (init_bp_location): Convert to ...
9365         (bp_location::bp_location): ... this new ctor, and remove memset
9366         call.
9367         (base_breakpoint_allocate_location): Use the new non-default ctor.
9368         * breakpoint.h (bp_location): Now a class.  Declare default and
9369         non-default ctors.  In-class initialize all members.
9370         (init_bp_location): Remove declaration.
9371
9372 2017-04-25  Pedro Alves  <palves@redhat.com>
9373
9374         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9375         assignment operator.
9376
9377 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9378
9379         * doublest.c (convert_doublest_to_floatformat): Call
9380         floatformat_totalsize_bytes.
9381
9382 2017-04-22  Tom Tromey  <tom@tromey.com>
9383
9384         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9385         ui_out_emit_list.
9386         * stack.c (print_frame): Use ui_out_emit_list.
9387         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9388         ui_out_emit_list.
9389         * mi/mi-main.c (print_one_inferior)
9390         (mi_cmd_data_list_register_names)
9391         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9392         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9393         ui_out_emit_list.
9394         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9395         (mi_output_solib_attribs): Use ui_out_emit_list,
9396         ui_out_emit_tuple.
9397         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9398         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9399         (mi_cmd_stack_list_args, list_args_or_locals): Use
9400         ui_out_emit_list.
9401         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9402         * breakpoint.c (print_solib_event, output_thread_groups): Use
9403         ui_out_emit_list.
9404
9405 2017-04-22  Tom Tromey  <tom@tromey.com>
9406
9407         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9408         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9409         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9410
9411 2017-04-22  Tom Tromey  <tom@tromey.com>
9412
9413         * tracepoint.c (tvariables_info_1)
9414         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9415
9416 2017-04-22  Tom Tromey  <tom@tromey.com>
9417
9418         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9419         annotate_arg_emitter.
9420         * breakpoint.c (print_mention_watchpoint)
9421         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9422         * annotate.h (struct annotate_arg_emitter): New.
9423
9424 2017-04-22  Tom Tromey  <tom@tromey.com>
9425
9426         * record-btrace.c (record_btrace_insn_history)
9427         (record_btrace_insn_history_range, record_btrace_call_history)
9428         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9429         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9430         ui_out_emit_tuple.
9431         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9432         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9433         * skip.c (skip_info): Use ui_out_emit_tuple.
9434         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9435         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9436         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9437         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9438         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9439         ui_out_emit_tuple.
9440         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9441         (output_register, mi_cmd_data_read_memory)
9442         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9443         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9444         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9445         Use ui_out_emit_tuple.
9446         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9447         ui_out_emit_tuple.
9448         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9449         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9450         * linux-thread-db.c (info_auto_load_libthread_db): Use
9451         ui_out_emit_tuple.
9452         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9453         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9454         * disasm.c (do_mixed_source_and_assembly_deprecated)
9455         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9456         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9457         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9458         * breakpoint.c (print_one_breakpoint_location)
9459         (print_one_breakpoint): Use ui_out_emit_tuple.
9460         * auto-load.c (print_script, info_auto_load_cmd): Use
9461         ui_out_emit_tuple.
9462         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9463
9464 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9465
9466         * thread.c (print_thread_info_1): Remove dead code.
9467
9468 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9469
9470         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9471         GDB_SELF_TEST.
9472         * arm-tdep.c (selftests::arm_record_test): Likewise.
9473
9474 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9475
9476         * regcache.c (regcache_restore): Remove argument 2.  Replace
9477         argument 3 with regcache.  Get register status from
9478         src->register_status and get register contents from
9479         register_buffer (src, regnum).
9480         (regcache_cpy): Update.
9481
9482 2017-04-19  Pedro Alves  <palves@redhat.com>
9483
9484         * gdbthread.h (thread): Add missing closing parenthesis in
9485         comment.
9486
9487 2017-04-19  Pedro Alves  <palves@redhat.com>
9488
9489         * common/refcounted-object.h: New file.
9490         * gdbthread.h: Include "common/refcounted-object.h".
9491         (thread_info): Inherit from refcounted_object and add comments.
9492         (thread_info::incref, thread_info::decref)
9493         (thread_info::m_refcount): Delete.
9494         (thread_info::deletable): Use the refcounted_object::refcount()
9495         method.
9496         * inferior.c (current_inferior_): Add comment.
9497         (set_current_inferior): Increment/decrement refcounts.
9498         (prune_inferiors, remove_inferior_command): Skip inferiors marked
9499         not-deletable instead of comparing with the current inferior.
9500         (initialize_inferiors): Increment the initial inferior's refcount.
9501         * inferior.h (struct inferior): Forward declare.
9502         Include "common/refcounted-object.h".
9503         (current_inferior, set_current_inferior): Move declaration to
9504         before struct inferior's definition, and fix comment.
9505         (inferior): Inherit from refcounted_object.  Add comments.
9506         * thread.c (switch_to_thread_no_regs): Reference the thread's
9507         inferior pointer directly instead of doing a ptid lookup.
9508         (switch_to_no_thread): New function.
9509         (switch_to_thread(thread_info *)): New function, factored out
9510         from ...
9511         (switch_to_thread(ptid_t)): ... this.
9512         (restore_current_thread): Delete.
9513         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9514         fields, and add 'inf' field.
9515         (do_restore_current_thread_cleanup): Check whether old->inf is
9516         alive instead of looking up an inferior by ptid.  Use
9517         switch_to_thread and switch_to_no_thread.
9518         (restore_current_thread_cleanup_dtor): Use old->inf directly
9519         instead of lookup up an inferior by id.  Decref the inferior.
9520         Don't restore 'removable'.
9521         (make_cleanup_restore_current_thread): Same the inferior pointer
9522         in old, instead of the inferior number.  Incref the inferior.
9523         Don't save/clear 'removable'.
9524
9525 2017-04-19  Pedro Alves  <palves@redhat.com>
9526
9527         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9528         unittests/scoped_restore-selftests.c.
9529         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9530         * common/scoped_restore.h (scoped_restore_base): Make "class".
9531         (scoped_restore_base::release): New public method.
9532         (scoped_restore_base::scoped_restore_base): New protected ctor.
9533         (scoped_restore_base::m_saved_var): New protected field.
9534         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9535         scoped_restore_base base class instead of m_saved_var directly.
9536         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9537         (scoped_restore_tmpl::scoped_restore_tmpl(const
9538         scoped_restore_tmpl<T>&)): Likewise.
9539         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9540         method.
9541         (scoped_restore_tmpl::saved_var): New method.
9542         (scoped_restore_tmpl::m_saved_var): Delete.
9543         * inferior.h (inferior::detaching): Now a bool.
9544         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9545         cleanup.
9546         * unittests/scoped_restore-selftests.c: New file.
9547
9548 2017-04-19  Pedro Alves  <palves@redhat.com>
9549
9550         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9551         Re-sort in alphabetic order.
9552
9553 2017-04-18  Pedro Alves  <palves@redhat.com>
9554
9555         * xml-support.c (obstack_xml_printf): Delete.
9556         * xml-support.h (obstack_xml_printf): Delete.
9557
9558 2017-04-18  Pedro Alves  <palves@redhat.com>
9559
9560         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9561         vdebug, verror, body_text, start_element, end_element, name,
9562         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9563         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9564         is_xinclude>: Make private and add m_ prefix.
9565         (gdb_xml_parser::body_text): New method, based on ...
9566         (gdb_xml_body_text): ... this.  Adjust.
9567         (gdb_xml_parser::vdebug): New method, based on ...
9568         (gdb_xml_debug): ... this.  Adjust.
9569         (gdb_xml_parser::verror): New method, based on ...
9570         (gdb_xml_error): ... this.  Adjust.
9571         (gdb_xml_parser::start_element): New method, based on ...
9572         (gdb_xml_start_element): ... this.  Adjust.
9573         (gdb_xml_start_element_wrapper): Defer to
9574         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9575         (gdb_xml_parser::end_element): New method, based on ...
9576         (gdb_xml_end_element_wrapper): ... this.  Adjust.
9577         (gdb_xml_parser::~gdb_xml_parser): Adjust.
9578         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9579         (gdb_xml_parser::use_dtd): New method, based on ...
9580         (gdb_xml_use_dtd): ... this.  Adjust.
9581         (gdb_xml_parser::parse): New method, based on ...
9582         (gdb_xml_parse): ... this.  Adjust.
9583         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9584         (xinclude_start_include): Adjust to call the parser's name method.
9585         (xml_xinclude_default, xml_xinclude_start_doctype)
9586         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9587         method.
9588         (xml_process_xincludes): Adjust to call parser methods.
9589         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9590         declarations.
9591
9592 2017-04-18  Pedro Alves  <palves@redhat.com>
9593
9594         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9595         gdb::optional<std::string>.
9596         * xml-support.c: Include <string>.
9597         (scope_level::scope_level(scope_level &&))
9598         (scope_level::~scope_level): Delete.
9599         (scope_level::body): Now a std::string.
9600         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9601         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9602         parameter.
9603         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9604         (xinclude_parsing_data::output): Now a std::string reference.
9605         (xinclude_start_include): Adjust.
9606         (xml_xinclude_default): Adjust.
9607         (xml_process_xincludes): Add 'output' parameter, and return bool.
9608         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9609         and return bool.
9610         * xml-tdesc.c: Include <unordered_map> and <string>.
9611         (tdesc_xml_cache): Delete.
9612         (tdesc_xml_cache_s): Delete.
9613         (xml_cache): Now an std::unordered_map.
9614         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9615         (target_fetch_description_xml): Change return type to
9616         gdb::optional<std::string>, and adjust.
9617         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9618         (target_fetch_description_xml): Change return type to
9619         gdb::optional<std::string>.
9620
9621 2017-04-18  Pedro Alves  <palves@redhat.com>
9622
9623         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9624         unittests/optional-selftests.c.
9625         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9626         * unittests/optional-selftests.c: New file.
9627         * unittests/optional/assignment/1.cc: New file.
9628         * unittests/optional/assignment/2.cc: New file.
9629         * unittests/optional/assignment/3.cc: New file.
9630         * unittests/optional/assignment/4.cc: New file.
9631         * unittests/optional/assignment/5.cc: New file.
9632         * unittests/optional/assignment/6.cc: New file.
9633         * unittests/optional/assignment/7.cc: New file.
9634         * unittests/optional/cons/copy.cc: New file.
9635         * unittests/optional/cons/default.cc: New file.
9636         * unittests/optional/cons/move.cc: New file.
9637         * unittests/optional/cons/value.cc: New file.
9638         * unittests/optional/in_place.cc: New file.
9639         * unittests/optional/observers/1.cc: New file.
9640         * unittests/optional/observers/2.cc: New file.
9641
9642 2017-04-18  Pedro Alves  <palves@redhat.com>
9643
9644         * common/gdb_optional.h: Include common/traits.h.
9645         (in_place_t): New type.
9646         (in_place): New constexpr variable.
9647         (optional::optional): Remove member initialization of
9648         m_instantiated.
9649         (optional::optional(in_place_t...)): New constructor.
9650         (optional::~optional): Use reset.
9651         (optional::optional(const optional&)): New.
9652         (optional::optional(const optional&&)): New.
9653         (optional::optional(T &)): New.
9654         (optional::optional(T &&)): New.
9655         (operator::operator=(const optional &)): New.
9656         (operator::operator=(optional &&)): New.
9657         (operator::operator= (const T &))
9658         (operator::operator= (T &&))
9659         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
9660         (operator::reset): New.
9661         (operator::m_instantiated):: Add in-class initializer.
9662         * common/traits.h: Include <type_traits>.
9663         (struct And): New types.
9664
9665 2017-04-18  Pedro Alves  <palves@redhat.com>
9666
9667         * xml-support.c: Include <vector>.
9668         (scope_level::scope_level(const gdb_xml_element *))
9669         (scope_level::scope_level(scope_level&&)): New.
9670         (scope_level::~scope_level): New.
9671         (scope_level_s): Delete.
9672         (gdb_xml_parser::scopes): Now a std::vector.
9673         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9674         Use std::vector.
9675         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9676         scope cleanup code.
9677         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9678         of the scopes member.  Use std::vector::emplace_back.
9679
9680 2017-04-18  Pedro Alves  <palves@redhat.com>
9681
9682         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
9683         a bool.
9684         (gdb_xml_end_element): Change type of first parameter.
9685         (gdb_xml_cleanup): Rename to ...
9686         (gdb_xml_parser::~gdb_xml_parser): ... this.
9687         (gdb_xml_create_parser_and_cleanup): Delete with ...
9688         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9689         to this new ctor.
9690         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9691         using gdb_xml_create_parser_and_cleanup.
9692         (xinclude_parsing_data): Add ctor/dtor.
9693         (xml_xinclude_cleanup): Delete.
9694         (xml_process_xincludes): Create a local xinclude_parsing_data
9695         instead of heap-allocating one.  Create a local gdb_xml_parser
9696         instead of heap-allocating one with
9697         gdb_xml_create_parser_and_cleanup.
9698
9699 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
9700
9701         PR threads/20743
9702         * fbsd-nat.c (resume_one_thread_cb): Remove.
9703         (resume_all_threads_cb): Remove.
9704         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9705         iterate_over_threads.
9706
9707 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9708
9709         * NEWS: Create a new section for the next release branch.
9710         Rename the section of the current branch, now that it has
9711         been cut.
9712
9713 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
9714
9715         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9716         * version.in: Bump version to 8.0.50.DATE-git.
9717
9718 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
9719
9720         PR gdb/21385
9721         * windows-nat.c (windows_create_inferior): Declare 'allargs'
9722         independently of the host, and fix build breakage on Cygwin.
9723
9724 2017-04-13  Pedro Alves  <palves@redhat.com>
9725
9726         * inferior.c (free_inferior): Convert to ...
9727         (inferior::~inferior): ... this dtor.
9728         (inferior::inferior): New ctor, factored out from ...
9729         (add_inferior_silent): ... here.  Allocate the inferior with a new
9730         expression.
9731         (delete_inferior): Call delete instead of free_inferior.
9732         * inferior.h (gdb_environ, continuation): Forward declare.
9733         (inferior): Now a class.  Add in-class initialization to all
9734         members.  Make boolean fields bool, except 'detaching'.
9735         (inferior::inferior): New explicit ctor.
9736         (inferior::~inferior): New.
9737
9738 2017-04-13  Pedro Alves  <palves@redhat.com>
9739
9740         * inferior.c (init_inferior_list): Delete.
9741         * inferior.h (init_inferior_list): Delete.
9742
9743 2017-04-13  Pedro Alves  <palves@redhat.com>
9744
9745         PR threads/13217
9746         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9747         (top level): Call it twice, with different thread sets.
9748
9749 2017-04-13  Pedro Alves  <palves@redhat.com>
9750
9751         * thread.c: Include <algorithm>.
9752         (thread_array_cleanup): Delete.
9753         (scoped_inc_dec_ref): New class.
9754         (live_threads_count): New function.
9755         (set_thread_refcount): Delete.
9756         (tp_array_compar_ascending): Now a bool.
9757         (tp_array_compar): Convert to a std::sort comparison function.
9758         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9759         and live_threads_count.
9760
9761 2017-04-13  Pedro Alves  <palves@redhat.com>
9762
9763         * infrun.c (follow_fork_inferior): Also switch the current
9764         inferior.
9765
9766 2017-04-13  Pedro Alves  <palves@redhat.com>
9767
9768         * breakpoint.c (watch_command_1): Save watchpoint-frame info
9769         before calling create_internal_breakpoint.
9770
9771 2017-04-13  Pedro Alves  <palves@redhat.com>
9772
9773         * fork-child.c (execv_argv): New class.
9774         (breakup_args): Refactored as ...
9775         (execv_argv::init_for_no_shell): .. this method of execv_argv.
9776         Copy arguments to storage and replace separators with NULL
9777         terminators in place.
9778         (escape_bang_in_quoted_argument): Adjust to return bool.
9779         (execv_argv::execv_argv): New ctor.
9780         (execv_argv::init_for_shell): New method, factored out from
9781         fork_inferior.  Don't strdup strings into the vector.
9782         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
9783         Remove free_vector_argv call.
9784
9785 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9786
9787         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9788         tdep->rx_psw_type.
9789
9790 2017-04-13  Yao Qi  <yao.qi@linaro.org>
9791
9792         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9793         * rx-tdep.c (rx_gdbarch_init): Likewise.
9794
9795 2017-04-13  Pedro Alves  <palves@redhat.com>
9796
9797         * breakpoint.h (struct breakpoint): Reindent.
9798
9799 2017-04-13  Pedro Alves  <palves@redhat.com>
9800
9801         * breakpoint.c (bp_location): Rename to ...
9802         (bp_locations): ... this.  All references updated.
9803         (bp_location_count): Rename to ...
9804         (bp_locations_count): ... this.  All references updated.
9805         (bp_location_placed_address_before_address_max): Rename to ...
9806         (bp_locations_placed_address_before_address_max): ... this.  All
9807         references updated.
9808         (bp_location_shadow_len_after_address_max): Rename to ...
9809         (bp_locations_shadow_len_after_address_max): ... this.  All
9810         references updated.
9811         (bp_location_compare_addrs): Rename to ...
9812         (bp_locations_compare_addrs): ... this.  All references updated.
9813         (bp_location_compare):Rename to ...
9814         (bp_locations_compare): ... this.  All references updated.
9815         (bp_location_target_extensions_update): Rename to ...
9816         (bp_locations_target_extensions_update): ... this.  All references
9817         updated.
9818
9819 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9820
9821         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9822         * common/common.m4: Check headers 'termios.h', 'termio.h' and
9823         'sgtty.h'.
9824         * common/gdb_termios.h: New file, with parts of "terminal.h".
9825         * inflow.c: Include "gdb_termios.h".
9826         * ser-unix.c: Include "gdb_termios.h".
9827         * terminal.h: Move terminal-related defines to
9828         "common/gdb_termios.h".
9829
9830 2017-04-12  Tom Tromey  <tom@tromey.com>
9831
9832         * probe.c (parse_probes): Update.
9833         * location.h (delete_event_location): Don't declare.
9834         (event_location_deleter::operator()): Update.
9835         * location.c (event_location_deleter::operator()): Rename from
9836         delete_event_location.
9837         * linespec.h (linespec_result) <location>: Change type to
9838         event_location_up.
9839         * linespec.c (canonicalize_linespec, event_location_to_sals)
9840         (decode_objc): Update.
9841         (linespec_result): Don't call delete_event_location.
9842         * breakpoint.c (create_breakpoints_sal)
9843         (bkpt_probe_create_sals_from_location)
9844         (strace_marker_create_sals_from_location): Update.
9845
9846 2017-04-12  Tom Tromey  <tom@tromey.com>
9847
9848         * linespec.h (struct linespec_result): Add constructor and
9849         destructor.
9850         (init_linespec_result, destroy_linespec_result)
9851         (make_cleanup_destroy_linespec_result): Don't declare.
9852         * linespec.c (init_linespec_result): Remove.
9853         (linespec_result::~linespec_result): Rename from
9854         destroy_linespec_result.  Update.
9855         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9856         Remove.
9857         * breakpoint.c (create_breakpoint, break_range_command)
9858         (decode_location_default): Update.
9859         * ax-gdb.c (agent_command_1): Update.
9860
9861 2017-04-12  Tom Tromey  <tom@tromey.com>
9862
9863         * remote.c (remote_download_tracepoint): Update.
9864         * python/py-breakpoint.c (bppy_get_location): Update.
9865         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9866         (gdbscm_breakpoint_location): Update.
9867         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9868         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9869         Change type to event_location_up.
9870         * breakpoint.c (create_overlay_event_breakpoint)
9871         (create_longjmp_master_breakpoint)
9872         (create_std_terminate_master_breakpoint)
9873         (create_exception_master_breakpoint)
9874         (breakpoint_event_location_empty_p, print_breakpoint_location)
9875         (print_one_breakpoint_location, create_thread_event_breakpoint)
9876         (init_breakpoint_sal, create_breakpoint)
9877         (print_recreate_ranged_breakpoint, break_range_command)
9878         (init_ada_exception_breakpoint, say_where): Update.
9879         (base_breakpoint_dtor): Don't call delete_event_location.
9880         (bkpt_print_recreate, tracepoint_print_recreate)
9881         (dprintf_print_recreate, update_static_tracepoint)
9882         (breakpoint_re_set_default): Update.
9883
9884 2017-04-12  Tom Tromey  <tom@tromey.com>
9885
9886         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9887         type of "to_do".  Update.
9888         (compute_stack_depth): Use std::vector.
9889
9890 2017-04-12  Tom Tromey  <tom@tromey.com>
9891
9892         * printcmd.c (find_instruction_backward): Use std::vector.
9893
9894 2017-04-12  Tom Tromey  <tom@tromey.com>
9895
9896         * symfile.c (objfilep): Remove typedef.
9897         (reread_symbols): Use a std::vector.
9898
9899 2017-04-12  Tom Tromey  <tom@tromey.com>
9900
9901         * mi/mi-main.c (exec_direction_forward): Remove.
9902         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9903         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9904         scoped_restore.
9905         * guile/guile.c (guile_repl_command, guile_command)
9906         (gdbscm_execute_gdb_command): Use scoped_restore.
9907         * go-exp.y (go_parse): Use scoped_restore.
9908         * d-exp.y (d_parse): Use scoped_restore.
9909         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9910         * c-exp.y (c_parse): Use scoped_restore.
9911
9912 2017-04-12  Tom Tromey  <tom@tromey.com>
9913
9914         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9915         (mi_parse): Update return type.
9916         (mi_parse_free): Remove.
9917         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9918         (mi_parse::~mi_parse): Rename from mi_parse_free.
9919         (mi_parse_cleanup): Remove.
9920         (mi_parse): Return a unique_ptr.  Use new.
9921         * mi/mi-main.c (mi_execute_command): Update.
9922
9923 2017-04-12  Tom Tromey  <tom@tromey.com>
9924
9925         * location.c (explicit_location_lex_one): Return a
9926         unique_xmalloc_ptr.
9927         (string_to_explicit_location): Update.  Remove cleanups.
9928
9929 2017-04-12  Tom Tromey  <tom@tromey.com>
9930
9931         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9932         (compare_value_and_voffset): Change type.  Update.
9933         (compute_vtable_size): Change type of "offset_vec".
9934         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9935         (gnuv3_get_typeid): Remove extraneous declaration.
9936
9937 2017-04-12  Tom Tromey  <tom@tromey.com>
9938
9939         * charset.h (wchar_iterator): Fix comment.
9940
9941 2017-04-12  Tom Tromey  <tom@tromey.com>
9942
9943         * charset.c (iconv_wrapper): New class.
9944         (cleanup_iconv): Remove.
9945         (convert_between_encodings): Use it.
9946
9947 2017-04-12  Tom Tromey  <tom@tromey.com>
9948
9949         * symfile.h (increment_reading_symtab): Update type.
9950         * symfile.c (decrement_reading_symtab): Remove.
9951         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9952         * psymtab.c (psymtab_to_symtab): Update.
9953         * dwarf2read.c (dw2_instantiate_symtab): Update.
9954
9955 2017-04-12  Tom Tromey  <tom@tromey.com>
9956
9957         * jit.c (struct jit_reader): Declare separately.  Add constructor
9958         and destructor.  Change type of "handle".
9959         (loaded_jit_reader): Define separately.
9960         (jit_reader_load): Update.  New "new".
9961         (jit_reader_unload_command): Use "delete".
9962         * gdb-dlfcn.h (struct dlclose_deleter): New.
9963         (gdb_dlhandle_up): New typedef.
9964         (gdb_dlopen, gdb_dlsym): Update types.
9965         (gdb_dlclose): Remove.
9966         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9967         (gdb_dlsym): Change type of "handle".
9968         (make_cleanup_dlclose): Remove.
9969         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9970         * compile/compile-c-support.c (load_libcc): Update.
9971
9972 2017-04-12  Tom Tromey  <tom@tromey.com>
9973
9974         * symtab.h (find_pcs_for_symtab_line): Change return type.
9975         * symtab.c (find_pcs_for_symtab_line): Change return type.
9976         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9977         type of "vec".  Update.
9978         (ltpy_get_pcs_for_line): Update.
9979         * linespec.c (decode_digits_ordinary): Update.
9980
9981 2017-04-12  Tom Tromey  <tom@tromey.com>
9982
9983         * tracepoint.c (actions_command): Update.
9984         * python/python.c (python_command, python_interactive_command):
9985         Update.
9986         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9987         * guile/guile.c (guile_command): Update.
9988         * defs.h (read_command_lines, read_command_lines_1): Return
9989         command_line_up.
9990         (command_lines_deleter): New struct.
9991         (command_line_up): New typedef.
9992         * compile/compile.c (compile_code_command)
9993         (compile_print_command): Update.
9994         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9995         command_line_up.
9996         (make_cleanup_free_command_lines): Remove.
9997         * cli/cli-script.c (get_command_line, read_command_lines_1)
9998         (copy_command_lines): Return command_line_up.
9999         (while_command, if_command, read_command_lines, define_command)
10000         (document_command): Update.
10001         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10002         Remove.
10003         * breakpoint.h (breakpoint_set_commands): Change type of
10004         "commands".
10005         * breakpoint.c (breakpoint_set_commands): Change type of
10006         "commands".  Update.
10007         (do_map_commands_command, update_dprintf_command_list)
10008         (create_tracepoint_from_upload): Update.
10009
10010 2017-04-12  Tom Tromey  <tom@tromey.com>
10011
10012         * tracepoint.c (scope_info): Update.
10013         * spu-tdep.c (spu_catch_start): Update.
10014         * python/python.c (gdbpy_decode_line): Update.
10015         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10016         * python/py-breakpoint.c (bppy_init): Update.
10017         * probe.c (parse_probes): Update.
10018         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10019         * location.h (event_location_deleter): New struct.
10020         (event_location_up): New typedef.
10021         (new_linespec_location, new_address_location, new_probe_location)
10022         (new_explicit_location, copy_event_location)
10023         (string_to_event_location, string_to_event_location_basic)
10024         (string_to_explicit_location): Update return type.
10025         (make_cleanup_delete_event_location): Remove.
10026         * location.c (new_linespec_location, new_address_location)
10027         (new_probe_location, new_explicit_location, copy_event_location):
10028         Return event_location_up.
10029         (delete_event_location_cleanup)
10030         (make_cleanup_delete_event_location): Remove.
10031         (string_to_explicit_location, string_to_event_location_basic)
10032         (string_to_event_location): Return event_location_up.
10033         * linespec.c (canonicalize_linespec, event_location_to_sals)
10034         (decode_line_with_current_source)
10035         (decode_line_with_last_displayed, decode_objc): Update.
10036         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10037         * completer.c (location_completer): Update.
10038         * cli/cli-cmds.c (edit_command, list_command): Update.
10039         * breakpoint.c (create_overlay_event_breakpoint)
10040         (create_longjmp_master_breakpoint)
10041         (create_std_terminate_master_breakpoint)
10042         (create_exception_master_breakpoint)
10043         (create_thread_event_breakpoint): Update.
10044         (init_breakpoint_sal): Update.  Remove some dead code.
10045         (create_breakpoint_sal): Change type of "location".  Update.
10046         (create_breakpoints_sal, create_breakpoint, break_command_1)
10047         (dprintf_command, break_range_command, until_break_command)
10048         (init_ada_exception_breakpoint)
10049         (strace_marker_create_sals_from_location)
10050         (update_static_tracepoint, trace_command, ftrace_command)
10051         (strace_command, create_tracepoint_from_upload): Update.
10052         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10053         * ax-gdb.c (agent_command_1): Update.
10054
10055 2017-04-12  Pedro Alves  <palves@redhat.com>
10056
10057         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10058         * configure.tgt: Handle i[34567]86-*-go32* and
10059         i[34567]86-*-msdosdjgpp*.
10060         * i386-tdep.c (i386_svr4_reg_to_regnum):
10061         Make extern.
10062         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10063         i386-go32-tdep.c.
10064         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10065         * i386-go32-tdep.c: New file.
10066         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10067         declarations.
10068
10069 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10070
10071         * aix-thread.c (pd_status2str): Change return type to const char *.
10072
10073 2017-04-12  Pedro Alves  <palves@redhat.com>
10074
10075         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10076         calls to set_gdbarch_gnu_triplet_regexp.
10077
10078 2017-04-12  Pedro Alves  <palves@redhat.com>
10079
10080         PR gdb/21323
10081         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10082         New enum value.
10083         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10084         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10085         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10086         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10087         * gdbarch.h, gdbarch.c: Regenerate.
10088         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10089         gdbarch_wchar_bit and gdbarch_wchar_signed.
10090         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10091         * arm-tdep.c (arm_gdbarch_init): Likewise.
10092         * avr-tdep.c (avr_gdbarch_init): Likewise.
10093         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10094         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10095         * i386-tdep.c (i386_go32_init_abi): Likewise.
10096         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10097         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10098         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10099         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10100         * sh-tdep.c (sh_gdbarch_init): Likewise.
10101         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10102         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10103         * windows-tdep.c (windows_init_abi): Likewise.
10104         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10105
10106 2017-04-12  Pedro Alves  <palves@redhat.com>
10107
10108         PR c++/21323
10109         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10110         cplus_primitive_type_char32_t>: New enum values.
10111         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10112         and cplus_primitive_type_char32_t.
10113         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10114         32, use the archtecture's built-in type for char16_t and char32_t,
10115         respectively.  Otherwise, fallback to init_integer_type as before,
10116         but make the type unsigned, and issue a complaint.
10117         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10118
10119 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10120
10121         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10122         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10123
10124 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10125
10126         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10127         'const char *'.
10128
10129 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10130
10131         * common/common-utils.c (free_vector_argv): New function.
10132         * common/common-utils.h: Include <vector>.
10133         (free_vector_argv): New prototype.
10134         * darwin-nat.c (darwin_create_inferior): Rewrite function
10135         prototype in order to constify "exec_file" and accept a
10136         "std::string" for "allargs".
10137         * fork-child.c: Include <vector>.
10138         (breakup_args): Rewrite function, using C++.
10139         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10140         and accept "std::string" for "allargs".  Update the code to
10141         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10142         and "execvp".
10143         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10144         order to constify "exec_file" and accept a "std::string" for
10145         "allargs".
10146         * go32-nat.c (go32_create_inferior): Likewise.
10147         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10148         * infcmd.c (run_command_1): Constify "exec_file".  Use
10149         "std::string" for inferior arguments.
10150         * inferior.h (fork_inferior): Update prototype.
10151         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10152         prototype in order to constify "exec_file" and accept a
10153         "std::string" for "allargs".
10154         * nto-procfs.c (procfs_create_inferior): Likewise.
10155         * procfs.c (procfs_create_inferior): Likewise.
10156         * remote-sim.c (gdbsim_create_inferior): Likewise.
10157         * remote.c (extended_remote_run): Update code to accept
10158         "std::string" as argument.
10159         (extended_remote_create_inferior): Rewrite function prototype in
10160         order to constify "exec_file" and accept a "std::string" for
10161         "allargs".
10162         * rs6000-nat.c (super_create_inferior): Likewise.
10163         (rs6000_create_inferior): Likewise.
10164         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10165         * windows-nat.c (windows_create_inferior): Likewise.
10166
10167 2017-04-11  Pedro Alves  <palves@redhat.com>
10168
10169         * thread.c: Fix whitespace throughout.
10170
10171 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10172
10173         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10174
10175 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10176
10177         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10178
10179 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10180
10181         PR gdb/21364
10182         * osdata.c (info_osdata): Check if 'type' is an empty string
10183         instead of NULL.
10184
10185 2017-04-10  Pedro Alves  <palves@redhat.com>
10186
10187         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10188         (ptid_to_global_thread_id, in_thread_list)
10189         (do_captured_list_thread_ids, set_resumed, set_running)
10190         (set_executing, set_stop_requested, finish_thread_state)
10191         (validate_registers_access, can_access_registers_ptid)
10192         (print_thread_info_1, switch_to_thread)
10193         (do_restore_current_thread_cleanup)
10194         (make_cleanup_restore_current_thread, thread_command)
10195         (thread_name_command): Use operator== instead of ptid_equal.
10196
10197 2017-04-10  Pedro Alves  <palves@redhat.com>
10198
10199         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10200         (current_thread_cleanup_chain): Delete.
10201         (restore_current_thread_cleanup_dtor)
10202         (make_cleanup_restore_current_thread): Remove references to
10203         current_thread_cleanup_chain.
10204
10205 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10206
10207         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10208         REG_UNKNOWN.
10209
10210 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10211
10212         PR gdb/19942
10213         * gdbthread.h (thread_info::deletable): New method.
10214         (thread_info::incref): New method.
10215         (thread_info::decref): New method.
10216         (thread_info::refcount): Move it to private.
10217         * infrun.c (save_stop_context): Call inc_refcount.
10218         (release_stop_context_cleanup): Likewise.
10219         * thread.c (set_thread_exited): New function.
10220         (init_thread_list): Delete "tp" only it is deletable, otherwise
10221         call set_thread_exited.
10222         (delete_thread_1): Call set_thread_exited.
10223         (current_thread_cleanup) <inferior_pid>: Remove.
10224         <thread>: New field.
10225         (restore_current_thread_ptid_changed): Removed.
10226         (do_restore_current_thread_cleanup): Adjust.
10227         (restore_current_thread_cleanup_dtor): Don't call
10228         find_thread_ptid.
10229         (set_thread_refcount): Use dec_refcount.
10230         (make_cleanup_restore_current_thread): Adjust.
10231         (thread_apply_all_command): Call inc_refcount.
10232         (_initialize_thread): Don't call
10233         observer_attach_thread_ptid_changed.
10234
10235 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10236
10237         * thread.c (delete_thread_1): Hoist code on marking thread as
10238         exited.
10239
10240 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * windows-nat.c (windows_detach): Initialize ptid with
10243         minus_one_ptid.
10244
10245 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10246
10247         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10248
10249 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10250
10251         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10252         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10253         (bfin_pseudo_register_write): Likewise
10254
10255 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10256
10257         * common/ptid.h (struct ptid): Change to...
10258         (class ptid_t): ... this.
10259         <ptid_t>: New constructors.
10260         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10261         matches>: New methods.
10262         <make_null, make_minus_one>: New static methods.
10263         <pid>: Rename to...
10264         <m_pid>: ...this.
10265         <lwp>: Rename to...
10266         <m_lwp>: ...this.
10267         <tid>: Rename to...
10268         <m_tid>: ...this.
10269         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10270         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10271         as references, move comment to class ptid_t.
10272         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10273         ptid_t static methods.
10274         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10275         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10276         Take ptid arguments as references, implement using ptid_t methods.
10277         * unittests/ptid-selftests.c: New file.
10278         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10279         unittests/ptid-selftests.c.
10280         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10281
10282 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10283
10284         * python/python.c (python_run_simple_file): Cast mode literal to
10285         non-const char pointer as expected by PyFile_FromString.
10286
10287 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10288
10289         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10290         minus_one_ptid and null_ptid.
10291
10292 2017-04-05  Pedro Alves  <palves@redhat.com>
10293
10294         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10295         * configure: Regenerate.
10296
10297 2017-04-05  Pedro Alves  <palves@redhat.com>
10298
10299         * ada-exp.y (yyerror): Constify.
10300         * ada-lang.c (bound_name, get_selections)
10301         (ada_variant_discrim_type)
10302         (ada_variant_discrim_name, ada_value_struct_elt)
10303         (ada_lookup_struct_elt_type, is_unchecked_variant)
10304         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10305         (catch_ada_exception_command_split)
10306         (catch_ada_assert_command_split, catch_assert_command)
10307         (ada_op_name): Constify.
10308         * ada-lang.h (ada_yyerror, get_selections)
10309         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10310         * arc-tdep.c (arc_print_frame_cache): Constify.
10311         * arm-tdep.c (arm_skip_stub): Constify.
10312         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10313         (gen_aggregate_elt_ref): Constify.
10314         * bcache.c (print_bcache_statistics): Constify.
10315         * bcache.h (print_bcache_statistics): Constify.
10316         * break-catch-throw.c (catch_exception_command_1):
10317         * breakpoint.c (struct ep_type_description::description):
10318         Constify.
10319         (add_solib_catchpoint): Constify.
10320         (catch_fork_command_1): Add cast.
10321         (add_catch_command): Constify.
10322         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10323         Constify.
10324         * bsd-uthread.c (bsd_uthread_state): Constify.
10325         * buildsym.c (patch_subfile_names): Constify.
10326         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10327         Constify.
10328         * c-exp.y (yyerror): Constify.
10329         (token::oper): Constify.
10330         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10331         * c-varobj.c (cplus_describe_child): Constify.
10332         * charset.c (find_charset_names): Add cast.
10333         (find_charset_names): Constify array and add const_cast.
10334         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10335         (edit_command): Constify.
10336         * cli/cli-decode.c (lookup_cmd): Constify.
10337         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10338         Constify.
10339         (struct dump_context): Constify.
10340         (add_dump_command, restore_command): Constify.
10341         * cli/cli-script.c (get_command_line): Constify.
10342         * cli/cli-script.h (get_command_line): Constify.
10343         * cli/cli-utils.c (check_for_argument): Constify.
10344         * cli/cli-utils.h (check_for_argument): Constify.
10345         * coff-pe-read.c (struct read_pe_section_data): Constify.
10346         * command.h (lookup_cmd): Constify.
10347         * common/print-utils.c (decimal2str): Constify.
10348         * completer.c (gdb_print_filename): Constify.
10349         * corefile.c (set_gnutarget): Constify.
10350         * cp-name-parser.y (yyerror): Constify.
10351         * cp-valprint.c (cp_print_class_member): Constify.
10352         * cris-tdep.c (cris_register_name, crisv32_register_name):
10353         Constify.
10354         * d-exp.y (yyerror): Constify.
10355         (struct token::oper): Constify.
10356         * d-lang.h (d_yyerror): Constify.
10357         * dbxread.c (struct header_file_location::name): Constify.
10358         (add_old_header_file, add_new_header_file, last_function_name)
10359         (dbx_next_symbol_text, add_bincl_to_list)
10360         (find_corresponding_bincl_psymtab, set_namestring)
10361         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10362         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10363         * defs.h (command_line_input, print_address_symbolic)
10364         (deprecated_readline_begin_hook): Constify.
10365         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10366         Constify.
10367         * event-top.c (handle_line_of_input): Constify and add cast.
10368         * exceptions.c (catch_errors): Constify.
10369         * exceptions.h (catch_errors): Constify.
10370         * expprint.c (print_subexp_standard, op_string, op_name)
10371         (op_name_standard, dump_raw_expression, dump_raw_expression):
10372         * expression.h (op_name, op_string, dump_raw_expression):
10373         Constify.
10374         * f-exp.y (yyerror): Constify.
10375         (struct token::oper): Constify.
10376         (struct f77_boolean_val::name): Constify.
10377         * f-lang.c (f_word_break_characters): Constify.
10378         * f-lang.h (f_yyerror): Constify.
10379         * fork-child.c (fork_inferior): Add cast.
10380         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10381         (new_variant): Constify.
10382         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10383         * gdbarch.c: Regenerate.
10384         * gdbcore.h (set_gnutarget): Constify.
10385         * go-exp.y (yyerror): Constify.
10386         (token::oper): Constify.
10387         * go-lang.h (go_yyerror): Constify.
10388         * go32-nat.c (go32_sysinfo): Constify.
10389         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10390         * guile/scm-cmd.c (cmdscm_function): Constify.
10391         * guile/scm-param.c (pascm_param_value): Constify.
10392         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10393         (h8300sx_register_name): Constify.
10394         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10395         Constify.
10396         * ia64-tdep.c (ia64_register_names): Constify.
10397         * infcmd.c (construct_inferior_arguments): Constify.
10398         (path_command, attach_post_wait): Constify.
10399         * language.c (show_range_command, show_case_command)
10400         (unk_lang_error): Constify.
10401         * language.h (language_defn::la_error)
10402         (language_defn::la_name_of_this): Constify.
10403         * linespec.c (decode_line_2): Constify.
10404         * linux-thread-db.c (thread_db_err_str): Constify.
10405         * lm32-tdep.c (lm32_register_name): Constify.
10406         * m2-exp.y (yyerror): Constify.
10407         * m2-lang.h (m2_yyerror): Constify.
10408         * m32r-tdep.c (m32r_register_names): Constify and make static.
10409         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10410         * m88k-tdep.c (m88k_register_name): Constify.
10411         * macroexp.c (appendmem): Constify.
10412         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10413         (upgrade_type, parse_external, parse_partial_symbols)
10414         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10415         (new_symbol): Constify.
10416         * memattr.c (mem_info_command): Constify.
10417         * mep-tdep.c (register_name_from_keyword): Constify.
10418         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10419         Constify.
10420         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10421         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10422         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10423         cast.
10424         (mi_execute_async_cli_command): Constify.
10425         * mips-tdep.c (mips_register_name): Constify.
10426         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10427         (am33_register_name, am33_2_register_name)
10428         * moxie-tdep.c (moxie_register_names): Constify.
10429         * nat/linux-osdata.c (osdata_type): Constify fields.
10430         * nto-tdep.c (nto_parse_redirection): Constify.
10431         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10432         (lookup_child_selector): Constify.
10433         (objc_methcall::name): Constify.
10434         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10435         (lookup_struct_typedef): Constify.
10436         * objfiles.c (pc_in_section): Constify.
10437         * objfiles.h (pc_in_section): Constify.
10438         * p-exp.y (struct token::oper): Constify.
10439         (yyerror): Constify.
10440         * p-lang.h (pascal_yyerror): Constify.
10441         * parser-defs.h (op_name_standard): Constify.
10442         (op_print::string): Constify.
10443         (exp_descriptor::op_name): Constify.
10444         * printcmd.c (print_address_symbolic): Constify.
10445         * psymtab.c (print_partial_symbols): Constify.
10446         * python/py-breakpoint.c (stop_func): Constify.
10447         (bppy_get_expression): Constify.
10448         * python/py-cmd.c (cmdpy_completer::name): Constify.
10449         (cmdpy_function): Constify.
10450         * python/py-event.c (evpy_add_attribute)
10451         (gdbpy_initialize_event_generic): Constify.
10452         * python/py-event.h (evpy_add_attribute)
10453         (gdbpy_initialize_event_generic): Constify.
10454         * python/py-evts.c (add_new_registry): Constify.
10455         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10456         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10457         * python/py-inferior.c (get_buffer): Add cast.
10458         * python/py-param.c (parm_constant::name): Constify.
10459         * python/py-unwind.c (fprint_frame_id): Constify.
10460         * python/python.c (gdbpy_parameter_value): Constify.
10461         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10462         * remote.c (memory_packet_config::name): Constify.
10463         (show_packet_config_cmd, remote_write_bytes)
10464         (remote_buffer_add_string):
10465         * reverse.c (exec_reverse_once): Constify.
10466         * rs6000-tdep.c (variant::name, variant::description): Constify.
10467         * rust-exp.y (rustyyerror): Constify.
10468         * rust-lang.c (rust_op_name): Constify.
10469         * rust-lang.h (rustyyerror): Constify.
10470         * serial.h (serial_ops::name): Constify.
10471         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10472         (sh_sh3e_register_name, sh_sh2e_register_name)
10473         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10474         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10475         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10476         (sh_sh4al_dsp_register_name): Constify.
10477         * sh64-tdep.c (sh64_register_name): Constify.
10478         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10479         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10480         * stabsread.c (patch_block_stabs, read_type_number)
10481         (ref_map::stabs, ref_add, process_reference)
10482         (symbol_reference_defined, define_symbol, define_symbol)
10483         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10484         (read_one_struct_field, read_struct_fields, read_baseclasses)
10485         (read_tilde_fields, read_struct_type, read_array_type)
10486         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10487         (read_huge_number, read_range_type, read_args, common_block_start)
10488         (find_name_end): Constify.
10489         * stabsread.h (common_block_start, define_symbol)
10490         (process_one_symbol, symbol_reference_defined, ref_add):
10491         * symfile.c (get_section_index, add_symbol_file_command):
10492         * symfile.h (get_section_index): Constify.
10493         * target-descriptions.c (tdesc_type::name): Constify.
10494         (tdesc_free_type): Add cast.
10495         * target.c (find_default_run_target):
10496         (add_deprecated_target_alias, find_default_run_target)
10497         (target_announce_detach): Constify.
10498         (do_option): Constify.
10499         * target.h (add_deprecated_target_alias): Constify.
10500         * thread.c (print_thread_info_1): Constify.
10501         * top.c (deprecated_readline_begin_hook, command_line_input):
10502         Constify.
10503         (init_main): Add casts.
10504         * top.h (handle_line_of_input): Constify.
10505         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10506         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10507         (tfind_command): Rename to ...
10508         (tfind_command_1): ... this and constify.
10509         (tfind_command): New function.
10510         (tfind_end_command, tfind_start_command): Adjust.
10511         (encode_source_string): Constify.
10512         * tracepoint.h (encode_source_string): Constify.
10513         * tui/tui-data.c (tui_partial_win_by_name): Constify.
10514         * tui/tui-data.h (tui_partial_win_by_name): Constify.
10515         * tui/tui-source.c (tui_set_source_content_nil): Constify.
10516         * tui/tui-source.h (tui_set_source_content_nil): Constify.
10517         * tui/tui-win.c (parse_scrolling_args): Constify.
10518         * tui/tui-windata.c (tui_erase_data_content): Constify.
10519         * tui/tui-windata.h (tui_erase_data_content): Constify.
10520         * tui/tui-winsource.c (tui_erase_source_content): Constify.
10521         * tui/tui.c (tui_enable): Add cast.
10522         * utils.c (defaulted_query): Constify.
10523         (init_page_info): Add cast.
10524         (puts_debug, subset_compare): Constify.
10525         * utils.h (subset_compare): Constify.
10526         * varobj.c (varobj_format_string): Constify.
10527         * varobj.h (varobj_format_string): Constify.
10528         * vax-tdep.c (vax_register_name): Constify.
10529         * windows-nat.c (windows_detach): Constify.
10530         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10531         * xml-support.c (gdb_xml_end_element): Constify.
10532         * xml-tdesc.c (tdesc_start_reg): Constify.
10533         * xstormy16-tdep.c (xstormy16_register_name): Constify.
10534         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10535         * xtensa-tdep.h (xtensa_register_t::name): Constify.
10536
10537 2017-04-05  Pedro Alves  <palves@redhat.com>
10538
10539         * proc-api.c (struct trans): Constify.
10540         (procfs_note): Constify.
10541         * proc-events.c (struct trans, syscall_table):
10542         * proc-flags.c (struct trans): Constify.
10543         * proc-utils.h (procfs_note): Constify.
10544         * proc-why.c (struct trans): Constify.
10545         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10546         (procfs_detach): Constify.
10547         * sol-thread.c (struct string_map): Constify.
10548         (td_err_string, td_state_string): Constify.
10549
10550 2017-04-05  Pedro Alves  <palves@redhat.com>
10551
10552         * proc-api.c (procfs_filename): Don't initialize
10553         procfs_filename.
10554         (prepare_to_trace): Assume procfs_filename is non-NULL.
10555         (_initialize_proc_api): Give procfs_filename a default value here.
10556
10557 2017-04-05  Pedro Alves  <palves@redhat.com>
10558
10559         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10560         'cond_string' parameter.
10561         (extract_exception_regexp): Constify 'string' parameter.
10562         (catch_exception_command_1): Constify.
10563         * breakpoint.c (init_catchpoint)
10564         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10565         parameter.
10566         (ep_parse_optional_if_clause, catch_fork_command_1)
10567         (catch_exec_command_1): Constify.
10568         * breakpoint.h (init_catchpoint): Constify 'cond_string'
10569         parameter.
10570         (ep_parse_optional_if_clause): Constify.
10571         * cli/cli-utils.c (remove_trailing_whitespace)
10572         (check_for_argument): Constify.
10573         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10574         non-const overload.
10575         (check_for_argument): Likewise.
10576
10577 2017-04-05  Pedro Alves  <palves@redhat.com>
10578
10579         * event-top.c (command_line_handler): Add cast to execute_command
10580         call.
10581         * record-btrace.c (cmd_record_btrace_bts_start)
10582         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10583         (cmd_record_btrace_start): Add cast to execute_command call.
10584         * record-full.c (record_full_goto_insn):
10585         * record.c (record_start, record_stop): Add cast to
10586         execute_command_to_string calls.
10587         (cmd_record_start): Add cast to execute_command calls.
10588
10589 2017-04-05  Pedro Alves  <palves@redhat.com>
10590
10591         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10592         static inline function.
10593         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10594         array and use gdb_PyArg_ParseTupleAndKeywords.
10595         * python/py-cmd.c (cmdpy_init): Likewise.
10596         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10597         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10598         (infpy_search_memory): Likewise.
10599         * python/py-objfile.c (objfpy_add_separate_debug_file)
10600         (gdbpy_lookup_objfile): Likewise.
10601         * python/py-symbol.c (gdbpy_lookup_symbol)
10602         (gdbpy_lookup_global_symbol): Likewise.
10603         * python/py-type.c (gdbpy_lookup_type): Likewise.
10604         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10605         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10606         Likewise.
10607
10608 2017-04-05  Pedro Alves  <palves@redhat.com>
10609
10610         * python/python-internal.h (gdb_PyGetSetDef): New type.
10611         * python/py-block.c (block_object_getset)
10612         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10613         * python/py-event.c (event_object_getset)
10614         (finish_breakpoint_object_getset): Likewise.
10615         * python/py-inferior.c (inferior_object_getset): Likewise.
10616         * python/py-infthread.c (thread_object_getset): Likewise.
10617         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10618         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10619         * python/py-objfile.c (objfile_getset): Likewise.
10620         * python/py-progspace.c (pspace_getset): Likewise.
10621         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10622         Likewise.
10623         * python/py-record.c (recpy_record_getset): Likewise.
10624         * python/py-symbol.c (symbol_object_getset): Likewise.
10625         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10626         Likewise.
10627         * python/py-type.c (type_object_getset, field_object_getset):
10628         Likewise.
10629         * python/py-value.c (value_object_getset): Likewise.
10630
10631 2017-04-05  Pedro Alves  <palves@redhat.com>
10632
10633         * python/python-internal.h (gdb_PyObject_CallMethod)
10634         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10635         New functions.
10636         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10637         (PySys_GetObject, PySys_SetPath): New macros.
10638
10639 2017-04-05  Pedro Alves  <palves@redhat.com>
10640
10641         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10642         info_osdata_command.
10643         * osdata.c (info_osdata_command): Rename to ...
10644         (info_osdata): ... this.  Constify 'type' parameter, and remove
10645         the 'from_tty' parameter.  Accept NULL TYPE.
10646         (info_osdata_command): New function.
10647         * osdata.h (info_osdata_command): Remove declaration.
10648         (info_osdata): New declaration.
10649
10650 2017-04-05  Pedro Alves  <palves@redhat.com>
10651
10652         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10653         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10654         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10655         parameter.
10656         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10657         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10658         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10659         parameter.
10660         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10661         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10662         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10663         (mi_cmd_file_list_exec_source_files)
10664         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10665         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10666         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10667         parameter.
10668         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10669         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10670         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10671         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10672         (mi_cmd_stack_info_frame): Constify 'command' parameter.
10673         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10674         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10675         'command' parameter.
10676         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10677         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10678         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10679         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10680         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10681         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10682         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10683         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10684         (mi_cmd_var_set_update_range): Constify 'command' parameter.
10685         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10686         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10687         parameter.
10688         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10689         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10690         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10691         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10692         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10693         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10694         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10695         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10696         (mi_cmd_data_list_changed_registers)
10697         (mi_cmd_data_write_register_values)
10698         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10699         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10700         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10701         (mi_cmd_list_features, mi_cmd_list_target_features)
10702         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10703         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10704         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10705         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10706         (mi_cmd_trace_frame_collected): Constify 'command'
10707         parameter.
10708         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10709         'command' parameter.
10710
10711 2017-04-05  Pedro Alves  <palves@redhat.com>
10712
10713         * ada-lang.c (ada_completer_word_break_characters): Now a const
10714         array.
10715         (ada_get_gdb_completer_word_break_characters): Constify.
10716         * completer.c (gdb_completer_command_word_break_characters)
10717         (gdb_completer_file_name_break_characters)
10718         (gdb_completer_quote_characters): Now const arrays.
10719         (get_gdb_completer_quote_characters): Constify.
10720         (set_rl_completer_word_break_characters): New function.
10721         (set_gdb_completion_word_break_characters)
10722         (complete_line_internal): Use it.
10723         * completer.h (get_gdb_completer_quote_characters): Constify.
10724         (set_rl_completer_word_break_characters): Declare.
10725         * f-lang.c (f_word_break_characters): Constify.
10726         * language.c (default_word_break_characters): Constify.
10727         * language.h (language_defn::la_word_break_characters): Constify.
10728         (default_word_break_characters): Constify.
10729         * top.c (init_main): Use set_rl_completer_word_break_characters.
10730
10731 2017-04-05  Pedro Alves  <palves@redhat.com>
10732
10733         * aix-thread.c (aix_thread_pid_to_str)
10734         (aix_thread_extra_thread_info): Constify.
10735         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10736         * bsd-uthread.c (bsd_uthread_extra_thread_info)
10737         (bsd_uthread_pid_to_str): Constify.
10738         * corelow.c (core_pid_to_str): Constify.
10739         * darwin-nat.c (darwin_pid_to_str): Constify.
10740         * fbsd-nat.c (fbsd_pid_to_str): Constify.
10741         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10742         Constify.
10743         * gnu-nat.c (gnu_pid_to_str): Constify.
10744         * go32-nat.c (go32_pid_to_str): Constify.
10745         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10746         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10747         * inferior.c (inferior_pid_to_str): Constify.
10748         * linux-nat.c (linux_nat_pid_to_str): Constify.
10749         * linux-tdep.c (linux_core_pid_to_str): Constify.
10750         * linux-thread-db.c (thread_db_pid_to_str)
10751         (thread_db_extra_thread_info): Constify.
10752         * nto-tdep.c (nto_extra_thread_info): Constify.
10753         * nto-tdep.h (nto_extra_thread_info): Constify.
10754         * obsd-nat.c (obsd_pid_to_str): Constify.
10755         * procfs.c (procfs_pid_to_str): Constify.
10756         * ravenscar-thread.c (ravenscar_extra_thread_info)
10757         (ravenscar_pid_to_str): Constify.
10758         * remote-sim.c (gdbsim_pid_to_str): Constify.
10759         * remote.c (remote_threads_extra_info, remote_pid_to_str):
10760         Constify.
10761         * sol-thread.c (solaris_pid_to_str): Constify.
10762         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10763         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10764         * target.c (default_pid_to_str, target_pid_to_str)
10765         (normal_pid_to_str, default_pid_to_str): Constify.
10766         * target.h (target_ops::to_pid_to_str)
10767         (target_ops::to_extra_thread_info): Constify.
10768         (target_pid_to_str, normal_pid_to_str): Constify.
10769         * windows-nat.c (windows_pid_to_str): Constify.
10770         * gdbarch.sh (core_pid_to_str): Constify.
10771         * target-delegates.c: Regenerate.
10772         * gdbarch.h, gdbarch.c: Regenerate.
10773
10774 2017-04-05  Pedro Alves  <palves@redhat.com>
10775
10776         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10777         the memory of the temporary warning_pre_print override.
10778         * utils.c (warning_pre_print): Constify.
10779         * utils.h (warning_pre_print): Constify.
10780
10781 2017-04-05  Pedro Alves  <palves@redhat.com>
10782
10783         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10784         (shell_command): New function.
10785         (make_command): Use std::string.
10786         (init_cli_cmds): Register shell_command instead of shell_escape.
10787
10788 2017-04-05  Pedro Alves  <palves@redhat.com>
10789
10790         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10791         * tracepoint.c (default_collect): Don't initialize.
10792
10793 2017-04-05  Pedro Alves  <palves@redhat.com>
10794
10795         * macroexp.c (macro_buffer::shared): Now a bool.
10796         (init_buffer): Update.
10797         (init_shared_buffer): Constify 'addr' parameter.
10798         (substitute_args, expand, macro_expand, macro_expand_next): Remove
10799         casts.
10800
10801 2017-04-05  Pedro Alves  <palves@redhat.com>
10802
10803         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10804         * disasm.c (set_disassembler_options): Constify local.
10805         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10806
10807 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
10808
10809         PR gdb/21352
10810         * tracefile.c (tsave_command): Fix argument parsing for '-r'
10811         option.
10812
10813 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10814
10815         * frame.c (frame_unwind_register_unsigned): Call
10816         frame_unwind_register_value.
10817
10818 2017-04-05  Yao Qi  <yao.qi@linaro.org>
10819
10820         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10821         Use gdb_test_multiple, and don't match anchor.
10822
10823 2017-04-05  Pedro Alves  <palves@redhat.com>
10824
10825         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10826         (Write After Approval): Remove Simon Marchi.
10827
10828 2017-04-05  Pedro Alves  <palves@redhat.com>
10829
10830         * common/gdb_optional.h (optional::optional): Make constexpr and
10831         initialize m_dummy.
10832
10833 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10834
10835         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10836         (amd64fbsd_jmp_buf_reg_offset): Remove.
10837         (amd64fbsd_supply_uthread): Remove function.
10838         (amd64fbsd_collect_uthread): Remove function.
10839         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10840         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10841         (x86_64-*-freebsd*): Remove bsd-uthread.o.
10842         (fbsd-nat.c): Update comment.
10843         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10844         (i386fbsd_jmp_buf_reg_offset): Remove.
10845         (i386fbsd_supply_uthread): Remove function.
10846         (i386fbsd_collect_uthread): Remove function.
10847         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10848
10849 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10850
10851         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10852         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10853         * NEWS: Mention that support for FreeBSD/alpha was removed.
10854         * alpha-fbsd-tdep.c: Delete file.
10855         * config/alpha/fbsd.mh: Delete file.
10856         * configure.host: Delete alpha*-*-freebsd* and
10857         alpha*-*-kfreebsd*-gnu.
10858         * configure.tgt: Delete alpha*-*-freebsd* and
10859         alpha*-*-kfreebsd*-gnu.
10860
10861 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10862
10863         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10864         amd64bsd_store_inferior_registers): Use ptid from regcache.
10865
10866 2017-04-04  Pedro Alves  <palves@redhat.com>
10867
10868         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10869         data fields, make them private and add "m_" prefixes.
10870         (lnp_state_machine::lnp_state_machine): New ctor.
10871         (record_line, check_line_address, handle_set_discriminator)
10872         (handle_set_address, handle_advance_pc, handle_special_opcode)
10873         (handle_advance_line, handle_set_file, handle_negate_stmt)
10874         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10875         (end_sequence, advance_line): New methods.
10876         (m_gdbarch, m_record_lines_p): New fields.
10877         (lnp_reader_state): Delete.
10878         (dwarf_record_line): Rename to ...
10879         (lnp_state_machine::record_line): ... adjust.
10880         (init_lnp_state_machine): Delete.
10881         (lnp_state_machine::lnp_state_machine): New.
10882         (check_line_address): Rename to ...
10883         (lnp_state_machine::check_line_address): This.
10884         (dwarf_decode_lines_1): Remove reference to "reader_state".
10885         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10886         State machine internal state manipulation moved to
10887         lnp_state_machine methods.
10888
10889 2017-04-04  Pedro Alves  <palves@redhat.com>
10890
10891         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10892         unittests/offset-type-selftests.c.
10893         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10894         * common/offset-type.h: New file.
10895         * common/preprocessor.h: New file.
10896         * common/traits.h: New file.
10897         * common/valid-expr.h: New file.
10898         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10899         sect_offset and cu_offset strong typedefs throughout.
10900         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10901         typedefs throughout.
10902         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10903         sect_offset and cu_offset strong typedefs throughout.
10904         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10905         typedefs throughout.
10906         * gdbtypes.h: Include "common/offset-type.h".
10907         (cu_offset): Now an offset type (strong typedef) instead of a
10908         struct.
10909         (sect_offset): Likewise.
10910         (union call_site_parameter_u): Rename "param_offset" field to
10911         "param_cu_off".
10912         * unittests/offset-type-selftests.c: New file.
10913
10914 2017-04-04  Pedro Alves  <palves@redhat.com>
10915
10916         * common/underlying.h: New file.
10917         * dwarf2read.c: Include "common/gdb_optional.h" and
10918         "common/underlying.h".
10919         (dir_index, file_name_index): New types.
10920         (file_entry): Use them.
10921         (file_entry::include): Use to_underlying.
10922         (line_header::add_file_name): Use dir_index.
10923         (read_formatted_entries): Use gdb::optional.  Read form before
10924         writting to file_entry.
10925         (dwarf_decode_line_header): Use dir_index.
10926         (lnp_state_machine::current_file): Use to_underlying.
10927         (lnp_state_machine::file): Change type to file_name_index.
10928         (dwarf_record_line): Use to_underlying.
10929         (init_lnp_state_machine): Use file_name_index.
10930         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10931
10932 2017-04-04  Pedro Alves  <palves@redhat.com>
10933
10934         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10935         operator bool, has_value and get methods.
10936
10937 2017-04-04  Pedro Alves  <palves@redhat.com>
10938
10939         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10940         fields.
10941         (line_header): Initialize all data fields.  Change type of
10942         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10943         Change type of include_dirs to std::vector<const char *>.  Remove
10944         num_include_dirs, include_dirs_size.  Change type of file_names to
10945         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10946         (line_header::line_header): New.
10947         (line_header::add_include_dir, line_header::add_file_name): New
10948         methods.
10949         (line_header::include_dir_at): Remove NULL check.
10950         (line_header::file_name_at): Add const overload.
10951         (line_header_up): New unique_ptr typedef.
10952         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10953         std::vector.  Remove free_line_header call.
10954         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10955         free_line_header call.
10956         (free_cu_line_header): Delete.
10957         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10958         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10959         Adjust to use std::vector.
10960         (free_line_header): Delete.
10961         (free_line_header_voidp): Use delete.
10962         (add_include_dir): Replace with ...
10963         (line_header::add_include_dir): ... this method.  Use std::vector.
10964         (add_file_name): Replace with ...
10965         (line_header::add_file_name): ... this method.  Use std::vector.
10966         (add_include_dir_stub): Delete.
10967         (read_formatted_entries): Remove memset.
10968         (dwarf_decode_line_header): Return a line_header_up instead of a
10969         raw pointer.  Remove cleanup handling.  Pass lambdas to
10970         read_formatted_entries.  Adjust to use line_header methods.
10971         (dwarf_decode_lines_1): Adjust to use line_header methods.
10972         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10973         use std::vector.
10974
10975 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10976
10977         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10978         instead of struct ptid.
10979
10980 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10981
10982         * frame.c (get_frame_register_bytes): Unwind using value.
10983         (put_frame_register_bytes): Likewise.
10984
10985 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10986
10987         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10988         aggregate-like.
10989
10990 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10991
10992         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10993
10994 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10995
10996         * gdbthread.h (struct thread_info): Declare constructor and
10997         destructor.  Add some in-class member initializers.
10998         * thread.c (free_thread): Remove.
10999         (init_thread_list): Call delete instead of free_thread.
11000         (new_thread): Call thread_info constructor.
11001         (thread_info::thread_info): New function.
11002         (thread_info::~thread_info): New function.
11003         (delete_thread_1): Call delete instead of free_thread.
11004         (make_cleanup_restore_current_thread): Move tp and frame to
11005         inner block.
11006
11007 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11008
11009         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11010         (arc_skip_prologue): Likewise.
11011         (arc_make_frame_cache): Likewise.
11012         (arc_pv_get_operand): New function.
11013         (arc_is_in_prologue): Likewise.
11014         (arc_analyze_prologue): Likewise.
11015         (arc_print_frame_cache): Likewise.
11016         (MAX_PROLOGUE_LENGTH): New constant.
11017
11018 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11019
11020         * configure.tgt: Add arc-insn.o.
11021         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11022         (dump_arc_instruction_command): New function.
11023         (arc_fprintf_disasm): Likewise.
11024         (arc_disassemble_info): Likewise.
11025         (arc_insn_get_operand_value): Likewise.
11026         (arc_insn_get_operand_value_signed): Likewise.
11027         (arc_insn_get_memory_base_reg): Likewise.
11028         (arc_insn_get_memory_offset): Likewise.
11029         (arc_insn_get_branch_target): Likewise.
11030         (arc_insn_dump): Likewise.
11031         (arc_insn_get_linear_next_pc): Likewise.
11032         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11033         (arc_disassemble_info): Likewise.
11034         (arc_insn_get_branch_target): Likewise.
11035         (arc_insn_get_linear_next_pc): Likewise.
11036         * NEWS: Mention new "maint print arc arc-instruction".
11037
11038 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11039
11040         * arc-tdep (maintenance_print_arc_list): New variable.
11041         (maintenance_print_arc_command): New function.
11042
11043 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11044
11045         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11046         Add "limm" and "reserved".
11047         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11048         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11049         * arc-tdep.h (arc_regnum): Likewise.
11050
11051 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11052
11053         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11054         for THREADPTR register.
11055         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11056         register.
11057         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11058         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11059         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11060
11061 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11062
11063         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11064         registers above gdbarch_num_regs (gdbarch) as privileged in
11065         call0 ABI.
11066
11067 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11068
11069         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11070         for a single specified register or for all registers in
11071         a0_base..a0_base + C0_NREGS range.
11072         (supply_gregset_reg): Call regcache_raw_supply for a single
11073         specified register or for all registers in a0_base..a0_base +
11074         C0_NREGS range.
11075
11076 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11077
11078         * arch/xtensa.h (C0_NREGS): Add definition.
11079         * xtensa-tdep.c (C0_NREGS): Remove definition.
11080
11081 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11082
11083         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11084         Drop xtensa_default_isa initialization.
11085         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11086
11087 2017-03-27  Pedro Alves  <palves@redhat.com>
11088
11089         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11090         (file_entry::include_dir): New method.
11091         (line_header::include_dir_at, line_header::file_name_at): New
11092         methods.
11093         (setup_type_unit_groups, setup_type_unit_groups)
11094         (psymtab_include_file_name): Simplify using the new methods.
11095         (lnp_state_machine) <the_line_header>: New field.
11096         <file>: Add comment.
11097         (lnp_state_machine::current_file): New method.
11098         (dwarf_record_line): Simplify using the new methods.
11099         (init_lnp_state_machine): Initialize the "the_line_header" field.
11100         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11101         Simplify using the new methods.
11102
11103 2017-03-27  Pedro Alves  <palves@redhat.com>
11104
11105         * cp-name-parser.y (make_empty): Delete.
11106         (demangler_special, nested_name, ptr_operator, array_indicator)
11107         (direct_declarator, declarator_1): Use fill_comp instead of
11108         make_empty.
11109
11110 2017-03-27  Pedro Alves  <palves@redhat.com>
11111
11112         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11113         to ATTRIBUTE_PRINTF.
11114         * solib-target.c (library_list_start_list): Print "string" not
11115         "version".
11116         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11117         gdb_xml_error call.
11118
11119 2017-03-27  Pedro Alves  <palves@redhat.com>
11120
11121         * dwarf2read.c (struct file_and_directory): New.
11122         (dwarf2_get_dwz_file): Adjust to use std::string.
11123         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11124         (find_file_and_directory): Adjust to return a file_and_directory
11125         object.
11126         (read_file_scope): Adjust to use file_and_directory.  Remove
11127         make_cleanup/do_cleanups calls.
11128         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11129         make_cleanup/do_cleanups calls.
11130         * python/python.c (do_start_initialization): Adjust to ldirname
11131         returning a std::string.
11132         * utils.c (ldirname): Now returns a std::string.
11133         * utils.h (ldirname): Change return type to std::string.
11134         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11135         returning a std::string.
11136         * xml-tdesc.c (file_read_description_xml): Likewise.
11137
11138 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11139
11140         * regcache.c (regcache_debug_print_register): New function.
11141         * regcache.h (regcache_debug_print_register): New declaration.
11142         * target.c (debug_print_register): Remove.
11143         (target_fetch_registers): Call regcache_debug_print_register.
11144         (target_store_registers): Likewise.
11145
11146 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11147
11148         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11149         reference beyond the 'lh->include_dirs' array before accessing to
11150         it.
11151         (psymtab_include_file_name): Likewise.
11152         (dwarf_decode_lines_1): Likewise.
11153         (dwarf_decode_lines): Likewise.
11154         (file_file_name): Likewise.
11155
11156 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11157
11158         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11159         inferior_ptid.
11160         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11161         ps_lsetfpregs): Likewise.
11162         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11163         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11164         ps_lsetfpregs): Likewise.
11165         * target.c (target_fetch_registers, target_store_registers):
11166         Remove asserts.
11167
11168 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11169
11170         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11171
11172 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11173
11174         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11175         (_initialize_aarch64_tdep): Register it.
11176         (aarch64_record_load_store): Handle PRFM instruction.
11177         (aarch64_process_record_test): New function.
11178
11179 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11180
11181         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11182         indentation.
11183
11184 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11185
11186         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11187
11188 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11189
11190         python/python.c (do_start_initialization): Fix memory leak.
11191
11192 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11193
11194         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11195         using get_ptrace_pid.
11196         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11197         inferior_ptid.
11198         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11199         inferior_ptid instead of pid.
11200
11201 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11202
11203         * aarch64-tdep.c: Wrap locally used classes in anonymous
11204         namespace.
11205         * arm-tdep.c: Likewise.
11206         * linespec.c: Likewise.
11207         * ui-out.c: Likewise.
11208
11209 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11210
11211         PR gdb/19637
11212         * python/lib/gdb/printer/bound_registers.py: Import sys.
11213
11214 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11215
11216         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11217         windows_thread_info parameter and use it instead of
11218         current_thread.
11219         (windows_fetch_inferior_registers): Don't set current_thread,
11220         pass the thread to do_windows_fetch_inferior_registers.  Use
11221         ptid from regcache instead of inferior_ptid.
11222         (do_windows_store_inferior_registers): Add windows_thread_info
11223         parameter and use it instead of current_thread.
11224         (windows_store_inferior_registers): Don't set current_thread,
11225         pass the thread to do_windows_store_inferior_registers.  Use
11226         ptid from regcache instead of inferior_ptid.
11227
11228 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11229
11230         * ser-mingw.c (ser_windows_raw): Remove reference to
11231         struct serial::current_timeout.
11232
11233 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11234
11235         PR tdep/20928
11236         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11237         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11238         (sparc64_fsr_type): Fix %fsr decoding.
11239
11240 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11241
11242         * python/py-record-btrace.c (btpy_insn_data): Change return type
11243         for Python 2.
11244
11245 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11246
11247         * spu-linux-nat.c (spu_fetch_inferior_registers,
11248         spu_store_inferior_registers): Use ptid from regcache, set and
11249         restore inferior_ptid.
11250         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11251         Likewise.
11252
11253 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11254
11255         * i386-linux-nat.c (fetch_register, store_register,
11256         i386_linux_fetch_inferior_registers,
11257         i386_linux_store_inferior_registers): Use ptid from regcache.
11258         * ia64-linux-nat.c (ia64_linux_fetch_register,
11259         ia64_linux_store_register): Likewise.
11260         * inf-ptrace.c (inf_ptrace_fetch_register,
11261         inf_ptrace_store_register): Likewise.
11262         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11263         m32r_linux_store_inferior_registers): Likewise.
11264         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11265         m68kbsd_store_inferior_registers): Likewise.
11266         * m68k-linux-nat.c (fetch_register, store_register,
11267         m68k_linux_fetch_inferior_registers,
11268         m68k_linux_store_inferior_registers): Likewise.
11269         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11270         m88kbsd_store_inferior_registers): Likewise.
11271         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11272         mips_fbsd_store_inferior_registers): Likewise.
11273         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11274         mips64_linux_regsets_store_registers): Likewise.
11275         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11276         mipsnbsd_store_inferior_registers): Likewise.
11277         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11278         mips64obsd_store_inferior_registers): Likewise.
11279         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11280         Likewise.
11281         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11282         ppcfbsd_store_inferior_registers): Likewise.
11283         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11284         ppc_linux_store_inferior_registers): Likewise.
11285         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11286         ppcnbsd_store_inferior_registers): Likewise.
11287         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11288         ppcobsd_store_registers): Likewise.
11289         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11290         Likewise.
11291         * ravenscar-thread.c (ravenscar_fetch_registers,
11292         ravenscar_store_registers, ravenscar_prepare_to_store):
11293         Likewise.
11294         * record-btrace.c (record_btrace_fetch_registers,
11295         record_btrace_store_registers, record_btrace_prepare_to_store):
11296         Likewise.
11297         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11298         Lookup inferior using ptid from regcache, instead of
11299         current_inferior.
11300         * remote.c (remote_fetch_registers, remote_store_registers): Use
11301         ptid from regcache.
11302         * rs6000-nat.c (fetch_register, store_register): Likewise.
11303         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11304         s390_linux_store_inferior_registers): Likewise.
11305         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11306         shnbsd_store_inferior_registers): Likewise.
11307         * sol-thread.c (sol_thread_fetch_registers,
11308         sol_thread_store_registers): Likewise.
11309         * sparc-nat.c (sparc_fetch_inferior_registers,
11310         sparc_store_inferior_registers): Likewise.
11311         * tilegx-linux-nat.c (fetch_inferior_registers,
11312         store_inferior_registers): Likewise.
11313         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11314         vaxbsd_store_inferior_registers): Likewise.
11315         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11316         store_xtregs): Likewise.
11317
11318 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11319
11320         PR gdb/14441
11321         * NEWS: Mention support for rvalue references in GDB and python.
11322         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11323         supports both lvalue and rvalue references.
11324
11325 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11326
11327         PR gdb/14441
11328         * gdbtypes.c (rank_one_type): Implement overloading
11329         resolution rules regarding rvalue references.
11330
11331 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11332
11333         PR gdb/14441
11334         * aarch64-tdep.c (aarch64_type_align)
11335         (aarch64_extract_return_value, aarch64_store_return_value): Change
11336         lvalue reference type checks to general reference type checks.
11337         * amd64-tdep.c (amd64_classify): Likewise.
11338         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11339         Likewise.
11340         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11341         (arm_store_return_value): Likewise.
11342         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11343         * c-typeprint.c (c_print_type): Likewise.
11344         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11345         (cplus_number_of_children, cplus_describe_child): Likewise.
11346         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11347         * completer.c (expression_completer): Likewise.
11348         * cp-support.c (make_symbol_overload_list_adl_namespace):
11349         Likewise.
11350         * darwin-nat-info.c (info_mach_region_command): Likewise.
11351         * dwarf2loc.c (entry_data_value_coerce_ref)
11352         (value_of_dwarf_reg_entry): Likewise.
11353         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11354         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11355         Likewise.
11356         * findvar.c (extract_typed_address, store_typed_address):
11357         Likewise.
11358         * gdbtypes.c (rank_one_type): Likewise.
11359         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11360         * infcall.c (value_arg_coerce): Likewise.
11361         * language.c (pointer_type): Likewise.
11362         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11363         Likewise.
11364         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11365         * mn10300-tdep.c (mn10300_type_align): Likewise.
11366         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11367         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11368         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11369         Likewise.
11370         * printcmd.c (print_formatted, x_command): Likewise.
11371         * python/py-type.c (typy_get_composite, typy_template_argument):
11372         Likewise.
11373         * python/py-value.c (valpy_referenced_value)
11374         (valpy_get_dynamic_type, value_has_field): Likewise.
11375         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11376         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11377         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11378         * spu-tdep.c (spu_scalar_value_p): Likewise.
11379         * symtab.c (lookup_symbol_aux): Likewise.
11380         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11381         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11382         Likewise.
11383         * valops.c (value_cast_pointers, value_cast)
11384         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11385         (value_struct_elt, value_struct_elt_bitpos)
11386         (value_find_oload_method_list, find_overload_match)
11387         (value_rtti_indirect_type): Likewise.
11388         * valprint.c (val_print_scalar_type_p, generic_val_print):
11389         Likewise.
11390         * value.c (value_actual_type, value_as_address, unpack_long)
11391         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11392         (coerce_ref): Likewise.
11393         * varobj.c (varobj_get_value_type): Likewise.
11394
11395 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11396
11397         PR gdb/14441
11398         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11399         table of constants.
11400         * python/lib/gdb/command/explore.py: Support exploring values
11401         of rvalue reference types.
11402         * python/lib/gdb/types.py: Implement get_basic_type() for
11403         rvalue reference types.
11404         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11405         constant.
11406         * python/py-value.c (valpy_getitem): Add an rvalue reference
11407         check.
11408         (valpy_reference_value): Add new parameter "refcode".
11409         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11410         New wrappers for valpy_reference_value().
11411         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11412         (gdbpy_invoke_xmethod): Likewise.
11413
11414 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11415
11416         PR gdb/14441
11417         * dwarf2read.c (process_die, read_type_die_1): Handle the
11418         DW_TAG_rvalue_reference_type DIE.
11419         (read_tag_reference_type): Add new parameter "refcode".
11420
11421 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11422
11423         PR gdb/14441
11424         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11425         (c_type_print_modifier, c_type_print_varspec_suffix)
11426         (c_type_print_base): Support printing rvalue reference types.
11427         * c-valprint.c (c_val_print, c_value_print): Support printing
11428         rvalue reference values.
11429
11430 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11431
11432         PR gdb/14441
11433         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11434         typename.
11435         * cp-support.c (replace_typedefs): Handle
11436         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11437         * python/py-type.c (typy_lookup_type): Likewise.
11438
11439 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11440
11441         PR gdb/14441
11442         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11443         * parse.c (insert_type): Change assert statement.
11444         (follow_types): Handle rvalue reference types.
11445         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11446         constant.
11447
11448 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11449
11450         PR gdb/14441
11451         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11452         value_ref() interface.
11453         * c-valprint.c (c_value_print): Likewise.
11454         * infcall.c (value_arg_coerce): Likewise.
11455         * python/py-value.c (valpy_reference_value): Likewise.
11456         * valops.c (value_cast, value_reinterpret_cast)
11457         (value_dynamic_cast, typecmp): Likewise.
11458         (value_ref): Parameterize by kind of return value reference type.
11459         * value.h (value_ref): Add new parameter "refcode".
11460
11461 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11462
11463         PR gdb/14441
11464         * dwarf2read.c (read_tag_reference_type): Use
11465         lookup_lvalue_reference_type() instead of lookup_reference_type().
11466         * eval.c (evaluate_subexp_standard): Likewise.
11467         * f-exp.y: Likewise.
11468         * gdbtypes.c (make_reference_type, lookup_reference_type):
11469         Generalize with rvalue reference types.
11470         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11471         convenience wrappers for lookup_reference_type().
11472         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11473         reference kind parameter.
11474         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11475         wrappers for lookup_reference_type().
11476         * guile/scm-type.c (gdbscm_type_reference): Use
11477         lookup_lvalue_reference_type() instead of lookup_reference_type().
11478         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11479         * parse.c (follow_types): Likewise.
11480         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11481         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11482         Likewise.
11483         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11484         (gdbpy_invoke_xmethod): Likewise.
11485         * stabsread.c: Provide extra argument to make_reference_type()
11486         call.
11487         * valops.c (value_ref, value_rtti_indirect_type): Use
11488         lookup_lvalue_reference_type() instead of lookup_reference_type().
11489
11490 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11491
11492         PR gdb/14441
11493         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11494         (TYPE_IS_REFERENCE): New macro.
11495         (struct type): Add rvalue_reference_type field.
11496         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11497
11498 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11499
11500         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11501         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11502         New function definition.
11503         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11504         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11505         New function declaration.
11506         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11507         * mi/mi-interp.h: New file.
11508         * solib.c (info_sharedlibrary_command): Replace for loop with
11509         ALL_SO_LIBS macro
11510         * solib.h (update_solib_list): New function declaration.
11511         (so_list_head): Move macro.
11512         * solist.h (ALL_SO_LIBS): New macro.
11513
11514 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
11515
11516         * infcmd.c (post_create_inferior): Remove unused argument in
11517         call to solib_add.
11518         * remote.c (remote_start_remote): Likewise.
11519         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11520         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11521         (enable_break): Likewise.
11522         * solib.c (update_solib_list): Remove unused target argument
11523         and its documentation.
11524         (solib_add): Remove unused target argument.  Remove unused
11525         argument in call to update_solib_list.
11526         (info_sharedlibrary_command): Remove unused argument in call
11527         to update_solib_list.
11528         (sharedlibrary_command): Remove unused argument in call to
11529         solib_add.
11530         (handle_solib_event): Likewise.
11531         (reload_shared_libraries): Likewise.
11532         * solib.h (solib_add): Remove unused target argument.
11533
11534 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11535
11536         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11537         (s390_displaced_step_fixup): Cover relative branches with the
11538         default fixup handling.  This fixes lack of support for some
11539         relative branch instructions.
11540
11541 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11542
11543         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11544         ptid from regcache.
11545
11546 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11547
11548         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11549         i386_darwin_store_inferior_registers): Use ptid from regcache.
11550
11551 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11552
11553         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11554         i386bsd_store_inferior_registers): Use ptid from regcache.
11555
11556 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11557
11558         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11559         hppaobsd_store_registers): Use ptid from regcache.
11560
11561 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11562
11563         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11564         hppanbsd_store_registers): Use ptid from regcache.
11565
11566 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11567
11568         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11569         from regcache.  Use get_ptrace_pid.
11570
11571 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11572
11573         * corelow.c (get_core_register_section): Use ptid from regcache,
11574         update doc.
11575
11576 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11577
11578         * bsd-uthread.c (bsd_uthread_fetch_registers,
11579         bsd_uthread_store_registers): Use ptid from regcache, set and
11580         restore inferior_ptid.
11581
11582 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11583
11584         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11585         fetch_fp_regs, store_register, store_regs, store_fp_register,
11586         store_fp_regs): Use ptid from regcache.
11587
11588 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
11589
11590         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11591         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11592         store_vfp_regs): Use ptid from regcache.
11593
11594 2017-03-17  Pedro Alves  <palves@redhat.com>
11595
11596         PR remote/21188
11597         * ser-base.c (ser_base_wait_for): Add comment.
11598         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11599         version.
11600         * ser-unix.c (hardwire_raw): Remove reference to
11601         scb->current_timeout.
11602         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11603         (hardwire_ops): Install ser_base_readchar instead of
11604         hardwire_readchar.
11605         * serial.h (struct serial) <current_timeout, timeout_remaining>:
11606         Remove fields.
11607
11608 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
11609
11610         PR gdb/19637
11611         * python/lib/gdb/printer/bound_registers.py: Add support for
11612         Python 3.
11613
11614 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11615
11616         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11617         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11618         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11619         byte_offset to subobj_byte_offset.  Fix the handling of
11620         DWARF_VALUE_STACK on big-endian targets when coming via an
11621         implicit pointer.
11622         (dwarf2_evaluate_loc_desc): Adjust call to
11623         dwarf2_evaluate_loc_desc_full.
11624         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11625         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11626
11627 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11628
11629         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11630         and REVSH instructions.
11631
11632 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11633
11634         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11635         (arm_record_test): Declare.
11636         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11637         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11638         align with the manual.
11639         (thumb_record_misc): Adjust the code order to align with the
11640         manual.
11641         (thumb2_record_decode_insn_handler): Fix instruction matching.
11642         (instruction_reader_thumb): New class.
11643         (arm_record_test): New function.
11644
11645 2017-03-16  Yao Qi  <yao.qi@linaro.org>
11646
11647         * arm-tdep.c (abstract_memory_reader): New class.
11648         (instruction_reader): New class.
11649         (extract_arm_insn): Add argument 'reader'.  Callers updated.
11650         (decode_insn): Likewise.
11651
11652 2017-03-16  Doug Evans  <dje@google.com>
11653
11654         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11655         member.  Change type of TYPE member to SCM.  All uses updated.
11656         (lsscm_make_lazy_string_smob): Add assert.
11657         (lsscm_make_lazy_string): Flag bad length values.
11658         (lsscm_elt_type): New function.
11659         (gdbscm_lazy_string_to_value): Rewrite to use
11660         lsscm_safe_lazy_string_to_value.
11661         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11662         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11663         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
11664         in incoming type.
11665         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11666         * guile/scm-type.c (tyscm_scm_to_type): New function.
11667
11668 2017-03-15  Doug Evans  <dje@google.com>
11669
11670         PR python/17728, python/18439, python/18779
11671         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11672         member.  Change type of TYPE member to PyObject *.  All uses updated.
11673         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11674         (gdbpy_create_lazy_string_object): Flag bad length values.
11675         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11676         Handle typedefs in incoming type.
11677         (stpy_lazy_string_elt_type): New function.
11678         (gdbpy_extract_lazy_string): Call it.
11679         * python/py-value.c (valpy_lazy_string): Flag bad length values.
11680         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
11681         typedefs in incoming type.
11682
11683 2017-03-16  Doug Evans  <dje@google.com>
11684
11685         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11686         * guile/scm-type.c (tyscm_scm_to_type): New function.
11687
11688 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
11689
11690         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11691         "ULONGEST" for "skip".
11692
11693 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11694
11695         PR gdb/21220
11696         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11697         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11698         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
11699         over ptrace peek/poke until end of buffer or error.
11700
11701 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
11702
11703         * parse.c (length_of_subexp): Make static.
11704         * parser-defs.h (length_of_subexp): Remove.
11705
11706 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11707
11708         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11709         as well.
11710
11711 2017-03-14  Pedro Alves  <palves@redhat.com>
11712
11713         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11714         (main): Use std::unique_ptr.  Remove calls to
11715         cp_demangled_name_parse_free.
11716
11717 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11718
11719         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11720         alphabsd_store_inferior_registers): Use regcache->ptid instead
11721         of inferior_ptid.
11722
11723 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11724
11725         * aix-thread.c (aix_thread_fetch_registers,
11726         aix_thread_store_registers): Use regcache->ptid instead of
11727         inferior_ptid.
11728
11729 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11730
11731         * aarch64-linux-nat.c (fetch_gregs_from_thread,
11732         store_gregs_to_thread, fetch_fpregs_from_thread,
11733         store_fpregs_to_thread): Use regcache->ptid instead of
11734         inferior_ptid.
11735
11736 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11737
11738         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11739         amd64_linux_fetch_inferior_registers): Use regcache->ptid
11740         instead of inferior_ptid.
11741
11742 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11743
11744         * target.c (target_fetch_registers, target_store_registers): Add
11745         assert.
11746
11747 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
11748
11749         * regcache.h (regcache_get_ptid): New function.
11750         * regcache.c (regcache_get_ptid): New function.
11751
11752 2017-03-13  Mark Wielaard  <mark@klomp.org>
11753
11754         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11755
11756 2017-03-10  Keith Seitz  <keiths@redhat.com>
11757
11758         PR c++/8218
11759         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11760
11761 2017-03-08  Pedro Alves  <palves@redhat.com>
11762
11763         PR gdb/18360
11764         * infrun.c (start_step_over, do_target_resume, resume)
11765         (restart_threads): Assert we're not resuming a thread that is
11766         meant to be stopped.
11767         (infrun_thread_stop_requested_callback): Delete.
11768         (infrun_thread_stop_requested): If the thread is internally
11769         stopped, queue a pending stop event and clear the thread's
11770         inline-frame state.
11771         (handle_stop_requested): New function.
11772         (handle_syscall_event, handle_inferior_event_1): Use
11773         handle_stop_requested.
11774         (handle_stop_requested): New function.
11775         (handle_signal_stop): Set the thread's stop_signal here instead of
11776         at caller.
11777         (finish_step_over): Clear step over info unconditionally.
11778         (handle_signal_stop): If the user had interrupted the event
11779         thread, consider the stop a random signal.
11780         (handle_signal_stop) <signal arrived while stepping over
11781         breakpoint>: Don't restart threads here.
11782         (stop_waiting): Don't clear step-over info here.
11783
11784 2017-03-08  Pedro Alves  <palves@redhat.com>
11785
11786         PR 21206
11787         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11788         goes to argument 2, not 1.
11789
11790 2017-03-08  Pedro Alves  <palves@redhat.com>
11791
11792         PR cli/21218
11793         * top.c (gdb_readline_wrapper): Avoid passing NULL to
11794         display_gdb_prompt.
11795         (command_line_input): Add comment.
11796
11797 2017-03-08  Pedro Alves  <palves@redhat.com>
11798
11799         PR tui/21216
11800         * tui/tui-file.c (tui_file::write): New.
11801         * tui/tui-file.h (tui_file): Override "write".
11802         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11803         factored out from ...
11804         (tui_puts): ... here.
11805         (tui_putc): Use them.
11806         (tui_write): New function.
11807         * tui/tui-io.h (tui_write): Declare.
11808
11809 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11810
11811         * Makefile.in (SFILES): Replace "environ.c" with
11812         "common/environ.c".
11813         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11814         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
11815         to...
11816         * common/environ.c: ... here.
11817         * environ.h: Moved to...
11818         * common/environ.h: ... here.
11819
11820 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11821
11822         * gdbarch.sh (pstring_ptr): New static function.
11823         (gdbarch_disassembler_options): Use it.
11824         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11825         not valid_disassembler_option->name.
11826         * gdbarch.c: Regenerate.
11827
11828 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
11829
11830         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11831
11832 2017-03-07  Pedro Alves  <palves@redhat.com>
11833
11834         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11835
11836 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11837
11838         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11839         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11840         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11841         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11842
11843 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
11844
11845         * xtensa-linux-nat.c (fetch_gregs): Remove const.
11846
11847 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11848
11849         * remote.c (remote_add_target_side_commands): Use range-based
11850         for loop.
11851
11852 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11853
11854         PR gdb/21165
11855         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11856         value is lazy.
11857         * valprint.c (common_val_print): Likewise.
11858
11859 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11860
11861         * NEWS: Mention new set/show disassembler-options commands.
11862         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11863         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11864         (prospective_options): New static variable.
11865         (gdb_disassembler::gdb_disassembler): Initialize
11866         m_di.disassembler_options.
11867         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11868         (get_disassembler_options): New function.
11869         (set_disassembler_options): Likewise.
11870         (set_disassembler_options_sfunc): Likewise.
11871         (show_disassembler_options_sfunc): Likewise.
11872         (disassembler_options_completer): Likewise.
11873         (_initialize_disasm): Likewise.
11874         * disasm.h (get_disassembler_options): New prototype.
11875         (set_disassembler_options): Likewise.
11876         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11877         (gdbarch_verify_disassembler_options): Likewise.
11878         * gdbarch.c: Regenerate.
11879         * gdbarch.h: Likewise.
11880         * arm-tdep.c (num_disassembly_options): Delete.
11881         (set_disassembly_style): Likewise.
11882         (arm_disassembler_options): New static variable.
11883         (set_disassembly_style_sfunc): Convert short style name into long
11884         option name.  Call set_disassembler_options.
11885         (show_disassembly_style_sfunc): New function.
11886         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11887         set_gdbarch_verify_disassembler_options.
11888         (_initialize_arm_tdep): Delete regnames variable and update callers.
11889         (arm_disassembler_options): Initialize.
11890         (disasm_options): New variable.
11891         (num_disassembly_options): Rename from this...
11892         (num_disassembly_styles): ...to this.  Compute by scanning through
11893         disasm_options.
11894         (valid_disassembly_styles): Initialize using disasm_options.
11895         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11896         set_arm_regname_option.
11897         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11898         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11899         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11900         set_gdbarch_verify_disassembler_options.
11901         * s390-tdep.c (s390_disassembler_options): New static variable.
11902         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11903         set_gdbarch_verify_disassembler_options.
11904
11905 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11906
11907         * remote.c (remote_add_target_side_condition): Remove "struct"
11908         keyword from range-based for loop.
11909
11910 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11911
11912         * remote.c (remote_add_target_side_condition): Use range-based
11913         for loop.  Update comment.
11914
11915 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11916
11917         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11918
11919 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11920
11921         * regcache.c (regcache_raw_update): New function.
11922         (regcache_raw_read): Move code to regcache_raw_update.
11923         * regcache.h (regcache_raw_update): New declaration.
11924         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11925
11926 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11927
11928         * dwarf2read.c (create_debug_type_hash_table): Initialize
11929         header.signature and header.type_offset_in_tu.
11930
11931 2017-02-24  Pedro Alves  <palves@redhat.com>
11932
11933         * symtab.c (make_file_symbol_completion_list_1): Use
11934         add_symtab_completions.
11935
11936 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11937
11938         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11939
11940 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11941
11942         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11943         I386_MAX_REGISTER_SIZE.
11944         (i386_pseudo_register_write): Likewise.
11945         (i386_process_record): Likewise.
11946         * i387-tdep.c (i387_supply_xsave): Likewise.
11947         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11948         (store_register): Likewise.
11949
11950 2017-02-23  Pedro Alves  <palves@redhat.com>
11951
11952         * ada-lang.c: Include "common/function-view.h".
11953         (ada_iterate_over_symbols): Adjust to use function_view as
11954         callback type.
11955         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11956         (ada_make_symbol_completion_list): Use a lambda.
11957         (ada_exc_search_name_matches): Delete.
11958         (name_matches_regex): New.
11959         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11960         * compile/compile-c-support.c: Include "common/function-view.h".
11961         (print_one_macro): Change prototype to accept a ui_file pointer.
11962         (write_macro_definitions): Use a lambda.
11963         * dwarf2read.c: Include "common/function-view.h".
11964         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11965         (dw2_expand_symtabs_matching): Adjust to use function_view as
11966         callback type.
11967         * language.h: Include "common/function-view.h".
11968         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11969         function_view as callback type.
11970         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11971         * linespec.c: Include "common/function-view.h".
11972         (collect_info::add_symbol): New method.
11973         (struct symbol_and_data_callback, iterate_inline_only, struct
11974         symbol_matcher_data, iterate_name_matcher): Delete.
11975         (iterate_over_all_matching_symtabs): Adjust to use function_view
11976         as callback type and lambdas.
11977         (iterate_over_file_blocks): Adjust to use function_view as
11978         callback type.
11979         (decode_compound_collector): Now a class with private fields.
11980         (decode_compound_collector::release_symbols): New method.
11981         (collect_one_symbol): Rename to...
11982         (decode_compound_collector::operator()): ... this and adjust.
11983         (lookup_prefix_sym): decode_compound_collector construction bits
11984         move to decode_compound_collector ctor.  Pass the
11985         decode_compound_collector object directly as callback.  Remove
11986         cleanups and use decode_compound_collector::release_symbols
11987         instead.
11988         (symtab_collector): Now a class with private fields.
11989         (symtab_collector::release_symtabs): New method.
11990         (add_symtabs_to_list): Rename to...
11991         (symtab_collector::operator()): ... this and adjust.
11992         (collect_symtabs_from_filename): symtab_collector construction
11993         bits move to symtab_collector ctor.  Pass the symtab_collector
11994         object directly as callback.  Remove cleanups and use
11995         symtab_collector::release_symtabs instead.
11996         (collect_symbols): Delete.
11997         (add_matching_symbols_to_info): Use lambdas.
11998         * macrocmd.c (print_macro_callback): Delete.
11999         (info_macro_command): Use a lambda.
12000         (info_macros_command): Pass print_macro_definition as callable
12001         directly.
12002         (print_one_macro): Remove 'ignore' parameter.
12003         (macro_list_command): Adjust.
12004         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12005         (macro_for_each_data::user_data): Delete field.
12006         (foreach_macro): Adjust to call the function_view.
12007         (macro_for_each): Adjust to use function_view as callback type.
12008         (foreach_macro_in_scope): Adjust to call the function_view.
12009         (macro_for_each_in_scope): Adjust to use function_view as callback
12010         type.
12011         * macrotab.h: Include "common/function-view.h".
12012         (macro_callback_fn): Declare a prototype instead of a pointer.
12013         Remove "user_data" parameter.
12014         (macro_for_each, macro_for_each_in_scope): Adjust to use
12015         function_view as callback type.
12016         * psymtab.c (partial_map_expand_apply)
12017         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12018         Adjust to use function_view as callback type and to return bool.
12019         (psym_expand_symtabs_matching): Adjust to use function_view as
12020         callback types.
12021         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12022         to use function_view as callback type and to return bool.
12023         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12024         callback types.
12025         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12026         as callback types.
12027         * symfile.h: Include "common/function-view.h".
12028         (expand_symtabs_file_matcher_ftype)
12029         (expand_symtabs_symbol_matcher_ftype)
12030         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12031         return bool.
12032         (quick_symbol_functions::map_symtabs_matching_filename)
12033         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12034         function_view as callback type and return bool.
12035         (expand_symtabs_matching): Adjust to use function_view as callback
12036         type.
12037         (maintenance_expand_name_matcher)
12038         (maintenance_expand_file_matcher): Delete.
12039         (maintenance_expand_symtabs): Use lambdas.
12040         * symtab.c (iterate_over_some_symtabs): Adjust to use
12041         function_view as callback types and return bool.
12042         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12043         of a cleanup.
12044         (lookup_symtab_callback): Delete.
12045         (lookup_symtab): Use a lambda.
12046         (iterate_over_symbols): Adjust to use function_view as callback
12047         type.
12048         (struct search_symbols_data, search_symbols_file_matches)
12049         (search_symbols_name_matches): Delete.
12050         (search_symbols): Use a pair of lambdas.
12051         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12052         (symtab_expansion_callback): Delete.
12053         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12054         * symtab.h: Include "common/function-view.h".
12055         (iterate_over_some_symtabs): Adjust to use function_view as
12056         callback type and return bool.
12057         (iterate_over_symtabs): Adjust to use function_view as callback
12058         type.
12059         (symbol_found_callback_ftype): Remove 'data' parameter and return
12060         bool.
12061         (iterate_over_symbols): Adjust to use function_view as callback
12062         type.
12063
12064 2017-02-23  Pedro Alves  <palves@redhat.com>
12065
12066         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12067         (%.o) <unittests/%.c>: New pattern.
12068         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12069         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12070         * common/function-view.h: New file.
12071         * unittests/function-view-selftests.c: New file.
12072         * configure: Regenerate.
12073
12074 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12075
12076         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12077         inferior_ptid.
12078         * go32-nat.c (go32_thread_alive): Likewise.
12079
12080 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12081
12082         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12083         delete.
12084
12085 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12086
12087         * varobj.c (varobj_clear_saved_item): Use delete instead of
12088         xfree.
12089         (update_dynamic_varobj_children): Likewise.
12090
12091 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12092
12093         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12094
12095 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12096
12097         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12098         m_enum_value to 0 in default constructor.
12099
12100 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12101
12102         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12103         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12104         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12105         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12106         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12107         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12108         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12109         IS_STORE_CONDITIONAL_INSN.
12110
12111 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12112
12113         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12114
12115 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12116
12117         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12118
12119 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12120
12121         * dwarf2read.c (skip_one_die, read_attribute_value)
12122         (dwarf2_const_value_attr, dump_die_shallow)
12123         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12124         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12125
12126 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12127
12128         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12129         (dwarf_parse_macro_header): Accept DWARF version 5.
12130         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12131
12132 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12133
12134         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12135         DW_AT_GNU_*.
12136         * common/common-exceptions.h (enum errors): Likewise.
12137         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12138         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12139         (dwarf_expr_context::execute_stack_op): Likewise.
12140         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12141         Likewise.
12142         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12143         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12144         (show_entry_values_debug, call_site_to_target_addr)
12145         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12146         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12147         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12148         (value_of_dwarf_block_entry, indirect_pieced_value)
12149         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12150         (disassemble_dwarf_expression): Likewise.
12151         * dwarf2read.c (process_die, inherit_abstract_dies)
12152         (read_call_site_scope): Likewise.
12153         * gdbtypes.h (struct func_type, struct call_site_parameter)
12154         (struct call_site): Likewise.
12155         * stack.c (read_frame_arg): Likewise.
12156         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12157
12158 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12159
12160         * defs.h (read_unsigned_leb128): New declaration.
12161         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12162         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12163         (dwarf2_find_location_expression): Call also
12164         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12165         * dwarf2loc.h (dwarf2_version): New declaration.
12166         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12167         rnglists.
12168         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12169         .debug_rnglists.
12170         (struct dwop_section_names): Add loclists_dwo.
12171         (dwop_section_names): Add .debug_loclists.dwo.
12172         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12173         (struct dwarf2_per_cu_data): Add dwarf_version.
12174         (struct dwo_sections): Add loclists.
12175         (struct attr_abbrev): Add implicit_const.
12176         (read_indirect_line_string): New declaration.
12177         (read_unsigned_leb128): Delete declaration.
12178         (rcuh_kind): New definition.
12179         (read_and_check_comp_unit_head): Change parameter
12180         is_debug_types_section to section_kind.
12181         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12182         (read_comp_unit_head): Change parameter abfd to section, add parameter
12183         section_kind.  Handle DWARF-5.
12184         (error_check_comp_unit_head): Accept also DWARF version 5.
12185         (read_and_check_comp_unit_head): Change parameter
12186         is_debug_types_section to section_kind.
12187         (read_and_check_type_unit_head): Delete function.
12188         (read_abbrev_offset): Handle DWARF-5.
12189         (create_debug_type_hash_table): Add parameter section_kind.  Process
12190         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12191         comp_unit_head.
12192         (create_debug_types_hash_table): Update create_debug_type_hash_table
12193         caller.
12194         (create_all_type_units): Call create_debug_type_hash_table.
12195         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12196         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12197         caller.
12198         (skip_one_die): Handle DW_FORM_implicit_const.
12199         (dwarf2_rnglists_process): New function.
12200         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12201         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12202         (read_attribute_value): Handle DW_FORM_implicit_const,
12203         DW_FORM_line_strp.
12204         (read_attribute): Handle DW_FORM_implicit_const.
12205         (read_indirect_string_at_offset_from): New function from
12206         read_indirect_string_at_offset.
12207         (read_indirect_string_at_offset): Call
12208         read_indirect_string_at_offset_from.
12209         (read_indirect_line_string_at_offset): New function.
12210         (read_indirect_string): New function comment.
12211         (read_indirect_line_string): New function.
12212         (read_unsigned_leb128): Make it global.
12213         (dwarf2_string_attr): Handle DWARF-5.
12214         (add_include_dir_stub, read_formatted_entries): New functions.
12215         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12216         Handle DWARF-5.
12217         (per_cu_header_read_in): Update read_comp_unit_head caller.
12218         (dwarf2_version): New function.
12219         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12220         rnglists.
12221         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12222         fields.
12223
12224 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12225
12226         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12227
12228 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12229
12230         * dwarf2read.c (dwarf2_ranges_process): New function from
12231         dwarf2_ranges_read.
12232         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12233         dwarf2_ranges_process.
12234
12235 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12236
12237         * dwarf2read.c (create_debug_type_hash_table): New function from
12238         create_debug_types_hash_table.
12239         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12240         (create_all_type_units, open_and_init_dwo_file): Update
12241         create_debug_types_hash_table callers.
12242
12243 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12244
12245         PR gdb/16188
12246         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12247         refer to 'ap', not 'args'.
12248
12249 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12250             Pedro Alves  <palves@redhat.com>
12251
12252         PR gdb/16188
12253         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12254         calls succeeded.
12255         * fork-child.c (trace_start_error): New function.
12256         (trace_start_error_with_name): Likewise.
12257         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12258         * inf-ptrace.c (inf_ptrace_me): Likewise.
12259         * inferior.h (trace_start_error): New prototype.
12260         (trace_start_error_with_name): Likewise.
12261
12262 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12263
12264         PR gdb/21164
12265         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12266         NULL before using it.
12267         * symmisc.c (maintenance_print_symbols): Likewise.
12268         (maintenance_print_msymbols): Likewise.
12269
12270 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12271
12272         * NEWS: Add record Python bindings entry.
12273
12274 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12275
12276         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12277         py-record-full.o.
12278         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12279         * python/py-record-btrace.c, python/py-record-btrace.h,
12280         python/py-record-full.c, python/py-record-full.h: New file.
12281         * python/py-record.c: Add include for py-record-btrace.h and
12282         py-record-full.h.
12283         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12284         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12285         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12286         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12287         New definition.
12288         (gdbpy_initialize_btrace): New export.
12289         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12290
12291 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12292
12293         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12294         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12295         * python/py-record.c: New file.
12296         * python/python-internal.h (gdbpy_start_recording,
12297         gdbpy_current_recording, gdpy_stop_recording,
12298         gdbpy_initialize_record): New export.
12299         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12300         (python_GdbMethods): Add gdbpy_start_recording,
12301         gdbpy_current_recording and gdbpy_stop_recording.
12302
12303 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12304
12305         * record-btrace.c (record_btrace_record_method): New function.
12306         (init_record_btrace_ops): Initialize to_record_method.
12307         * record-full.c (record_full_record_method): New function.
12308         (init_record_full_ops, init_record_full_core_ops): Add
12309         record_full_record_method.
12310         * record.h (enum record_method): New enum.
12311         * target-debug.h (target_debug_print_enum_record_method: New define.
12312         * target-delegates.c: Regenerate.
12313         * target.c (target_record_method): New function.
12314         * target.h: Include record.h.
12315         (struct target_ops) <to_record_method>: New field.
12316         (target_record_method): New export.
12317
12318 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12319
12320         * record.h (record_start, record_stop): New export.
12321         * record.c (record_start, record_stop): New function.
12322
12323 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12324
12325         * btrace.c (btrace_fetch): Copy function call segments pointer
12326         into a vector.
12327         (btrace_clear): Clear the vector.
12328         (btrace_find_insn_by_number): Use binary search to find the correct
12329         function call segment.
12330         * btrace.h (brace_fun_p): New typedef.
12331         (struct btrace_thread_info) <functions>: New field.
12332
12333 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12334
12335         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12336         * btrace.c (btrace_decode_error): ... here.  New function.
12337         * btrace.h (btrace_decode_error): New export.
12338
12339 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12340
12341         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12342         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12343         btrace_find_insn_by_number): Remove special case for gaps.
12344         * btrace.h (btrace_insn_get_error): New export.
12345         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12346         * record-btrace.c (btrace_insn_history): Print number for gaps.
12347         (record_btrace_info, record_btrace_goto): Handle gaps.
12348
12349 2017-02-14  Tom Tromey  <tom@tromey.com>
12350
12351         PR python/13598:
12352         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12353         event.
12354         * python/py-evts.c (gdbpy_initialize_py_events): Add
12355         before_prompt registry.
12356         * python/py-events.h (events_object) <before_prompt>: New field.
12357
12358 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12359
12360         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12361
12362 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12363
12364         * symfile (_initialize_symfile): Add usage text to the load command's
12365         help text.
12366
12367 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12368
12369         * utils.c (defaulted_query): Don't query on secondary UIs.
12370
12371 2017-02-10  Tom Tromey  <tom@tromey.com>
12372
12373         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12374
12375 2017-02-10  Tom Tromey  <tom@tromey.com>
12376
12377         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12378         "cleanup" local.
12379         * python/py-type.c (typy_legacy_template_argument): Remove
12380         unnecessary "cleanup" local.
12381
12382 2017-02-10  Tom Tromey  <tom@tromey.com>
12383
12384         * python/python.c (do_start_initialization): New function, from
12385         _initialize_python.
12386         (_initialize_python): Call do_start_initialization.
12387         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12388         goto.
12389
12390 2017-02-10  Tom Tromey  <tom@tromey.com>
12391
12392         * python/py-prettyprint.c (pretty_print_one_value): Use
12393         gdbpy_ref.
12394
12395 2017-02-10  Tom Tromey  <tom@tromey.com>
12396
12397         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12398         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12399         gdbpy_ref.
12400         * python/py-type.c (field_new): Use gdbpy_ref.
12401         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12402         gdbpy_ref.
12403         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12404         (py_free_pspace): Likewise.
12405         (pspace_to_pspace_object): Likewise.
12406         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12407         (py_free_objfile): Likewise.
12408         (objfile_to_objfile_object): Likewise.
12409         * python/py-inferior.c (delete_thread_object): Use
12410         gdbpy_ref.
12411         (infpy_read_memory): Likewise.
12412         (py_free_inferior): Likewise.
12413         * python/py-evtregistry.c (create_eventregistry_object): Use
12414         gdbpy_ref.
12415         * python/py-event.c (create_event_object): Use gdbpy_ref.
12416
12417 2017-02-10  Tom Tromey  <tom@tromey.com>
12418
12419         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12420         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12421         used.
12422         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12423         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12424         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12425         python/py-framefilter.c, python/py-function.c,
12426         python/py-inferior.c, python/py-infevents.c,
12427         python/py-linetable.c, python/py-newobjfileevent.c,
12428         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12429         python/py-signalevent.c, python/py-stopevent.c,
12430         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12431         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12432         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12433         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12434
12435 2017-02-10  Tom Tromey  <tom@tromey.com>
12436
12437         * ui-out.h (ui_out_emit_type): New class.
12438         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12439         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12440         and ui_out_emit_tuple.
12441         (enumerate_locals): Likewise.
12442         (py_mi_print_variables, py_print_locals, py_print_args): Use
12443         ui_out_emit_list.
12444         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12445         ui_out_emit_list.
12446         * common/gdb_optional.h: New file.
12447
12448 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12449
12450         * MAINTAINERS (Write After Approval): Update my e-mail address.
12451
12452 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12453
12454         PR gdb/21122
12455         * breakpoint.c (_initialize_breakpoint): Update the help description
12456         of the 'commands' command to indicate that it takes a list argument.
12457
12458 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12459
12460         * interps.c (current_interp_set_logging): Remove "return".
12461
12462 2017-02-09  Gary Benson  <gbenson@redhat.com>
12463
12464         * symtab.c (add_symtab_completions): Prevent NULL pointer
12465         dereference.
12466
12467 2017-02-08  Pedro Alves  <palves@redhat.com>
12468
12469         * interps.c (interp::interp): Remove reference to quiet_p.
12470         (interp_set): Make static.  Remove dead "Switching to" output
12471         code.
12472         (interp_quiet_p, interp_set_quiet): Delete.
12473         (interpreter_exec_cmd): Don't set the interpreter quiet.
12474         * interps.h (interp_quiet_p): Make static.
12475         (class interp) <quiet_p>: Remove field
12476
12477 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12478
12479         * cli/cli-decode.c (find_command_name_length): Make it extern.
12480         * cli/cli-decode.h (find_command_name_length): Declare.
12481         * cli/cli-script.c (command_name_equals, line_first_arg):
12482         New functions.
12483         (process_next_line): Use cli-decode to parse command names.
12484         (build_command_line): Make args a constant pointer.
12485
12486 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12487
12488         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12489         Remove case-insensitive search.
12490
12491 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12492
12493         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12494         at the end of the line.  Avoids an ARI warning.
12495
12496 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12497
12498         * NEWS: Mention support for record/replay of Intel 64 rdrand and
12499         rdseed instructions.
12500         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12501
12502 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
12503
12504         PR tdep/20936
12505         Provide and use sparc32 and sparc64 target description XML files.
12506         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12507         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12508         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12509         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12510         * features/sparc/sparc32-solaris.xml: New file.
12511         * features/sparc/sparc64-solaris.xml: New file.
12512         * features/sparc/sparc32-solaris.c: Generated.
12513         * features/sparc/sparc64-solaris.c: Generated.
12514         * sparc-tdep.h: Account for differences in target descriptions.
12515         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12516         (sparc32_register_type): Use target provided registers.
12517         (validate_tdesc_registers): New function.
12518         (sparc32_gdbarch_init): Use tdesc_has_registers.
12519         Set pseudoregister functions.
12520         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12521         (sparc64_register_type): Use target provided registers.
12522         (sparc64_init_abi): Set pseudoregister functions.
12523
12524 2017-02-03  Tom Tromey  <tom@tromey.com>
12525
12526         PR rust/21097:
12527         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12528         with a single member.
12529
12530 2017-02-03  Pedro Alves  <palves@redhat.com>
12531
12532         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12533         (cli_interp_base::~cli_interp_base): New.
12534         (cli_interp): New struct.
12535         (as_cli_interp): Cast the interp itself to cli_interp.
12536         (cli_interpreter_pre_command_loop): Rename to ...
12537         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
12538         parameter.
12539         (cli_interpreter_init): Rename to ...
12540         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
12541         boolean.  Make extern.
12542         (cli_interpreter_resume): Rename to ...
12543         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
12544         extern.
12545         (cli_interpreter_suspend): Rename to ...
12546         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
12547         extern.
12548         (cli_interpreter_exec): Rename to ...
12549         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
12550         extern.
12551         (cli_interpreter_supports_command_editing): Rename to ...
12552         (cli_interp_base::supports_command_editing): ... this.  Remove
12553         'interp' parameter.  Make extern.
12554         (cli_ui_out): Rename to ...
12555         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
12556         Make extern.
12557         (cli_set_logging): Rename to ...
12558         (cli_interp_base::set_logging): ... this.  Remove 'interp'
12559         parameter.  Make extern.
12560         (cli_interp_procs): Delete.
12561         (cli_interp_factory): Adjust to use "new".
12562         * cli/cli-interp.h: Include "interps.h".
12563         (struct cli_interp_base): New struct.
12564         * interps.c (struct interp): Delete.  Fields moved to interps.h.
12565         (interp_new): Delete.
12566         (interp::interp, interp::~interp): New.
12567         (interp_set): Use bool, and return void.  Assume the interpreter
12568         has suspend, init and resume methods, and that the all return
12569         void.
12570         (set_top_level_interpreter): interp_set returns void.
12571         (interp_ui_out): Adapt.
12572         (current_interp_set_logging): Adapt.
12573         (interp_data): Delete.
12574         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12575         (interp_exec): Adapt.
12576         (top_level_interpreter_data): Delete.
12577         * interps.h (interp_init_ftype, interp_resume_ftype)
12578         (interp_suspend_ftype, interp_exec_ftype)
12579         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12580         (class interp): New.
12581         (interp_new): Delete.
12582         (interp_set): Now returns void.  Use bool.
12583         (interp_data, top_level_interpreter_data): Delete.
12584         * mi/mi-common.h: Include interps.h.
12585         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
12586         init, resume, suspect, exec, interp_ui_out, set_logging and
12587         pre_command_loop methods.
12588         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12589         (mi_interpreter_init): Rename to ...
12590         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
12591         bool, return void and make extern.  Adjust.
12592         (mi_interpreter_resume): ... Rename to ...
12593         (mi_interp::resume): ... this.  Remove the 'data' parameter,
12594         return void and make extern.  Adjust.
12595         (mi_interpreter_suspend): ... Rename to ...
12596         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
12597         return void and make extern.  Adjust.
12598         (mi_interpreter_exec): ... Rename to ...
12599         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
12600         extern.  Adjust.
12601         (mi_interpreter_pre_command_loop): ... Rename to ...
12602         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
12603         parameter and make extern.
12604         (mi_on_normal_stop_1): Adjust.
12605         (mi_ui_out): Rename to ...
12606         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
12607         parameter and make extern.  Adjust.
12608         (mi_set_logging): Rename to ...
12609         (mi_interp::set_logging): ... this.  Remove the 'interp'
12610         parameter and make extern.  Adjust.
12611         (mi_interp_procs): Delete.
12612         (mi_interp_factory): Adjust to use 'new'.
12613         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12614         (mi_print_exception, mi_execute_command, mi_load_progress):
12615         Adjust.
12616         * tui/tui-interp.c (tui_interp): New class.
12617         (as_tui_interp): Return a tui_interp pointer.
12618         (tui_on_normal_stop, tui_on_signal_received)
12619         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12620         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12621         to use interp::interp_ui_out.
12622         (tui_init): Rename to ...
12623         (tui_interp::init): ... this.  Remove the 'self' parameter, use
12624         bool, return void and make extern.  Adjust.
12625         (tui_resume): Rename to ...
12626         (tui_interp::resume): ... this.  Remove the 'data' parameter,
12627         return void and make extern.  Adjust.
12628         (tui_suspend): Rename to ...
12629         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
12630         return void and make extern.  Adjust.
12631         (tui_ui_out): Rename to ...
12632         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
12633         parameter, and make extern.  Adjust.
12634         (tui_exec): Rename to ...
12635         (tui_interp::exec): ... this.  Remove the 'data' parameter and
12636         make extern.
12637         (tui_interp_procs): Delete.
12638         (tui_interp_factory): Use "new".
12639
12640 2017-02-02  Tom Tromey  <tom@tromey.com>
12641
12642         * rust-exp.y (ends_raw_string, space_then_number)
12643         (rust_identifier_start_p): Return bool.
12644         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12645         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12646         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12647         (rust_chartype_p): Return bool.
12648         (val_print_struct, rust_print_struct_def, rust_print_type):
12649         Update.
12650         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12651         Return bool.
12652
12653 2017-02-02  Tom Tromey  <tom@tromey.com>
12654
12655         * rust-lang.c: Reindent.
12656
12657 2017-02-02  Tom Tromey  <tom@tromey.com>
12658
12659         * rust-lang.h (rust_crate_for_block): Update.
12660         * rust-lang.c (rust_crate_for_block): Return std::string.
12661         (rust_get_disr_info): Use std:;string, not
12662         gdb::unique_xmalloc_ptr.
12663         * rust-exp.y (crate_name): Update.
12664
12665 2017-02-02  Pedro Alves  <palves@redhat.com>
12666
12667         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12668         field out of gdb_disassembler_test and make it static.
12669
12670 2017-02-02  Pedro Alves  <palves@redhat.com>
12671
12672         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12673         mi1_interp and mi_interp fields.
12674
12675 2017-02-02  Pedro Alves  <palves@redhat.com>
12676
12677         * cli/cli-interp.c (struct saved_output_files, saved_output):
12678         Moved from cli/cli-logging.c.
12679         (cli_set_logging): New function.
12680         (cli_interp_procs): Install cli_set_logging.
12681         * cli/cli-interp.h (make_logging_output, cli_set_logging):
12682         Declare.
12683         * cli/cli-logging.c (struct saved_output_files, saved_output):
12684         Moved to cli/cli-interp.c.
12685         (pop_output_files): Don't save outputs here.
12686         (make_logging_output): New function.
12687         (handle_redirections): Don't build tee nor save previous outputs
12688         here.
12689         * interps.c (current_interp_set_logging): Change prototype.
12690         Assume there's always a set_logging_proc method installed.
12691         * interps.h (interp_set_logging_ftype): Change prototype.
12692         (current_interp_set_logging): Change prototype and adjust comment.
12693         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
12694         use make_logging_output.
12695         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12696 2017-02-02  Pedro Alves  <palves@redhat.com>
12697
12698         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12699         from ...
12700         (set_logging_overwrite): ... here.
12701         (logging_no_redirect_file): Delete.
12702         (set_logging_redirect): Don't handle redirection on the fly.
12703         Instead warn that "logging off" / "logging on" is necessary.
12704         (pop_output_files): Delete references to logging_no_redirect_file.
12705         (show_logging_command): Always speak in terms of what will happen
12706         once logging is reenabled.
12707
12708 2017-02-02  Pedro Alves  <palves@redhat.com>
12709
12710         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12711
12712 2017-02-02  Pedro Alves  <palves@redhat.com>
12713
12714         * disasm.c (gdb_pretty_print_insn): Rename to ...
12715         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12716         Remove gdbarch parameter.  Adapt to clear the object's buffers
12717         instead of allocating new buffers, and to print using the object's
12718         gdb_disassembler instead of calling gdb_print_insn.
12719         (dump_insns): Use gdb_pretty_print_disassembler.
12720         * disasm.h (gdb_pretty_print_insn): Delete declaration.
12721         (gdb_pretty_print_disassembler): New class.
12722         * record-btrace.c (btrace_insn_history): Use
12723         gdb_pretty_print_disassembler.
12724
12725 2017-02-02  Pedro Alves  <palves@redhat.com>
12726
12727         * ada-lang.c (type_as_string): Use string_file.
12728         * ada-valprint.c (ada_print_floating): Use string_file.
12729         * ada-varobj.c (ada_varobj_scalar_image)
12730         (ada_varobj_get_value_image): Use string_file.
12731         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12732         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12733         * breakpoint.c (update_inserted_breakpoint_locations)
12734         (insert_breakpoint_locations, reattach_breakpoints)
12735         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12736         (print_it_watchpoint): Use string_file.
12737         (save_breakpoints): Use stdio_file.
12738         * c-exp.y (oper): Use string_file.
12739         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12740         tee_file.
12741         (pop_output_files): Use delete.
12742         (handle_redirections): Use stdio_file and tee_file.
12743         * cli/cli-setshow.c (do_show_command): Use string_file.
12744         * compile/compile-c-support.c (c_compute_program): Use
12745         string_file.
12746         * compile/compile-c-symbols.c (generate_vla_size): Take a
12747         'string_file &' instead of a 'ui_file *'.
12748         (generate_c_for_for_one_variable): Take a 'string_file &' instead
12749         of a 'ui_file *'.  Use string_file.
12750         (generate_c_for_variable_locations): Take a 'string_file &'
12751         instead of a 'ui_file *'.
12752         * compile/compile-internal.h (generate_c_for_for_one_variable):
12753         Take a 'string_file &' instead of a 'ui_file *'.
12754         * compile/compile-loc2c.c (push, pushf, unary, binary)
12755         (print_label, pushf_register_address, pushf_register)
12756         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12757         'ui_file *'.  Adjust.
12758         * compile/compile.c (compile_to_object): Use string_file.
12759         * compile/compile.h (compile_dwarf_expr_to_c)
12760         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12761         'ui_file *'.
12762         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12763         (replace_typedefs_qualified_name): Use string_file and
12764         obstack_copy0.
12765         * disasm.c (gdb_pretty_print_insn): Use string_file.
12766         (gdb_disassembly): Adjust reference the null_stream global.
12767         (do_ui_file_delete): Delete.
12768         (gdb_insn_length): Use null_stream.
12769         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12770         * dwarf2loc.c (dwarf2_compile_property_to_c)
12771         (locexpr_generate_c_location, loclist_generate_c_location): Take a
12772         'string_file &' instead of a 'ui_file *'.
12773         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12774         * dwarf2read.c (do_ui_file_peek_last): Delete.
12775         (dwarf2_compute_name): Use string_file.
12776         * event-top.c (gdb_setup_readline): Use stdio_file.
12777         * gdbarch.sh (verify_gdbarch): Use string_file.
12778         * gdbtypes.c (safe_parse_type): Use null_stream.
12779         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12780         string_file.
12781         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12782         'string_file *' instead of a 'ui_file *'.
12783         (gdbscm_arch_disassemble): Use string_file.
12784         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12785         * guile/scm-ports.c (class ioscm_file_port): Now a class that
12786         inherits from ui_file.
12787         (ioscm_file_port_delete, ioscm_file_port_rewind)
12788         (ioscm_file_port_put): Delete.
12789         (ioscm_file_port_write): Rename to ...
12790         (ioscm_file_port::write): ... this.  Remove file_port_magic
12791         checks.
12792         (ioscm_file_port_new): Delete.
12793         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12794         ui_file_up.
12795         * guile/scm-type.c (tyscm_type_name): Use string_file.
12796         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12797         Use string_file.
12798         * infcmd.c (print_return_value_1): Use string_file.
12799         * infrun.c (print_target_wait_results): Use string_file.
12800         * language.c (add_language): Use string_file.
12801         * location.c (explicit_to_string_internal): Use string_file.
12802         * main.c (captured_main_1): Use null_file.
12803         * maint.c (maintenance_print_architecture): Use stdio_file.
12804         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12805         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12806         event_channel>: Change type to mi_console_file pointer.
12807         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12808         (mi_console_file_delete): Delete.
12809         (struct mi_console_file): Delete.
12810         (mi_console_file_magic): Delete.
12811         (mi_console_file_new): Delete.
12812         (mi_console_file::mi_console_file): New.
12813         (mi_console_file_delete): Delete.
12814         (mi_console_file_fputs): Delete.
12815         (mi_console_file::write): New.
12816         (mi_console_raw_packet): Delete.
12817         (mi_console_file::flush): New.
12818         (mi_console_file_flush): Delete.
12819         (mi_console_set_raw): Rename to ...
12820         (mi_console_file::set_raw): ... this.
12821         * mi/mi-console.h (class mi_console_file): New class.
12822         (mi_console_file_new, mi_console_set_raw): Delete.
12823         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12824         (mi_set_logging): Use delete and tee_file.  Adjust.
12825         * mi/mi-main.c (output_register): Use string_file.
12826         (mi_cmd_data_evaluate_expression): Use string_file.
12827         (mi_cmd_data_read_memory): Use string_file.
12828         (mi_cmd_execute, print_variable_or_computed): Use string_file.
12829         * mi/mi-out.c (mi_ui_out::main_stream): New.
12830         (mi_ui_out::rewind): Use main_stream and
12831         string_file.
12832         (mi_ui_out::put): Use main_stream and string_file.
12833         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12834         Allocate a 'string_file' instead.
12835         (mi_out_new): Don't allocate a mem_fileopen stream here.
12836         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12837         (mi_ui_out::main_stream): Declare method.
12838         * printcmd.c (eval_command): Use string_file.
12839         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12840         * python/py-arch.c (archpy_disassemble): Use string_file.
12841         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12842         * python/py-frame.c (frapy_str): Use string_file.
12843         * python/py-framefilter.c (py_print_type, py_print_single_arg):
12844         Use string_file.
12845         * python/py-type.c (typy_str): Use string_file.
12846         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12847         * python/py-value.c (valpy_str): Use string_file.
12848         * record-btrace.c (btrace_insn_history): Use string_file.
12849         * regcache.c (regcache_print): Use stdio_file.
12850         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12851         * remote.c (escape_buffer): Use string_file.
12852         * rust-lang.c (rust_get_disr_info): Use string_file.
12853         * serial.c (serial_open_ops_1): Use stdio_file.
12854         (do_serial_close): Use delete.
12855         * stack.c (print_frame_arg): Use string_file.
12856         (print_frame_args): Remove local mem_fileopen stream, not used.
12857         (print_frame): Use string_file.
12858         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12859         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12860         Take a 'string_file *' instead of a 'ui_file *'.
12861         * top.c (new_ui): Use stdio_file and stderr_file.
12862         (free_ui): Use delete.
12863         (execute_command_to_string): Use string_file.
12864         (quit_confirm): Use string_file.
12865         * tracepoint.c (collection_list::append_exp): Use string_file.
12866         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12867         * tui/tui-file.c: Don't include "ui-file.h".
12868         (enum streamtype, struct tui_stream): Delete.
12869         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12870         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12871         (tui_file::tui_file): New method.
12872         (tui_file_fputs): Delete.
12873         (tui_file_get_strbuf): Delete.
12874         (tui_file::puts): New method.
12875         (tui_file_adjust_strbuf): Delete.
12876         (tui_file_flush): Delete.
12877         (tui_file::flush): New method.
12878         * tui/tui-file.h: Tweak intro comment.
12879         Include ui-file.h.
12880         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12881         (tui_file_adjust_strbuf): Delete declarations.
12882         (class tui_file): New class.
12883         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12884         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12885         (tui_register_format): Use string_stream.
12886         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12887         (tui_get_function_from_frame): Use string_file.
12888         * typeprint.c (type_to_string): Use string_file.
12889         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12890         (null_stream): New global.
12891         (ui_file_delete): Delete.
12892         (ui_file::ui_file): New.
12893         (null_file_isatty): Delete.
12894         (ui_file::~ui_file): New.
12895         (null_file_rewind): Delete.
12896         (ui_file::printf): New.
12897         (null_file_put): Delete.
12898         (null_file_flush): Delete.
12899         (ui_file::putstr): New.
12900         (null_file_write): Delete.
12901         (ui_file::putstrn): New.
12902         (null_file_read): Delete.
12903         (ui_file::putc): New.
12904         (null_file_fputs): Delete.
12905         (null_file_write_async_safe): Delete.
12906         (ui_file::vprintf): New.
12907         (null_file_delete): Delete.
12908         (null_file::write): New.
12909         (null_file_fseek): Delete.
12910         (null_file::puts): New.
12911         (ui_file_data): Delete.
12912         (null_file::write_async_safe): New.
12913         (gdb_flush, ui_file_isatty): Adjust.
12914         (ui_file_put, ui_file_rewind): Delete.
12915         (ui_file_write): Adjust.
12916         (ui_file_write_for_put): Delete.
12917         (ui_file_write_async_safe, ui_file_read): Adjust.
12918         (ui_file_fseek): Delete.
12919         (fputs_unfiltered): Adjust.
12920         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12921         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12922         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12923         (set_ui_file_data): Delete.
12924         (string_file::~string_file, string_file::write)
12925         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12926         (do_ui_file_as_string, ui_file_as_string): Delete.
12927         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12928         (struct mem_file): Delete.
12929         (mem_file_new): Delete.
12930         (stdio_file::stdio_file): New.
12931         (mem_file_delete): Delete.
12932         (stdio_file::stdio_file): New.
12933         (mem_fileopen): Delete.
12934         (stdio_file::~stdio_file): New.
12935         (mem_file_rewind): Delete.
12936         (stdio_file::set_stream): New.
12937         (mem_file_put): Delete.
12938         (stdio_file::open): New.
12939         (mem_file_write): Delete.
12940         (stdio_file_magic, struct stdio_file): Delete.
12941         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12942         (stdio_file::flush): New.
12943         (stdio_file_read): Rename to ...
12944         (stdio_file::read): ... this.  Adjust.
12945         (stdio_file_write): Rename to ...
12946         (stdio_file::write): ... this.  Adjust.
12947         (stdio_file_write_async_safe): Rename to ...
12948         (stdio_file::write_async_safe) ... this.  Adjust.
12949         (stdio_file_fputs): Rename to ...
12950         (stdio_file::puts) ... this.  Adjust.
12951         (stdio_file_isatty): Delete.
12952         (stdio_file_fseek): Delete.
12953         (stdio_file::isatty): New.
12954         (stderr_file_write): Rename to ...
12955         (stderr_file::write) ... this.  Adjust.
12956         (stderr_file_fputs): Rename to ...
12957         (stderr_file::puts) ... this.  Adjust.
12958         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12959         (stderr_file::stderr_file): New.
12960         (tee_file_magic): Delete.
12961         (struct tee_file): Delete.
12962         (tee_file::tee_file): New.
12963         (tee_file_new): Delete.
12964         (tee_file::~tee_file): New.
12965         (tee_file_delete): Delete.
12966         (tee_file_flush): Rename to ...
12967         (tee_file::flush): ... this.  Adjust.
12968         (tee_file_write): Rename to ...
12969         (tee_file::write): ... this.  Adjust.
12970         (tee_file::write_async_safe): New.
12971         (tee_file_fputs): Rename to ...
12972         (tee_file::puts): ... this.  Adjust.
12973         (tee_file_isatty): Rename to ...
12974         (tee_file::isatty): ... this.  Adjust.
12975         * ui-file.h (struct obstack, struct ui_file): Don't
12976         forward-declare.
12977         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12978         (ui_file_write_ftype)
12979         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12980         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12981         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12982         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12983         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12984         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12985         (set_ui_file_fseek): Delete.
12986         (ui_file_data, ui_file_delete, ui_file_rewind)
12987         (struct ui_file): New.
12988         (ui_file_up): New.
12989         (class null_file): New.
12990         (null_stream): Declare.
12991         (ui_file_write_for_put, ui_file_put): Delete.
12992         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12993         Delete.
12994         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12995         (gdb_fopen, tee_file_new): Delete.
12996         (struct string_file): New.
12997         (struct stdio_file): New.
12998         (stdio_file_up): New.
12999         (struct stderr_file): New.
13000         (class tee_file): New.
13001         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13002         of a 'ui_file *'.  Adjust.
13003         * ui-out.h (class ui_out) <field_stream>: Likewise.
13004         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13005         (null_stream): Delete.
13006         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13007         Adjust.
13008         * utils.h (struct ui_file): Delete forward declaration..
13009         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13010         (error_stream): Take a 'string_file &' instead of a
13011         'ui_file *'.
13012         * varobj.c (varobj_value_get_print_value): Use string_file.
13013         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13014         * gdbarch.c: Regenerate.
13015
13016 2017-02-02  Pedro Alves  <palves@redhat.com>
13017
13018         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13019         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13020         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13021         Adjust to call gdb_print_insn instead of
13022         gdb_disassembler::print_insn.
13023         (dump_insns, do_mixed_source_and_assembly_deprecated)
13024         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13025         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13026         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13027         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13028         declaration.
13029         (gdb_pretty_print_insn): Re-add declaration.
13030         * record-btrace.c (btrace_insn_history): Don't allocate a
13031         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13032
13033 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13034
13035         * disasm.h (gdb_disassembly): Remove file_string parameter.
13036         * disasm.c (gdb_disassembly): Likewise.
13037         * cli/cli-cmds.c (print_disassembly): Adapt.
13038         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13039         * stack.c (do_gdb_disassembly): Likewise.
13040
13041 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13042
13043         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13044         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13045         targets.  And if the implicit value is longer than needed, extract
13046         the first bytes instead of the "least significant" ones.
13047
13048 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13049
13050         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13051         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13052         (btrace_fetch): Assert can_access_registers_ptid.
13053         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13054         validate_registers_access.
13055
13056 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13057
13058         * gdbthread.h (can_access_registers_ptid): New.
13059         * thread.c (can_access_registers_ptid): New.
13060
13061 2017-02-01  Pedro Alves  <palves@redhat.com>
13062
13063         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13064
13065 2017-01-31  Pedro Alves  <palves@redhat.com>
13066
13067         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13068         Fix typos.
13069
13070 2017-01-31  Pedro Alves  <palves@redhat.com>
13071
13072         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13073         not used.
13074
13075 2017-01-31  Pedro Alves  <palves@redhat.com>
13076
13077         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13078
13079 2017-01-31  Pedro Alves  <palves@redhat.com>
13080
13081         * common/scoped_restore.h
13082         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13083         change the value's parameter type to T2.
13084         (make_scoped_restore): Likewise.
13085
13086 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13087             Richard Henderson  <rth@redhat.com>
13088
13089         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13090         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13091         GS_BASE for older kernels.
13092         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13093         GS_BASE for older kernels.
13094         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13095         and GS_BASE to the offset table.
13096         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13097         system register group.
13098         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13099         for older kernels.
13100         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13101         amd64 ABI.
13102         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13103         AMD64_GSBASE_REGNUM.
13104         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13105         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13106         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13107         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13108         i386/64bit-segments.xml in those rules.
13109         * features/i386/64bit-segments.xml: New file.
13110         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13111         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13112         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13113         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13114         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13115         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13116         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13117         * features/i386/amd64-avx-linux.c: Regenerated.
13118         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13119         * features/i386/amd64-avx-mpx.c: Regenerated.
13120         * features/i386/amd64-avx512-linux.c: Regenerated.
13121         * features/i386/amd64-linux.c: Regenerated.
13122         * features/i386/amd64-mpx-linux.c: Regenerated.
13123         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13124         * features/i386/i386-avx-mpx.c: Regenerated.
13125         * features/i386/x32-avx-linux.c: Regenerated.
13126         * features/i386/x32-avx512-linux.c: Regenerated.
13127         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13128         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13129         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13130         * regformats/i386/amd64-linux.dat: Regenerated.
13131         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13132         * regformats/i386/x32-avx-linux.dat: Regenerated.
13133         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13134         * regformats/i386/x32-linux.dat: Regenerated.
13135
13136 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13137
13138         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13139         Set to AMD64_NUM_REGS.
13140
13141 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13142
13143         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13144         that checks validity of a register number.
13145
13146 2017-01-27  Kees Cook  <keescook@google.com>
13147
13148         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13149         fetch_fpregs if target has fpa registers.
13150         (arm_linux_store_inferior_registers): Call store_fpregs if target
13151         has fpa registers.
13152
13153 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13154
13155         * cris-tdep.c (cris_gdbarch_init): Remove check for
13156         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13157
13158 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13159
13160         * corelow.c (get_core_register_section): Check for regset
13161         existence before checking for REGSET_VARIABLE_SIZE.
13162
13163 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13164             Pedro Alves  <palves@redhat.com>
13165
13166         PR gdb/20939
13167         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13168         call memory_error, save memaddr instead.
13169         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13170         negative, cal memory_error.
13171         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13172
13173 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13174
13175         * disasm-selftests.c (memory_error_test): New function.
13176         (_initialize_disasm_selftests): Register memory_error_test.
13177
13178 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13179
13180         * Makefile.in (SFILES): Add disasm-selftests.c and
13181         selftest-arch.c.
13182         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13183         * disasm-selftests.c: New file.
13184         * selftest-arch.c: New file.
13185         * selftest-arch.h: New file.
13186
13187 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13188
13189         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13190         to bfd_arch_mep.  Don't return 0 if section is not
13191         found.  Call print_insn_mep.
13192
13193 2017-01-26  Pedro Alves  <palves@redhat.com>
13194             Yao Qi  <yao.qi@linaro.org>
13195
13196         * arm-tdep.c: Include "disasm.h".
13197         (gdb_print_insn_arm): Update code to get gdbarch.
13198         * disasm.c (dis_asm_read_memory): Change it to
13199         gdb_disassembler::dis_asm_read_memory.
13200         (dis_asm_memory_error): Likewise.
13201         (dis_asm_print_address): Likewise.
13202         (gdb_pretty_print_insn): Change it to
13203         gdb_disassembler::pretty_print_insn.
13204         (dump_insns): Add one argument gdb_disassemlber.  All
13205         callers updated.
13206         (do_mixed_source_and_assembly_deprecated): Likewise.
13207         (do_mixed_source_and_assembly): Likewise.
13208         (do_assembly_only): Likewise.
13209         (gdb_disassembler::gdb_disassembler): New.
13210         (gdb_disassembler::print_insn): New.
13211         * disasm.h (class gdb_disassembler): New.
13212         (gdb_pretty_print_insn): Remove declaration.
13213         (gdb_disassemble_info): Likewise.
13214         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13215         (gdbscm_disasm_read_memory_worker): Update.
13216         (gdbscm_disasm_read_memory): Update.
13217         (gdbscm_disasm_memory_error): Remove.
13218         (gdbscm_disasm_print_address): Remove.
13219         (gdbscm_disassembler::gdbscm_disassembler): New.
13220         (gdbscm_print_insn_from_port): Update.
13221         * mips-tdep.c: Include disasm.h.
13222         (gdb_print_insn_mips): Update code to get gdbarch.
13223         * record-btrace.c (btrace_insn_history): Update.
13224         * spu-tdep.c: Include disasm.h.
13225         (struct spu_dis_asm_data): Remove.
13226         (struct spu_dis_asm_info): New.
13227         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13228         SPU id.
13229         (gdb_print_insn_spu): Cast disassemble_info to
13230         spu_dis_asm_info.
13231
13232 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13233
13234         * disasm.c (do_ui_file_delete): Delete.
13235         (gdb_insn_length): Move code creating stream to ...
13236         * utils.c (null_stream): ... here.  New function.
13237         * utils.h (null_stream): Declare.
13238
13239 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13240
13241         * python/py-inferior.c (find_thread_object): Return directly
13242         from the loop.  Remove "found" variable.
13243
13244 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13245
13246         GDB 7.12.1 released.
13247
13248 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13249
13250         * python/py-function.c (fnpy_call): Reorder declarations to have
13251         the gdbpy_enter object declared first.
13252         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13253
13254 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13255
13256         PR python/21068
13257         * python/python-internal.h (PyMem_RawMalloc): Define for
13258         Python < 3.4.
13259         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13260         PyMem_RawMalloc instead of PyMem_Malloc.
13261
13262 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13263             Luis Machado  <lgustavo@codesourcery.com>
13264
13265         * NEWS (New commands): Mention flash-erase.
13266         (New MI commands): Mention target-flash-erase.
13267         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13268         command.
13269         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13270         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13271         * target.c (flash_erase_command): New function.
13272         (initialize_targets): Add new flash-erase command.
13273         * target.h (flash_erase_command): New declaration.
13274
13275 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13276
13277         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13278         HAVE_SYS_PROCFS_H is defined.
13279
13280 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13281
13282         * remote.c (struct cached_reg): Change data into a pointer.
13283         * (stop_reply_dtr): Free data pointers before deleting vector.
13284         (process_stop_reply): Likewise.
13285         (remote_parse_stop_reply): Allocate space for data
13286
13287 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13288
13289         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13290         MAX_REGISTER_SIZE.
13291         (amd64_pseudo_register_read_value): Likewise.
13292         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13293         (store_register_using_P): Likewise.
13294         * regcache.c (regcache_xfer_part): Likewise.
13295
13296 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13297
13298         Split real and pseudo registers.
13299         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13300         (sparc32_pseudo_regnum): New enum.
13301         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13302         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13303         (SPARC32_CP0_REGISTERS): New macro.
13304         (sparc32_pseudo_register_name): New function.
13305         (sparc32_register_name): Use sparc32_pseudo_register_name.
13306         (sparc32_pseudo_register_type): New function.
13307         (sparc32_register_type): Use sparc32_pseudo_register_type.
13308         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13309         pseudo register numbers.
13310         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13311         (SPARC64_CP0_REGISTERS): New macro.
13312         (sparc64_pseudo_register_name): New function.
13313         (sparc64_register_name): Use sparc64_pseudo_register_name.
13314         (sparc64_pseudo_register_type): New function.
13315         (sparc64_register_type): Use sparc64_pseudo_register_type.
13316         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13317         pseudo register numbers.
13318         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13319         sparc64_store_arguments): Handle pseudo register numbers.
13320
13321 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13322
13323         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13324         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13325         output.
13326         (getpkt_or_notif_sane_1): Likewise.
13327
13328 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13329
13330         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13331         of CC.  Pass "-x c++-header" instead of "-x c".
13332
13333 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13334
13335         * remote.c (remote_can_async_p): Update comment.
13336
13337 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13338
13339         * linux-nat.c (linux_nat_can_async_p): Update comment.
13340
13341 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13342
13343         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13344
13345 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13346
13347         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13348
13349 2017-01-10  Tom Tromey  <tom@tromey.com>
13350
13351         * python/py-type.c (typy_legacy_template_argument): Update.
13352         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13353         ~demangle_parse_info): Declare new members.
13354         (cp_demangled_name_to_comp): Return unique_ptr.
13355         (cp_demangled_name_parse_free)
13356         (make_cleanup_cp_demangled_name_parse_free)
13357         (cp_new_demangle_parse_info): Remove.
13358         * cp-support.c (do_demangled_name_parse_free_cleanup)
13359         (make_cleanup_cp_demangled_name_parse_free): Remove.
13360         (inspect_type, cp_canonicalize_string_full)
13361         (cp_canonicalize_string): Update.
13362         (mangled_name_to_comp): Change return type.
13363         (cp_class_name_from_physname, method_name_from_physname)
13364         (cp_func_name, cp_remove_params): Update.
13365         * cp-name-parser.y (demangle_parse_info): New constructor, from
13366         cp_new_demangle_parse_info.
13367         (~demangle_parse_info): New destructor, from
13368         cp_demangled_name_parse_free.
13369         (cp_merge_demangle_parse_infos): Update.
13370         (cp_demangled_name_to_comp): Change return type.
13371
13372 2017-01-10  Tom Tromey  <tom@tromey.com>
13373
13374         * top.c (prevent_dont_repeat): Change return type.
13375         * python/python.c (execute_gdb_command): Use std::string.
13376         Update.
13377         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13378         * command.h (prevent_dont_repeat): Change return type.
13379         * breakpoint.c (bpstat_do_actions_1): Update.
13380
13381 2017-01-10  Tom Tromey  <tom@tromey.com>
13382
13383         * value.h (scoped_value_mark::~scoped_value_mark): Call
13384         free_to_mark.
13385         (scoped_value_mark::free_to_mark): New method.
13386         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13387         scoped_value_mark.
13388
13389 2017-01-10  Tom Tromey  <tom@tromey.com>
13390
13391         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13392         (valpy_reference_value, valpy_const_value, valpy_get_address)
13393         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13394         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13395         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13396         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13397         scoped_value_mark.
13398         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13399         * value.h (scoped_value_mark): New class.
13400
13401 2017-01-10  Tom Tromey  <tom@tromey.com>
13402
13403         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13404         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13405         * psymtab.c (discard_psymtabs_upto): Remove.
13406         (make_cleanup_discard_psymtabs): Remove.
13407         (struct psymtab_state): Remove.
13408
13409 2017-01-10  Tom Tromey  <tom@tromey.com>
13410
13411         * record-full.c (record_full_save_cleanups): Remove.
13412         (record_full_save): Use gdb::unlinker.
13413         * gcore.c (do_bfd_delete_cleanup): Remove.
13414         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13415         cleanups.
13416         * dwarf2read.c (unlink_if_set): Remove.
13417         (write_psymtabs_to_index): Use gdb::unlinker.
13418         * common/gdb_unlinker.h: New file.
13419
13420 2017-01-10  Tom Tromey  <tom@tromey.com>
13421
13422         * windows-tdep.c (windows_xfer_shared_library): Update.
13423         * windows-nat.c (windows_make_so): Update.
13424         * utils.h (make_cleanup_bfd_unref): Remove.
13425         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13426         * symfile.h (symfile_bfd_open)
13427         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13428         * symfile.c (read_symbols, symbol_file_add)
13429         (separate_debug_file_exists): Update.
13430         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13431         (generic_load, reread_symbols): Update.
13432         * symfile-mem.c (symbol_file_add_from_memory): Update.
13433         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13434         (spu_symbol_file_add_from_memory): Update.
13435         * solist.h (struct target_so_ops) <bfd_open>: Return
13436         gdb_bfd_ref_ptr.
13437         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13438         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13439         gdb_bfd_ref_ptr.
13440         (solib_map_sections, reload_shared_libraries_1): Update.
13441         * solib-svr4.c (enable_break): Update.
13442         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13443         * solib-frv.c (enable_break2): Update.
13444         * solib-dsbt.c (enable_break): Update.
13445         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13446         gdb_bfd_ref_ptr.
13447         (darwin_solib_get_all_image_info_addr_at_init): Update.
13448         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13449         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13450         * record-full.c (record_full_save): Update.
13451         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13452         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13453         * minidebug.c (find_separate_debug_file_in_section): Return
13454         gdb_bfd_ref_ptr.
13455         * machoread.c (macho_add_oso_symfile): Change abfd to
13456         gdb_bfd_ref_ptr.
13457         (macho_symfile_read_all_oso): Update.
13458         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13459         (macho_symfile_read): Update.
13460         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13461         (jit_bfd_try_read_symtab): Update.
13462         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13463         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13464         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13465         gdb_bfd_ref_ptr.
13466         (gdb_bfd_ref_policy): New struct.
13467         (gdb_bfd_ref_ptr): New typedef.
13468         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13469         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13470         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13471         gdb_bfd_ref_ptr.
13472         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13473         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13474         (gcore_command): Update.
13475         * exec.c (exec_file_attach): Update.
13476         * elfread.c (elf_symfile_read): Update.
13477         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13478         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13479         (open_and_init_dwo_file): Update.
13480         (open_dwp_file): Return gdb_bfd_ref_ptr.
13481         (open_and_init_dwp_file): Update.
13482         * corelow.c (core_open): Update.
13483         * compile/compile-object-load.c (compile_object_load): Update.
13484         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13485         * coffread.c (coff_symfile_read): Update.
13486         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13487         gdb_bfd_ref_ptr.  Rename.
13488         (dump_bfd_file, restore_command): Update.
13489         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13490         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13491         (find_separate_debug_file_by_buildid): Update.
13492
13493 2017-01-10  Tom Tromey  <tom@tromey.com>
13494
13495         * common/gdb_ref_ptr.h: New file.
13496         * python/py-ref.h (struct gdbpy_ref_policy): New.
13497         (gdbpy_ref): Now a typedef.
13498
13499 2017-01-10  Tom Tromey  <tom@tromey.com>
13500
13501         * utils.h (make_cleanup_htab_delete): Don't declare.
13502         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13503         Remove.
13504         * linespec.c (decode_compound_collector): Add constructor,
13505         destructor.
13506         (lookup_prefix_sym): Remove cleanup.
13507         (symtab_collector): Add constructor, destructor.
13508         (collect_symtabs_from_filename): Remove cleanup.
13509         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13510         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13511         Use htab_up.
13512         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13513         * dwarf2read.c (dw2_expand_symtabs_matching)
13514         (dw2_map_symbol_filenames, dwarf_decode_macros)
13515         (write_psymtabs_to_index): Use htab_up.
13516         * dwarf2loc.c (func_verify_no_selftailcall)
13517         (call_site_find_chain_1, func_verify_no_selftailcall)
13518         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13519         std::vector, gdb::unique_xmalloc_ptr.
13520         (call_sitep): Remove typedef.
13521         (dwarf2_locexpr_baton_eval): Remove unused variable.
13522
13523 2017-01-10  Tom Tromey  <tom@tromey.com>
13524
13525         * python/python-internal.h (make_cleanup_py_decref)
13526         (make_cleanup_py_xdecref): Don't declare.
13527         * python/py-utils.c (py_decref, make_cleanup_py_decref)
13528         (py_xdecref, make_cleanup_py_xdecref): Remove.
13529
13530 2017-01-10  Tom Tromey  <tom@tromey.com>
13531
13532         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13533         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13534
13535 2017-01-10  Tom Tromey  <tom@tromey.com>
13536
13537         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13538
13539 2017-01-10  Tom Tromey  <tom@tromey.com>
13540
13541         * python/py-utils.c (unicode_to_encoded_string)
13542         (python_string_to_target_string)
13543         (python_string_to_target_python_string)
13544         (python_string_to_host_string, gdbpy_obj_to_string)
13545         (get_addr_from_python): Use gdbpy_ref.
13546
13547 2017-01-10  Tom Tromey  <tom@tromey.com>
13548
13549         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13550         gdbpy_ref.
13551
13552 2017-01-10  Tom Tromey  <tom@tromey.com>
13553
13554         * python/python.c (eval_python_command, gdbpy_decode_line)
13555         (gdbpy_run_events, gdbpy_start_type_printers)
13556         (gdbpy_apply_type_printers): Use gdbpy_ref.
13557
13558 2017-01-10  Tom Tromey  <tom@tromey.com>
13559
13560         * python/py-param.c (get_doc_string, compute_enum_values): Use
13561         gdbpy_ref.
13562
13563 2017-01-10  Tom Tromey  <tom@tromey.com>
13564
13565         * python/py-inferior.c (find_thread_object, build_inferior_list):
13566         Use gdbpy_ref.
13567
13568 2017-01-10  Tom Tromey  <tom@tromey.com>
13569
13570         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13571
13572 2017-01-10  Tom Tromey  <tom@tromey.com>
13573
13574         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13575         gdbpy_ref.
13576
13577 2017-01-10  Tom Tromey  <tom@tromey.com>
13578
13579         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
13580         extra incref.
13581         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13582         Use gdbpy_ref.
13583
13584 2017-01-10  Tom Tromey  <tom@tromey.com>
13585
13586         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13587         gdbpy_ref.
13588
13589 2017-01-10  Tom Tromey  <tom@tromey.com>
13590
13591         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
13592         decref results of PyArg_ParseTupleAndKeywords.
13593
13594 2017-01-10  Tom Tromey  <tom@tromey.com>
13595
13596         * python/python.c (python_run_simple_file): Use
13597         unique_xmalloc_ptr, gdbpy_ref.
13598
13599 2017-01-10  Tom Tromey  <tom@tromey.com>
13600
13601         * python/py-prettyprint.c (print_stack_unless_memory_error)
13602         (print_string_repr, print_children): Use gdbpy_ref.
13603         (dummy_python_frame): New class.
13604         (dummy_python_frame::dummy_python_frame): Rename from
13605         push_dummy_python_frame.
13606         (py_restore_tstate): Remove.
13607
13608 2017-01-10  Tom Tromey  <tom@tromey.com>
13609
13610         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13611
13612 2017-01-10  Tom Tromey  <tom@tromey.com>
13613
13614         * python/python.c (ensure_python_env, restore_python_env):
13615         Remove.
13616         * python/python-internal.h (ensure_python_env): Don't declare.
13617         * varobj.h (varobj_ensure_python_env): Don't declare.
13618         * varobj.c (varobj_ensure_python_env): Remove.
13619
13620 2017-01-10  Tom Tromey  <tom@tromey.com>
13621
13622         * varobj.c (varobj_value_get_print_value): Use
13623         gdbpy_enter_varobj.
13624
13625 2017-01-10  Tom Tromey  <tom@tromey.com>
13626
13627         * python/py-prettyprint.c (print_string_repr, print_children):
13628         Update.
13629         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13630         of "encoding".
13631         * varobj.c (varobj_value_get_print_value): Update.
13632         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13633
13634 2017-01-10  Tom Tromey  <tom@tromey.com>
13635
13636         * varobj.c (varobj_get_display_hint)
13637         (dynamic_varobj_has_child_method, install_new_value_visualizer)
13638         (varobj_set_visualizer, free_variable): Use
13639         gdbpy_enter_varobj.
13640
13641 2017-01-10  Tom Tromey  <tom@tromey.com>
13642
13643         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13644         (do_finish_initialization): New function.  Use gdbpy_ref.
13645         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
13646         do_finish_initialization.
13647
13648 2017-01-10  Tom Tromey  <tom@tromey.com>
13649
13650         * python/py-param.c (get_set_value, get_show_value): Use
13651         gdbpy_enter, gdbpy_ref.
13652
13653 2017-01-10  Tom Tromey  <tom@tromey.com>
13654
13655         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13656
13657 2017-01-10  Tom Tromey  <tom@tromey.com>
13658
13659         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13660
13661 2017-01-10  Tom Tromey  <tom@tromey.com>
13662
13663         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13664         Use gdbpy_enter_varobj.
13665
13666 2017-01-10  Tom Tromey  <tom@tromey.com>
13667
13668         * varobj.c (gdbpy_enter_varobj): New constructor.
13669         * python/python-internal.h (gdbpy_enter_varobj): New class.
13670         * python/py-varobj.c (py_varobj_get_iterator): Use
13671         gdbpy_enter_varobj.
13672
13673 2017-01-10  Tom Tromey  <tom@tromey.com>
13674
13675         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13676         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13677         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13678         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13679         unique_xmalloc_ptr.
13680         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13681
13682 2017-01-10  Tom Tromey  <tom@tromey.com>
13683
13684         * python/py-xmethods.c (invoke_match_method): Use
13685         gdbpy_ref.
13686
13687 2017-01-10  Tom Tromey  <tom@tromey.com>
13688
13689         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13690         gdbpy_enter, gdbpy_ref.
13691
13692 2017-01-10  Tom Tromey  <tom@tromey.com>
13693
13694         * python/python.c (python_interactive_command): Use gdbpy_enter.
13695
13696 2017-01-10  Tom Tromey  <tom@tromey.com>
13697
13698         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13699         gdbpy_ref.
13700
13701 2017-01-10  Tom Tromey  <tom@tromey.com>
13702
13703         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13704         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13705
13706 2017-01-10  Tom Tromey  <tom@tromey.com>
13707
13708         * utils.h (htab_deleter): New struct.
13709         (htab_up): New typedef.
13710         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13711         gdbpy_enter, gdbpy_ref, htab_up.
13712
13713 2017-01-10  Tom Tromey  <tom@tromey.com>
13714
13715         * python/py-unwind.c (pending_frame_invalidate): Remove.
13716         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13717
13718 2017-01-10  Tom Tromey  <tom@tromey.com>
13719
13720         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13721         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13722
13723 2017-01-10  Tom Tromey  <tom@tromey.com>
13724
13725         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13726
13727 2017-01-10  Tom Tromey  <tom@tromey.com>
13728
13729         * python/python.c (gdbpy_eval_from_control_command)
13730         (gdbpy_source_script, gdbpy_run_events)
13731         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13732         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13733         gdbpy_enter.
13734
13735 2017-01-10  Tom Tromey  <tom@tromey.com>
13736
13737         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13738
13739 2017-01-10  Tom Tromey  <tom@tromey.com>
13740
13741         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13742
13743 2017-01-10  Tom Tromey  <tom@tromey.com>
13744
13745         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13746         (python_on_inferior_call_pre, python_on_inferior_call_post)
13747         (python_on_memory_change, python_on_register_change)
13748         (python_inferior_exit, python_new_objfile, add_thread_object)
13749         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13750
13751 2017-01-10  Tom Tromey  <tom@tromey.com>
13752
13753         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13754         (bpfinishpy_handle_exit): Use gdbpy_enter.
13755
13756 2017-01-10  Tom Tromey  <tom@tromey.com>
13757
13758         * python/py-cmd.c (cmdpy_destroyer)
13759         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13760         gdbpy_enter.
13761
13762 2017-01-10  Tom Tromey  <tom@tromey.com>
13763
13764         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13765         gdbpy_enter.
13766         (gdbpy_breakpoint_has_cond): Likewise.
13767
13768 2017-01-10  Tom Tromey  <tom@tromey.com>
13769
13770         * python/python.c (gdbpy_enter): New constructor.
13771         (~gdbpy_enter): New destructor.
13772         (restore_python_env, ensure_python_env): Rewrite.
13773         * python/python-internal.h (gdbpy_enter): New class.
13774
13775 2017-01-10  Tom Tromey  <tom@tromey.com>
13776
13777         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13778
13779 2017-01-10  Tom Tromey  <tom@tromey.com>
13780
13781         * python/py-value.c (value_has_field, get_field_flag)
13782         (get_field_type, valpy_getitem, convert_value_from_python): Use
13783         gdbpy_ref.
13784
13785 2017-01-10  Tom Tromey  <tom@tromey.com>
13786
13787         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13788         gdbpy_ref.
13789
13790 2017-01-10  Tom Tromey  <tom@tromey.com>
13791
13792         * python/py-prettyprint.c (search_pp_list)
13793         (find_pretty_printer_from_objfiles)
13794         (find_pretty_printer_from_progspace)
13795         (find_pretty_printer_from_gdb, find_pretty_printer)
13796         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13797         gdbpy_ref.
13798
13799 2017-01-10  Tom Tromey  <tom@tromey.com>
13800
13801         * python/py-param.c (call_doc_function): Use gdbpy_ref.
13802
13803 2017-01-10  Tom Tromey  <tom@tromey.com>
13804
13805         * python/py-linetable.c (build_line_table_tuple_from_pcs)
13806         (ltpy_get_all_source_lines): Use gdbpy_ref.
13807
13808 2017-01-10  Tom Tromey  <tom@tromey.com>
13809
13810         * python/py-framefilter.c (extract_sym, extract_value)
13811         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13812         gdbpy_ref.
13813
13814 2017-01-10  Tom Tromey  <tom@tromey.com>
13815
13816         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13817
13818 2017-01-10  Tom Tromey  <tom@tromey.com>
13819
13820         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13821
13822 2017-01-10  Tom Tromey  <tom@tromey.com>
13823
13824         * python/py-function.c (convert_values_to_python, fnpy_init): Use
13825         gdbpy_ref.
13826
13827 2017-01-10  Tom Tromey  <tom@tromey.com>
13828
13829         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13830
13831 2017-01-10  Tom Tromey  <tom@tromey.com>
13832
13833         * python/py-type.c (convert_field, make_fielditem, typy_fields)
13834         (typy_range): Use gdbpy_ref.
13835
13836 2017-01-10  Tom Tromey  <tom@tromey.com>
13837
13838         * python/py-threadevent.c (create_thread_event_object): Use
13839         gdbpy_ref.
13840         * python/py-stopevent.c (create_stop_event_object): Simplify.
13841         (emit_stop_event): Use gdbpy_ref.
13842         * python/py-signalevent.c (create_signal_event_object): Use
13843         gdbpy_ref.
13844         * python/py-newobjfileevent.c (create_new_objfile_event_object)
13845         (emit_new_objfile_event, create_clear_objfiles_event_object)
13846         (emit_clear_objfiles_event): Use gdbpy_ref.
13847         * python/py-infevents.c (create_inferior_call_event_object)
13848         (create_register_changed_event_object)
13849         (create_memory_changed_event_object, emit_inferior_call_event)
13850         (emit_memory_changed_event, emit_register_changed_event): Use
13851         gdbpy_ref.
13852         * python/py-exitedevent.c (create_exited_event_object)
13853         (emit_exited_event): Use gdbpy_ref.
13854         * python/py-event.h (evpy_emit_event): Remove
13855         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13856         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13857         * python/py-continueevent.c (emit_continue_event): Use
13858         gdbpy_ref.
13859         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13860         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13861         gdbpy_ref.
13862         * python/py-bpevent.c (create_breakpoint_event_object): Use
13863         gdbpy_ref.
13864
13865 2017-01-10  Tom Tromey  <tom@tromey.com>
13866
13867         * python/py-ref.h: New file.
13868
13869 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13870
13871         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13872         void.
13873         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13874         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13875         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13876         * ui-out.c (ui_out::redirect): Likewise.
13877         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13878         * cli/cli-logging.c (set_logging_redirect): Update call site of
13879         ui_out::redirect.
13880         (handle_redirections): Likewise.
13881         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13882         * top.c (execute_command_to_string): Likewise.
13883         * utils.c (do_ui_out_redirect_pop): Likewise.
13884
13885 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13886
13887         * stack.c (_initialize_stack): Update "frame" command help message.
13888
13889 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13890
13891         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13892
13893 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13894
13895         * x86-linux-nat.h: Include gdb_proc_service.h.
13896
13897 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13898
13899         * ser-base.h: Include serial.h.
13900
13901 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13902
13903         * ppc-linux-tdep.h: Include ppc-tdep.h.
13904
13905 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13906
13907         * nat/amd64-linux-siginfo.h: Include signal.h.
13908
13909 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13910
13911         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13912
13913 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13914
13915         * mi/mi-parse.h: Include mi-cmds.h.
13916
13917 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13918
13919         * inf-loop.c: Don't include "target.h".
13920         * inf-loop.h: Include it here.
13921
13922 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13923
13924         * dfp.h: Include "dboulest.h" and "expression.h".
13925
13926 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13927
13928         * ax-gdb.h: Include "ax.h".
13929
13930 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13931
13932         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13933         with nat/gdb_ptrace.h.
13934
13935 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13936
13937         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13938         new line.
13939         (mips64_fbsd_sigframe_init): Likewise.
13940
13941 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13942
13943         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13944         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13945
13946 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13947
13948         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13949         * NEWS: Mention new FreeBSD/mips native configuration.
13950         * config/mips/fbsd.mh: New file.
13951         * configure.host: Add mips*-*-freebsd*.
13952         * mips-fbsd-nat.c: New file.
13953
13954 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13955
13956         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13957         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13958         * NEWS: Mention new FreeBSD/mips target.
13959         * configure.tgt: Add mips*-*-freebsd*.
13960         * mips-fbsd-tdep.c: New file.
13961         * mips-fbsd-tdep.h: New file.
13962
13963 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13964
13965         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13966         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13967
13968 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13969
13970         Update copyright year range in all GDB files.
13971
13972 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13973
13974         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13975
13976 For older changes see ChangeLog-2016.
13977 \f
13978 Local Variables:
13979 mode: change-log
13980 left-margin: 8
13981 fill-column: 74
13982 version-control: never
13983 coding: utf-8
13984 End: